|
|
!(function(){var Dl=Math.pow;var gc=(En,Wt,se)=>new Promise((de,He)=>{var Be=we=>{try{ve(se.next(we))}catch(Ee){He(Ee)}},Ve=we=>{try{ve(se.throw(we))}catch(Ee){He(Ee)}},ve=we=>we.done?de(we.value):Promise.resolve(we.value).then(Be,Ve);ve((se=se.apply(En,Wt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[7189],{18299:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},84249:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},42922:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},90674:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},25877:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},63237:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},99569:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},33859:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},22751:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},24018:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},40043:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},38308:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},17663:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},91034:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},72395:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},53978:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ee}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(me,Ie){return He.createElement(ve.Z,(0,de.Z)({},me,{ref:Ie,icon:Ve}))},Ee=He.forwardRef(we)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(En,Wt){"use strict";Wt.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 En={},Wt="5.0",se={},de=null,He=!1,Be=!1,Ve=null,ve=!1,we=null,Ee=null,xe=0;xe<arguments.length;xe++){var me=arguments[xe];if(me!==null)switch(typeof me){case"number":Wt=me.toFixed(1);break;case"string":me.match(new RegExp("^[0-9]\\.[0-9]+$"))?Wt=me:Ve=me;break;case"object":typeof me.is3D!="undefined"?de=me:se=me;break;case"boolean":He=me,Be=!0;break}}de===null&&(de={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},se.material_id!==void 0&&!Be&&(He=!0)),Ve!==null&&se.id===void 0&&(se.id=Ve);var Ie="",ot="",Oe=!1,St=null,ft=null,it=null,Je=!1,Le=null,gt=null,qt=null,tt=null,ct=null;se.height!==void 0&&(se.height=Math.round(se.height)),se.width!==void 0&&(se.width=Math.round(se.width));var ke=function(Ge){return parseFloat(Ge)>4?parseFloat(Ge):5};En.setHTML5Codebase=function(Ge,rt){Ee=Ge,ht(Ge,rt)},En.setJavaCodebase=En.setJavaCodebaseVersion=En.isCompiledInstalled=En.setPreCompiledScriptPath=En.setPreCompiledResourcePath=function(){},En.setHTML5CodebaseVersion=function(Ge,rt){var jt=parseFloat(Ge);if(jt!==NaN&&jt<5){console.log("The GeoGebra HTML5 codebase version "+jt+" is deprecated. Using version latest instead.");return}we=Ge,Ce(Ge,rt)},En.getHTML5CodebaseVersion=function(){return ft},En.getParameters=function(){return se},En.setFontsCSSURL=function(Ge){tt=Ge},En.setGiacJSURL=function(Ge){},En.setJNLPFile=function(Ge){Ie=Ge},En.setJNLPBaseDir=function(Ge){},En.inject=function(){function Ge(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var rt="auto",jt=se.id,_n,rn=!1,$t=0;$t<arguments.length;$t++){var Zt=arguments[$t];typeof Zt=="string"?(Zt=Zt.toLowerCase(),Zt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?rt=Zt:jt=arguments[$t]):typeof Zt=="boolean"?rn=Zt:Zt instanceof HTMLElement&&(_n=Zt)}yn();function yn(){if(!ve){setTimeout(yn,200);return}rt=or(rt);var ln=_n||document.getElementById(jt);if(!ln){console.log("possibly bug on ajax loading? ");return}if(En.removeExistingApplet(ln,!1),se.width===void 0&&ln.clientWidth&&(se.width=ln.clientWidth),se.height===void 0&&ln.clientHeight&&(se.height=ln.clientHeight),!(se.width&&se.height)&&rt==="html5"&&(delete se.width,delete se.height),St=rt,rt==="screenshot")Ot(ln,se);else{var Ae=!1;se.hasOwnProperty("playButton")&&se.playButton||se.hasOwnProperty("clickToLoad")&&se.clickToLoad?Ae=!0:se.hasOwnProperty("playButtonAutoDecide")&&se.playButtonAutoDecide&&(Ae=(!Se()||Ge())&&Ue()),Ae?(St="screenshot",Nt(ln,se,rn,rt)):Kt(ln,se,rn)}}};function Se(){try{return window.self!==window.top}catch(Ge){return!0}}function Ue(){return se.hasOwnProperty("screenshotGenerator")&&se.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}En.getViews=function(){return de},En.isJavaInstalled=function(){return!1};var je=function(Ge){var rt=function($t){var Zt=JSON.parse($t),yn=function(ue){return ue.type=="G"||ue.type=="E"},ln=Zt.elements?Zt.elements.filter(yn)[0]:Zt;if(!ln||!ln.url){jt();return}se.fileName=ln.url,_t(ln.settings||{}),de.is3D=!0;var Ae="https://www.geogebra.org/images/";En.setPreviewImage(Le||ln.previewUrl,Ae+"GeoGebra_loading.png",Ae+"applet_play.png"),Ge()},jt=function(){se.onError&&se.onError(),Ut("Error: Fetching material (id "+se.material_id+") failed.",se)},_n=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",rn="/materials/"+se.material_id+"?scope=basic";vt("https://"+_n+"/api/proxy.php?path="+encodeURIComponent(rn),rt,jt)};function _t(Ge){var rt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(jt){Ge[jt]=!!Ge[jt]}),rt.forEach(function(jt){se[jt]===void 0&&Ge[jt]!==void 0&&(se[jt]=Ge[jt])}),se.showToolBarHelp===void 0&&(se.showToolBarHelp=se.showToolBar)}function vt(Ge,rt,jt){var _n=new XMLHttpRequest;_n.open("GET",Ge),_n.onload=function(){rt(_n.responseText)},_n.onerror=jt,_n.send()}En.isHTML5Installed=function(){return!0},En.getLoadedAppletType=function(){return St},En.setPreviewImage=function(Ge,rt,jt){Le=Ge,gt=rt,qt=jt},En.removeExistingApplet=function(Ge,rt){var jt;typeof Ge=="string"&&(Ge=document.getElementById(Ge)),St=null;var _n=null;for(jt=0;jt<Ge.childNodes.length;jt++){var rn=Ge.childNodes[jt],$t=rn.className;$t==="applet_screenshot"?rt?(rn.style.display="block",St="screenshot"):rn.style.display="none":$t!=="applet_scaler prerender"&&(Ge.removeChild(rn),_n=$t&&$t.indexOf("appletParameters")!=-1?rn.id:null,jt--)}var Zt=se.id!==void 0?se.id:_n,yn=window[Zt];yn&&typeof yn.getBase64=="function"&&(yn.remove(),window[Zt]=null)},En.refreshHitPoints=function(){if(ke(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ge=En.getAppletObject();return Ge&&typeof Ge.recalculateEnvironments=="function"?(Ge.recalculateEnvironments(),!0):!1},En.startAnimation=function(){var Ge=En.getAppletObject();return Ge&&typeof Ge.startAnimation=="function"?(Ge.startAnimation(),!0):!1},En.stopAnimation=function(){var Ge=En.getAppletObject();return Ge&&typeof Ge.stopAnimation=="function"?(Ge.stopAnimation(),!0):!1},En.getAppletObject=function(){var Ge=se.id!==void 0?se.id:"ggbApplet";return window[Ge]},En.resize=function(){};var kt=function(Ge,rt,jt){var _n=document.createElement("param");_n.setAttribute("name",rt),_n.setAttribute("value",jt),Ge.appendChild(_n)},Xe=function(Ge){return Ge&&Ge!=="false"},Kt=function(Ge,rt,jt){ke(ft)<=4.2&&(jt=!0);var _n=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ft||ggbHTML5LoadedCodebaseIsWebSimple&&!Je)&&(_n=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var rn=document.createElement("div");rn.classList.add("appletParameters","notranslate");var $t=rt.width,Zt=rt.height;if(rt.disableAutoScale=rt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():rt.disableAutoScale,rt.width!==void 0)if(ke(ft)<=4.4)Xe(rt.showToolBar)&&(rt.height-=7),Xe(rt.showAlgebraInput)&&(rt.height-=37),rt.width<605&&Xe(rt.showToolBar)&&(rt.width=605,$t=605);else{var yn=100;(Xe(rt.showToolBar)||Xe(rt.showMenuBar))&&(rt.hasOwnProperty("customToolBar")&&(rt.customToolbar=rt.customToolBar),yn=Xe(rt.showMenuBar)?245:155),$t<yn&&(rt.width=yn,$t=yn)}rn.style.border="none",rn.style.display="inline-block";for(var ln in rt)rt.hasOwnProperty(ln)&&ln!=="appletOnLoad"&&rn.setAttribute("data-param-"+ln,rt[ln]);tt&&rn.setAttribute("data-param-fontscssurl",tt),En.resize=function(){GGBAppletUtils.responsiveResize(Ge,rt)},window.addEventListener("resize",function(Xt){En.resize()});var Ae=typeof rt.appletOnLoad=="function"?rt.appletOnLoad:function(){};if(!jt&&rt.width!==void 0){rt.hasOwnProperty("showSplash")||rn.setAttribute("data-param-showSplash","false");var ue=Ge.querySelector(".applet_scaler.prerender"),le=ue!==null;if(le)var pe=ue.querySelector(".ggb_preview");else{var pe=Cn($t,Zt,rt.borderColor,!1);ue=document.createElement("div"),ue.className="applet_scaler",ue.style.position="relative",ue.style.display="block",ue.style.width=$t+"px",ue.style.height=Zt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ue,"66%"),ke(ft)>=5?(rt.appletOnLoad=function(Xt){var Hn=Ge.querySelector(".ggb_preview");Hn&&Hn.parentNode.removeChild(Hn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ue),window.GGBT_wsf_view&&$(window).trigger("resize"),Ae(Xt)},le||ue.appendChild(pe)):rn.appendChild(pe),ue.appendChild(rn),le||Ge.appendChild(ue),setTimeout(function(){En.resize()},1)}else{var he=document.createElement("div");he.className="applet_scaler",he.style.position="relative",he.style.display="block",he.appendChild(rn),Ge.appendChild(he),rt.appletOnLoad=function(Xt){En.resize(),Ae(Xt)}}function oe(Xt,Hn){Hn&&typeof Hn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Xt,Hn.appletOnLoad):renderGGBElement(Xt),Ut("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Hn)}function Te(Xt,Hn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Xt,params:Hn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Rn){oe(Rn.article,Rn.params)}),html5AppletsToProcess=null)},ke(ft)<5&&(Xt.className+=" geogebraweb")):oe(Xt,Hn)}if(_n){scriptLoadStarted=!0;for(var Ye=0;Ye<rn.childNodes.length;Ye++){var Lt=rn.childNodes[Ye].tagName;Lt==="TABLE"&&(rn.removeChild(rn.childNodes[Ye]),Ye--)}if(ggbHTML5LoadedScript!==null){var Rt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Rt!=null&&Rt.parentNode.removeChild(Rt)}var Ft=document.createElement("script"),Jt=function(){Te(rn,rt)};Ft.src=ot+it,ggbHTML5LoadedCodebaseIsWebSimple=Je,ggbHTML5LoadedCodebaseVersion=ft,ggbHTML5LoadedScript=Ft.src,Ut("GeoGebra HTML5 codebase loaded: '"+ot+"'.",rt),!Ee&&(!we||we=="5.0")?(Je?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Jt()):ot.requirejs?__webpack_require__.e(12).then(function(){var Xt=[__webpack_require__(12)];Jt.apply(null,Xt)}.bind(this)).catch(__webpack_require__.oe):(Ft.onload=Jt,Ge.appendChild(Ft))}else Te(rn,rt);rt.height=Zt,rt.width=$t},Ot=function(Ge,rt,jt){var _n=Cn(rt.width,rt.height,rt.borderColor,jt),rn=document.createElement("div");rn.style.position="relative",rn.style.display="block",rn.style.width=rt.width+"px",rn.style.height=rt.height+"px",rn.className="applet_screenshot applet_scaler"+(jt?" applet_screenshot_play":""),rn.appendChild(_n);var $t=GGBAppletUtils.getScale(rt,Ge,jt);jt?(Ge.appendChild(sn()),window.GGBT_wsf_view||(Ge.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(rn,"66%"),Ge.appendChild(rn),$t!==1&&!isNaN($t)&&(GGBAppletUtils.scaleElement(rn,$t),rn.style.width=rt.width+"px",rn.style.height=rt.height+"px",rn.parentNode.style.width=rt.width*$t+"px",rn.parentNode.style.height=rt.height*$t+"px"),En.resize=function(){bn(Ge,_n,rn,jt)},window.addEventListener("resize",function(Zt){En.resize()}),En.resize()};function bn(Ge,rt,jt,_n){if(Ge.contains(rt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ge.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ge)}var rn=GGBAppletUtils.getScale(se,Ge,_n);jt.parentNode!==null&&(!isNaN(rn)&&rn!==1?(GGBAppletUtils.scaleElement(jt,rn),jt.parentNode.style.width=se.width*rn+"px",jt.parentNode.style.height=se.height*rn+"px"):(GGBAppletUtils.scaleElement(jt,1),jt.parentNode.style.width=se.width+"px",jt.parentNode.style.height=se.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ge),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}En.onExitFullscreen=function(Ge,rt){rt.appendChild(Ge)};var Nt=function(Ge,rt,jt,_n){Ot(Ge,rt,!0);for(var rn=function(){var yn=[];for(Zt=0;Zt<Ge.childNodes.length;Zt++)yn.push(Ge.childNodes[Zt]);if(window.GGBT_wsf_view){var ln=window.GGBT_wsf_view.renderFullScreen(Ge,rt.id),Ae=document.getElementById("fullscreencontainer"),ue=jQuery(Ge).find(".fullscreencontent");ue.length>0?(ln.remove(),ue.attr("id","fullscreencontent").show(),jQuery(Ae).append(ue),window.dispatchEvent(new Event("resize"))):Kt(ln,rt,!1),window.GGBT_wsf_view.launchFullScreen(Ae)}else St=_n,Kt(Ge,rt,!1);if(!window.GGBT_wsf_view)for(Zt=0;Zt<yn.length;Zt++)Ge.removeChild(yn[Zt])},$t=Ge.getElementsByClassName("ggb_preview_play"),Zt=0;Zt<$t.length;Zt++)$t[Zt].addEventListener("click",rn,!1),$t[Zt].addEventListener("ontouchstart",rn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ge),Ue()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},sn=function(){var Ge=document.createElement("div");if(Ge.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var rt='.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");}',jt=document.createElement("style");jt.styleSheet?jt.styleSheet.cssText=rt:jt.appendChild(document.createTextNode(rt)),document.getElementsByTagName("head")[0].appendChild(jt)}return Ge},Cn=function(Ge,rt,jt,_n){var rn=document.createElement("div");rn.className="ggb_preview",rn.style.position="absolute",rn.style.zIndex="90",rn.style.width=Ge-2+"px",rn.style.height=rt-2+"px",rn.style.top="0px",rn.style.left="0px",rn.style.overflow="hidden",rn.style.backgroundColor="white";var $t="lightgrey";jt!==void 0&&(jt==="none"?$t="transparent":$t=jt),rn.style.border="1px solid "+$t;var Zt=document.createElement("img");if(Zt.style.position="relative",Zt.style.zIndex="1000",Zt.style.top="-1px",Zt.style.left="-1px",Le!==null&&Zt.setAttribute("src",Le),Zt.style.opacity=.7,gt!==null){var yn,ln,Ae;if(!_n){yn=document.createElement("img"),yn.style.position="absolute",yn.style.zIndex="1001",yn.style.opacity=1,Zt.style.opacity=.3,ln=360,ln>Ge/4*3&&(ln=Ge/4*3),Ae=ln/5.8,yn.setAttribute("src",gt),yn.setAttribute("width",ln),yn.setAttribute("height",Ae);var ue=(Ge-ln)/2,le=(rt-Ae)/2;yn.style.left=ue+"px",yn.style.top=le+"px",rn.appendChild(yn)}}return rn.appendChild(Zt),rn},or=function(Ge){return Ge=Ge.toLowerCase(),Ge==="html5"||Ge==="screenshot"?Ge:"html5"},Qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ce=function(Ge,rt){if(ft=Ge,rt){ht(ft,!0);return}var jt=!He;if(jt){var _n=ke(ft);!isNaN(_n)&&_n<4.4&&(jt=!1)}var rn,$t;window.location.protocol.substr(0,4)==="http"?rn=window.location.protocol:rn="http:";var Zt=ft.indexOf("//");Zt>0?$t=ft:Zt===0?$t=rn+ft:$t="https://www.geogebra.org/apps/5.2.814.0/";for(var yn in Qe)if(ft.slice(Qe[yn].length*-1)===Qe[yn]||ft.slice((Qe[yn].length+1)*-1)===Qe[yn]+"/"){ht($t,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&jt&&!de.is3D&&!de.AV&&!de.SV&&!de.CV&&!de.EV2&&!de.CP&&!de.PC&&!de.DA&&!de.FI&&!de.PV&&!Xe(se.showToolBar)&&!Xe(se.showMenuBar)&&!Xe(se.showAlgebraInput)&&!Xe(se.enableRightClick)&&(!se.appName||se.appName=="classic")?$t+="webSimple/":$t+="web3d/",ht($t,!1)},ht=function(Ge,rt){if(Ge.requirejs){ot=Ge;return}Ge.slice(-1)!=="/"&&(Ge+="/"),ot=Ge,rt===null&&(rt=Ge.indexOf("http")===-1),Oe=rt,it="web.nocache.js",Je=!1;var jt=ot.split("/");jt.length>1&&(!rt&&jt[jt.length-2]==="webSimple"?(it="webSimple.nocache.js",Je=!0):Qe.indexOf(jt[jt.length-2])>=0&&(it=jt[jt.length-2]+".nocache.js")),jt=Ge.split("/"),ft=jt[jt.length-3],ft.substr(0,4)==="test"?ft=ft.substr(4,1)+"."+ft.substr(5,1):(ft.substr(0,3)==="war"||ft.substr(0,4)==="beta")&&(ft="5.0");var _n=parseFloat(ft);_n!==NaN&&_n<5&&Ge.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+_n+" is deprecated. Using version latest instead."),Ce("5.0",rt))},Ut=function(Ge,rt){window.console&&window.console.log&&(!rt||typeof rt.showLogging=="undefined"||rt.showLogging&&rt.showLogging!=="false")&&console.log(Ge)};se.material_id!==void 0?je(Yt):Yt();function Yt(){var Ge=Wt;we!==null?Ge=we:parseFloat(Ge)<5&&(Ge="5.0"),Ce(Ge,!1),Ee!==null&&ht(Ee,Oe),ve=!0}return En},GGBAppletUtils=function(){"use strict";function En(){return window.GGBT_wsf_edit!==void 0}function Wt(ve,we){we!=1?(ve.style.transformOrigin="0% 0% 0px",ve.style.webkitTransformOrigin="0% 0% 0px",ve.style.transform="scale("+we+","+we+")",ve.style.webkitTransform="scale("+we+","+we+")",ve.style.maxWidth="initial",ve.querySelector(".ggb_preview")!==null&&(ve.querySelector(".ggb_preview").style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ve.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ve.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ve.style.transform="none",ve.style.webkitTransform="none")}function se(ve,we,Ee,xe,me,Ie){var ot=null;if(Ie!=null&&Ie!="")for(var Oe=ve.parentNode;Oe!=null;)if((" "+Oe.className+" ").indexOf(" "+Ie+" ")>-1){ot=Oe;break}else Oe=Oe.parentNode;var St=0,ft=0,it=0,Je=0,Le=0,gt=0,qt=0;if(ot)St=ot.offsetWidth,ft=Math.max(xe?ot.offsetWidth:0,ot.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(St=Math.min(window.innerWidth,document.documentElement.clientWidth),ft=Math.min(window.innerHeight,document.documentElement.clientHeight),it=St):(St=window.innerWidth,ft=window.innerHeight,it=window.innerWidth),ve){var tt=ve.getBoundingClientRect();tt.left>0&&tt.left<=St&&(me===void 0||!me)&&(document.dir==="rtl"?(Le=St-tt.width-tt.left,gt=it<=480?10:30):(gt=tt.left,Le=it<=480?10:30),Je=gt+Le)}if(ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ct=ve.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Je=40,qt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Je=0,qt=40)}}return ve&&((Ee===void 0||!Ee)&&we>0&&we+Je<St?St=we:St-=Je,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ee===void 0||!Ee)&&(ft-=qt)),{width:St,height:ft}}function de(ve,we,Ee,xe,me){if(ve.isScreenshoGenerator)return 1;var Ie=xe!==void 0&&xe,ot=ve.noScaleMargin!=null&&ve.noScaleMargin,Oe=function(ct){return ct&&ct!=="false"},St=Oe(ve.autoHeight),ft=se(we,ve.width,Ee,St,Ie&&window.GGBT_wsf_view||ot,me),it=parseInt(ft.width),Je=ve.width,Le=ve.height;if(Je===void 0){var gt=we.querySelector(".appletParameters");gt&&(Je=gt.offsetWidth,Le=gt.offsetHeight)}var qt=it/Je,tt=Ie?1:ft.height/Le;return Ee!==void 0&&!Ee&&(qt=Math.min(1,qt),tt=Math.min(1,tt)),Math.min(qt,tt)}function He(ve,we,Ee){var xe=1,me,Ie=!1;if(ve.hasOwnProperty("allowUpscale")&&(Ie=ve.allowUpscale),ve.hasOwnProperty("scale")&&(xe=parseFloat(ve.scale),(isNaN(xe)||xe===null||xe===0)&&(xe=1),xe>1&&(Ie=!0)),we&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ie=!0),!(ve.hasOwnProperty("disableAutoScale")&&ve.disableAutoScale))me=de(ve,we,Ie,Ee,ve.scaleContainerClass);else return xe;return Ie&&(!ve.hasOwnProperty("scale")||xe===1)?me:Math.min(xe,me)}function Be(ve){var we=Math.min(window.innerWidth,document.documentElement.clientWidth),Ee=Math.min(window.innerHeight,document.documentElement.clientHeight),xe=ve.getBoundingClientRect(),me=(we-xe.width)/2,Ie=(Ee-xe.height)/2;Ie<0&&(Ie=0),ve.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(me<40?ve.style.left="40px":ve.style.left=me+"px",ve.style.top=Ie+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ie<40?ve.style.top="40px":ve.style.top=Ie+"px",ve.style.left=me+"px")}function Ve(ve,we){var Ee=ve.querySelector(".appletParameters");if(Ee){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!==Ee.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ve)}if(Ee.parentElement&&/fullscreen/.test(Ee.parentElement.className))return;var xe=He(we,ve);En()&&Ee.setAttribute("data-param-scale",xe);for(var me=null,Ie=0;Ie<ve.childNodes.length;Ie++)if(ve.childNodes[Ie].className!==void 0&&ve.childNodes[Ie].className.match(/^applet_scaler/)){me=ve.childNodes[Ie];break}if(me!==null&&me.querySelector(".noscale")!==null)return;var ot=we.id!==void 0?we.id:"ggbApplet",Oe=window[ot];(Oe==null||!Oe.recalculateEnvironments)&&me!==null&&!me.className.match(/fullscreen/)&&(me.parentNode.style.transform="",!isNaN(xe)&&xe!==1?(me.parentNode.style.width=we.width*xe+"px",me.parentNode.style.height=we.height*xe+"px",Wt(me,xe)):(Wt(me,1),me.parentNode.style.width=we.width+"px",me.parentNode.style.height=we.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Be(ve),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ee).parents(".content-added-content"))}}return{responsiveResize:Ve,isFlexibleWorksheetEditor:En,positionCenter:Be,getScale:He,scaleElement:Wt}}();__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 En=n.location.search;return En.indexOf(J)!=-1||En.indexOf(K)!=-1}function q(En,Wt){}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(En){var Wt=s[L].bindings;s[L].bindings=function(){for(var se=Wt?Wt():{},de=En[webModule.__softPermutationId],He=O;He<de.length;He++){var Be=de[He];se[Be[O]]=Be[P]}return se}};var t;function u(){return v(),t}function v(){if(!t){var En=o.createElement(Q);if(En.id=L,En.style.cssText=R+S,En.tabIndex=-1,o.body.appendChild(En),t=En.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Wt=document.compatMode==U?V:W;t.write(Wt+X),t.close()}}}function w(En){function Wt(de){function He(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Be=He();if(Be){de();return}function Ve(){if(!Be){if(!He())return;Be=!0,de(),o.removeEventListener&&o.removeEventListener(Z,Ve,!1),ve&&clearInterval(ve)}}o.addEventListener&&o.addEventListener(Z,Ve,!1);var ve=setInterval(function(){Ve()},$)}function se(de){var He=u(),Be=He.body,Ve=He.createElement(_);Ve.language=ab,Ve.crossOrigin=W,Ve.src=de,webModule.__errFn&&(Ve.onerror=function(){webModule.__errFn(L,new Error(bb+de))}),Be.appendChild(Ve)}Wt(function(){se(En)})}webModule.__startLoadingFragment=function(En){return C(En)},webModule.__installRunAsyncCode=function(En){var Wt=u(),se=Wt.body,de=Wt.createElement(_);de.language=ab,de.text=En,se.appendChild(de),se.removeChild(de)};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(En){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(En){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(En){var Wt=c[En];return Wt==null?null:Wt},r=d,webModule.__errFn=e}function B(){function En(ve){var we=ve.lastIndexOf(rb);we==-1&&(we=ve.length);var Ee=ve.indexOf(sb);Ee==-1&&(Ee=ve.length);var xe=ve.lastIndexOf(tb,Math.min(Ee,we));return xe>=O?ve.substring(O,xe+P):W}function Wt(ve){if(!ve.match(/^\w+:\/\//)){var we=o.createElement(ub);we.src=ve+vb,ve=En(we.src)}return ve}function se(){var ve=__gwt_getMetaProperty(wb);return ve!=null?ve:W}function de(){for(var ve=o.getElementsByTagName(_),we=O;we<ve.length;++we)if(ve[we].src.indexOf(xb)!=-1)return En(ve[we].src);return W}function He(){var ve=o.getElementsByTagName(yb);return ve.length>O?ve[ve.length-P].href:W}function Be(){var ve=o.location;return ve.href==ve.protocol+zb+ve.host+ve.pathname+ve.search+ve.hash}var Ve=se();return Ve==W&&(Ve=de()),Ve==W&&(Ve=He()),Ve==W&&Be()&&(Ve=En(o.location.href)),Ve=Wt(Ve),Ve}function C(En){return En.match(/^\//)||En.match(/^[a-zA-Z]+:\/\//)?En:webModule.__moduleBase+En}function D(){var En=[],Wt=O,se=[],de=[];function He(ve){var we=de[ve](),Ee=se[ve];if(we in Ee)return we;var xe=[];for(var me in Ee)xe[Ee[me]]=me;throw r&&r(ve,xe,we),null}if(__gwt_isKnownPropertyValue=function(ve,we){return we in se[ve]},webModule.__getPropMap=function(){var ve={};for(var we in se)se.hasOwnProperty(we)&&(ve[we]=He(we));return ve},webModule.__computePropValue=He,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Be;try{Be=Cb;var Ve=Be.indexOf(Db);Ve!=-1&&(Wt=parseInt(Be.substring(Ve+P),$),Be=Be.substring(O,Ve))}catch(ve){}return webModule.__softPermutationId=Wt,C(Be+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(En,Wt,se){"use strict";se.d(Wt,{Ax:function(){return Ve},Ds:function(){return ve},KI:function(){return Ee},SI:function(){return Be},f1:function(){return He}});var de=se(11320);function He(xe){let me=!0;if(xe.length>0){for(let Ie=0;Ie<xe.length;Ie++)if(xe[Ie].compile_success==0||!xe[Ie].compile_success){me=!1;break}}else me=!1;return me}function Be(xe,me=""){let Ie=[];for(let ot=0;ot<xe.length;ot++){let Oe=xe[ot],St=me?`${me}/${Oe.name}`:`${Oe.name}`;Ie.push({title:Oe.name,type:Oe.type,isLeaf:Oe.type!=="tree",key:St})}return Ie}function Ve(xe,me,Ie){for(let ot=0;ot<xe.length;ot++){let Oe=xe[ot];if(Oe.key===me){Oe.children=Ie;break}Oe.children&&Ve(Oe.children,me,Ie)}return xe}function ve(xe,me,Ie){let ot;return function(){let Oe=this,St=arguments,ft=function(){ot=null,Ie||xe.apply(Oe,St)},it=Ie&&!ot;clearTimeout(ot),ot=setTimeout(ft,me),it&&xe.apply(Oe,St)}}const we=!0,Ee=de.Z.API_SERVER},10191:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return bn}});var de=se(67294),He=se(35973),Be=se(84567),Ve=se(24018),ve=se(40043),we=se(33170),Ee=se(22150),xe=se(11713),me={},Ie=Object.defineProperty,ot=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,ft=(Nt,sn,Cn)=>sn in Nt?Ie(Nt,sn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):Nt[sn]=Cn,it=(Nt,sn)=>{for(var Cn in sn||(sn={}))Oe.call(sn,Cn)&&ft(Nt,Cn,sn[Cn]);if(ot)for(var Cn of ot(sn))St.call(sn,Cn)&&ft(Nt,Cn,sn[Cn]);return Nt},Je=(Nt,sn,Cn)=>new Promise((or,Qe)=>{var Ce=Yt=>{try{Ut(Cn.next(Yt))}catch(Ge){Qe(Ge)}},ht=Yt=>{try{Ut(Cn.throw(Yt))}catch(Ge){Qe(Ge)}},Ut=Yt=>Yt.done?or(Yt.value):Promise.resolve(Yt.value).then(Ce,ht);Ut((Cn=Cn.apply(Nt,sn)).next())});const Le=Be.default.Group,gt=({classroomList:Nt,loading:sn,user:Cn,exercise_id:or=null,homework_common_id:Qe=null,setitem:Ce,item:ht,type:Ut,rz:Yt,dispatch:Ge})=>{var rt,jt,_n,rn,$t,Zt,yn,ln;const[Ae,ue]=(0,de.useState)([]);let[le,pe]=(0,de.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20});const he=(0,He.useParams)(),[oe,Te]=(0,de.useState)(!1),[Ye,Lt]=(0,de.useState)(!1),[Rt]=Ee.default.useForm();(0,de.useEffect)(()=>{Yt&&(le.zydatas=Yt,pe(it({},le)),ht!=null&&ht.ec_course_id&&Ft())},[ht,Yt]);function Ft(){return Je(this,null,function*(){console.log("----",ht),yield Jt(ht==null?void 0:ht.ec_major_school_id),yield Xt(ht==null?void 0:ht.ec_year_id),yield Hn(ht==null?void 0:ht.ec_course_id),Rt.setFieldsValue({ec_course_id:ht==null?void 0:ht.ec_course_id,ec_major_school_id:ht==null?void 0:ht.ec_major_school_id,ec_point_ids:ht==null?void 0:ht.ec_point_ids,ec_year_id:ht==null?void 0:ht.ec_year_id})})}function Jt(Rn){return Je(this,null,function*(){const Tt=yield(0,we.ZP)(`/api/ec_major_schools/${Rn}/ec_years/get_year_list.json`,{method:"get"});le.jbdatas=Tt==null?void 0:Tt.data,pe(it({},le)),Rt.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]})})}function Xt(Rn){return Je(this,null,function*(){const Tt=yield(0,we.ZP)(`/api/ec_years/${Rn}/ec_courses/get_courses.json`,{method:"get"});le.kcdatas=Tt==null?void 0:Tt.data,pe(it({},le)),Rt.setFieldsValue({ec_course_id:"",ec_point_ids:[]})})}const Hn=Rn=>Je(void 0,null,function*(){const Tt=yield(0,we.ZP)(`/api/ec_courses/${Rn}/ec_points.json`,{method:"get",params:{ec_course_id:Rn}});le.zsdatas=Tt==null?void 0:Tt.data,pe(it({},le))});return de.createElement("div",{className:me.from},de.createElement(Ee.default,{form:Rt,layout:"inline",onValuesChange:Rn=>{console.log("----",Rn),Rn.ec_major_school_id&&(le.jbdatas=[],le.kcdatas=[],le.zsdatas=[],pe(it({},le)),Jt(Rn.ec_major_school_id)),Rn.ec_year_id&&(le.kcdatas=[],le.zsdatas=[],pe(it({},le)),Xt(Rn.ec_year_id)),Rn.ec_course_id&&(le.zsdatas=[],pe(it({},le)),Hn(Rn.ec_course_id))},onFinish:Rn=>Je(void 0,null,function*(){Ce(Rn)})},de.createElement(Ee.default.Item,{label:"\u8BA4\u8BC1\u4E13\u4E1A",name:"ec_major_school_id"},de.createElement(xe.default,{style:{width:150},disabled:((rt=le.zydatas)==null?void 0:rt.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A"},(jt=le==null?void 0:le.zydatas)==null?void 0:jt.map((Rn,Tt)=>de.createElement(xe.default.Option,{key:Tt,value:Rn==null?void 0:Rn.ec_major_school_id},Rn==null?void 0:Rn.name)))),de.createElement(Ee.default.Item,{label:"\u8BA4\u8BC1\u5C4A\u522B",name:"ec_year_id"},de.createElement(xe.default,{style:{width:150},disabled:((_n=le.jbdatas)==null?void 0:_n.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u5C4A\u522B"},(rn=le==null?void 0:le.jbdatas)==null?void 0:rn.map((Rn,Tt)=>de.createElement(xe.default.Option,{key:Tt,value:Rn==null?void 0:Rn.ec_year_id},Rn==null?void 0:Rn.year)))),de.createElement(Ee.default.Item,{label:"\u8BFE\u7A0B",name:"ec_course_id"},de.createElement(xe.default,{style:{width:150},disabled:(($t=le.kcdatas)==null?void 0:$t.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"},(Zt=le==null?void 0:le.kcdatas)==null?void 0:Zt.map((Rn,Tt)=>de.createElement(xe.default.Option,{key:Tt,value:Rn==null?void 0:Rn.id},Rn==null?void 0:Rn.name)))),de.createElement(Ee.default.Item,{label:"\u77E5\u8BC6\u70B9",name:"ec_point_ids"},de.createElement(xe.default,{onChange:()=>{Rt.submit()},style:{width:150},mode:"multiple",disabled:((yn=le.zsdatas)==null?void 0:yn.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"},(ln=le==null?void 0:le.zsdatas)==null?void 0:ln.map((Rn,Tt)=>de.createElement(xe.default.Option,{key:Tt,value:Rn==null?void 0:Rn.id},Rn==null?void 0:Rn.name))))))};var qt=(0,He.connect)(({classroomList:Nt,loading:sn,globalSetting:Cn,user:or})=>({classroomList:Nt,globalSetting:Cn,loading:sn.effects,user:or}))(gt),tt=Object.defineProperty,ct=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,_t=(Nt,sn,Cn)=>sn in Nt?tt(Nt,sn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):Nt[sn]=Cn,vt=(Nt,sn)=>{for(var Cn in sn||(sn={}))Ue.call(sn,Cn)&&_t(Nt,Cn,sn[Cn]);if(Se)for(var Cn of Se(sn))je.call(sn,Cn)&&_t(Nt,Cn,sn[Cn]);return Nt},kt=(Nt,sn)=>ct(Nt,ke(sn)),Xe=(Nt,sn,Cn)=>new Promise((or,Qe)=>{var Ce=Yt=>{try{Ut(Cn.next(Yt))}catch(Ge){Qe(Ge)}},ht=Yt=>{try{Ut(Cn.throw(Yt))}catch(Ge){Qe(Ge)}},Ut=Yt=>Yt.done?or(Yt.value):Promise.resolve(Yt.value).then(Ce,ht);Ut((Cn=Cn.apply(Nt,sn)).next())});const Kt=Be.default.Group,Ot=({classroomList:Nt,loading:sn,user:Cn,exercise_id:or=null,homework_common_id:Qe=null,setitem:Ce,type:ht,dispatch:Ut})=>{var Yt,Ge;let[rt,jt]=(0,de.useState)([{}]),[_n,rn]=(0,de.useState)([]);function $t(){return Xe(this,null,function*(){var yn,ln,Ae;let ue=yield(0,we.ZP)("/api/ec_courses/0/ec_points/get_work_points.json",{method:"get",params:{exercise_id:or,homework_common_id:Qe}});if(((yn=ue==null?void 0:ue.data)==null?void 0:yn.length)>0){let le=[];(ln=ue==null?void 0:ue.data)==null||ln.map(pe=>{var he;(he=pe==null?void 0:pe.ec_point_ids)==null||he.map(oe=>{le.push(oe)})}),Ce(kt(vt({},(Ae=ue==null?void 0:ue.data)==null?void 0:Ae[0]),{ec_point_ids:le})),jt(ue==null?void 0:ue.data)}})}(0,de.useEffect)(()=>{var yn,ln;(ln=(yn=Cn==null?void 0:Cn.userInfo)==null?void 0:yn.course)!=null&&ln.course_school_id&&Zt()},[(Ge=(Yt=Cn==null?void 0:Cn.userInfo)==null?void 0:Yt.course)==null?void 0:Ge.course_school_id]);function Zt(){return Xe(this,null,function*(){var yn,ln;const Ae=yield(0,we.ZP)(`/api/schools/${(ln=(yn=Cn==null?void 0:Cn.userInfo)==null?void 0:yn.course)==null?void 0:ln.course_school_id}/ec_majors/get_major_list.json`,{method:"get"});rn(Ae==null?void 0:Ae.data),(Qe||or)&&$t()})}return de.createElement("div",null,de.createElement("p",{style:{fontSize:"16px",fontWeight:400}},"\u5DE5\u7A0B\u8BA4\u8BC1\u8003\u6838\u77E5\u8BC6\u70B9"),rt==null?void 0:rt.map((yn,ln)=>de.createElement("div",{key:ln,style:{display:"flex",alignItems:"center",marginBottom:"10px"}},de.createElement(qt,{rz:_n,item:yn,type:ln,setitem:Ae=>{rt.splice(ln,1,Ae),jt([...rt]);let ue=[];rt==null||rt.map(le=>{var pe;(pe=le==null?void 0:le.ec_point_ids)==null||pe.map(he=>{ue.push(he)})}),Ce(kt(vt({},Ae),{ec_point_ids:ue}))}}),ln!=0&&de.createElement(Ve.Z,{onClick:()=>{rt.splice(ln,1),jt([...rt])},style:{marginLeft:10,fontSize:"20px"}}),de.createElement(ve.Z,{onClick:()=>{rt.push({}),jt([...rt])},style:{marginLeft:10,fontSize:"20px"}}))))};var bn=(0,He.connect)(({classroomList:Nt,loading:sn,globalSetting:Cn,user:or})=>({classroomList:Nt,globalSetting:Cn,loading:sn.effects,user:or}))(Ot)},63205:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return ot}});var de=se(67294),He={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=se(94184),Ve=se.n(Be),ve=se(57953),we=se(15979),Ee=se(33170),xe=se(28706),me=(Oe,St,ft)=>new Promise((it,Je)=>{var Le=tt=>{try{qt(ft.next(tt))}catch(ct){Je(ct)}},gt=tt=>{try{qt(ft.throw(tt))}catch(ct){Je(ct)}},qt=tt=>tt.done?it(tt.value):Promise.resolve(tt.value).then(Le,gt);qt((ft=ft.apply(Oe,St)).next())}),ot=({data:Oe,className:St,fullWidth:ft,style:it={},onClose:Je,onOk:Le,showFullTools:gt,noAssociationId:qt})=>{const tt=(0,de.useRef)(null),ct=(0,de.useRef)(null),ke=(0,de.useRef)(null),Se=(0,de.useRef)(null),[Ue,je]=(0,de.useState)(!1),[_t,vt]=(0,de.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,de.useEffect)(()=>{ke.current||(ke.current=document.createElement("style"),document.head.appendChild(ke.current)),Oe!=null&&Oe.visible?(document.body.setAttribute("data-custom","y-hidden"),ke.current.innerHTML=" html { overflow-y: hidden; }",Oe!=null&&Oe.src&&kt()):(document.body.removeAttribute("data-custom"),ke.current&&(document.head.removeChild(ke.current),ke.current=null))},[Oe==null?void 0:Oe.visible]);const kt=()=>me(void 0,null,function*(){je(!0),vt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Nt=yield(0,xe.ZJ)(Oe==null?void 0:Oe.src);tt.current.src="",tt.current.src=Nt,tt.current.onload=function(){bn()},je(!1),vt("")}),Xe=()=>{document.body.removeAttribute("data-custom"),ke.current.innerHTML=" ",Je()},Kt=Nt=>me(void 0,null,function*(){je(!0),vt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const sn=yield(0,Ee.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Oe.title,file:Nt.dataUrl}});sn!=null&&sn.id&&!qt?(yield(0,Ee.ZP)(`/api/attachments/${Oe.id}/add_subitem.json`,{method:"post",body:{subitem_id:sn==null?void 0:sn.id,settings:JSON.stringify(Nt.state)}})).status===0&&Le():sn!=null&&sn.id&&Le(sn),document.body.removeAttribute("data-custom"),ke.current.innerHTML=" ",je(!1),vt("")}),Ot=()=>{const Nt=document.querySelector('a[href="https://markerjs.com/"]');Nt&&Nt.parentNode&&(Nt.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(Cn=>{const or=document.querySelector(Cn.name);or&&or.setAttribute("title",Cn.title)})},bn=()=>{ct.current=new we.hP(tt.current),ct.current.targetRoot=Se.current,ct.current.addEventListener("render",Kt),ct.current.addEventListener("beforeclose",Xe),gt&&(ct.current.availableMarkerTypes=ct.current.ALL_MARKER_TYPES,ct.current.uiStyleSettings.redoButtonVisible=!0,ct.current.uiStyleSettings.notesButtonVisible=!0,ct.current.uiStyleSettings.zoomButtonVisible=!0,ct.current.uiStyleSettings.zoomOutButtonVisible=!0,ct.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ct.current.uiStyleSettings,ct.current.show(),Oe!=null&&Oe.snapshotData&&ct.current.restoreState(Oe.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ot()},300)};return de.createElement(de.Fragment,null,(Oe==null?void 0:Oe.visible)&&de.createElement(ve.Z,{spinning:Ue,tip:_t,style:{position:"absolute"}},de.createElement("div",{ref:Se,className:Ve()(He.imageDimensions,St,ft?He.fullWidth:""),style:it},de.createElement("img",{className:He.img,ref:tt}))))}},36527:function(En,Wt,se){"use strict";var de=se(67294),He=se(71230),Be=se(15746),Ve=se(66368),ve=se(71577),we=se(35598),Ee=se(71736),xe=se(84279),me=se(67294);const Ie=(0,de.forwardRef)(({callback:ot,showSaveButton:Oe,value:St=""},ft)=>{const it=(0,de.useRef)(),Je=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Le=[{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}`}]}]}],gt=ct=>{it.current.setValue(it.current.getValue()+" "+ct.value+" ")},qt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:me.createElement(He.Z,{className:Ee.Z.lists,gutter:[10,10]},Je.map((ct,ke)=>me.createElement(Be.Z,{flex:"110px",className:Ee.Z.item},me.createElement("div",null,me.createElement(we.Z,{value:`$$${ct.value}$$`}),ct.name),me.createElement("div",{className:Ee.Z.children},ct.children.map((Se,Ue)=>me.createElement("div",{key:Ue},me.createElement("h1",null,Se.name),me.createElement(He.Z,{gutter:[10,10]},Se.data.map((je,_t)=>me.createElement(Be.Z,{key:_t,onClick:()=>gt(je),className:Ee.Z.diamond},me.createElement(we.Z,{value:"`$$"+je.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:me.createElement(He.Z,{className:Ee.Z.lists,gutter:[10,10]},Le.map((ct,ke)=>me.createElement(Be.Z,{flex:"110px",className:Ee.Z.item},me.createElement("div",null,me.createElement(we.Z,{value:"`$$"+ct.value+"$$`"}),ct.name),me.createElement("div",{className:Ee.Z.children},ct.children.map((Se,Ue)=>me.createElement("div",{key:Ue},Se.name&&me.createElement("h1",null,Se.name),me.createElement(He.Z,{gutter:[10,10]},Se.data.map((je,_t)=>me.createElement(Be.Z,{key:_t,onClick:()=>gt(je),className:Ee.Z.diamond},me.createElement(we.Z,{value:"`$$"+je.value+"$$`"}))))))))))}],tt=()=>{var ct=document.createElement("div");ct.innerHTML=it.current.getValue();var ke=ct.innerText;return ot&&ot(ke),ke};return(0,de.useImperativeHandle)(ft,()=>({getData:tt})),me.createElement("div",{className:Ee.Z.mathWrap},me.createElement(Ve.default,{defaultActiveKey:"1",items:qt}),me.createElement("math-field",{locale:"zh_cn",className:Ee.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:it,style:{width:800,marginTop:30,fontSize:18}},St||""),Oe&&me.createElement("div",{className:Ee.Z.button},me.createElement(ve.ZP,{size:"large",onClick:tt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Wt.Z=Ie},65866:function(En,Wt,se){"use strict";se.d(Wt,{z:function(){return or},Z:function(){return Qe}});var de=se(67294),He=se(59810),Be=se(2453),Ve=se(14446),ve=se(71577),we=se(11320),Ee=se(4440),xe=Object.defineProperty,me=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Oe=(Ce,ht,Ut)=>ht in Ce?xe(Ce,ht,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Ce[ht]=Ut,St=(Ce,ht)=>{for(var Ut in ht||(ht={}))Ie.call(ht,Ut)&&Oe(Ce,Ut,ht[Ut]);if(me)for(var Ut of me(ht))ot.call(ht,Ut)&&Oe(Ce,Ut,ht[Ut]);return Ce},ft=(Ce,ht,Ut)=>new Promise((Yt,Ge)=>{var rt=rn=>{try{_n(Ut.next(rn))}catch($t){Ge($t)}},jt=rn=>{try{_n(Ut.throw(rn))}catch($t){Ge($t)}},_n=rn=>rn.done?Yt(rn.value):Promise.resolve(rn.value).then(rt,jt);_n((Ut=Ut.apply(Ce,ht)).next())});const it="\u3000\u3000";function Je(Ce){var ht=["Bytes","KB","MB","GB","TB"];if(Ce==0)return"0 Byte";var Ut=parseInt(""+Math.floor(Math.log(Ce)/Math.log(1024)),10);return(Ce/Math.pow(1024,Ut)).toFixed(1)+" "+ht[Ut]}var Le=({value:Ce=[],action:ht,onChange:Ut,className:Yt,maxSize:Ge=150,title:rt="\u6587\u4EF6\u4E0A\u4F20",accept:jt=null})=>{const _n={multiple:!1,fileList:Ce,accept:jt,withCredentials:!0,beforeUpload:$t=>$t.size/1024/1024<Ge?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${Ge}MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange($t){var Zt,yn,ln,Ae;let ue=[...$t.fileList];if(ue=ue.map(le=>(le.name.indexOf(it)===-1&&(le.name=`${le.name}${it}${Je(le.size)}`),St({},le))),$t.file.status==="done"&&((yn=(Zt=$t.file)==null?void 0:Zt.response)==null?void 0:yn.status)===-1){message.error((Ae=(ln=$t.file)==null?void 0:ln.response)==null?void 0:Ae.message),Ut([]);return}Ut(ue)},onRemove:$t=>ft(void 0,null,function*(){const Zt=$t.size/1024/1024;return $t.status==="uploading"?!0:Zt<Ge&&($t.response?$t.response.id:$t.uid)?yield removeAttachment($t.response?$t.response.id:$t.id):!0})};function rn($t){$t.preventDefault(),$t.stopPropagation()}return React.createElement("div",{className:`single-upload ${Yt||""}`},React.createElement(Upload,St({},_n),React.createElement(Button,{type:"primary",title:Ce.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:Ce.length>0,ghost:!0},rt),React.createElement("span",{onClick:rn,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",Ge,"M)"," ")))},gt=se(33859),qt=se(96486),tt=Object.defineProperty,ct=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Ue=(Ce,ht,Ut)=>ht in Ce?tt(Ce,ht,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Ce[ht]=Ut,je=(Ce,ht)=>{for(var Ut in ht||(ht={}))ke.call(ht,Ut)&&Ue(Ce,Ut,ht[Ut]);if(ct)for(var Ut of ct(ht))Se.call(ht,Ut)&&Ue(Ce,Ut,ht[Ut]);return Ce};const _t=Ce=>React.createElement("svg",je({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},Ce),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var vt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",kt=Object.defineProperty,Xe=Object.getOwnPropertySymbols,Kt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,bn=(Ce,ht,Ut)=>ht in Ce?kt(Ce,ht,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Ce[ht]=Ut,Nt=(Ce,ht)=>{for(var Ut in ht||(ht={}))Kt.call(ht,Ut)&&bn(Ce,Ut,ht[Ut]);if(Xe)for(var Ut of Xe(ht))Ot.call(ht,Ut)&&bn(Ce,Ut,ht[Ut]);return Ce},sn=(Ce,ht,Ut)=>new Promise((Yt,Ge)=>{var rt=rn=>{try{_n(Ut.next(rn))}catch($t){Ge($t)}},jt=rn=>{try{_n(Ut.throw(rn))}catch($t){Ge($t)}},_n=rn=>rn.done?Yt(rn.value):Promise.resolve(rn.value).then(rt,jt);_n((Ut=Ut.apply(Ce,ht)).next())});const{Dragger:Cn}=He.default;function or(Ce){let ht=[];return Ce&&Ce.length>0&&(ht=Ce.map(Ut=>({uid:Ut.id,id:Ut.id,name:Ut.title+it+Ut.filesize,url:Ut.url,filesize:Ut.filesize,status:"done",response:{id:Ut.id}}))),ht}var Qe=({value:Ce,onChange:ht,action:Ut,data:Yt,className:Ge,maxSize:rt=150,title:jt="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:_n=!1,accept:rn="",additionalText:$t,isDragger:Zt,number:yn=1e3,aloneClear:ln=!1,realTimeRemove:Ae=!0,uploadText:ue,setFileProgress:le,showFileProgress:pe})=>{const[he,oe]=(0,de.useState)(!1);let[Te,Ye]=(0,de.useState)(Ce||[]),[Lt,Rt]=(0,de.useState)(1);(0,de.useEffect)(()=>{Ce&&(Lt===1&&Ye([...Ce]),Rt(2),yn===(Ce==null?void 0:Ce.length)&&oe(!0))},[Ce]);const Ft=()=>{setTimeout(()=>{Te.pop(),Ye([...Te])},500)};pe&&le(Te.some(Hn=>Hn.status==="uploading"));const Jt={multiple:!0,disabled:he,accept:rn,withCredentials:!0,fileList:Te,beforeUpload:(Hn,Rn)=>{const Tt=Hn.size/1024/1024;return Te.concat(Rn).length>yn?(Te.pop(),Ye([...Te]),Be.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${yn}\u4E2A\u6587\u4EF6`),ln?Promise.reject():(Ft(),!1)):Tt<rt?!0:(Be.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${rt}MB).`),ln?Promise.reject():(Ft(),!1))},data:Yt,action:Ut||`${we.Z.API_SERVER}/api/attachments.json`,onChange(Hn){var Rn,Tt,dn,cr;if(Hn.file.status==="removed"?Te=Hn.fileList:Te=(0,qt.uniqBy)([...Hn.fileList,...Te],"uid"),Hn.file.status==="done"&&((Tt=(Rn=Hn.file)==null?void 0:Rn.response)==null?void 0:Tt.status)===-1){Be.ZP.error((cr=(dn=Hn.file)==null?void 0:dn.response)==null?void 0:cr.message);return}Te.length>=yn?oe(!0):oe(!1),Ye([...Te]),Te=Te.map(Mr=>{var at,Ht;return(at=Mr==null?void 0:Mr.response)!=null&&at.id&&(Mr.url=(Ht=Mr==null?void 0:Mr.response)==null?void 0:Ht.url),Mr.name.indexOf(it)===-1&&(Mr.name=`${Mr.name}${it}${Je(Mr.size)}`),Nt({},Mr)}),console.log("info:",Hn,Te),ht(Te)},onRemove:Hn=>sn(void 0,null,function*(){if(!Ae)return!0;const Rn=()=>sn(void 0,null,function*(){if(Hn.response?Hn.response.id:Hn.id){let dn=yield(0,Ee.JZ)(Hn.response?Hn.response.id:Hn.uid);return Promise.resolve(dn)}else return!0});return _n?new Promise((Tt,dn)=>{Ve.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:de.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>sn(void 0,null,function*(){const cr=yield Rn();Be.ZP.success("\u5220\u9664\u6210\u529F"),Tt(!0)}),onCancel:()=>Tt(!1)})}):yield Rn()})};function Xt(Hn){Hn.preventDefault(),Hn.stopPropagation()}return de.createElement("div",{className:`multi-upload ${Ge||""}`},Zt&&de.createElement(Cn,Nt({},Jt),de.createElement("p",{className:"ant-upload-drag-icon"},de.createElement(gt.Z,null)),de.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",de.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",rt,"MB)"," "),$t),!Zt&&de.createElement(He.default,Nt({},Jt),de.createElement(ve.ZP,{disabled:he,className:"upload_button"},de.createElement("img",{className:"aBtn_img",src:vt}),jt),de.createElement("span",{onClick:Xt,className:"upload_text"},ue||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${rt}MB)`)))}},57444:function(En,Wt,se){"use strict";se.d(Wt,{h:function(){return ct}});var de=se(67294),He=se(11713),Be=se(22150),Ve=se(71577),ve=se(4631),we=se.n(ve),Ee=se(71749),xe=se(30483),me=Object.defineProperty,Ie=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,it=(ke,Se,Ue)=>Se in ke?me(ke,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):ke[Se]=Ue,Je=(ke,Se)=>{for(var Ue in Se||(Se={}))St.call(Se,Ue)&&it(ke,Ue,Se[Ue]);if(Oe)for(var Ue of Oe(Se))ft.call(Se,Ue)&&it(ke,Ue,Se[Ue]);return ke},Le=(ke,Se)=>Ie(ke,ot(Se));const gt=He.default.Option,qt={labelCol:{span:4},wrapperCol:{span:20}},tt={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"]};Wt.Z=({callback:ke,onCancel:Se})=>{const[Ue,je]=(0,de.useState)("python");function _t(kt){je(tt[kt][1])}function vt(kt){ke(kt)}return de.createElement(Be.default,Le(Je({},qt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:vt,style:{width:500}}),de.createElement(Be.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},de.createElement(He.default,{getPopupContainer:kt=>kt.parentNode,onChange:_t},Object.keys(tt).map(kt=>de.createElement(gt,{key:kt,value:kt},tt[kt][0])))),de.createElement(Be.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},de.createElement(ct,{mode:Ue})),de.createElement("div",{className:"flex-container flex-end"},de.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Ve.ZP,{type:"ghost",onClick:Se},"\u53D6\u6D88")))};function ct({value:ke,onChange:Se,mode:Ue,options:je={}}){const _t=(0,de.useRef)(),[vt,kt]=(0,de.useState)();return(0,de.useEffect)(()=>{if(vt){let Xe=function(Kt){const Ot=Kt.getValue();Se&&Se(Ot)};return vt.on("change",Xe),()=>{vt.off("change",Xe)}}},[vt,Se]),(0,de.useEffect)(()=>{vt&&vt.setOption("mode",Ue)},[vt,Ue]),(0,de.useEffect)(()=>{vt&&(ke!==vt.getValue()||ke==="")&&setTimeout(()=>{vt.setValue(ke||"")},300)},[vt,ke]),(0,de.useEffect)(()=>{if(_t.current&&!vt){const Xe=we().fromTextArea(_t.current,Je({mode:Ue,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},je));kt(Xe)}},[_t.current,vt]),de.createElement("div",{className:"my-codemirror-container"},de.createElement("textarea",{ref:_t}))}},91304:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return pr}});var de=se(67294),He=se(4631),Be=se.n(He),Ve=se(91033),ve=se(71749),we=se(57341),Ee=se(82801),xe=se(88386),me=se(49047),Ie=se(80785),ot=se(35598),Oe=({value:$n="",className:qe,showTextOnly:ut,showLines:Dt,style:Vt={}})=>{const We=(0,de.useMemo)(()=>"",[$n]);return de.createElement(de.Fragment,null,de.createElement("div",{dangerouslySetInnerHTML:{__html:We}}))},St=se(67294),ft=Object.defineProperty,it=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,tt=($n,qe,ut)=>qe in $n?ft($n,qe,{enumerable:!0,configurable:!0,writable:!0,value:ut}):$n[qe]=ut,ct=($n,qe)=>{for(var ut in qe||(qe={}))gt.call(qe,ut)&&tt($n,ut,qe[ut]);if(Le)for(var ut of Le(qe))qt.call(qe,ut)&&tt($n,ut,qe[ut]);return $n},ke=($n,qe)=>it($n,Je(qe));let Se=[{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 Ue({onActionCallback:$n,title:qe,icon:ut,actionName:Dt,className:Vt="",children:We}){function pt(){$n(Dt)}return St.createElement("a",{title:qe,className:Vt,onClick:pt},St.createElement("i",{className:`${ut}`}),We)}var je=({watch:$n,showNullButton:qe,showNullProgramButton:ut,onActionCallback:Dt,fullScreen:Vt,insertTemp:We,hidetoolBar:pt,extraUse:zt})=>{const Bt=[...Se,{title:`${$n?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return St.createElement("ul",{className:"markdown-toolbar-container"},!pt&&Bt.map((en,nn)=>St.createElement("li",{key:nn},en.actionName?St.createElement(Ue,ke(ct({},en),{onActionCallback:Dt})):St.createElement("span",{className:"v-line"}))),qe?St.createElement("li",null,St.createElement(Ue,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Dt},St.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,ut?St.createElement(St.Fragment,null,St.createElement("li",null,St.createElement(Ue,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Dt},St.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),St.createElement("li",null,St.createElement(Ue,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Dt},St.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,We&&St.createElement("li",null,St.createElement(Ue,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${We}`,onActionCallback:Dt},St.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),zt&&St.createElement("li",null,zt),St.createElement("li",{className:"btn-full-screen"},St.createElement(Ue,{icon:`${Vt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Vt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Dt})))},_t=se(76621),vt=se(22150),kt=se(69677),Xe=se(71577),Kt=Object.defineProperty,Ot=Object.defineProperties,bn=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,or=($n,qe,ut)=>qe in $n?Kt($n,qe,{enumerable:!0,configurable:!0,writable:!0,value:ut}):$n[qe]=ut,Qe=($n,qe)=>{for(var ut in qe||(qe={}))sn.call(qe,ut)&&or($n,ut,qe[ut]);if(Nt)for(var ut of Nt(qe))Cn.call(qe,ut)&&or($n,ut,qe[ut]);return $n},Ce=($n,qe)=>Ot($n,bn(qe));const ht={labelCol:{span:4},wrapperCol:{span:20}};var Ut=({callback:$n,onCancel:qe})=>{function ut(Dt){$n(Dt)}return de.createElement(vt.default,Ce(Qe({},ht),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ut,style:{width:500}}),de.createElement(vt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},de.createElement(kt.default,null)),de.createElement(vt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},de.createElement(kt.default,null)),de.createElement("div",{className:"flex-container flex-end"},de.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Xe.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Yt=se(57444),Ge=se(70859),rt=se(14446),jt=se(71230),_n=se(63205),rn=se(67294),$t=({callback:$n,onCancel:qe})=>{const ut=document.createElement("canvas"),Dt=ut.getContext("2d");ut.width=1e3,ut.height=800,Dt.fillStyle="#ffffff",Dt.fillRect(0,0,ut.width,ut.height);const Vt=ut.toDataURL("image/png");return rn.createElement(rt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},rn.createElement(jt.Z,{style:{height:"100vh"}},rn.createElement(_n.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Vt,visible:!0,title:String(Date.now())},onOk:We=>{$n({src:We.url})},onClose:qe})))},Zt=se(72565),yn=se(15746),ln=se(2453),Ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ue=se(67294),pe=(0,de.forwardRef)(({onCancel:$n,editImgId:qe,callback:ut},Dt)=>{let Vt=(0,de.useRef)(),We=(0,de.useRef)(),pt=(0,de.useRef)(),zt=(0,de.useRef)(!1);const Bt=(0,de.useRef)(!1);console.log("ref:",Dt);const[en,nn]=(0,de.useState)(0),[jn,Lr]=(0,de.useState)("100vh");return(0,de.useEffect)(()=>{nn(1);try{indexedDB.databases().then(rr=>{rr.forEach(tr=>indexedDB.deleteDatabase(tr.name))})}catch(rr){}},[]),(0,de.useImperativeHandle)(Dt,()=>({setHeight:Lr})),ue.createElement("div",{ref:Bt,className:"body-overflow-initial"},ue.createElement(Zt.Z,{width:"100vw",height:jn,footer:null,closable:!0,placement:"bottom",open:!!en,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Ae.drawerWrap}`,onClose:()=>{window.saveDrawData(rr=>{ut({src:`/api/attachments/${rr}`,id:rr})})},title:ue.createElement(jt.Z,{align:"middle"},ue.createElement(yn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ue.createElement(yn.Z,{onClick:()=>{Lr(jn==="60px"?"100vh":"60px")}},ue.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ue.createElement(yn.Z,{onClick:()=>{window.saveDrawData(rr=>{if(rr===null){ln.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}ln.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),ut({src:`/api/attachments/${rr}`,id:rr,disabledClose:!0})})}},ue.createElement(Xe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ue.createElement("iframe",{src:`${window.ENV==="build"?"/react/build":""}/drawio/src/main/webapp/?id=${qe||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:We})))}),he=se(11320),oe=se(78045),Te=se(31795);const Ye=oe.ZP.Group,Lt={margin:"0 8px"};var Rt=({callback:$n,onCancel:qe})=>{function ut(Dt){$n(Dt)}return de.createElement(vt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ut},de.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},de.createElement("span",{style:Lt},"\u5355\u5143\u683C\u6570\uFF1A"),de.createElement("span",{style:Lt},"\u884C\u6570"),de.createElement(vt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},de.createElement(Te.Z,null)),de.createElement("span",{style:Lt},"\u5217\u6570"),de.createElement(vt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},de.createElement(Te.Z,null))),de.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},de.createElement("span",{style:Lt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),de.createElement(vt.default.Item,{name:"align"},de.createElement(Ye,null,de.createElement(oe.ZP,{value:"default"},de.createElement("i",{className:"fa fa-align-justify"})),de.createElement(oe.ZP,{value:"left"},de.createElement("i",{className:"fa fa-align-left"})),de.createElement(oe.ZP,{value:"center"},de.createElement("i",{className:"fa fa-align-center"})),de.createElement(oe.ZP,{value:"right"},de.createElement("i",{className:"fa fa-align-right"}))))),de.createElement("div",{className:"flex-container flex-end"},de.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Xe.ZP,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Ft=se(47897),Jt=se(61016),Xt=se.n(Jt),Rn=(0,de.forwardRef)(({use3d:$n,width:qe,height:ut,callback:Dt,showSaveButton:Vt},We)=>{const pt=(0,de.useRef)(),zt=(0,de.useRef)(),[Bt,en]=(0,de.useState)(!1),nn=(0,de.useRef)({id:pt,appName:"graphing",width:qe||1e3,height:ut||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,de.useEffect)(()=>{zt.current=new(Xt())(nn.current,!0),window.onload=function(){zt.current.inject("applet_container")}},[]);const jn=()=>{var Lr=window.ggbApplet.getPNGBase64(1,!0,72);return Dt&&Dt(Lr),Lr};return(0,de.useEffect)(()=>{nn.current.appName=Bt?"3D":"graphing",zt.current.inject("applet_container")},[Bt]),(0,de.useEffect)(()=>{en($n)},[$n]),(0,de.useImperativeHandle)(We,()=>({getImgData:jn})),de.createElement(de.Fragment,null,de.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:pt}),de.createElement(jt.Z,{align:"middle"},de.createElement(yn.Z,{flex:1},de.createElement(Ft.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Bt,onChange:Lr=>en(Lr)})),de.createElement(yn.Z,null,de.createElement(Xe.ZP,{size:"large",onClick:jn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Tt=se(36527),dn=se(25934);const cr="link",Mr="upload-image",at="add-flowchart",Ht="draw-image",Fn="add-flowchart",er="code-block",nr="add-table",Sr="------------",Tr={default:Sr,left:`:${Sr}`,center:`:${Sr}:`,right:`${Sr}:`};var Er=se(99914),Or=($n,qe,ut)=>new Promise((Dt,Vt)=>{var We=Bt=>{try{zt(ut.next(Bt))}catch(en){Vt(en)}},pt=Bt=>{try{zt(ut.throw(Bt))}catch(en){Vt(en)}},zt=Bt=>Bt.done?Dt(Bt.value):Promise.resolve(Bt.value).then(We,pt);zt((ut=ut.apply($n,qe)).next())});function Vr(){}let ur=0;const si=1e4,Li="\u2581",Bi="@\u2581\u2581@",Hi="@\u2581@",ri=`
|
|
|
**\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`,yt=["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 Mn($n){return/^\d+$/.test($n)?`${$n}px`:$n}const Dn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",lr={[Dn+"-B"]:"bold",[Dn+"-I"]:"italic"},qn={[cr]:"\u6DFB\u52A0\u94FE\u63A5",[er]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Mr]:"\u6DFB\u52A0\u56FE\u7247",[Ht]:"\u6DFB\u52A0\u753B\u56FE",[at]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[nr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var pr=({defaultValue:$n="",onChange:qe,width:ut="100%",height:Dt=400,miniToolbar:Vt=!1,isFocus:We=!1,watch:pt,insertTemp:zt,mode:Bt="markdown",id:en="markdown-editor-id",showResizeBar:nn=!1,noStorage:jn=!1,showNullButton:Lr=!1,showNullProgramButton:rr=!1,hidetoolBar:tr=!1,fullScreen:dr=!1,onBlur:fr,onCMBeforeChange:mt,onFullScreen:st,className:Ct="",disablePaste:fn=!1,disabled:Bn=!1,disabledFill:hn=!1,placeholder:vn="",values:xn="",extraUse:Nn,onAddBlank:hr})=>{const[tn,Qr]=(0,de.useState)(null),[Ur,$i]=(0,de.useState)($n),[Ai,gi]=(0,de.useState)(pt),[qi,xi]=(0,de.useState)(dr),[li,Ni]=(0,de.useState)(""),[Gi,qr]=(0,de.useState)(0),[vi,Zi]=(0,de.useState)(Dt),[la,ta]=(0,de.useState)(!1),ii=(0,de.useRef)((0,dn.Z)()),Et=(0,de.useRef)(!1),wt=(0,de.useRef)(),[Qt,mn]=(0,de.useState)(0),[On,vr]=(0,de.useState)(0),Ir=(0,de.useRef)(),Wr=(0,de.useRef)(),Gr=(0,de.useRef)(),Hr=(0,de.useRef)(),ni=(0,de.useRef)(),yi=(0,de.useRef)(),Ar=()=>Or(void 0,null,function*(){var kn;const wn=yield Fetch("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ii.current}});(kn=wn==null?void 0:wn.attachments)!=null&&kn.length&&(console.log("cm:",tn,Ir),wn.attachments.map(Pn=>{Pn.content_type.indexOf("image")>-1?tn.replaceSelection(``):Pn.content_type.indexOf("video")>-1?tn.replaceSelection(`<video width="100%" controls src="${he.Z.API_SERVER}/api/attachments/${data.id}"></video>`):Pn.content_type.indexOf("pdf")>-1?tn.replaceSelection(`<a href="${he.Z.API_SERVER}/api/attachments/${Pn.id}?type=${Pn.content_type}&disposition=inline" target="_blank">${Pn.name}</a>`):tn.replaceSelection(`[${Pn.name}](${he.Z.API_SERVER}/api/attachments/${Pn.id}?type=${Pn.content_type})`)}))});(0,de.useEffect)(()=>{const kn=window.scrollY||window.pageYOffset;$i(xn),tn==null||tn.setValue(xn),window.scrollTo(0,kn)},[xn]),(0,de.useEffect)(()=>{st==null||st(qi)},[qi]),(0,de.useEffect)(()=>{if(Ir.current){let kn=function(Pn,zn){var gr;if(fn){zn.preventDefault();return}const Yn=zn.clipboardData;if(Yn){const Xn=Yn.types.toString(),ir=Yn.items;if(Xn==="Files"||Yn.types.indexOf("Files")>-1){if(zn.preventDefault(),Bt=="stex")return;try{let ar=ir[1];((gr=ir[0])==null?void 0:gr.kind)==="file"&&(ar=ir[0]);const xr=ar.getAsFile(),Re=xr.name.split(".").pop();(0,Ge.I)(xr,Ke=>{var At,dt,Gt;Ke.id?((At=xr==null?void 0:xr.type)==null?void 0:At.indexOf("image"))>-1?wn.replaceSelection(`<img width="100%" src="/api/attachments/${Ke.id}?type=${Ke.content_type})" alt="" />`):((dt=xr==null?void 0:xr.type)==null?void 0:dt.indexOf("video"))>-1?wn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ke.id}"></video>`):((Gt=xr==null?void 0:xr.type)==null?void 0:Gt.indexOf("pdf"))>-1?wn.replaceSelection(`<a href="/api/attachments/${Ke.id}?type=${xr.type}&disposition=inline" target="_blank">${xr.name}</a>`):yt.includes(Re)?wn.replaceSelection(`<a href="/api/attachments/${Ke.id}?type=office&disposition=inline" target="_blank">${xr.name}</a>`):wn.replaceSelection(`[${xr.name}](/api/attachments/${Ke.id}?type=${Ke.content_type})`):(Ke==null?void 0:Ke.status)===401&&(ln.ZP.warning((Ke==null?void 0:Ke.message)||"\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),document.location.href="/user/login")})}catch(ar){ln.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const wn=Be().fromTextArea(Ir.current,{mode:Bt,lineNumbers:!Vt,lineWrapping:!0,value:$n,autoCloseTags:!rr,autoCloseBrackets:!0});return wn.on("keyup",function(Pn,zn){zn.keyCode===8&&(Pn.getValue()==""?wn.setOption("placeholder",vn):wn.setOption("placeholder",null))}),wn.on("keydown",function(Pn,zn){if(zn.keyCode===8){var gr=Ti(Pn);gr&&zn.preventDefault()}}),We&&wn.focus(),wn.on("paste",kn),wn.on("dragleave",function(Pn,zn){Wr.current.classList.remove("mouse-hover-md")}),Bn&&wn.on("beforeChange",function(Pn,zn){(zn.origin==="paste"||zn.origin==="+input")&&zn.cancel()}),Qr(wn),()=>{wn.off("paste",kn)}}},[]);const pi=(0,de.useCallback)(()=>{if(Wr.current)try{}catch(kn){console.log(kn,"---- to set md editor body height")}},[vi,Wr,qi]);(0,de.useEffect)(()=>{function kn(){let wn=new Ve.Z(Pn=>{for(let zn of Pn)(zn.target.offsetHeight>0||zn.target.offsetWidth>0)&&(pi(),tn.setSize("100%","100%"),tn.refresh())});return wn.observe(Ir.current.parentElement),wn}if(tn){const wn=kn();return()=>{var Pn,zn;(Pn=Ir.current)!=null&&Pn.parentElement&&wn.unobserve((zn=Ir.current)==null?void 0:zn.parentElement)}}},[tn,pi]),(0,de.useEffect)(()=>{if(tn){let kn=[];for(const[wn,Pn]of Object.entries(lr)){let zn={[wn]:()=>{Ei(Pn)}};kn.push(zn),tn.addKeyMap(zn)}return wt.current=setInterval(()=>{Et.current&&Ar()},4e3),()=>{clearInterval(wt.current);for(let wn of kn)tn.removeKeyMap(wn)}}},[tn]),(0,de.useEffect)(()=>{dr!==qi&&xi(dr)},[dr]),(0,Er.Z)(()=>{if(!jn&&Gi>0){let kn=new Date().getTime(),wn=window.sessionStorage.getItem(en);kn>=Gi+si&&(!wn||wn!==Ur)&&(window.sessionStorage.setItem(en,Ur),ta(!0))}},si),(0,de.useEffect)(()=>{gi(pt)},[tn,pt]),(0,de.useEffect)(()=>{tn&&We&&tn.focus()},[tn,We]),(0,de.useEffect)(()=>{if(Ai&&tn){let kn=function(Pn){let zn=Pn.target;if(Hr.current){let gr=zn.scrollTop/zn.scrollHeight;Hr.current.scrollTop=Hr.current.scrollHeight*gr}};const wn=tn.getScrollerElement();return wn.addEventListener("scroll",kn),()=>{wn.removeEventListener("scroll",kn)}}},[tn,Ai]),(0,de.useEffect)(()=>{if(tn&&mt){let kn=function(wn,Pn){mt(wn,Pn)};return tn.on("beforeChange",kn),()=>{tn.off("beforeChange",kn)}}},[tn,mt]),(0,de.useEffect)(()=>{if(tn&&fr){let kn=function(){fr(tn.getValue())};return tn.on("blur",kn),()=>{tn.off("blur",kn)}}},[tn,fr]);function Ti(kn,wn){var Pn=kn.getDoc(),zn=Pn.getCursor(),gr=Pn.getLine(zn.line),Yn=gr.charAt(zn.ch-1),Xn=gr.lastIndexOf("@\u2581@",zn.ch),ir=gr.lastIndexOf("@\u2581\u2581@",zn.ch),ar=Xn>ir?Xn:ir,xr=Xn>ir?3:4;if(Bi.indexOf(Yn)===-1)return null;if(console.log("change1:",wn,kn,gr,zn,ar,Xn,ir,Yn),ar>=0&&zn.ch-ar<5){var Re=ar+xr;return Pn.replaceRange("",{line:zn.line,ch:ar},{line:zn.line,ch:Re}),{line:zn.line,ch:Re}}return null}(0,de.useEffect)(()=>{if(tn){let kn=function(wn,Pn){const zn=wn.getValue();$i(zn),qr(new Date().getTime()),wn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qe&&(rr?qe(zn,an(zn)):qe(zn))};return tn.on("change",kn),()=>{tn.off("change",kn)}}},[tn,qe]),(0,de.useEffect)(()=>{if(tn)if($n==null)tn.setValue(""),$i("");else{const kn=window.scrollY||window.pageYOffset;$n!==tn.getValue()&&(tn.setValue($n),$i($n),tn.setCursor(Bn?1:tn.lineCount(),0),window.scrollTo(0,kn))}},[tn,$n]);const Ei=(0,de.useCallback)(kn=>{const wn=tn.getCursor(),Pn=tn.getSelection();let zn=Pn.split(`
|
|
|
`);switch(kn){case"bold":return tn.replaceSelection("**"+Pn+"**"),Pn===""&&tn.setCursor(wn.line,wn.ch+2),tn.focus();case"italic":return tn.replaceSelection("*"+Pn+"*"),Pn===""&&tn.setCursor(wn.line,wn.ch+1),tn.focus();case"code":return tn.replaceSelection("`"+Pn+"`"),Pn===""&&tn.setCursor(wn.line,wn.ch+1),tn.focus();case"inline-latex":return Ni("inline-latex"),tn.focus();case"latex":return tn.replaceSelection("```latex\n"+Pn+"\n```"),tn.setCursor(wn.line+1,Pn.length+1),tn.focus();case"line-break":return tn.replaceSelection(`<br/>
|
|
|
`),tn.focus();case"list-ul":return Pn===""?tn.replaceSelection("- "+Pn):tn.replaceSelection(zn.map(gr=>gr===""?"":`- ${gr}`).join(`
|
|
|
`)),tn.focus();case"list-ol":return Pn===""?tn.replaceSelection("1. "+Pn):tn.replaceSelection(zn.map((gr,Yn)=>gr===""?"":`${Yn+1}. ${gr}`).join(`
|
|
|
`)),tn.focus();case"add-null-ch":hr==null||hr();return;case"add-signal":return Pn===""&&tn.setCursor(wn.line,wn.ch),tn.replaceSelection(Hi),tn.focus();case"add-multiple":return Pn===""&&tn.setCursor(wn.line,wn.ch),tn.replaceSelection(Bi),tn.focus();case"inster-template-1":return Pn===""&&tn.setCursor(wn.line,wn.ch),tn.replaceSelection(ri),tn.focus();case"eraser":return tn.setValue(""),tn.focus();case"trigger-watch":return gi(!Ai),tn.focus();case"trigger-full-screen":return xi(!qi),tn.focus();case cr:Ni(cr);return;case er:Ni(er);return;case Mr:Ni(Mr);return;case Ht:Ni(Ht);return;case"maths-latex":Ni("maths-latex");return;case at:ni.current="",sessionStorage.removeItem("file_id"),Ni(at);return;case nr:Ni(nr);return;default:throw new Error}},[tn,Ai,qi]),De=(0,de.useCallback)((kn,wn)=>{var Pn,zn,gr,Yn,Xn,ir;Ni("");const{src:ar,alt:xr,id:Re}=kn||{};switch(li){case cr:const{title:pn,link:Sn}=kn;return tn.replaceSelection(`[${pn}](${Sn})`),tn.focus();case er:const{language:Kn,content:Tn}=kn;return tn.replaceSelection(["```"+Kn,Tn,"```"].join(`
|
|
|
`)),tn.focus();case"maths-latex":for(var Ke=atob(kn),At=new Uint8Array(Ke.length),dt=0;dt<Ke.length;dt++)At[dt]=Ke.charCodeAt(dt);var Gt=new Blob([At],{type:"image/png"});(0,Ge.I)(Gt,Yr=>{Yr.id?tn.replaceSelection(``):(Yr==null?void 0:Yr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":tn.replaceSelection("`$$"+kn+"$$`");break;case Fn:if(!Re)return;tn.focus(),tn.getValue().indexOf(ar)===-1?tn.replaceSelection(`<center><img id="${Re}" width="80%" src="${ar}" class="draw-flowchart" alt="${xr||""}" /></center>`):document.getElementById(Re).src=he.Z.API_SERVER+ar+"?t="+Date.now();try{setTimeout(()=>{fr(tn.getValue())},100)}catch(Yr){}break;case Mr:case Ht:const cn=wn,Wn=(gr=(zn=(Pn=cn==null?void 0:cn.name)==null?void 0:Pn.split("."))==null?void 0:zn.pop)==null?void 0:gr.call(zn);return((Yn=cn==null?void 0:cn.type)==null?void 0:Yn.indexOf("image"))>-1||!(cn!=null&&cn.type)?cn!=null&&cn.align||cn!=null&&cn.width?tn.replaceSelection(`<p style="text-align:${cn.align||"initial"}"><img width="${cn.width?cn.width+"%":"initial"}" src="${ar}" alt="${xr||""}" /></p>`):tn.replaceSelection(`<img width="100%" src="${ar}" alt="${xr||""}" />`):((Xn=cn==null?void 0:cn.type)==null?void 0:Xn.indexOf("video"))>-1?tn.replaceSelection(`<video width="100%" controls src="${ar}"></video>`):((ir=cn==null?void 0:cn.type)==null?void 0:ir.indexOf("pdf"))>-1?tn.replaceSelection(`<a href="${ar}?type=${cn.type}&disposition=inline" target="_blank">${cn.name}</a>`):yt.includes(Wn)?tn.replaceSelection(`<a href="${ar}?type=office&disposition=inline" target="_blank">${cn.name}</a>`):tn.replaceSelection(`[${cn.name}](${ar})`),tn.focus();case nr:const{row:Zn,col:wr,align:Un}=kn;let Rr=`
|
|
|
`;for(let Yr=0;Yr<Zn;Yr++){let Nr=[],jr=[];for(let kr=0;kr<wr;kr++)Yr===1&&jr.push(Tr[Un]),Nr.push(" ");Yr===1&&(Rr+=`| ${jr.join(" | ")} |
|
|
|
`),Rr+=`| ${Nr.join(wr===1?"":" | ")} |
|
|
|
`}return tn.replaceSelection(Rr+`
|
|
|
`),tn.focus();default:throw new Error}},[tn,li]),Fe=(0,de.useMemo)(()=>{switch(li){case cr:return de.createElement(Ut,{callback:De,onCancel:ze});case er:return de.createElement(Yt.Z,{callback:De,onCancel:ze});case Mr:return de.createElement(Ge.Z,{callback:De,onCancel:ze});case at:return de.createElement(pe,{editImgId:ni.current,callback:De,onCancel:ze});case nr:return de.createElement(Rt,{callback:De,onCancel:ze});case"maths-latex":return de.createElement(Rn,{showSaveButton:!0,callback:De});case"inline-latex":return de.createElement(Tt.Z,{showSaveButton:!0,callback:De});default:return null}},[li]);function ze(){Ni("")}(0,de.useEffect)(()=>{if(Gr.current){let kn=function(Xn){gr=!0,Yn=Xn.pageY},wn=function(){gr=!1},Pn=function(Xn){if(gr){let ir=Xn.pageY-Yn;ir<0&&(ir=0),ir>300&&(ir=300);let ar=Dt+ir+"px";Zi(ar)}},zn=Gr.current,gr=!1,Yn=0;return zn.addEventListener("mousedown",kn),document.addEventListener("mousemove",Pn),document.addEventListener("mouseup",wn),()=>{zn.removeEventListener("mousedown",kn),document.removeEventListener("mousemove",Pn),document.removeEventListener("mouseup",wn)}}},[tn,Gr]),(0,de.useEffect)(()=>{Zi(Dt)},[Dt]);const Ze=Mn(ut),nt=Mn(vi),lt={width:Ze,height:nt},Mt=(0,de.useMemo)(()=>{if(Gi){let kn=new Date(Gi),wn=kn.getHours(),Pn=kn.getMinutes(),zn=kn.getSeconds();return wn=wn<10?"0"+wn:wn,Pn=Pn<10?"0"+Pn:Pn,zn=zn<10?"0"+zn:zn,`${wn}:${Pn}:${zn}`}return 0},[Gi]),an=kn=>{const wn=[];if(rr){let Pn=-1;kn=kn.replace(/(@▁▁@|@▁@)/g,function(zn,gr,Yn){wn.push({multiLine:zn!==Hi})})}return wn};function un(){window.sessionStorage.removeItem(en),ta(!1),qr(0)}function Jn(){ta(!1),qr(0),tn.setValue(window.sessionStorage.getItem(en))}(0,de.useEffect)(()=>{qn[li]&&li!==Ht&&li!==at&&setTimeout(()=>{const kn=document.getElementsByClassName("markdown-popup-form")[0],wn=window.innerWidth/2-kn.offsetWidth/2,Pn=window.innerHeight/2-kn.offsetHeight/2;mn(wn),vr(Pn)},0)},[li]);const br=kn=>{kn.preventDefault();const wn=kn.clientX-Qt,Pn=kn.clientY-On;document.body.onmousemove=zn=>{let gr=zn.clientX-wn,Yn=zn.clientY-Pn;const Xn=document.getElementsByClassName("markdown-popup-form")[0],ir=window.innerWidth-Xn.offsetWidth,ar=window.innerHeight-Xn.offsetHeight;gr=Math.max(0,Math.min(gr,ir)),Yn=Math.max(0,Math.min(Yn,ar)),Vn(zn.clientX,zn.clientY,wn,Pn)&&(mn(gr),vr(Yn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Vn=(kn,wn,Pn,zn)=>{const gr=document.body.clientHeight,Yn=document.body.clientWidth;return kn<20&&Pn>kn||kn>Yn-20&&Pn<kn||wn<20&&zn>wn||wn>gr-20&&zn<wn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return de.createElement(de.Fragment,null,de.createElement("div",{className:"markdown-editor-wrapper",ref:Wr},de.createElement("div",{className:`markdown-editor-container ${Ct} ${Ai?"on-preview":""} ${Vt?"mini":""} ${qi?"full-screen":""}`,style:lt},de.createElement(je,{insertTemp:zt,watch:Ai,fullScreen:qi,showNullButton:Lr,showNullProgramButton:rr,onActionCallback:Ei,hidetoolBar:tr,extraUse:Nn}),de.createElement("div",{className:"markdown-editor-body"},de.createElement("div",{className:"codemirror-container"},de.createElement("textarea",{ref:Ir,placeholder:vn})),Ai?de.createElement("div",{ref:Hr,className:"preview-container"},Bt==="stex"&&de.createElement(Oe,{value:Ur}),Bt!=="stex"&&de.createElement(ot.Z,{edit:!0,disabledFill:hn,showProgramFill:rr,value:Ur,openEditor:kn=>{var wn;ni.current=kn,(wn=yi.current)==null||wn.setHeight("100vh"),setTimeout(()=>{Ni("add-flowchart")},150)}})):null))),nn?de.createElement("a",{ref:Gr,className:"editor-resize"}):null,li===Ht&&de.createElement($t,{callback:De,onCancel:ze}),li===at&&de.createElement(pe,{ref:yi,editImgId:ni.current,callback:De,onCancel:ze}),de.createElement(_t.Z,null,qn[li]&&li!==Ht&&li!==at?de.createElement(rt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Qt,top:On},title:de.createElement("div",{style:{cursor:"move"},onMouseDown:br},qn[li]),open:!0,onCancel:ze,footer:null,destroyOnClose:!0,width:li===at?"1200px":null,height:li===at?"80vh":null,className:"markdown-popup-form"},Fe):null))}},70859:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Ue},I:function(){return _t}});var de=se(22150),He=se(2453),Be=se(69677),Ve=se(93421),ve=se(31795),we=se(78045),Ee=se(71577),xe=se(15476),me=se(67294),Ie=se(52262),ot=se(67294),Oe=Object.defineProperty,St=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,gt=(vt,kt,Xe)=>kt in vt?Oe(vt,kt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):vt[kt]=Xe,qt=(vt,kt)=>{for(var Xe in kt||(kt={}))Je.call(kt,Xe)&>(vt,Xe,kt[Xe]);if(it)for(var Xe of it(kt))Le.call(kt,Xe)&>(vt,Xe,kt[Xe]);return vt},tt=(vt,kt)=>St(vt,ft(kt));const{useForm:ct}=de.default,ke={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}};var Ue=({callback:vt,onCancel:kt})=>{const[Xe]=ct();let Kt=(0,me.useRef)();function Ot(sn){Kt.current.width=Xe.getFieldValue("width"),Kt.current.align=Xe.getFieldValue("align"),vt(sn,Kt.current)}function bn(sn,Cn){if(sn.status===-1){He.ZP.error(sn.message);return}Xe.setFieldsValue({src:`/api/attachments/${sn.id}`,type:Cn.type})}function Nt(sn){let Cn=sn.target.files[0];Kt.current=Cn,_t(Cn,bn)}return ot.createElement(de.default,tt(qt({form:Xe},Se),{className:"upload-image-panel",onFinish:Ot,style:{width:470,overflow:"hidden"}}),ot.createElement(de.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ot.createElement("div",{className:"flex-container"},ot.createElement(de.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},ot.createElement(Be.default,{style:ke})),ot.createElement(je,{onFileChange:Nt}))),ot.createElement(de.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ot.createElement(Be.default,{style:{width:264}})),ot.createElement(de.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ot.createElement(Ve.Z,null,ot.createElement(de.default.Item,{name:"width",style:{margin:0}},ot.createElement(ve.Z,{style:{width:264}})),ot.createElement("span",{className:"ml8"},"%"))),ot.createElement(de.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ot.createElement(we.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),ot.createElement("aside",null,ot.createElement(de.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ot.createElement(Ee.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ot.createElement(Ee.ZP,{type:"default",onClick:kt},"\u53D6\u6D88"))))};function je({onFileChange:vt}){return ot.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ot.createElement("input",{type:"file",onChange:vt}))}function _t(vt,kt){if(!vt)throw new String("\u6CA1\u6709\u6587\u4EF6");if(!(0,Ie.bg)())throw He.ZP.warning("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C"),new String("\u8BF7\u767B\u5F55\u540E\u518D\u64CD\u4F5C");let Xe=new FormData;Xe.append("editormd-image-file",vt),Xe.append("file_param_name","editormd-image-file"),Xe.append("byxhr","true");var Kt=new window.XMLHttpRequest;Kt.withCredentials=!0,Kt.addEventListener("load",function(Ot){kt(JSON.parse(Ot.target.responseText),vt)},!1),Kt.addEventListener("error",function(Ot){console.error(Ot)},!1),Kt.open("POST",`${xe.KI}/api/attachments.json`),Kt.send(Xe)}},76621:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Be}});var de=se(67294),He=se(73935);class Be extends de.Component{constructor(ve){super(ve);const we=window.document;this.node=we.createElement("div"),we.body.appendChild(this.node)}render(){const{children:ve}=this.props;return(0,He.createPortal)(ve,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},99914:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return He}});var de=se(67294);function He(Be,Ve){const ve=(0,de.useRef)();(0,de.useEffect)(()=>{ve.current=Be}),(0,de.useEffect)(()=>{function we(){ve.current()}if(Ve!==null){let Ee=setInterval(we,Ve);return()=>clearInterval(Ee)}},[Ve])}},4440:function(En,Wt,se){"use strict";se.d(Wt,{$J:function(){return Be},JZ:function(){return ve},bN:function(){return Ee},jP:function(){return we},rO:function(){return Ve}});var de=se(33170),He=(xe,me,Ie)=>new Promise((ot,Oe)=>{var St=Je=>{try{it(Ie.next(Je))}catch(Le){Oe(Le)}},ft=Je=>{try{it(Ie.throw(Je))}catch(Le){Oe(Le)}},it=Je=>Je.done?ot(Je.value):Promise.resolve(Je.value).then(St,ft);it((Ie=Ie.apply(xe,me)).next())});function Be(xe){return(0,de.U2)(`libraries/${xe}.json`)}function Ve(xe){return(0,de.U2)("library_tags.json",xe)}function ve(xe){return He(this,null,function*(){return(yield(0,de.IV)(`attachments/${xe}.json`)).status===0})}function we(xe){return(0,de.v_)("libraries.json",xe)}function Ee(xe,me){return(0,de.gz)(`libraries/${xe}.json`,me)}},57838:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return He}});var de=se(67294);function He(){const[,Be]=de.useReducer(Ve=>Ve+1,0);return Be}},9708:function(En,Wt,se){"use strict";se.d(Wt,{F:function(){return ve},Z:function(){return Ve}});var de=se(94184),He=se.n(de);const Be=null;function Ve(we,Ee,xe){return He()({[`${we}-status-success`]:Ee==="success",[`${we}-status-warning`]:Ee==="warning",[`${we}-status-error`]:Ee==="error",[`${we}-status-validating`]:Ee==="validating",[`${we}-has-feedback`]:xe})}const ve=(we,Ee)=>Ee||we},84567:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return Ue}});var de=se(94184),He=se.n(de),Be=se(95860),Ve=se(67294),ve=se(53124),we=se(98866),Ee=se(65223),me=Ve.createContext(null),Ie=se(63185),ot=se(45353),Oe=se(92429),St=function(je,_t){var vt={};for(var kt in je)Object.prototype.hasOwnProperty.call(je,kt)&&_t.indexOf(kt)<0&&(vt[kt]=je[kt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,kt=Object.getOwnPropertySymbols(je);Xe<kt.length;Xe++)_t.indexOf(kt[Xe])<0&&Object.prototype.propertyIsEnumerable.call(je,kt[Xe])&&(vt[kt[Xe]]=je[kt[Xe]]);return vt};const ft=(je,_t)=>{var vt;const{prefixCls:kt,className:Xe,rootClassName:Kt,children:Ot,indeterminate:bn=!1,style:Nt,onMouseEnter:sn,onMouseLeave:Cn,skipGroup:or=!1,disabled:Qe}=je,Ce=St(je,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ht,direction:Ut,checkbox:Yt}=Ve.useContext(ve.E_),Ge=Ve.useContext(me),{isFormItemInput:rt}=Ve.useContext(Ee.aM),jt=Ve.useContext(we.Z),_n=(vt=(Ge==null?void 0:Ge.disabled)||Qe)!==null&&vt!==void 0?vt:jt,rn=Ve.useRef(Ce.value);Ve.useEffect(()=>{Ge==null||Ge.registerValue(Ce.value)},[]),Ve.useEffect(()=>{if(!or)return Ce.value!==rn.current&&(Ge==null||Ge.cancelValue(rn.current),Ge==null||Ge.registerValue(Ce.value),rn.current=Ce.value),()=>Ge==null?void 0:Ge.cancelValue(Ce.value)},[Ce.value]);const $t=ht("checkbox",kt),[Zt,yn]=(0,Ie.ZP)($t),ln=Object.assign({},Ce);Ge&&!or&&(ln.onChange=function(){Ce.onChange&&Ce.onChange.apply(Ce,arguments),Ge.toggleOption&&Ge.toggleOption({label:Ot,value:Ce.value})},ln.name=Ge.name,ln.checked=Ge.value.includes(Ce.value));const Ae=He()(`${$t}-wrapper`,{[`${$t}-rtl`]:Ut==="rtl",[`${$t}-wrapper-checked`]:ln.checked,[`${$t}-wrapper-disabled`]:_n,[`${$t}-wrapper-in-form-item`]:rt},Yt==null?void 0:Yt.className,Xe,Kt,yn),ue=He()({[`${$t}-indeterminate`]:bn},Oe.A,yn),le=bn?"mixed":void 0;return Zt(Ve.createElement(ot.Z,{component:"Checkbox",disabled:_n},Ve.createElement("label",{className:Ae,style:Object.assign(Object.assign({},Yt==null?void 0:Yt.style),Nt),onMouseEnter:sn,onMouseLeave:Cn},Ve.createElement(Be.Z,Object.assign({"aria-checked":le},ln,{prefixCls:$t,className:ue,disabled:_n,ref:_t})),Ot!==void 0&&Ve.createElement("span",null,Ot))))};var Je=Ve.forwardRef(ft),Le=se(74902),gt=se(10366),qt=function(je,_t){var vt={};for(var kt in je)Object.prototype.hasOwnProperty.call(je,kt)&&_t.indexOf(kt)<0&&(vt[kt]=je[kt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,kt=Object.getOwnPropertySymbols(je);Xe<kt.length;Xe++)_t.indexOf(kt[Xe])<0&&Object.prototype.propertyIsEnumerable.call(je,kt[Xe])&&(vt[kt[Xe]]=je[kt[Xe]]);return vt};const tt=(je,_t)=>{const{defaultValue:vt,children:kt,options:Xe=[],prefixCls:Kt,className:Ot,rootClassName:bn,style:Nt,onChange:sn}=je,Cn=qt(je,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:or,direction:Qe}=Ve.useContext(ve.E_),[Ce,ht]=Ve.useState(Cn.value||vt||[]),[Ut,Yt]=Ve.useState([]);Ve.useEffect(()=>{"value"in Cn&&ht(Cn.value||[])},[Cn.value]);const Ge=Ve.useMemo(()=>Xe.map(pe=>typeof pe=="string"||typeof pe=="number"?{label:pe,value:pe}:pe),[Xe]),rt=pe=>{Yt(he=>he.filter(oe=>oe!==pe))},jt=pe=>{Yt(he=>[].concat((0,Le.Z)(he),[pe]))},_n=pe=>{const he=Ce.indexOf(pe.value),oe=(0,Le.Z)(Ce);he===-1?oe.push(pe.value):oe.splice(he,1),"value"in Cn||ht(oe),sn==null||sn(oe.filter(Te=>Ut.includes(Te)).sort((Te,Ye)=>{const Lt=Ge.findIndex(Ft=>Ft.value===Te),Rt=Ge.findIndex(Ft=>Ft.value===Ye);return Lt-Rt}))},rn=or("checkbox",Kt),$t=`${rn}-group`,[Zt,yn]=(0,Ie.ZP)(rn),ln=(0,gt.Z)(Cn,["value","disabled"]),Ae=Xe.length?Ge.map(pe=>Ve.createElement(Je,{prefixCls:rn,key:pe.value.toString(),disabled:"disabled"in pe?pe.disabled:Cn.disabled,value:pe.value,checked:Ce.includes(pe.value),onChange:pe.onChange,className:`${$t}-item`,style:pe.style,title:pe.title},pe.label)):kt,ue={toggleOption:_n,value:Ce,disabled:Cn.disabled,name:Cn.name,registerValue:jt,cancelValue:rt},le=He()($t,{[`${$t}-rtl`]:Qe==="rtl"},Ot,bn,yn);return Zt(Ve.createElement("div",Object.assign({className:le,style:Nt},ln,{ref:_t}),Ve.createElement(me.Provider,{value:ue},Ae)))},ct=Ve.forwardRef(tt);var ke=Ve.memo(ct);const Se=Je;Se.Group=ke,Se.__ANT_CHECKBOX=!0;var Ue=Se},63185:function(En,Wt,se){"use strict";se.d(Wt,{C2:function(){return ve}});var de=se(14747),He=se(45503),Be=se(67968);const Ve=we=>{const{checkboxCls:Ee}=we,xe=`${Ee}-wrapper`;return[{[`${Ee}-group`]:Object.assign(Object.assign({},(0,de.Wf)(we)),{display:"inline-flex",flexWrap:"wrap",columnGap:we.marginXS,[`> ${we.antCls}-row`]:{flex:1}}),[xe]:Object.assign(Object.assign({},(0,de.Wf)(we)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${xe}`]:{marginInlineStart:0},[`&${xe}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Ee]:Object.assign(Object.assign({},(0,de.Wf)(we)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:we.borderRadiusSM,alignSelf:"center",[`${Ee}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Ee}-inner`]:Object.assign({},(0,de.oN)(we))},[`${Ee}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:we.checkboxSize,height:we.checkboxSize,direction:"ltr",backgroundColor:we.colorBgContainer,border:`${we.lineWidth}px ${we.lineType} ${we.colorBorder}`,borderRadius:we.borderRadiusSM,borderCollapse:"separate",transition:`all ${we.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:we.checkboxSize/14*5,height:we.checkboxSize/14*8,border:`${we.lineWidthBold}px solid ${we.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${we.motionDurationFast} ${we.motionEaseInBack}, opacity ${we.motionDurationFast}`}},"& + span":{paddingInlineStart:we.paddingXS,paddingInlineEnd:we.paddingXS}})},{[`
|
|
|
${xe}:not(${xe}-disabled),
|
|
|
${Ee}:not(${Ee}-disabled)
|
|
|
`]:{[`&:hover ${Ee}-inner`]:{borderColor:we.colorPrimary}},[`${xe}:not(${xe}-disabled)`]:{[`&:hover ${Ee}-checked:not(${Ee}-disabled) ${Ee}-inner`]:{backgroundColor:we.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Ee}-checked:not(${Ee}-disabled):after`]:{borderColor:we.colorPrimaryHover}}},{[`${Ee}-checked`]:{[`${Ee}-inner`]:{backgroundColor:we.colorPrimary,borderColor:we.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${we.motionDurationMid} ${we.motionEaseOutBack} ${we.motionDurationFast}`}}},[`
|
|
|
${xe}-checked:not(${xe}-disabled),
|
|
|
${Ee}-checked:not(${Ee}-disabled)
|
|
|
`]:{[`&:hover ${Ee}-inner`]:{backgroundColor:we.colorPrimaryHover,borderColor:"transparent"}}},{[Ee]:{"&-indeterminate":{[`${Ee}-inner`]:{backgroundColor:we.colorBgContainer,borderColor:we.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:we.fontSizeLG/2,height:we.fontSizeLG/2,backgroundColor:we.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${xe}-disabled`]:{cursor:"not-allowed"},[`${Ee}-disabled`]:{[`&, ${Ee}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Ee}-inner`]:{background:we.colorBgContainerDisabled,borderColor:we.colorBorder,"&:after":{borderColor:we.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:we.colorTextDisabled},[`&${Ee}-indeterminate ${Ee}-inner::after`]:{background:we.colorTextDisabled}}}]};function ve(we,Ee){const xe=(0,He.TS)(Ee,{checkboxCls:`.${we}`,checkboxSize:Ee.controlInteractiveSize});return[Ve(xe)]}Wt.ZP=(0,Be.Z)("Checkbox",(we,Ee)=>{let{prefixCls:xe}=Ee;return[ve(xe,we)]})},88258:function(En,Wt,se){"use strict";var de=se(67294),He=se(53124),Be=se(32983);const Ve=ve=>{const{componentName:we}=ve,{getPrefixCls:Ee}=(0,de.useContext)(He.E_),xe=Ee("empty");switch(we){case"Table":case"List":return de.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return de.createElement(Be.Z,{image:Be.Z.PRESENTED_IMAGE_SIMPLE,className:`${xe}-small`});default:return de.createElement(Be.Z,null)}};Wt.Z=Ve},72565:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return ii}});var de=se(94184),He=se.n(de),Be=se(1413),Ve=se(97685),ve=se(67294),we=se(73935);function Ee(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var xe={};function me(Et,wt){}function Ie(Et,wt){}function ot(){xe={}}function Oe(Et,wt,Qt){!wt&&!xe[Qt]&&(Et(!1,Qt),xe[Qt]=!0)}function St(Et,wt){Oe(me,Et,wt)}function ft(Et,wt){Oe(Ie,Et,wt)}var it=null,Je=se(71002),Le=se(18459);function gt(Et,wt,Qt){var mn=ve.useRef({});return(!("value"in mn.current)||Qt(mn.current.condition,wt))&&(mn.current.value=Et(),mn.current.condition=wt),mn.current.value}function qt(Et,wt){typeof Et=="function"?Et(wt):(0,Je.Z)(Et)==="object"&&Et&&"current"in Et&&(Et.current=wt)}function tt(){for(var Et=arguments.length,wt=new Array(Et),Qt=0;Qt<Et;Qt++)wt[Qt]=arguments[Qt];var mn=wt.filter(function(On){return On});return mn.length<=1?mn[0]:function(On){wt.forEach(function(vr){qt(vr,On)})}}function ct(){for(var Et=arguments.length,wt=new Array(Et),Qt=0;Qt<Et;Qt++)wt[Qt]=arguments[Qt];return gt(function(){return tt.apply(void 0,wt)},wt,function(mn,On){return mn.length===On.length&&mn.every(function(vr,Ir){return vr===On[Ir]})})}function ke(Et){var wt,Qt,mn=(0,Le.isMemo)(Et)?Et.type.type:Et.type;return!(typeof mn=="function"&&!((wt=mn.prototype)!==null&&wt!==void 0&&wt.render)||typeof Et=="function"&&!((Qt=Et.prototype)!==null&&Qt!==void 0&&Qt.render))}var Se=ve.createContext(null),Ue=Se,je=se(74902),_t=Ee()?ve.useLayoutEffect:ve.useEffect,vt=_t,kt=function(wt,Qt){var mn=React.useRef(!0);_t(function(){if(!mn.current)return wt()},Qt),_t(function(){return mn.current=!1,function(){mn.current=!0}},[])},Xe=[];function Kt(Et,wt){var Qt=ve.useState(function(){if(!Ee())return null;var Ti=document.createElement("div");return Ti}),mn=(0,Ve.Z)(Qt,1),On=mn[0],vr=ve.useRef(!1),Ir=ve.useContext(Ue),Wr=ve.useState(Xe),Gr=(0,Ve.Z)(Wr,2),Hr=Gr[0],ni=Gr[1],yi=Ir||(vr.current?void 0:function(Ti){ni(function(Ei){var De=[Ti].concat((0,je.Z)(Ei));return De})});function Ar(){On.parentElement||document.body.appendChild(On),vr.current=!0}function pi(){var Ti;(Ti=On.parentElement)===null||Ti===void 0||Ti.removeChild(On),vr.current=!1}return vt(function(){return Et?Ir?Ir(Ar):Ar():pi(),pi},[Et]),vt(function(){Hr.length&&(Hr.forEach(function(Ti){return Ti()}),ni(Xe))},[Hr]),[On,yi]}function Ot(Et,wt){if(!Et)return!1;if(Et.contains)return Et.contains(wt);for(var Qt=wt;Qt;){if(Qt===Et)return!0;Qt=Qt.parentNode}return!1}var bn="data-rc-order",Nt="rc-util-key",sn=new Map;function Cn(){var Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},wt=Et.mark;return wt?wt.startsWith("data-")?wt:"data-".concat(wt):Nt}function or(Et){if(Et.attachTo)return Et.attachTo;var wt=document.querySelector("head");return wt||document.body}function Qe(Et){return Et==="queue"?"prependQueue":Et?"prepend":"append"}function Ce(Et){return Array.from((sn.get(Et)||Et).children).filter(function(wt){return wt.tagName==="STYLE"})}function ht(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Ee())return null;var Qt=wt.csp,mn=wt.prepend,On=document.createElement("style");On.setAttribute(bn,Qe(mn)),Qt!=null&&Qt.nonce&&(On.nonce=Qt==null?void 0:Qt.nonce),On.innerHTML=Et;var vr=or(wt),Ir=vr.firstChild;if(mn){if(mn==="queue"){var Wr=Ce(vr).filter(function(Gr){return["prepend","prependQueue"].includes(Gr.getAttribute(bn))});if(Wr.length)return vr.insertBefore(On,Wr[Wr.length-1].nextSibling),On}vr.insertBefore(On,Ir)}else vr.appendChild(On);return On}function Ut(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qt=or(wt);return Ce(Qt).find(function(mn){return mn.getAttribute(Cn(wt))===Et})}function Yt(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qt=Ut(Et,wt);if(Qt){var mn=or(wt);mn.removeChild(Qt)}}function Ge(Et,wt){var Qt=sn.get(Et);if(!Qt||!Ot(document,Qt)){var mn=ht("",wt),On=mn.parentNode;sn.set(Et,On),Et.removeChild(mn)}}function rt(){sn.clear()}function jt(Et,wt){var Qt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},mn=or(Qt);Ge(mn,Qt);var On=Ut(wt,Qt);if(On){var vr,Ir;if((vr=Qt.csp)!==null&&vr!==void 0&&vr.nonce&&On.nonce!==((Ir=Qt.csp)===null||Ir===void 0?void 0:Ir.nonce)){var Wr;On.nonce=(Wr=Qt.csp)===null||Wr===void 0?void 0:Wr.nonce}return On.innerHTML!==Et&&(On.innerHTML=Et),On}var Gr=ht(Et,Qt);return Gr.setAttribute(Cn(Qt),wt),Gr}var _n;function rn(Et){if(typeof document=="undefined")return 0;if(Et||_n===void 0){var wt=document.createElement("div");wt.style.width="100%",wt.style.height="200px";var Qt=document.createElement("div"),mn=Qt.style;mn.position="absolute",mn.top="0",mn.left="0",mn.pointerEvents="none",mn.visibility="hidden",mn.width="200px",mn.height="150px",mn.overflow="hidden",Qt.appendChild(wt),document.body.appendChild(Qt);var On=wt.offsetWidth;Qt.style.overflow="scroll";var vr=wt.offsetWidth;On===vr&&(vr=Qt.clientWidth),document.body.removeChild(Qt),_n=On-vr}return _n}function $t(Et){var wt=Et.match(/^(.*)px$/),Qt=Number(wt==null?void 0:wt[1]);return Number.isNaN(Qt)?rn():Qt}function Zt(Et){if(typeof document=="undefined"||!Et||!(Et instanceof Element))return{width:0,height:0};var wt=getComputedStyle(Et,"::-webkit-scrollbar"),Qt=wt.width,mn=wt.height;return{width:$t(Qt),height:$t(mn)}}function yn(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ln="rc-util-locker-".concat(Date.now()),Ae=0;function ue(Et){var wt=!!Et,Qt=ve.useState(function(){return Ae+=1,"".concat(ln,"_").concat(Ae)}),mn=(0,Ve.Z)(Qt,1),On=mn[0];vt(function(){if(wt){var vr=Zt(document.body).width,Ir=yn();jt(`
|
|
|
html body {
|
|
|
overflow-y: hidden;
|
|
|
`.concat(Ir?"width: calc(100% - ".concat(vr,"px);"):"",`
|
|
|
}`),On)}else Yt(On);return function(){Yt(On)}},[wt,On])}var le=!1;function pe(Et){return typeof Et=="boolean"&&(le=Et),le}var he=function(wt){return wt===!1?!1:!Ee()||!wt?null:typeof wt=="string"?document.querySelector(wt):typeof wt=="function"?wt():wt},oe=ve.forwardRef(function(Et,wt){var Qt=Et.open,mn=Et.autoLock,On=Et.getContainer,vr=Et.debug,Ir=Et.autoDestroy,Wr=Ir===void 0?!0:Ir,Gr=Et.children,Hr=ve.useState(Qt),ni=(0,Ve.Z)(Hr,2),yi=ni[0],Ar=ni[1],pi=yi||Qt;ve.useEffect(function(){(Wr||Qt)&&Ar(Qt)},[Qt,Wr]);var Ti=ve.useState(function(){return he(On)}),Ei=(0,Ve.Z)(Ti,2),De=Ei[0],Fe=Ei[1];ve.useEffect(function(){var kn=he(On);Fe(kn!=null?kn:null)});var ze=Kt(pi&&!De,vr),Ze=(0,Ve.Z)(ze,2),nt=Ze[0],lt=Ze[1],Mt=De!=null?De:nt;ue(mn&&Qt&&Ee()&&(Mt===nt||Mt===document.body));var an=null;if(Gr&&ke(Gr)&&wt){var un=Gr;an=un.ref}var Jn=ct(an,wt);if(!pi||!Ee()||De===void 0)return null;var br=Mt===!1||pe(),Vn=Gr;return wt&&(Vn=ve.cloneElement(Gr,{ref:Jn})),ve.createElement(Ue.Provider,{value:lt},br?Vn:(0,we.createPortal)(Vn,Mt))}),Te=oe,Ye=Te;function Lt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Rt=Lt()?ve.useLayoutEffect:ve.useEffect,Ft=function(wt,Qt){var mn=ve.useRef(!0);Rt(function(){return wt(mn.current)},Qt),Rt(function(){return mn.current=!1,function(){mn.current=!0}},[])},Jt=function(wt,Qt){Ft(function(mn){if(!mn)return wt()},Qt)},Xt=Ft,Hn=ve.createContext(null),Rn=ve.createContext({}),Tt=Hn,dn=se(4942),cr=se(87462),Mr=se(62874),at={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(wt){var Qt=wt.keyCode;if(wt.altKey&&!wt.ctrlKey||wt.metaKey||Qt>=at.F1&&Qt<=at.F12)return!1;switch(Qt){case at.ALT:case at.CAPS_LOCK:case at.CONTEXT_MENU:case at.CTRL:case at.DOWN:case at.END:case at.ESC:case at.HOME:case at.INSERT:case at.LEFT:case at.MAC_FF_META:case at.META:case at.NUMLOCK:case at.NUM_CENTER:case at.PAGE_DOWN:case at.PAGE_UP:case at.PAUSE:case at.PRINT_SCREEN:case at.RIGHT:case at.SHIFT:case at.UP:case at.WIN_KEY:case at.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(wt){if(wt>=at.ZERO&&wt<=at.NINE||wt>=at.NUM_ZERO&&wt<=at.NUM_MULTIPLY||wt>=at.A&&wt<=at.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&wt===0)return!0;switch(wt){case at.SPACE:case at.QUESTION_MARK:case at.NUM_PLUS:case at.NUM_MINUS:case at.NUM_PERIOD:case at.NUM_DIVISION:case at.SEMICOLON:case at.DASH:case at.EQUALS:case at.COMMA:case at.PERIOD:case at.SLASH:case at.APOSTROPHE:case at.SINGLE_QUOTE:case at.OPEN_SQUARE_BRACKET:case at.BACKSLASH:case at.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ht=at,Fn=`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`,er=`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`,nr="".concat(Fn," ").concat(er).split(/[\s\n]+/),Sr="aria-",Tr="data-";function Er(Et,wt){return Et.indexOf(wt)===0}function Or(Et){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qt;wt===!1?Qt={aria:!0,data:!0,attr:!0}:wt===!0?Qt={aria:!0}:Qt=(0,Be.Z)({},wt);var mn={};return Object.keys(Et).forEach(function(On){(Qt.aria&&(On==="role"||Er(On,Sr))||Qt.data&&Er(On,Tr)||Qt.attr&&nr.includes(On))&&(mn[On]=Et[On])}),mn}function Vr(Et){var wt=React.useRef();wt.current=Et;var Qt=React.useCallback(function(){for(var mn,On=arguments.length,vr=new Array(On),Ir=0;Ir<On;Ir++)vr[Ir]=arguments[Ir];return(mn=wt.current)===null||mn===void 0?void 0:mn.call.apply(mn,[wt].concat(vr))},[]);return Qt}function ur(Et){var wt=React.useRef(!1),Qt=React.useState(Et),mn=_slicedToArray(Qt,2),On=mn[0],vr=mn[1];React.useEffect(function(){return wt.current=!1,function(){wt.current=!0}},[]);function Ir(Wr,Gr){Gr&&wt.current||vr(Wr)}return[On,Ir]}function si(Et){return Et!==void 0}function Li(Et,wt){var Qt=wt||{},mn=Qt.defaultValue,On=Qt.value,vr=Qt.onChange,Ir=Qt.postState,Wr=useState(function(){return si(On)?On:si(mn)?typeof mn=="function"?mn():mn:typeof Et=="function"?Et():Et}),Gr=_slicedToArray(Wr,2),Hr=Gr[0],ni=Gr[1],yi=On!==void 0?On:Hr,Ar=Ir?Ir(yi):yi,pi=useEvent(vr),Ti=useState([yi]),Ei=_slicedToArray(Ti,2),De=Ei[0],Fe=Ei[1];useLayoutUpdateEffect(function(){var Ze=De[0];Hr!==Ze&&pi(Hr,Ze)},[De]),useLayoutUpdateEffect(function(){si(On)||ni(On)},[On]);var ze=useEvent(function(Ze,nt){ni(Ze,nt),Fe([yi],nt)});return[Ar,ze]}var Bi=se(33993);function Hi(Et,wt,Qt){var mn=ve.useRef({});return(!("value"in mn.current)||Qt(mn.current.condition,wt))&&(mn.current.value=Et(),mn.current.condition=wt),mn.current.value}function ri(Et,wt){typeof Et=="function"?Et(wt):(0,Je.Z)(Et)==="object"&&Et&&"current"in Et&&(Et.current=wt)}function yt(){for(var Et=arguments.length,wt=new Array(Et),Qt=0;Qt<Et;Qt++)wt[Qt]=arguments[Qt];var mn=wt.filter(function(On){return On});return mn.length<=1?mn[0]:function(On){wt.forEach(function(vr){ri(vr,On)})}}function Mn(){for(var Et=arguments.length,wt=new Array(Et),Qt=0;Qt<Et;Qt++)wt[Qt]=arguments[Qt];return Hi(function(){return yt.apply(void 0,wt)},wt,function(mn,On){return mn.length!==On.length||mn.every(function(vr,Ir){return vr!==On[Ir]})})}function An(Et){var wt,Qt,mn=isMemo(Et)?Et.type.type:Et.type;return!(typeof mn=="function"&&!((wt=mn.prototype)!==null&&wt!==void 0&&wt.render)||typeof Et=="function"&&!((Qt=Et.prototype)!==null&&Qt!==void 0&&Qt.render))}function Dn(Et){return!isValidElement(Et)||isFragment(Et)?!1:An(Et)}function lr(Et,wt,Qt,mn){if(!wt.length)return Qt;var On=_toArray(wt),vr=On[0],Ir=On.slice(1),Wr;return!Et&&typeof vr=="number"?Wr=[]:Array.isArray(Et)?Wr=_toConsumableArray(Et):Wr=_objectSpread({},Et),mn&&Qt===void 0&&Ir.length===1?delete Wr[vr][Ir[0]]:Wr[vr]=lr(Wr[vr],Ir,Qt,mn),Wr}function qn(Et,wt,Qt){var mn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return wt.length&&mn&&Qt===void 0&&!get(Et,wt.slice(0,-1))?Et:lr(Et,wt,Qt,mn)}function pr(Et){return _typeof(Et)==="object"&&Et!==null&&Object.getPrototypeOf(Et)===Object.prototype}function $n(Et){return Array.isArray(Et)?[]:{}}var qe=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function ut(){for(var Et=arguments.length,wt=new Array(Et),Qt=0;Qt<Et;Qt++)wt[Qt]=arguments[Qt];var mn=$n(wt[0]);return wt.forEach(function(On){function vr(Ir,Wr){var Gr=new Set(Wr),Hr=get(On,Ir),ni=Array.isArray(Hr);if(ni||pr(Hr)){if(!Gr.has(Hr)){Gr.add(Hr);var yi=get(mn,Ir);ni?mn=qn(mn,Ir,[]):(!yi||_typeof(yi)!=="object")&&(mn=qn(mn,Ir,$n(Hr))),qe(Hr).forEach(function(Ar){vr([].concat(_toConsumableArray(Ir),[Ar]),Gr)})}}else mn=qn(mn,Ir,Hr)}vr([])}),mn}var Dt={},Vt=[],We=function(wt){Vt.push(wt)};function pt(Et,wt){if(0)var Qt}function zt(Et,wt){if(0)var Qt}function Bt(){Dt={}}function en(Et,wt,Qt){!wt&&!Dt[Qt]&&(Et(!1,Qt),Dt[Qt]=!0)}function nn(Et,wt){en(pt,Et,wt)}function jn(Et,wt){en(zt,Et,wt)}nn.preMessage=We,nn.resetWarned=Bt,nn.noteOnce=jn;var Lr=nn,rr=function(wt){var Qt=wt.prefixCls,mn=wt.className,On=wt.style,vr=wt.children,Ir=wt.containerRef,Wr=wt.id,Gr=wt.onMouseEnter,Hr=wt.onMouseOver,ni=wt.onMouseLeave,yi=wt.onClick,Ar=wt.onKeyDown,pi=wt.onKeyUp,Ti={onMouseEnter:Gr,onMouseOver:Hr,onMouseLeave:ni,onClick:yi,onKeyDown:Ar,onKeyUp:pi},Ei=ve.useContext(Rn),De=Ei.panel,Fe=Mn(De,Ir);return ve.createElement(ve.Fragment,null,ve.createElement("div",(0,cr.Z)({id:Wr,className:He()("".concat(Qt,"-content"),mn),style:(0,Be.Z)({},On),"aria-modal":"true",role:"dialog",ref:Fe},Ti),vr))},tr=rr;function dr(Et){return typeof Et=="string"&&String(Number(Et))===Et?(Lr(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Et)):Et}function fr(Et){warning(!("wrapperClassName"in Et),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Et.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var mt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function st(Et,wt){var Qt,mn,On,vr,Ir=Et.prefixCls,Wr=Et.open,Gr=Et.placement,Hr=Et.inline,ni=Et.push,yi=Et.forceRender,Ar=Et.autoFocus,pi=Et.keyboard,Ti=Et.rootClassName,Ei=Et.rootStyle,De=Et.zIndex,Fe=Et.className,ze=Et.id,Ze=Et.style,nt=Et.motion,lt=Et.width,Mt=Et.height,an=Et.children,un=Et.contentWrapperStyle,Jn=Et.mask,br=Et.maskClosable,Vn=Et.maskMotion,kn=Et.maskClassName,wn=Et.maskStyle,Pn=Et.afterOpenChange,zn=Et.onClose,gr=Et.onMouseEnter,Yn=Et.onMouseOver,Xn=Et.onMouseLeave,ir=Et.onClick,ar=Et.onKeyDown,xr=Et.onKeyUp,Re=ve.useRef(),Ke=ve.useRef(),At=ve.useRef();ve.useImperativeHandle(wt,function(){return Re.current});var dt=function(zr){var ei=zr.keyCode,ci=zr.shiftKey;switch(ei){case Ht.TAB:{if(ei===Ht.TAB){if(!ci&&document.activeElement===At.current){var Fr;(Fr=Ke.current)===null||Fr===void 0||Fr.focus({preventScroll:!0})}else if(ci&&document.activeElement===Ke.current){var fi;(fi=At.current)===null||fi===void 0||fi.focus({preventScroll:!0})}}break}case Ht.ESC:{zn&&pi&&(zr.stopPropagation(),zn(zr));break}}};ve.useEffect(function(){if(Wr&&Ar){var kr;(kr=Re.current)===null||kr===void 0||kr.focus({preventScroll:!0})}},[Wr]);var Gt=ve.useState(!1),pn=(0,Ve.Z)(Gt,2),Sn=pn[0],Kn=pn[1],Tn=ve.useContext(Tt),cn;ni===!1?cn={distance:0}:ni===!0?cn={}:cn=ni||{};var Wn=(Qt=(mn=(On=cn)===null||On===void 0?void 0:On.distance)!==null&&mn!==void 0?mn:Tn==null?void 0:Tn.pushDistance)!==null&&Qt!==void 0?Qt:180,Zn=ve.useMemo(function(){return{pushDistance:Wn,push:function(){Kn(!0)},pull:function(){Kn(!1)}}},[Wn]);ve.useEffect(function(){if(Wr){var kr;Tn==null||(kr=Tn.push)===null||kr===void 0||kr.call(Tn)}else{var zr;Tn==null||(zr=Tn.pull)===null||zr===void 0||zr.call(Tn)}},[Wr]),ve.useEffect(function(){return function(){var kr;Tn==null||(kr=Tn.pull)===null||kr===void 0||kr.call(Tn)}},[]);var wr=Jn&&ve.createElement(Mr.Z,(0,cr.Z)({key:"mask"},Vn,{visible:Wr}),function(kr,zr){var ei=kr.className,ci=kr.style;return ve.createElement("div",{className:He()("".concat(Ir,"-mask"),ei,kn),style:(0,Be.Z)((0,Be.Z)({},ci),wn),onClick:br&&Wr?zn:void 0,ref:zr})}),Un=typeof nt=="function"?nt(Gr):nt,Rr={};if(Sn&&Wn)switch(Gr){case"top":Rr.transform="translateY(".concat(Wn,"px)");break;case"bottom":Rr.transform="translateY(".concat(-Wn,"px)");break;case"left":Rr.transform="translateX(".concat(Wn,"px)");break;default:Rr.transform="translateX(".concat(-Wn,"px)");break}Gr==="left"||Gr==="right"?Rr.width=dr(lt):Rr.height=dr(Mt);var Yr={onMouseEnter:gr,onMouseOver:Yn,onMouseLeave:Xn,onClick:ir,onKeyDown:ar,onKeyUp:xr},Nr=ve.createElement(Mr.Z,(0,cr.Z)({key:"panel"},Un,{visible:Wr,forceRender:yi,onVisibleChanged:function(zr){Pn==null||Pn(zr)},removeOnLeave:!1,leavedClassName:"".concat(Ir,"-content-wrapper-hidden")}),function(kr,zr){var ei=kr.className,ci=kr.style;return ve.createElement("div",(0,cr.Z)({className:He()("".concat(Ir,"-content-wrapper"),ei),style:(0,Be.Z)((0,Be.Z)((0,Be.Z)({},Rr),ci),un)},Or(Et,{data:!0})),ve.createElement(tr,(0,cr.Z)({id:ze,containerRef:zr,prefixCls:Ir,className:Fe,style:Ze},Yr),an))}),jr=(0,Be.Z)({},Ei);return De&&(jr.zIndex=De),ve.createElement(Tt.Provider,{value:Zn},ve.createElement("div",{className:He()(Ir,"".concat(Ir,"-").concat(Gr),Ti,(vr={},(0,dn.Z)(vr,"".concat(Ir,"-open"),Wr),(0,dn.Z)(vr,"".concat(Ir,"-inline"),Hr),vr)),style:jr,tabIndex:-1,ref:Re,onKeyDown:dt},wr,ve.createElement("div",{tabIndex:0,ref:Ke,style:mt,"aria-hidden":"true","data-sentinel":"start"}),Nr,ve.createElement("div",{tabIndex:0,ref:At,style:mt,"aria-hidden":"true","data-sentinel":"end"})))}var Ct=ve.forwardRef(st),fn=Ct,Bn=function(wt){var Qt=wt.open,mn=Qt===void 0?!1:Qt,On=wt.prefixCls,vr=On===void 0?"rc-drawer":On,Ir=wt.placement,Wr=Ir===void 0?"right":Ir,Gr=wt.autoFocus,Hr=Gr===void 0?!0:Gr,ni=wt.keyboard,yi=ni===void 0?!0:ni,Ar=wt.width,pi=Ar===void 0?378:Ar,Ti=wt.mask,Ei=Ti===void 0?!0:Ti,De=wt.maskClosable,Fe=De===void 0?!0:De,ze=wt.getContainer,Ze=wt.forceRender,nt=wt.afterOpenChange,lt=wt.destroyOnClose,Mt=wt.onMouseEnter,an=wt.onMouseOver,un=wt.onMouseLeave,Jn=wt.onClick,br=wt.onKeyDown,Vn=wt.onKeyUp,kn=wt.panelRef,wn=ve.useState(!1),Pn=(0,Ve.Z)(wn,2),zn=Pn[0],gr=Pn[1],Yn=ve.useState(!1),Xn=(0,Ve.Z)(Yn,2),ir=Xn[0],ar=Xn[1];Xt(function(){ar(!0)},[]);var xr=ir?mn:!1,Re=ve.useRef(),Ke=ve.useRef();Xt(function(){xr&&(Ke.current=document.activeElement)},[xr]);var At=function(Kn){var Tn;if(gr(Kn),nt==null||nt(Kn),!Kn&&Ke.current&&!((Tn=Re.current)!==null&&Tn!==void 0&&Tn.contains(Ke.current))){var cn;(cn=Ke.current)===null||cn===void 0||cn.focus({preventScroll:!0})}},dt=ve.useMemo(function(){return{panel:kn}},[kn]);if(!Ze&&!zn&&!xr&<)return null;var Gt={onMouseEnter:Mt,onMouseOver:an,onMouseLeave:un,onClick:Jn,onKeyDown:br,onKeyUp:Vn},pn=(0,Be.Z)((0,Be.Z)({},wt),{},{open:xr,prefixCls:vr,placement:Wr,autoFocus:Hr,keyboard:yi,width:pi,mask:Ei,maskClosable:Fe,inline:ze===!1,afterOpenChange:At,ref:Re},Gt);return ve.createElement(Rn.Provider,{value:dt},ve.createElement(Ye,{open:xr||Ze||zn,autoDestroy:!1,getContainer:ze,autoLock:Ei&&(xr||zn)},ve.createElement(fn,pn)))},hn=Bn,vn=hn,xn=se(33603),Nn=se(53124),hr=se(65223),tn=se(69760),Ur=Et=>{const{prefixCls:wt,title:Qt,footer:mn,extra:On,closeIcon:vr,closable:Ir,onClose:Wr,headerStyle:Gr,drawerStyle:Hr,bodyStyle:ni,footerStyle:yi,children:Ar}=Et,pi=ve.useCallback(ze=>ve.createElement("button",{type:"button",onClick:Wr,"aria-label":"Close",className:`${wt}-close`},ze),[Wr]),[Ti,Ei]=(0,tn.Z)(Ir,vr,pi,void 0,!0),De=ve.useMemo(()=>!Qt&&!Ti?null:ve.createElement("div",{style:Gr,className:He()(`${wt}-header`,{[`${wt}-header-close-only`]:Ti&&!Qt&&!On})},ve.createElement("div",{className:`${wt}-header-title`},Ei,Qt&&ve.createElement("div",{className:`${wt}-title`},Qt)),On&&ve.createElement("div",{className:`${wt}-extra`},On)),[Ti,Ei,On,Gr,wt,Qt]),Fe=ve.useMemo(()=>{if(!mn)return null;const ze=`${wt}-footer`;return ve.createElement("div",{className:ze,style:yi},mn)},[mn,yi,wt]);return ve.createElement("div",{className:`${wt}-wrapper-body`,style:Hr},De,ve.createElement("div",{className:`${wt}-body`,style:ni},Ar),Fe)},$i=se(4173),Ai=se(67968),gi=se(45503),xi=Et=>{const{componentCls:wt,motionDurationSlow:Qt}=Et,mn={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${Qt}`}}};return{[wt]:{[`${wt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${Qt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${wt}-panel-motion`]:{"&-left":[mn,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[mn,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[mn,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[mn,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const li=Et=>{const{componentCls:wt,zIndexPopup:Qt,colorBgMask:mn,colorBgElevated:On,motionDurationSlow:vr,motionDurationMid:Ir,padding:Wr,paddingLG:Gr,fontSizeLG:Hr,lineHeightLG:ni,lineWidth:yi,lineType:Ar,colorSplit:pi,marginSM:Ti,colorIcon:Ei,colorIconHover:De,colorText:Fe,fontWeightStrong:ze,footerPaddingBlock:Ze,footerPaddingInline:nt}=Et,lt=`${wt}-content-wrapper`;return{[wt]:{position:"fixed",inset:0,zIndex:Qt,pointerEvents:"none","&-pure":{position:"relative",background:On,[`&${wt}-left`]:{boxShadow:Et.boxShadowDrawerLeft},[`&${wt}-right`]:{boxShadow:Et.boxShadowDrawerRight},[`&${wt}-top`]:{boxShadow:Et.boxShadowDrawerUp},[`&${wt}-bottom`]:{boxShadow:Et.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${wt}-mask`]:{position:"absolute",inset:0,zIndex:Qt,background:mn,pointerEvents:"auto"},[lt]:{position:"absolute",zIndex:Qt,maxWidth:"100vw",transition:`all ${vr}`,"&-hidden":{display:"none"}},[`&-left > ${lt}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Et.boxShadowDrawerLeft},[`&-right > ${lt}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Et.boxShadowDrawerRight},[`&-top > ${lt}`]:{top:0,insetInline:0,boxShadow:Et.boxShadowDrawerUp},[`&-bottom > ${lt}`]:{bottom:0,insetInline:0,boxShadow:Et.boxShadowDrawerDown},[`${wt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:On,pointerEvents:"auto"},[`${wt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${wt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Wr}px ${Gr}px`,fontSize:Hr,lineHeight:ni,borderBottom:`${yi}px ${Ar} ${pi}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${wt}-extra`]:{flex:"none"},[`${wt}-close`]:{display:"inline-block",marginInlineEnd:Ti,color:Ei,fontWeight:ze,fontSize:Hr,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${Ir}`,textRendering:"auto","&:focus, &:hover":{color:De,textDecoration:"none"}},[`${wt}-title`]:{flex:1,margin:0,color:Fe,fontWeight:Et.fontWeightStrong,fontSize:Hr,lineHeight:ni},[`${wt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Gr,overflow:"auto"},[`${wt}-footer`]:{flexShrink:0,padding:`${Ze}px ${nt}px`,borderTop:`${yi}px ${Ar} ${pi}`},"&-rtl":{direction:"rtl"}}}};var Ni=(0,Ai.Z)("Drawer",Et=>{const wt=(0,gi.TS)(Et,{});return[li(wt),xi(wt)]},Et=>({zIndexPopup:Et.zIndexPopupBase,footerPaddingBlock:Et.paddingXS,footerPaddingInline:Et.padding})),Gi=se(16569),qr=function(Et,wt){var Qt={};for(var mn in Et)Object.prototype.hasOwnProperty.call(Et,mn)&&wt.indexOf(mn)<0&&(Qt[mn]=Et[mn]);if(Et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var On=0,mn=Object.getOwnPropertySymbols(Et);On<mn.length;On++)wt.indexOf(mn[On])<0&&Object.prototype.propertyIsEnumerable.call(Et,mn[On])&&(Qt[mn[On]]=Et[mn[On]]);return Qt};const vi=null,Zi={distance:180},la=Et=>{var wt;const{rootClassName:Qt,width:mn,height:On,size:vr="default",mask:Ir=!0,push:Wr=Zi,open:Gr,afterOpenChange:Hr,onClose:ni,prefixCls:yi,getContainer:Ar,style:pi,className:Ti,visible:Ei,afterVisibleChange:De}=Et,Fe=qr(Et,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:ze,getPrefixCls:Ze,direction:nt,drawer:lt}=ve.useContext(Nn.E_),Mt=Ze("drawer",yi),[an,un]=Ni(Mt),Jn=Ar===void 0&&ze?()=>ze(document.body):Ar,br=He()({"no-mask":!Ir,[`${Mt}-rtl`]:nt==="rtl"},Qt,un),Vn=ve.useMemo(()=>mn!=null?mn:vr==="large"?736:378,[mn,vr]),kn=ve.useMemo(()=>On!=null?On:vr==="large"?736:378,[On,vr]),wn={motionName:(0,xn.m)(Mt,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Pn=gr=>({motionName:(0,xn.m)(Mt,`panel-motion-${gr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),zn=(0,Gi.H)();return an(ve.createElement($i.BR,null,ve.createElement(hr.Ux,{status:!0,override:!0},ve.createElement(vn,Object.assign({prefixCls:Mt,onClose:ni,maskMotion:wn,motion:Pn},Fe,{open:Gr!=null?Gr:Ei,mask:Ir,push:Wr,width:Vn,height:kn,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),pi),className:He()(lt==null?void 0:lt.className,Ti),rootClassName:br,getContainer:Jn,afterOpenChange:Hr!=null?Hr:De,panelRef:zn}),ve.createElement(Ur,Object.assign({prefixCls:Mt},Fe,{onClose:ni}))))))},ta=Et=>{const{prefixCls:wt,style:Qt,className:mn,placement:On="right"}=Et,vr=qr(Et,["prefixCls","style","className","placement"]),{getPrefixCls:Ir}=ve.useContext(Nn.E_),Wr=Ir("drawer",wt),[Gr,Hr]=Ni(Wr),ni=He()(Wr,`${Wr}-pure`,`${Wr}-${On}`,Hr,mn);return Gr(ve.createElement("div",{className:ni,style:Qt},ve.createElement(Ur,Object.assign({prefixCls:Wr},vr))))};la._InternalPanelDoNotUseOrYouWillBeFired=ta;var ii=la},35874:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return he}});var de=se(67294),He=se(91034),Be=se(94184),Ve=se.n(Be),ve=se(87462),we=se(4942),Ee=se(97685),xe=se(45987),me=se(62709),Ie=se(71002),ot=se(12060);function Oe(oe,Te,Ye){var Lt=React.useRef({});return(!("value"in Lt.current)||Ye(Lt.current.condition,Te))&&(Lt.current.value=oe(),Lt.current.condition=Te),Lt.current.value}function St(oe,Te){typeof oe=="function"?oe(Te):(0,Ie.Z)(oe)==="object"&&oe&&"current"in oe&&(oe.current=Te)}function ft(){for(var oe=arguments.length,Te=new Array(oe),Ye=0;Ye<oe;Ye++)Te[Ye]=arguments[Ye];var Lt=Te.filter(function(Rt){return Rt});return Lt.length<=1?Lt[0]:function(Rt){Te.forEach(function(Ft){St(Ft,Rt)})}}function it(){for(var oe=arguments.length,Te=new Array(oe),Ye=0;Ye<oe;Ye++)Te[Ye]=arguments[Ye];return useMemo(function(){return ft.apply(void 0,Te)},Te,function(Lt,Rt){return Lt.length===Rt.length&&Lt.every(function(Ft,Jt){return Ft===Rt[Jt]})})}function Je(oe){var Te,Ye,Lt=(0,ot.isMemo)(oe)?oe.type.type:oe.type;return!(typeof Lt=="function"&&!((Te=Lt.prototype)!==null&&Te!==void 0&&Te.render)||typeof oe=="function"&&!((Ye=oe.prototype)!==null&&Ye!==void 0&&Ye.render))}var Le={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(Te){var Ye=Te.keyCode;if(Te.altKey&&!Te.ctrlKey||Te.metaKey||Ye>=Le.F1&&Ye<=Le.F12)return!1;switch(Ye){case Le.ALT:case Le.CAPS_LOCK:case Le.CONTEXT_MENU:case Le.CTRL:case Le.DOWN:case Le.END:case Le.ESC:case Le.HOME:case Le.INSERT:case Le.LEFT:case Le.MAC_FF_META:case Le.META:case Le.NUMLOCK:case Le.NUM_CENTER:case Le.PAGE_DOWN:case Le.PAGE_UP:case Le.PAUSE:case Le.PRINT_SCREEN:case Le.RIGHT:case Le.SHIFT:case Le.UP:case Le.WIN_KEY:case Le.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Te){if(Te>=Le.ZERO&&Te<=Le.NINE||Te>=Le.NUM_ZERO&&Te<=Le.NUM_MULTIPLY||Te>=Le.A&&Te<=Le.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Te===0)return!0;switch(Te){case Le.SPACE:case Le.QUESTION_MARK:case Le.NUM_PLUS:case Le.NUM_MINUS:case Le.NUM_PERIOD:case Le.NUM_DIVISION:case Le.SEMICOLON:case Le.DASH:case Le.EQUALS:case Le.COMMA:case Le.PERIOD:case Le.SLASH:case Le.APOSTROPHE:case Le.SINGLE_QUOTE:case Le.OPEN_SQUARE_BRACKET:case Le.BACKSLASH:case Le.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},gt=Le,qt=function(Te){return+setTimeout(Te,16)},tt=function(Te){return clearTimeout(Te)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(qt=function(Te){return window.requestAnimationFrame(Te)},tt=function(Te){return window.cancelAnimationFrame(Te)});var ct=0,ke=new Map;function Se(oe){ke.delete(oe)}var Ue=function(Te){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ct+=1;var Lt=ct;function Rt(Ft){if(Ft===0)Se(Lt),Te();else{var Jt=qt(function(){Rt(Ft-1)});ke.set(Lt,Jt)}}return Rt(Ye),Lt};Ue.cancel=function(oe){var Te=ke.get(oe);return Se(Te),tt(Te)};var je=Ue,_t=gt.ESC,vt=gt.TAB;function kt(oe){var Te=oe.visible,Ye=oe.triggerRef,Lt=oe.onVisibleChange,Rt=oe.autoFocus,Ft=oe.overlayRef,Jt=de.useRef(!1),Xt=function(){if(Te){var dn,cr;(dn=Ye.current)===null||dn===void 0||(cr=dn.focus)===null||cr===void 0||cr.call(dn),Lt==null||Lt(!1)}},Hn=function(){var dn;return(dn=Ft.current)!==null&&dn!==void 0&&dn.focus?(Ft.current.focus(),Jt.current=!0,!0):!1},Rn=function(dn){switch(dn.keyCode){case _t:Xt();break;case vt:{var cr=!1;Jt.current||(cr=Hn()),cr?dn.preventDefault():Xt();break}}};de.useEffect(function(){return Te?(window.addEventListener("keydown",Rn),Rt&&je(Hn,3),function(){window.removeEventListener("keydown",Rn),Jt.current=!1}):function(){Jt.current=!1}},[Te])}var Xe=(0,de.forwardRef)(function(oe,Te){var Ye=oe.overlay,Lt=oe.arrow,Rt=oe.prefixCls,Ft=(0,de.useMemo)(function(){var Xt;return typeof Ye=="function"?Xt=Ye():Xt=Ye,Xt},[Ye]),Jt=ft(Te,Ft==null?void 0:Ft.ref);return de.createElement(de.Fragment,null,Lt&&de.createElement("div",{className:"".concat(Rt,"-arrow")}),de.cloneElement(Ft,{ref:Je(Ft)?Jt:void 0}))}),Kt=Xe,Ot={adjustX:1,adjustY:1},bn=[0,0],Nt={topLeft:{points:["bl","tl"],overflow:Ot,offset:[0,-4],targetOffset:bn},top:{points:["bc","tc"],overflow:Ot,offset:[0,-4],targetOffset:bn},topRight:{points:["br","tr"],overflow:Ot,offset:[0,-4],targetOffset:bn},bottomLeft:{points:["tl","bl"],overflow:Ot,offset:[0,4],targetOffset:bn},bottom:{points:["tc","bc"],overflow:Ot,offset:[0,4],targetOffset:bn},bottomRight:{points:["tr","br"],overflow:Ot,offset:[0,4],targetOffset:bn}},sn=Nt,Cn=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function or(oe,Te){var Ye,Lt=oe.arrow,Rt=Lt===void 0?!1:Lt,Ft=oe.prefixCls,Jt=Ft===void 0?"rc-dropdown":Ft,Xt=oe.transitionName,Hn=oe.animation,Rn=oe.align,Tt=oe.placement,dn=Tt===void 0?"bottomLeft":Tt,cr=oe.placements,Mr=cr===void 0?sn:cr,at=oe.getPopupContainer,Ht=oe.showAction,Fn=oe.hideAction,er=oe.overlayClassName,nr=oe.overlayStyle,Sr=oe.visible,Tr=oe.trigger,Er=Tr===void 0?["hover"]:Tr,Or=oe.autoFocus,Vr=oe.overlay,ur=oe.children,si=oe.onVisibleChange,Li=(0,xe.Z)(oe,Cn),Bi=de.useState(),Hi=(0,Ee.Z)(Bi,2),ri=Hi[0],yt=Hi[1],Mn="visible"in oe?Sr:ri,An=de.useRef(null),Dn=de.useRef(null),lr=de.useRef(null);de.useImperativeHandle(Te,function(){return An.current});var qn=function(zt){yt(zt),si==null||si(zt)};kt({visible:Mn,triggerRef:lr,onVisibleChange:qn,autoFocus:Or,overlayRef:Dn});var pr=function(zt){var Bt=oe.onOverlayClick;yt(!1),Bt&&Bt(zt)},$n=function(){return de.createElement(Kt,{ref:Dn,overlay:Vr,prefixCls:Jt,arrow:Rt})},qe=function(){return typeof Vr=="function"?$n:$n()},ut=function(){var zt=oe.minOverlayWidthMatchTrigger,Bt=oe.alignPoint;return"minOverlayWidthMatchTrigger"in oe?zt:!Bt},Dt=function(){var zt=oe.openClassName;return zt!==void 0?zt:"".concat(Jt,"-open")},Vt=de.cloneElement(ur,{className:Ve()((Ye=ur.props)===null||Ye===void 0?void 0:Ye.className,Mn&&Dt()),ref:Je(ur)?ft(lr,ur.ref):void 0}),We=Fn;return!We&&Er.indexOf("contextMenu")!==-1&&(We=["click"]),de.createElement(me.Z,(0,ve.Z)({builtinPlacements:Mr},Li,{prefixCls:Jt,ref:An,popupClassName:Ve()(er,(0,we.Z)({},"".concat(Jt,"-show-arrow"),Rt)),popupStyle:nr,action:Er,showAction:Ht,hideAction:We,popupPlacement:dn,popupAlign:Rn,popupTransitionName:Xt,popupAnimation:Hn,popupVisible:Mn,stretch:ut()?"minWidth":"",popup:qe(),onPopupVisibleChange:qn,onPopupClick:pr,getPopupContainer:at}),Vt)}var Qe=de.forwardRef(or),Ce=Qe,ht=se(60276),Ut=se(5663),Yt=se(10366),Ge=se(80636),rt=se(8745),jt=se(96159),_n=se(53124),rn=se(68508),$t=se(76529),Zt=se(46605),yn=se(66748);const ln=null,Ae=oe=>{const{menu:Te,arrow:Ye,prefixCls:Lt,children:Rt,trigger:Ft,disabled:Jt,dropdownRender:Xt,getPopupContainer:Hn,overlayClassName:Rn,rootClassName:Tt,open:dn,onOpenChange:cr,visible:Mr,onVisibleChange:at,mouseEnterDelay:Ht=.15,mouseLeaveDelay:Fn=.1,autoAdjustOverflow:er=!0,placement:nr="",overlay:Sr,transitionName:Tr}=oe,{getPopupContainer:Er,getPrefixCls:Or,direction:Vr}=de.useContext(_n.E_),ur=de.useMemo(()=>{const Vt=Or();return Tr!==void 0?Tr:nr.includes("top")?`${Vt}-slide-down`:`${Vt}-slide-up`},[Or,nr,Tr]),si=de.useMemo(()=>nr?nr.includes("Center")?nr.slice(0,nr.indexOf("Center")):nr:Vr==="rtl"?"bottomRight":"bottomLeft",[nr,Vr]),Li=Or("dropdown",Lt),[Bi,Hi]=(0,yn.Z)(Li),[,ri]=(0,Zt.Z)(),yt=de.Children.only(Rt),Mn=(0,jt.Tm)(yt,{className:Ve()(`${Li}-trigger`,{[`${Li}-rtl`]:Vr==="rtl"},yt.props.className),disabled:Jt}),An=Jt?[]:Ft;let Dn;An&&An.includes("contextMenu")&&(Dn=!0);const[lr,qn]=(0,Ut.Z)(!1,{value:dn!=null?dn:Mr}),pr=(0,ht.useEvent)(Vt=>{cr==null||cr(Vt),at==null||at(Vt),qn(Vt)}),$n=Ve()(Rn,Tt,Hi,{[`${Li}-rtl`]:Vr==="rtl"}),qe=(0,Ge.Z)({arrowPointAtCenter:typeof Ye=="object"&&Ye.pointAtCenter,autoAdjustOverflow:er,offset:ri.marginXXS,arrowWidth:Ye?ri.sizePopupArrow:0,borderRadius:ri.borderRadius}),ut=de.useCallback(()=>{qn(!1)},[]),Dt=()=>{let Vt;return Te!=null&&Te.items?Vt=de.createElement(rn.default,Object.assign({},Te)):typeof Sr=="function"?Vt=Sr():Vt=Sr,Xt&&(Vt=Xt(Vt)),Vt=de.Children.only(typeof Vt=="string"?de.createElement("span",null,Vt):Vt),de.createElement($t.J,{prefixCls:`${Li}-menu`,expandIcon:de.createElement("span",{className:`${Li}-menu-submenu-arrow`},de.createElement(He.Z,{className:`${Li}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ut,validator:We=>{let{mode:pt}=We}},Vt)};return Bi(de.createElement(Ce,Object.assign({alignPoint:Dn},(0,Yt.Z)(oe,["rootClassName"]),{mouseEnterDelay:Ht,mouseLeaveDelay:Fn,visible:lr,builtinPlacements:qe,arrow:!!Ye,overlayClassName:$n,prefixCls:Li,getPopupContainer:Hn||Er,transitionName:ur,trigger:An,overlay:Dt,placement:si,onVisibleChange:pr}),Mn))};function ue(oe){return Object.assign(Object.assign({},oe),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const le=(0,rt.Z)(Ae,"dropdown",oe=>oe,ue),pe=oe=>de.createElement(le,Object.assign({},oe),de.createElement("span",null));Ae._InternalPanelDoNotUseOrYouWillBeFired=pe;var he=Ae},66748:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return ot}});var de=se(14747),He=se(67771),Be=se(33297),Ve=se(50438),ve=se(97414),we=se(67968),Ee=se(45503),me=Oe=>{const{componentCls:St,menuCls:ft,colorError:it,colorTextLightSolid:Je}=Oe,Le=`${ft}-item`;return{[`${St}, ${St}-menu-submenu`]:{[`${ft} ${Le}`]:{[`&${Le}-danger:not(${Le}-disabled)`]:{color:it,"&:hover":{color:Je,backgroundColor:it}}}}}};const Ie=Oe=>{const{componentCls:St,menuCls:ft,zIndexPopup:it,dropdownArrowDistance:Je,sizePopupArrow:Le,antCls:gt,iconCls:qt,motionDurationMid:tt,dropdownPaddingVertical:ct,fontSize:ke,dropdownEdgeChildPadding:Se,colorTextDisabled:Ue,fontSizeIcon:je,controlPaddingHorizontal:_t,colorBgElevated:vt}=Oe;return[{[St]:Object.assign(Object.assign({},(0,de.Wf)(Oe)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:it,display:"block","&::before":{position:"absolute",insetBlock:-Je+Le/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${gt}-btn`]:{[`& > ${qt}-down, & > ${gt}-btn-icon > ${qt}-down`]:{fontSize:je}},[`${St}-wrap`]:{position:"relative",[`${gt}-btn > ${qt}-down`]:{fontSize:je},[`${qt}-down::before`]:{transition:`transform ${tt}`}},[`${St}-wrap-open`]:{[`${qt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${gt}-slide-down-enter${gt}-slide-down-enter-active${St}-placement-bottomLeft,
|
|
|
&${gt}-slide-down-appear${gt}-slide-down-appear-active${St}-placement-bottomLeft,
|
|
|
&${gt}-slide-down-enter${gt}-slide-down-enter-active${St}-placement-bottom,
|
|
|
&${gt}-slide-down-appear${gt}-slide-down-appear-active${St}-placement-bottom,
|
|
|
&${gt}-slide-down-enter${gt}-slide-down-enter-active${St}-placement-bottomRight,
|
|
|
&${gt}-slide-down-appear${gt}-slide-down-appear-active${St}-placement-bottomRight`]:{animationName:He.fJ},[`&${gt}-slide-up-enter${gt}-slide-up-enter-active${St}-placement-topLeft,
|
|
|
&${gt}-slide-up-appear${gt}-slide-up-appear-active${St}-placement-topLeft,
|
|
|
&${gt}-slide-up-enter${gt}-slide-up-enter-active${St}-placement-top,
|
|
|
&${gt}-slide-up-appear${gt}-slide-up-appear-active${St}-placement-top,
|
|
|
&${gt}-slide-up-enter${gt}-slide-up-enter-active${St}-placement-topRight,
|
|
|
&${gt}-slide-up-appear${gt}-slide-up-appear-active${St}-placement-topRight`]:{animationName:He.Qt},[`&${gt}-slide-down-leave${gt}-slide-down-leave-active${St}-placement-bottomLeft,
|
|
|
&${gt}-slide-down-leave${gt}-slide-down-leave-active${St}-placement-bottom,
|
|
|
&${gt}-slide-down-leave${gt}-slide-down-leave-active${St}-placement-bottomRight`]:{animationName:He.Uw},[`&${gt}-slide-up-leave${gt}-slide-up-leave-active${St}-placement-topLeft,
|
|
|
&${gt}-slide-up-leave${gt}-slide-up-leave-active${St}-placement-top,
|
|
|
&${gt}-slide-up-leave${gt}-slide-up-leave-active${St}-placement-topRight`]:{animationName:He.ly}})},(0,ve.ZP)(Oe,{colorBg:vt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${St} ${ft}`]:{position:"relative",margin:0},[`${ft}-submenu-popup`]:{position:"absolute",zIndex:it,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${St}, ${St}-menu-submenu`]:{[ft]:Object.assign(Object.assign({padding:Se,listStyleType:"none",backgroundColor:vt,backgroundClip:"padding-box",borderRadius:Oe.borderRadiusLG,outline:"none",boxShadow:Oe.boxShadowSecondary},(0,de.Qy)(Oe)),{[`${ft}-item-group-title`]:{padding:`${ct}px ${_t}px`,color:Oe.colorTextDescription,transition:`all ${tt}`},[`${ft}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ft}-item-icon`]:{minWidth:ke,marginInlineEnd:Oe.marginXS,fontSize:Oe.fontSizeSM},[`${ft}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${tt}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ft}-item, ${ft}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ct}px ${_t}px`,color:Oe.colorText,fontWeight:"normal",fontSize:ke,lineHeight:Oe.lineHeight,cursor:"pointer",transition:`all ${tt}`,borderRadius:Oe.borderRadiusSM,"&:hover, &-active":{backgroundColor:Oe.controlItemBgHover}},(0,de.Qy)(Oe)),{"&-selected":{color:Oe.colorPrimary,backgroundColor:Oe.controlItemBgActive,"&:hover, &-active":{backgroundColor:Oe.controlItemBgActiveHover}},"&-disabled":{color:Ue,cursor:"not-allowed","&:hover":{color:Ue,backgroundColor:vt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Oe.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:Oe.colorSplit},[`${St}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Oe.paddingXS,[`${St}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Oe.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${ft}-item-group-list`]:{margin:`0 ${Oe.marginXS}px`,padding:0,listStyle:"none"},[`${ft}-submenu-title`]:{paddingInlineEnd:_t+Oe.fontSizeSM},[`${ft}-submenu-vertical`]:{position:"relative"},[`${ft}-submenu${ft}-submenu-disabled ${St}-menu-submenu-title`]:{[`&, ${St}-menu-submenu-arrow-icon`]:{color:Ue,backgroundColor:vt,cursor:"not-allowed"}},[`${ft}-submenu-selected ${St}-menu-submenu-title`]:{color:Oe.colorPrimary}})}},[(0,He.oN)(Oe,"slide-up"),(0,He.oN)(Oe,"slide-down"),(0,Be.Fm)(Oe,"move-up"),(0,Be.Fm)(Oe,"move-down"),(0,Ve._y)(Oe,"zoom-big")]]};var ot=(0,we.Z)("Dropdown",(Oe,St)=>{let{rootPrefixCls:ft}=St;const{marginXXS:it,sizePopupArrow:Je,controlHeight:Le,fontSize:gt,lineHeight:qt,paddingXXS:tt,componentCls:ct,borderRadiusLG:ke}=Oe,Se=(Le-gt*qt)/2,{dropdownArrowOffset:Ue}=(0,ve.fS)({contentRadius:ke}),je=(0,Ee.TS)(Oe,{menuCls:`${ct}-menu`,rootPrefixCls:ft,dropdownArrowDistance:Je/2+it,dropdownArrowOffset:Ue,dropdownPaddingVertical:Se,dropdownEdgeChildPadding:tt});return[Ie(je),me(je)]},Oe=>({zIndexPopup:Oe.zIndexPopupBase+50}))},32983:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return tt}});var de=se(94184),He=se.n(de),Be=se(67294),Ve=se(53124),ve=se(10110),we=se(84780),Ee=se(46605),me=()=>{const[,ct]=(0,Ee.Z)(),Se=new we.C(ct.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Be.createElement("svg",{style:Se,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{fill:"none",fillRule:"evenodd"},Be.createElement("g",{transform:"translate(24 31.67)"},Be.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Be.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"}),Be.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)"}),Be.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"}),Be.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"})),Be.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"}),Be.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Be.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Be.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ot=()=>{const[,ct]=(0,Ee.Z)(),{colorFill:ke,colorFillTertiary:Se,colorFillQuaternary:Ue,colorBgContainer:je}=ct,{borderColor:_t,shadowColor:vt,contentColor:kt}=(0,Be.useMemo)(()=>({borderColor:new we.C(ke).onBackground(je).toHexShortString(),shadowColor:new we.C(Se).onBackground(je).toHexShortString(),contentColor:new we.C(Ue).onBackground(je).toHexShortString()}),[ke,Se,Ue,je]);return Be.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Be.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Be.createElement("ellipse",{fill:vt,cx:"32",cy:"33",rx:"32",ry:"7"}),Be.createElement("g",{fillRule:"nonzero",stroke:_t},Be.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"}),Be.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:kt}))))},Oe=se(67968),St=se(45503);const ft=ct=>{const{componentCls:ke,margin:Se,marginXS:Ue,marginXL:je,fontSize:_t,lineHeight:vt}=ct;return{[ke]:{marginInline:Ue,fontSize:_t,lineHeight:vt,textAlign:"center",[`${ke}-image`]:{height:ct.emptyImgHeight,marginBottom:Ue,opacity:ct.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${ke}-description`]:{color:ct.colorText},[`${ke}-footer`]:{marginTop:Se},"&-normal":{marginBlock:je,color:ct.colorTextDisabled,[`${ke}-description`]:{color:ct.colorTextDisabled},[`${ke}-image`]:{height:ct.emptyImgHeightMD}},"&-small":{marginBlock:Ue,color:ct.colorTextDisabled,[`${ke}-image`]:{height:ct.emptyImgHeightSM}}}}};var it=(0,Oe.Z)("Empty",ct=>{const{componentCls:ke,controlHeightLG:Se}=ct,Ue=(0,St.TS)(ct,{emptyImgCls:`${ke}-img`,emptyImgHeight:Se*2.5,emptyImgHeightMD:Se,emptyImgHeightSM:Se*.875});return[ft(Ue)]}),Je=function(ct,ke){var Se={};for(var Ue in ct)Object.prototype.hasOwnProperty.call(ct,Ue)&&ke.indexOf(Ue)<0&&(Se[Ue]=ct[Ue]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ue=Object.getOwnPropertySymbols(ct);je<Ue.length;je++)ke.indexOf(Ue[je])<0&&Object.prototype.propertyIsEnumerable.call(ct,Ue[je])&&(Se[Ue[je]]=ct[Ue[je]]);return Se};const Le=Be.createElement(me,null),gt=Be.createElement(ot,null),qt=ct=>{var{className:ke,rootClassName:Se,prefixCls:Ue,image:je=Le,description:_t,children:vt,imageStyle:kt,style:Xe}=ct,Kt=Je(ct,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Ot,direction:bn,empty:Nt}=Be.useContext(Ve.E_),sn=Ot("empty",Ue),[Cn,or]=it(sn),[Qe]=(0,ve.Z)("Empty"),Ce=typeof _t!="undefined"?_t:Qe==null?void 0:Qe.description,ht=typeof Ce=="string"?Ce:"empty";let Ut=null;return typeof je=="string"?Ut=Be.createElement("img",{alt:ht,src:je}):Ut=je,Cn(Be.createElement("div",Object.assign({className:He()(or,sn,Nt==null?void 0:Nt.className,{[`${sn}-normal`]:je===gt,[`${sn}-rtl`]:bn==="rtl"},ke,Se),style:Object.assign(Object.assign({},Nt==null?void 0:Nt.style),Xe)},Kt),Be.createElement("div",{className:`${sn}-image`,style:kt},Ut),Ce&&Be.createElement("div",{className:`${sn}-description`},Ce),vt&&Be.createElement("div",{className:`${sn}-footer`},vt)))};qt.PRESENTED_IMAGE_DEFAULT=Le,qt.PRESENTED_IMAGE_SIMPLE=gt;var tt=qt},22150:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return Vt}});var de=se(74902),He=se(94184),Be=se.n(He),Ve=se(38379),ve=se(67294),we=se(33603),Ee=se(65223);function xe(We){const[pt,zt]=ve.useState(We);return ve.useEffect(()=>{const Bt=setTimeout(()=>{zt(We)},We.length?0:10);return()=>{clearTimeout(Bt)}},[We]),pt}var me=se(14747),Ie=se(50438),ot=se(33507),Oe=se(45503),St=se(67968),it=We=>{const{componentCls:pt}=We,zt=`${pt}-show-help`,Bt=`${pt}-show-help-item`;return{[zt]:{transition:`opacity ${We.motionDurationSlow} ${We.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Bt]:{overflow:"hidden",transition:`height ${We.motionDurationSlow} ${We.motionEaseInOut},
|
|
|
opacity ${We.motionDurationSlow} ${We.motionEaseInOut},
|
|
|
transform ${We.motionDurationSlow} ${We.motionEaseInOut} !important`,[`&${Bt}-appear, &${Bt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Bt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Je=We=>({legend:{display:"block",width:"100%",marginBottom:We.marginLG,padding:0,color:We.colorTextDescription,fontSize:We.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${We.lineWidth}px ${We.lineType} ${We.colorBorder}`},label:{fontSize:We.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 ${We.controlOutlineWidth}px ${We.controlOutline}`},output:{display:"block",paddingTop:15,color:We.colorText,fontSize:We.fontSize,lineHeight:We.lineHeight}}),Le=(We,pt)=>{const{formItemCls:zt}=We;return{[zt]:{[`${zt}-label > label`]:{height:pt},[`${zt}-control-input`]:{minHeight:pt}}}},gt=We=>{const{componentCls:pt}=We;return{[We.componentCls]:Object.assign(Object.assign(Object.assign({},(0,me.Wf)(We)),Je(We)),{[`${pt}-text`]:{display:"inline-block",paddingInlineEnd:We.paddingSM},"&-small":Object.assign({},Le(We,We.controlHeightSM)),"&-large":Object.assign({},Le(We,We.controlHeightLG))})}},qt=We=>{const{formItemCls:pt,iconCls:zt,componentCls:Bt,rootPrefixCls:en,labelRequiredMarkColor:nn,labelColor:jn,labelFontSize:Lr,labelHeight:rr,labelColonMarginInlineStart:tr,labelColonMarginInlineEnd:dr,itemMarginBottom:fr}=We;return{[pt]:Object.assign(Object.assign({},(0,me.Wf)(We)),{marginBottom:fr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${en}-row`]:{display:"none"},"&-has-warning":{[`${pt}-split`]:{color:We.colorError}},"&-has-error":{[`${pt}-split`]:{color:We.colorWarning}},[`${pt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${We.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:rr,color:jn,fontSize:Lr,[`> ${zt}`]:{fontSize:We.fontSize,verticalAlign:"top"},[`&${pt}-required:not(${pt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:We.marginXXS,color:nn,fontSize:We.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Bt}-hide-required-mark &`]:{display:"none"}},[`${pt}-optional`]:{display:"inline-block",marginInlineStart:We.marginXXS,color:We.colorTextDescription,[`${Bt}-hide-required-mark &`]:{display:"none"}},[`${pt}-tooltip`]:{color:We.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:We.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:tr,marginInlineEnd:dr},[`&${pt}-no-colon::after`]:{content:'"\\a0"'}}},[`${pt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${en}-col-'"]):not([class*="' ${en}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:We.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[pt]:{"&-explain, &-extra":{clear:"both",color:We.colorTextDescription,fontSize:We.fontSize,lineHeight:We.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:We.controlHeightSM,transition:`color ${We.motionDurationMid} ${We.motionEaseOut}`},"&-explain":{"&-error":{color:We.colorError},"&-warning":{color:We.colorWarning}}},[`&-with-help ${pt}-explain`]:{height:"auto",opacity:1},[`${pt}-feedback-icon`]:{fontSize:We.fontSize,textAlign:"center",visibility:"visible",animationName:Ie.kr,animationDuration:We.motionDurationMid,animationTimingFunction:We.motionEaseOutBack,pointerEvents:"none","&-success":{color:We.colorSuccess},"&-error":{color:We.colorError},"&-warning":{color:We.colorWarning},"&-validating":{color:We.colorPrimary}}})}},tt=We=>{const{componentCls:pt,formItemCls:zt}=We;return{[`${pt}-horizontal`]:{[`${zt}-label`]:{flexGrow:0},[`${zt}-control`]:{flex:"1 1 0",minWidth:0},[`${zt}-label[class$='-24'], ${zt}-label[class*='-24 ']`]:{[`& + ${zt}-control`]:{minWidth:"unset"}}}}},ct=We=>{const{componentCls:pt,formItemCls:zt}=We;return{[`${pt}-inline`]:{display:"flex",flexWrap:"wrap",[zt]:{flex:"none",marginInlineEnd:We.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${zt}-label,
|
|
|
> ${zt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${zt}-label`]:{flex:"none"},[`${pt}-text`]:{display:"inline-block"},[`${zt}-has-feedback`]:{display:"inline-block"}}}}},ke=We=>({padding:We.verticalLabelPadding,margin:We.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Se=We=>{const{componentCls:pt,formItemCls:zt,rootPrefixCls:Bt}=We;return{[`${zt} ${zt}-label`]:ke(We),[pt]:{[zt]:{flexWrap:"wrap",[`${zt}-label, ${zt}-control`]:{[`&:not([class*=" ${Bt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ue=We=>{const{componentCls:pt,formItemCls:zt,rootPrefixCls:Bt}=We;return{[`${pt}-vertical`]:{[zt]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${pt}-item-control`]:{width:"100%"}}},[`${pt}-vertical ${zt}-label,
|
|
|
.${Bt}-col-24${zt}-label,
|
|
|
.${Bt}-col-xl-24${zt}-label`]:ke(We),[`@media (max-width: ${We.screenXSMax}px)`]:[Se(We),{[pt]:{[`.${Bt}-col-xs-24${zt}-label`]:ke(We)}}],[`@media (max-width: ${We.screenSMMax}px)`]:{[pt]:{[`.${Bt}-col-sm-24${zt}-label`]:ke(We)}},[`@media (max-width: ${We.screenMDMax}px)`]:{[pt]:{[`.${Bt}-col-md-24${zt}-label`]:ke(We)}},[`@media (max-width: ${We.screenLGMax}px)`]:{[pt]:{[`.${Bt}-col-lg-24${zt}-label`]:ke(We)}}}},je=(We,pt)=>(0,Oe.TS)(We,{formItemCls:`${We.componentCls}-item`,rootPrefixCls:pt});var _t=(0,St.Z)("Form",(We,pt)=>{let{rootPrefixCls:zt}=pt;const Bt=je(We,zt);return[gt(Bt),qt(Bt),it(Bt),tt(Bt),ct(Bt),Ue(Bt),(0,ot.Z)(Bt),Ie.kr]},We=>({labelRequiredMarkColor:We.colorError,labelColor:We.colorTextHeading,labelFontSize:We.fontSize,labelHeight:We.controlHeight,labelColonMarginInlineStart:We.marginXXS/2,labelColonMarginInlineEnd:We.marginXS,itemMarginBottom:We.marginLG,verticalLabelPadding:`0 0 ${We.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const vt=[];function kt(We,pt,zt){let Bt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof We=="string"?We:`${pt}-${Bt}`,error:We,errorStatus:zt}}var Kt=We=>{let{help:pt,helpStatus:zt,errors:Bt=vt,warnings:en=vt,className:nn,fieldId:jn,onVisibleChanged:Lr}=We;const{prefixCls:rr}=ve.useContext(Ee.Rk),tr=`${rr}-item-explain`,[,dr]=_t(rr),fr=(0,ve.useMemo)(()=>(0,we.Z)(rr),[rr]),mt=xe(Bt),st=xe(en),Ct=ve.useMemo(()=>pt!=null?[kt(pt,"help",zt)]:[].concat((0,de.Z)(mt.map((Bn,hn)=>kt(Bn,"error","error",hn))),(0,de.Z)(st.map((Bn,hn)=>kt(Bn,"warning","warning",hn)))),[pt,zt,mt,st]),fn={};return jn&&(fn.id=`${jn}_help`),ve.createElement(Ve.default,{motionDeadline:fr.motionDeadline,motionName:`${rr}-show-help`,visible:!!Ct.length,onVisibleChanged:Lr},Bn=>{const{className:hn,style:vn}=Bn;return ve.createElement("div",Object.assign({},fn,{className:Be()(tr,hn,nn,dr),style:vn,role:"alert"}),ve.createElement(Ve.CSSMotionList,Object.assign({keys:Ct},(0,we.Z)(rr),{motionName:`${rr}-show-help-item`,component:!1}),xn=>{const{key:Nn,error:hr,errorStatus:tn,className:Qr,style:Ur}=xn;return ve.createElement("div",{key:Nn,className:Be()(Qr,{[`${tr}-${tn}`]:tn}),style:Ur},hr)}))})},Ot=se(58083),bn=se(53124),Nt=se(98866),sn=se(97647),Cn=se(98675),or=se(17423);const Qe=["parentNode"],Ce="form_item";function ht(We){return We===void 0||We===!1?[]:Array.isArray(We)?We:[We]}function Ut(We,pt){if(!We.length)return;const zt=We.join("_");return pt?`${pt}_${zt}`:Qe.includes(zt)?`${Ce}_${zt}`:zt}function Yt(We,pt,zt,Bt,en,nn){let jn=Bt;return nn!==void 0?jn=nn:zt.validating?jn="validating":We.length?jn="error":pt.length?jn="warning":(zt.touched||en&&zt.validated)&&(jn="success"),jn}function Ge(We){return ht(We).join("_")}function rt(We){const[pt]=(0,Ot.useForm)(),zt=ve.useRef({}),Bt=ve.useMemo(()=>We!=null?We:Object.assign(Object.assign({},pt),{__INTERNAL__:{itemRef:en=>nn=>{const jn=Ge(en);nn?zt.current[jn]=nn:delete zt.current[jn]}},scrollToField:function(en){let nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const jn=ht(en),Lr=Ut(jn,Bt.__INTERNAL__.name),rr=Lr?document.getElementById(Lr):null;rr&&(0,or.Z)(rr,Object.assign({scrollMode:"if-needed",block:"nearest"},nn))},getFieldInstance:en=>{const nn=Ge(en);return zt.current[nn]}}),[We,pt]);return[Bt]}var jt=se(37920),_n=function(We,pt){var zt={};for(var Bt in We)Object.prototype.hasOwnProperty.call(We,Bt)&&pt.indexOf(Bt)<0&&(zt[Bt]=We[Bt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Bt=Object.getOwnPropertySymbols(We);en<Bt.length;en++)pt.indexOf(Bt[en])<0&&Object.prototype.propertyIsEnumerable.call(We,Bt[en])&&(zt[Bt[en]]=We[Bt[en]]);return zt};const rn=(We,pt)=>{const zt=ve.useContext(Nt.Z),{getPrefixCls:Bt,direction:en,form:nn}=ve.useContext(bn.E_),{prefixCls:jn,className:Lr,rootClassName:rr,size:tr,disabled:dr=zt,form:fr,colon:mt,labelAlign:st,labelWrap:Ct,labelCol:fn,wrapperCol:Bn,hideRequiredMark:hn,layout:vn="horizontal",scrollToFirstError:xn,requiredMark:Nn,onFinishFailed:hr,name:tn,style:Qr,feedbackIcons:Ur}=We,$i=_n(We,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ai=(0,Cn.Z)(tr),gi=ve.useContext(jt.Z),qi=(0,ve.useMemo)(()=>Nn!==void 0?Nn:nn&&nn.requiredMark!==void 0?nn.requiredMark:!hn,[hn,Nn,nn]),xi=mt!=null?mt:nn==null?void 0:nn.colon,li=Bt("form",jn),[Ni,Gi]=_t(li),qr=Be()(li,`${li}-${vn}`,{[`${li}-hide-required-mark`]:qi===!1,[`${li}-rtl`]:en==="rtl",[`${li}-${Ai}`]:Ai},Gi,nn==null?void 0:nn.className,Lr,rr),[vi]=rt(fr),{__INTERNAL__:Zi}=vi;Zi.name=tn;const la=(0,ve.useMemo)(()=>({name:tn,labelAlign:st,labelCol:fn,labelWrap:Ct,wrapperCol:Bn,vertical:vn==="vertical",colon:xi,requiredMark:qi,itemRef:Zi.itemRef,form:vi,feedbackIcons:Ur}),[tn,st,fn,Bn,vn,xi,qi,vi,Ur]);ve.useImperativeHandle(pt,()=>vi);const ta=(Et,wt)=>{if(Et){let Qt={block:"nearest"};typeof Et=="object"&&(Qt=Et),vi.scrollToField(wt,Qt)}},ii=Et=>{if(hr==null||hr(Et),Et.errorFields.length){const wt=Et.errorFields[0].name;if(xn!==void 0){ta(xn,wt);return}nn&&nn.scrollToFirstError!==void 0&&ta(nn.scrollToFirstError,wt)}};return Ni(ve.createElement(Nt.n,{disabled:dr},ve.createElement(sn.q,{size:Ai},ve.createElement(Ee.RV,Object.assign({},{validateMessages:gi}),ve.createElement(Ee.q3.Provider,{value:la},ve.createElement(Ot.default,Object.assign({id:tn},$i,{name:tn,onFinishFailed:ii,form:vi,style:Object.assign(Object.assign({},nn==null?void 0:nn.style),Qr),className:qr})))))))};var Zt=ve.forwardRef(rn),yn=se(9475),ln=se(17799),Ae=se(96159),ue=se(37419);function le(We){if(typeof We=="function")return We;const pt=(0,ue.Z)(We);return pt.length<=1?pt[0]:pt}const pe=()=>{const{status:We,errors:pt=[],warnings:zt=[]}=(0,ve.useContext)(Ee.aM);return{status:We,errors:pt,warnings:zt}};pe.Context=Ee.aM;var he=pe,oe=se(96523);function Te(We){const[pt,zt]=ve.useState(We),Bt=(0,ve.useRef)(null),en=(0,ve.useRef)([]),nn=(0,ve.useRef)(!1);ve.useEffect(()=>(nn.current=!1,()=>{nn.current=!0,oe.Z.cancel(Bt.current),Bt.current=null}),[]);function jn(Lr){nn.current||(Bt.current===null&&(en.current=[],Bt.current=(0,oe.Z)(()=>{Bt.current=null,zt(rr=>{let tr=rr;return en.current.forEach(dr=>{tr=dr(tr)}),tr})})),en.current.push(Lr))}return[pt,jn]}function Ye(){const{itemRef:We}=ve.useContext(Ee.q3),pt=ve.useRef({});function zt(Bt,en){const nn=en&&typeof en=="object"&&en.ref,jn=Bt.join("_");return(pt.current.name!==jn||pt.current.originRef!==nn)&&(pt.current.name=jn,pt.current.originRef=nn,pt.current.ref=(0,ln.sQ)(We(Bt),nn)),pt.current.ref}return zt}var Lt=se(48130),Rt=se(14075),Ft=se(10366),Jt=se(92820),Xt=se(21584);const Hn=We=>{const{formItemCls:pt}=We;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${pt}-control`]:{display:"flex"}}}};var Rn=(0,St.b)(["Form","item-item"],(We,pt)=>{let{rootPrefixCls:zt}=pt;const Bt=je(We,zt);return[Hn(Bt)]}),dn=We=>{const{prefixCls:pt,status:zt,wrapperCol:Bt,children:en,errors:nn,warnings:jn,_internalItemRender:Lr,extra:rr,help:tr,fieldId:dr,marginBottom:fr,onErrorVisibleChanged:mt}=We,st=`${pt}-item`,Ct=ve.useContext(Ee.q3),fn=Bt||Ct.wrapperCol||{},Bn=Be()(`${st}-control`,fn.className),hn=ve.useMemo(()=>Object.assign({},Ct),[Ct]);delete hn.labelCol,delete hn.wrapperCol;const vn=ve.createElement("div",{className:`${st}-control-input`},ve.createElement("div",{className:`${st}-control-input-content`},en)),xn=ve.useMemo(()=>({prefixCls:pt,status:zt}),[pt,zt]),Nn=fr!==null||nn.length||jn.length?ve.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},ve.createElement(Ee.Rk.Provider,{value:xn},ve.createElement(Kt,{fieldId:dr,errors:nn,warnings:jn,help:tr,helpStatus:zt,className:`${st}-explain-connected`,onVisibleChanged:mt})),!!fr&&ve.createElement("div",{style:{width:0,height:fr}})):null,hr={};dr&&(hr.id=`${dr}_extra`);const tn=rr?ve.createElement("div",Object.assign({},hr,{className:`${st}-extra`}),rr):null,Qr=Lr&&Lr.mark==="pro_table_render"&&Lr.render?Lr.render(We,{input:vn,errorList:Nn,extra:tn}):ve.createElement(ve.Fragment,null,vn,Nn,tn);return ve.createElement(Ee.q3.Provider,{value:hn},ve.createElement(Xt.Z,Object.assign({},fn,{className:Bn}),Qr),ve.createElement(Rn,{prefixCls:pt}))},cr=se(17663),Mr=se(24457),at=se(10110),Ht=se(83062),Fn=function(We,pt){var zt={};for(var Bt in We)Object.prototype.hasOwnProperty.call(We,Bt)&&pt.indexOf(Bt)<0&&(zt[Bt]=We[Bt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Bt=Object.getOwnPropertySymbols(We);en<Bt.length;en++)pt.indexOf(Bt[en])<0&&Object.prototype.propertyIsEnumerable.call(We,Bt[en])&&(zt[Bt[en]]=We[Bt[en]]);return zt};function er(We){return We?typeof We=="object"&&!ve.isValidElement(We)?We:{title:We}:null}var Sr=We=>{let{prefixCls:pt,label:zt,htmlFor:Bt,labelCol:en,labelAlign:nn,colon:jn,required:Lr,requiredMark:rr,tooltip:tr}=We;var dr;const[fr]=(0,at.Z)("Form"),{vertical:mt,labelAlign:st,labelCol:Ct,labelWrap:fn,colon:Bn}=ve.useContext(Ee.q3);if(!zt)return null;const hn=en||Ct||{},vn=nn||st,xn=`${pt}-item-label`,Nn=Be()(xn,vn==="left"&&`${xn}-left`,hn.className,{[`${xn}-wrap`]:!!fn});let hr=zt;const tn=jn===!0||Bn!==!1&&jn!==!1;tn&&!mt&&typeof zt=="string"&&zt.trim()!==""&&(hr=zt.replace(/[:|:]\s*$/,""));const Ur=er(tr);if(Ur){const{icon:qi=ve.createElement(cr.Z,null)}=Ur,xi=Fn(Ur,["icon"]),li=ve.createElement(Ht.Z,Object.assign({},xi),ve.cloneElement(qi,{className:`${pt}-item-tooltip`,title:""}));hr=ve.createElement(ve.Fragment,null,hr,li)}const $i=rr==="optional",Ai=typeof rr=="function";Ai?hr=rr(hr,{required:!!Lr}):$i&&!Lr&&(hr=ve.createElement(ve.Fragment,null,hr,ve.createElement("span",{className:`${pt}-item-optional`,title:""},(fr==null?void 0:fr.optional)||((dr=Mr.Z.Form)===null||dr===void 0?void 0:dr.optional))));const gi=Be()({[`${pt}-item-required`]:Lr,[`${pt}-item-required-mark-optional`]:$i||Ai,[`${pt}-item-no-colon`]:!tn});return ve.createElement(Xt.Z,Object.assign({},hn,{className:Nn}),ve.createElement("label",{htmlFor:Bt,className:gi,title:typeof zt=="string"?zt:""},hr))},Tr=se(87725),Er=se(16646),Or=se(87995),Vr=se(3407);const ur={success:Tr.Z,warning:Or.Z,error:Er.Z,validating:Vr.Z};function si(We){let{children:pt,errors:zt,warnings:Bt,hasFeedback:en,validateStatus:nn,prefixCls:jn,meta:Lr,noStyle:rr}=We;const tr=`${jn}-item`,{feedbackIcons:dr}=ve.useContext(Ee.q3),fr=Yt(zt,Bt,Lr,null,!!en,nn),{isFormItemInput:mt,status:st}=ve.useContext(Ee.aM),Ct=ve.useMemo(()=>{var fn;let Bn;if(en){const xn=en!==!0&&en.icons||dr,Nn=fr&&((fn=xn==null?void 0:xn({status:fr,errors:zt,warnings:Bt}))===null||fn===void 0?void 0:fn[fr]),hr=fr&&ur[fr];Bn=Nn!==!1&&hr?ve.createElement("span",{className:Be()(`${tr}-feedback-icon`,`${tr}-feedback-icon-${fr}`)},Nn||ve.createElement(hr,null)):null}let hn=!0,vn=fr||"";return rr&&(hn=mt,vn=(fr!=null?fr:st)||""),{status:vn,errors:zt,warnings:Bt,hasFeedback:!!en,feedbackIcon:Bn,isFormItemInput:hn}},[fr,en,rr,mt,st]);return ve.createElement(Ee.aM.Provider,{value:Ct},pt)}var Li=function(We,pt){var zt={};for(var Bt in We)Object.prototype.hasOwnProperty.call(We,Bt)&&pt.indexOf(Bt)<0&&(zt[Bt]=We[Bt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Bt=Object.getOwnPropertySymbols(We);en<Bt.length;en++)pt.indexOf(Bt[en])<0&&Object.prototype.propertyIsEnumerable.call(We,Bt[en])&&(zt[Bt[en]]=We[Bt[en]]);return zt};function Bi(We){const{prefixCls:pt,className:zt,rootClassName:Bt,style:en,help:nn,errors:jn,warnings:Lr,validateStatus:rr,meta:tr,hasFeedback:dr,hidden:fr,children:mt,fieldId:st,required:Ct,isRequired:fn,onSubItemMetaChange:Bn}=We,hn=Li(We,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),vn=`${pt}-item`,{requiredMark:xn}=ve.useContext(Ee.q3),Nn=ve.useRef(null),hr=xe(jn),tn=xe(Lr),Qr=nn!=null,Ur=!!(Qr||jn.length||Lr.length),$i=!!Nn.current&&(0,Lt.Z)(Nn.current),[Ai,gi]=ve.useState(null);(0,Rt.Z)(()=>{if(Ur&&Nn.current){const Gi=getComputedStyle(Nn.current);gi(parseInt(Gi.marginBottom,10))}},[Ur,$i]);const qi=Gi=>{Gi||gi(null)},li=function(){let Gi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const qr=Gi?hr:tr.errors,vi=Gi?tn:tr.warnings;return Yt(qr,vi,tr,"",!!dr,rr)}(),Ni=Be()(vn,zt,Bt,{[`${vn}-with-help`]:Qr||hr.length||tn.length,[`${vn}-has-feedback`]:li&&dr,[`${vn}-has-success`]:li==="success",[`${vn}-has-warning`]:li==="warning",[`${vn}-has-error`]:li==="error",[`${vn}-is-validating`]:li==="validating",[`${vn}-hidden`]:fr});return ve.createElement("div",{className:Ni,style:en,ref:Nn},ve.createElement(Jt.Z,Object.assign({className:`${vn}-row`},(0,Ft.Z)(hn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),ve.createElement(Sr,Object.assign({htmlFor:st},We,{requiredMark:xn,required:Ct!=null?Ct:fn,prefixCls:pt})),ve.createElement(dn,Object.assign({},We,tr,{errors:hr,warnings:tn,prefixCls:pt,status:li,help:nn,marginBottom:Ai,onErrorVisibleChanged:qi}),ve.createElement(Ee.qI.Provider,{value:Bn},ve.createElement(si,{prefixCls:pt,meta:tr,errors:tr.errors,warnings:tr.warnings,hasFeedback:dr,validateStatus:li},mt)))),!!Ai&&ve.createElement("div",{className:`${vn}-margin-offset`,style:{marginBottom:-Ai}}))}const Hi="__SPLIT__",ri=null,yt=ve.memo(We=>{let{children:pt}=We;return pt},(We,pt)=>We.value===pt.value&&We.update===pt.update&&We.childProps.length===pt.childProps.length&&We.childProps.every((zt,Bt)=>zt===pt.childProps[Bt]));function Mn(We){return We!=null}function An(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Dn(We){const{name:pt,noStyle:zt,className:Bt,dependencies:en,prefixCls:nn,shouldUpdate:jn,rules:Lr,children:rr,required:tr,label:dr,messageVariables:fr,trigger:mt="onChange",validateTrigger:st,hidden:Ct,help:fn}=We,{getPrefixCls:Bn}=ve.useContext(bn.E_),{name:hn}=ve.useContext(Ee.q3),vn=le(rr),xn=typeof vn=="function",Nn=ve.useContext(Ee.qI),{validateTrigger:hr}=ve.useContext(Ot.FieldContext),tn=st!==void 0?st:hr,Qr=Mn(pt),Ur=Bn("form",nn),[$i,Ai]=_t(Ur),gi=ve.useContext(Ot.ListContext),qi=ve.useRef(),[xi,li]=Te({}),[Ni,Gi]=(0,yn.Z)(()=>An()),qr=wt=>{const Qt=gi==null?void 0:gi.getKey(wt.name);if(Gi(wt.destroy?An():wt,!0),zt&&fn!==!1&&Nn){let mn=wt.name;if(wt.destroy)mn=qi.current||mn;else if(Qt!==void 0){const[On,vr]=Qt;mn=[On].concat((0,de.Z)(vr)),qi.current=mn}Nn(wt,mn)}},vi=(wt,Qt)=>{li(mn=>{const On=Object.assign({},mn),Ir=[].concat((0,de.Z)(wt.name.slice(0,-1)),(0,de.Z)(Qt)).join(Hi);return wt.destroy?delete On[Ir]:On[Ir]=wt,On})},[Zi,la]=ve.useMemo(()=>{const wt=(0,de.Z)(Ni.errors),Qt=(0,de.Z)(Ni.warnings);return Object.values(xi).forEach(mn=>{wt.push.apply(wt,(0,de.Z)(mn.errors||[])),Qt.push.apply(Qt,(0,de.Z)(mn.warnings||[]))}),[wt,Qt]},[xi,Ni.errors,Ni.warnings]),ta=Ye();function ii(wt,Qt,mn){return zt&&!Ct?ve.createElement(si,{prefixCls:Ur,hasFeedback:We.hasFeedback,validateStatus:We.validateStatus,meta:Ni,errors:Zi,warnings:la,noStyle:!0},wt):ve.createElement(Bi,Object.assign({key:"row"},We,{className:Be()(Bt,Ai),prefixCls:Ur,fieldId:Qt,isRequired:mn,errors:Zi,warnings:la,meta:Ni,onSubItemMetaChange:vi}),wt)}if(!Qr&&!xn&&!en)return $i(ii(vn));let Et={};return typeof dr=="string"?Et.label=dr:pt&&(Et.label=String(pt)),fr&&(Et=Object.assign(Object.assign({},Et),fr)),$i(ve.createElement(Ot.Field,Object.assign({},We,{messageVariables:Et,trigger:mt,validateTrigger:tn,onMetaChange:qr}),(wt,Qt,mn)=>{const On=ht(pt).length&&Qt?Qt.name:[],vr=Ut(On,hn),Ir=tr!==void 0?tr:!!(Lr&&Lr.some(Hr=>{if(Hr&&typeof Hr=="object"&&Hr.required&&!Hr.warningOnly)return!0;if(typeof Hr=="function"){const ni=Hr(mn);return ni&&ni.required&&!ni.warningOnly}return!1})),Wr=Object.assign({},wt);let Gr=null;if(Array.isArray(vn)&&Qr)Gr=vn;else if(!(xn&&(!(jn||en)||Qr))){if(!(en&&!xn&&!Qr))if((0,Ae.l$)(vn)){const Hr=Object.assign(Object.assign({},vn.props),Wr);if(Hr.id||(Hr.id=vr),fn||Zi.length>0||la.length>0||We.extra){const Ar=[];(fn||Zi.length>0)&&Ar.push(`${vr}_help`),We.extra&&Ar.push(`${vr}_extra`),Hr["aria-describedby"]=Ar.join(" ")}Zi.length>0&&(Hr["aria-invalid"]="true"),Ir&&(Hr["aria-required"]="true"),(0,ln.Yr)(vn)&&(Hr.ref=ta(On,vn)),new Set([].concat((0,de.Z)(ht(mt)),(0,de.Z)(ht(tn)))).forEach(Ar=>{Hr[Ar]=function(){for(var pi,Ti,Ei,De,Fe,ze=arguments.length,Ze=new Array(ze),nt=0;nt<ze;nt++)Ze[nt]=arguments[nt];(Ei=Wr[Ar])===null||Ei===void 0||(pi=Ei).call.apply(pi,[Wr].concat(Ze)),(Fe=(De=vn.props)[Ar])===null||Fe===void 0||(Ti=Fe).call.apply(Ti,[De].concat(Ze))}});const yi=[Hr["aria-required"],Hr["aria-invalid"],Hr["aria-describedby"]];Gr=ve.createElement(yt,{value:Wr[We.valuePropName||"value"],update:vn,childProps:yi},(0,Ae.Tm)(vn,Hr))}else xn&&(jn||en)&&!Qr?Gr=vn(mn):Gr=vn}return ii(Gr,vr,Ir)}))}const lr=Dn;lr.useStatus=he;var qn=lr,pr=function(We,pt){var zt={};for(var Bt in We)Object.prototype.hasOwnProperty.call(We,Bt)&&pt.indexOf(Bt)<0&&(zt[Bt]=We[Bt]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,Bt=Object.getOwnPropertySymbols(We);en<Bt.length;en++)pt.indexOf(Bt[en])<0&&Object.prototype.propertyIsEnumerable.call(We,Bt[en])&&(zt[Bt[en]]=We[Bt[en]]);return zt},qe=We=>{var{prefixCls:pt,children:zt}=We,Bt=pr(We,["prefixCls","children"]);const{getPrefixCls:en}=ve.useContext(bn.E_),nn=en("form",pt),jn=ve.useMemo(()=>({prefixCls:nn,status:"error"}),[nn]);return ve.createElement(Ot.List,Object.assign({},Bt),(Lr,rr,tr)=>ve.createElement(Ee.Rk.Provider,{value:jn},zt(Lr.map(dr=>Object.assign(Object.assign({},dr),{fieldKey:dr.key})),rr,{errors:tr.errors,warnings:tr.warnings})))};function ut(){const{form:We}=(0,ve.useContext)(Ee.q3);return We}const Dt=Zt;Dt.Item=qn,Dt.List=qe,Dt.ErrorList=Kt,Dt.useForm=rt,Dt.useFormInstance=ut,Dt.useWatch=Ot.useWatch,Dt.Provider=Ee.RV,Dt.create=()=>{};var Vt=Dt},31795:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return $n}});var de=se(42922),He=se(53978),Be=se(94184),Ve=se.n(Be),ve=se(87462),we=se(4942),Ee=se(71002),xe=se(97685),me=se(45987),Ie=se(15671),ot=se(43144);function Oe(){return typeof BigInt=="function"}function St(qe){return!qe&&qe!==0&&!Number.isNaN(qe)||!String(qe).trim()}function ft(qe){var ut=qe.trim(),Dt=ut.startsWith("-");Dt&&(ut=ut.slice(1)),ut=ut.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ut.startsWith(".")&&(ut="0".concat(ut));var Vt=ut||"0",We=Vt.split("."),pt=We[0]||"0",zt=We[1]||"0";pt==="0"&&zt==="0"&&(Dt=!1);var Bt=Dt?"-":"";return{negative:Dt,negativeStr:Bt,trimStr:Vt,integerStr:pt,decimalStr:zt,fullStr:"".concat(Bt).concat(Vt)}}function it(qe){var ut=String(qe);return!Number.isNaN(Number(ut))&&ut.includes("e")}function Je(qe){var ut=String(qe);if(it(qe)){var Dt=Number(ut.slice(ut.indexOf("e-")+2)),Vt=ut.match(/\.(\d+)/);return Vt!=null&&Vt[1]&&(Dt+=Vt[1].length),Dt}return ut.includes(".")&>(ut)?ut.length-ut.indexOf(".")-1:0}function Le(qe){var ut=String(qe);if(it(qe)){if(qe>Number.MAX_SAFE_INTEGER)return String(Oe()?BigInt(qe).toString():Number.MAX_SAFE_INTEGER);if(qe<Number.MIN_SAFE_INTEGER)return String(Oe()?BigInt(qe).toString():Number.MIN_SAFE_INTEGER);ut=qe.toFixed(Je(ut))}return ft(ut).fullStr}function gt(qe){return typeof qe=="number"?!Number.isNaN(qe):qe?/^\s*-?\d+(\.\d+)?\s*$/.test(qe)||/^\s*-?\d+\.\s*$/.test(qe)||/^\s*-?\.\d+\s*$/.test(qe):!1}var qt=function(){function qe(ut){if((0,Ie.Z)(this,qe),(0,we.Z)(this,"origin",""),(0,we.Z)(this,"negative",void 0),(0,we.Z)(this,"integer",void 0),(0,we.Z)(this,"decimal",void 0),(0,we.Z)(this,"decimalLen",void 0),(0,we.Z)(this,"empty",void 0),(0,we.Z)(this,"nan",void 0),St(ut)){this.empty=!0;return}if(this.origin=String(ut),ut==="-"||Number.isNaN(ut)){this.nan=!0;return}var Dt=ut;if(it(Dt)&&(Dt=Number(Dt)),Dt=typeof Dt=="string"?Dt:Le(Dt),gt(Dt)){var Vt=ft(Dt);this.negative=Vt.negative;var We=Vt.trimStr.split(".");this.integer=BigInt(We[0]);var pt=We[1]||"0";this.decimal=BigInt(pt),this.decimalLen=pt.length}else this.nan=!0}return(0,ot.Z)(qe,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Dt){var Vt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Dt,"0"));return BigInt(Vt)}},{key:"negate",value:function(){var Dt=new qe(this.toString());return Dt.negative=!Dt.negative,Dt}},{key:"cal",value:function(Dt,Vt,We){var pt=Math.max(this.getDecimalStr().length,Dt.getDecimalStr().length),zt=this.alignDecimal(pt),Bt=Dt.alignDecimal(pt),en=Vt(zt,Bt).toString(),nn=We(pt),jn=ft(en),Lr=jn.negativeStr,rr=jn.trimStr,tr="".concat(Lr).concat(rr.padStart(nn+1,"0"));return new qe("".concat(tr.slice(0,-nn),".").concat(tr.slice(-nn)))}},{key:"add",value:function(Dt){if(this.isInvalidate())return new qe(Dt);var Vt=new qe(Dt);return Vt.isInvalidate()?this:this.cal(Vt,function(We,pt){return We+pt},function(We){return We})}},{key:"multi",value:function(Dt){var Vt=new qe(Dt);return this.isInvalidate()||Vt.isInvalidate()?new qe(NaN):this.cal(Vt,function(We,pt){return We*pt},function(We){return We*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(Dt){return this.toString()===(Dt==null?void 0:Dt.toString())}},{key:"lessEquals",value:function(Dt){return this.add(Dt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Dt?this.isInvalidate()?"":ft("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),qe}(),tt=function(){function qe(ut){if((0,Ie.Z)(this,qe),(0,we.Z)(this,"origin",""),(0,we.Z)(this,"number",void 0),(0,we.Z)(this,"empty",void 0),St(ut)){this.empty=!0;return}this.origin=String(ut),this.number=Number(ut)}return(0,ot.Z)(qe,[{key:"negate",value:function(){return new qe(-this.toNumber())}},{key:"add",value:function(Dt){if(this.isInvalidate())return new qe(Dt);var Vt=Number(Dt);if(Number.isNaN(Vt))return this;var We=this.number+Vt;if(We>Number.MAX_SAFE_INTEGER)return new qe(Number.MAX_SAFE_INTEGER);if(We<Number.MIN_SAFE_INTEGER)return new qe(Number.MIN_SAFE_INTEGER);var pt=Math.max(Je(this.number),Je(Vt));return new qe(We.toFixed(pt))}},{key:"multi",value:function(Dt){var Vt=Number(Dt);if(this.isInvalidate()||Number.isNaN(Vt))return new qe(NaN);var We=this.number*Vt;if(We>Number.MAX_SAFE_INTEGER)return new qe(Number.MAX_SAFE_INTEGER);if(We<Number.MIN_SAFE_INTEGER)return new qe(Number.MIN_SAFE_INTEGER);var pt=Math.max(Je(this.number),Je(Vt));return new qe(We.toFixed(pt))}},{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(Dt){return this.toNumber()===(Dt==null?void 0:Dt.toNumber())}},{key:"lessEquals",value:function(Dt){return this.add(Dt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Dt?this.isInvalidate()?"":Le(this.number):this.origin}}]),qe}();function ct(qe){return Oe()?new qt(qe):new tt(qe)}function ke(qe,ut,Dt){var Vt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(qe==="")return"";var We=ft(qe),pt=We.negativeStr,zt=We.integerStr,Bt=We.decimalStr,en="".concat(ut).concat(Bt),nn="".concat(pt).concat(zt);if(Dt>=0){var jn=Number(Bt[Dt]);if(jn>=5&&!Vt){var Lr=ct(qe).add("".concat(pt,"0.").concat("0".repeat(Dt)).concat(10-jn));return ke(Lr.toString(),ut,Dt,Vt)}return Dt===0?nn:"".concat(nn).concat(ut).concat(Bt.padEnd(Dt,"0").slice(0,Dt))}return en===".0"?nn:"".concat(nn).concat(en)}var Se=ct,Ue=se(67656),je=se(67294);function _t(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var vt=_t()?je.useLayoutEffect:je.useEffect,kt=function(ut,Dt){var Vt=je.useRef(!0);vt(function(){return ut(Vt.current)},Dt),vt(function(){return Vt.current=!1,function(){Vt.current=!0}},[])},Xe=function(ut,Dt){kt(function(Vt){if(!Vt)return ut()},Dt)},Kt=kt,Ot=se(27183);function bn(qe,ut,Dt){var Vt=React.useRef({});return(!("value"in Vt.current)||Dt(Vt.current.condition,ut))&&(Vt.current.value=qe(),Vt.current.condition=ut),Vt.current.value}function Nt(qe,ut){typeof qe=="function"?qe(ut):(0,Ee.Z)(qe)==="object"&&qe&&"current"in qe&&(qe.current=ut)}function sn(){for(var qe=arguments.length,ut=new Array(qe),Dt=0;Dt<qe;Dt++)ut[Dt]=arguments[Dt];var Vt=ut.filter(function(We){return We});return Vt.length<=1?Vt[0]:function(We){ut.forEach(function(pt){Nt(pt,We)})}}function Cn(){for(var qe=arguments.length,ut=new Array(qe),Dt=0;Dt<qe;Dt++)ut[Dt]=arguments[Dt];return useMemo(function(){return sn.apply(void 0,ut)},ut,function(Vt,We){return Vt.length!==We.length||Vt.every(function(pt,zt){return pt!==We[zt]})})}function or(qe){var ut,Dt,Vt=isMemo(qe)?qe.type.type:qe.type;return!(typeof Vt=="function"&&!((ut=Vt.prototype)!==null&&ut!==void 0&&ut.render)||typeof qe=="function"&&!((Dt=qe.prototype)!==null&&Dt!==void 0&&Dt.render))}function Qe(qe){return!isValidElement(qe)||isFragment(qe)?!1:or(qe)}var Ce={},ht=[],Ut=function(ut){ht.push(ut)};function Yt(qe,ut){if(0)var Dt}function Ge(qe,ut){if(0)var Dt}function rt(){Ce={}}function jt(qe,ut,Dt){!ut&&!Ce[Dt]&&(qe(!1,Dt),Ce[Dt]=!0)}function _n(qe,ut){jt(Yt,qe,ut)}function rn(qe,ut){jt(Ge,qe,ut)}_n.preMessage=Ut,_n.resetWarned=rt,_n.noteOnce=rn;var $t=_n;function Zt(qe,ut){var Dt=(0,je.useRef)(null);function Vt(){try{var pt=qe.selectionStart,zt=qe.selectionEnd,Bt=qe.value,en=Bt.substring(0,pt),nn=Bt.substring(zt);Dt.current={start:pt,end:zt,value:Bt,beforeTxt:en,afterTxt:nn}}catch(jn){}}function We(){if(qe&&Dt.current&&ut)try{var pt=qe.value,zt=Dt.current,Bt=zt.beforeTxt,en=zt.afterTxt,nn=zt.start,jn=pt.length;if(pt.endsWith(en))jn=pt.length-Dt.current.afterTxt.length;else if(pt.startsWith(Bt))jn=Bt.length;else{var Lr=Bt[nn-1],rr=pt.indexOf(Lr,nn-1);rr!==-1&&(jn=rr+1)}qe.setSelectionRange(jn,jn)}catch(tr){$t(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(tr.message))}}return[Vt,We]}var yn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var qe=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(qe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(qe==null?void 0:qe.substr(0,4))},ln=function(){var ut=(0,je.useState)(!1),Dt=(0,xe.Z)(ut,2),Vt=Dt[0],We=Dt[1];return Kt(function(){We(yn())},[]),Vt},Ae=ln,ue=function(ut){return+setTimeout(ut,16)},le=function(ut){return clearTimeout(ut)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ue=function(ut){return window.requestAnimationFrame(ut)},le=function(ut){return window.cancelAnimationFrame(ut)});var pe=0,he=new Map;function oe(qe){he.delete(qe)}var Te=function(ut){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pe+=1;var Vt=pe;function We(pt){if(pt===0)oe(Vt),ut();else{var zt=ue(function(){We(pt-1)});he.set(Vt,zt)}}return We(Dt),Vt};Te.cancel=function(qe){var ut=he.get(qe);return oe(ut),le(ut)};var Ye=Te,Lt=200,Rt=600;function Ft(qe){var ut=qe.prefixCls,Dt=qe.upNode,Vt=qe.downNode,We=qe.upDisabled,pt=qe.downDisabled,zt=qe.onStep,Bt=je.useRef(),en=je.useRef([]),nn=je.useRef();nn.current=zt;var jn=function(){clearTimeout(Bt.current)},Lr=function(fn,Bn){fn.preventDefault(),jn(),nn.current(Bn);function hn(){nn.current(Bn),Bt.current=setTimeout(hn,Lt)}Bt.current=setTimeout(hn,Rt)};je.useEffect(function(){return function(){jn(),en.current.forEach(function(Ct){return Ye.cancel(Ct)})}},[]);var rr=Ae();if(rr)return null;var tr="".concat(ut,"-handler"),dr=Ve()(tr,"".concat(tr,"-up"),(0,we.Z)({},"".concat(tr,"-up-disabled"),We)),fr=Ve()(tr,"".concat(tr,"-down"),(0,we.Z)({},"".concat(tr,"-down-disabled"),pt)),mt=function(){return en.current.push(Ye(jn))},st={unselectable:"on",role:"button",onMouseUp:mt,onMouseLeave:mt};return je.createElement("div",{className:"".concat(tr,"-wrap")},je.createElement("span",(0,ve.Z)({},st,{onMouseDown:function(fn){Lr(fn,!0)},"aria-label":"Increase Value","aria-disabled":We,className:dr}),Dt||je.createElement("span",{unselectable:"on",className:"".concat(ut,"-handler-up-inner")})),je.createElement("span",(0,ve.Z)({},st,{onMouseDown:function(fn){Lr(fn,!1)},"aria-label":"Decrease Value","aria-disabled":pt,className:fr}),Vt||je.createElement("span",{unselectable:"on",className:"".concat(ut,"-handler-down-inner")})))}function Jt(qe){var ut=typeof qe=="number"?Le(qe):ft(qe).fullStr,Dt=ut.includes(".");return Dt?ft(ut.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:qe+"0"}var Xt=se(87887),Hn=function(){var qe=(0,je.useRef)(0),ut=function(){Ye.cancel(qe.current)};return(0,je.useEffect)(function(){return ut},[]),function(Dt){ut(),qe.current=Ye(function(){Dt()})}},Rn=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Tt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],dn=function(ut,Dt){return ut||Dt.isEmpty()?Dt.toString():Dt.toNumber()},cr=function(ut){var Dt=Se(ut);return Dt.isInvalidate()?null:Dt},Mr=je.forwardRef(function(qe,ut){var Dt,Vt=qe.prefixCls,We=Vt===void 0?"rc-input-number":Vt,pt=qe.className,zt=qe.style,Bt=qe.min,en=qe.max,nn=qe.step,jn=nn===void 0?1:nn,Lr=qe.defaultValue,rr=qe.value,tr=qe.disabled,dr=qe.readOnly,fr=qe.upHandler,mt=qe.downHandler,st=qe.keyboard,Ct=qe.controls,fn=Ct===void 0?!0:Ct,Bn=qe.classNames,hn=qe.stringMode,vn=qe.parser,xn=qe.formatter,Nn=qe.precision,hr=qe.decimalSeparator,tn=qe.onChange,Qr=qe.onInput,Ur=qe.onPressEnter,$i=qe.onStep,Ai=(0,me.Z)(qe,Rn),gi="".concat(We,"-input"),qi=je.useRef(null),xi=je.useState(!1),li=(0,xe.Z)(xi,2),Ni=li[0],Gi=li[1],qr=je.useRef(!1),vi=je.useRef(!1),Zi=je.useRef(!1),la=je.useState(function(){return Se(rr!=null?rr:Lr)}),ta=(0,xe.Z)(la,2),ii=ta[0],Et=ta[1];function wt(Yn){rr===void 0&&Et(Yn)}var Qt=je.useCallback(function(Yn,Xn){if(!Xn)return Nn>=0?Nn:Math.max(Je(Yn),Je(jn))},[Nn,jn]),mn=je.useCallback(function(Yn){var Xn=String(Yn);if(vn)return vn(Xn);var ir=Xn;return hr&&(ir=ir.replace(hr,".")),ir.replace(/[^\w.-]+/g,"")},[vn,hr]),On=je.useRef(""),vr=je.useCallback(function(Yn,Xn){if(xn)return xn(Yn,{userTyping:Xn,input:String(On.current)});var ir=typeof Yn=="number"?Le(Yn):Yn;if(!Xn){var ar=Qt(ir,Xn);if(gt(ir)&&(hr||ar>=0)){var xr=hr||".";ir=ke(ir,xr,ar)}}return ir},[xn,Qt,hr]),Ir=je.useState(function(){var Yn=Lr!=null?Lr:rr;return ii.isInvalidate()&&["string","number"].includes((0,Ee.Z)(Yn))?Number.isNaN(Yn)?"":Yn:vr(ii.toString(),!1)}),Wr=(0,xe.Z)(Ir,2),Gr=Wr[0],Hr=Wr[1];On.current=Gr;function ni(Yn,Xn){Hr(vr(Yn.isInvalidate()?Yn.toString(!1):Yn.toString(!Xn),Xn))}var yi=je.useMemo(function(){return cr(en)},[en,Nn]),Ar=je.useMemo(function(){return cr(Bt)},[Bt,Nn]),pi=je.useMemo(function(){return!yi||!ii||ii.isInvalidate()?!1:yi.lessEquals(ii)},[yi,ii]),Ti=je.useMemo(function(){return!Ar||!ii||ii.isInvalidate()?!1:ii.lessEquals(Ar)},[Ar,ii]),Ei=Zt(qi.current,Ni),De=(0,xe.Z)(Ei,2),Fe=De[0],ze=De[1],Ze=function(Xn){return yi&&!Xn.lessEquals(yi)?yi:Ar&&!Ar.lessEquals(Xn)?Ar:null},nt=function(Xn){return!Ze(Xn)},lt=function(Xn,ir){var ar=Xn,xr=nt(ar)||ar.isEmpty();if(!ar.isEmpty()&&!ir&&(ar=Ze(ar)||ar,xr=!0),!dr&&!tr&&xr){var Re=ar.toString(),Ke=Qt(Re,ir);return Ke>=0&&(ar=Se(ke(Re,".",Ke)),nt(ar)||(ar=Se(ke(Re,".",Ke,!0)))),ar.equals(ii)||(wt(ar),tn==null||tn(ar.isEmpty()?null:dn(hn,ar)),rr===void 0&&ni(ar,ir)),ar}return ii},Mt=Hn(),an=function Yn(Xn){if(Fe(),On.current=Xn,Hr(Xn),!vi.current){var ir=mn(Xn),ar=Se(ir);ar.isNaN()||lt(ar,!0)}Qr==null||Qr(Xn),Mt(function(){var xr=Xn;vn||(xr=Xn.replace(/。/g,".")),xr!==Xn&&Yn(xr)})},un=function(){vi.current=!0},Jn=function(){vi.current=!1,an(qi.current.value)},br=function(Xn){an(Xn.target.value)},Vn=function(Xn){var ir;if(!(Xn&&pi||!Xn&&Ti)){qr.current=!1;var ar=Se(Zi.current?Jt(jn):jn);Xn||(ar=ar.negate());var xr=(ii||Se(0)).add(ar.toString()),Re=lt(xr,!1);$i==null||$i(dn(hn,Re),{offset:Zi.current?Jt(jn):jn,type:Xn?"up":"down"}),(ir=qi.current)===null||ir===void 0||ir.focus()}},kn=function(Xn){var ir=Se(mn(Gr)),ar=ir;ir.isNaN()?ar=lt(ii,Xn):ar=lt(ir,Xn),rr!==void 0?ni(ii,!1):ar.isNaN()||ni(ar,!1)},wn=function(){qr.current=!0},Pn=function(Xn){var ir=Xn.key,ar=Xn.shiftKey;qr.current=!0,Zi.current=ar,ir==="Enter"&&(vi.current||(qr.current=!1),kn(!1),Ur==null||Ur(Xn)),st!==!1&&!vi.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ir)&&(Vn(ir==="Up"||ir==="ArrowUp"),Xn.preventDefault())},zn=function(){qr.current=!1,Zi.current=!1},gr=function(){kn(!1),Gi(!1),qr.current=!1};return Xe(function(){ii.isInvalidate()||ni(ii,!1)},[Nn]),Xe(function(){var Yn=Se(rr);Et(Yn);var Xn=Se(mn(Gr));(!Yn.equals(Xn)||!qr.current||xn)&&ni(Yn,qr.current)},[rr]),Xe(function(){xn&&ze()},[Gr]),je.createElement("div",{className:Ve()(We,Bn==null?void 0:Bn.input,pt,(Dt={},(0,we.Z)(Dt,"".concat(We,"-focused"),Ni),(0,we.Z)(Dt,"".concat(We,"-disabled"),tr),(0,we.Z)(Dt,"".concat(We,"-readonly"),dr),(0,we.Z)(Dt,"".concat(We,"-not-a-number"),ii.isNaN()),(0,we.Z)(Dt,"".concat(We,"-out-of-range"),!ii.isInvalidate()&&!nt(ii)),Dt)),style:zt,onFocus:function(){Gi(!0)},onBlur:gr,onKeyDown:Pn,onKeyUp:zn,onCompositionStart:un,onCompositionEnd:Jn,onBeforeInput:wn},fn&&je.createElement(Ft,{prefixCls:We,upNode:fr,downNode:mt,upDisabled:pi,downDisabled:Ti,onStep:Vn}),je.createElement("div",{className:"".concat(gi,"-wrap")},je.createElement("input",(0,ve.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Bt,"aria-valuemax":en,"aria-valuenow":ii.isInvalidate()?null:ii.toString(),step:jn},Ai,{ref:sn(qi,ut),className:gi,value:Gr,onChange:br,disabled:tr,readOnly:dr}))))}),at=je.forwardRef(function(qe,ut){var Dt=qe.disabled,Vt=qe.style,We=qe.prefixCls,pt=qe.value,zt=qe.prefix,Bt=qe.suffix,en=qe.addonBefore,nn=qe.addonAfter,jn=qe.classes,Lr=qe.className,rr=qe.classNames,tr=(0,me.Z)(qe,Tt),dr=je.useRef(null),fr=function(st){dr.current&&(0,Xt.nH)(dr.current,st)};return je.createElement(Ue.BaseInput,{inputElement:je.createElement(Mr,(0,ve.Z)({prefixCls:We,disabled:Dt,classNames:rr,ref:sn(dr,ut)},tr)),className:Lr,triggerFocus:fr,prefixCls:We,value:pt,disabled:Dt,style:Vt,prefix:zt,suffix:Bt,addonAfter:nn,addonBefore:en,classes:jn,classNames:rr,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});at.displayName="InputNumber";var Ht=at,Fn=Ht,er=se(9708),nr=se(53124),Sr=se(46735),Tr=se(98866),Er=se(98675),Or=se(65223),Vr=se(4173),ur=se(47673),si=se(14747),Li=se(80110),Bi=se(67968),Hi=se(45503);const ri=(qe,ut)=>{let{componentCls:Dt,borderRadiusSM:Vt,borderRadiusLG:We}=qe;const pt=ut==="lg"?We:Vt;return{[`&-${ut}`]:{[`${Dt}-handler-wrap`]:{borderStartEndRadius:pt,borderEndEndRadius:pt},[`${Dt}-handler-up`]:{borderStartEndRadius:pt},[`${Dt}-handler-down`]:{borderEndEndRadius:pt}}}},yt=qe=>{const{componentCls:ut,lineWidth:Dt,lineType:Vt,colorBorder:We,borderRadius:pt,fontSizeLG:zt,controlHeightLG:Bt,controlHeightSM:en,colorError:nn,paddingInlineSM:jn,colorTextDescription:Lr,motionDurationMid:rr,handleHoverColor:tr,paddingInline:dr,paddingBlock:fr,handleBg:mt,handleActiveBg:st,colorTextDisabled:Ct,borderRadiusSM:fn,borderRadiusLG:Bn,controlWidth:hn,handleVisible:vn,handleBorderColor:xn}=qe;return[{[ut]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,si.Wf)(qe)),(0,ur.ik)(qe)),(0,ur.bi)(qe,ut)),{display:"inline-block",width:hn,margin:0,padding:0,border:`${Dt}px ${Vt} ${We}`,borderRadius:pt,"&-rtl":{direction:"rtl",[`${ut}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:zt,borderRadius:Bn,[`input${ut}-input`]:{height:Bt-2*Dt}},"&-sm":{padding:0,borderRadius:fn,[`input${ut}-input`]:{height:en-2*Dt,padding:`0 ${jn}px`}},"&:hover":Object.assign({},(0,ur.pU)(qe)),"&-focused":Object.assign({},(0,ur.M1)(qe)),"&-out-of-range":{[`${ut}-input-wrap`]:{input:{color:nn}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,si.Wf)(qe)),(0,ur.s7)(qe)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${ut}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${ut}-group-addon`]:{borderRadius:Bn,fontSize:qe.fontSizeLG}},"&-sm":{[`${ut}-group-addon`]:{borderRadius:fn}},[`${ut}-wrapper-disabled > ${ut}-group-addon`]:Object.assign({},(0,ur.Xy)(qe))}}),[`&-disabled ${ut}-input`]:{cursor:"not-allowed"},[ut]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,si.Wf)(qe)),{width:"100%",padding:`${fr}px ${dr}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:pt,outline:0,transition:`all ${rr} linear`,appearance:"textfield",fontSize:"inherit"}),(0,ur.nz)(qe.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[ut]:Object.assign(Object.assign(Object.assign({[`&:hover ${ut}-handler-wrap, &-focused ${ut}-handler-wrap`]:{opacity:1},[`${ut}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:qe.handleWidth,height:"100%",background:mt,borderStartStartRadius:0,borderStartEndRadius:pt,borderEndEndRadius:pt,borderEndStartRadius:0,opacity:vn===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${rr} linear ${rr}`,[`${ut}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${ut}-handler-up-inner,
|
|
|
${ut}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:qe.handleFontSize}}},[`${ut}-handler`]:{height:"50%",overflow:"hidden",color:Lr,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Dt}px ${Vt} ${xn}`,transition:`all ${rr} linear`,"&:active":{background:st},"&:hover":{height:"60%",[`
|
|
|
${ut}-handler-up-inner,
|
|
|
${ut}-handler-down-inner
|
|
|
`]:{color:tr}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,si.Ro)()),{color:Lr,transition:`all ${rr} linear`,userSelect:"none"})},[`${ut}-handler-up`]:{borderStartEndRadius:pt},[`${ut}-handler-down`]:{borderBlockStart:`${Dt}px ${Vt} ${xn}`,borderEndEndRadius:pt}},ri(qe,"lg")),ri(qe,"sm")),{"&-disabled, &-readonly":{[`${ut}-handler-wrap`]:{display:"none"},[`${ut}-input`]:{color:"inherit"}},[`
|
|
|
${ut}-handler-up-disabled,
|
|
|
${ut}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${ut}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${ut}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Ct}})},{[`${ut}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${ut}-handler-down`]:{borderBlockStartWidth:0}}}]},Mn=qe=>{const{componentCls:ut,paddingBlock:Dt,paddingInline:Vt,inputAffixPadding:We,controlWidth:pt,borderRadiusLG:zt,borderRadiusSM:Bt}=qe;return{[`${ut}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,ur.ik)(qe)),(0,ur.bi)(qe,`${ut}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:pt,padding:0,paddingInlineStart:Vt,"&-lg":{borderRadius:zt},"&-sm":{borderRadius:Bt},[`&:not(${ut}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,ur.pU)(qe)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${ut}-disabled`]:{background:"transparent"},[`> div${ut}`]:{width:"100%",border:"none",outline:"none",[`&${ut}-focused`]:{boxShadow:"none !important"}},[`input${ut}-input`]:{padding:`${Dt}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${ut}-handler-wrap`]:{zIndex:2},[ut]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:We},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Vt,marginInlineStart:We}}})}};var An=(0,Bi.Z)("InputNumber",qe=>{const ut=(0,Hi.TS)(qe,(0,ur.e5)(qe));return[yt(ut),Mn(ut),(0,Li.c)(ut)]},qe=>Object.assign(Object.assign({},(0,ur.TM)(qe)),{controlWidth:90,handleWidth:qe.controlHeightSM-qe.lineWidth*2,handleFontSize:qe.fontSize/2,handleVisible:"auto",handleActiveBg:qe.colorFillAlter,handleBg:qe.colorBgContainer,handleHoverColor:qe.colorPrimary,handleBorderColor:qe.colorBorder})),Dn=function(qe,ut){var Dt={};for(var Vt in qe)Object.prototype.hasOwnProperty.call(qe,Vt)&&ut.indexOf(Vt)<0&&(Dt[Vt]=qe[Vt]);if(qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Vt=Object.getOwnPropertySymbols(qe);We<Vt.length;We++)ut.indexOf(Vt[We])<0&&Object.prototype.propertyIsEnumerable.call(qe,Vt[We])&&(Dt[Vt[We]]=qe[Vt[We]]);return Dt};const lr=je.forwardRef((qe,ut)=>{const{getPrefixCls:Dt,direction:Vt}=je.useContext(nr.E_),We=je.useRef(null);je.useImperativeHandle(ut,()=>We.current);const{className:pt,rootClassName:zt,size:Bt,disabled:en,prefixCls:nn,addonBefore:jn,addonAfter:Lr,prefix:rr,bordered:tr=!0,readOnly:dr,status:fr,controls:mt}=qe,st=Dn(qe,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Ct=Dt("input-number",nn),[fn,Bn]=An(Ct),{compactSize:hn,compactItemClassnames:vn}=(0,Vr.ri)(Ct,Vt);let xn=je.createElement(He.Z,{className:`${Ct}-handler-up-inner`}),Nn=je.createElement(de.Z,{className:`${Ct}-handler-down-inner`});const hr=typeof mt=="boolean"?mt:void 0;typeof mt=="object"&&(xn=typeof mt.upIcon=="undefined"?xn:je.createElement("span",{className:`${Ct}-handler-up-inner`},mt.upIcon),Nn=typeof mt.downIcon=="undefined"?Nn:je.createElement("span",{className:`${Ct}-handler-down-inner`},mt.downIcon));const{hasFeedback:tn,status:Qr,isFormItemInput:Ur,feedbackIcon:$i}=je.useContext(Or.aM),Ai=(0,er.F)(Qr,fr),gi=(0,Er.Z)(qr=>{var vi;return(vi=Bt!=null?Bt:hn)!==null&&vi!==void 0?vi:qr}),qi=je.useContext(Tr.Z),xi=en!=null?en:qi,li=Ve()({[`${Ct}-lg`]:gi==="large",[`${Ct}-sm`]:gi==="small",[`${Ct}-rtl`]:Vt==="rtl",[`${Ct}-borderless`]:!tr,[`${Ct}-in-form-item`]:Ur},(0,er.Z)(Ct,Ai),vn,Bn),Ni=`${Ct}-group`,Gi=je.createElement(Fn,Object.assign({ref:We,disabled:xi,className:Ve()(pt,zt),upHandler:xn,downHandler:Nn,prefixCls:Ct,readOnly:dr,controls:hr,prefix:rr,suffix:tn&&$i,addonAfter:Lr&&je.createElement(Vr.BR,null,je.createElement(Or.Ux,{override:!0,status:!0},Lr)),addonBefore:jn&&je.createElement(Vr.BR,null,je.createElement(Or.Ux,{override:!0,status:!0},jn)),classNames:{input:li},classes:{affixWrapper:Ve()((0,er.Z)(`${Ct}-affix-wrapper`,Ai,tn),{[`${Ct}-affix-wrapper-sm`]:gi==="small",[`${Ct}-affix-wrapper-lg`]:gi==="large",[`${Ct}-affix-wrapper-rtl`]:Vt==="rtl",[`${Ct}-affix-wrapper-borderless`]:!tr},Bn),wrapper:Ve()({[`${Ni}-rtl`]:Vt==="rtl",[`${Ct}-wrapper-disabled`]:xi},Bn),group:Ve()({[`${Ct}-group-wrapper-sm`]:gi==="small",[`${Ct}-group-wrapper-lg`]:gi==="large",[`${Ct}-group-wrapper-rtl`]:Vt==="rtl"},(0,er.Z)(`${Ct}-group-wrapper`,Ai,tn),Bn)}},st));return fn(Gi)}),qn=lr,pr=qe=>je.createElement(Sr.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},je.createElement(lr,Object.assign({},qe)));qn._InternalPanelDoNotUseOrYouWillBeFired=pr;var $n=qn},82586:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return qt},n:function(){return Le}});var de=se(16646),He=se(94184),Be=se.n(He),Ve=se(67656),ve=se(17799),we=se(67294),Ee=se(9708),xe=se(53124),me=se(98866),Ie=se(98675),ot=se(65223),Oe=se(4173),St=se(72922),ft=se(47673);function it(tt){return!!(tt.prefix||tt.suffix||tt.allowClear)}var Je=function(tt,ct){var ke={};for(var Se in tt)Object.prototype.hasOwnProperty.call(tt,Se)&&ct.indexOf(Se)<0&&(ke[Se]=tt[Se]);if(tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,Se=Object.getOwnPropertySymbols(tt);Ue<Se.length;Ue++)ct.indexOf(Se[Ue])<0&&Object.prototype.propertyIsEnumerable.call(tt,Se[Ue])&&(ke[Se[Ue]]=tt[Se[Ue]]);return ke};function Le(tt,ct){if(!tt)return;tt.focus(ct);const{cursor:ke}=ct||{};if(ke){const Se=tt.value.length;switch(ke){case"start":tt.setSelectionRange(0,0);break;case"end":tt.setSelectionRange(Se,Se);break;default:tt.setSelectionRange(0,Se);break}}}var qt=(0,we.forwardRef)((tt,ct)=>{var ke;const{prefixCls:Se,bordered:Ue=!0,status:je,size:_t,disabled:vt,onBlur:kt,onFocus:Xe,suffix:Kt,allowClear:Ot,addonAfter:bn,addonBefore:Nt,className:sn,style:Cn,styles:or,rootClassName:Qe,onChange:Ce,classNames:ht}=tt,Ut=Je(tt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Yt,direction:Ge,input:rt}=we.useContext(xe.E_),jt=Yt("input",Se),_n=(0,we.useRef)(null),[rn,$t]=(0,ft.ZP)(jt),{compactSize:Zt,compactItemClassnames:yn}=(0,Oe.ri)(jt,Ge),ln=(0,Ie.Z)(Rn=>{var Tt;return(Tt=_t!=null?_t:Zt)!==null&&Tt!==void 0?Tt:Rn}),Ae=we.useContext(me.Z),ue=vt!=null?vt:Ae,{status:le,hasFeedback:pe,feedbackIcon:he}=(0,we.useContext)(ot.aM),oe=(0,Ee.F)(le,je),Te=it(tt)||!!pe,Ye=(0,we.useRef)(Te);(0,we.useEffect)(()=>{var Rn;Te&&Ye.current,Ye.current=Te},[Te]);const Lt=(0,St.Z)(_n,!0),Rt=Rn=>{Lt(),kt==null||kt(Rn)},Ft=Rn=>{Lt(),Xe==null||Xe(Rn)},Jt=Rn=>{Lt(),Ce==null||Ce(Rn)},Xt=(pe||Kt)&&we.createElement(we.Fragment,null,Kt,pe&&he);let Hn;return typeof Ot=="object"&&(Ot!=null&&Ot.clearIcon)?Hn=Ot:Ot&&(Hn={clearIcon:we.createElement(de.Z,null)}),rn(we.createElement(Ve.default,Object.assign({ref:(0,ve.sQ)(ct,_n),prefixCls:jt,autoComplete:rt==null?void 0:rt.autoComplete},Ut,{disabled:ue,onBlur:Rt,onFocus:Ft,style:Object.assign(Object.assign({},rt==null?void 0:rt.style),Cn),styles:Object.assign(Object.assign({},rt==null?void 0:rt.styles),or),suffix:Xt,allowClear:Hn,className:Be()(sn,Qe,yn,rt==null?void 0:rt.className),onChange:Jt,addonAfter:bn&&we.createElement(Oe.BR,null,we.createElement(ot.Ux,{override:!0,status:!0},bn)),addonBefore:Nt&&we.createElement(Oe.BR,null,we.createElement(ot.Ux,{override:!0,status:!0},Nt)),classNames:Object.assign(Object.assign(Object.assign({},ht),rt==null?void 0:rt.classNames),{input:Be()({[`${jt}-sm`]:ln==="small",[`${jt}-lg`]:ln==="large",[`${jt}-rtl`]:Ge==="rtl",[`${jt}-borderless`]:!Ue},!Te&&(0,Ee.Z)(jt,oe),ht==null?void 0:ht.input,(ke=rt==null?void 0:rt.classNames)===null||ke===void 0?void 0:ke.input,$t)}),classes:{affixWrapper:Be()({[`${jt}-affix-wrapper-sm`]:ln==="small",[`${jt}-affix-wrapper-lg`]:ln==="large",[`${jt}-affix-wrapper-rtl`]:Ge==="rtl",[`${jt}-affix-wrapper-borderless`]:!Ue},(0,Ee.Z)(`${jt}-affix-wrapper`,oe,pe),$t),wrapper:Be()({[`${jt}-group-rtl`]:Ge==="rtl"},$t),group:Be()({[`${jt}-group-wrapper-sm`]:ln==="small",[`${jt}-group-wrapper-lg`]:ln==="large",[`${jt}-group-wrapper-rtl`]:Ge==="rtl",[`${jt}-group-wrapper-disabled`]:ue},(0,Ee.Z)(`${jt}-group-wrapper`,oe,pe),$t)}})))})},96330:function(En,Wt,se){"use strict";var de=se(16646),He=se(94184),Be=se.n(He),Ve=se(64701),ve=se(67294),we=se(9708),Ee=se(53124),xe=se(98866),me=se(98675),Ie=se(65223),ot=se(82586),Oe=se(47673),St=function(it,Je){var Le={};for(var gt in it)Object.prototype.hasOwnProperty.call(it,gt)&&Je.indexOf(gt)<0&&(Le[gt]=it[gt]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,gt=Object.getOwnPropertySymbols(it);qt<gt.length;qt++)Je.indexOf(gt[qt])<0&&Object.prototype.propertyIsEnumerable.call(it,gt[qt])&&(Le[gt[qt]]=it[gt[qt]]);return Le};const ft=(0,ve.forwardRef)((it,Je)=>{const{prefixCls:Le,bordered:gt=!0,size:qt,disabled:tt,status:ct,allowClear:ke,showCount:Se,classNames:Ue,rootClassName:je,className:_t}=it,vt=St(it,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:kt,direction:Xe}=ve.useContext(Ee.E_),Kt=(0,me.Z)(qt),Ot=ve.useContext(xe.Z),bn=tt!=null?tt:Ot,{status:Nt,hasFeedback:sn,feedbackIcon:Cn}=ve.useContext(Ie.aM),or=(0,we.F)(Nt,ct),Qe=ve.useRef(null);ve.useImperativeHandle(Je,()=>{var Ge;return{resizableTextArea:(Ge=Qe.current)===null||Ge===void 0?void 0:Ge.resizableTextArea,focus:rt=>{var jt,_n;(0,ot.n)((_n=(jt=Qe.current)===null||jt===void 0?void 0:jt.resizableTextArea)===null||_n===void 0?void 0:_n.textArea,rt)},blur:()=>{var rt;return(rt=Qe.current)===null||rt===void 0?void 0:rt.blur()}}});const Ce=kt("input",Le);let ht;typeof ke=="object"&&(ke!=null&&ke.clearIcon)?ht=ke:ke&&(ht={clearIcon:ve.createElement(de.Z,null)});const[Ut,Yt]=(0,Oe.ZP)(Ce);return Ut(ve.createElement(Ve.default,Object.assign({},vt,{disabled:bn,allowClear:ht,className:Be()(_t,je),classes:{affixWrapper:Be()(`${Ce}-textarea-affix-wrapper`,{[`${Ce}-affix-wrapper-rtl`]:Xe==="rtl",[`${Ce}-affix-wrapper-borderless`]:!gt,[`${Ce}-affix-wrapper-sm`]:Kt==="small",[`${Ce}-affix-wrapper-lg`]:Kt==="large",[`${Ce}-textarea-show-count`]:Se},(0,we.Z)(`${Ce}-affix-wrapper`,or),Yt)},classNames:Object.assign(Object.assign({},Ue),{textarea:Be()({[`${Ce}-borderless`]:!gt,[`${Ce}-sm`]:Kt==="small",[`${Ce}-lg`]:Kt==="large"},(0,we.Z)(Ce,or),Yt,Ue==null?void 0:Ue.textarea)}),prefixCls:Ce,suffix:sn&&ve.createElement("span",{className:`${Ce}-textarea-suffix`},Cn),showCount:Se,ref:Qe})))});Wt.Z=ft},72922:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return He}});var de=se(67294);function He(Be,Ve){const ve=(0,de.useRef)([]),we=()=>{ve.current.push(setTimeout(()=>{var Ee,xe,me,Ie;!((Ee=Be.current)===null||Ee===void 0)&&Ee.input&&((xe=Be.current)===null||xe===void 0?void 0:xe.input.getAttribute("type"))==="password"&&(!((me=Be.current)===null||me===void 0)&&me.input.hasAttribute("value"))&&((Ie=Be.current)===null||Ie===void 0||Ie.input.removeAttribute("value"))}))};return(0,de.useEffect)(()=>(Ve&&we(),()=>ve.current.forEach(Ee=>{Ee&&clearTimeout(Ee)})),[]),we}},69677:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return Kt}});var de=se(94184),He=se.n(de),Be=se(67294),Ve=se(53124),ve=se(65223),we=se(47673),xe=Ot=>{const{getPrefixCls:bn,direction:Nt}=(0,Be.useContext)(Ve.E_),{prefixCls:sn,className:Cn}=Ot,or=bn("input-group",sn),Qe=bn("input"),[Ce,ht]=(0,we.ZP)(Qe),Ut=He()(or,{[`${or}-lg`]:Ot.size==="large",[`${or}-sm`]:Ot.size==="small",[`${or}-compact`]:Ot.compact,[`${or}-rtl`]:Nt==="rtl"},ht,Cn),Yt=(0,Be.useContext)(ve.aM),Ge=(0,Be.useMemo)(()=>Object.assign(Object.assign({},Yt),{isFormItemInput:!1}),[Yt]);return Ce(Be.createElement("span",{className:Ut,style:Ot.style,onMouseEnter:Ot.onMouseEnter,onMouseLeave:Ot.onMouseLeave,onFocus:Ot.onFocus,onBlur:Ot.onBlur},Be.createElement(ve.aM.Provider,{value:Ge},Ot.children)))},me=se(82586),Ie=se(63237),ot=se(99569),Oe=se(10366),St=se(17799),ft=se(72922),it=function(Ot,bn){var Nt={};for(var sn in Ot)Object.prototype.hasOwnProperty.call(Ot,sn)&&bn.indexOf(sn)<0&&(Nt[sn]=Ot[sn]);if(Ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Cn=0,sn=Object.getOwnPropertySymbols(Ot);Cn<sn.length;Cn++)bn.indexOf(sn[Cn])<0&&Object.prototype.propertyIsEnumerable.call(Ot,sn[Cn])&&(Nt[sn[Cn]]=Ot[sn[Cn]]);return Nt};const Je=Ot=>Ot?Be.createElement(ot.Z,null):Be.createElement(Ie.Z,null),Le={click:"onClick",hover:"onMouseOver"};var qt=Be.forwardRef((Ot,bn)=>{const{visibilityToggle:Nt=!0}=Ot,sn=typeof Nt=="object"&&Nt.visible!==void 0,[Cn,or]=(0,Be.useState)(()=>sn?Nt.visible:!1),Qe=(0,Be.useRef)(null);Be.useEffect(()=>{sn&&or(Nt.visible)},[sn,Nt]);const Ce=(0,ft.Z)(Qe),ht=()=>{const{disabled:ue}=Ot;ue||(Cn&&Ce(),or(le=>{var pe;const he=!le;return typeof Nt=="object"&&((pe=Nt.onVisibleChange)===null||pe===void 0||pe.call(Nt,he)),he}))},Ut=ue=>{const{action:le="click",iconRender:pe=Je}=Ot,he=Le[le]||"",oe=pe(Cn),Te={[he]:ht,className:`${ue}-icon`,key:"passwordIcon",onMouseDown:Ye=>{Ye.preventDefault()},onMouseUp:Ye=>{Ye.preventDefault()}};return Be.cloneElement(Be.isValidElement(oe)?oe:Be.createElement("span",null,oe),Te)},{className:Yt,prefixCls:Ge,inputPrefixCls:rt,size:jt}=Ot,_n=it(Ot,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:rn}=Be.useContext(Ve.E_),$t=rn("input",rt),Zt=rn("input-password",Ge),yn=Nt&&Ut(Zt),ln=He()(Zt,Yt,{[`${Zt}-${jt}`]:!!jt}),Ae=Object.assign(Object.assign({},(0,Oe.Z)(_n,["suffix","iconRender","visibilityToggle"])),{type:Cn?"text":"password",className:ln,prefixCls:$t,suffix:yn});return jt&&(Ae.size=jt),Be.createElement(me.Z,Object.assign({ref:(0,St.sQ)(bn,Qe)},Ae))}),tt=se(72395),ct=se(96159),ke=se(71577),Se=se(98675),Ue=se(4173),je=function(Ot,bn){var Nt={};for(var sn in Ot)Object.prototype.hasOwnProperty.call(Ot,sn)&&bn.indexOf(sn)<0&&(Nt[sn]=Ot[sn]);if(Ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Cn=0,sn=Object.getOwnPropertySymbols(Ot);Cn<sn.length;Cn++)bn.indexOf(sn[Cn])<0&&Object.prototype.propertyIsEnumerable.call(Ot,sn[Cn])&&(Nt[sn[Cn]]=Ot[sn[Cn]]);return Nt},vt=Be.forwardRef((Ot,bn)=>{const{prefixCls:Nt,inputPrefixCls:sn,className:Cn,size:or,suffix:Qe,enterButton:Ce=!1,addonAfter:ht,loading:Ut,disabled:Yt,onSearch:Ge,onChange:rt,onCompositionStart:jt,onCompositionEnd:_n}=Ot,rn=je(Ot,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:$t,direction:Zt}=Be.useContext(Ve.E_),yn=Be.useRef(!1),ln=$t("input-search",Nt),Ae=$t("input",sn),{compactSize:ue}=(0,Ue.ri)(ln,Zt),le=(0,Se.Z)(dn=>{var cr;return(cr=or!=null?or:ue)!==null&&cr!==void 0?cr:dn}),pe=Be.useRef(null),he=dn=>{dn&&dn.target&&dn.type==="click"&&Ge&&Ge(dn.target.value,dn,{source:"clear"}),rt&&rt(dn)},oe=dn=>{var cr;document.activeElement===((cr=pe.current)===null||cr===void 0?void 0:cr.input)&&dn.preventDefault()},Te=dn=>{var cr,Mr;Ge&&Ge((Mr=(cr=pe.current)===null||cr===void 0?void 0:cr.input)===null||Mr===void 0?void 0:Mr.value,dn,{source:"input"})},Ye=dn=>{yn.current||Ut||Te(dn)},Lt=typeof Ce=="boolean"?Be.createElement(tt.Z,null):null,Rt=`${ln}-button`;let Ft;const Jt=Ce||{},Xt=Jt.type&&Jt.type.__ANT_BUTTON===!0;Xt||Jt.type==="button"?Ft=(0,ct.Tm)(Jt,Object.assign({onMouseDown:oe,onClick:dn=>{var cr,Mr;(Mr=(cr=Jt==null?void 0:Jt.props)===null||cr===void 0?void 0:cr.onClick)===null||Mr===void 0||Mr.call(cr,dn),Te(dn)},key:"enterButton"},Xt?{className:Rt,size:le}:{})):Ft=Be.createElement(ke.ZP,{className:Rt,type:Ce?"primary":void 0,size:le,disabled:Yt,key:"enterButton",onMouseDown:oe,onClick:Te,loading:Ut,icon:Lt},Ce),ht&&(Ft=[Ft,(0,ct.Tm)(ht,{key:"addonAfter"})]);const Hn=He()(ln,{[`${ln}-rtl`]:Zt==="rtl",[`${ln}-${le}`]:!!le,[`${ln}-with-button`]:!!Ce},Cn),Rn=dn=>{yn.current=!0,jt==null||jt(dn)},Tt=dn=>{yn.current=!1,_n==null||_n(dn)};return Be.createElement(me.Z,Object.assign({ref:(0,St.sQ)(pe,bn),onPressEnter:Ye},rn,{size:le,onCompositionStart:Rn,onCompositionEnd:Tt,prefixCls:Ae,addonAfter:Ft,suffix:Qe,onChange:he,className:Hn,disabled:Yt}))}),kt=se(96330);const Xe=me.Z;Xe.Group=xe,Xe.Search=vt,Xe.TextArea=kt.Z,Xe.Password=qt;var Kt=Xe},47673:function(En,Wt,se){"use strict";se.d(Wt,{M1:function(){return Ee},TM:function(){return ct},Xy:function(){return xe},bi:function(){return ot},e5:function(){return tt},ik:function(){return Oe},nz:function(){return ve},pU:function(){return we},s7:function(){return St},x0:function(){return Ie}});var de=se(14747),He=se(80110),Be=se(45503),Ve=se(67968);const ve=ke=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:ke,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),we=ke=>({borderColor:ke.hoverBorderColor}),Ee=ke=>({borderColor:ke.activeBorderColor,boxShadow:ke.activeShadow,outline:0}),xe=ke=>({color:ke.colorTextDisabled,backgroundColor:ke.colorBgContainerDisabled,borderColor:ke.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},we((0,Be.TS)(ke,{hoverBorderColor:ke.colorBorder})))}),me=ke=>{const{paddingBlockLG:Se,fontSizeLG:Ue,lineHeightLG:je,borderRadiusLG:_t,paddingInlineLG:vt}=ke;return{padding:`${Se}px ${vt}px`,fontSize:Ue,lineHeight:je,borderRadius:_t}},Ie=ke=>({padding:`${ke.paddingBlockSM}px ${ke.paddingInlineSM}px`,borderRadius:ke.borderRadiusSM}),ot=(ke,Se)=>{const{componentCls:Ue,colorError:je,colorWarning:_t,errorActiveShadow:vt,warningActiveShadow:kt,colorErrorBorderHover:Xe,colorWarningBorderHover:Kt}=ke;return{[`&-status-error:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:je,"&:hover":{borderColor:Xe},"&:focus, &-focused":Object.assign({},Ee((0,Be.TS)(ke,{activeBorderColor:je,activeShadow:vt}))),[`${Ue}-prefix, ${Ue}-suffix`]:{color:je}},[`&-status-warning:not(${Se}-disabled):not(${Se}-borderless)${Se}`]:{borderColor:_t,"&:hover":{borderColor:Kt},"&:focus, &-focused":Object.assign({},Ee((0,Be.TS)(ke,{activeBorderColor:_t,activeShadow:kt}))),[`${Ue}-prefix, ${Ue}-suffix`]:{color:_t}}}},Oe=ke=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ke.paddingBlock}px ${ke.paddingInline}px`,color:ke.colorText,fontSize:ke.fontSize,lineHeight:ke.lineHeight,backgroundColor:ke.colorBgContainer,backgroundImage:"none",borderWidth:ke.lineWidth,borderStyle:ke.lineType,borderColor:ke.colorBorder,borderRadius:ke.borderRadius,transition:`all ${ke.motionDurationMid}`},ve(ke.colorTextPlaceholder)),{"&:hover":Object.assign({},we(ke)),"&:focus, &-focused":Object.assign({},Ee(ke)),"&-disabled, &[disabled]":Object.assign({},xe(ke)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:ke.controlHeight,lineHeight:ke.lineHeight,verticalAlign:"bottom",transition:`all ${ke.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},me(ke)),"&-sm":Object.assign({},Ie(ke)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),St=ke=>{const{componentCls:Se,antCls:Ue}=ke;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:ke.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Se}, &-lg > ${Se}-group-addon`]:Object.assign({},me(ke)),[`&-sm ${Se}, &-sm > ${Se}-group-addon`]:Object.assign({},Ie(ke)),[`&-lg ${Ue}-select-single ${Ue}-select-selector`]:{height:ke.controlHeightLG},[`&-sm ${Ue}-select-single ${Ue}-select-selector`]:{height:ke.controlHeightSM},[`> ${Se}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Se}-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 ${ke.paddingInline}px`,color:ke.colorText,fontWeight:"normal",fontSize:ke.fontSize,textAlign:"center",backgroundColor:ke.colorFillAlter,border:`${ke.lineWidth}px ${ke.lineType} ${ke.colorBorder}`,borderRadius:ke.borderRadius,transition:`all ${ke.motionDurationSlow}`,lineHeight:1,[`${Ue}-select`]:{margin:`-${ke.paddingBlock+1}px -${ke.paddingInline}px`,[`&${Ue}-select-single:not(${Ue}-select-customize-input)`]:{[`${Ue}-select-selector`]:{backgroundColor:"inherit",border:`${ke.lineWidth}px ${ke.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${Ue}-select-selector`]:{color:ke.colorPrimary}}},[`${Ue}-cascader-picker`]:{margin:`-9px -${ke.paddingInline}px`,backgroundColor:"transparent",[`${Ue}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${Se}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Se}-search-with-button &`]:{zIndex:0}}},[`> ${Se}:first-child, ${Se}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${Ue}-select ${Ue}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}-affix-wrapper`]:{[`&:not(:first-child) ${Se}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Se}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Se}:last-child, ${Se}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${Ue}-select ${Ue}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Se}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Se}-search &`]:{borderStartStartRadius:ke.borderRadius,borderEndStartRadius:ke.borderRadius}},[`&:not(:first-child), ${Se}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Se}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,de.dF)()),{[`${Se}-group-addon, ${Se}-group-wrap, > ${Se}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:ke.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${Se}-affix-wrapper,
|
|
|
& > ${Se}-number-affix-wrapper,
|
|
|
& > ${Ue}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-ke.lineWidth,borderInlineEndWidth:ke.lineWidth},[`${Se}`]:{float:"none"},[`& > ${Ue}-select > ${Ue}-select-selector,
|
|
|
& > ${Ue}-select-auto-complete ${Se},
|
|
|
& > ${Ue}-cascader-picker ${Se},
|
|
|
& > ${Se}-group-wrapper ${Se}`]:{borderInlineEndWidth:ke.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${Ue}-select-focused`]:{zIndex:1},[`& > ${Ue}-select > ${Ue}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${Ue}-select:first-child > ${Ue}-select-selector,
|
|
|
& > ${Ue}-select-auto-complete:first-child ${Se},
|
|
|
& > ${Ue}-cascader-picker:first-child ${Se}`]:{borderStartStartRadius:ke.borderRadius,borderEndStartRadius:ke.borderRadius},[`& > *:last-child,
|
|
|
& > ${Ue}-select:last-child > ${Ue}-select-selector,
|
|
|
& > ${Ue}-cascader-picker:last-child ${Se},
|
|
|
& > ${Ue}-cascader-picker-focused:last-child ${Se}`]:{borderInlineEndWidth:ke.lineWidth,borderStartEndRadius:ke.borderRadius,borderEndEndRadius:ke.borderRadius},[`& > ${Ue}-select-auto-complete ${Se}`]:{verticalAlign:"top"},[`${Se}-group-wrapper + ${Se}-group-wrapper`]:{marginInlineStart:-ke.lineWidth,[`${Se}-affix-wrapper`]:{borderRadius:0}},[`${Se}-group-wrapper:not(:last-child)`]:{[`&${Se}-search > ${Se}-group`]:{[`& > ${Se}-group-addon > ${Se}-search-button`]:{borderRadius:0},[`& > ${Se}`]:{borderStartStartRadius:ke.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ke.borderRadius}}}})}},ft=ke=>{const{componentCls:Se,controlHeightSM:Ue,lineWidth:je}=ke,vt=(Ue-je*2-16)/2;return{[Se]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,de.Wf)(ke)),Oe(ke)),ot(ke,Se)),{'&[type="color"]':{height:ke.controlHeight,[`&${Se}-lg`]:{height:ke.controlHeightLG},[`&${Se}-sm`]:{height:Ue,paddingTop:vt,paddingBottom:vt}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},it=ke=>{const{componentCls:Se}=ke;return{[`${Se}-clear-icon`]:{margin:0,color:ke.colorTextQuaternary,fontSize:ke.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${ke.motionDurationSlow}`,"&:hover":{color:ke.colorTextTertiary},"&:active":{color:ke.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ke.inputAffixPadding}px`}}}},Je=ke=>{const{componentCls:Se,inputAffixPadding:Ue,colorTextDescription:je,motionDurationSlow:_t,colorIcon:vt,colorIconHover:kt,iconCls:Xe}=ke;return{[`${Se}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Oe(ke)),{display:"inline-flex",[`&:not(${Se}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},we(ke)),{zIndex:1,[`${Se}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${Se}[disabled]`]:{background:"transparent"}},[`> input${Se}`]:{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"'},[`${Se}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:ke.paddingXS}},"&-show-count-suffix":{color:je},"&-show-count-has-suffix":{marginInlineEnd:ke.paddingXXS},"&-prefix":{marginInlineEnd:Ue},"&-suffix":{marginInlineStart:Ue}}}),it(ke)),{[`${Xe}${Se}-password-icon`]:{color:vt,cursor:"pointer",transition:`all ${_t}`,"&:hover":{color:kt}}}),ot(ke,`${Se}-affix-wrapper`))}},Le=ke=>{const{componentCls:Se,colorError:Ue,colorWarning:je,borderRadiusLG:_t,borderRadiusSM:vt}=ke;return{[`${Se}-group`]:Object.assign(Object.assign(Object.assign({},(0,de.Wf)(ke)),St(ke)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Se}-group-addon`]:{borderRadius:_t,fontSize:ke.fontSizeLG}},"&-sm":{[`${Se}-group-addon`]:{borderRadius:vt}},"&-status-error":{[`${Se}-group-addon`]:{color:Ue,borderColor:Ue}},"&-status-warning":{[`${Se}-group-addon`]:{color:je,borderColor:je}},"&-disabled":{[`${Se}-group-addon`]:Object.assign({},xe(ke))},[`&:not(${Se}-compact-first-item):not(${Se}-compact-last-item)${Se}-compact-item`]:{[`${Se}, ${Se}-group-addon`]:{borderRadius:0}},[`&:not(${Se}-compact-last-item)${Se}-compact-first-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Se}-compact-first-item)${Se}-compact-last-item`]:{[`${Se}, ${Se}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},gt=ke=>{const{componentCls:Se,antCls:Ue}=ke,je=`${Se}-search`;return{[je]:{[`${Se}`]:{"&:hover, &:focus":{borderColor:ke.colorPrimaryHover,[`+ ${Se}-group-addon ${je}-button:not(${Ue}-btn-primary)`]:{borderInlineStartColor:ke.colorPrimaryHover}}},[`${Se}-affix-wrapper`]:{borderRadius:0},[`${Se}-lg`]:{lineHeight:ke.lineHeightLG-2e-4},[`> ${Se}-group`]:{[`> ${Se}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${je}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:ke.borderRadius,borderEndEndRadius:ke.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${je}-button:not(${Ue}-btn-primary)`]:{color:ke.colorTextDescription,"&:hover":{color:ke.colorPrimaryHover},"&:active":{color:ke.colorPrimaryActive},[`&${Ue}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${je}-button`]:{height:ke.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${je}-button`]:{height:ke.controlHeightLG},[`&-small ${je}-button`]:{height:ke.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Se}-compact-item`]:{[`&:not(${Se}-compact-last-item)`]:{[`${Se}-group-addon`]:{[`${Se}-search-button`]:{marginInlineEnd:-ke.lineWidth,borderRadius:0}}},[`&:not(${Se}-compact-first-item)`]:{[`${Se},${Se}-affix-wrapper`]:{borderRadius:0}},[`> ${Se}-group-addon ${Se}-search-button,
|
|
|
> ${Se},
|
|
|
${Se}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Se}-affix-wrapper-focused`]:{zIndex:2}}}}},qt=ke=>{const{componentCls:Se,paddingLG:Ue}=ke,je=`${Se}-textarea`;return{[je]:{position:"relative","&-show-count":{[`> ${Se}`]:{height:"100%"},[`${Se}-data-count`]:{position:"absolute",bottom:-ke.fontSize*ke.lineHeight,insetInlineEnd:0,color:ke.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Se}`]:{paddingInlineEnd:Ue}},[`&-affix-wrapper${je}-has-feedback`]:{[`${Se}`]:{paddingInlineEnd:Ue}},[`&-affix-wrapper${Se}-affix-wrapper`]:{padding:0,[`> textarea${Se}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${Se}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Se}-clear-icon`]:{position:"absolute",insetInlineEnd:ke.paddingXS,insetBlockStart:ke.paddingXS},[`${je}-suffix`]:{position:"absolute",top:0,insetInlineEnd:ke.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function tt(ke){return(0,Be.TS)(ke,{inputAffixPadding:ke.paddingXXS})}const ct=ke=>{const{controlHeight:Se,fontSize:Ue,lineHeight:je,lineWidth:_t,controlHeightSM:vt,controlHeightLG:kt,fontSizeLG:Xe,lineHeightLG:Kt,paddingSM:Ot,controlPaddingHorizontalSM:bn,controlPaddingHorizontal:Nt,colorFillAlter:sn,colorPrimaryHover:Cn,controlOutlineWidth:or,controlOutline:Qe,colorErrorOutline:Ce,colorWarningOutline:ht}=ke;return{paddingBlock:Math.max(Math.round((Se-Ue*je)/2*10)/10-_t,3),paddingBlockSM:Math.max(Math.round((vt-Ue*je)/2*10)/10-_t,0),paddingBlockLG:Math.ceil((kt-Xe*Kt)/2*10)/10-_t,paddingInline:Ot-_t,paddingInlineSM:bn-_t,paddingInlineLG:Nt-_t,addonBg:sn,activeBorderColor:Cn,hoverBorderColor:Cn,activeShadow:`0 0 0 ${or}px ${Qe}`,errorActiveShadow:`0 0 0 ${or}px ${Ce}`,warningActiveShadow:`0 0 0 ${or}px ${ht}`}};Wt.ZP=(0,Ve.Z)("Input",ke=>{const Se=(0,Be.TS)(ke,tt(ke));return[ft(Se),qt(Se),Je(Se),Le(Se),gt(Se),(0,He.c)(Se)]},ct)},71322:function(En,Wt,se){"use strict";se.d(Wt,{D:function(){return qt},Z:function(){return ke}});var de=se(87462),He=se(67294),Be={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"},Ve=Be,ve=se(74643),we=function(Ue,je){return He.createElement(ve.Z,(0,de.Z)({},Ue,{ref:je,icon:Ve}))},Ee=He.forwardRef(we),xe=se(22751),me=se(91034),Ie=se(94184),ot=se.n(Ie),Oe=se(10366),ft=Se=>!isNaN(parseFloat(Se))&&isFinite(Se),it=se(53124),Je=se(84321),Le=function(Se,Ue){var je={};for(var _t in Se)Object.prototype.hasOwnProperty.call(Se,_t)&&Ue.indexOf(_t)<0&&(je[_t]=Se[_t]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,_t=Object.getOwnPropertySymbols(Se);vt<_t.length;vt++)Ue.indexOf(_t[vt])<0&&Object.prototype.propertyIsEnumerable.call(Se,_t[vt])&&(je[_t[vt]]=Se[_t[vt]]);return je};const gt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},qt=He.createContext({}),tt=(()=>{let Se=0;return function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Se+=1,`${Ue}${Se}`}})();var ke=He.forwardRef((Se,Ue)=>{const{prefixCls:je,className:_t,trigger:vt,children:kt,defaultCollapsed:Xe=!1,theme:Kt="dark",style:Ot={},collapsible:bn=!1,reverseArrow:Nt=!1,width:sn=200,collapsedWidth:Cn=80,zeroWidthTriggerStyle:or,breakpoint:Qe,onCollapse:Ce,onBreakpoint:ht}=Se,Ut=Le(Se,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Yt}=(0,He.useContext)(Je.Gs),[Ge,rt]=(0,He.useState)("collapsed"in Se?Se.collapsed:Xe),[jt,_n]=(0,He.useState)(!1);(0,He.useEffect)(()=>{"collapsed"in Se&&rt(Se.collapsed)},[Se.collapsed]);const rn=(ue,le)=>{"collapsed"in Se||rt(ue),Ce==null||Ce(ue,le)},$t=(0,He.useRef)();$t.current=ue=>{_n(ue.matches),ht==null||ht(ue.matches),Ge!==ue.matches&&rn(ue.matches,"responsive")},(0,He.useEffect)(()=>{function ue(pe){return $t.current(pe)}let le;if(typeof window!="undefined"){const{matchMedia:pe}=window;if(pe&&Qe&&Qe in gt){le=pe(`(max-width: ${gt[Qe]})`);try{le.addEventListener("change",ue)}catch(he){le.addListener(ue)}ue(le)}}return()=>{try{le==null||le.removeEventListener("change",ue)}catch(pe){le==null||le.removeListener(ue)}}},[Qe]),(0,He.useEffect)(()=>{const ue=tt("ant-sider-");return Yt.addSider(ue),()=>Yt.removeSider(ue)},[]);const Zt=()=>{rn(!Ge,"clickTrigger")},{getPrefixCls:yn}=(0,He.useContext)(it.E_),ln=()=>{const ue=yn("layout-sider",je),le=(0,Oe.Z)(Ut,["collapsed"]),pe=Ge?Cn:sn,he=ft(pe)?`${pe}px`:String(pe),oe=parseFloat(String(Cn||0))===0?He.createElement("span",{onClick:Zt,className:ot()(`${ue}-zero-width-trigger`,`${ue}-zero-width-trigger-${Nt?"right":"left"}`),style:or},vt||He.createElement(Ee,null)):null,Lt={expanded:Nt?He.createElement(me.Z,null):He.createElement(xe.Z,null),collapsed:Nt?He.createElement(xe.Z,null):He.createElement(me.Z,null)}[Ge?"collapsed":"expanded"],Rt=vt!==null?oe||He.createElement("div",{className:`${ue}-trigger`,onClick:Zt,style:{width:he}},vt||Lt):null,Ft=Object.assign(Object.assign({},Ot),{flex:`0 0 ${he}`,maxWidth:he,minWidth:he,width:he}),Jt=ot()(ue,`${ue}-${Kt}`,{[`${ue}-collapsed`]:!!Ge,[`${ue}-has-trigger`]:bn&&vt!==null&&!oe,[`${ue}-below`]:!!jt,[`${ue}-zero-width`]:parseFloat(he)===0},_t);return He.createElement("aside",Object.assign({className:Jt},le,{style:Ft,ref:Ue}),He.createElement("div",{className:`${ue}-children`},kt),bn||jt&&oe?Rt:null)},Ae=He.useMemo(()=>({siderCollapsed:Ge}),[Ge]);return He.createElement(qt.Provider,{value:Ae},ln())})},84321:function(En,Wt,se){"use strict";se.d(Wt,{VY:function(){return tt},$_:function(){return qt},h4:function(){return gt},Gs:function(){return St},ZP:function(){return ct}});var de=se(74902),He=se(94184),Be=se.n(He),Ve=se(10366),ve=se(67294),we=se(53124),Ee=se(67968),me=ke=>{const{componentCls:Se,bodyBg:Ue,lightSiderBg:je,lightTriggerBg:_t,lightTriggerColor:vt}=ke;return{[`${Se}-sider-light`]:{background:je,[`${Se}-sider-trigger`]:{color:vt,background:_t},[`${Se}-sider-zero-width-trigger`]:{color:vt,background:_t,border:`1px solid ${Ue}`,borderInlineStart:0}}}};const Ie=ke=>{const{antCls:Se,componentCls:Ue,colorText:je,triggerColor:_t,footerBg:vt,triggerBg:kt,headerHeight:Xe,headerPadding:Kt,headerColor:Ot,footerPadding:bn,triggerHeight:Nt,zeroTriggerHeight:sn,zeroTriggerWidth:Cn,motionDurationMid:or,motionDurationSlow:Qe,fontSize:Ce,borderRadius:ht,bodyBg:Ut,headerBg:Yt,siderBg:Ge}=ke;return{[Ue]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Ut,"&, *":{boxSizing:"border-box"},[`&${Ue}-has-sider`]:{flexDirection:"row",[`> ${Ue}, > ${Ue}-content`]:{width:0}},[`${Ue}-header, &${Ue}-footer`]:{flex:"0 0 auto"},[`${Ue}-sider`]:{position:"relative",minWidth:0,background:Ge,transition:`all ${or}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Se}-menu${Se}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Nt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Nt,color:_t,lineHeight:`${Nt}px`,textAlign:"center",background:kt,cursor:"pointer",transition:`all ${or}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Xe,insetInlineEnd:-Cn,zIndex:1,width:Cn,height:sn,color:_t,fontSize:ke.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ge,borderStartStartRadius:0,borderStartEndRadius:ht,borderEndEndRadius:ht,borderEndStartRadius:0,cursor:"pointer",transition:`background ${Qe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Qe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Cn,borderStartStartRadius:ht,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ht}}}}},me(ke)),{"&-rtl":{direction:"rtl"}}),[`${Ue}-header`]:{height:Xe,padding:Kt,color:Ot,lineHeight:`${Xe}px`,background:Yt,[`${Se}-menu`]:{lineHeight:"inherit"}},[`${Ue}-footer`]:{padding:bn,color:je,fontSize:Ce,background:vt},[`${Ue}-content`]:{flex:"auto",minHeight:0}}};var ot=(0,Ee.Z)("Layout",ke=>[Ie(ke)],ke=>{const{colorBgLayout:Se,controlHeight:Ue,controlHeightLG:je,colorText:_t,controlHeightSM:vt,marginXXS:kt,colorTextLightSolid:Xe,colorBgContainer:Kt}=ke,Ot=je*1.25;return{colorBgHeader:"#001529",colorBgBody:Se,colorBgTrigger:"#002140",bodyBg:Se,headerBg:"#001529",headerHeight:Ue*2,headerPadding:`0 ${Ot}px`,headerColor:_t,footerPadding:`${vt}px ${Ot}px`,footerBg:Se,siderBg:"#001529",triggerHeight:je+kt*2,triggerBg:"#002140",triggerColor:Xe,zeroTriggerWidth:je,zeroTriggerHeight:je,lightSiderBg:Kt,lightTriggerBg:Kt,lightTriggerColor:_t}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),Oe=function(ke,Se){var Ue={};for(var je in ke)Object.prototype.hasOwnProperty.call(ke,je)&&Se.indexOf(je)<0&&(Ue[je]=ke[je]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,je=Object.getOwnPropertySymbols(ke);_t<je.length;_t++)Se.indexOf(je[_t])<0&&Object.prototype.propertyIsEnumerable.call(ke,je[_t])&&(Ue[je[_t]]=ke[je[_t]]);return Ue};const St=ve.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ft(ke){let{suffixCls:Se,tagName:Ue,displayName:je}=ke;return _t=>ve.forwardRef((kt,Xe)=>ve.createElement(_t,Object.assign({ref:Xe,suffixCls:Se,tagName:Ue},kt)))}const it=ve.forwardRef((ke,Se)=>{const{prefixCls:Ue,suffixCls:je,className:_t,tagName:vt}=ke,kt=Oe(ke,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Xe}=ve.useContext(we.E_),Kt=Xe("layout",Ue),[Ot,bn]=ot(Kt),Nt=je?`${Kt}-${je}`:Kt;return Ot(ve.createElement(vt,Object.assign({className:Be()(Ue||Nt,_t,bn),ref:Se},kt)))}),Je=ve.forwardRef((ke,Se)=>{const{direction:Ue}=ve.useContext(we.E_),[je,_t]=ve.useState([]),{prefixCls:vt,className:kt,rootClassName:Xe,children:Kt,hasSider:Ot,tagName:bn,style:Nt}=ke,sn=Oe(ke,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Cn=(0,Ve.Z)(sn,["suffixCls"]),{getPrefixCls:or,layout:Qe}=ve.useContext(we.E_),Ce=or("layout",vt),[ht,Ut]=ot(Ce),Yt=Be()(Ce,{[`${Ce}-has-sider`]:typeof Ot=="boolean"?Ot:je.length>0,[`${Ce}-rtl`]:Ue==="rtl"},Qe==null?void 0:Qe.className,kt,Xe,Ut),Ge=ve.useMemo(()=>({siderHook:{addSider:rt=>{_t(jt=>[].concat((0,de.Z)(jt),[rt]))},removeSider:rt=>{_t(jt=>jt.filter(_n=>_n!==rt))}}}),[]);return ht(ve.createElement(St.Provider,{value:Ge},ve.createElement(bn,Object.assign({ref:Se,className:Yt,style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),Nt)},Cn),Kt)))}),Le=ft({tagName:"div",displayName:"Layout"})(Je),gt=ft({suffixCls:"header",tagName:"header",displayName:"Header"})(it),qt=ft({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(it),tt=ft({suffixCls:"content",tagName:"main",displayName:"Content"})(it);var ct=Le},76529:function(En,Wt,se){"use strict";se.d(Wt,{J:function(){return we}});var de=se(67294),He=se(4173),Be=se(60276),Ve=function(Ee,xe){var me={};for(var Ie in Ee)Object.prototype.hasOwnProperty.call(Ee,Ie)&&xe.indexOf(Ie)<0&&(me[Ie]=Ee[Ie]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,Ie=Object.getOwnPropertySymbols(Ee);ot<Ie.length;ot++)xe.indexOf(Ie[ot])<0&&Object.prototype.propertyIsEnumerable.call(Ee,Ie[ot])&&(me[Ie[ot]]=Ee[Ie[ot]]);return me};const ve=de.createContext(null),we=de.forwardRef((Ee,xe)=>{const{children:me}=Ee,Ie=Ve(Ee,["children"]),ot=de.useContext(ve),Oe=de.useMemo(()=>Object.assign(Object.assign({},ot),Ie),[ot,Ie.prefixCls,Ie.mode,Ie.selectable]);return de.createElement(ve.Provider,{value:Oe},de.createElement(He.BR,null,(0,Be.supportNodeRef)(me)?de.cloneElement(me,{ref:xe}):me))});Wt.Z=ve},68508:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return ue}});var de=se(78595),He=se(67294),Be=se(71322),Ve=se(94184),ve=se.n(Ve),we=se(53124),Ee=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,oe=Object.getOwnPropertySymbols(le);Te<oe.length;Te++)pe.indexOf(oe[Te])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Te])&&(he[oe[Te]]=le[oe[Te]]);return he},me=le=>{const{prefixCls:pe,className:he,dashed:oe}=le,Te=Ee(le,["prefixCls","className","dashed"]),{getPrefixCls:Ye}=He.useContext(we.E_),Lt=Ye("menu",pe),Rt=ve()({[`${Lt}-item-divider-dashed`]:!!oe},he);return He.createElement(de.iz,Object.assign({className:Rt},Te))},Ie=se(37419),ot=se(10366),Oe=se(83062),St=se(96159),it=(0,He.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Le=le=>{var pe;const{className:he,children:oe,icon:Te,title:Ye,danger:Lt}=le,{prefixCls:Rt,firstLevel:Ft,direction:Jt,disableMenuItemTitleTooltip:Xt,inlineCollapsed:Hn}=He.useContext(it),Rn=Ht=>{const Fn=He.createElement("span",{className:`${Rt}-title-content`},oe);return(!Te||(0,St.l$)(oe)&&oe.type==="span")&&oe&&Ht&&Ft&&typeof oe=="string"?He.createElement("div",{className:`${Rt}-inline-collapsed-noicon`},oe.charAt(0)):Fn},{siderCollapsed:Tt}=He.useContext(Be.D);let dn=Ye;typeof Ye=="undefined"?dn=Ft?oe:"":Ye===!1&&(dn="");const cr={title:dn};!Tt&&!Hn&&(cr.title=null,cr.open=!1);const Mr=(0,Ie.Z)(oe).length;let at=He.createElement(de.ck,Object.assign({},(0,ot.Z)(le,["title","icon","danger"]),{className:ve()({[`${Rt}-item-danger`]:Lt,[`${Rt}-item-only-child`]:(Te?Mr+1:Mr)===1},he),title:typeof Ye=="string"?Ye:void 0}),(0,St.Tm)(Te,{className:ve()((0,St.l$)(Te)?(pe=Te.props)===null||pe===void 0?void 0:pe.className:"",`${Rt}-item-icon`)}),Rn(Hn));return Xt||(at=He.createElement(Oe.Z,Object.assign({},cr,{placement:Jt==="rtl"?"left":"right",overlayClassName:`${Rt}-inline-collapsed-tooltip`}),at)),at},qt=le=>{var pe;const{popupClassName:he,icon:oe,title:Te,theme:Ye}=le,Lt=He.useContext(it),{prefixCls:Rt,inlineCollapsed:Ft,theme:Jt}=Lt,Xt=(0,de.Xl)();let Hn;if(!oe)Hn=Ft&&!Xt.length&&Te&&typeof Te=="string"?He.createElement("div",{className:`${Rt}-inline-collapsed-noicon`},Te.charAt(0)):He.createElement("span",{className:`${Rt}-title-content`},Te);else{const Tt=(0,St.l$)(Te)&&Te.type==="span";Hn=He.createElement(He.Fragment,null,(0,St.Tm)(oe,{className:ve()((0,St.l$)(oe)?(pe=oe.props)===null||pe===void 0?void 0:pe.className:"",`${Rt}-item-icon`)}),Tt?Te:He.createElement("span",{className:`${Rt}-title-content`},Te))}const Rn=He.useMemo(()=>Object.assign(Object.assign({},Lt),{firstLevel:!1}),[Lt]);return He.createElement(it.Provider,{value:Rn},He.createElement(de.Wd,Object.assign({},(0,ot.Z)(le,["icon"]),{title:Hn,popupClassName:ve()(Rt,he,`${Rt}-${Ye||Jt}`)})))},tt=se(25877),ct=se(60276),ke=se(33603),Se=se(76529),Ue=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,oe=Object.getOwnPropertySymbols(le);Te<oe.length;Te++)pe.indexOf(oe[Te])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Te])&&(he[oe[Te]]=le[oe[Te]]);return he};function je(le){return(le||[]).map((pe,he)=>{if(pe&&typeof pe=="object"){const oe=pe,{label:Te,children:Ye,key:Lt,type:Rt}=oe,Ft=Ue(oe,["label","children","key","type"]),Jt=Lt!=null?Lt:`tmp-${he}`;return Ye||Rt==="group"?Rt==="group"?He.createElement(de.BW,Object.assign({key:Jt},Ft,{title:Te}),je(Ye)):He.createElement(qt,Object.assign({key:Jt},Ft,{title:Te}),je(Ye)):Rt==="divider"?He.createElement(me,Object.assign({key:Jt},Ft)):He.createElement(Le,Object.assign({key:Jt},Ft),Te)}return null}).filter(pe=>pe)}function _t(le){return He.useMemo(()=>le&&je(le),[le])}var vt=se(84780),kt=se(14747),Xe=se(33507),Kt=se(67771),Ot=se(50438),bn=se(67968),Nt=se(45503),Cn=le=>{const{componentCls:pe,motionDurationSlow:he,horizontalLineHeight:oe,colorSplit:Te,lineWidth:Ye,lineType:Lt,itemPaddingInline:Rt}=le;return{[`${pe}-horizontal`]:{lineHeight:oe,border:0,borderBottom:`${Ye}px ${Lt} ${Te}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${pe}-item, ${pe}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Rt},[`> ${pe}-item:hover,
|
|
|
> ${pe}-item-active,
|
|
|
> ${pe}-submenu ${pe}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${pe}-item, ${pe}-submenu-title`]:{transition:[`border-color ${he}`,`background ${he}`].join(",")},[`${pe}-submenu-arrow`]:{display:"none"}}}},Qe=le=>{let{componentCls:pe,menuArrowOffset:he}=le;return{[`${pe}-rtl`]:{direction:"rtl"},[`${pe}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${pe}-rtl${pe}-vertical,
|
|
|
${pe}-submenu-rtl ${pe}-vertical`]:{[`${pe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${he})`},"&::after":{transform:`rotate(45deg) translateY(${he})`}}}}};const Ce=le=>Object.assign({},(0,kt.oN)(le));var Ut=(le,pe)=>{const{componentCls:he,itemColor:oe,itemSelectedColor:Te,groupTitleColor:Ye,itemBg:Lt,subMenuItemBg:Rt,itemSelectedBg:Ft,activeBarHeight:Jt,activeBarWidth:Xt,activeBarBorderWidth:Hn,motionDurationSlow:Rn,motionEaseInOut:Tt,motionEaseOut:dn,itemPaddingInline:cr,motionDurationMid:Mr,itemHoverColor:at,lineType:Ht,colorSplit:Fn,itemDisabledColor:er,dangerItemColor:nr,dangerItemHoverColor:Sr,dangerItemSelectedColor:Tr,dangerItemActiveBg:Er,dangerItemSelectedBg:Or,itemHoverBg:Vr,itemActiveBg:ur,menuSubMenuBg:si,horizontalItemSelectedColor:Li,horizontalItemSelectedBg:Bi,horizontalItemBorderRadius:Hi,horizontalItemHoverBg:ri,popupBg:yt}=le;return{[`${he}-${pe}, ${he}-${pe} > ${he}`]:{color:oe,background:Lt,[`&${he}-root:focus-visible`]:Object.assign({},Ce(le)),[`${he}-item-group-title`]:{color:Ye},[`${he}-submenu-selected`]:{[`> ${he}-submenu-title`]:{color:Te}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{color:`${er} !important`},[`${he}-item:not(${he}-item-selected):not(${he}-submenu-selected)`]:{[`&:hover, > ${he}-submenu-title:hover`]:{color:at}},[`&:not(${he}-horizontal)`]:{[`${he}-item:not(${he}-item-selected)`]:{"&:hover":{backgroundColor:Vr},"&:active":{backgroundColor:ur}},[`${he}-submenu-title`]:{"&:hover":{backgroundColor:Vr},"&:active":{backgroundColor:ur}}},[`${he}-item-danger`]:{color:nr,[`&${he}-item:hover`]:{[`&:not(${he}-item-selected):not(${he}-submenu-selected)`]:{color:Sr}},[`&${he}-item:active`]:{background:Er}},[`${he}-item a`]:{"&, &:hover":{color:"inherit"}},[`${he}-item-selected`]:{color:Te,[`&${he}-item-danger`]:{color:Tr},"a, a:hover":{color:"inherit"}},[`& ${he}-item-selected`]:{backgroundColor:Ft,[`&${he}-item-danger`]:{backgroundColor:Or}},[`${he}-item, ${he}-submenu-title`]:{[`&:not(${he}-item-disabled):focus-visible`]:Object.assign({},Ce(le))},[`&${he}-submenu > ${he}`]:{backgroundColor:si},[`&${he}-popup > ${he}`]:{backgroundColor:yt},[`&${he}-horizontal`]:Object.assign(Object.assign({},pe==="dark"?{borderBottom:0}:{}),{[`> ${he}-item, > ${he}-submenu`]:{top:Hn,marginTop:-Hn,marginBottom:0,borderRadius:Hi,"&::after":{position:"absolute",insetInline:cr,bottom:0,borderBottom:`${Jt}px solid transparent`,transition:`border-color ${Rn} ${Tt}`,content:'""'},"&:hover, &-active, &-open":{background:ri,"&::after":{borderBottomWidth:Jt,borderBottomColor:Li}},"&-selected":{color:Li,backgroundColor:Bi,"&:hover":{backgroundColor:Bi},"&::after":{borderBottomWidth:Jt,borderBottomColor:Li}}}}),[`&${he}-root`]:{[`&${he}-inline, &${he}-vertical`]:{borderInlineEnd:`${Hn}px ${Ht} ${Fn}`}},[`&${he}-inline`]:{[`${he}-sub${he}-inline`]:{background:Rt},[`${he}-item, ${he}-submenu-title`]:Hn&&Xt?{width:`calc(100% + ${Hn}px)`}:{},[`${he}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Xt}px solid ${Te}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Mr} ${dn}`,`opacity ${Mr} ${dn}`].join(","),content:'""'},[`&${he}-item-danger`]:{"&::after":{borderInlineEndColor:Tr}}},[`${he}-selected, ${he}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Mr} ${Tt}`,`opacity ${Mr} ${Tt}`].join(",")}}}}}};const Yt=le=>{const{componentCls:pe,itemHeight:he,itemMarginInline:oe,padding:Te,menuArrowSize:Ye,marginXS:Lt,itemMarginBlock:Rt}=le,Ft=Te+Ye+Lt;return{[`${pe}-item`]:{position:"relative",overflow:"hidden"},[`${pe}-item, ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`,paddingInline:Te,overflow:"hidden",textOverflow:"ellipsis",marginInline:oe,marginBlock:Rt,width:`calc(100% - ${oe*2}px)`},[`> ${pe}-item,
|
|
|
> ${pe}-submenu > ${pe}-submenu-title`]:{height:he,lineHeight:`${he}px`},[`${pe}-item-group-list ${pe}-submenu-title,
|
|
|
${pe}-submenu-title`]:{paddingInlineEnd:Ft}}};var rt=le=>{const{componentCls:pe,iconCls:he,itemHeight:oe,colorTextLightSolid:Te,dropdownWidth:Ye,controlHeightLG:Lt,motionDurationMid:Rt,motionEaseOut:Ft,paddingXL:Jt,itemMarginInline:Xt,fontSizeLG:Hn,motionDurationSlow:Rn,paddingXS:Tt,boxShadowSecondary:dn,collapsedWidth:cr,collapsedIconSize:Mr}=le,at={height:oe,lineHeight:`${oe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[pe]:{"&-inline, &-vertical":Object.assign({[`&${pe}-root`]:{boxShadow:"none"}},Yt(le))},[`${pe}-submenu-popup`]:{[`${pe}-vertical`]:Object.assign(Object.assign({},Yt(le)),{boxShadow:dn})}},{[`${pe}-submenu-popup ${pe}-vertical${pe}-sub`]:{minWidth:Ye,maxHeight:`calc(100vh - ${Lt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${pe}-inline`]:{width:"100%",[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Rn}`,`background ${Rn}`,`padding ${Rt} ${Ft}`].join(","),[`> ${pe}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${pe}-sub${pe}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${pe}-submenu > ${pe}-submenu-title`]:at,[`& ${pe}-item-group-title`]:{paddingInlineStart:Jt}},[`${pe}-item`]:at}},{[`${pe}-inline-collapsed`]:{width:cr,[`&${pe}-root`]:{[`${pe}-item, ${pe}-submenu ${pe}-submenu-title`]:{[`> ${pe}-inline-collapsed-noicon`]:{fontSize:Hn,textAlign:"center"}}},[`> ${pe}-item,
|
|
|
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-item,
|
|
|
> ${pe}-item-group > ${pe}-item-group-list > ${pe}-submenu > ${pe}-submenu-title,
|
|
|
> ${pe}-submenu > ${pe}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Hn/2}px - ${Xt}px)`,textOverflow:"clip",[`
|
|
|
${pe}-submenu-arrow,
|
|
|
${pe}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${pe}-item-icon, ${he}`]:{margin:0,fontSize:Mr,lineHeight:`${oe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${pe}-item-icon, ${he}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${pe}-item-icon, ${he}`]:{display:"none"},"a, a:hover":{color:Te}},[`${pe}-item-group-title`]:Object.assign(Object.assign({},kt.vS),{paddingInline:Tt})}}]};const jt=le=>{const{componentCls:pe,motionDurationSlow:he,motionDurationMid:oe,motionEaseInOut:Te,motionEaseOut:Ye,iconCls:Lt,iconSize:Rt,iconMarginInlineEnd:Ft}=le;return{[`${pe}-item, ${pe}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${he}`,`background ${he}`,`padding ${he} ${Te}`].join(","),[`${pe}-item-icon, ${Lt}`]:{minWidth:Rt,fontSize:Rt,transition:[`font-size ${oe} ${Ye}`,`margin ${he} ${Te}`,`color ${he}`].join(","),"+ span":{marginInlineStart:Ft,opacity:1,transition:[`opacity ${he} ${Te}`,`margin ${he}`,`color ${he}`].join(",")}},[`${pe}-item-icon`]:Object.assign({},(0,kt.Ro)()),[`&${pe}-item-only-child`]:{[`> ${Lt}, > ${pe}-item-icon`]:{marginInlineEnd:0}}},[`${pe}-item-disabled, ${pe}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${pe}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},_n=le=>{const{componentCls:pe,motionDurationSlow:he,motionEaseInOut:oe,borderRadius:Te,menuArrowSize:Ye,menuArrowOffset:Lt}=le;return{[`${pe}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:le.margin,width:Ye,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${he} ${oe}, opacity ${he}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ye*.6,height:Ye*.15,backgroundColor:"currentcolor",borderRadius:Te,transition:[`background ${he} ${oe}`,`transform ${he} ${oe}`,`top ${he} ${oe}`,`color ${he} ${oe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Lt})`},"&::after":{transform:`rotate(-45deg) translateY(${Lt})`}}}}},rn=le=>{const{antCls:pe,componentCls:he,fontSize:oe,motionDurationSlow:Te,motionDurationMid:Ye,motionEaseInOut:Lt,paddingXS:Rt,padding:Ft,colorSplit:Jt,lineWidth:Xt,zIndexPopup:Hn,borderRadiusLG:Rn,subMenuItemBorderRadius:Tt,menuArrowSize:dn,menuArrowOffset:cr,lineType:Mr,menuPanelMaskInset:at,groupTitleLineHeight:Ht,groupTitleFontSize:Fn}=le;return[{"":{[`${he}`]:Object.assign(Object.assign({},(0,kt.dF)()),{"&-hidden":{display:"none"}})},[`${he}-submenu-hidden`]:{display:"none"}},{[he]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,kt.Wf)(le)),(0,kt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:oe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Te} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${he}-item`]:{flex:"none"}},[`${he}-item, ${he}-submenu, ${he}-submenu-title`]:{borderRadius:le.itemBorderRadius},[`${he}-item-group-title`]:{padding:`${Rt}px ${Ft}px`,fontSize:Fn,lineHeight:Ht,transition:`all ${Te}`},[`&-horizontal ${he}-submenu`]:{transition:[`border-color ${Te} ${Lt}`,`background ${Te} ${Lt}`].join(",")},[`${he}-submenu, ${he}-submenu-inline`]:{transition:[`border-color ${Te} ${Lt}`,`background ${Te} ${Lt}`,`padding ${Ye} ${Lt}`].join(",")},[`${he}-submenu ${he}-sub`]:{cursor:"initial",transition:[`background ${Te} ${Lt}`,`padding ${Te} ${Lt}`].join(",")},[`${he}-title-content`]:{transition:`color ${Te}`},[`${he}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${he}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Jt,borderStyle:Mr,borderWidth:0,borderTopWidth:Xt,marginBlock:Xt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),jt(le)),{[`${he}-item-group`]:{[`${he}-item-group-list`]:{margin:0,padding:0,[`${he}-item, ${he}-submenu-title`]:{paddingInline:`${oe*2}px ${Ft}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Hn,borderRadius:Rn,boxShadow:"none",transformOrigin:"0 0",[`&${he}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${at}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:at},"\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},[`> ${he}`]:Object.assign(Object.assign(Object.assign({borderRadius:Rn},jt(le)),_n(le)),{[`${he}-item, ${he}-submenu > ${he}-submenu-title`]:{borderRadius:Tt},[`${he}-submenu-title::after`]:{transition:`transform ${Te} ${Lt}`}})}}),_n(le)),{[`&-inline-collapsed ${he}-submenu-arrow,
|
|
|
&-inline ${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${cr})`},"&::after":{transform:`rotate(45deg) translateX(-${cr})`}},[`${he}-submenu-open${he}-submenu-inline > ${he}-submenu-title > ${he}-submenu-arrow`]:{transform:`translateY(-${dn*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${cr})`},"&::before":{transform:`rotate(45deg) translateX(${cr})`}}})},{[`${pe}-layout-header`]:{[he]:{lineHeight:"inherit"}}}]};var $t=(le,pe)=>(0,bn.Z)("Menu",oe=>{if(pe===!1)return[];const{colorBgElevated:Te,colorPrimary:Ye,colorTextLightSolid:Lt,controlHeightLG:Rt,fontSize:Ft,darkItemColor:Jt,darkDangerItemColor:Xt,darkItemBg:Hn,darkSubMenuItemBg:Rn,darkItemSelectedColor:Tt,darkItemSelectedBg:dn,darkDangerItemSelectedBg:cr,darkItemHoverBg:Mr,darkGroupTitleColor:at,darkItemHoverColor:Ht,darkItemDisabledColor:Fn,darkDangerItemHoverColor:er,darkDangerItemSelectedColor:nr,darkDangerItemActiveBg:Sr}=oe,Tr=Ft/7*5,Er=(0,Nt.TS)(oe,{menuArrowSize:Tr,menuHorizontalHeight:Rt*1.15,menuArrowOffset:`${Tr*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Te}),Or=(0,Nt.TS)(Er,{itemColor:Jt,itemHoverColor:Ht,groupTitleColor:at,itemSelectedColor:Tt,itemBg:Hn,popupBg:Hn,subMenuItemBg:Rn,itemActiveBg:"transparent",itemSelectedBg:dn,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Mr,itemDisabledColor:Fn,dangerItemColor:Xt,dangerItemHoverColor:er,dangerItemSelectedColor:nr,dangerItemActiveBg:Sr,dangerItemSelectedBg:cr,menuSubMenuBg:Rn,horizontalItemSelectedColor:Lt,horizontalItemSelectedBg:Ye});return[rn(Er),Cn(Er),rt(Er),Ut(Er,"light"),Ut(Or,"dark"),Qe(Er),(0,Xe.Z)(Er),(0,Kt.oN)(Er,"slide-up"),(0,Kt.oN)(Er,"slide-down"),(0,Ot._y)(Er,"zoom-big")]},oe=>{const{colorPrimary:Te,colorError:Ye,colorTextDisabled:Lt,colorErrorBg:Rt,colorText:Ft,colorTextDescription:Jt,colorBgContainer:Xt,colorFillAlter:Hn,colorFillContent:Rn,lineWidth:Tt,lineWidthBold:dn,controlItemBgActive:cr,colorBgTextHover:Mr,controlHeightLG:at,lineHeight:Ht,colorBgElevated:Fn,marginXXS:er,padding:nr,fontSize:Sr,controlHeightSM:Tr,fontSizeLG:Er,colorTextLightSolid:Or,colorErrorHover:Vr}=oe,ur=new vt.C(Or).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:oe.zIndexPopupBase+50,radiusItem:oe.borderRadiusLG,itemBorderRadius:oe.borderRadiusLG,radiusSubMenuItem:oe.borderRadiusSM,subMenuItemBorderRadius:oe.borderRadiusSM,colorItemText:Ft,itemColor:Ft,colorItemTextHover:Ft,itemHoverColor:Ft,colorItemTextHoverHorizontal:Te,horizontalItemHoverColor:Te,colorGroupTitle:Jt,groupTitleColor:Jt,colorItemTextSelected:Te,itemSelectedColor:Te,colorItemTextSelectedHorizontal:Te,horizontalItemSelectedColor:Te,colorItemBg:Xt,itemBg:Xt,colorItemBgHover:Mr,itemHoverBg:Mr,colorItemBgActive:Rn,itemActiveBg:cr,colorSubItemBg:Hn,subMenuItemBg:Hn,colorItemBgSelected:cr,itemSelectedBg:cr,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:dn,activeBarHeight:dn,colorActiveBarBorderSize:Tt,activeBarBorderWidth:Tt,colorItemTextDisabled:Lt,itemDisabledColor:Lt,colorDangerItemText:Ye,dangerItemColor:Ye,colorDangerItemTextHover:Ye,dangerItemHoverColor:Ye,colorDangerItemTextSelected:Ye,dangerItemSelectedColor:Ye,colorDangerItemBgActive:Rt,dangerItemActiveBg:Rt,colorDangerItemBgSelected:Rt,dangerItemSelectedBg:Rt,itemMarginInline:oe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:at,groupTitleLineHeight:Ht,collapsedWidth:at*2,popupBg:Fn,itemMarginBlock:er,itemPaddingInline:nr,horizontalLineHeight:`${at*1.15}px`,iconSize:Sr,iconMarginInlineEnd:Tr-Sr,collapsedIconSize:Er,groupTitleFontSize:Sr,darkItemDisabledColor:new vt.C(Or).setAlpha(.25).toRgbString(),darkItemColor:ur,darkDangerItemColor:Ye,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Or,darkItemSelectedBg:Te,darkDangerItemSelectedBg:Ye,darkItemHoverBg:"transparent",darkGroupTitleColor:ur,darkItemHoverColor:Or,darkDangerItemHoverColor:Vr,darkDangerItemSelectedColor:Or,darkDangerItemActiveBg:Ye}},{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),Zt=function(le,pe){var he={};for(var oe in le)Object.prototype.hasOwnProperty.call(le,oe)&&pe.indexOf(oe)<0&&(he[oe]=le[oe]);if(le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,oe=Object.getOwnPropertySymbols(le);Te<oe.length;Te++)pe.indexOf(oe[Te])<0&&Object.prototype.propertyIsEnumerable.call(le,oe[Te])&&(he[oe[Te]]=le[oe[Te]]);return he},ln=(0,He.forwardRef)((le,pe)=>{var he,oe;const Te=He.useContext(Se.Z),Ye=Te||{},{getPrefixCls:Lt,getPopupContainer:Rt,direction:Ft,menu:Jt}=He.useContext(we.E_),Xt=Lt(),{prefixCls:Hn,className:Rn,style:Tt,theme:dn="light",expandIcon:cr,_internalDisableMenuItemTitleTooltip:Mr,inlineCollapsed:at,siderCollapsed:Ht,items:Fn,children:er,rootClassName:nr,mode:Sr,selectable:Tr,onClick:Er,overflowedIndicatorPopupClassName:Or}=le,Vr=Zt(le,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),ur=(0,ot.Z)(Vr,["collapsedWidth"]),si=_t(Fn)||er;(he=Ye.validator)===null||he===void 0||he.call(Ye,{mode:Sr});const Li=(0,ct.useEvent)(function(){var $n;Er==null||Er.apply(void 0,arguments),($n=Ye.onClick)===null||$n===void 0||$n.call(Ye)}),Bi=Ye.mode||Sr,Hi=Tr!=null?Tr:Ye.selectable,ri=He.useMemo(()=>Ht!==void 0?Ht:at,[at,Ht]),yt={horizontal:{motionName:`${Xt}-slide-up`},inline:(0,ke.Z)(Xt),other:{motionName:`${Xt}-zoom-big`}},Mn=Lt("menu",Hn||Ye.prefixCls),[An,Dn]=$t(Mn,!Te),lr=ve()(`${Mn}-${dn}`,Jt==null?void 0:Jt.className,Rn);let qn;if(typeof cr=="function")qn=cr;else if(cr===null||cr===!1)qn=null;else if(Ye.expandIcon===null||Ye.expandIcon===!1)qn=null;else{const $n=cr!=null?cr:Ye.expandIcon;qn=(0,St.Tm)($n,{className:ve()(`${Mn}-submenu-expand-icon`,(0,St.l$)($n)?(oe=$n.props)===null||oe===void 0?void 0:oe.className:"")})}const pr=He.useMemo(()=>({prefixCls:Mn,inlineCollapsed:ri||!1,direction:Ft,firstLevel:!0,theme:dn,mode:Bi,disableMenuItemTitleTooltip:Mr}),[Mn,ri,Ft,Mr,dn]);return An(He.createElement(Se.Z.Provider,{value:null},He.createElement(it.Provider,{value:pr},He.createElement(de.ZP,Object.assign({getPopupContainer:Rt,overflowedIndicator:He.createElement(tt.Z,null),overflowedIndicatorPopupClassName:ve()(Mn,`${Mn}-${dn}`,Or),mode:Bi,selectable:Hi,onClick:Li},ur,{inlineCollapsed:ri,style:Object.assign(Object.assign({},Jt==null?void 0:Jt.style),Tt),className:lr,prefixCls:Mn,direction:Ft,defaultMotions:yt,expandIcon:qn,ref:pe,rootClassName:ve()(nr,Dn)}),si))))});const Ae=(0,He.forwardRef)((le,pe)=>{const he=(0,He.useRef)(null),oe=He.useContext(Be.D);return(0,He.useImperativeHandle)(pe,()=>({menu:he.current,focus:Te=>{var Ye;(Ye=he.current)===null||Ye===void 0||Ye.focus(Te)}})),He.createElement(ln,Object.assign({ref:he},le,oe))});Ae.Item=Le,Ae.SubMenu=qt,Ae.Divider=me,Ae.ItemGroup=de.BW;var ue=Ae},38703:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return Mr}});var de=se(67294),He=se(87725),Be=se(18299),Ve=se(16646),ve=se(73475),we=se(94184),Ee=se.n(we),xe=se(10366),me=se(53124),Ie=se(87462),ot=se(1413),Oe=se(45987),St={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ft=function(){var Ht=(0,de.useRef)([]),Fn=(0,de.useRef)(null);return(0,de.useEffect)(function(){var er=Date.now(),nr=!1;Ht.current.forEach(function(Sr){if(Sr){nr=!0;var Tr=Sr.style;Tr.transitionDuration=".3s, .3s, .3s, .06s",Fn.current&&er-Fn.current<100&&(Tr.transitionDuration="0s, 0s")}}),nr&&(Fn.current=Date.now())}),Ht.current},it=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Je=function(Ht){var Fn=(0,ot.Z)((0,ot.Z)({},St),Ht),er=Fn.className,nr=Fn.percent,Sr=Fn.prefixCls,Tr=Fn.strokeColor,Er=Fn.strokeLinecap,Or=Fn.strokeWidth,Vr=Fn.style,ur=Fn.trailColor,si=Fn.trailWidth,Li=Fn.transition,Bi=(0,Oe.Z)(Fn,it);delete Bi.gapPosition;var Hi=Array.isArray(nr)?nr:[nr],ri=Array.isArray(Tr)?Tr:[Tr],yt=ft(),Mn=Or/2,An=100-Or/2,Dn="M ".concat(Er==="round"?Mn:0,",").concat(Mn,`
|
|
|
L `).concat(Er==="round"?An:100,",").concat(Mn),lr="0 0 100 ".concat(Or),qn=0;return de.createElement("svg",(0,Ie.Z)({className:Ee()("".concat(Sr,"-line"),er),viewBox:lr,preserveAspectRatio:"none",style:Vr},Bi),de.createElement("path",{className:"".concat(Sr,"-line-trail"),d:Dn,strokeLinecap:Er,stroke:ur,strokeWidth:si||Or,fillOpacity:"0"}),Hi.map(function(pr,$n){var qe=1;switch(Er){case"round":qe=1-Or/100;break;case"square":qe=1-Or/2/100;break;default:qe=1;break}var ut={strokeDasharray:"".concat(pr*qe,"px, 100px"),strokeDashoffset:"-".concat(qn,"px"),transition:Li||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Dt=ri[$n]||ri[ri.length-1];return qn+=pr,de.createElement("path",{key:$n,className:"".concat(Sr,"-line-path"),d:Dn,strokeLinecap:Er,stroke:Dt,strokeWidth:Or,fillOpacity:"0",ref:function(We){yt[$n]=We},style:ut})}))},Le=Je,gt=se(71002),qt=se(97685),tt=se(98924),ct=0,ke=(0,tt.Z)();function Se(){var at;return ke?(at=ct,ct+=1):at="TEST_OR_SSR",at}var Ue=function(at){var Ht=de.useState(),Fn=(0,qt.Z)(Ht,2),er=Fn[0],nr=Fn[1];return de.useEffect(function(){nr("rc_progress_".concat(Se()))},[]),at||er},je=function(Ht){var Fn=Ht.bg,er=Ht.children;return de.createElement("div",{style:{width:"100%",height:"100%",background:Fn}},er)};function _t(at,Ht){return Object.keys(at).map(function(Fn){var er=parseFloat(Fn),nr="".concat(Math.floor(er*Ht),"%");return"".concat(at[Fn]," ").concat(nr)})}var vt=de.forwardRef(function(at,Ht){var Fn=at.prefixCls,er=at.color,nr=at.gradientId,Sr=at.radius,Tr=at.style,Er=at.ptg,Or=at.strokeLinecap,Vr=at.strokeWidth,ur=at.size,si=at.gapDegree,Li=er&&(0,gt.Z)(er)==="object",Bi=Li?"#FFF":void 0,Hi=ur/2,ri=de.createElement("circle",{className:"".concat(Fn,"-circle-path"),r:Sr,cx:Hi,cy:Hi,stroke:Bi,strokeLinecap:Or,strokeWidth:Vr,opacity:Er===0?0:1,style:Tr,ref:Ht});if(!Li)return ri;var yt="".concat(nr,"-conic"),Mn=si?"".concat(180+si/2,"deg"):"0deg",An=_t(er,(360-si)/360),Dn=_t(er,1),lr="conic-gradient(from ".concat(Mn,", ").concat(An.join(", "),")"),qn="linear-gradient(to ".concat(si?"bottom":"top",", ").concat(Dn.join(", "),")");return de.createElement(de.Fragment,null,de.createElement("mask",{id:yt},ri),de.createElement("foreignObject",{x:0,y:0,width:ur,height:ur,mask:"url(#".concat(yt,")")},de.createElement(je,{bg:qn},de.createElement(je,{bg:lr}))))}),kt=vt,Xe=100,Kt=function(Ht,Fn,er,nr,Sr,Tr,Er,Or,Vr,ur){var si=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Li=er/100*360*((360-Tr)/360),Bi=Tr===0?0:{bottom:0,top:180,left:90,right:-90}[Er],Hi=(100-nr)/100*Fn;Vr==="round"&&nr!==100&&(Hi+=ur/2,Hi>=Fn&&(Hi=Fn-.01));var ri=Xe/2;return{stroke:typeof Or=="string"?Or:void 0,strokeDasharray:"".concat(Fn,"px ").concat(Ht),strokeDashoffset:Hi+si,transform:"rotate(".concat(Sr+Li+Bi,"deg)"),transformOrigin:"".concat(ri,"px ").concat(ri,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Ot=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function bn(at){var Ht=at!=null?at:[];return Array.isArray(Ht)?Ht:[Ht]}var Nt=function(Ht){var Fn=(0,ot.Z)((0,ot.Z)({},St),Ht),er=Fn.id,nr=Fn.prefixCls,Sr=Fn.steps,Tr=Fn.strokeWidth,Er=Fn.trailWidth,Or=Fn.gapDegree,Vr=Or===void 0?0:Or,ur=Fn.gapPosition,si=Fn.trailColor,Li=Fn.strokeLinecap,Bi=Fn.style,Hi=Fn.className,ri=Fn.strokeColor,yt=Fn.percent,Mn=(0,Oe.Z)(Fn,Ot),An=Xe/2,Dn=Ue(er),lr="".concat(Dn,"-gradient"),qn=An-Tr/2,pr=Math.PI*2*qn,$n=Vr>0?90+Vr/2:-90,qe=pr*((360-Vr)/360),ut=(0,gt.Z)(Sr)==="object"?Sr:{count:Sr,space:2},Dt=ut.count,Vt=ut.space,We=bn(yt),pt=bn(ri),zt=pt.find(function(tr){return tr&&(0,gt.Z)(tr)==="object"}),Bt=zt&&(0,gt.Z)(zt)==="object",en=Bt?"butt":Li,nn=Kt(pr,qe,0,100,$n,Vr,ur,si,en,Tr),jn=ft(),Lr=function(){var dr=0;return We.map(function(fr,mt){var st=pt[mt]||pt[pt.length-1],Ct=Kt(pr,qe,dr,fr,$n,Vr,ur,st,en,Tr);return dr+=fr,de.createElement(kt,{key:mt,color:st,ptg:fr,radius:qn,prefixCls:nr,gradientId:lr,style:Ct,strokeLinecap:en,strokeWidth:Tr,gapDegree:Vr,ref:function(Bn){jn[mt]=Bn},size:Xe})}).reverse()},rr=function(){var dr=Math.round(Dt*(We[0]/100)),fr=100/Dt,mt=0;return new Array(Dt).fill(null).map(function(st,Ct){var fn=Ct<=dr-1?pt[0]:si,Bn=fn&&(0,gt.Z)(fn)==="object"?"url(#".concat(lr,")"):void 0,hn=Kt(pr,qe,mt,fr,$n,Vr,ur,fn,"butt",Tr,Vt);return mt+=(qe-hn.strokeDashoffset+Vt)*100/qe,de.createElement("circle",{key:Ct,className:"".concat(nr,"-circle-path"),r:qn,cx:An,cy:An,stroke:Bn,strokeWidth:Tr,opacity:1,style:hn,ref:function(xn){jn[Ct]=xn}})})};return de.createElement("svg",(0,Ie.Z)({className:Ee()("".concat(nr,"-circle"),Hi),viewBox:"0 0 ".concat(Xe," ").concat(Xe),style:Bi,id:er,role:"presentation"},Mn),!Dt&&de.createElement("circle",{className:"".concat(nr,"-circle-trail"),r:qn,cx:An,cy:An,stroke:si,strokeLinecap:en,strokeWidth:Er||Tr,style:nn}),Dt?rr():Lr())},sn=Nt,Cn={Line:Le,Circle:sn},or=se(83062),Qe=se(47448);function Ce(at){return!at||at<0?0:at>100?100:at}function ht(at){let{success:Ht,successPercent:Fn}=at,er=Fn;return Ht&&"progress"in Ht&&(er=Ht.progress),Ht&&"percent"in Ht&&(er=Ht.percent),er}const Ut=at=>{let{percent:Ht,success:Fn,successPercent:er}=at;const nr=Ce(ht({success:Fn,successPercent:er}));return[nr,Ce(Ce(Ht)-nr)]},Yt=at=>{let{success:Ht={},strokeColor:Fn}=at;const{strokeColor:er}=Ht;return[er||Qe.presetPrimaryColors.green,Fn||null]},Ge=(at,Ht,Fn)=>{var er,nr,Sr,Tr;let Er=-1,Or=-1;if(Ht==="step"){const Vr=Fn.steps,ur=Fn.strokeWidth;typeof at=="string"||typeof at=="undefined"?(Er=at==="small"?2:14,Or=ur!=null?ur:8):typeof at=="number"?[Er,Or]=[at,at]:[Er=14,Or=8]=at,Er*=Vr}else if(Ht==="line"){const Vr=Fn==null?void 0:Fn.strokeWidth;typeof at=="string"||typeof at=="undefined"?Or=Vr||(at==="small"?6:8):typeof at=="number"?[Er,Or]=[at,at]:[Er=-1,Or=8]=at}else(Ht==="circle"||Ht==="dashboard")&&(typeof at=="string"||typeof at=="undefined"?[Er,Or]=at==="small"?[60,60]:[120,120]:typeof at=="number"?[Er,Or]=[at,at]:(Er=(nr=(er=at[0])!==null&&er!==void 0?er:at[1])!==null&&nr!==void 0?nr:120,Or=(Tr=(Sr=at[0])!==null&&Sr!==void 0?Sr:at[1])!==null&&Tr!==void 0?Tr:120));return[Er,Or]},rt=3,jt=at=>rt/at*100;var rn=at=>{const{prefixCls:Ht,trailColor:Fn=null,strokeLinecap:er="round",gapPosition:nr,gapDegree:Sr,width:Tr=120,type:Er,children:Or,success:Vr,size:ur=Tr}=at,[si,Li]=Ge(ur,"circle");let{strokeWidth:Bi}=at;Bi===void 0&&(Bi=Math.max(jt(si),6));const Hi={width:si,height:Li,fontSize:si*.15+6},ri=de.useMemo(()=>{if(Sr||Sr===0)return Sr;if(Er==="dashboard")return 75},[Sr,Er]),yt=nr||Er==="dashboard"&&"bottom"||void 0,Mn=Object.prototype.toString.call(at.strokeColor)==="[object Object]",An=Yt({success:Vr,strokeColor:at.strokeColor}),Dn=Ee()(`${Ht}-inner`,{[`${Ht}-circle-gradient`]:Mn}),lr=de.createElement(sn,{percent:Ut(at),strokeWidth:Bi,trailWidth:Bi,strokeColor:An,strokeLinecap:er,trailColor:Fn,prefixCls:Ht,gapDegree:ri,gapPosition:yt});return de.createElement("div",{className:Dn,style:Hi},si<=20?de.createElement(or.Z,{title:Or},de.createElement("span",null,lr)):de.createElement(de.Fragment,null,lr,Or))},$t=function(at,Ht){var Fn={};for(var er in at)Object.prototype.hasOwnProperty.call(at,er)&&Ht.indexOf(er)<0&&(Fn[er]=at[er]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nr=0,er=Object.getOwnPropertySymbols(at);nr<er.length;nr++)Ht.indexOf(er[nr])<0&&Object.prototype.propertyIsEnumerable.call(at,er[nr])&&(Fn[er[nr]]=at[er[nr]]);return Fn};const Zt=at=>{let Ht=[];return Object.keys(at).forEach(Fn=>{const er=parseFloat(Fn.replace(/%/g,""));isNaN(er)||Ht.push({key:er,value:at[Fn]})}),Ht=Ht.sort((Fn,er)=>Fn.key-er.key),Ht.map(Fn=>{let{key:er,value:nr}=Fn;return`${nr} ${er}%`}).join(", ")},yn=(at,Ht)=>{const{from:Fn=Qe.presetPrimaryColors.blue,to:er=Qe.presetPrimaryColors.blue,direction:nr=Ht==="rtl"?"to left":"to right"}=at,Sr=$t(at,["from","to","direction"]);if(Object.keys(Sr).length!==0){const Tr=Zt(Sr);return{backgroundImage:`linear-gradient(${nr}, ${Tr})`}}return{backgroundImage:`linear-gradient(${nr}, ${Fn}, ${er})`}};var Ae=at=>{const{prefixCls:Ht,direction:Fn,percent:er,size:nr,strokeWidth:Sr,strokeColor:Tr,strokeLinecap:Er="round",children:Or,trailColor:Vr=null,success:ur}=at,si=Tr&&typeof Tr!="string"?yn(Tr,Fn):{backgroundColor:Tr},Li=Er==="square"||Er==="butt"?0:void 0,Bi={backgroundColor:Vr||void 0,borderRadius:Li},Hi=nr!=null?nr:[-1,Sr||(nr==="small"?6:8)],[ri,yt]=Ge(Hi,"line",{strokeWidth:Sr}),Mn=Object.assign({width:`${Ce(er)}%`,height:yt,borderRadius:Li},si),An=ht(at),Dn={width:`${Ce(An)}%`,height:yt,borderRadius:Li,backgroundColor:ur==null?void 0:ur.strokeColor},lr={width:ri<0?"100%":ri,height:yt};return de.createElement(de.Fragment,null,de.createElement("div",{className:`${Ht}-outer`,style:lr},de.createElement("div",{className:`${Ht}-inner`,style:Bi},de.createElement("div",{className:`${Ht}-bg`,style:Mn}),An!==void 0?de.createElement("div",{className:`${Ht}-success-bg`,style:Dn}):null)),Or)},le=at=>{const{size:Ht,steps:Fn,percent:er=0,strokeWidth:nr=8,strokeColor:Sr,trailColor:Tr=null,prefixCls:Er,children:Or}=at,Vr=Math.round(Fn*(er/100)),ur=Ht==="small"?2:14,si=Ht!=null?Ht:[ur,nr],[Li,Bi]=Ge(si,"step",{steps:Fn,strokeWidth:nr}),Hi=Li/Fn,ri=new Array(Fn);for(let yt=0;yt<Fn;yt++){const Mn=Array.isArray(Sr)?Sr[yt]:Sr;ri[yt]=de.createElement("div",{key:yt,className:Ee()(`${Er}-steps-item`,{[`${Er}-steps-item-active`]:yt<=Vr-1}),style:{backgroundColor:yt<=Vr-1?Mn:Tr,width:Hi,height:Bi}})}return de.createElement("div",{className:`${Er}-steps-outer`},ri,Or)},pe=se(45930),he=se(14747),oe=se(67968),Te=se(45503);const Ye=at=>{const Ht=at?"100%":"-100%";return new pe.Keyframes(`antProgress${at?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Ht}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Ht}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Lt=at=>{const{componentCls:Ht,iconCls:Fn}=at;return{[Ht]:Object.assign(Object.assign({},(0,he.Wf)(at)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:at.fontSize,marginInlineEnd:at.marginXS,marginBottom:at.marginXS},[`${Ht}-outer`]:{display:"inline-block",width:"100%"},[`&${Ht}-show-info`]:{[`${Ht}-outer`]:{marginInlineEnd:`calc(-2em - ${at.marginXS}px)`,paddingInlineEnd:`calc(2em + ${at.paddingXS}px)`}},[`${Ht}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:at.remainingColor,borderRadius:at.lineBorderRadius},[`${Ht}-inner:not(${Ht}-circle-gradient)`]:{[`${Ht}-circle-path`]:{stroke:at.defaultColor}},[`${Ht}-success-bg, ${Ht}-bg`]:{position:"relative",backgroundColor:at.defaultColor,borderRadius:at.lineBorderRadius,transition:`all ${at.motionDurationSlow} ${at.motionEaseInOutCirc}`},[`${Ht}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:at.colorSuccess},[`${Ht}-text`]:{display:"inline-block",width:"2em",marginInlineStart:at.marginXS,color:at.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Fn]:{fontSize:at.fontSize}},[`&${Ht}-status-active`]:{[`${Ht}-bg::before`]:{position:"absolute",inset:0,backgroundColor:at.colorBgContainer,borderRadius:at.lineBorderRadius,opacity:0,animationName:Ye(),animationDuration:at.progressActiveMotionDuration,animationTimingFunction:at.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Ht}-rtl${Ht}-status-active`]:{[`${Ht}-bg::before`]:{animationName:Ye(!0)}},[`&${Ht}-status-exception`]:{[`${Ht}-bg`]:{backgroundColor:at.colorError},[`${Ht}-text`]:{color:at.colorError}},[`&${Ht}-status-exception ${Ht}-inner:not(${Ht}-circle-gradient)`]:{[`${Ht}-circle-path`]:{stroke:at.colorError}},[`&${Ht}-status-success`]:{[`${Ht}-bg`]:{backgroundColor:at.colorSuccess},[`${Ht}-text`]:{color:at.colorSuccess}},[`&${Ht}-status-success ${Ht}-inner:not(${Ht}-circle-gradient)`]:{[`${Ht}-circle-path`]:{stroke:at.colorSuccess}}})}},Rt=at=>{const{componentCls:Ht,iconCls:Fn}=at;return{[Ht]:{[`${Ht}-circle-trail`]:{stroke:at.remainingColor},[`&${Ht}-circle ${Ht}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Ht}-circle ${Ht}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:at.circleTextColor,fontSize:at.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Fn]:{fontSize:`${at.fontSize/at.fontSizeSM}em`}},[`${Ht}-circle&-status-exception`]:{[`${Ht}-text`]:{color:at.colorError}},[`${Ht}-circle&-status-success`]:{[`${Ht}-text`]:{color:at.colorSuccess}}},[`${Ht}-inline-circle`]:{lineHeight:1,[`${Ht}-inner`]:{verticalAlign:"bottom"}}}},Ft=at=>{const{componentCls:Ht}=at;return{[Ht]:{[`${Ht}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:at.progressStepMinWidth,marginInlineEnd:at.progressStepMarginInlineEnd,backgroundColor:at.remainingColor,transition:`all ${at.motionDurationSlow}`,"&-active":{backgroundColor:at.defaultColor}}}}}},Jt=at=>{const{componentCls:Ht,iconCls:Fn}=at;return{[Ht]:{[`${Ht}-small&-line, ${Ht}-small&-line ${Ht}-text ${Fn}`]:{fontSize:at.fontSizeSM}}}};var Xt=(0,oe.Z)("Progress",at=>{const Ht=at.marginXXS/2,Fn=(0,Te.TS)(at,{progressStepMarginInlineEnd:Ht,progressStepMinWidth:Ht,progressActiveMotionDuration:"2.4s"});return[Lt(Fn),Rt(Fn),Ft(Fn),Jt(Fn)]},at=>({circleTextColor:at.colorText,defaultColor:at.colorInfo,remainingColor:at.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Hn=function(at,Ht){var Fn={};for(var er in at)Object.prototype.hasOwnProperty.call(at,er)&&Ht.indexOf(er)<0&&(Fn[er]=at[er]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nr=0,er=Object.getOwnPropertySymbols(at);nr<er.length;nr++)Ht.indexOf(er[nr])<0&&Object.prototype.propertyIsEnumerable.call(at,er[nr])&&(Fn[er[nr]]=at[er[nr]]);return Fn};const Rn=null,Tt=["normal","exception","active","success"];var cr=de.forwardRef((at,Ht)=>{const{prefixCls:Fn,className:er,rootClassName:nr,steps:Sr,strokeColor:Tr,percent:Er=0,size:Or="default",showInfo:Vr=!0,type:ur="line",status:si,format:Li,style:Bi}=at,Hi=Hn(at,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),ri=de.useMemo(()=>{var We,pt;const zt=ht(at);return parseInt(zt!==void 0?(We=zt!=null?zt:0)===null||We===void 0?void 0:We.toString():(pt=Er!=null?Er:0)===null||pt===void 0?void 0:pt.toString(),10)},[Er,at.success,at.successPercent]),yt=de.useMemo(()=>!Tt.includes(si)&&ri>=100?"success":si||"normal",[si,ri]),{getPrefixCls:Mn,direction:An,progress:Dn}=de.useContext(me.E_),lr=Mn("progress",Fn),[qn,pr]=Xt(lr),$n=de.useMemo(()=>{if(!Vr)return null;const We=ht(at);let pt;const zt=Li||(en=>`${en}%`),Bt=ur==="line";return Li||yt!=="exception"&&yt!=="success"?pt=zt(Ce(Er),Ce(We)):yt==="exception"?pt=Bt?de.createElement(Ve.Z,null):de.createElement(ve.Z,null):yt==="success"&&(pt=Bt?de.createElement(He.Z,null):de.createElement(Be.Z,null)),de.createElement("span",{className:`${lr}-text`,title:typeof pt=="string"?pt:void 0},pt)},[Vr,Er,ri,yt,ur,lr,Li]),qe=Array.isArray(Tr)?Tr[0]:Tr,ut=typeof Tr=="string"||Array.isArray(Tr)?Tr:void 0;let Dt;ur==="line"?Dt=Sr?de.createElement(le,Object.assign({},at,{strokeColor:ut,prefixCls:lr,steps:Sr}),$n):de.createElement(Ae,Object.assign({},at,{strokeColor:qe,prefixCls:lr,direction:An}),$n):(ur==="circle"||ur==="dashboard")&&(Dt=de.createElement(rn,Object.assign({},at,{strokeColor:qe,prefixCls:lr,progressStatus:yt}),$n));const Vt=Ee()(lr,`${lr}-status-${yt}`,`${lr}-${ur==="dashboard"&&"circle"||Sr&&"steps"||ur}`,{[`${lr}-inline-circle`]:ur==="circle"&&Ge(Or,"circle")[0]<=20,[`${lr}-show-info`]:Vr,[`${lr}-${Or}`]:typeof Or=="string",[`${lr}-rtl`]:An==="rtl"},Dn==null?void 0:Dn.className,er,nr,pr);return qn(de.createElement("div",Object.assign({ref:Ht,style:Object.assign(Object.assign({},Dn==null?void 0:Dn.style),Bi),className:Vt,role:"progressbar","aria-valuenow":ri},(0,xe.Z)(Hi,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Dt))}),Mr=cr},78045:function(En,Wt,se){"use strict";se.d(Wt,{ZP:function(){return Qe}});var de=se(94184),He=se.n(de),Be=se(5663),Ve=se(1337),ve=se(67294),we=se(53124),Ee=se(98675);const xe=ve.createContext(null),me=xe.Provider;var Ie=xe;const ot=ve.createContext(null),Oe=ot.Provider;var St=se(95860),ft=se(17799),it=se(98866),Je=se(65223),Le=se(14747),gt=se(67968),qt=se(45503);const tt=Ce=>{const{componentCls:ht,antCls:Ut}=Ce,Yt=`${ht}-group`;return{[Yt]:Object.assign(Object.assign({},(0,Le.Wf)(Ce)),{display:"inline-block",fontSize:0,[`&${Yt}-rtl`]:{direction:"rtl"},[`${Ut}-badge ${Ut}-badge-count`]:{zIndex:1},[`> ${Ut}-badge:not(:first-child) > ${Ut}-button-wrapper`]:{borderInlineStart:"none"}})}},ct=Ce=>{const{componentCls:ht,wrapperMarginInlineEnd:Ut,colorPrimary:Yt,radioSize:Ge,motionDurationSlow:rt,motionDurationMid:jt,motionEaseInOutCirc:_n,colorBgContainer:rn,colorBorder:$t,lineWidth:Zt,dotSize:yn,colorBgContainerDisabled:ln,colorTextDisabled:Ae,paddingXS:ue,dotColorDisabled:le,lineType:pe,radioDotDisabledSize:he,wireframe:oe,colorWhite:Te}=Ce,Ye=`${ht}-inner`;return{[`${ht}-wrapper`]:Object.assign(Object.assign({},(0,Le.Wf)(Ce)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Ut,cursor:"pointer",[`&${ht}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ce.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${ht}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Zt}px ${pe} ${Yt}`,borderRadius:"50%",visibility:"hidden",content:'""'},[ht]:Object.assign(Object.assign({},(0,Le.Wf)(Ce)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${ht}-wrapper:hover &,
|
|
|
&:hover ${Ye}`]:{borderColor:Yt},[`${ht}-input:focus-visible + ${Ye}`]:Object.assign({},(0,Le.oN)(Ce)),[`${ht}:hover::after, ${ht}-wrapper:hover &::after`]:{visibility:"visible"},[`${ht}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ge,height:Ge,marginBlockStart:Ge/-2,marginInlineStart:Ge/-2,backgroundColor:oe?Yt:Te,borderBlockStart:0,borderInlineStart:0,borderRadius:Ge,transform:"scale(0)",opacity:0,transition:`all ${rt} ${_n}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ge,height:Ge,backgroundColor:rn,borderColor:$t,borderStyle:"solid",borderWidth:Zt,borderRadius:"50%",transition:`all ${jt}`},[`${ht}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${ht}-checked`]:{[Ye]:{borderColor:Yt,backgroundColor:oe?rn:Yt,"&::after":{transform:`scale(${yn/Ge})`,opacity:1,transition:`all ${rt} ${_n}`}}},[`${ht}-disabled`]:{cursor:"not-allowed",[Ye]:{backgroundColor:ln,borderColor:$t,cursor:"not-allowed","&::after":{backgroundColor:le}},[`${ht}-input`]:{cursor:"not-allowed"},[`${ht}-disabled + span`]:{color:Ae,cursor:"not-allowed"},[`&${ht}-checked`]:{[Ye]:{"&::after":{transform:`scale(${he/Ge})`}}}},[`span${ht} + *`]:{paddingInlineStart:ue,paddingInlineEnd:ue}})}},ke=Ce=>{const{buttonColor:ht,controlHeight:Ut,componentCls:Yt,lineWidth:Ge,lineType:rt,colorBorder:jt,motionDurationSlow:_n,motionDurationMid:rn,buttonPaddingInline:$t,fontSize:Zt,buttonBg:yn,fontSizeLG:ln,controlHeightLG:Ae,controlHeightSM:ue,paddingXS:le,borderRadius:pe,borderRadiusSM:he,borderRadiusLG:oe,buttonCheckedBg:Te,buttonSolidCheckedColor:Ye,colorTextDisabled:Lt,colorBgContainerDisabled:Rt,buttonCheckedBgDisabled:Ft,buttonCheckedColorDisabled:Jt,colorPrimary:Xt,colorPrimaryHover:Hn,colorPrimaryActive:Rn,buttonSolidCheckedBg:Tt,buttonSolidCheckedHoverBg:dn,buttonSolidCheckedActiveBg:cr}=Ce;return{[`${Yt}-button-wrapper`]:{position:"relative",display:"inline-block",height:Ut,margin:0,paddingInline:$t,paddingBlock:0,color:ht,fontSize:Zt,lineHeight:`${Ut-Ge*2}px`,background:yn,border:`${Ge}px ${rt} ${jt}`,borderBlockStartWidth:Ge+.02,borderInlineStartWidth:0,borderInlineEndWidth:Ge,cursor:"pointer",transition:[`color ${rn}`,`background ${rn}`,`box-shadow ${rn}`].join(","),a:{color:ht},[`> ${Yt}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Ge,insetInlineStart:-Ge,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ge,paddingInline:0,backgroundColor:jt,transition:`background-color ${_n}`,content:'""'}},"&:first-child":{borderInlineStart:`${Ge}px ${rt} ${jt}`,borderStartStartRadius:pe,borderEndStartRadius:pe},"&:last-child":{borderStartEndRadius:pe,borderEndEndRadius:pe},"&:first-child:last-child":{borderRadius:pe},[`${Yt}-group-large &`]:{height:Ae,fontSize:ln,lineHeight:`${Ae-Ge*2}px`,"&:first-child":{borderStartStartRadius:oe,borderEndStartRadius:oe},"&:last-child":{borderStartEndRadius:oe,borderEndEndRadius:oe}},[`${Yt}-group-small &`]:{height:ue,paddingInline:le-Ge,paddingBlock:0,lineHeight:`${ue-Ge*2}px`,"&:first-child":{borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he}},"&:hover":{position:"relative",color:Xt},"&:has(:focus-visible)":Object.assign({},(0,Le.oN)(Ce)),[`${Yt}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Yt}-button-wrapper-disabled)`]:{zIndex:1,color:Xt,background:Te,borderColor:Xt,"&::before":{backgroundColor:Xt},"&:first-child":{borderColor:Xt},"&:hover":{color:Hn,borderColor:Hn,"&::before":{backgroundColor:Hn}},"&:active":{color:Rn,borderColor:Rn,"&::before":{backgroundColor:Rn}}},[`${Yt}-group-solid &-checked:not(${Yt}-button-wrapper-disabled)`]:{color:Ye,background:Tt,borderColor:Tt,"&:hover":{color:Ye,background:dn,borderColor:dn},"&:active":{color:Ye,background:cr,borderColor:cr}},"&-disabled":{color:Lt,backgroundColor:Rt,borderColor:jt,cursor:"not-allowed","&:first-child, &:hover":{color:Lt,backgroundColor:Rt,borderColor:jt}},[`&-disabled${Yt}-button-wrapper-checked`]:{color:Jt,backgroundColor:Ft,borderColor:jt,boxShadow:"none"}}}},Se=Ce=>Ce-4*2;var Ue=(0,gt.Z)("Radio",Ce=>{const{controlOutline:ht,controlOutlineWidth:Ut,radioSize:Yt}=Ce,Ge=`0 0 0 ${Ut}px ${ht}`,rt=Ge,jt=Se(Yt),_n=(0,qt.TS)(Ce,{radioDotDisabledSize:jt,radioFocusShadow:Ge,radioButtonFocusShadow:rt});return[tt(_n),ct(_n),ke(_n)]},Ce=>{const{wireframe:ht,padding:Ut,marginXS:Yt,lineWidth:Ge,fontSizeLG:rt,colorText:jt,colorBgContainer:_n,colorTextDisabled:rn,controlItemBgActiveDisabled:$t,colorTextLightSolid:Zt,colorPrimary:yn,colorPrimaryHover:ln,colorPrimaryActive:Ae}=Ce,ue=4,le=rt,pe=ht?Se(le):le-(ue+Ge)*2;return{radioSize:le,dotSize:pe,dotColorDisabled:rn,buttonSolidCheckedColor:Zt,buttonSolidCheckedBg:yn,buttonSolidCheckedHoverBg:ln,buttonSolidCheckedActiveBg:Ae,buttonBg:_n,buttonCheckedBg:_n,buttonColor:jt,buttonCheckedBgDisabled:$t,buttonCheckedColorDisabled:rn,buttonPaddingInline:Ut-Ge,wrapperMarginInlineEnd:Yt}}),je=se(45353),_t=se(92429),vt=function(Ce,ht){var Ut={};for(var Yt in Ce)Object.prototype.hasOwnProperty.call(Ce,Yt)&&ht.indexOf(Yt)<0&&(Ut[Yt]=Ce[Yt]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Yt=Object.getOwnPropertySymbols(Ce);Ge<Yt.length;Ge++)ht.indexOf(Yt[Ge])<0&&Object.prototype.propertyIsEnumerable.call(Ce,Yt[Ge])&&(Ut[Yt[Ge]]=Ce[Yt[Ge]]);return Ut};const kt=(Ce,ht)=>{var Ut,Yt;const Ge=ve.useContext(Ie),rt=ve.useContext(ot),{getPrefixCls:jt,direction:_n,radio:rn}=ve.useContext(we.E_),$t=ve.useRef(null),Zt=(0,ft.sQ)(ht,$t),{isFormItemInput:yn}=ve.useContext(Je.aM),ln=Rn=>{var Tt,dn;(Tt=Ce.onChange)===null||Tt===void 0||Tt.call(Ce,Rn),(dn=Ge==null?void 0:Ge.onChange)===null||dn===void 0||dn.call(Ge,Rn)},{prefixCls:Ae,className:ue,rootClassName:le,children:pe,style:he}=Ce,oe=vt(Ce,["prefixCls","className","rootClassName","children","style"]),Te=jt("radio",Ae),Ye=((Ge==null?void 0:Ge.optionType)||rt)==="button",Lt=Ye?`${Te}-button`:Te,[Rt,Ft]=Ue(Te),Jt=Object.assign({},oe),Xt=ve.useContext(it.Z);Ge&&(Jt.name=Ge.name,Jt.onChange=ln,Jt.checked=Ce.value===Ge.value,Jt.disabled=(Ut=Jt.disabled)!==null&&Ut!==void 0?Ut:Ge.disabled),Jt.disabled=(Yt=Jt.disabled)!==null&&Yt!==void 0?Yt:Xt;const Hn=He()(`${Lt}-wrapper`,{[`${Lt}-wrapper-checked`]:Jt.checked,[`${Lt}-wrapper-disabled`]:Jt.disabled,[`${Lt}-wrapper-rtl`]:_n==="rtl",[`${Lt}-wrapper-in-form-item`]:yn},rn==null?void 0:rn.className,ue,le,Ft);return Rt(ve.createElement(je.Z,{component:"Radio",disabled:Jt.disabled},ve.createElement("label",{className:Hn,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),he),onMouseEnter:Ce.onMouseEnter,onMouseLeave:Ce.onMouseLeave},ve.createElement(St.Z,Object.assign({},Jt,{className:He()(Jt.className,!Ye&&_t.A),type:"radio",prefixCls:Lt,ref:Zt})),pe!==void 0?ve.createElement("span",null,pe):null)))};var Kt=ve.forwardRef(kt);const Ot=ve.forwardRef((Ce,ht)=>{const{getPrefixCls:Ut,direction:Yt}=ve.useContext(we.E_),[Ge,rt]=(0,Be.Z)(Ce.defaultValue,{value:Ce.value}),jt=Tt=>{const dn=Ge,cr=Tt.target.value;"value"in Ce||rt(cr);const{onChange:Mr}=Ce;Mr&&cr!==dn&&Mr(Tt)},{prefixCls:_n,className:rn,rootClassName:$t,options:Zt,buttonStyle:yn="outline",disabled:ln,children:Ae,size:ue,style:le,id:pe,onMouseEnter:he,onMouseLeave:oe,onFocus:Te,onBlur:Ye}=Ce,Lt=Ut("radio",_n),Rt=`${Lt}-group`,[Ft,Jt]=Ue(Lt);let Xt=Ae;Zt&&Zt.length>0&&(Xt=Zt.map(Tt=>typeof Tt=="string"||typeof Tt=="number"?ve.createElement(Kt,{key:Tt.toString(),prefixCls:Lt,disabled:ln,value:Tt,checked:Ge===Tt},Tt):ve.createElement(Kt,{key:`radio-group-value-options-${Tt.value}`,prefixCls:Lt,disabled:Tt.disabled||ln,value:Tt.value,checked:Ge===Tt.value,title:Tt.title,style:Tt.style},Tt.label)));const Hn=(0,Ee.Z)(ue),Rn=He()(Rt,`${Rt}-${yn}`,{[`${Rt}-${Hn}`]:Hn,[`${Rt}-rtl`]:Yt==="rtl"},rn,$t,Jt);return Ft(ve.createElement("div",Object.assign({},(0,Ve.Z)(Ce,{aria:!0,data:!0}),{className:Rn,style:le,onMouseEnter:he,onMouseLeave:oe,onFocus:Te,onBlur:Ye,id:pe,ref:ht}),ve.createElement(me,{value:{onChange:jt,value:Ge,disabled:Ce.disabled,name:Ce.name,optionType:Ce.optionType}},Xt)))});var bn=ve.memo(Ot),Nt=function(Ce,ht){var Ut={};for(var Yt in Ce)Object.prototype.hasOwnProperty.call(Ce,Yt)&&ht.indexOf(Yt)<0&&(Ut[Yt]=Ce[Yt]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,Yt=Object.getOwnPropertySymbols(Ce);Ge<Yt.length;Ge++)ht.indexOf(Yt[Ge])<0&&Object.prototype.propertyIsEnumerable.call(Ce,Yt[Ge])&&(Ut[Yt[Ge]]=Ce[Yt[Ge]]);return Ut};const sn=(Ce,ht)=>{const{getPrefixCls:Ut}=ve.useContext(we.E_),{prefixCls:Yt}=Ce,Ge=Nt(Ce,["prefixCls"]),rt=Ut("radio",Yt);return ve.createElement(Oe,{value:"button"},ve.createElement(Kt,Object.assign({prefixCls:rt},Ge,{type:"radio",ref:ht})))};var Cn=ve.forwardRef(sn);const or=Kt;or.Button=Cn,or.Group=bn,or.__ANT_RADIO=!0;var Qe=or},11713:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return xr}});var de=se(94184),He=se.n(de),Be=se(87462),Ve=se(74902),ve=se(4942),we=se(1413),Ee=se(97685),xe=se(45987),me=se(71002),Ie=se(67294);function ot(Re){var Ke=Ie.useRef();Ke.current=Re;var At=Ie.useCallback(function(){for(var dt,Gt=arguments.length,pn=new Array(Gt),Sn=0;Sn<Gt;Sn++)pn[Sn]=arguments[Sn];return(dt=Ke.current)===null||dt===void 0?void 0:dt.call.apply(dt,[Ke].concat(pn))},[]);return At}function Oe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var St=Oe()?Ie.useLayoutEffect:Ie.useEffect,ft=St,it=function(Ke,At){var dt=Ie.useRef(!0);St(function(){if(!dt.current)return Ke()},At),St(function(){return dt.current=!1,function(){dt.current=!0}},[])};function Je(Re){var Ke=Ie.useRef(!1),At=Ie.useState(Re),dt=(0,Ee.Z)(At,2),Gt=dt[0],pn=dt[1];Ie.useEffect(function(){return Ke.current=!1,function(){Ke.current=!0}},[]);function Sn(Kn,Tn){Tn&&Ke.current||pn(Kn)}return[Gt,Sn]}function Le(Re){return Re!==void 0}function gt(Re,Ke){var At=Ke||{},dt=At.defaultValue,Gt=At.value,pn=At.onChange,Sn=At.postState,Kn=Je(function(){return Le(Gt)?Gt:Le(dt)?typeof dt=="function"?dt():dt:typeof Re=="function"?Re():Re}),Tn=(0,Ee.Z)(Kn,2),cn=Tn[0],Wn=Tn[1],Zn=Gt!==void 0?Gt:cn,wr=Sn?Sn(Zn):Zn,Un=ot(pn),Rr=Je([Zn]),Yr=(0,Ee.Z)(Rr,2),Nr=Yr[0],jr=Yr[1];it(function(){var zr=Nr[0];cn!==zr&&Un(cn,zr)},[Nr]),it(function(){Le(Gt)||Wn(Gt)},[Gt]);var kr=ot(function(zr,ei){Wn(zr,ei),jr([Zn],ei)});return[wr,kr]}var qt={};function tt(Re,Ke){}function ct(Re,Ke){}function ke(){qt={}}function Se(Re,Ke,At){!Ke&&!qt[At]&&(Re(!1,At),qt[At]=!0)}function Ue(Re,Ke){Se(tt,Re,Ke)}function je(Re,Ke){Se(ct,Re,Ke)}var _t=Ue,vt=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Re=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(Re)||/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(Re==null?void 0:Re.substr(0,4))},kt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ke){var At=Ke.keyCode;if(Ke.altKey&&!Ke.ctrlKey||Ke.metaKey||At>=kt.F1&&At<=kt.F12)return!1;switch(At){case kt.ALT:case kt.CAPS_LOCK:case kt.CONTEXT_MENU:case kt.CTRL:case kt.DOWN:case kt.END:case kt.ESC:case kt.HOME:case kt.INSERT:case kt.LEFT:case kt.MAC_FF_META:case kt.META:case kt.NUMLOCK:case kt.NUM_CENTER:case kt.PAGE_DOWN:case kt.PAGE_UP:case kt.PAUSE:case kt.PRINT_SCREEN:case kt.RIGHT:case kt.SHIFT:case kt.UP:case kt.WIN_KEY:case kt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ke){if(Ke>=kt.ZERO&&Ke<=kt.NINE||Ke>=kt.NUM_ZERO&&Ke<=kt.NUM_MULTIPLY||Ke>=kt.A&&Ke<=kt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ke===0)return!0;switch(Ke){case kt.SPACE:case kt.QUESTION_MARK:case kt.NUM_PLUS:case kt.NUM_MINUS:case kt.NUM_PERIOD:case kt.NUM_DIVISION:case kt.SEMICOLON:case kt.DASH:case kt.EQUALS:case kt.COMMA:case kt.PERIOD:case kt.SLASH:case kt.APOSTROPHE:case kt.SINGLE_QUOTE:case kt.OPEN_SQUARE_BRACKET:case kt.BACKSLASH:case kt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Xe=kt,Kt=se(47655);function Ot(Re,Ke,At){var dt=Ie.useRef({});return(!("value"in dt.current)||At(dt.current.condition,Ke))&&(dt.current.value=Re(),dt.current.condition=Ke),dt.current.value}function bn(Re,Ke){typeof Re=="function"?Re(Ke):(0,me.Z)(Re)==="object"&&Re&&"current"in Re&&(Re.current=Ke)}function Nt(){for(var Re=arguments.length,Ke=new Array(Re),At=0;At<Re;At++)Ke[At]=arguments[At];var dt=Ke.filter(function(Gt){return Gt});return dt.length<=1?dt[0]:function(Gt){Ke.forEach(function(pn){bn(pn,Gt)})}}function sn(){for(var Re=arguments.length,Ke=new Array(Re),At=0;At<Re;At++)Ke[At]=arguments[At];return Ot(function(){return Nt.apply(void 0,Ke)},Ke,function(dt,Gt){return dt.length===Gt.length&&dt.every(function(pn,Sn){return pn===Gt[Sn]})})}function Cn(Re){var Ke,At,dt=isMemo(Re)?Re.type.type:Re.type;return!(typeof dt=="function"&&!((Ke=dt.prototype)!==null&&Ke!==void 0&&Ke.render)||typeof Re=="function"&&!((At=Re.prototype)!==null&&At!==void 0&&At.render))}var or=function(Ke){var At=Ke.className,dt=Ke.customizeIcon,Gt=Ke.customizeIconProps,pn=Ke.onMouseDown,Sn=Ke.onClick,Kn=Ke.children,Tn;return typeof dt=="function"?Tn=dt(Gt):Tn=dt,Ie.createElement("span",{className:At,onMouseDown:function(Wn){Wn.preventDefault(),pn&&pn(Wn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Sn,"aria-hidden":!0},Tn!==void 0?Tn:Ie.createElement("span",{className:He()(At.split(/\s+/).map(function(cn){return"".concat(cn,"-icon")}))},Kn))},Qe=or;function Ce(Re,Ke,At,dt,Gt){var pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Sn=arguments.length>6?arguments[6]:void 0,Kn=arguments.length>7?arguments[7]:void 0,Tn=Ie.useMemo(function(){if((0,me.Z)(dt)==="object")return dt.clearIcon;if(Gt)return Gt},[dt,Gt]),cn=Ie.useMemo(function(){return!!(!pn&&dt&&(At.length||Sn)&&!(Kn==="combobox"&&Sn===""))},[dt,pn,At.length,Sn,Kn]);return{allowClear:cn,clearIcon:Ie.createElement(Qe,{className:"".concat(Re,"-clear"),onMouseDown:Ke,customizeIcon:Tn},"\xD7")}}var ht=Ie.createContext(null);function Ut(){return Ie.useContext(ht)}function Yt(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ke=Ie.useState(!1),At=(0,Ee.Z)(Ke,2),dt=At[0],Gt=At[1],pn=Ie.useRef(null),Sn=function(){window.clearTimeout(pn.current)};Ie.useEffect(function(){return Sn},[]);var Kn=function(cn,Wn){Sn(),pn.current=window.setTimeout(function(){Gt(cn),Wn&&Wn()},Re)};return[dt,Kn,Sn]}function Ge(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ke=Ie.useRef(null),At=Ie.useRef(null);Ie.useEffect(function(){return function(){window.clearTimeout(At.current)}},[]);function dt(Gt){(Gt||Ke.current===null)&&(Ke.current=Gt),window.clearTimeout(At.current),At.current=window.setTimeout(function(){Ke.current=null},Re)}return[function(){return Ke.current},dt]}function rt(Re,Ke,At,dt){var Gt=Ie.useRef(null);Gt.current={open:Ke,triggerOpen:At,customizedTrigger:dt},Ie.useEffect(function(){function pn(Sn){var Kn;if(!((Kn=Gt.current)!==null&&Kn!==void 0&&Kn.customizedTrigger)){var Tn=Sn.target;Tn.shadowRoot&&Sn.composed&&(Tn=Sn.composedPath()[0]||Tn),Gt.current.open&&Re().filter(function(cn){return cn}).every(function(cn){return!cn.contains(Tn)&&cn!==Tn})&&Gt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",pn),function(){return window.removeEventListener("mousedown",pn)}},[])}var jt=`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`,_n=`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`,rn="".concat(jt," ").concat(_n).split(/[\s\n]+/),$t="aria-",Zt="data-";function yn(Re,Ke){return Re.indexOf(Ke)===0}function ln(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At;Ke===!1?At={aria:!0,data:!0,attr:!0}:Ke===!0?At={aria:!0}:At=(0,we.Z)({},Ke);var dt={};return Object.keys(Re).forEach(function(Gt){(At.aria&&(Gt==="role"||yn(Gt,$t))||At.data&&yn(Gt,Zt)||At.attr&&rn.includes(Gt))&&(dt[Gt]=Re[Gt])}),dt}var Ae=se(48555),ue=se(14075),le=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],pe=void 0;function he(Re,Ke){var At=Re.prefixCls,dt=Re.invalidate,Gt=Re.item,pn=Re.renderItem,Sn=Re.responsive,Kn=Re.responsiveDisabled,Tn=Re.registerSize,cn=Re.itemKey,Wn=Re.className,Zn=Re.style,wr=Re.children,Un=Re.display,Rr=Re.order,Yr=Re.component,Nr=Yr===void 0?"div":Yr,jr=(0,xe.Z)(Re,le),kr=Sn&&!Un;function zr(Oi){Tn(cn,Oi)}Ie.useEffect(function(){return function(){zr(null)}},[]);var ei=pn&&Gt!==pe?pn(Gt):wr,ci;dt||(ci={opacity:kr?0:1,height:kr?0:pe,overflowY:kr?"hidden":pe,order:Sn?Rr:pe,pointerEvents:kr?"none":pe,position:kr?"absolute":pe});var Fr={};kr&&(Fr["aria-hidden"]=!0);var fi=Ie.createElement(Nr,(0,Be.Z)({className:He()(!dt&&At,Wn),style:(0,we.Z)((0,we.Z)({},ci),Zn)},Fr,jr,{ref:Ke}),ei);return Sn&&(fi=Ie.createElement(Ae.Z,{onResize:function(na){var Xi=na.offsetWidth;zr(Xi)},disabled:Kn},fi)),fi}var oe=Ie.forwardRef(he);oe.displayName="Item";var Te=oe,Ye=se(77527),Lt=se(73935),Rt=se(96523);function Ft(Re){if(typeof MessageChannel=="undefined")(0,Rt.Z)(Re);else{var Ke=new MessageChannel;Ke.port1.onmessage=function(){return Re()},Ke.port2.postMessage(void 0)}}function Jt(){var Re=Ie.useRef(null),Ke=function(dt){Re.current||(Re.current=[],Ft(function(){(0,Lt.unstable_batchedUpdates)(function(){Re.current.forEach(function(Gt){Gt()}),Re.current=null})})),Re.current.push(dt)};return Ke}function Xt(Re,Ke){var At=Ie.useState(Ke),dt=(0,Ee.Z)(At,2),Gt=dt[0],pn=dt[1],Sn=(0,Ye.Z)(function(Kn){Re(function(){pn(Kn)})});return[Gt,Sn]}var Hn=Ie.createContext(null),Rn=["component"],Tt=["className"],dn=["className"],cr=function(Ke,At){var dt=Ie.useContext(Hn);if(!dt){var Gt=Ke.component,pn=Gt===void 0?"div":Gt,Sn=(0,xe.Z)(Ke,Rn);return Ie.createElement(pn,(0,Be.Z)({},Sn,{ref:At}))}var Kn=dt.className,Tn=(0,xe.Z)(dt,Tt),cn=Ke.className,Wn=(0,xe.Z)(Ke,dn);return Ie.createElement(Hn.Provider,{value:null},Ie.createElement(Te,(0,Be.Z)({ref:At,className:He()(Kn,cn)},Tn,Wn)))},Mr=Ie.forwardRef(cr);Mr.displayName="RawItem";var at=Mr,Ht=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Fn="responsive",er="invalidate";function nr(Re){return"+ ".concat(Re.length," ...")}function Sr(Re,Ke){var At=Re.prefixCls,dt=At===void 0?"rc-overflow":At,Gt=Re.data,pn=Gt===void 0?[]:Gt,Sn=Re.renderItem,Kn=Re.renderRawItem,Tn=Re.itemKey,cn=Re.itemWidth,Wn=cn===void 0?10:cn,Zn=Re.ssr,wr=Re.style,Un=Re.className,Rr=Re.maxCount,Yr=Re.renderRest,Nr=Re.renderRawRest,jr=Re.suffix,kr=Re.component,zr=kr===void 0?"div":kr,ei=Re.itemComponent,ci=Re.onVisibleChange,Fr=(0,xe.Z)(Re,Ht),fi=Zn==="full",Oi=Jt(),na=Xt(Oi,null),Xi=(0,Ee.Z)(na,2),Fi=Xi[0],Ji=Xi[1],Qi=Fi||0,wi=Xt(Oi,new Map),zi=(0,Ee.Z)(wi,2),Jr=zi[0],hi=zi[1],Ii=Xt(Oi,0),Yi=(0,Ee.Z)(Ii,2),$a=Yi[0],Na=Yi[1],Aa=Xt(Oi,0),ca=(0,Ee.Z)(Aa,2),ea=ca[0],Mi=ca[1],Oa=Xt(Oi,0),ki=(0,Ee.Z)(Oa,2),ti=ki[0],Wi=ki[1],ua=(0,Ie.useState)(null),Vi=(0,Ee.Z)(ua,2),aa=Vi[0],mi=Vi[1],pa=(0,Ie.useState)(null),xa=(0,Ee.Z)(pa,2),fa=xa[0],wa=xa[1],Ma=Ie.useMemo(function(){return fa===null&&fi?Number.MAX_SAFE_INTEGER:fa||0},[fa,Fi]),Za=(0,Ie.useState)(!1),ha=(0,Ee.Z)(Za,2),ka=ha[0],Ja=ha[1],Ga="".concat(dt,"-item"),so=Math.max($a,ea),Fa=Rr===Fn,Ca=pn.length&&Fa,_i=Rr===er,Ui=Ca||typeof Rr=="number"&&pn.length>Rr,da=(0,Ie.useMemo)(function(){var oa=pn;return Ca?Fi===null&&fi?oa=pn:oa=pn.slice(0,Math.min(pn.length,Qi/Wn)):typeof Rr=="number"&&(oa=pn.slice(0,Rr)),oa},[pn,Wn,Fi,Rr,Ca]),Sa=(0,Ie.useMemo)(function(){return Ca?pn.slice(Ma+1):pn.slice(da.length)},[pn,da,Ca,Ma]),Ka=(0,Ie.useCallback)(function(oa,Br){var Si;return typeof Tn=="function"?Tn(oa):(Si=Tn&&(oa==null?void 0:oa[Tn]))!==null&&Si!==void 0?Si:Br},[Tn]),io=(0,Ie.useCallback)(Sn||function(oa){return oa},[Sn]);function ho(oa,Br,Si){fa===oa&&(Br===void 0||Br===aa)||(wa(oa),Si||(Ja(oa<pn.length-1),ci==null||ci(oa)),Br!==void 0&&mi(Br))}function Oo(oa,Br){Ji(Br.clientWidth)}function Ro(oa,Br){hi(function(Si){var Ci=new Map(Si);return Br===null?Ci.delete(oa):Ci.set(oa,Br),Ci})}function lo(oa,Br){Mi(Br),Na(ea)}function Ao(oa,Br){Wi(Br)}function ra(oa){return Jr.get(Ka(da[oa],oa))}(0,ue.Z)(function(){if(Qi&&typeof so=="number"&&da){var oa=ti,Br=da.length,Si=Br-1;if(!Br){ho(0,null);return}for(var Ci=0;Ci<Br;Ci+=1){var Di=ra(Ci);if(fi&&(Di=Di||0),Di===void 0){ho(Ci-1,void 0,!0);break}if(oa+=Di,Si===0&&oa<=Qi||Ci===Si-1&&oa+ra(Si)<=Qi){ho(Si,null);break}else if(oa+so>Qi){ho(Ci-1,oa-Di-ti+ea);break}}jr&&ra(0)+ti>Qi&&mi(null)}},[Qi,Jr,ea,ti,Ka,da]);var Ri=ka&&!!Sa.length,Ta={};aa!==null&&Ca&&(Ta={position:"absolute",left:aa,top:0});var _a={prefixCls:Ga,responsive:Ca,component:ei,invalidate:_i},co=Kn?function(oa,Br){var Si=Ka(oa,Br);return Ie.createElement(Hn.Provider,{key:Si,value:(0,we.Z)((0,we.Z)({},_a),{},{order:Br,item:oa,itemKey:Si,registerSize:Ro,display:Br<=Ma})},Kn(oa,Br))}:function(oa,Br){var Si=Ka(oa,Br);return Ie.createElement(Te,(0,Be.Z)({},_a,{order:Br,key:Si,item:oa,renderItem:io,itemKey:Si,registerSize:Ro,display:Br<=Ma}))},ao,hs={order:Ri?Ma:Number.MAX_SAFE_INTEGER,className:"".concat(Ga,"-rest"),registerSize:lo,display:Ri};if(Nr)Nr&&(ao=Ie.createElement(Hn.Provider,{value:(0,we.Z)((0,we.Z)({},_a),hs)},Nr(Sa)));else{var Qo=Yr||nr;ao=Ie.createElement(Te,(0,Be.Z)({},_a,hs),typeof Qo=="function"?Qo(Sa):Qo)}var ps=Ie.createElement(zr,(0,Be.Z)({className:He()(!_i&&dt,Un),style:wr,ref:Ke},Fr),da.map(co),Ui?ao:null,jr&&Ie.createElement(Te,(0,Be.Z)({},_a,{responsive:Fa,responsiveDisabled:!Ca,order:Ma,className:"".concat(Ga,"-suffix"),registerSize:Ao,display:!0,style:Ta}),jr));return Fa&&(ps=Ie.createElement(Ae.Z,{onResize:Oo,disabled:!Ca},ps)),ps}var Tr=Ie.forwardRef(Sr);Tr.displayName="Overflow",Tr.Item=at,Tr.RESPONSIVE=Fn,Tr.INVALIDATE=er;var Er=Tr,Or=Er,Vr=function(Ke,At){var dt,Gt,pn=Ke.prefixCls,Sn=Ke.id,Kn=Ke.inputElement,Tn=Ke.disabled,cn=Ke.tabIndex,Wn=Ke.autoFocus,Zn=Ke.autoComplete,wr=Ke.editable,Un=Ke.activeDescendantId,Rr=Ke.value,Yr=Ke.maxLength,Nr=Ke.onKeyDown,jr=Ke.onMouseDown,kr=Ke.onChange,zr=Ke.onPaste,ei=Ke.onCompositionStart,ci=Ke.onCompositionEnd,Fr=Ke.open,fi=Ke.attrs,Oi=Kn||Ie.createElement("input",null),na=Oi,Xi=na.ref,Fi=na.props,Ji=Fi.onKeyDown,Qi=Fi.onChange,wi=Fi.onMouseDown,zi=Fi.onCompositionStart,Jr=Fi.onCompositionEnd,hi=Fi.style;return"maxLength"in Oi.props,Oi=Ie.cloneElement(Oi,(0,we.Z)((0,we.Z)((0,we.Z)({type:"search"},Fi),{},{id:Sn,ref:Nt(At,Xi),disabled:Tn,tabIndex:cn,autoComplete:Zn||"off",autoFocus:Wn,className:He()("".concat(pn,"-selection-search-input"),(dt=Oi)===null||dt===void 0||(Gt=dt.props)===null||Gt===void 0?void 0:Gt.className),role:"combobox","aria-label":"Search","aria-expanded":Fr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Sn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Sn,"_list"),"aria-activedescendant":Fr?Un:void 0},fi),{},{value:wr?Rr:"",maxLength:Yr,readOnly:!wr,unselectable:wr?null:"on",style:(0,we.Z)((0,we.Z)({},hi),{},{opacity:wr?null:0}),onKeyDown:function(Yi){Nr(Yi),Ji&&Ji(Yi)},onMouseDown:function(Yi){jr(Yi),wi&&wi(Yi)},onChange:function(Yi){kr(Yi),Qi&&Qi(Yi)},onCompositionStart:function(Yi){ei(Yi),zi&&zi(Yi)},onCompositionEnd:function(Yi){ci(Yi),Jr&&Jr(Yi)},onPaste:zr})),Oi},ur=Ie.forwardRef(Vr);ur.displayName="Input";var si=ur;function Li(Re){return Array.isArray(Re)?Re:Re!==void 0?[Re]:[]}var Bi=typeof window!="undefined"&&window.document&&window.document.documentElement,Hi=Bi;function ri(Re){return Re!=null}function yt(Re){return!Re&&Re!==0}function Mn(Re){return["string","number"].includes((0,me.Z)(Re))}function An(Re){var Ke=void 0;return Re&&(Mn(Re.title)?Ke=Re.title.toString():Mn(Re.label)&&(Ke=Re.label.toString())),Ke}function Dn(Re,Ke){Hi?Ie.useLayoutEffect(Re,Ke):Ie.useEffect(Re,Ke)}function lr(Re){var Ke;return(Ke=Re.key)!==null&&Ke!==void 0?Ke:Re.value}var qn=function(Ke){Ke.preventDefault(),Ke.stopPropagation()},pr=function(Ke){var At=Ke.id,dt=Ke.prefixCls,Gt=Ke.values,pn=Ke.open,Sn=Ke.searchValue,Kn=Ke.autoClearSearchValue,Tn=Ke.inputRef,cn=Ke.placeholder,Wn=Ke.disabled,Zn=Ke.mode,wr=Ke.showSearch,Un=Ke.autoFocus,Rr=Ke.autoComplete,Yr=Ke.activeDescendantId,Nr=Ke.tabIndex,jr=Ke.removeIcon,kr=Ke.maxTagCount,zr=Ke.maxTagTextLength,ei=Ke.maxTagPlaceholder,ci=ei===void 0?function(mi){return"+ ".concat(mi.length," ...")}:ei,Fr=Ke.tagRender,fi=Ke.onToggleOpen,Oi=Ke.onRemove,na=Ke.onInputChange,Xi=Ke.onInputPaste,Fi=Ke.onInputKeyDown,Ji=Ke.onInputMouseDown,Qi=Ke.onInputCompositionStart,wi=Ke.onInputCompositionEnd,zi=Ie.useRef(null),Jr=(0,Ie.useState)(0),hi=(0,Ee.Z)(Jr,2),Ii=hi[0],Yi=hi[1],$a=(0,Ie.useState)(!1),Na=(0,Ee.Z)($a,2),Aa=Na[0],ca=Na[1],ea="".concat(dt,"-selection"),Mi=pn||Zn==="multiple"&&Kn===!1||Zn==="tags"?Sn:"",Oa=Zn==="tags"||Zn==="multiple"&&Kn===!1||wr&&(pn||Aa);Dn(function(){Yi(zi.current.scrollWidth)},[Mi]);function ki(mi,pa,xa,fa,wa){return Ie.createElement("span",{className:He()("".concat(ea,"-item"),(0,ve.Z)({},"".concat(ea,"-item-disabled"),xa)),title:An(mi)},Ie.createElement("span",{className:"".concat(ea,"-item-content")},pa),fa&&Ie.createElement(Qe,{className:"".concat(ea,"-item-remove"),onMouseDown:qn,onClick:wa,customizeIcon:jr},"\xD7"))}function ti(mi,pa,xa,fa,wa){var Ma=function(ha){qn(ha),fi(!pn)};return Ie.createElement("span",{onMouseDown:Ma},Fr({label:pa,value:mi,disabled:xa,closable:fa,onClose:wa}))}function Wi(mi){var pa=mi.disabled,xa=mi.label,fa=mi.value,wa=!Wn&&!pa,Ma=xa;if(typeof zr=="number"&&(typeof xa=="string"||typeof xa=="number")){var Za=String(Ma);Za.length>zr&&(Ma="".concat(Za.slice(0,zr),"..."))}var ha=function(Ja){Ja&&Ja.stopPropagation(),Oi(mi)};return typeof Fr=="function"?ti(fa,Ma,pa,wa,ha):ki(mi,Ma,pa,wa,ha)}function ua(mi){var pa=typeof ci=="function"?ci(mi):ci;return ki({title:pa},pa,!1)}var Vi=Ie.createElement("div",{className:"".concat(ea,"-search"),style:{width:Ii},onFocus:function(){ca(!0)},onBlur:function(){ca(!1)}},Ie.createElement(si,{ref:Tn,open:pn,prefixCls:dt,id:At,inputElement:null,disabled:Wn,autoFocus:Un,autoComplete:Rr,editable:Oa,activeDescendantId:Yr,value:Mi,onKeyDown:Fi,onMouseDown:Ji,onChange:na,onPaste:Xi,onCompositionStart:Qi,onCompositionEnd:wi,tabIndex:Nr,attrs:ln(Ke,!0)}),Ie.createElement("span",{ref:zi,className:"".concat(ea,"-search-mirror"),"aria-hidden":!0},Mi,"\xA0")),aa=Ie.createElement(Or,{prefixCls:"".concat(ea,"-overflow"),data:Gt,renderItem:Wi,renderRest:ua,suffix:Vi,itemKey:lr,maxCount:kr});return Ie.createElement(Ie.Fragment,null,aa,!Gt.length&&!Mi&&Ie.createElement("span",{className:"".concat(ea,"-placeholder")},cn))},$n=pr,qe=function(Ke){var At=Ke.inputElement,dt=Ke.prefixCls,Gt=Ke.id,pn=Ke.inputRef,Sn=Ke.disabled,Kn=Ke.autoFocus,Tn=Ke.autoComplete,cn=Ke.activeDescendantId,Wn=Ke.mode,Zn=Ke.open,wr=Ke.values,Un=Ke.placeholder,Rr=Ke.tabIndex,Yr=Ke.showSearch,Nr=Ke.searchValue,jr=Ke.activeValue,kr=Ke.maxLength,zr=Ke.onInputKeyDown,ei=Ke.onInputMouseDown,ci=Ke.onInputChange,Fr=Ke.onInputPaste,fi=Ke.onInputCompositionStart,Oi=Ke.onInputCompositionEnd,na=Ke.title,Xi=Ie.useState(!1),Fi=(0,Ee.Z)(Xi,2),Ji=Fi[0],Qi=Fi[1],wi=Wn==="combobox",zi=wi||Yr,Jr=wr[0],hi=Nr||"";wi&&jr&&!Ji&&(hi=jr),Ie.useEffect(function(){wi&&Qi(!1)},[wi,jr]);var Ii=Wn!=="combobox"&&!Zn&&!Yr?!1:!!hi,Yi=na===void 0?An(Jr):na,$a=function(){if(Jr)return null;var Aa=Ii?{visibility:"hidden"}:void 0;return Ie.createElement("span",{className:"".concat(dt,"-selection-placeholder"),style:Aa},Un)};return Ie.createElement(Ie.Fragment,null,Ie.createElement("span",{className:"".concat(dt,"-selection-search")},Ie.createElement(si,{ref:pn,prefixCls:dt,id:Gt,open:Zn,inputElement:At,disabled:Sn,autoFocus:Kn,autoComplete:Tn,editable:zi,activeDescendantId:cn,value:hi,onKeyDown:zr,onMouseDown:ei,onChange:function(Aa){Qi(!0),ci(Aa)},onPaste:Fr,onCompositionStart:fi,onCompositionEnd:Oi,tabIndex:Rr,attrs:ln(Ke,!0),maxLength:wi?kr:void 0})),!wi&&Jr?Ie.createElement("span",{className:"".concat(dt,"-selection-item"),title:Yi,style:Ii?{visibility:"hidden"}:void 0},Jr.label):null,$a())},ut=qe;function Dt(Re){return![Xe.ESC,Xe.SHIFT,Xe.BACKSPACE,Xe.TAB,Xe.WIN_KEY,Xe.ALT,Xe.META,Xe.WIN_KEY_RIGHT,Xe.CTRL,Xe.SEMICOLON,Xe.EQUALS,Xe.CAPS_LOCK,Xe.CONTEXT_MENU,Xe.F1,Xe.F2,Xe.F3,Xe.F4,Xe.F5,Xe.F6,Xe.F7,Xe.F8,Xe.F9,Xe.F10,Xe.F11,Xe.F12].includes(Re)}var Vt=function(Ke,At){var dt=(0,Ie.useRef)(null),Gt=(0,Ie.useRef)(!1),pn=Ke.prefixCls,Sn=Ke.open,Kn=Ke.mode,Tn=Ke.showSearch,cn=Ke.tokenWithEnter,Wn=Ke.autoClearSearchValue,Zn=Ke.onSearch,wr=Ke.onSearchSubmit,Un=Ke.onToggleOpen,Rr=Ke.onInputKeyDown,Yr=Ke.domRef;Ie.useImperativeHandle(At,function(){return{focus:function(){dt.current.focus()},blur:function(){dt.current.blur()}}});var Nr=Ge(0),jr=(0,Ee.Z)(Nr,2),kr=jr[0],zr=jr[1],ei=function(hi){var Ii=hi.which;(Ii===Xe.UP||Ii===Xe.DOWN)&&hi.preventDefault(),Rr&&Rr(hi),Ii===Xe.ENTER&&Kn==="tags"&&!Gt.current&&!Sn&&(wr==null||wr(hi.target.value)),Dt(Ii)&&Un(!0)},ci=function(){zr(!0)},Fr=(0,Ie.useRef)(null),fi=function(hi){Zn(hi,!0,Gt.current)!==!1&&Un(!0)},Oi=function(){Gt.current=!0},na=function(hi){Gt.current=!1,Kn!=="combobox"&&fi(hi.target.value)},Xi=function(hi){var Ii=hi.target.value;if(cn&&Fr.current&&/[\r\n]/.test(Fr.current)){var Yi=Fr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ii=Ii.replace(Yi,Fr.current)}Fr.current=null,fi(Ii)},Fi=function(hi){var Ii=hi.clipboardData,Yi=Ii.getData("text");Fr.current=Yi},Ji=function(hi){var Ii=hi.target;if(Ii!==dt.current){var Yi=document.body.style.msTouchAction!==void 0;Yi?setTimeout(function(){dt.current.focus()}):dt.current.focus()}},Qi=function(hi){var Ii=kr();hi.target!==dt.current&&!Ii&&Kn!=="combobox"&&hi.preventDefault(),(Kn!=="combobox"&&(!Tn||!Ii)||!Sn)&&(Sn&&Wn!==!1&&Zn("",!0,!1),Un())},wi={inputRef:dt,onInputKeyDown:ei,onInputMouseDown:ci,onInputChange:Xi,onInputPaste:Fi,onInputCompositionStart:Oi,onInputCompositionEnd:na},zi=Kn==="multiple"||Kn==="tags"?Ie.createElement($n,(0,Be.Z)({},Ke,wi)):Ie.createElement(ut,(0,Be.Z)({},Ke,wi));return Ie.createElement("div",{ref:Yr,className:"".concat(pn,"-selector"),onClick:Ji,onMouseDown:Qi},zi)},We=Ie.forwardRef(Vt);We.displayName="Selector";var pt=We,zt=se(62709),Bt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],en=function(Ke){var At=Ke===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:At,adjustY:1},htmlRegion:"scroll"}}},nn=function(Ke,At){var dt=Ke.prefixCls,Gt=Ke.disabled,pn=Ke.visible,Sn=Ke.children,Kn=Ke.popupElement,Tn=Ke.animation,cn=Ke.transitionName,Wn=Ke.dropdownStyle,Zn=Ke.dropdownClassName,wr=Ke.direction,Un=wr===void 0?"ltr":wr,Rr=Ke.placement,Yr=Ke.builtinPlacements,Nr=Ke.dropdownMatchSelectWidth,jr=Ke.dropdownRender,kr=Ke.dropdownAlign,zr=Ke.getPopupContainer,ei=Ke.empty,ci=Ke.getTriggerDOMNode,Fr=Ke.onPopupVisibleChange,fi=Ke.onPopupMouseEnter,Oi=(0,xe.Z)(Ke,Bt),na="".concat(dt,"-dropdown"),Xi=Kn;jr&&(Xi=jr(Kn));var Fi=Ie.useMemo(function(){return Yr||en(Nr)},[Yr,Nr]),Ji=Tn?"".concat(na,"-").concat(Tn):cn,Qi=typeof Nr=="number",wi=Ie.useMemo(function(){return Qi?null:Nr===!1?"minWidth":"width"},[Nr,Qi]),zi=Wn;Qi&&(zi=(0,we.Z)((0,we.Z)({},zi),{},{width:Nr}));var Jr=Ie.useRef(null);return Ie.useImperativeHandle(At,function(){return{getPopupElement:function(){return Jr.current}}}),Ie.createElement(zt.Z,(0,Be.Z)({},Oi,{showAction:Fr?["click"]:[],hideAction:Fr?["click"]:[],popupPlacement:Rr||(Un==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Fi,prefixCls:na,popupTransitionName:Ji,popup:Ie.createElement("div",{ref:Jr,onMouseEnter:fi},Xi),stretch:wi,popupAlign:kr,popupVisible:pn,getPopupContainer:zr,popupClassName:He()(Zn,(0,ve.Z)({},"".concat(na,"-empty"),ei)),popupStyle:zi,getTriggerDOMNode:ci,onPopupVisibleChange:Fr}),Sn)},jn=Ie.forwardRef(nn);jn.displayName="SelectTrigger";var Lr=jn,rr=se(84506);function tr(Re,Ke){var At=Re.key,dt;return"value"in Re&&(dt=Re.value),At!=null?At:dt!==void 0?dt:"rc-index-key-".concat(Ke)}function dr(Re,Ke){var At=Re||{},dt=At.label,Gt=At.value,pn=At.options,Sn=At.groupLabel,Kn=dt||(Ke?"children":"label");return{label:Kn,value:Gt||"value",options:pn||"options",groupLabel:Sn||Kn}}function fr(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=Ke.fieldNames,dt=Ke.childrenAsData,Gt=[],pn=dr(At,!1),Sn=pn.label,Kn=pn.value,Tn=pn.options,cn=pn.groupLabel;function Wn(Zn,wr){Zn.forEach(function(Un){if(wr||!(Tn in Un)){var Rr=Un[Kn];Gt.push({key:tr(Un,Gt.length),groupOption:wr,data:Un,label:Un[Sn],value:Rr})}else{var Yr=Un[cn];Yr===void 0&&dt&&(Yr=Un.label),Gt.push({key:tr(Un,Gt.length),group:!0,data:Un,label:Yr}),Wn(Un[Tn],!0)}})}return Wn(Re,!1),Gt}function mt(Re){var Ke=(0,we.Z)({},Re);return"props"in Ke||Object.defineProperty(Ke,"props",{get:function(){return _t(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ke}}),Ke}function st(Re,Ke){if(!Ke||!Ke.length)return null;var At=!1;function dt(pn,Sn){var Kn=(0,rr.Z)(Sn),Tn=Kn[0],cn=Kn.slice(1);if(!Tn)return[pn];var Wn=pn.split(Tn);return At=At||Wn.length>1,Wn.reduce(function(Zn,wr){return[].concat((0,Ve.Z)(Zn),(0,Ve.Z)(dt(wr,cn)))},[]).filter(function(Zn){return Zn})}var Gt=dt(Re,Ke);return At?Gt:null}var Ct=["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"],fn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Bn(Re){return Re==="tags"||Re==="multiple"}var hn=Ie.forwardRef(function(Re,Ke){var At,dt,Gt=Re.id,pn=Re.prefixCls,Sn=Re.className,Kn=Re.showSearch,Tn=Re.tagRender,cn=Re.direction,Wn=Re.omitDomProps,Zn=Re.displayValues,wr=Re.onDisplayValuesChange,Un=Re.emptyOptions,Rr=Re.notFoundContent,Yr=Rr===void 0?"Not Found":Rr,Nr=Re.onClear,jr=Re.mode,kr=Re.disabled,zr=Re.loading,ei=Re.getInputElement,ci=Re.getRawInputElement,Fr=Re.open,fi=Re.defaultOpen,Oi=Re.onDropdownVisibleChange,na=Re.activeValue,Xi=Re.onActiveValueChange,Fi=Re.activeDescendantId,Ji=Re.searchValue,Qi=Re.autoClearSearchValue,wi=Re.onSearch,zi=Re.onSearchSplit,Jr=Re.tokenSeparators,hi=Re.allowClear,Ii=Re.suffixIcon,Yi=Re.clearIcon,$a=Re.OptionList,Na=Re.animation,Aa=Re.transitionName,ca=Re.dropdownStyle,ea=Re.dropdownClassName,Mi=Re.dropdownMatchSelectWidth,Oa=Re.dropdownRender,ki=Re.dropdownAlign,ti=Re.placement,Wi=Re.builtinPlacements,ua=Re.getPopupContainer,Vi=Re.showAction,aa=Vi===void 0?[]:Vi,mi=Re.onFocus,pa=Re.onBlur,xa=Re.onKeyUp,fa=Re.onKeyDown,wa=Re.onMouseDown,Ma=(0,xe.Z)(Re,Ct),Za=Bn(jr),ha=(Kn!==void 0?Kn:Za)||jr==="combobox",ka=(0,we.Z)({},Ma);fn.forEach(function(Da){delete ka[Da]}),Wn==null||Wn.forEach(function(Da){delete ka[Da]});var Ja=Ie.useState(!1),Ga=(0,Ee.Z)(Ja,2),so=Ga[0],Fa=Ga[1];Ie.useEffect(function(){Fa(vt())},[]);var Ca=Ie.useRef(null),_i=Ie.useRef(null),Ui=Ie.useRef(null),da=Ie.useRef(null),Sa=Ie.useRef(null),Ka=Yt(),io=(0,Ee.Z)(Ka,3),ho=io[0],Oo=io[1],Ro=io[2];Ie.useImperativeHandle(Ke,function(){var Da,ma;return{focus:(Da=da.current)===null||Da===void 0?void 0:Da.focus,blur:(ma=da.current)===null||ma===void 0?void 0:ma.blur,scrollTo:function(es){var ga;return(ga=Sa.current)===null||ga===void 0?void 0:ga.scrollTo(es)}}});var lo=Ie.useMemo(function(){var Da;if(jr!=="combobox")return Ji;var ma=(Da=Zn[0])===null||Da===void 0?void 0:Da.value;return typeof ma=="string"||typeof ma=="number"?String(ma):""},[Ji,jr,Zn]),Ao=jr==="combobox"&&typeof ei=="function"&&ei()||null,ra=typeof ci=="function"&&ci(),Ri=sn(_i,ra==null||(At=ra.props)===null||At===void 0?void 0:At.ref),Ta=Ie.useState(!1),_a=(0,Ee.Z)(Ta,2),co=_a[0],ao=_a[1];ft(function(){ao(!0)},[]);var hs=gt(!1,{defaultValue:fi,value:Fr}),Qo=(0,Ee.Z)(hs,2),ps=Qo[0],oa=Qo[1],Br=co?ps:!1,Si=!Yr&&Un;(kr||Si&&Br&&jr==="combobox")&&(Br=!1);var Ci=Si?!1:Br,Di=Ie.useCallback(function(Da){var ma=Da!==void 0?Da:!Br;kr||(oa(ma),Br!==ma&&(Oi==null||Oi(ma)))},[kr,Br,oa,Oi]),Ha=Ie.useMemo(function(){return(Jr||[]).some(function(Da){return[`
|
|
|
`,`\r
|
|
|
`].includes(Da)})},[Jr]),Va=function(ma,Ho,es){var ga=!0,za=ma;Xi==null||Xi(null);var Ra=es?null:st(ma,Jr);return jr!=="combobox"&&Ra&&(za="",zi==null||zi(Ra),Di(!1),ga=!1),wi&&lo!==za&&wi(za,{source:Ho?"typing":"effect"}),ga},Fo=function(ma){!ma||!ma.trim()||wi(ma,{source:"submit"})};Ie.useEffect(function(){!Br&&!Za&&jr!=="combobox"&&Va("",!1,!1)},[Br]),Ie.useEffect(function(){ps&&kr&&oa(!1),kr&&Oo(!1)},[kr]);var Uo=Ge(),ls=(0,Ee.Z)(Uo,2),va=ls[0],Bo=ls[1],cs=function(ma){var Ho=va(),es=ma.which;if(es===Xe.ENTER&&(jr!=="combobox"&&ma.preventDefault(),Br||Di(!0)),Bo(!!lo),es===Xe.BACKSPACE&&!Ho&&Za&&!lo&&Zn.length){for(var ga=(0,Ve.Z)(Zn),za=null,Ra=ga.length-1;Ra>=0;Ra-=1){var po=ga[Ra];if(!po.disabled){ga.splice(Ra,1),za=po;break}}za&&wr(ga,{type:"remove",values:[za]})}for(var is=arguments.length,Hs=new Array(is>1?is-1:0),gs=1;gs<is;gs++)Hs[gs-1]=arguments[gs];if(Br&&Sa.current){var Jl;(Jl=Sa.current).onKeyDown.apply(Jl,[ma].concat(Hs))}fa==null||fa.apply(void 0,[ma].concat(Hs))},ul=function(ma){for(var Ho=arguments.length,es=new Array(Ho>1?Ho-1:0),ga=1;ga<Ho;ga++)es[ga-1]=arguments[ga];if(Br&&Sa.current){var za;(za=Sa.current).onKeyUp.apply(za,[ma].concat(es))}xa==null||xa.apply(void 0,[ma].concat(es))},As=function(ma){var Ho=Zn.filter(function(es){return es!==ma});wr(Ho,{type:"remove",values:[ma]})},ms=Ie.useRef(!1),zo=function(){Oo(!0),kr||(mi&&!ms.current&&mi.apply(void 0,arguments),aa.includes("focus")&&Di(!0)),ms.current=!0},Ts=function(){Oo(!1,function(){ms.current=!1,Di(!1)}),!kr&&(lo&&(jr==="tags"?wi(lo,{source:"submit"}):jr==="multiple"&&wi("",{source:"blur"})),pa&&pa.apply(void 0,arguments))},Is=[];Ie.useEffect(function(){return function(){Is.forEach(function(Da){return clearTimeout(Da)}),Is.splice(0,Is.length)}},[]);var qs=function(ma){var Ho,es=ma.target,ga=(Ho=Ui.current)===null||Ho===void 0?void 0:Ho.getPopupElement();if(ga&&ga.contains(es)){var za=setTimeout(function(){var Hs=Is.indexOf(za);if(Hs!==-1&&Is.splice(Hs,1),Ro(),!so&&!ga.contains(document.activeElement)){var gs;(gs=da.current)===null||gs===void 0||gs.focus()}});Is.push(za)}for(var Ra=arguments.length,po=new Array(Ra>1?Ra-1:0),is=1;is<Ra;is++)po[is-1]=arguments[is];wa==null||wa.apply(void 0,[ma].concat(po))},oo=Ie.useState({}),Ia=(0,Ee.Z)(oo,2),Xa=Ia[1];function go(){Xa({})}var yo;ra&&(yo=function(ma){Di(ma)}),rt(function(){var Da;return[Ca.current,(Da=Ui.current)===null||Da===void 0?void 0:Da.getPopupElement()]},Ci,Di,!!ra);var Ko=Ie.useMemo(function(){return(0,we.Z)((0,we.Z)({},Re),{},{notFoundContent:Yr,open:Br,triggerOpen:Ci,id:Gt,showSearch:ha,multiple:Za,toggleOpen:Di})},[Re,Yr,Ci,Br,Gt,ha,Za,Di]),wo=!!Ii||zr,xs;wo&&(xs=Ie.createElement(Qe,{className:He()("".concat(pn,"-arrow"),(0,ve.Z)({},"".concat(pn,"-arrow-loading"),zr)),customizeIcon:Ii,customizeIconProps:{loading:zr,searchValue:lo,open:Br,focused:ho,showSearch:ha}}));var Xl=function(){var ma;Nr==null||Nr(),(ma=da.current)===null||ma===void 0||ma.focus(),wr([],{type:"clear",values:Zn}),Va("",!1,!1)},Yl=Ce(pn,Xl,Zn,hi,Yi,kr,lo,jr),vc=Yl.allowClear,Xc=Yl.clearIcon,Ks=Ie.createElement($a,{ref:Sa}),Ds=He()(pn,Sn,(dt={},(0,ve.Z)(dt,"".concat(pn,"-focused"),ho),(0,ve.Z)(dt,"".concat(pn,"-multiple"),Za),(0,ve.Z)(dt,"".concat(pn,"-single"),!Za),(0,ve.Z)(dt,"".concat(pn,"-allow-clear"),hi),(0,ve.Z)(dt,"".concat(pn,"-show-arrow"),wo),(0,ve.Z)(dt,"".concat(pn,"-disabled"),kr),(0,ve.Z)(dt,"".concat(pn,"-loading"),zr),(0,ve.Z)(dt,"".concat(pn,"-open"),Br),(0,ve.Z)(dt,"".concat(pn,"-customize-input"),Ao),(0,ve.Z)(dt,"".concat(pn,"-show-search"),ha),dt)),yc=Ie.createElement(Lr,{ref:Ui,disabled:kr,prefixCls:pn,visible:Ci,popupElement:Ks,animation:Na,transitionName:Aa,dropdownStyle:ca,dropdownClassName:ea,direction:cn,dropdownMatchSelectWidth:Mi,dropdownRender:Oa,dropdownAlign:ki,placement:ti,builtinPlacements:Wi,getPopupContainer:ua,empty:Un,getTriggerDOMNode:function(){return _i.current},onPopupVisibleChange:yo,onPopupMouseEnter:go},ra?Ie.cloneElement(ra,{ref:Ri}):Ie.createElement(pt,(0,Be.Z)({},Re,{domRef:_i,prefixCls:pn,inputElement:Ao,ref:da,id:Gt,showSearch:ha,autoClearSearchValue:Qi,mode:jr,activeDescendantId:Fi,tagRender:Tn,values:Zn,open:Br,onToggleOpen:Di,activeValue:na,searchValue:lo,onSearch:Va,onSearchSubmit:Fo,onRemove:As,tokenWithEnter:Ha}))),ql;return ra?ql=yc:ql=Ie.createElement("div",(0,Be.Z)({className:Ds},ka,{ref:Ca,onMouseDown:qs,onKeyDown:cs,onKeyUp:ul,onFocus:zo,onBlur:Ts}),ho&&!Br&&Ie.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Zn.map(function(Da){var ma=Da.label,Ho=Da.value;return["number","string"].includes((0,me.Z)(ma))?ma:Ho}).join(", "))),yc,xs,vc&&Xc),Ie.createElement(ht.Provider,{value:Ko},ql)}),vn=hn,xn=function(Re,Ke){var At=Ie.useRef({values:new Map,options:new Map}),dt=Ie.useMemo(function(){var pn=At.current,Sn=pn.values,Kn=pn.options,Tn=Re.map(function(Zn){if(Zn.label===void 0){var wr;return(0,we.Z)((0,we.Z)({},Zn),{},{label:(wr=Sn.get(Zn.value))===null||wr===void 0?void 0:wr.label})}return Zn}),cn=new Map,Wn=new Map;return Tn.forEach(function(Zn){cn.set(Zn.value,Zn),Wn.set(Zn.value,Ke.get(Zn.value)||Kn.get(Zn.value))}),At.current.values=cn,At.current.options=Wn,Tn},[Re,Ke]),Gt=Ie.useCallback(function(pn){return Ke.get(pn)||At.current.options.get(pn)},[Ke]);return[dt,Gt]};function Nn(Re,Ke){return Li(Re).join("").toUpperCase().includes(Ke)}var hr=function(Re,Ke,At,dt,Gt){return Ie.useMemo(function(){if(!At||dt===!1)return Re;var pn=Ke.options,Sn=Ke.label,Kn=Ke.value,Tn=[],cn=typeof dt=="function",Wn=At.toUpperCase(),Zn=cn?dt:function(Un,Rr){return Gt?Nn(Rr[Gt],Wn):Rr[pn]?Nn(Rr[Sn!=="children"?Sn:"label"],Wn):Nn(Rr[Kn],Wn)},wr=cn?function(Un){return mt(Un)}:function(Un){return Un};return Re.forEach(function(Un){if(Un[pn]){var Rr=Zn(At,wr(Un));if(Rr)Tn.push(Un);else{var Yr=Un[pn].filter(function(Nr){return Zn(At,wr(Nr))});Yr.length&&Tn.push((0,we.Z)((0,we.Z)({},Un),{},(0,ve.Z)({},pn,Yr)))}return}Zn(At,wr(Un))&&Tn.push(Un)}),Tn},[Re,dt,Gt,At,Ke])},tn=0,Qr=Oe();function Ur(){var Re;return Qr?(Re=tn,tn+=1):Re="TEST_OR_SSR",Re}function $i(Re){var Ke=Ie.useState(),At=(0,Ee.Z)(Ke,2),dt=At[0],Gt=At[1];return Ie.useEffect(function(){Gt("rc_select_".concat(Ur()))},[]),Re||dt}function Ai(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=[];return Ie.Children.forEach(Re,function(dt){dt==null&&!Ke.keepEmpty||(Array.isArray(dt)?At=At.concat(Ai(dt)):(0,Kt.isFragment)(dt)&&dt.props?At=At.concat(Ai(dt.props.children,Ke)):At.push(dt))}),At}var gi=["children","value"],qi=["children"];function xi(Re){var Ke=Re,At=Ke.key,dt=Ke.props,Gt=dt.children,pn=dt.value,Sn=(0,xe.Z)(dt,gi);return(0,we.Z)({key:At,value:pn!==void 0?pn:At,children:Gt},Sn)}function li(Re){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ai(Re).map(function(At,dt){if(!Ie.isValidElement(At)||!At.type)return null;var Gt=At,pn=Gt.type.isSelectOptGroup,Sn=Gt.key,Kn=Gt.props,Tn=Kn.children,cn=(0,xe.Z)(Kn,qi);return Ke||!pn?xi(At):(0,we.Z)((0,we.Z)({key:"__RC_SELECT_GRP__".concat(Sn===null?dt:Sn,"__"),label:Sn},cn),{},{options:li(Tn)})}).filter(function(At){return At})}function Ni(Re,Ke,At,dt,Gt){return Ie.useMemo(function(){var pn=Re,Sn=!Re;Sn&&(pn=li(Ke));var Kn=new Map,Tn=new Map,cn=function(wr,Un,Rr){Rr&&typeof Rr=="string"&&wr.set(Un[Rr],Un)};function Wn(Zn){for(var wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Un=0;Un<Zn.length;Un+=1){var Rr=Zn[Un];!Rr[At.options]||wr?(Kn.set(Rr[At.value],Rr),cn(Tn,Rr,At.label),cn(Tn,Rr,dt),cn(Tn,Rr,Gt)):Wn(Rr[At.options],!0)}}return Wn(pn),{options:pn,valueOptions:Kn,labelOptions:Tn}},[Re,Ke,At,dt,Gt])}function Gi(Re){var Ke=Ie.useRef();Ke.current=Re;var At=Ie.useCallback(function(){return Ke.current.apply(Ke,arguments)},[]);return At}var qr=function(){return null};qr.isSelectOptGroup=!0;var vi=qr,Zi=function(){return null};Zi.isSelectOption=!0;var la=Zi;function ta(Re,Ke){var At=(0,we.Z)({},Re);return Array.isArray(Ke)&&Ke.forEach(function(dt){delete At[dt]}),At}var ii=se(73299),Et=Ie.createContext(null),wt=Et;function Qt(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var mn=["disabled","title","children","style","className"];function On(Re){return typeof Re=="string"||typeof Re=="number"}var vr=function(Ke,At){var dt=Ut(),Gt=dt.prefixCls,pn=dt.id,Sn=dt.open,Kn=dt.multiple,Tn=dt.mode,cn=dt.searchValue,Wn=dt.toggleOpen,Zn=dt.notFoundContent,wr=dt.onPopupScroll,Un=Ie.useContext(wt),Rr=Un.flattenOptions,Yr=Un.onActiveValue,Nr=Un.defaultActiveFirstOption,jr=Un.onSelect,kr=Un.menuItemSelectedIcon,zr=Un.rawValues,ei=Un.fieldNames,ci=Un.virtual,Fr=Un.direction,fi=Un.listHeight,Oi=Un.listItemHeight,na="".concat(Gt,"-item"),Xi=Ot(function(){return Rr},[Sn,Rr],function(ki,ti){return ti[0]&&ki[1]!==ti[1]}),Fi=Ie.useRef(null),Ji=function(ti){ti.preventDefault()},Qi=function(ti){Fi.current&&Fi.current.scrollTo(typeof ti=="number"?{index:ti}:ti)},wi=function(ti){for(var Wi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ua=Xi.length,Vi=0;Vi<ua;Vi+=1){var aa=(ti+Vi*Wi+ua)%ua,mi=Xi[aa],pa=mi.group,xa=mi.data;if(!pa&&!xa.disabled)return aa}return-1},zi=Ie.useState(function(){return wi(0)}),Jr=(0,Ee.Z)(zi,2),hi=Jr[0],Ii=Jr[1],Yi=function(ti){var Wi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ii(ti);var ua={source:Wi?"keyboard":"mouse"},Vi=Xi[ti];if(!Vi){Yr(null,-1,ua);return}Yr(Vi.value,ti,ua)};(0,Ie.useEffect)(function(){Yi(Nr!==!1?wi(0):-1)},[Xi.length,cn]);var $a=Ie.useCallback(function(ki){return zr.has(ki)&&Tn!=="combobox"},[Tn,(0,Ve.Z)(zr).toString(),zr.size]);(0,Ie.useEffect)(function(){var ki=setTimeout(function(){if(!Kn&&Sn&&zr.size===1){var Wi=Array.from(zr)[0],ua=Xi.findIndex(function(Vi){var aa=Vi.data;return aa.value===Wi});ua!==-1&&(Yi(ua),Qi(ua))}});if(Sn){var ti;(ti=Fi.current)===null||ti===void 0||ti.scrollTo(void 0)}return function(){return clearTimeout(ki)}},[Sn,cn,Rr.length]);var Na=function(ti){ti!==void 0&&jr(ti,{selected:!zr.has(ti)}),Kn||Wn(!1)};if(Ie.useImperativeHandle(At,function(){return{onKeyDown:function(ti){var Wi=ti.which,ua=ti.ctrlKey;switch(Wi){case Xe.N:case Xe.P:case Xe.UP:case Xe.DOWN:{var Vi=0;if(Wi===Xe.UP?Vi=-1:Wi===Xe.DOWN?Vi=1:Qt()&&ua&&(Wi===Xe.N?Vi=1:Wi===Xe.P&&(Vi=-1)),Vi!==0){var aa=wi(hi+Vi,Vi);Qi(aa),Yi(aa,!0)}break}case Xe.ENTER:{var mi=Xi[hi];mi&&!mi.data.disabled?Na(mi.value):Na(void 0),Sn&&ti.preventDefault();break}case Xe.ESC:Wn(!1),Sn&&ti.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ti){Qi(ti)}}}),Xi.length===0)return Ie.createElement("div",{role:"listbox",id:"".concat(pn,"_list"),className:"".concat(na,"-empty"),onMouseDown:Ji},Zn);var Aa=Object.keys(ei).map(function(ki){return ei[ki]}),ca=function(ti){return ti.label};function ea(ki,ti){var Wi=ki.group;return{role:Wi?"presentation":"option",id:"".concat(pn,"_list_").concat(ti)}}var Mi=function(ti){var Wi=Xi[ti];if(!Wi)return null;var ua=Wi.data||{},Vi=ua.value,aa=Wi.group,mi=ln(ua,!0),pa=ca(Wi);return Wi?Ie.createElement("div",(0,Be.Z)({"aria-label":typeof pa=="string"&&!aa?pa:null},mi,{key:ti},ea(Wi,ti),{"aria-selected":$a(Vi)}),Vi):null},Oa={role:"listbox",id:"".concat(pn,"_list")};return Ie.createElement(Ie.Fragment,null,ci&&Ie.createElement("div",(0,Be.Z)({},Oa,{style:{height:0,width:0,overflow:"hidden"}}),Mi(hi-1),Mi(hi),Mi(hi+1)),Ie.createElement(ii.Z,{itemKey:"key",ref:Fi,data:Xi,height:fi,itemHeight:Oi,fullHeight:!1,onMouseDown:Ji,onScroll:wr,virtual:ci,direction:Fr,innerProps:ci?null:Oa},function(ki,ti){var Wi,ua=ki.group,Vi=ki.groupOption,aa=ki.data,mi=ki.label,pa=ki.value,xa=aa.key;if(ua){var fa,wa=(fa=aa.title)!==null&&fa!==void 0?fa:On(mi)?mi.toString():void 0;return Ie.createElement("div",{className:He()(na,"".concat(na,"-group")),title:wa},mi!==void 0?mi:xa)}var Ma=aa.disabled,Za=aa.title,ha=aa.children,ka=aa.style,Ja=aa.className,Ga=(0,xe.Z)(aa,mn),so=ta(Ga,Aa),Fa=$a(pa),Ca="".concat(na,"-option"),_i=He()(na,Ca,Ja,(Wi={},(0,ve.Z)(Wi,"".concat(Ca,"-grouped"),Vi),(0,ve.Z)(Wi,"".concat(Ca,"-active"),hi===ti&&!Ma),(0,ve.Z)(Wi,"".concat(Ca,"-disabled"),Ma),(0,ve.Z)(Wi,"".concat(Ca,"-selected"),Fa),Wi)),Ui=ca(ki),da=!kr||typeof kr=="function"||Fa,Sa=typeof Ui=="number"?Ui:Ui||pa,Ka=On(Sa)?Sa.toString():void 0;return Za!==void 0&&(Ka=Za),Ie.createElement("div",(0,Be.Z)({},ln(so),ci?{}:ea(ki,ti),{"aria-selected":Fa,className:_i,title:Ka,onMouseMove:function(){hi===ti||Ma||Yi(ti)},onClick:function(){Ma||Na(pa)},style:ka}),Ie.createElement("div",{className:"".concat(Ca,"-content")},Sa),Ie.isValidElement(kr)||Fa,da&&Ie.createElement(Qe,{className:"".concat(na,"-option-state"),customizeIcon:kr,customizeIconProps:{isSelected:Fa}},Fa?"\u2713":null))}))},Ir=Ie.forwardRef(vr);Ir.displayName="OptionList";var Wr=Ir;function Gr(Re){var Ke=Re.mode,At=Re.options,dt=Re.children,Gt=Re.backfill,pn=Re.allowClear,Sn=Re.placeholder,Kn=Re.getInputElement,Tn=Re.showSearch,cn=Re.onSearch,Wn=Re.defaultOpen,Zn=Re.autoFocus,wr=Re.labelInValue,Un=Re.value,Rr=Re.inputValue,Yr=Re.optionLabelProp,Nr=isMultiple(Ke),jr=Tn!==void 0?Tn:Nr||Ke==="combobox",kr=At||convertChildrenToData(dt);if(warning(Ke!=="tags"||kr.every(function(Fr){return!Fr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ke==="tags"||Ke==="combobox"){var zr=kr.some(function(Fr){return Fr.options?Fr.options.some(function(fi){return typeof("value"in fi?fi.value:fi.key)=="number"}):typeof("value"in Fr?Fr.value:Fr.key)=="number"});warning(!zr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ke!=="combobox"||!Yr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ke==="combobox"||!Gt,"`backfill` only works with `combobox` mode."),warning(Ke==="combobox"||!Kn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ke!=="combobox"||!Kn||!pn||!Sn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),cn&&!jr&&Ke!=="combobox"&&Ke!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Wn||Zn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Un!=null){var ei=toArray(Un);warning(!wr||ei.every(function(Fr){return _typeof(Fr)==="object"&&("key"in Fr||"value"in Fr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Nr||Array.isArray(Un),"`value` should be array when `mode` is `multiple` or `tags`")}if(dt){var ci=null;toNodeArray(dt).some(function(Fr){if(!React.isValidElement(Fr)||!Fr.type)return!1;var fi=Fr,Oi=fi.type;if(Oi.isSelectOption)return!1;if(Oi.isSelectOptGroup){var na=toNodeArray(Fr.props.children).every(function(Xi){return!React.isValidElement(Xi)||!Fr.type||Xi.type.isSelectOption?!0:(ci=Xi.type,!1)});return!na}return ci=Oi,!0}),ci&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ci.displayName||ci.name||ci,"`.")),warning(Rr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Hr(Re,Ke){if(Re){var At=function dt(Gt){for(var pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Sn=0;Sn<Gt.length;Sn++){var Kn=Gt[Sn];if(Kn[Ke==null?void 0:Ke.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!pn&&Array.isArray(Kn[Ke==null?void 0:Ke.options])&&dt(Kn[Ke==null?void 0:Ke.options],!0))break}};At(Re)}}var ni=null,yi=["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"],Ar=["inputValue"];function pi(Re){return!Re||(0,me.Z)(Re)!=="object"}var Ti=Ie.forwardRef(function(Re,Ke){var At=Re.id,dt=Re.mode,Gt=Re.prefixCls,pn=Gt===void 0?"rc-select":Gt,Sn=Re.backfill,Kn=Re.fieldNames,Tn=Re.inputValue,cn=Re.searchValue,Wn=Re.onSearch,Zn=Re.autoClearSearchValue,wr=Zn===void 0?!0:Zn,Un=Re.onSelect,Rr=Re.onDeselect,Yr=Re.dropdownMatchSelectWidth,Nr=Yr===void 0?!0:Yr,jr=Re.filterOption,kr=Re.filterSort,zr=Re.optionFilterProp,ei=Re.optionLabelProp,ci=Re.options,Fr=Re.children,fi=Re.defaultActiveFirstOption,Oi=Re.menuItemSelectedIcon,na=Re.virtual,Xi=Re.direction,Fi=Re.listHeight,Ji=Fi===void 0?200:Fi,Qi=Re.listItemHeight,wi=Qi===void 0?20:Qi,zi=Re.value,Jr=Re.defaultValue,hi=Re.labelInValue,Ii=Re.onChange,Yi=(0,xe.Z)(Re,yi),$a=$i(At),Na=Bn(dt),Aa=!!(!ci&&Fr),ca=Ie.useMemo(function(){return jr===void 0&&dt==="combobox"?!1:jr},[jr,dt]),ea=Ie.useMemo(function(){return dr(Kn,Aa)},[JSON.stringify(Kn),Aa]),Mi=gt("",{value:cn!==void 0?cn:Tn,postState:function(Si){return Si||""}}),Oa=(0,Ee.Z)(Mi,2),ki=Oa[0],ti=Oa[1],Wi=Ni(ci,Fr,ea,zr,ei),ua=Wi.valueOptions,Vi=Wi.labelOptions,aa=Wi.options,mi=Ie.useCallback(function(Br){var Si=Li(Br);return Si.map(function(Ci){var Di,Ha,Va,Fo,Uo;if(pi(Ci))Di=Ci;else{var ls;Va=Ci.key,Ha=Ci.label,Di=(ls=Ci.value)!==null&&ls!==void 0?ls:Va}var va=ua.get(Di);if(va){var Bo;if(Ha===void 0&&(Ha=va==null?void 0:va[ei||ea.label]),Va===void 0&&(Va=(Bo=va==null?void 0:va.key)!==null&&Bo!==void 0?Bo:Di),Fo=va==null?void 0:va.disabled,Uo=va==null?void 0:va.title,0)var cs}return{label:Ha,value:Di,key:Va,disabled:Fo,title:Uo}})},[ea,ei,ua]),pa=gt(Jr,{value:zi}),xa=(0,Ee.Z)(pa,2),fa=xa[0],wa=xa[1],Ma=Ie.useMemo(function(){var Br,Si=mi(fa);return dt==="combobox"&&yt((Br=Si[0])===null||Br===void 0?void 0:Br.value)?[]:Si},[fa,mi,dt]),Za=xn(Ma,ua),ha=(0,Ee.Z)(Za,2),ka=ha[0],Ja=ha[1],Ga=Ie.useMemo(function(){if(!dt&&ka.length===1){var Br=ka[0];if(Br.value===null&&(Br.label===null||Br.label===void 0))return[]}return ka.map(function(Si){var Ci;return(0,we.Z)((0,we.Z)({},Si),{},{label:(Ci=Si.label)!==null&&Ci!==void 0?Ci:Si.value})})},[dt,ka]),so=Ie.useMemo(function(){return new Set(ka.map(function(Br){return Br.value}))},[ka]);Ie.useEffect(function(){if(dt==="combobox"){var Br,Si=(Br=ka[0])===null||Br===void 0?void 0:Br.value;ti(ri(Si)?String(Si):"")}},[ka]);var Fa=Gi(function(Br,Si){var Ci,Di=Si!=null?Si:Br;return Ci={},(0,ve.Z)(Ci,ea.value,Br),(0,ve.Z)(Ci,ea.label,Di),Ci}),Ca=Ie.useMemo(function(){if(dt!=="tags")return aa;var Br=(0,Ve.Z)(aa),Si=function(Di){return ua.has(Di)};return(0,Ve.Z)(ka).sort(function(Ci,Di){return Ci.value<Di.value?-1:1}).forEach(function(Ci){var Di=Ci.value;Si(Di)||Br.push(Fa(Di,Ci.label))}),Br},[Fa,aa,ua,ka,dt]),_i=hr(Ca,ea,ki,ca,zr),Ui=Ie.useMemo(function(){return dt!=="tags"||!ki||_i.some(function(Br){return Br[zr||"value"]===ki})||_i.some(function(Br){return Br[ea.value]===ki})?_i:[Fa(ki)].concat((0,Ve.Z)(_i))},[Fa,zr,dt,_i,ki,ea]),da=Ie.useMemo(function(){return kr?(0,Ve.Z)(Ui).sort(function(Br,Si){return kr(Br,Si)}):Ui},[Ui,kr]),Sa=Ie.useMemo(function(){return fr(da,{fieldNames:ea,childrenAsData:Aa})},[da,ea,Aa]),Ka=function(Si){var Ci=mi(Si);if(wa(Ci),Ii&&(Ci.length!==ka.length||Ci.some(function(Va,Fo){var Uo;return((Uo=ka[Fo])===null||Uo===void 0?void 0:Uo.value)!==(Va==null?void 0:Va.value)}))){var Di=hi?Ci:Ci.map(function(Va){return Va.value}),Ha=Ci.map(function(Va){return mt(Ja(Va.value))});Ii(Na?Di:Di[0],Na?Ha:Ha[0])}},io=Ie.useState(null),ho=(0,Ee.Z)(io,2),Oo=ho[0],Ro=ho[1],lo=Ie.useState(0),Ao=(0,Ee.Z)(lo,2),ra=Ao[0],Ri=Ao[1],Ta=fi!==void 0?fi:dt!=="combobox",_a=Ie.useCallback(function(Br,Si){var Ci=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Di=Ci.source,Ha=Di===void 0?"keyboard":Di;Ri(Si),Sn&&dt==="combobox"&&Br!==null&&Ha==="keyboard"&&Ro(String(Br))},[Sn,dt]),co=function(Si,Ci,Di){var Ha=function(){var ms,zo=Ja(Si);return[hi?{label:zo==null?void 0:zo[ea.label],value:Si,key:(ms=zo==null?void 0:zo.key)!==null&&ms!==void 0?ms:Si}:Si,mt(zo)]};if(Ci&&Un){var Va=Ha(),Fo=(0,Ee.Z)(Va,2),Uo=Fo[0],ls=Fo[1];Un(Uo,ls)}else if(!Ci&&Rr&&Di!=="clear"){var va=Ha(),Bo=(0,Ee.Z)(va,2),cs=Bo[0],ul=Bo[1];Rr(cs,ul)}},ao=Gi(function(Br,Si){var Ci,Di=Na?Si.selected:!0;Di?Ci=Na?[].concat((0,Ve.Z)(ka),[Br]):[Br]:Ci=ka.filter(function(Ha){return Ha.value!==Br}),Ka(Ci),co(Br,Di),dt==="combobox"?Ro(""):(!Bn||wr)&&(ti(""),Ro(""))}),hs=function(Si,Ci){Ka(Si);var Di=Ci.type,Ha=Ci.values;(Di==="remove"||Di==="clear")&&Ha.forEach(function(Va){co(Va.value,!1,Di)})},Qo=function(Si,Ci){if(ti(Si),Ro(null),Ci.source==="submit"){var Di=(Si||"").trim();if(Di){var Ha=Array.from(new Set([].concat((0,Ve.Z)(so),[Di])));Ka(Ha),co(Di,!0),ti("")}return}Ci.source!=="blur"&&(dt==="combobox"&&Ka(Si),Wn==null||Wn(Si))},ps=function(Si){var Ci=Si;dt!=="tags"&&(Ci=Si.map(function(Ha){var Va=Vi.get(Ha);return Va==null?void 0:Va.value}).filter(function(Ha){return Ha!==void 0}));var Di=Array.from(new Set([].concat((0,Ve.Z)(so),(0,Ve.Z)(Ci))));Ka(Di),Di.forEach(function(Ha){co(Ha,!0)})},oa=Ie.useMemo(function(){var Br=na!==!1&&Nr!==!1;return(0,we.Z)((0,we.Z)({},Wi),{},{flattenOptions:Sa,onActiveValue:_a,defaultActiveFirstOption:Ta,onSelect:ao,menuItemSelectedIcon:Oi,rawValues:so,fieldNames:ea,virtual:Br,direction:Xi,listHeight:Ji,listItemHeight:wi,childrenAsData:Aa})},[Wi,Sa,_a,Ta,ao,Oi,so,ea,na,Nr,Ji,wi,Aa]);return Ie.createElement(wt.Provider,{value:oa},Ie.createElement(vn,(0,Be.Z)({},Yi,{id:$a,prefixCls:pn,ref:Ke,omitDomProps:Ar,mode:dt,displayValues:Ga,onDisplayValuesChange:hs,direction:Xi,searchValue:ki,onSearch:Qo,autoClearSearchValue:wr,onSearchSplit:ps,dropdownMatchSelectWidth:Nr,OptionList:Wr,emptyOptions:!Sa.length,activeValue:Oo,activeDescendantId:"".concat($a,"_list_").concat(ra)})))}),Ei=Ti;Ei.Option=la,Ei.OptGroup=vi;var De=Ei,Fe=De,ze=se(10366),Ze=se(8745),nt=se(33603),lt=se(9708),Mt=se(53124),an=se(98866),un=se(88258),Jn=se(98675),br=se(65223),Vn=se(4173),kn=se(87244),wn=se(13458),Pn=se(78642),zn=se(46163),gr=function(Re,Ke){var At={};for(var dt in Re)Object.prototype.hasOwnProperty.call(Re,dt)&&Ke.indexOf(dt)<0&&(At[dt]=Re[dt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,dt=Object.getOwnPropertySymbols(Re);Gt<dt.length;Gt++)Ke.indexOf(dt[Gt])<0&&Object.prototype.propertyIsEnumerable.call(Re,dt[Gt])&&(At[dt[Gt]]=Re[dt[Gt]]);return At};const Yn="SECRET_COMBOBOX_MODE_DO_NOT_USE",Xn=(Re,Ke)=>{var At,{prefixCls:dt,bordered:Gt=!0,className:pn,rootClassName:Sn,getPopupContainer:Kn,popupClassName:Tn,dropdownClassName:cn,listHeight:Wn=256,placement:Zn,listItemHeight:wr=24,size:Un,disabled:Rr,notFoundContent:Yr,status:Nr,builtinPlacements:jr,dropdownMatchSelectWidth:kr,popupMatchSelectWidth:zr,direction:ei,style:ci,allowClear:Fr}=Re,fi=gr(Re,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Oi,getPrefixCls:na,renderEmpty:Xi,direction:Fi,virtual:Ji,popupMatchSelectWidth:Qi,popupOverflow:wi,select:zi}=Ie.useContext(Mt.E_),Jr=na("select",dt),hi=na(),Ii=ei!=null?ei:Fi,{compactSize:Yi,compactItemClassnames:$a}=(0,Vn.ri)(Jr,Ii),[Na,Aa]=(0,kn.Z)(Jr),ca=Ie.useMemo(()=>{const{mode:Ca}=fi;if(Ca!=="combobox")return Ca===Yn?"combobox":Ca},[fi.mode]),ea=ca==="multiple"||ca==="tags",Mi=(0,Pn.Z)(fi.suffixIcon,fi.showArrow),Oa=(At=zr!=null?zr:kr)!==null&&At!==void 0?At:Qi,{status:ki,hasFeedback:ti,isFormItemInput:Wi,feedbackIcon:ua}=Ie.useContext(br.aM),Vi=(0,lt.F)(ki,Nr);let aa;Yr!==void 0?aa=Yr:ca==="combobox"?aa=null:aa=(Xi==null?void 0:Xi("Select"))||Ie.createElement(un.Z,{componentName:"Select"});const{suffixIcon:mi,itemIcon:pa,removeIcon:xa,clearIcon:fa}=(0,zn.Z)(Object.assign(Object.assign({},fi),{multiple:ea,hasFeedback:ti,feedbackIcon:ua,showSuffixIcon:Mi,prefixCls:Jr,showArrow:fi.showArrow,componentName:"Select"})),wa=Fr===!0?{clearIcon:fa}:Fr,Ma=(0,ze.Z)(fi,["suffixIcon","itemIcon"]),Za=He()(Tn||cn,{[`${Jr}-dropdown-${Ii}`]:Ii==="rtl"},Sn,Aa),ha=(0,Jn.Z)(Ca=>{var _i;return(_i=Un!=null?Un:Yi)!==null&&_i!==void 0?_i:Ca}),ka=Ie.useContext(an.Z),Ja=Rr!=null?Rr:ka,Ga=He()({[`${Jr}-lg`]:ha==="large",[`${Jr}-sm`]:ha==="small",[`${Jr}-rtl`]:Ii==="rtl",[`${Jr}-borderless`]:!Gt,[`${Jr}-in-form-item`]:Wi},(0,lt.Z)(Jr,Vi,ti),$a,zi==null?void 0:zi.className,pn,Sn,Aa),so=Ie.useMemo(()=>Zn!==void 0?Zn:Ii==="rtl"?"bottomRight":"bottomLeft",[Zn,Ii]),Fa=(0,wn.Z)(jr,wi);return Na(Ie.createElement(Fe,Object.assign({ref:Ke,virtual:Ji,showSearch:zi==null?void 0:zi.showSearch},Ma,{style:Object.assign(Object.assign({},zi==null?void 0:zi.style),ci),dropdownMatchSelectWidth:Oa,builtinPlacements:Fa,transitionName:(0,nt.m)(hi,"slide-up",fi.transitionName),listHeight:Wn,listItemHeight:wr,mode:ca,prefixCls:Jr,placement:so,direction:Ii,suffixIcon:mi,menuItemSelectedIcon:pa,removeIcon:xa,allowClear:wa,notFoundContent:aa,className:Ga,getPopupContainer:Kn||Oi,dropdownClassName:Za,disabled:Ja})))},ir=Ie.forwardRef(Xn),ar=(0,Ze.Z)(ir);ir.SECRET_COMBOBOX_MODE_DO_NOT_USE=Yn,ir.Option=la,ir.OptGroup=vi,ir._InternalPanelDoNotUseOrYouWillBeFired=ar;var xr=ir},87244:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return ke}});var de=se(14747),He=se(80110),Be=se(45503),Ve=se(67968),ve=se(67771),we=se(33297);const Ee=Se=>{const{optionHeight:Ue,optionFontSize:je,optionLineHeight:_t,optionPadding:vt}=Se;return{position:"relative",display:"block",minHeight:Ue,padding:vt,color:Se.colorText,fontWeight:"normal",fontSize:je,lineHeight:_t,boxSizing:"border-box"}};var me=Se=>{const{antCls:Ue,componentCls:je}=Se,_t=`${je}-item`,vt=`&${Ue}-slide-up-enter${Ue}-slide-up-enter-active`,kt=`&${Ue}-slide-up-appear${Ue}-slide-up-appear-active`,Xe=`&${Ue}-slide-up-leave${Ue}-slide-up-leave-active`,Kt=`${je}-dropdown-placement-`;return[{[`${je}-dropdown`]:Object.assign(Object.assign({},(0,de.Wf)(Se)),{position:"absolute",top:-9999,zIndex:Se.zIndexPopup,boxSizing:"border-box",padding:Se.paddingXXS,overflow:"hidden",fontSize:Se.fontSize,fontVariant:"initial",backgroundColor:Se.colorBgElevated,borderRadius:Se.borderRadiusLG,outline:"none",boxShadow:Se.boxShadowSecondary,[`
|
|
|
${vt}${Kt}bottomLeft,
|
|
|
${kt}${Kt}bottomLeft
|
|
|
`]:{animationName:ve.fJ},[`
|
|
|
${vt}${Kt}topLeft,
|
|
|
${kt}${Kt}topLeft,
|
|
|
${vt}${Kt}topRight,
|
|
|
${kt}${Kt}topRight
|
|
|
`]:{animationName:ve.Qt},[`${Xe}${Kt}bottomLeft`]:{animationName:ve.Uw},[`
|
|
|
${Xe}${Kt}topLeft,
|
|
|
${Xe}${Kt}topRight
|
|
|
`]:{animationName:ve.ly},"&-hidden":{display:"none"},[`${_t}`]:Object.assign(Object.assign({},Ee(Se)),{cursor:"pointer",transition:`background ${Se.motionDurationSlow} ease`,borderRadius:Se.borderRadiusSM,"&-group":{color:Se.colorTextDescription,fontSize:Se.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},de.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${_t}-option-disabled)`]:{backgroundColor:Se.optionActiveBg},[`&-selected:not(${_t}-option-disabled)`]:{color:Se.optionSelectedColor,fontWeight:Se.optionSelectedFontWeight,backgroundColor:Se.optionSelectedBg,[`${_t}-option-state`]:{color:Se.colorPrimary}},"&-disabled":{[`&${_t}-option-selected`]:{backgroundColor:Se.colorBgContainerDisabled},color:Se.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Se.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,ve.oN)(Se,"slide-up"),(0,ve.oN)(Se,"slide-down"),(0,we.Fm)(Se,"move-up"),(0,we.Fm)(Se,"move-down")]};const Ie=2,ot=Se=>{let{controlHeightSM:Ue,controlHeight:je,lineWidth:_t}=Se;const vt=(je-Ue)/2-_t,kt=Math.ceil(vt/2);return[vt,kt]};function Oe(Se,Ue){const{componentCls:je,iconCls:_t}=Se,vt=`${je}-selection-overflow`,kt=Se.multipleSelectItemHeight,[Xe]=ot(Se),Kt=Ue?`${je}-${Ue}`:"";return{[`${je}-multiple${Kt}`]:{fontSize:Se.fontSize,[vt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${je}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Xe-Ie}px ${Ie*2}px`,borderRadius:Se.borderRadius,[`${je}-show-search&`]:{cursor:"text"},[`${je}-disabled&`]:{background:Se.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ie}px 0`,lineHeight:`${kt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${je}-show-arrow ${je}-selector,
|
|
|
&${je}-allow-clear ${je}-selector
|
|
|
`]:{paddingInlineEnd:Se.fontSizeIcon+Se.controlPaddingHorizontal},[`${je}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:kt,marginTop:Ie,marginBottom:Ie,lineHeight:`${kt-Se.lineWidth*2}px`,background:Se.multipleItemBg,border:`${Se.lineWidth}px ${Se.lineType} ${Se.multipleItemBorderColor}`,borderRadius:Se.borderRadiusSM,cursor:"default",transition:`font-size ${Se.motionDurationSlow}, line-height ${Se.motionDurationSlow}, height ${Se.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ie*2,paddingInlineStart:Se.paddingXS,paddingInlineEnd:Se.paddingXS/2,[`${je}-disabled&`]:{color:Se.multipleItemColorDisabled,borderColor:Se.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Se.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,de.Ro)()),{display:"inline-flex",alignItems:"center",color:Se.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${_t}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Se.colorIconHover}})},[`${vt}-item + ${vt}-item`]:{[`${je}-selection-search`]:{marginInlineStart:0}},[`${je}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Se.inputPaddingHorizontalBase-Xe,"\n &-input,\n &-mirror\n ":{height:kt,fontFamily:Se.fontFamily,lineHeight:`${kt}px`,transition:`all ${Se.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${je}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Se.inputPaddingHorizontalBase,insetInlineEnd:Se.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Se.motionDurationSlow}`}}}}var ft=Se=>{const{componentCls:Ue}=Se,je=(0,Be.TS)(Se,{controlHeight:Se.controlHeightSM,multipleSelectItemHeight:Se.controlHeightXS,borderRadius:Se.borderRadiusSM,borderRadiusSM:Se.borderRadiusXS}),_t=(0,Be.TS)(Se,{fontSize:Se.fontSizeLG,controlHeight:Se.controlHeightLG,multipleSelectItemHeight:Se.multipleItemHeightLG,borderRadius:Se.borderRadiusLG,borderRadiusSM:Se.borderRadius}),[,vt]=ot(Se);return[Oe(Se),Oe(je,"sm"),{[`${Ue}-multiple${Ue}-sm`]:{[`${Ue}-selection-placeholder`]:{insetInline:Se.controlPaddingHorizontalSM-Se.lineWidth},[`${Ue}-selection-search`]:{marginInlineStart:vt}}},Oe(_t,"lg")]};function it(Se,Ue){const{componentCls:je,inputPaddingHorizontalBase:_t,borderRadius:vt}=Se,kt=Se.controlHeight-Se.lineWidth*2,Xe=Math.ceil(Se.fontSize*1.25),Kt=Ue?`${je}-${Ue}`:"";return{[`${je}-single${Kt}`]:{fontSize:Se.fontSize,[`${je}-selector`]:Object.assign(Object.assign({},(0,de.Wf)(Se)),{display:"flex",borderRadius:vt,[`${je}-selection-search`]:{position:"absolute",top:0,insetInlineStart:_t,insetInlineEnd:_t,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${je}-selection-item,
|
|
|
${je}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${kt}px`,transition:`all ${Se.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${kt}px`}},[`${je}-selection-item`]:{position:"relative",userSelect:"none"},[`${je}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${je}-selection-item:after`,`${je}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${je}-show-arrow ${je}-selection-item,
|
|
|
&${je}-show-arrow ${je}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Xe},[`&${je}-open ${je}-selection-item`]:{color:Se.colorTextPlaceholder},[`&:not(${je}-customize-input)`]:{[`${je}-selector`]:{width:"100%",height:Se.controlHeight,padding:`0 ${_t}px`,[`${je}-selection-search-input`]:{height:kt},"&:after":{lineHeight:`${kt}px`}}},[`&${je}-customize-input`]:{[`${je}-selector`]:{"&:after":{display:"none"},[`${je}-selection-search`]:{position:"static",width:"100%"},[`${je}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${_t}px`,"&:after":{display:"none"}}}}}}}function Je(Se){const{componentCls:Ue}=Se,je=Se.controlPaddingHorizontalSM-Se.lineWidth;return[it(Se),it((0,Be.TS)(Se,{controlHeight:Se.controlHeightSM,borderRadius:Se.borderRadiusSM}),"sm"),{[`${Ue}-single${Ue}-sm`]:{[`&:not(${Ue}-customize-input)`]:{[`${Ue}-selection-search`]:{insetInlineStart:je,insetInlineEnd:je},[`${Ue}-selector`]:{padding:`0 ${je}px`},[`&${Ue}-show-arrow ${Ue}-selection-search`]:{insetInlineEnd:je+Se.fontSize*1.5},[`
|
|
|
&${Ue}-show-arrow ${Ue}-selection-item,
|
|
|
&${Ue}-show-arrow ${Ue}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Se.fontSize*1.5}}}},it((0,Be.TS)(Se,{controlHeight:Se.singleItemHeightLG,fontSize:Se.fontSizeLG,borderRadius:Se.borderRadiusLG}),"lg")]}const Le=Se=>{const{componentCls:Ue,selectorBg:je}=Se;return{position:"relative",backgroundColor:je,border:`${Se.lineWidth}px ${Se.lineType} ${Se.colorBorder}`,transition:`all ${Se.motionDurationMid} ${Se.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ue}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ue}-disabled&`]:{color:Se.colorTextDisabled,background:Se.colorBgContainerDisabled,cursor:"not-allowed",[`${Ue}-multiple&`]:{background:Se.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},gt=function(Se,Ue){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:_t,borderHoverColor:vt,outlineColor:kt,antCls:Xe}=Ue,Kt=je?{[`${_t}-selector`]:{borderColor:vt}}:{};return{[Se]:{[`&:not(${_t}-disabled):not(${_t}-customize-input):not(${Xe}-pagination-size-changer)`]:Object.assign(Object.assign({},Kt),{[`${_t}-focused& ${_t}-selector`]:{borderColor:vt,boxShadow:`0 0 0 ${Ue.controlOutlineWidth}px ${kt}`,outline:0},[`&:hover ${_t}-selector`]:{borderColor:vt}})}}},qt=Se=>{const{componentCls:Ue}=Se;return{[`${Ue}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},tt=Se=>{const{componentCls:Ue,inputPaddingHorizontalBase:je,iconCls:_t}=Se;return{[Ue]:Object.assign(Object.assign({},(0,de.Wf)(Se)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ue}-customize-input) ${Ue}-selector`]:Object.assign(Object.assign({},Le(Se)),qt(Se)),[`${Ue}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},de.vS),[`${Ue}-selection-placeholder`]:Object.assign(Object.assign({},de.vS),{flex:1,color:Se.colorTextPlaceholder,pointerEvents:"none"}),[`${Ue}-arrow`]:Object.assign(Object.assign({},(0,de.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[_t]:{verticalAlign:"top",transition:`transform ${Se.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ue}-suffix)`]:{pointerEvents:"auto"}},[`${Ue}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ue}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,zIndex:1,display:"inline-block",width:Se.fontSizeIcon,height:Se.fontSizeIcon,marginTop:-Se.fontSizeIcon/2,color:Se.colorTextQuaternary,fontSize:Se.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Se.clearBg,cursor:"pointer",opacity:0,transition:`color ${Se.motionDurationMid} ease, opacity ${Se.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Se.colorTextTertiary}},"&:hover":{[`${Ue}-clear`]:{opacity:1}}}),[`${Ue}-has-feedback`]:{[`${Ue}-clear`]:{insetInlineEnd:je+Se.fontSize+Se.paddingXS}}}},ct=Se=>{const{componentCls:Ue}=Se;return[{[Ue]:{[`&-borderless ${Ue}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ue}-in-form-item`]:{width:"100%"}}},tt(Se),Je(Se),ft(Se),me(Se),{[`${Ue}-rtl`]:{direction:"rtl"}},gt(Ue,(0,Be.TS)(Se,{borderHoverColor:Se.colorPrimaryHover,outlineColor:Se.controlOutline})),gt(`${Ue}-status-error`,(0,Be.TS)(Se,{borderHoverColor:Se.colorErrorHover,outlineColor:Se.colorErrorOutline}),!0),gt(`${Ue}-status-warning`,(0,Be.TS)(Se,{borderHoverColor:Se.colorWarningHover,outlineColor:Se.colorWarningOutline}),!0),(0,He.c)(Se,{borderElCls:`${Ue}-selector`,focusElCls:`${Ue}-focused`})]};var ke=(0,Ve.Z)("Select",(Se,Ue)=>{let{rootPrefixCls:je}=Ue;const _t=(0,Be.TS)(Se,{rootPrefixCls:je,inputPaddingHorizontalBase:Se.paddingSM-1,multipleSelectItemHeight:Se.multipleItemHeight});return[ct(_t)]},Se=>{const{fontSize:Ue,lineHeight:je,controlHeight:_t,controlPaddingHorizontal:vt,zIndexPopupBase:kt,colorText:Xe,fontWeightStrong:Kt,controlItemBgActive:Ot,controlItemBgHover:bn,colorBgContainer:Nt,colorFillSecondary:sn,controlHeightLG:Cn,controlHeightSM:or,colorBgContainerDisabled:Qe,colorTextDisabled:Ce}=Se;return{zIndexPopup:kt+50,optionSelectedColor:Xe,optionSelectedFontWeight:Kt,optionSelectedBg:Ot,optionActiveBg:bn,optionPadding:`${(_t-Ue*je)/2}px ${vt}px`,optionFontSize:Ue,optionLineHeight:je,optionHeight:_t,selectorBg:Nt,clearBg:Nt,singleItemHeightLG:Cn,multipleItemBg:sn,multipleItemBorderColor:"transparent",multipleItemHeight:or,multipleItemHeightLG:_t,multipleSelectorBgDisabled:Qe,multipleItemColorDisabled:Ce,multipleItemBorderColorDisabled:"transparent"}})},13458:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return He}});const de=Be=>{const ve={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Be==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},ve),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},ve),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},ve),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},ve),{points:["br","tr"],offset:[0,-4]})}};function He(Be,Ve){return Be||de(Ve)}},78642:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return de}});function de(He,Be){return Be!==void 0?Be:He!==null}},46163:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return xe}});var de=se(18299),He=se(16646),Be=se(73475),Ve=se(42922),ve=se(3407),we=se(72395),Ee=se(67294);function xe(me){let{suffixIcon:Ie,clearIcon:ot,menuItemSelectedIcon:Oe,removeIcon:St,loading:ft,multiple:it,hasFeedback:Je,prefixCls:Le,showSuffixIcon:gt,feedbackIcon:qt,showArrow:tt,componentName:ct}=me;const ke=ot!=null?ot:Ee.createElement(He.Z,null),Se=vt=>Ie===null&&!Je&&!tt?null:Ee.createElement(Ee.Fragment,null,gt!==!1&&vt,Je&&qt);let Ue=null;if(Ie!==void 0)Ue=Se(Ie);else if(ft)Ue=Se(Ee.createElement(ve.Z,{spin:!0}));else{const vt=`${Le}-suffix`;Ue=kt=>{let{open:Xe,showSearch:Kt}=kt;return Se(Xe&&Kt?Ee.createElement(we.Z,{className:vt}):Ee.createElement(Ve.Z,{className:vt}))}}let je=null;Oe!==void 0?je=Oe:it?je=Ee.createElement(de.Z,null):je=null;let _t=null;return St!==void 0?_t=St:_t=Ee.createElement(Be.Z,null),{clearIcon:ke,suffixIcon:Ue,itemIcon:je,removeIcon:_t}}},33507:function(En,Wt){"use strict";const se=de=>({[de.componentCls]:{[`${de.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${de.motionDurationMid} ${de.motionEaseInOut},
|
|
|
opacity ${de.motionDurationMid} ${de.motionEaseInOut} !important`}},[`${de.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${de.motionDurationMid} ${de.motionEaseInOut},
|
|
|
opacity ${de.motionDurationMid} ${de.motionEaseInOut} !important`}}});Wt.Z=se},33297:function(En,Wt,se){"use strict";se.d(Wt,{Fm:function(){return Oe}});var de=se(45930),He=se(93590);const Be=new de.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ve=new de.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ve=new de.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),we=new de.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 de.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),xe=new de.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),me=new de.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Ie=new de.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),ot={"move-up":{inKeyframes:me,outKeyframes:Ie},"move-down":{inKeyframes:Be,outKeyframes:Ve},"move-left":{inKeyframes:ve,outKeyframes:we},"move-right":{inKeyframes:Ee,outKeyframes:xe}},Oe=(St,ft)=>{const{antCls:it}=St,Je=`${it}-${ft}`,{inKeyframes:Le,outKeyframes:gt}=ot[ft];return[(0,He.R)(Je,Le,gt,St.motionDurationMid),{[`
|
|
|
${Je}-enter,
|
|
|
${Je}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:St.motionEaseOutCirc},[`${Je}-leave`]:{animationTimingFunction:St.motionEaseInOutCirc}}]}},67771:function(En,Wt,se){"use strict";se.d(Wt,{Qt:function(){return ve},Uw:function(){return Ve},fJ:function(){return Be},ly:function(){return we},oN:function(){return Oe}});var de=se(45930),He=se(93590);const Be=new de.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Ve=new de.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),ve=new de.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),we=new de.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Ee=new de.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),xe=new de.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),me=new de.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Ie=new de.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ot={"slide-up":{inKeyframes:Be,outKeyframes:Ve},"slide-down":{inKeyframes:ve,outKeyframes:we},"slide-left":{inKeyframes:Ee,outKeyframes:xe},"slide-right":{inKeyframes:me,outKeyframes:Ie}},Oe=(St,ft)=>{const{antCls:it}=St,Je=`${it}-${ft}`,{inKeyframes:Le,outKeyframes:gt}=ot[ft];return[(0,He.R)(Je,Le,gt,St.motionDurationMid),{[`
|
|
|
${Je}-enter,
|
|
|
${Je}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:St.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Je}-leave`]:{animationTimingFunction:St.motionEaseInQuint}}]}},47897:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return pe}});var de=se(3407),He=se(94184),Be=se.n(He);function Ve(){return Ve=Object.assign?Object.assign.bind():function(he){for(var oe=1;oe<arguments.length;oe++){var Te=arguments[oe];for(var Ye in Te)Object.prototype.hasOwnProperty.call(Te,Ye)&&(he[Ye]=Te[Ye])}return he},Ve.apply(this,arguments)}function ve(he){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(oe){return typeof oe}:function(oe){return oe&&typeof Symbol=="function"&&oe.constructor===Symbol&&oe!==Symbol.prototype?"symbol":typeof oe},ve(he)}function we(he,oe){if(ve(he)!=="object"||he===null)return he;var Te=he[Symbol.toPrimitive];if(Te!==void 0){var Ye=Te.call(he,oe||"default");if(ve(Ye)!=="object")return Ye;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(he)}function Ee(he){var oe=we(he,"string");return ve(oe)==="symbol"?oe:String(oe)}function xe(he,oe,Te){return oe=Ee(oe),oe in he?Object.defineProperty(he,oe,{value:Te,enumerable:!0,configurable:!0,writable:!0}):he[oe]=Te,he}function me(he){if(Array.isArray(he))return he}function Ie(he,oe){var Te=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Te!=null){var Ye,Lt,Rt,Ft,Jt=[],Xt=!0,Hn=!1;try{if(Rt=(Te=Te.call(he)).next,oe===0){if(Object(Te)!==Te)return;Xt=!1}else for(;!(Xt=(Ye=Rt.call(Te)).done)&&(Jt.push(Ye.value),Jt.length!==oe);Xt=!0);}catch(Rn){Hn=!0,Lt=Rn}finally{try{if(!Xt&&Te.return!=null&&(Ft=Te.return(),Object(Ft)!==Ft))return}finally{if(Hn)throw Lt}}return Jt}}function ot(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Te=0,Ye=new Array(oe);Te<oe;Te++)Ye[Te]=he[Te];return Ye}function Oe(he,oe){if(he){if(typeof he=="string")return ot(he,oe);var Te=Object.prototype.toString.call(he).slice(8,-1);if(Te==="Object"&&he.constructor&&(Te=he.constructor.name),Te==="Map"||Te==="Set")return Array.from(he);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return ot(he,oe)}}function St(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ft(he,oe){return me(he)||Ie(he,oe)||Oe(he,oe)||St()}function it(he,oe){if(he==null)return{};var Te={},Ye=Object.keys(he),Lt,Rt;for(Rt=0;Rt<Ye.length;Rt++)Lt=Ye[Rt],!(oe.indexOf(Lt)>=0)&&(Te[Lt]=he[Lt]);return Te}function Je(he,oe){if(he==null)return{};var Te=it(he,oe),Ye,Lt;if(Object.getOwnPropertySymbols){var Rt=Object.getOwnPropertySymbols(he);for(Lt=0;Lt<Rt.length;Lt++)Ye=Rt[Lt],!(oe.indexOf(Ye)>=0)&&Object.prototype.propertyIsEnumerable.call(he,Ye)&&(Te[Ye]=he[Ye])}return Te}var Le=se(67294);function gt(he){if(Array.isArray(he))return he}function qt(he,oe){var Te=he==null?null:typeof Symbol!="undefined"&&he[Symbol.iterator]||he["@@iterator"];if(Te!=null){var Ye,Lt,Rt,Ft,Jt=[],Xt=!0,Hn=!1;try{if(Rt=(Te=Te.call(he)).next,oe===0){if(Object(Te)!==Te)return;Xt=!1}else for(;!(Xt=(Ye=Rt.call(Te)).done)&&(Jt.push(Ye.value),Jt.length!==oe);Xt=!0);}catch(Rn){Hn=!0,Lt=Rn}finally{try{if(!Xt&&Te.return!=null&&(Ft=Te.return(),Object(Ft)!==Ft))return}finally{if(Hn)throw Lt}}return Jt}}function tt(he,oe){(oe==null||oe>he.length)&&(oe=he.length);for(var Te=0,Ye=new Array(oe);Te<oe;Te++)Ye[Te]=he[Te];return Ye}function ct(he,oe){if(he){if(typeof he=="string")return tt(he,oe);var Te=Object.prototype.toString.call(he).slice(8,-1);if(Te==="Object"&&he.constructor&&(Te=he.constructor.name),Te==="Map"||Te==="Set")return Array.from(he);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return tt(he,oe)}}function ke(){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 Se(he,oe){return gt(he)||qt(he,oe)||ct(he,oe)||ke()}function Ue(he){var oe=Le.useRef();oe.current=he;var Te=Le.useCallback(function(){for(var Ye,Lt=arguments.length,Rt=new Array(Lt),Ft=0;Ft<Lt;Ft++)Rt[Ft]=arguments[Ft];return(Ye=oe.current)===null||Ye===void 0?void 0:Ye.call.apply(Ye,[oe].concat(Rt))},[]);return Te}function je(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var _t=je()?Le.useLayoutEffect:Le.useEffect,vt=function(oe,Te){var Ye=Le.useRef(!0);_t(function(){return oe(Ye.current)},Te),_t(function(){return Ye.current=!1,function(){Ye.current=!0}},[])},kt=function(oe,Te){vt(function(Ye){if(!Ye)return oe()},Te)},Xe=null;function Kt(he){var oe=Le.useRef(!1),Te=Le.useState(he),Ye=Se(Te,2),Lt=Ye[0],Rt=Ye[1];Le.useEffect(function(){return oe.current=!1,function(){oe.current=!0}},[]);function Ft(Jt,Xt){Xt&&oe.current||Rt(Jt)}return[Lt,Ft]}function Ot(he){return he!==void 0}function bn(he,oe){var Te=oe||{},Ye=Te.defaultValue,Lt=Te.value,Rt=Te.onChange,Ft=Te.postState,Jt=Kt(function(){return Ot(Lt)?Lt:Ot(Ye)?typeof Ye=="function"?Ye():Ye:typeof he=="function"?he():he}),Xt=Se(Jt,2),Hn=Xt[0],Rn=Xt[1],Tt=Lt!==void 0?Lt:Hn,dn=Ft?Ft(Tt):Tt,cr=Ue(Rt),Mr=Kt([Tt]),at=Se(Mr,2),Ht=at[0],Fn=at[1];kt(function(){var nr=Ht[0];Hn!==nr&&cr(Hn,nr)},[Ht]),kt(function(){Ot(Lt)||Rn(Lt)},[Lt]);var er=Ue(function(nr,Sr){Rn(nr,Sr),Fn([Tt],Sr)});return[dn,er]}var Nt={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 Te=oe.keyCode;if(oe.altKey&&!oe.ctrlKey||oe.metaKey||Te>=Nt.F1&&Te<=Nt.F12)return!1;switch(Te){case Nt.ALT:case Nt.CAPS_LOCK:case Nt.CONTEXT_MENU:case Nt.CTRL:case Nt.DOWN:case Nt.END:case Nt.ESC:case Nt.HOME:case Nt.INSERT:case Nt.LEFT:case Nt.MAC_FF_META:case Nt.META:case Nt.NUMLOCK:case Nt.NUM_CENTER:case Nt.PAGE_DOWN:case Nt.PAGE_UP:case Nt.PAUSE:case Nt.PRINT_SCREEN:case Nt.RIGHT:case Nt.SHIFT:case Nt.UP:case Nt.WIN_KEY:case Nt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(oe){if(oe>=Nt.ZERO&&oe<=Nt.NINE||oe>=Nt.NUM_ZERO&&oe<=Nt.NUM_MULTIPLY||oe>=Nt.A&&oe<=Nt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&oe===0)return!0;switch(oe){case Nt.SPACE:case Nt.QUESTION_MARK:case Nt.NUM_PLUS:case Nt.NUM_MINUS:case Nt.NUM_PERIOD:case Nt.NUM_DIVISION:case Nt.SEMICOLON:case Nt.DASH:case Nt.EQUALS:case Nt.COMMA:case Nt.PERIOD:case Nt.SLASH:case Nt.APOSTROPHE:case Nt.SINGLE_QUOTE:case Nt.OPEN_SQUARE_BRACKET:case Nt.BACKSLASH:case Nt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},sn=Nt,Cn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],or=Le.forwardRef(function(he,oe){var Te,Ye=he.prefixCls,Lt=Ye===void 0?"rc-switch":Ye,Rt=he.className,Ft=he.checked,Jt=he.defaultChecked,Xt=he.disabled,Hn=he.loadingIcon,Rn=he.checkedChildren,Tt=he.unCheckedChildren,dn=he.onClick,cr=he.onChange,Mr=he.onKeyDown,at=Je(he,Cn),Ht=bn(!1,{value:Ft,defaultValue:Jt}),Fn=ft(Ht,2),er=Fn[0],nr=Fn[1];function Sr(Vr,ur){var si=er;return Xt||(si=Vr,nr(si),cr==null||cr(si,ur)),si}function Tr(Vr){Vr.which===sn.LEFT?Sr(!1,Vr):Vr.which===sn.RIGHT&&Sr(!0,Vr),Mr==null||Mr(Vr)}function Er(Vr){var ur=Sr(!er,Vr);dn==null||dn(ur,Vr)}var Or=Be()(Lt,Rt,(Te={},xe(Te,"".concat(Lt,"-checked"),er),xe(Te,"".concat(Lt,"-disabled"),Xt),Te));return Le.createElement("button",Ve({},at,{type:"button",role:"switch","aria-checked":er,disabled:Xt,className:Or,ref:oe,onKeyDown:Tr,onClick:Er}),Hn,Le.createElement("span",{className:"".concat(Lt,"-inner")},Le.createElement("span",{className:"".concat(Lt,"-inner-checked")},Rn),Le.createElement("span",{className:"".concat(Lt,"-inner-unchecked")},Tt)))});or.displayName="Switch";var Qe=or,Ce=se(45353),ht=se(53124),Ut=se(98866),Yt=se(98675),Ge=se(84780),rt=se(14747),jt=se(67968),_n=se(45503);const rn=he=>{const{componentCls:oe,trackHeightSM:Te,trackPadding:Ye,trackMinWidthSM:Lt,innerMinMarginSM:Rt,innerMaxMarginSM:Ft,handleSizeSM:Jt}=he,Xt=`${oe}-inner`;return{[oe]:{[`&${oe}-small`]:{minWidth:Lt,height:Te,lineHeight:`${Te}px`,[`${oe}-inner`]:{paddingInlineStart:Ft,paddingInlineEnd:Rt,[`${Xt}-checked`]:{marginInlineStart:`calc(-100% + ${Jt+Ye*2}px - ${Ft*2}px)`,marginInlineEnd:`calc(100% - ${Jt+Ye*2}px + ${Ft*2}px)`},[`${Xt}-unchecked`]:{marginTop:-Te,marginInlineStart:0,marginInlineEnd:0}},[`${oe}-handle`]:{width:Jt,height:Jt},[`${oe}-loading-icon`]:{top:(Jt-he.switchLoadingIconSize)/2,fontSize:he.switchLoadingIconSize},[`&${oe}-checked`]:{[`${oe}-inner`]:{paddingInlineStart:Rt,paddingInlineEnd:Ft,[`${Xt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Xt}-unchecked`]:{marginInlineStart:`calc(100% - ${Jt+Ye*2}px + ${Ft*2}px)`,marginInlineEnd:`calc(-100% + ${Jt+Ye*2}px - ${Ft*2}px)`}},[`${oe}-handle`]:{insetInlineStart:`calc(100% - ${Jt+Ye}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${Xt}`]:{[`${Xt}-unchecked`]:{marginInlineStart:he.marginXXS/2,marginInlineEnd:-he.marginXXS/2}},[`&${oe}-checked ${Xt}`]:{[`${Xt}-checked`]:{marginInlineStart:-he.marginXXS/2,marginInlineEnd:he.marginXXS/2}}}}}}},$t=he=>{const{componentCls:oe,handleSize:Te}=he;return{[oe]:{[`${oe}-loading-icon${he.iconCls}`]:{position:"relative",top:(Te-he.fontSize)/2,color:he.switchLoadingIconColor,verticalAlign:"top"},[`&${oe}-checked ${oe}-loading-icon`]:{color:he.switchColor}}}},Zt=he=>{const{componentCls:oe,motion:Te,trackPadding:Ye,handleBg:Lt,handleShadow:Rt,handleSize:Ft}=he,Jt=`${oe}-handle`;return{[oe]:{[Jt]:{position:"absolute",top:Ye,insetInlineStart:Ye,width:Ft,height:Ft,transition:`all ${he.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Lt,borderRadius:Ft/2,boxShadow:Rt,transition:`all ${he.switchDuration} ease-in-out`,content:'""'}},[`&${oe}-checked ${Jt}`]:{insetInlineStart:`calc(100% - ${Ft+Ye}px)`},[`&:not(${oe}-disabled):active`]:Te?{[`${Jt}::before`]:{insetInlineEnd:he.switchHandleActiveInset,insetInlineStart:0},[`&${oe}-checked ${Jt}::before`]:{insetInlineEnd:0,insetInlineStart:he.switchHandleActiveInset}}:{}}}},yn=he=>{const{componentCls:oe,trackHeight:Te,trackPadding:Ye,innerMinMargin:Lt,innerMaxMargin:Rt,handleSize:Ft}=he,Jt=`${oe}-inner`;return{[oe]:{[Jt]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Rt,paddingInlineEnd:Lt,transition:`padding-inline-start ${he.switchDuration} ease-in-out, padding-inline-end ${he.switchDuration} ease-in-out`,[`${Jt}-checked, ${Jt}-unchecked`]:{display:"block",color:he.colorTextLightSolid,fontSize:he.fontSizeSM,transition:`margin-inline-start ${he.switchDuration} ease-in-out, margin-inline-end ${he.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Jt}-checked`]:{marginInlineStart:`calc(-100% + ${Ft+Ye*2}px - ${Rt*2}px)`,marginInlineEnd:`calc(100% - ${Ft+Ye*2}px + ${Rt*2}px)`},[`${Jt}-unchecked`]:{marginTop:-Te,marginInlineStart:0,marginInlineEnd:0}},[`&${oe}-checked ${Jt}`]:{paddingInlineStart:Lt,paddingInlineEnd:Rt,[`${Jt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Jt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ft+Ye*2}px + ${Rt*2}px)`,marginInlineEnd:`calc(-100% + ${Ft+Ye*2}px - ${Rt*2}px)`}},[`&:not(${oe}-disabled):active`]:{[`&:not(${oe}-checked) ${Jt}`]:{[`${Jt}-unchecked`]:{marginInlineStart:Ye*2,marginInlineEnd:-Ye*2}},[`&${oe}-checked ${Jt}`]:{[`${Jt}-checked`]:{marginInlineStart:-Ye*2,marginInlineEnd:Ye*2}}}}}},ln=he=>{const{componentCls:oe,trackHeight:Te,trackMinWidth:Ye}=he;return{[oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,rt.Wf)(he)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ye,height:Te,lineHeight:`${Te}px`,verticalAlign:"middle",background:he.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${he.motionDurationMid}`,userSelect:"none",[`&:hover:not(${oe}-disabled)`]:{background:he.colorTextTertiary}}),(0,rt.Qy)(he)),{[`&${oe}-checked`]:{background:he.switchColor,[`&:hover:not(${oe}-disabled)`]:{background:he.colorPrimaryHover}},[`&${oe}-loading, &${oe}-disabled`]:{cursor:"not-allowed",opacity:he.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${oe}-rtl`]:{direction:"rtl"}})}};var Ae=(0,jt.Z)("Switch",he=>{const oe=(0,_n.TS)(he,{switchDuration:he.motionDurationMid,switchColor:he.colorPrimary,switchDisabledOpacity:he.opacityLoading,switchLoadingIconSize:he.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${he.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ln(oe),yn(oe),Zt(oe),$t(oe),rn(oe)]},he=>{const{fontSize:oe,lineHeight:Te,controlHeight:Ye,colorWhite:Lt}=he,Rt=oe*Te,Ft=Ye/2,Jt=2,Xt=Rt-Jt*2,Hn=Ft-Jt*2;return{trackHeight:Rt,trackHeightSM:Ft,trackMinWidth:Xt*2+Jt*4,trackMinWidthSM:Hn*2+Jt*2,trackPadding:Jt,handleBg:Lt,handleSize:Xt,handleSizeSM:Hn,handleShadow:`0 2px 4px 0 ${new Ge.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Xt/2,innerMaxMargin:Xt+Jt+Jt*2,innerMinMarginSM:Hn/2,innerMaxMarginSM:Hn+Jt+Jt*2}}),ue=function(he,oe){var Te={};for(var Ye in he)Object.prototype.hasOwnProperty.call(he,Ye)&&oe.indexOf(Ye)<0&&(Te[Ye]=he[Ye]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Lt=0,Ye=Object.getOwnPropertySymbols(he);Lt<Ye.length;Lt++)oe.indexOf(Ye[Lt])<0&&Object.prototype.propertyIsEnumerable.call(he,Ye[Lt])&&(Te[Ye[Lt]]=he[Ye[Lt]]);return Te};const le=Le.forwardRef((he,oe)=>{const{prefixCls:Te,size:Ye,disabled:Lt,loading:Rt,className:Ft,rootClassName:Jt,style:Xt}=he,Hn=ue(he,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Rn,direction:Tt,switch:dn}=Le.useContext(ht.E_),cr=Le.useContext(Ut.Z),Mr=(Lt!=null?Lt:cr)||Rt,at=Rn("switch",Te),Ht=Le.createElement("div",{className:`${at}-handle`},Rt&&Le.createElement(de.Z,{className:`${at}-loading-icon`})),[Fn,er]=Ae(at),nr=(0,Yt.Z)(Ye),Sr=Be()(dn==null?void 0:dn.className,{[`${at}-small`]:nr==="small",[`${at}-loading`]:Rt,[`${at}-rtl`]:Tt==="rtl"},Ft,Jt,er),Tr=Object.assign(Object.assign({},dn==null?void 0:dn.style),Xt);return Fn(Le.createElement(Ce.Z,{component:"Switch"},Le.createElement(Qe,Object.assign({},Hn,{prefixCls:at,className:Sr,style:Tr,disabled:Mr,ref:oe,loadingIcon:Ht}))))});le.__ANT_SWITCH=!0;var pe=le},66368:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return Ei}});var de=se(73475),He=se(25877),Be=se(38308),Ve=se(94184),ve=se.n(Ve),we=se(87462),Ee=se(4942),xe=se(1413),me=se(97685),Ie=se(71002),ot=se(45987),Oe=se(67294),St=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var De=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(De)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(De==null?void 0:De.substr(0,4))};function ft(De){var Fe=Oe.useRef();Fe.current=De;var ze=Oe.useCallback(function(){for(var Ze,nt=arguments.length,lt=new Array(nt),Mt=0;Mt<nt;Mt++)lt[Mt]=arguments[Mt];return(Ze=Fe.current)===null||Ze===void 0?void 0:Ze.call.apply(Ze,[Fe].concat(lt))},[]);return ze}function it(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Je=it()?Oe.useLayoutEffect:Oe.useEffect,Le=function(Fe,ze){var Ze=Oe.useRef(!0);Je(function(){return Fe(Ze.current)},ze),Je(function(){return Ze.current=!1,function(){Ze.current=!0}},[])},gt=function(Fe,ze){Le(function(Ze){if(!Ze)return Fe()},ze)},qt=null;function tt(De){var Fe=Oe.useRef(!1),ze=Oe.useState(De),Ze=(0,me.Z)(ze,2),nt=Ze[0],lt=Ze[1];Oe.useEffect(function(){return Fe.current=!1,function(){Fe.current=!0}},[]);function Mt(an,un){un&&Fe.current||lt(an)}return[nt,Mt]}function ct(De){return De!==void 0}function ke(De,Fe){var ze=Fe||{},Ze=ze.defaultValue,nt=ze.value,lt=ze.onChange,Mt=ze.postState,an=tt(function(){return ct(nt)?nt:ct(Ze)?typeof Ze=="function"?Ze():Ze:typeof De=="function"?De():De}),un=(0,me.Z)(an,2),Jn=un[0],br=un[1],Vn=nt!==void 0?nt:Jn,kn=Mt?Mt(Vn):Vn,wn=ft(lt),Pn=tt([Vn]),zn=(0,me.Z)(Pn,2),gr=zn[0],Yn=zn[1];gt(function(){var ir=gr[0];Jn!==ir&&wn(Jn,ir)},[gr]),gt(function(){ct(nt)||br(nt)},[nt]);var Xn=ft(function(ir,ar){br(ir,ar),Yn([Vn],ar)});return[kn,Xn]}var Se=se(62874),Ue=(0,Oe.createContext)(null),je=Oe.forwardRef(function(De,Fe){var ze=De.prefixCls,Ze=De.className,nt=De.style,lt=De.id,Mt=De.active,an=De.tabKey,un=De.children;return Oe.createElement("div",{id:lt&&"".concat(lt,"-panel-").concat(an),role:"tabpanel",tabIndex:Mt?0:-1,"aria-labelledby":lt&&"".concat(lt,"-tab-").concat(an),"aria-hidden":!Mt,style:nt,className:ve()(ze,Mt&&"".concat(ze,"-active"),Ze),ref:Fe},un)}),_t=je,vt=["key","forceRender","style","className"];function kt(De){var Fe=De.id,ze=De.activeKey,Ze=De.animated,nt=De.tabPosition,lt=De.destroyInactiveTabPane,Mt=Oe.useContext(Ue),an=Mt.prefixCls,un=Mt.tabs,Jn=Ze.tabPane,br="".concat(an,"-tabpane");return Oe.createElement("div",{className:ve()("".concat(an,"-content-holder"))},Oe.createElement("div",{className:ve()("".concat(an,"-content"),"".concat(an,"-content-").concat(nt),(0,Ee.Z)({},"".concat(an,"-content-animated"),Jn))},un.map(function(Vn){var kn=Vn.key,wn=Vn.forceRender,Pn=Vn.style,zn=Vn.className,gr=(0,ot.Z)(Vn,vt),Yn=kn===ze;return Oe.createElement(Se.Z,(0,we.Z)({key:kn,visible:Yn,forceRender:wn,removeOnLeave:!!lt,leavedClassName:"".concat(br,"-hidden")},Ze.tabPaneMotion),function(Xn,ir){var ar=Xn.style,xr=Xn.className;return Oe.createElement(_t,(0,we.Z)({},gr,{prefixCls:br,id:Fe,tabKey:kn,animated:Jn,active:Yn,style:(0,xe.Z)((0,xe.Z)({},Pn),ar),className:ve()(zn,xr),ref:ir}))})})))}var Xe=se(74902),Kt=se(48555),Ot=se(59864);function bn(De,Fe,ze){var Ze=Oe.useRef({});return(!("value"in Ze.current)||ze(Ze.current.condition,Fe))&&(Ze.current.value=De(),Ze.current.condition=Fe),Ze.current.value}function Nt(De,Fe){typeof De=="function"?De(Fe):(0,Ie.Z)(De)==="object"&&De&&"current"in De&&(De.current=Fe)}function sn(){for(var De=arguments.length,Fe=new Array(De),ze=0;ze<De;ze++)Fe[ze]=arguments[ze];var Ze=Fe.filter(function(nt){return nt});return Ze.length<=1?Ze[0]:function(nt){Fe.forEach(function(lt){Nt(lt,nt)})}}function Cn(){for(var De=arguments.length,Fe=new Array(De),ze=0;ze<De;ze++)Fe[ze]=arguments[ze];return bn(function(){return sn.apply(void 0,Fe)},Fe,function(Ze,nt){return Ze.length===nt.length&&Ze.every(function(lt,Mt){return lt===nt[Mt]})})}function or(De){var Fe,ze,Ze=isMemo(De)?De.type.type:De.type;return!(typeof Ze=="function"&&!((Fe=Ze.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof De=="function"&&!((ze=De.prototype)!==null&&ze!==void 0&&ze.render))}var Qe={width:0,height:0,left:0,top:0};function Ce(De,Fe,ze){return(0,Oe.useMemo)(function(){for(var Ze,nt=new Map,lt=Fe.get((Ze=De[0])===null||Ze===void 0?void 0:Ze.key)||Qe,Mt=lt.left+lt.width,an=0;an<De.length;an+=1){var un=De[an].key,Jn=Fe.get(un);if(!Jn){var br;Jn=Fe.get((br=De[an-1])===null||br===void 0?void 0:br.key)||Qe}var Vn=nt.get(un)||(0,xe.Z)({},Jn);Vn.right=Mt-Vn.left-Vn.width,nt.set(un,Vn)}return nt},[De.map(function(Ze){return Ze.key}).join("_"),Fe,ze])}function ht(De,Fe){var ze=Oe.useRef(De),Ze=Oe.useState({}),nt=(0,me.Z)(Ze,2),lt=nt[1];function Mt(an){var un=typeof an=="function"?an(ze.current):an;un!==ze.current&&Fe(un,ze.current),ze.current=un,lt({})}return[ze.current,Mt]}var Ut=.1,Yt=.01,Ge=20,rt=Math.pow(.995,Ge);function jt(De,Fe){var ze=(0,Oe.useState)(),Ze=(0,me.Z)(ze,2),nt=Ze[0],lt=Ze[1],Mt=(0,Oe.useState)(0),an=(0,me.Z)(Mt,2),un=an[0],Jn=an[1],br=(0,Oe.useState)(0),Vn=(0,me.Z)(br,2),kn=Vn[0],wn=Vn[1],Pn=(0,Oe.useState)(),zn=(0,me.Z)(Pn,2),gr=zn[0],Yn=zn[1],Xn=(0,Oe.useRef)();function ir(dt){var Gt=dt.touches[0],pn=Gt.screenX,Sn=Gt.screenY;lt({x:pn,y:Sn}),window.clearInterval(Xn.current)}function ar(dt){if(nt){dt.preventDefault();var Gt=dt.touches[0],pn=Gt.screenX,Sn=Gt.screenY;lt({x:pn,y:Sn});var Kn=pn-nt.x,Tn=Sn-nt.y;Fe(Kn,Tn);var cn=Date.now();Jn(cn),wn(cn-un),Yn({x:Kn,y:Tn})}}function xr(){if(nt&&(lt(null),Yn(null),gr)){var dt=gr.x/kn,Gt=gr.y/kn,pn=Math.abs(dt),Sn=Math.abs(Gt);if(Math.max(pn,Sn)<Ut)return;var Kn=dt,Tn=Gt;Xn.current=window.setInterval(function(){if(Math.abs(Kn)<Yt&&Math.abs(Tn)<Yt){window.clearInterval(Xn.current);return}Kn*=rt,Tn*=rt,Fe(Kn*Ge,Tn*Ge)},Ge)}}var Re=(0,Oe.useRef)();function Ke(dt){var Gt=dt.deltaX,pn=dt.deltaY,Sn=0,Kn=Math.abs(Gt),Tn=Math.abs(pn);Kn===Tn?Sn=Re.current==="x"?Gt:pn:Kn>Tn?(Sn=Gt,Re.current="x"):(Sn=pn,Re.current="y"),Fe(-Sn,-Sn)&&dt.preventDefault()}var At=(0,Oe.useRef)(null);At.current={onTouchStart:ir,onTouchMove:ar,onTouchEnd:xr,onWheel:Ke},Oe.useEffect(function(){function dt(Kn){At.current.onTouchStart(Kn)}function Gt(Kn){At.current.onTouchMove(Kn)}function pn(Kn){At.current.onTouchEnd(Kn)}function Sn(Kn){At.current.onWheel(Kn)}return document.addEventListener("touchmove",Gt,{passive:!1}),document.addEventListener("touchend",pn,{passive:!1}),De.current.addEventListener("touchstart",dt,{passive:!1}),De.current.addEventListener("wheel",Sn),function(){document.removeEventListener("touchmove",Gt),document.removeEventListener("touchend",pn)}},[])}function _n(De){var Fe=(0,Oe.useState)(0),ze=(0,me.Z)(Fe,2),Ze=ze[0],nt=ze[1],lt=(0,Oe.useRef)(0),Mt=(0,Oe.useRef)();return Mt.current=De,gt(function(){var an;(an=Mt.current)===null||an===void 0||an.call(Mt)},[Ze]),function(){lt.current===Ze&&(lt.current+=1,nt(lt.current))}}function rn(De){var Fe=(0,Oe.useRef)([]),ze=(0,Oe.useState)({}),Ze=(0,me.Z)(ze,2),nt=Ze[1],lt=(0,Oe.useRef)(typeof De=="function"?De():De),Mt=_n(function(){var un=lt.current;Fe.current.forEach(function(Jn){un=Jn(un)}),Fe.current=[],lt.current=un,nt({})});function an(un){Fe.current.push(un),Mt()}return[lt.current,an]}var $t={width:0,height:0,left:0,top:0,right:0};function Zt(De,Fe,ze,Ze,nt,lt,Mt){var an=Mt.tabs,un=Mt.tabPosition,Jn=Mt.rtl,br,Vn,kn;return["top","bottom"].includes(un)?(br="width",Vn=Jn?"right":"left",kn=Math.abs(ze)):(br="height",Vn="top",kn=-ze),(0,Oe.useMemo)(function(){if(!an.length)return[0,0];for(var wn=an.length,Pn=wn,zn=0;zn<wn;zn+=1){var gr=De.get(an[zn].key)||$t;if(gr[Vn]+gr[br]>kn+Fe){Pn=zn-1;break}}for(var Yn=0,Xn=wn-1;Xn>=0;Xn-=1){var ir=De.get(an[Xn].key)||$t;if(ir[Vn]<kn){Yn=Xn+1;break}}return Yn>=Pn?[0,0]:[Yn,Pn]},[De,Fe,Ze,nt,lt,kn,un,an.map(function(wn){return wn.key}).join("_"),Jn])}function yn(De){var Fe;return De instanceof Map?(Fe={},De.forEach(function(ze,Ze){Fe[Ze]=ze})):Fe=De,JSON.stringify(Fe)}var ln="TABS_DQ";function Ae(De){return String(De).replace(/"/g,ln)}function ue(De,Fe,ze,Ze){return!(!ze||Ze||De===!1||De===void 0&&(Fe===!1||Fe===null))}function le(De,Fe){var ze=De.prefixCls,Ze=De.editable,nt=De.locale,lt=De.style;return!Ze||Ze.showAdd===!1?null:Oe.createElement("button",{ref:Fe,type:"button",className:"".concat(ze,"-nav-add"),style:lt,"aria-label":(nt==null?void 0:nt.addAriaLabel)||"Add tab",onClick:function(an){Ze.onEdit("add",{event:an})}},Ze.addIcon||"+")}var pe=Oe.forwardRef(le),he=Oe.forwardRef(function(De,Fe){var ze=De.position,Ze=De.prefixCls,nt=De.extra;if(!nt)return null;var lt,Mt={};return(0,Ie.Z)(nt)==="object"&&!Oe.isValidElement(nt)?Mt=nt:Mt.right=nt,ze==="right"&&(lt=Mt.right),ze==="left"&&(lt=Mt.left),lt?Oe.createElement("div",{className:"".concat(Ze,"-extra-content"),ref:Fe},lt):null}),oe=he,Te=se(62709);function Ye(De,Fe,ze){var Ze=React.useRef({});return(!("value"in Ze.current)||ze(Ze.current.condition,Fe))&&(Ze.current.value=De(),Ze.current.condition=Fe),Ze.current.value}function Lt(De,Fe){typeof De=="function"?De(Fe):(0,Ie.Z)(De)==="object"&&De&&"current"in De&&(De.current=Fe)}function Rt(){for(var De=arguments.length,Fe=new Array(De),ze=0;ze<De;ze++)Fe[ze]=arguments[ze];var Ze=Fe.filter(function(nt){return nt});return Ze.length<=1?Ze[0]:function(nt){Fe.forEach(function(lt){Lt(lt,nt)})}}function Ft(){for(var De=arguments.length,Fe=new Array(De),ze=0;ze<De;ze++)Fe[ze]=arguments[ze];return useMemo(function(){return Rt.apply(void 0,Fe)},Fe,function(Ze,nt){return Ze.length===nt.length&&Ze.every(function(lt,Mt){return lt===nt[Mt]})})}function Jt(De){var Fe,ze,Ze=(0,Ot.isMemo)(De)?De.type.type:De.type;return!(typeof Ze=="function"&&!((Fe=Ze.prototype)!==null&&Fe!==void 0&&Fe.render)||typeof De=="function"&&!((ze=De.prototype)!==null&&ze!==void 0&&ze.render))}var Xt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Fe){var ze=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||ze>=Xt.F1&&ze<=Xt.F12)return!1;switch(ze){case Xt.ALT:case Xt.CAPS_LOCK:case Xt.CONTEXT_MENU:case Xt.CTRL:case Xt.DOWN:case Xt.END:case Xt.ESC:case Xt.HOME:case Xt.INSERT:case Xt.LEFT:case Xt.MAC_FF_META:case Xt.META:case Xt.NUMLOCK:case Xt.NUM_CENTER:case Xt.PAGE_DOWN:case Xt.PAGE_UP:case Xt.PAUSE:case Xt.PRINT_SCREEN:case Xt.RIGHT:case Xt.SHIFT:case Xt.UP:case Xt.WIN_KEY:case Xt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=Xt.ZERO&&Fe<=Xt.NINE||Fe>=Xt.NUM_ZERO&&Fe<=Xt.NUM_MULTIPLY||Fe>=Xt.A&&Fe<=Xt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case Xt.SPACE:case Xt.QUESTION_MARK:case Xt.NUM_PLUS:case Xt.NUM_MINUS:case Xt.NUM_PERIOD:case Xt.NUM_DIVISION:case Xt.SEMICOLON:case Xt.DASH:case Xt.EQUALS:case Xt.COMMA:case Xt.PERIOD:case Xt.SLASH:case Xt.APOSTROPHE:case Xt.SINGLE_QUOTE:case Xt.OPEN_SQUARE_BRACKET:case Xt.BACKSLASH:case Xt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Hn=Xt,Rn=function(Fe){return+setTimeout(Fe,16)},Tt=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Rn=function(Fe){return window.requestAnimationFrame(Fe)},Tt=function(Fe){return window.cancelAnimationFrame(Fe)});var dn=0,cr=new Map;function Mr(De){cr.delete(De)}var at=function(Fe){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;dn+=1;var Ze=dn;function nt(lt){if(lt===0)Mr(Ze),Fe();else{var Mt=Rn(function(){nt(lt-1)});cr.set(Ze,Mt)}}return nt(ze),Ze};at.cancel=function(De){var Fe=cr.get(De);return Mr(Fe),Tt(Fe)};var Ht=at,Fn=Hn.ESC,er=Hn.TAB;function nr(De){var Fe=De.visible,ze=De.triggerRef,Ze=De.onVisibleChange,nt=De.autoFocus,lt=De.overlayRef,Mt=Oe.useRef(!1),an=function(){if(Fe){var Vn,kn;(Vn=ze.current)===null||Vn===void 0||(kn=Vn.focus)===null||kn===void 0||kn.call(Vn),Ze==null||Ze(!1)}},un=function(){var Vn;return(Vn=lt.current)!==null&&Vn!==void 0&&Vn.focus?(lt.current.focus(),Mt.current=!0,!0):!1},Jn=function(Vn){switch(Vn.keyCode){case Fn:an();break;case er:{var kn=!1;Mt.current||(kn=un()),kn?Vn.preventDefault():an();break}}};Oe.useEffect(function(){return Fe?(window.addEventListener("keydown",Jn),nt&&Ht(un,3),function(){window.removeEventListener("keydown",Jn),Mt.current=!1}):function(){Mt.current=!1}},[Fe])}var Sr=(0,Oe.forwardRef)(function(De,Fe){var ze=De.overlay,Ze=De.arrow,nt=De.prefixCls,lt=(0,Oe.useMemo)(function(){var an;return typeof ze=="function"?an=ze():an=ze,an},[ze]),Mt=Rt(Fe,lt==null?void 0:lt.ref);return Oe.createElement(Oe.Fragment,null,Ze&&Oe.createElement("div",{className:"".concat(nt,"-arrow")}),Oe.cloneElement(lt,{ref:Jt(lt)?Mt:void 0}))}),Tr=Sr,Er={adjustX:1,adjustY:1},Or=[0,0],Vr={topLeft:{points:["bl","tl"],overflow:Er,offset:[0,-4],targetOffset:Or},top:{points:["bc","tc"],overflow:Er,offset:[0,-4],targetOffset:Or},topRight:{points:["br","tr"],overflow:Er,offset:[0,-4],targetOffset:Or},bottomLeft:{points:["tl","bl"],overflow:Er,offset:[0,4],targetOffset:Or},bottom:{points:["tc","bc"],overflow:Er,offset:[0,4],targetOffset:Or},bottomRight:{points:["tr","br"],overflow:Er,offset:[0,4],targetOffset:Or}},ur=Vr,si=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Li(De,Fe){var ze,Ze=De.arrow,nt=Ze===void 0?!1:Ze,lt=De.prefixCls,Mt=lt===void 0?"rc-dropdown":lt,an=De.transitionName,un=De.animation,Jn=De.align,br=De.placement,Vn=br===void 0?"bottomLeft":br,kn=De.placements,wn=kn===void 0?ur:kn,Pn=De.getPopupContainer,zn=De.showAction,gr=De.hideAction,Yn=De.overlayClassName,Xn=De.overlayStyle,ir=De.visible,ar=De.trigger,xr=ar===void 0?["hover"]:ar,Re=De.autoFocus,Ke=De.overlay,At=De.children,dt=De.onVisibleChange,Gt=(0,ot.Z)(De,si),pn=Oe.useState(),Sn=(0,me.Z)(pn,2),Kn=Sn[0],Tn=Sn[1],cn="visible"in De?ir:Kn,Wn=Oe.useRef(null),Zn=Oe.useRef(null),wr=Oe.useRef(null);Oe.useImperativeHandle(Fe,function(){return Wn.current});var Un=function(Fr){Tn(Fr),dt==null||dt(Fr)};nr({visible:cn,triggerRef:wr,onVisibleChange:Un,autoFocus:Re,overlayRef:Zn});var Rr=function(Fr){var fi=De.onOverlayClick;Tn(!1),fi&&fi(Fr)},Yr=function(){return Oe.createElement(Tr,{ref:Zn,overlay:Ke,prefixCls:Mt,arrow:nt})},Nr=function(){return typeof Ke=="function"?Yr:Yr()},jr=function(){var Fr=De.minOverlayWidthMatchTrigger,fi=De.alignPoint;return"minOverlayWidthMatchTrigger"in De?Fr:!fi},kr=function(){var Fr=De.openClassName;return Fr!==void 0?Fr:"".concat(Mt,"-open")},zr=Oe.cloneElement(At,{className:ve()((ze=At.props)===null||ze===void 0?void 0:ze.className,cn&&kr()),ref:Jt(At)?Rt(wr,At.ref):void 0}),ei=gr;return!ei&&xr.indexOf("contextMenu")!==-1&&(ei=["click"]),Oe.createElement(Te.Z,(0,we.Z)({builtinPlacements:wn},Gt,{prefixCls:Mt,ref:Wn,popupClassName:ve()(Yn,(0,Ee.Z)({},"".concat(Mt,"-show-arrow"),nt)),popupStyle:Xn,action:xr,showAction:zn,hideAction:ei,popupPlacement:Vn,popupAlign:Jn,popupTransitionName:an,popupAnimation:un,popupVisible:cn,stretch:jr()?"minWidth":"",popup:Nr(),onPopupVisibleChange:Un,onPopupClick:Rr,getPopupContainer:Pn}),zr)}var Bi=Oe.forwardRef(Li),Hi=Bi,ri=se(78595),yt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Fe){var ze=Fe.keyCode;if(Fe.altKey&&!Fe.ctrlKey||Fe.metaKey||ze>=yt.F1&&ze<=yt.F12)return!1;switch(ze){case yt.ALT:case yt.CAPS_LOCK:case yt.CONTEXT_MENU:case yt.CTRL:case yt.DOWN:case yt.END:case yt.ESC:case yt.HOME:case yt.INSERT:case yt.LEFT:case yt.MAC_FF_META:case yt.META:case yt.NUMLOCK:case yt.NUM_CENTER:case yt.PAGE_DOWN:case yt.PAGE_UP:case yt.PAUSE:case yt.PRINT_SCREEN:case yt.RIGHT:case yt.SHIFT:case yt.UP:case yt.WIN_KEY:case yt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Fe){if(Fe>=yt.ZERO&&Fe<=yt.NINE||Fe>=yt.NUM_ZERO&&Fe<=yt.NUM_MULTIPLY||Fe>=yt.A&&Fe<=yt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Fe===0)return!0;switch(Fe){case yt.SPACE:case yt.QUESTION_MARK:case yt.NUM_PLUS:case yt.NUM_MINUS:case yt.NUM_PERIOD:case yt.NUM_DIVISION:case yt.SEMICOLON:case yt.DASH:case yt.EQUALS:case yt.COMMA:case yt.PERIOD:case yt.SLASH:case yt.APOSTROPHE:case yt.SINGLE_QUOTE:case yt.OPEN_SQUARE_BRACKET:case yt.BACKSLASH:case yt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Mn=yt;function An(De,Fe){var ze=De.prefixCls,Ze=De.id,nt=De.tabs,lt=De.locale,Mt=De.mobile,an=De.moreIcon,un=an===void 0?"More":an,Jn=De.moreTransitionName,br=De.style,Vn=De.className,kn=De.editable,wn=De.tabBarGutter,Pn=De.rtl,zn=De.removeAriaLabel,gr=De.onTabClick,Yn=De.getPopupContainer,Xn=De.popupClassName,ir=(0,Oe.useState)(!1),ar=(0,me.Z)(ir,2),xr=ar[0],Re=ar[1],Ke=(0,Oe.useState)(null),At=(0,me.Z)(Ke,2),dt=At[0],Gt=At[1],pn="".concat(Ze,"-more-popup"),Sn="".concat(ze,"-dropdown"),Kn=dt!==null?"".concat(pn,"-").concat(dt):null,Tn=lt==null?void 0:lt.dropdownAriaLabel;function cn(Nr,jr){Nr.preventDefault(),Nr.stopPropagation(),kn.onEdit("remove",{key:jr,event:Nr})}var Wn=Oe.createElement(ri.ZP,{onClick:function(jr){var kr=jr.key,zr=jr.domEvent;gr(kr,zr),Re(!1)},prefixCls:"".concat(Sn,"-menu"),id:pn,tabIndex:-1,role:"listbox","aria-activedescendant":Kn,selectedKeys:[dt],"aria-label":Tn!==void 0?Tn:"expanded dropdown"},nt.map(function(Nr){var jr=Nr.closable,kr=Nr.disabled,zr=Nr.closeIcon,ei=Nr.key,ci=Nr.label,Fr=ue(jr,zr,kn,kr);return Oe.createElement(ri.sN,{key:ei,id:"".concat(pn,"-").concat(ei),role:"option","aria-controls":Ze&&"".concat(Ze,"-panel-").concat(ei),disabled:kr},Oe.createElement("span",null,ci),Fr&&Oe.createElement("button",{type:"button","aria-label":zn||"remove",tabIndex:0,className:"".concat(Sn,"-menu-item-remove"),onClick:function(Oi){Oi.stopPropagation(),cn(Oi,ei)}},zr||kn.removeIcon||"\xD7"))}));function Zn(Nr){for(var jr=nt.filter(function(Fr){return!Fr.disabled}),kr=jr.findIndex(function(Fr){return Fr.key===dt})||0,zr=jr.length,ei=0;ei<zr;ei+=1){kr=(kr+Nr+zr)%zr;var ci=jr[kr];if(!ci.disabled){Gt(ci.key);return}}}function wr(Nr){var jr=Nr.which;if(!xr){[Mn.DOWN,Mn.SPACE,Mn.ENTER].includes(jr)&&(Re(!0),Nr.preventDefault());return}switch(jr){case Mn.UP:Zn(-1),Nr.preventDefault();break;case Mn.DOWN:Zn(1),Nr.preventDefault();break;case Mn.ESC:Re(!1);break;case Mn.SPACE:case Mn.ENTER:dt!==null&&gr(dt,Nr);break}}(0,Oe.useEffect)(function(){var Nr=document.getElementById(Kn);Nr&&Nr.scrollIntoView&&Nr.scrollIntoView(!1)},[dt]),(0,Oe.useEffect)(function(){xr||Gt(null)},[xr]);var Un=(0,Ee.Z)({},Pn?"marginRight":"marginLeft",wn);nt.length||(Un.visibility="hidden",Un.order=1);var Rr=ve()((0,Ee.Z)({},"".concat(Sn,"-rtl"),Pn)),Yr=Mt?null:Oe.createElement(Hi,{prefixCls:Sn,overlay:Wn,trigger:["hover"],visible:nt.length?xr:!1,transitionName:Jn,onVisibleChange:Re,overlayClassName:ve()(Rr,Xn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Yn},Oe.createElement("button",{type:"button",className:"".concat(ze,"-nav-more"),style:Un,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":pn,id:"".concat(Ze,"-more"),"aria-expanded":xr,onKeyDown:wr},un));return Oe.createElement("div",{className:ve()("".concat(ze,"-nav-operations"),Vn),style:br,ref:Fe},Yr,Oe.createElement(pe,{prefixCls:ze,locale:lt,editable:kn}))}var Dn=Oe.memo(Oe.forwardRef(An),function(De,Fe){return Fe.tabMoving});function lr(De){var Fe,ze=De.prefixCls,Ze=De.id,nt=De.active,lt=De.tab,Mt=lt.key,an=lt.label,un=lt.disabled,Jn=lt.closeIcon,br=De.closable,Vn=De.renderWrapper,kn=De.removeAriaLabel,wn=De.editable,Pn=De.onClick,zn=De.onFocus,gr=De.style,Yn="".concat(ze,"-tab"),Xn=ue(br,Jn,wn,un);function ir(Re){un||Pn(Re)}function ar(Re){Re.preventDefault(),Re.stopPropagation(),wn.onEdit("remove",{key:Mt,event:Re})}var xr=Oe.createElement("div",{key:Mt,"data-node-key":Ae(Mt),className:ve()(Yn,(Fe={},(0,Ee.Z)(Fe,"".concat(Yn,"-with-remove"),Xn),(0,Ee.Z)(Fe,"".concat(Yn,"-active"),nt),(0,Ee.Z)(Fe,"".concat(Yn,"-disabled"),un),Fe)),style:gr,onClick:ir},Oe.createElement("div",{role:"tab","aria-selected":nt,id:Ze&&"".concat(Ze,"-tab-").concat(Mt),className:"".concat(Yn,"-btn"),"aria-controls":Ze&&"".concat(Ze,"-panel-").concat(Mt),"aria-disabled":un,tabIndex:un?null:0,onClick:function(Ke){Ke.stopPropagation(),ir(Ke)},onKeyDown:function(Ke){[Mn.SPACE,Mn.ENTER].includes(Ke.which)&&(Ke.preventDefault(),ir(Ke))},onFocus:zn},an),Xn&&Oe.createElement("button",{type:"button","aria-label":kn||"remove",tabIndex:0,className:"".concat(Yn,"-remove"),onClick:function(Ke){Ke.stopPropagation(),ar(Ke)}},Jn||wn.removeIcon||"\xD7"));return Vn?Vn(xr):xr}var qn=lr,pr=function(Fe){return+setTimeout(Fe,16)},$n=function(Fe){return clearTimeout(Fe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(pr=function(Fe){return window.requestAnimationFrame(Fe)},$n=function(Fe){return window.cancelAnimationFrame(Fe)});var qe=0,ut=new Map;function Dt(De){ut.delete(De)}var Vt=function(Fe){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;qe+=1;var Ze=qe;function nt(lt){if(lt===0)Dt(Ze),Fe();else{var Mt=pr(function(){nt(lt-1)});ut.set(Ze,Mt)}}return nt(ze),Ze};Vt.cancel=function(De){var Fe=ut.get(De);return Dt(Fe),$n(Fe)};var We=Vt,pt=function(Fe){var ze=Fe.activeTabOffset,Ze=Fe.horizontal,nt=Fe.rtl,lt=Fe.indicatorSize,Mt=(0,Oe.useState)(),an=(0,me.Z)(Mt,2),un=an[0],Jn=an[1],br=(0,Oe.useRef)(),Vn=function(Pn){return typeof lt=="function"?lt(Pn):typeof lt=="number"?lt:Pn};function kn(){We.cancel(br.current)}return(0,Oe.useEffect)(function(){var wn={};return ze&&(Ze?(nt?(wn.right=ze.right+ze.width/2,wn.transform="translateX(50%)"):(wn.left=ze.left+ze.width/2,wn.transform="translateX(-50%)"),wn.width=Vn(ze.width)):(wn.top=ze.top+ze.height/2,wn.transform="translateY(-50%)",wn.height=Vn(ze.height))),kn(),br.current=We(function(){Jn(wn)}),kn},[ze,Ze,nt,lt]),{style:un}},zt=pt,Bt=function(Fe){var ze=Fe.current||{},Ze=ze.offsetWidth,nt=Ze===void 0?0:Ze,lt=ze.offsetHeight,Mt=lt===void 0?0:lt;return[nt,Mt]},en=function(Fe,ze){return Fe[ze?0:1]};function nn(De,Fe){var ze,Ze=Oe.useContext(Ue),nt=Ze.prefixCls,lt=Ze.tabs,Mt=De.className,an=De.style,un=De.id,Jn=De.animated,br=De.activeKey,Vn=De.rtl,kn=De.extra,wn=De.editable,Pn=De.locale,zn=De.tabPosition,gr=De.tabBarGutter,Yn=De.children,Xn=De.onTabClick,ir=De.onTabScroll,ar=De.indicatorSize,xr=(0,Oe.useRef)(),Re=(0,Oe.useRef)(),Ke=(0,Oe.useRef)(),At=(0,Oe.useRef)(),dt=(0,Oe.useRef)(),Gt=(0,Oe.useRef)(),pn=(0,Oe.useRef)(),Sn=zn==="top"||zn==="bottom",Kn=ht(0,function(ra,Ri){Sn&&ir&&ir({direction:ra>Ri?"left":"right"})}),Tn=(0,me.Z)(Kn,2),cn=Tn[0],Wn=Tn[1],Zn=ht(0,function(ra,Ri){!Sn&&ir&&ir({direction:ra>Ri?"top":"bottom"})}),wr=(0,me.Z)(Zn,2),Un=wr[0],Rr=wr[1],Yr=(0,Oe.useState)([0,0]),Nr=(0,me.Z)(Yr,2),jr=Nr[0],kr=Nr[1],zr=(0,Oe.useState)([0,0]),ei=(0,me.Z)(zr,2),ci=ei[0],Fr=ei[1],fi=(0,Oe.useState)([0,0]),Oi=(0,me.Z)(fi,2),na=Oi[0],Xi=Oi[1],Fi=(0,Oe.useState)([0,0]),Ji=(0,me.Z)(Fi,2),Qi=Ji[0],wi=Ji[1],zi=rn(new Map),Jr=(0,me.Z)(zi,2),hi=Jr[0],Ii=Jr[1],Yi=Ce(lt,hi,ci[0]),$a=en(jr,Sn),Na=en(ci,Sn),Aa=en(na,Sn),ca=en(Qi,Sn),ea=$a<Na+Aa,Mi=ea?$a-ca:$a-Aa,Oa="".concat(nt,"-nav-operations-hidden"),ki=0,ti=0;Sn&&Vn?(ki=0,ti=Math.max(0,Na-Mi)):(ki=Math.min(0,Mi-Na),ti=0);function Wi(ra){return ra<ki?ki:ra>ti?ti:ra}var ua=(0,Oe.useRef)(),Vi=(0,Oe.useState)(),aa=(0,me.Z)(Vi,2),mi=aa[0],pa=aa[1];function xa(){pa(Date.now())}function fa(){window.clearTimeout(ua.current)}jt(At,function(ra,Ri){function Ta(_a,co){_a(function(ao){var hs=Wi(ao+co);return hs})}return ea?(Sn?Ta(Wn,ra):Ta(Rr,Ri),fa(),xa(),!0):!1}),(0,Oe.useEffect)(function(){return fa(),mi&&(ua.current=window.setTimeout(function(){pa(0)},100)),fa},[mi]);var wa=Zt(Yi,Mi,Sn?cn:Un,Na,Aa,ca,(0,xe.Z)((0,xe.Z)({},De),{},{tabs:lt})),Ma=(0,me.Z)(wa,2),Za=Ma[0],ha=Ma[1],ka=ft(function(){var ra=arguments.length>0&&arguments[0]!==void 0?arguments[0]:br,Ri=Yi.get(ra)||{width:0,height:0,left:0,right:0,top:0};if(Sn){var Ta=cn;Vn?Ri.right<cn?Ta=Ri.right:Ri.right+Ri.width>cn+Mi&&(Ta=Ri.right+Ri.width-Mi):Ri.left<-cn?Ta=-Ri.left:Ri.left+Ri.width>-cn+Mi&&(Ta=-(Ri.left+Ri.width-Mi)),Rr(0),Wn(Wi(Ta))}else{var _a=Un;Ri.top<-Un?_a=-Ri.top:Ri.top+Ri.height>-Un+Mi&&(_a=-(Ri.top+Ri.height-Mi)),Wn(0),Rr(Wi(_a))}}),Ja={};zn==="top"||zn==="bottom"?Ja[Vn?"marginRight":"marginLeft"]=gr:Ja.marginTop=gr;var Ga=lt.map(function(ra,Ri){var Ta=ra.key;return Oe.createElement(qn,{id:un,prefixCls:nt,key:Ta,tab:ra,style:Ri===0?void 0:Ja,closable:ra.closable,editable:wn,active:Ta===br,renderWrapper:Yn,removeAriaLabel:Pn==null?void 0:Pn.removeAriaLabel,onClick:function(co){Xn(Ta,co)},onFocus:function(){ka(Ta),xa(),At.current&&(Vn||(At.current.scrollLeft=0),At.current.scrollTop=0)}})}),so=function(){return Ii(function(){var Ri=new Map;return lt.forEach(function(Ta){var _a,co=Ta.key,ao=(_a=dt.current)===null||_a===void 0?void 0:_a.querySelector('[data-node-key="'.concat(Ae(co),'"]'));ao&&Ri.set(co,{width:ao.offsetWidth,height:ao.offsetHeight,left:ao.offsetLeft,top:ao.offsetTop})}),Ri})};(0,Oe.useEffect)(function(){so()},[lt.map(function(ra){return ra.key}).join("_")]);var Fa=_n(function(){var ra=Bt(xr),Ri=Bt(Re),Ta=Bt(Ke);kr([ra[0]-Ri[0]-Ta[0],ra[1]-Ri[1]-Ta[1]]);var _a=Bt(pn);Xi(_a);var co=Bt(Gt);wi(co);var ao=Bt(dt);Fr([ao[0]-_a[0],ao[1]-_a[1]]),so()}),Ca=lt.slice(0,Za),_i=lt.slice(ha+1),Ui=[].concat((0,Xe.Z)(Ca),(0,Xe.Z)(_i)),da=Yi.get(br),Sa=zt({activeTabOffset:da,horizontal:Sn,rtl:Vn,indicatorSize:ar}),Ka=Sa.style;(0,Oe.useEffect)(function(){ka()},[br,ki,ti,yn(da),yn(Yi),Sn]),(0,Oe.useEffect)(function(){Fa()},[Vn]);var io=!!Ui.length,ho="".concat(nt,"-nav-wrap"),Oo,Ro,lo,Ao;return Sn?Vn?(Ro=cn>0,Oo=cn!==ti):(Oo=cn<0,Ro=cn!==ki):(lo=Un<0,Ao=Un!==ki),Oe.createElement(Kt.Z,{onResize:Fa},Oe.createElement("div",{ref:Cn(Fe,xr),role:"tablist",className:ve()("".concat(nt,"-nav"),Mt),style:an,onKeyDown:function(){xa()}},Oe.createElement(oe,{ref:Re,position:"left",extra:kn,prefixCls:nt}),Oe.createElement(Kt.Z,{onResize:Fa},Oe.createElement("div",{className:ve()(ho,(ze={},(0,Ee.Z)(ze,"".concat(ho,"-ping-left"),Oo),(0,Ee.Z)(ze,"".concat(ho,"-ping-right"),Ro),(0,Ee.Z)(ze,"".concat(ho,"-ping-top"),lo),(0,Ee.Z)(ze,"".concat(ho,"-ping-bottom"),Ao),ze)),ref:At},Oe.createElement(Kt.Z,{onResize:Fa},Oe.createElement("div",{ref:dt,className:"".concat(nt,"-nav-list"),style:{transform:"translate(".concat(cn,"px, ").concat(Un,"px)"),transition:mi?"none":void 0}},Ga,Oe.createElement(pe,{ref:pn,prefixCls:nt,locale:Pn,editable:wn,style:(0,xe.Z)((0,xe.Z)({},Ga.length===0?void 0:Ja),{},{visibility:io?"hidden":null})}),Oe.createElement("div",{className:ve()("".concat(nt,"-ink-bar"),(0,Ee.Z)({},"".concat(nt,"-ink-bar-animated"),Jn.inkBar)),style:Ka}))))),Oe.createElement(Dn,(0,we.Z)({},De,{removeAriaLabel:Pn==null?void 0:Pn.removeAriaLabel,ref:Gt,prefixCls:nt,tabs:Ui,className:!io&&Oa,tabMoving:!!mi})),Oe.createElement(oe,{ref:Ke,position:"right",extra:kn,prefixCls:nt})))}var jn=Oe.forwardRef(nn),Lr=["renderTabBar"],rr=["label","key"];function tr(De){var Fe=De.renderTabBar,ze=(0,ot.Z)(De,Lr),Ze=Oe.useContext(Ue),nt=Ze.tabs;if(Fe){var lt=(0,xe.Z)((0,xe.Z)({},ze),{},{panes:nt.map(function(Mt){var an=Mt.label,un=Mt.key,Jn=(0,ot.Z)(Mt,rr);return Oe.createElement(_t,(0,we.Z)({tab:an,key:un,tabKey:un},Jn))})});return Fe(lt,jn)}return Oe.createElement(jn,ze)}var dr={},fr=[],mt=function(Fe){fr.push(Fe)};function st(De,Fe){if(0)var ze}function Ct(De,Fe){if(0)var ze}function fn(){dr={}}function Bn(De,Fe,ze){!Fe&&!dr[ze]&&(De(!1,ze),dr[ze]=!0)}function hn(De,Fe){Bn(st,De,Fe)}function vn(De,Fe){Bn(Ct,De,Fe)}hn.preMessage=mt,hn.resetWarned=fn,hn.noteOnce=vn;var xn=null;function Nn(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Fe;return De===!1?Fe={inkBar:!1,tabPane:!1}:De===!0?Fe={inkBar:!0,tabPane:!1}:Fe=(0,xe.Z)({inkBar:!0},(0,Ie.Z)(De)==="object"?De:{}),Fe.tabPaneMotion&&Fe.tabPane===void 0&&(Fe.tabPane=!0),!Fe.tabPaneMotion&&Fe.tabPane&&(Fe.tabPane=!1),Fe}var hr=["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 Qr(De,Fe){var ze,Ze=De.id,nt=De.prefixCls,lt=nt===void 0?"rc-tabs":nt,Mt=De.className,an=De.items,un=De.direction,Jn=De.activeKey,br=De.defaultActiveKey,Vn=De.editable,kn=De.animated,wn=De.tabPosition,Pn=wn===void 0?"top":wn,zn=De.tabBarGutter,gr=De.tabBarStyle,Yn=De.tabBarExtraContent,Xn=De.locale,ir=De.moreIcon,ar=De.moreTransitionName,xr=De.destroyInactiveTabPane,Re=De.renderTabBar,Ke=De.onChange,At=De.onTabClick,dt=De.onTabScroll,Gt=De.getPopupContainer,pn=De.popupClassName,Sn=De.indicatorSize,Kn=(0,ot.Z)(De,hr),Tn=Oe.useMemo(function(){return(an||[]).filter(function(wi){return wi&&(0,Ie.Z)(wi)==="object"&&"key"in wi})},[an]),cn=un==="rtl",Wn=Nn(kn),Zn=(0,Oe.useState)(!1),wr=(0,me.Z)(Zn,2),Un=wr[0],Rr=wr[1];(0,Oe.useEffect)(function(){Rr(St())},[]);var Yr=ke(function(){var wi;return(wi=Tn[0])===null||wi===void 0?void 0:wi.key},{value:Jn,defaultValue:br}),Nr=(0,me.Z)(Yr,2),jr=Nr[0],kr=Nr[1],zr=(0,Oe.useState)(function(){return Tn.findIndex(function(wi){return wi.key===jr})}),ei=(0,me.Z)(zr,2),ci=ei[0],Fr=ei[1];(0,Oe.useEffect)(function(){var wi=Tn.findIndex(function(Jr){return Jr.key===jr});if(wi===-1){var zi;wi=Math.max(0,Math.min(ci,Tn.length-1)),kr((zi=Tn[wi])===null||zi===void 0?void 0:zi.key)}Fr(wi)},[Tn.map(function(wi){return wi.key}).join("_"),jr,ci]);var fi=ke(null,{value:Ze}),Oi=(0,me.Z)(fi,2),na=Oi[0],Xi=Oi[1];(0,Oe.useEffect)(function(){Ze||(Xi("rc-tabs-".concat(tn)),tn+=1)},[]);function Fi(wi,zi){At==null||At(wi,zi);var Jr=wi!==jr;kr(wi),Jr&&(Ke==null||Ke(wi))}var Ji={id:na,activeKey:jr,animated:Wn,tabPosition:Pn,rtl:cn,mobile:Un},Qi=(0,xe.Z)((0,xe.Z)({},Ji),{},{editable:Vn,locale:Xn,moreIcon:ir,moreTransitionName:ar,tabBarGutter:zn,onTabClick:Fi,onTabScroll:dt,extra:Yn,style:gr,panes:null,getPopupContainer:Gt,popupClassName:pn,indicatorSize:Sn});return Oe.createElement(Ue.Provider,{value:{tabs:Tn,prefixCls:lt}},Oe.createElement("div",(0,we.Z)({ref:Fe,id:Ze,className:ve()(lt,"".concat(lt,"-").concat(Pn),(ze={},(0,Ee.Z)(ze,"".concat(lt,"-mobile"),Un),(0,Ee.Z)(ze,"".concat(lt,"-editable"),Vn),(0,Ee.Z)(ze,"".concat(lt,"-rtl"),cn),ze),Mt)},Kn),Oe.createElement(tr,(0,we.Z)({},Qi,{renderTabBar:Re})),Oe.createElement(kt,(0,we.Z)({destroyInactiveTabPane:xr},Ji,{animated:Wn}))))}var Ur=Oe.forwardRef(Qr),$i=Ur,Ai=$i,gi=se(53124),qi=se(98675),li=()=>null,Ni=se(33603);const Gi={motionAppear:!1,motionEnter:!0,motionLeave:!0};function qr(De){let Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},ze;return Fe===!1?ze={inkBar:!1,tabPane:!1}:Fe===!0?ze={inkBar:!0,tabPane:!0}:ze=Object.assign({inkBar:!0},typeof Fe=="object"?Fe:{}),ze.tabPane&&(ze.tabPaneMotion=Object.assign(Object.assign({},Gi),{motionName:(0,Ni.m)(De,"switch")})),ze}var vi=se(37419),Zi=function(De,Fe){var ze={};for(var Ze in De)Object.prototype.hasOwnProperty.call(De,Ze)&&Fe.indexOf(Ze)<0&&(ze[Ze]=De[Ze]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Ze=Object.getOwnPropertySymbols(De);nt<Ze.length;nt++)Fe.indexOf(Ze[nt])<0&&Object.prototype.propertyIsEnumerable.call(De,Ze[nt])&&(ze[Ze[nt]]=De[Ze[nt]]);return ze};function la(De){return De.filter(Fe=>Fe)}function ta(De,Fe){if(De)return De;const ze=(0,vi.Z)(Fe).map(Ze=>{if(Oe.isValidElement(Ze)){const{key:nt,props:lt}=Ze,Mt=lt||{},{tab:an}=Mt,un=Zi(Mt,["tab"]);return Object.assign(Object.assign({key:String(nt)},un),{label:an})}return null});return la(ze)}var ii=se(14747),Et=se(67968),wt=se(45503),Qt=se(67771),On=De=>{const{componentCls:Fe,motionDurationSlow:ze}=De;return[{[Fe]:{[`${Fe}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${ze}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${ze}`}}}}},[(0,Qt.oN)(De,"slide-up"),(0,Qt.oN)(De,"slide-down")]]};const vr=De=>{const{componentCls:Fe,tabsCardPadding:ze,cardBg:Ze,cardGutter:nt,colorBorderSecondary:lt,itemSelectedColor:Mt}=De;return{[`${Fe}-card`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{margin:0,padding:ze,background:Ze,border:`${De.lineWidth}px ${De.lineType} ${lt}`,transition:`all ${De.motionDurationSlow} ${De.motionEaseInOut}`},[`${Fe}-tab-active`]:{color:Mt,background:De.colorBgContainer},[`${Fe}-ink-bar`]:{visibility:"hidden"}},[`&${Fe}-top, &${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginLeft:{_skip_check_:!0,value:`${nt}px`}}}},[`&${Fe}-top`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`${De.borderRadiusLG}px ${De.borderRadiusLG}px 0 0`},[`${Fe}-tab-active`]:{borderBottomColor:De.colorBgContainer}}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:`0 0 ${De.borderRadiusLG}px ${De.borderRadiusLG}px`},[`${Fe}-tab-active`]:{borderTopColor:De.colorBgContainer}}},[`&${Fe}-left, &${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginTop:`${nt}px`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${De.borderRadiusLG}px 0 0 ${De.borderRadiusLG}px`}},[`${Fe}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:De.colorBgContainer}}}},[`&${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${De.borderRadiusLG}px ${De.borderRadiusLG}px 0`}},[`${Fe}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:De.colorBgContainer}}}}}}},Ir=De=>{const{componentCls:Fe,itemHoverColor:ze,dropdownEdgeChildVerticalPadding:Ze}=De;return{[`${Fe}-dropdown`]:Object.assign(Object.assign({},(0,ii.Wf)(De)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:De.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${Fe}-dropdown-menu`]:{maxHeight:De.tabsDropdownHeight,margin:0,padding:`${Ze}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:De.colorBgContainer,backgroundClip:"padding-box",borderRadius:De.borderRadiusLG,outline:"none",boxShadow:De.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ii.vS),{display:"flex",alignItems:"center",minWidth:De.tabsDropdownWidth,margin:0,padding:`${De.paddingXXS}px ${De.paddingSM}px`,color:De.colorText,fontWeight:"normal",fontSize:De.fontSize,lineHeight:De.lineHeight,cursor:"pointer",transition:`all ${De.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:De.marginSM},color:De.colorTextDescription,fontSize:De.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:ze}},"&:hover":{background:De.controlItemBgHover},"&-disabled":{"&, &:hover":{color:De.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Wr=De=>{const{componentCls:Fe,margin:ze,colorBorderSecondary:Ze,horizontalMargin:nt,verticalItemPadding:lt,verticalItemMargin:Mt}=De;return{[`${Fe}-top, ${Fe}-bottom`]:{flexDirection:"column",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{margin:nt,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${De.lineWidth}px ${De.lineType} ${Ze}`,content:"''"},[`${Fe}-ink-bar`]:{height:De.lineWidthBold,"&-animated":{transition:`width ${De.motionDurationSlow}, left ${De.motionDurationSlow},
|
|
|
right ${De.motionDurationSlow}`}},[`${Fe}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:De.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:De.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:De.boxShadowTabsOverflowRight},[`&${Fe}-nav-wrap-ping-left::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${Fe}-top`]:{[`> ${Fe}-nav,
|
|
|
> div > ${Fe}-nav`]:{"&::before":{bottom:0},[`${Fe}-ink-bar`]:{bottom:0}}},[`${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,marginTop:`${ze}px`,marginBottom:0,"&::before":{top:0},[`${Fe}-ink-bar`]:{top:0}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0}},[`${Fe}-left, ${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{flexDirection:"column",minWidth:De.controlHeight*1.25,[`${Fe}-tab`]:{padding:lt,textAlign:"center"},[`${Fe}-tab + ${Fe}-tab`]:{margin:Mt},[`${Fe}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:De.controlHeight},"&::before":{top:0,boxShadow:De.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:De.boxShadowTabsOverflowBottom},[`&${Fe}-nav-wrap-ping-top::before`]:{opacity:1},[`&${Fe}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${Fe}-ink-bar`]:{width:De.lineWidthBold,"&-animated":{transition:`height ${De.motionDurationSlow}, top ${De.motionDurationSlow}`}},[`${Fe}-nav-list, ${Fe}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${Fe}-left`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${De.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${De.lineWidth}px ${De.lineType} ${De.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:De.paddingLG}}}},[`${Fe}-right`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{order:1,[`${Fe}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${Fe}-content-holder, > div > ${Fe}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-De.lineWidth},borderRight:{_skip_check_:!0,value:`${De.lineWidth}px ${De.lineType} ${De.colorBorder}`},[`> ${Fe}-content > ${Fe}-tabpane`]:{paddingRight:{_skip_check_:!0,value:De.paddingLG}}}}}},Gr=De=>{const{componentCls:Fe,cardPaddingSM:ze,cardPaddingLG:Ze,horizontalItemPaddingSM:nt,horizontalItemPaddingLG:lt}=De;return{[Fe]:{"&-small":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:nt,fontSize:De.titleFontSizeSM}}},"&-large":{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:lt,fontSize:De.titleFontSizeLG}}}},[`${Fe}-card`]:{[`&${Fe}-small`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:ze}},[`&${Fe}-bottom`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`0 0 ${De.borderRadius}px ${De.borderRadius}px`}},[`&${Fe}-top`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:`${De.borderRadius}px ${De.borderRadius}px 0 0`}},[`&${Fe}-right`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${De.borderRadius}px ${De.borderRadius}px 0`}}},[`&${Fe}-left`]:{[`> ${Fe}-nav ${Fe}-tab`]:{borderRadius:{_skip_check_:!0,value:`${De.borderRadius}px 0 0 ${De.borderRadius}px`}}}},[`&${Fe}-large`]:{[`> ${Fe}-nav`]:{[`${Fe}-tab`]:{padding:Ze}}}}}},Hr=De=>{const{componentCls:Fe,itemActiveColor:ze,itemHoverColor:Ze,iconCls:nt,tabsHorizontalItemMargin:lt,horizontalItemPadding:Mt,itemSelectedColor:an,itemColor:un}=De,Jn=`${Fe}-tab`;return{[Jn]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:Mt,fontSize:De.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:un,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:ze}},(0,ii.Qy)(De)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-De.marginXXS},marginLeft:{_skip_check_:!0,value:De.marginXS},color:De.colorTextDescription,fontSize:De.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${De.motionDurationSlow}`,"&:hover":{color:De.colorTextHeading}},"&:hover":{color:Ze},[`&${Jn}-active ${Jn}-btn`]:{color:an,textShadow:De.tabsActiveTextShadow},[`&${Jn}-disabled`]:{color:De.colorTextDisabled,cursor:"not-allowed"},[`&${Jn}-disabled ${Jn}-btn, &${Jn}-disabled ${Fe}-remove`]:{"&:focus, &:active":{color:De.colorTextDisabled}},[`& ${Jn}-remove ${nt}`]:{margin:0},[nt]:{marginRight:{_skip_check_:!0,value:De.marginSM}}},[`${Jn} + ${Jn}`]:{margin:{_skip_check_:!0,value:lt}}}},ni=De=>{const{componentCls:Fe,tabsHorizontalItemMarginRTL:ze,iconCls:Ze,cardGutter:nt}=De;return{[`${Fe}-rtl`]:{direction:"rtl",[`${Fe}-nav`]:{[`${Fe}-tab`]:{margin:{_skip_check_:!0,value:ze},[`${Fe}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[Ze]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${De.marginSM}px`}},[`${Fe}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${De.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${De.marginXXS}px`},[Ze]:{margin:0}}}},[`&${Fe}-left`]:{[`> ${Fe}-nav`]:{order:1},[`> ${Fe}-content-holder`]:{order:0}},[`&${Fe}-right`]:{[`> ${Fe}-nav`]:{order:0},[`> ${Fe}-content-holder`]:{order:1}},[`&${Fe}-card${Fe}-top, &${Fe}-card${Fe}-bottom`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-tab + ${Fe}-tab`]:{marginRight:{_skip_check_:!0,value:nt},marginLeft:{_skip_check_:!0,value:0}}}}},[`${Fe}-dropdown-rtl`]:{direction:"rtl"},[`${Fe}-menu-item`]:{[`${Fe}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},yi=De=>{const{componentCls:Fe,tabsCardPadding:ze,cardHeight:Ze,cardGutter:nt,itemHoverColor:lt,itemActiveColor:Mt,colorBorderSecondary:an}=De;return{[Fe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ii.Wf)(De)),{display:"flex",[`> ${Fe}-nav, > div > ${Fe}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${Fe}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${De.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${Fe}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${De.motionDurationSlow}`},[`${Fe}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${Fe}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${Fe}-nav-more`]:{position:"relative",padding:ze,background:"transparent",border:0,color:De.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:De.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${Fe}-nav-add`]:Object.assign({minWidth:Ze,marginLeft:{_skip_check_:!0,value:nt},padding:`0 ${De.paddingXS}px`,background:"transparent",border:`${De.lineWidth}px ${De.lineType} ${an}`,borderRadius:`${De.borderRadiusLG}px ${De.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:De.colorText,transition:`all ${De.motionDurationSlow} ${De.motionEaseInOut}`,"&:hover":{color:lt},"&:active, &:focus:not(:focus-visible)":{color:Mt}},(0,ii.Qy)(De))},[`${Fe}-extra-content`]:{flex:"none"},[`${Fe}-ink-bar`]:{position:"absolute",background:De.inkBarColor,pointerEvents:"none"}}),Hr(De)),{[`${Fe}-content`]:{position:"relative",width:"100%"},[`${Fe}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${Fe}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${Fe}-centered`]:{[`> ${Fe}-nav, > div > ${Fe}-nav`]:{[`${Fe}-nav-wrap`]:{[`&:not([class*='${Fe}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Ar=(0,Et.Z)("Tabs",De=>{const Fe=(0,wt.TS)(De,{tabsCardPadding:De.cardPadding||`${(De.cardHeight-Math.round(De.fontSize*De.lineHeight))/2-De.lineWidth}px ${De.padding}px`,dropdownEdgeChildVerticalPadding:De.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${De.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${De.horizontalItemGutter}px`});return[Gr(Fe),ni(Fe),Wr(Fe),Ir(Fe),vr(Fe),yi(Fe),On(Fe)]},De=>{const Fe=De.controlHeightLG;return{zIndexPopup:De.zIndexPopupBase+50,cardBg:De.colorFillAlter,cardHeight:Fe,cardPadding:"",cardPaddingSM:`${De.paddingXXS*1.5}px ${De.padding}px`,cardPaddingLG:`${De.paddingXS}px ${De.padding}px ${De.paddingXXS*1.5}px`,titleFontSize:De.fontSize,titleFontSizeLG:De.fontSizeLG,titleFontSizeSM:De.fontSize,inkBarColor:De.colorPrimary,horizontalMargin:`0 0 ${De.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${De.paddingSM}px 0`,horizontalItemPaddingSM:`${De.paddingXS}px 0`,horizontalItemPaddingLG:`${De.padding}px 0`,verticalItemPadding:`${De.paddingXS}px ${De.paddingLG}px`,verticalItemMargin:`${De.margin}px 0 0 0`,itemColor:De.colorText,itemSelectedColor:De.colorPrimary,itemHoverColor:De.colorPrimaryHover,itemActiveColor:De.colorPrimaryActive,cardGutter:De.marginXXS/2}}),pi=function(De,Fe){var ze={};for(var Ze in De)Object.prototype.hasOwnProperty.call(De,Ze)&&Fe.indexOf(Ze)<0&&(ze[Ze]=De[Ze]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Ze=Object.getOwnPropertySymbols(De);nt<Ze.length;nt++)Fe.indexOf(Ze[nt])<0&&Object.prototype.propertyIsEnumerable.call(De,Ze[nt])&&(ze[Ze[nt]]=De[Ze[nt]]);return ze};const Ti=De=>{const{type:Fe,className:ze,rootClassName:Ze,size:nt,onEdit:lt,hideAdd:Mt,centered:an,addIcon:un,popupClassName:Jn,children:br,items:Vn,animated:kn,style:wn,indicatorSize:Pn}=De,zn=pi(De,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:gr,moreIcon:Yn=Oe.createElement(He.Z,null)}=zn,{direction:Xn,tabs:ir,getPrefixCls:ar,getPopupContainer:xr}=Oe.useContext(gi.E_),Re=ar("tabs",gr),[Ke,At]=Ar(Re);let dt;Fe==="editable-card"&&(dt={onEdit:(cn,Wn)=>{let{key:Zn,event:wr}=Wn;lt==null||lt(cn==="add"?wr:Zn,cn)},removeIcon:Oe.createElement(de.Z,null),addIcon:un||Oe.createElement(Be.Z,null),showAdd:Mt!==!0});const Gt=ar(),pn=ta(Vn,br),Sn=qr(Re,kn),Kn=(0,qi.Z)(nt),Tn=Object.assign(Object.assign({},ir==null?void 0:ir.style),wn);return Ke(Oe.createElement(Ai,Object.assign({direction:Xn,getPopupContainer:xr,moreTransitionName:`${Gt}-slide-up`},zn,{items:pn,className:ve()({[`${Re}-${Kn}`]:Kn,[`${Re}-card`]:["card","editable-card"].includes(Fe),[`${Re}-editable-card`]:Fe==="editable-card",[`${Re}-centered`]:an},ir==null?void 0:ir.className,ze,Ze,At),popupClassName:ve()(Jn,At),style:Tn,editable:dt,moreIcon:Yn,prefixCls:Re,animated:Sn,indicatorSize:Pn!=null?Pn:ir==null?void 0:ir.indicatorSize})))};Ti.TabPane=li;var Ei=Ti},59810:function(En,Wt,se){"use strict";se.d(Wt,{default:function(){return fr}});var de=se(67294),He=se(74902),Be=se(94184),Ve=se.n(Be),ve=se(87462),we=se(15671),Ee=se(43144),xe=se(60136),me=se(51630),Ie=se(4942),ot=se(45987),Oe=se(74165),St=se(71002),ft=se(15861),it=se(64217);function Je(mt,st){var Ct="cannot ".concat(mt.method," ").concat(mt.action," ").concat(st.status,"'"),fn=new Error(Ct);return fn.status=st.status,fn.method=mt.method,fn.url=mt.action,fn}function Le(mt){var st=mt.responseText||mt.response;if(!st)return st;try{return JSON.parse(st)}catch(Ct){return st}}function gt(mt){var st=new XMLHttpRequest;mt.onProgress&&st.upload&&(st.upload.onprogress=function(hn){hn.total>0&&(hn.percent=hn.loaded/hn.total*100),mt.onProgress(hn)});var Ct=new FormData;mt.data&&Object.keys(mt.data).forEach(function(Bn){var hn=mt.data[Bn];if(Array.isArray(hn)){hn.forEach(function(vn){Ct.append("".concat(Bn,"[]"),vn)});return}Ct.append(Bn,hn)}),mt.file instanceof Blob?Ct.append(mt.filename,mt.file,mt.file.name):Ct.append(mt.filename,mt.file),st.onerror=function(hn){mt.onError(hn)},st.onload=function(){return st.status<200||st.status>=300?mt.onError(Je(mt,st),Le(st)):mt.onSuccess(Le(st),st)},st.open(mt.method,mt.action,!0),mt.withCredentials&&"withCredentials"in st&&(st.withCredentials=!0);var fn=mt.headers||{};return fn["X-Requested-With"]!==null&&st.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(fn).forEach(function(Bn){fn[Bn]!==null&&st.setRequestHeader(Bn,fn[Bn])}),st.send(Ct),{abort:function(){st.abort()}}}var qt=+new Date,tt=0;function ct(){return"rc-upload-".concat(qt,"-").concat(++tt)}var ke=se(80334),Se=function(mt,st){if(mt&&st){var Ct=Array.isArray(st)?st:st.split(","),fn=mt.name||"",Bn=mt.type||"",hn=Bn.replace(/\/.*$/,"");return Ct.some(function(vn){var xn=vn.trim();if(/^\*(\/\*)?$/.test(vn))return!0;if(xn.charAt(0)==="."){var Nn=fn.toLowerCase(),hr=xn.toLowerCase(),tn=[hr];return(hr===".jpg"||hr===".jpeg")&&(tn=[".jpg",".jpeg"]),tn.some(function(Qr){return Nn.endsWith(Qr)})}return/\/\*$/.test(xn)?hn===xn.replace(/\/.*$/,""):Bn===xn?!0:/^\w+$/.test(xn)?((0,ke.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(xn,"'.Skip for check.")),!0):!1})}return!0};function Ue(mt,st){var Ct=mt.createReader(),fn=[];function Bn(){Ct.readEntries(function(hn){var vn=Array.prototype.slice.apply(hn);fn=fn.concat(vn);var xn=!vn.length;xn?st(fn):Bn()})}Bn()}var je=function(st,Ct,fn){var Bn=function hn(vn,xn){vn&&(vn.path=xn||"",vn.isFile?vn.file(function(Nn){fn(Nn)&&(vn.fullPath&&!Nn.webkitRelativePath&&(Object.defineProperties(Nn,{webkitRelativePath:{writable:!0}}),Nn.webkitRelativePath=vn.fullPath.replace(/^\//,""),Object.defineProperties(Nn,{webkitRelativePath:{writable:!1}})),Ct([Nn]))}):vn.isDirectory&&Ue(vn,function(Nn){Nn.forEach(function(hr){hn(hr,"".concat(xn).concat(vn.name,"/"))})}))};st.forEach(function(hn){Bn(hn.webkitGetAsEntry())})},_t=je,vt=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],kt=function(mt){(0,xe.Z)(Ct,mt);var st=(0,me.Z)(Ct);function Ct(){var fn;(0,we.Z)(this,Ct);for(var Bn=arguments.length,hn=new Array(Bn),vn=0;vn<Bn;vn++)hn[vn]=arguments[vn];return fn=st.call.apply(st,[this].concat(hn)),fn.state={uid:ct()},fn.reqs={},fn.fileInput=void 0,fn._isMounted=void 0,fn.onChange=function(xn){var Nn=fn.props,hr=Nn.accept,tn=Nn.directory,Qr=xn.target.files,Ur=(0,He.Z)(Qr).filter(function($i){return!tn||Se($i,hr)});fn.uploadFiles(Ur),fn.reset()},fn.onClick=function(xn){var Nn=fn.fileInput;if(Nn){var hr=fn.props,tn=hr.children,Qr=hr.onClick;if(tn&&tn.type==="button"){var Ur=Nn.parentNode;Ur.focus(),Ur.querySelector("button").blur()}Nn.click(),Qr&&Qr(xn)}},fn.onKeyDown=function(xn){xn.key==="Enter"&&fn.onClick(xn)},fn.onFileDrop=function(xn){var Nn=fn.props.multiple;if(xn.preventDefault(),xn.type!=="dragover")if(fn.props.directory)_t(Array.prototype.slice.call(xn.dataTransfer.items),fn.uploadFiles,function(tn){return Se(tn,fn.props.accept)});else{var hr=(0,He.Z)(xn.dataTransfer.files).filter(function(tn){return Se(tn,fn.props.accept)});Nn===!1&&(hr=hr.slice(0,1)),fn.uploadFiles(hr)}},fn.uploadFiles=function(xn){var Nn=(0,He.Z)(xn),hr=Nn.map(function(tn){return tn.uid=ct(),fn.processFile(tn,Nn)});Promise.all(hr).then(function(tn){var Qr=fn.props.onBatchStart;Qr==null||Qr(tn.map(function(Ur){var $i=Ur.origin,Ai=Ur.parsedFile;return{file:$i,parsedFile:Ai}})),tn.filter(function(Ur){return Ur.parsedFile!==null}).forEach(function(Ur){fn.post(Ur)})})},fn.processFile=function(){var xn=(0,ft.Z)((0,Oe.Z)().mark(function Nn(hr,tn){var Qr,Ur,$i,Ai,gi,qi,xi,li,Ni;return(0,Oe.Z)().wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:if(Qr=fn.props.beforeUpload,Ur=hr,!Qr){qr.next=14;break}return qr.prev=3,qr.next=6,Qr(hr,tn);case 6:Ur=qr.sent,qr.next=12;break;case 9:qr.prev=9,qr.t0=qr.catch(3),Ur=!1;case 12:if(Ur!==!1){qr.next=14;break}return qr.abrupt("return",{origin:hr,parsedFile:null,action:null,data:null});case 14:if($i=fn.props.action,typeof $i!="function"){qr.next=21;break}return qr.next=18,$i(hr);case 18:Ai=qr.sent,qr.next=22;break;case 21:Ai=$i;case 22:if(gi=fn.props.data,typeof gi!="function"){qr.next=29;break}return qr.next=26,gi(hr);case 26:qi=qr.sent,qr.next=30;break;case 29:qi=gi;case 30:return xi=((0,St.Z)(Ur)==="object"||typeof Ur=="string")&&Ur?Ur:hr,xi instanceof File?li=xi:li=new File([xi],hr.name,{type:hr.type}),Ni=li,Ni.uid=hr.uid,qr.abrupt("return",{origin:hr,data:qi,parsedFile:Ni,action:Ai});case 35:case"end":return qr.stop()}},Nn,null,[[3,9]])}));return function(Nn,hr){return xn.apply(this,arguments)}}(),fn.saveFileInput=function(xn){fn.fileInput=xn},fn}return(0,Ee.Z)(Ct,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Bn){var hn=this,vn=Bn.data,xn=Bn.origin,Nn=Bn.action,hr=Bn.parsedFile;if(this._isMounted){var tn=this.props,Qr=tn.onStart,Ur=tn.customRequest,$i=tn.name,Ai=tn.headers,gi=tn.withCredentials,qi=tn.method,xi=xn.uid,li=Ur||gt,Ni={action:Nn,filename:$i,data:vn,file:hr,headers:Ai,withCredentials:gi,method:qi||"post",onProgress:function(qr){var vi=hn.props.onProgress;vi==null||vi(qr,hr)},onSuccess:function(qr,vi){var Zi=hn.props.onSuccess;Zi==null||Zi(qr,hr,vi),delete hn.reqs[xi]},onError:function(qr,vi){var Zi=hn.props.onError;Zi==null||Zi(qr,vi,hr),delete hn.reqs[xi]}};Qr(xn),this.reqs[xi]=li(Ni)}}},{key:"reset",value:function(){this.setState({uid:ct()})}},{key:"abort",value:function(Bn){var hn=this.reqs;if(Bn){var vn=Bn.uid?Bn.uid:Bn;hn[vn]&&hn[vn].abort&&hn[vn].abort(),delete hn[vn]}else Object.keys(hn).forEach(function(xn){hn[xn]&&hn[xn].abort&&hn[xn].abort(),delete hn[xn]})}},{key:"render",value:function(){var Bn,hn=this.props,vn=hn.component,xn=hn.prefixCls,Nn=hn.className,hr=hn.disabled,tn=hn.id,Qr=hn.style,Ur=hn.multiple,$i=hn.accept,Ai=hn.capture,gi=hn.children,qi=hn.directory,xi=hn.openFileDialogOnClick,li=hn.onMouseEnter,Ni=hn.onMouseLeave,Gi=(0,ot.Z)(hn,vt),qr=Ve()((Bn={},(0,Ie.Z)(Bn,xn,!0),(0,Ie.Z)(Bn,"".concat(xn,"-disabled"),hr),(0,Ie.Z)(Bn,Nn,Nn),Bn)),vi=qi?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Zi=hr?{}:{onClick:xi?this.onClick:function(){},onKeyDown:xi?this.onKeyDown:function(){},onMouseEnter:li,onMouseLeave:Ni,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return de.createElement(vn,(0,ve.Z)({},Zi,{className:qr,role:"button",style:Qr}),de.createElement("input",(0,ve.Z)({},(0,it.Z)(Gi,{aria:!0,data:!0}),{id:tn,disabled:hr,type:"file",ref:this.saveFileInput,onClick:function(ta){return ta.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:$i},vi,{multiple:Ur,onChange:this.onChange},Ai!=null?{capture:Ai}:{})),gi)}}]),Ct}(de.Component),Xe=kt;function Kt(){}var Ot=function(mt){(0,xe.Z)(Ct,mt);var st=(0,me.Z)(Ct);function Ct(){var fn;(0,we.Z)(this,Ct);for(var Bn=arguments.length,hn=new Array(Bn),vn=0;vn<Bn;vn++)hn[vn]=arguments[vn];return fn=st.call.apply(st,[this].concat(hn)),fn.uploader=void 0,fn.saveUploader=function(xn){fn.uploader=xn},fn}return(0,Ee.Z)(Ct,[{key:"abort",value:function(Bn){this.uploader.abort(Bn)}},{key:"render",value:function(){return de.createElement(Xe,(0,ve.Z)({},this.props,{ref:this.saveUploader}))}}]),Ct}(de.Component);Ot.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Kt,onError:Kt,onSuccess:Kt,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var bn=Ot,Nt=bn,sn=se(5663),Cn=se(73935),or=se(53124),Qe=se(98866),Ce=se(10110),ht=se(24457),Ut={icon:function(st,Ct){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:Ct}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:st}}]}},name:"file",theme:"twotone"},Yt=Ut,Ge=se(74643),rt=function(st,Ct){return de.createElement(Ge.Z,(0,ve.Z)({},st,{ref:Ct,icon:Yt}))},jt=de.forwardRef(rt),_n=se(3407),rn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},$t=rn,Zt=function(st,Ct){return de.createElement(Ge.Z,(0,ve.Z)({},st,{ref:Ct,icon:$t}))},yn=de.forwardRef(Zt),ln={icon:function(st,Ct){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:st}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:Ct}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:Ct}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:Ct}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:st}}]}},name:"picture",theme:"twotone"},Ae=ln,ue=function(st,Ct){return de.createElement(Ge.Z,(0,ve.Z)({},st,{ref:Ct,icon:Ae}))},le=de.forwardRef(ue),pe=se(38379),he=se(57838),oe=se(33603),Te=se(96159),Ye=se(71577);function Lt(mt){return Object.assign(Object.assign({},mt),{lastModified:mt.lastModified,lastModifiedDate:mt.lastModifiedDate,name:mt.name,size:mt.size,type:mt.type,uid:mt.uid,percent:0,originFileObj:mt})}function Rt(mt,st){const Ct=(0,He.Z)(st),fn=Ct.findIndex(Bn=>{let{uid:hn}=Bn;return hn===mt.uid});return fn===-1?Ct.push(mt):Ct[fn]=mt,Ct}function Ft(mt,st){const Ct=mt.uid!==void 0?"uid":"name";return st.filter(fn=>fn[Ct]===mt[Ct])[0]}function Jt(mt,st){const Ct=mt.uid!==void 0?"uid":"name",fn=st.filter(Bn=>Bn[Ct]!==mt[Ct]);return fn.length===st.length?null:fn}const Xt=function(){const st=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),fn=st[st.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(fn)||[""])[0]},Hn=mt=>mt.indexOf("image/")===0,Rn=mt=>{if(mt.type&&!mt.thumbUrl)return Hn(mt.type);const st=mt.thumbUrl||mt.url||"",Ct=Xt(st);return/^data:image\//.test(st)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(Ct)?!0:!(/^data:/.test(st)||Ct)},Tt=200;function dn(mt){return new Promise(st=>{if(!mt.type||!Hn(mt.type)){st("");return}const Ct=document.createElement("canvas");Ct.width=Tt,Ct.height=Tt,Ct.style.cssText=`position: fixed; left: 0; top: 0; width: ${Tt}px; height: ${Tt}px; z-index: 9999; display: none;`,document.body.appendChild(Ct);const fn=Ct.getContext("2d"),Bn=new Image;if(Bn.onload=()=>{const{width:hn,height:vn}=Bn;let xn=Tt,Nn=Tt,hr=0,tn=0;hn>vn?(Nn=vn*(Tt/hn),tn=-(Nn-xn)/2):(xn=hn*(Tt/vn),hr=-(xn-Nn)/2),fn.drawImage(Bn,hr,tn,xn,Nn);const Qr=Ct.toDataURL();document.body.removeChild(Ct),window.URL.revokeObjectURL(Bn.src),st(Qr)},Bn.crossOrigin="anonymous",mt.type.startsWith("image/svg+xml")){const hn=new FileReader;hn.onload=()=>{hn.result&&(Bn.src=hn.result)},hn.readAsDataURL(mt)}else if(mt.type.startsWith("image/gif")){const hn=new FileReader;hn.onload=()=>{hn.result&&st(hn.result)},hn.readAsDataURL(mt)}else Bn.src=window.URL.createObjectURL(mt)})}var cr=se(84249),Mr=se(90674),at=se(99569),Ht=se(38703),Fn=se(83062),nr=de.forwardRef((mt,st)=>{let{prefixCls:Ct,className:fn,style:Bn,locale:hn,listType:vn,file:xn,items:Nn,progress:hr,iconRender:tn,actionIconRender:Qr,itemRender:Ur,isImgUrl:$i,showPreviewIcon:Ai,showRemoveIcon:gi,showDownloadIcon:qi,previewIcon:xi,removeIcon:li,downloadIcon:Ni,onPreview:Gi,onDownload:qr,onClose:vi}=mt;var Zi,la;const{status:ta}=xn,[ii,Et]=de.useState(ta);de.useEffect(()=>{ta!=="removed"&&Et(ta)},[ta]);const[wt,Qt]=de.useState(!1);de.useEffect(()=>{const nt=setTimeout(()=>{Qt(!0)},300);return()=>{clearTimeout(nt)}},[]);const mn=tn(xn);let On=de.createElement("div",{className:`${Ct}-icon`},mn);if(vn==="picture"||vn==="picture-card"||vn==="picture-circle")if(ii==="uploading"||!xn.thumbUrl&&!xn.url){const nt=Ve()(`${Ct}-list-item-thumbnail`,{[`${Ct}-list-item-file`]:ii!=="uploading"});On=de.createElement("div",{className:nt},mn)}else{const nt=$i!=null&&$i(xn)?de.createElement("img",{src:xn.thumbUrl||xn.url,alt:xn.name,className:`${Ct}-list-item-image`,crossOrigin:xn.crossOrigin}):mn,lt=Ve()(`${Ct}-list-item-thumbnail`,{[`${Ct}-list-item-file`]:$i&&!$i(xn)});On=de.createElement("a",{className:lt,onClick:Mt=>Gi(xn,Mt),href:xn.url||xn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},nt)}const vr=Ve()(`${Ct}-list-item`,`${Ct}-list-item-${ii}`),Ir=typeof xn.linkProps=="string"?JSON.parse(xn.linkProps):xn.linkProps,Wr=gi?Qr((typeof li=="function"?li(xn):li)||de.createElement(cr.Z,null),()=>vi(xn),Ct,hn.removeFile):null,Gr=qi&&ii==="done"?Qr((typeof Ni=="function"?Ni(xn):Ni)||de.createElement(Mr.Z,null),()=>qr(xn),Ct,hn.downloadFile):null,Hr=vn!=="picture-card"&&vn!=="picture-circle"&&de.createElement("span",{key:"download-delete",className:Ve()(`${Ct}-list-item-actions`,{picture:vn==="picture"})},Gr,Wr),ni=Ve()(`${Ct}-list-item-name`),yi=xn.url?[de.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:ni,title:xn.name},Ir,{href:xn.url,onClick:nt=>Gi(xn,nt)}),xn.name),Hr]:[de.createElement("span",{key:"view",className:ni,onClick:nt=>Gi(xn,nt),title:xn.name},xn.name),Hr],Ar={pointerEvents:"none",opacity:.5},pi=Ai?de.createElement("a",{href:xn.url||xn.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:xn.url||xn.thumbUrl?void 0:Ar,onClick:nt=>Gi(xn,nt),title:hn.previewFile},typeof xi=="function"?xi(xn):xi||de.createElement(at.Z,null)):null,Ti=(vn==="picture-card"||vn==="picture-circle")&&ii!=="uploading"&&de.createElement("span",{className:`${Ct}-list-item-actions`},pi,ii==="done"&&Gr,Wr),{getPrefixCls:Ei}=de.useContext(or.E_),De=Ei(),Fe=de.createElement("div",{className:vr},On,yi,Ti,wt&&de.createElement(pe.default,{motionName:`${De}-fade`,visible:ii==="uploading",motionDeadline:2e3},nt=>{let{className:lt}=nt;const Mt="percent"in xn?de.createElement(Ht.Z,Object.assign({},hr,{type:"line",percent:xn.percent,"aria-label":xn["aria-label"],"aria-labelledby":xn["aria-labelledby"]})):null;return de.createElement("div",{className:Ve()(`${Ct}-list-item-progress`,lt)},Mt)})),ze=xn.response&&typeof xn.response=="string"?xn.response:((Zi=xn.error)===null||Zi===void 0?void 0:Zi.statusText)||((la=xn.error)===null||la===void 0?void 0:la.message)||hn.uploadError,Ze=ii==="error"?de.createElement(Fn.Z,{title:ze,getPopupContainer:nt=>nt.parentNode},Fe):Fe;return de.createElement("div",{className:Ve()(`${Ct}-list-item-container`,fn),style:Bn,ref:st},Ur?Ur(Ze,xn,Nn,{download:qr.bind(null,xn),preview:Gi.bind(null,xn),remove:vi.bind(null,xn)}):Ze)});const Sr=(mt,st)=>{const{listType:Ct="text",previewFile:fn=dn,onPreview:Bn,onDownload:hn,onRemove:vn,locale:xn,iconRender:Nn,isImageUrl:hr=Rn,prefixCls:tn,items:Qr=[],showPreviewIcon:Ur=!0,showRemoveIcon:$i=!0,showDownloadIcon:Ai=!1,removeIcon:gi,previewIcon:qi,downloadIcon:xi,progress:li={size:[-1,2],showInfo:!1},appendAction:Ni,appendActionVisible:Gi=!0,itemRender:qr,disabled:vi}=mt,Zi=(0,he.Z)(),[la,ta]=de.useState(!1);de.useEffect(()=>{Ct!=="picture"&&Ct!=="picture-card"&&Ct!=="picture-circle"||(Qr||[]).forEach(Ar=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(Ar.originFileObj instanceof File||Ar.originFileObj instanceof Blob)||Ar.thumbUrl!==void 0||(Ar.thumbUrl="",fn&&fn(Ar.originFileObj).then(pi=>{Ar.thumbUrl=pi||"",Zi()}))})},[Ct,Qr,fn]),de.useEffect(()=>{ta(!0)},[]);const ii=(Ar,pi)=>{if(Bn)return pi==null||pi.preventDefault(),Bn(Ar)},Et=Ar=>{typeof hn=="function"?hn(Ar):Ar.url&&window.open(Ar.url)},wt=Ar=>{vn==null||vn(Ar)},Qt=Ar=>{if(Nn)return Nn(Ar,Ct);const pi=Ar.status==="uploading",Ti=hr&&hr(Ar)?de.createElement(le,null):de.createElement(jt,null);let Ei=pi?de.createElement(_n.Z,null):de.createElement(yn,null);return Ct==="picture"?Ei=pi?de.createElement(_n.Z,null):Ti:(Ct==="picture-card"||Ct==="picture-circle")&&(Ei=pi?xn.uploading:Ti),Ei},mn=(Ar,pi,Ti,Ei)=>{const De={type:"text",size:"small",title:Ei,onClick:Fe=>{pi(),(0,Te.l$)(Ar)&&Ar.props.onClick&&Ar.props.onClick(Fe)},className:`${Ti}-list-item-action`,disabled:vi};if((0,Te.l$)(Ar)){const Fe=(0,Te.Tm)(Ar,Object.assign(Object.assign({},Ar.props),{onClick:()=>{}}));return de.createElement(Ye.ZP,Object.assign({},De,{icon:Fe}))}return de.createElement(Ye.ZP,Object.assign({},De),de.createElement("span",null,Ar))};de.useImperativeHandle(st,()=>({handlePreview:ii,handleDownload:Et}));const{getPrefixCls:On}=de.useContext(or.E_),vr=On("upload",tn),Ir=On(),Wr=Ve()(`${vr}-list`,`${vr}-list-${Ct}`),Gr=(0,He.Z)(Qr.map(Ar=>({key:Ar.uid,file:Ar})));let ni={motionDeadline:2e3,motionName:`${vr}-${Ct==="picture-card"||Ct==="picture-circle"?"animate-inline":"animate"}`,keys:Gr,motionAppear:la};const yi=de.useMemo(()=>{const Ar=Object.assign({},(0,oe.Z)(Ir));return delete Ar.onAppearEnd,delete Ar.onEnterEnd,delete Ar.onLeaveEnd,Ar},[Ir]);return Ct!=="picture-card"&&Ct!=="picture-circle"&&(ni=Object.assign(Object.assign({},yi),ni)),de.createElement("div",{className:Wr},de.createElement(pe.CSSMotionList,Object.assign({},ni,{component:!1}),Ar=>{let{key:pi,file:Ti,className:Ei,style:De}=Ar;return de.createElement(nr,{key:pi,locale:xn,prefixCls:vr,className:Ei,style:De,file:Ti,items:Qr,progress:li,listType:Ct,isImgUrl:hr,showPreviewIcon:Ur,showRemoveIcon:$i,showDownloadIcon:Ai,removeIcon:gi,previewIcon:qi,downloadIcon:xi,iconRender:Qt,actionIconRender:mn,itemRender:qr,onPreview:ii,onDownload:Et,onClose:wt})}),Ni&&de.createElement(pe.default,Object.assign({},ni,{visible:Gi,forceRender:!0}),Ar=>{let{className:pi,style:Ti}=Ar;return(0,Te.Tm)(Ni,Ei=>({className:Ve()(Ei.className,pi),style:Object.assign(Object.assign(Object.assign({},Ti),{pointerEvents:pi?"none":void 0}),Ei.style)}))}))};var Er=de.forwardRef(Sr),Or=se(14747),Vr=se(33507),ur=se(67968),si=se(45503),Bi=mt=>{const{componentCls:st,iconCls:Ct}=mt;return{[`${st}-wrapper`]:{[`${st}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:mt.colorFillAlter,border:`${mt.lineWidth}px dashed ${mt.colorBorder}`,borderRadius:mt.borderRadiusLG,cursor:"pointer",transition:`border-color ${mt.motionDurationSlow}`,[st]:{padding:`${mt.padding}px 0`},[`${st}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${st}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${st}-disabled):hover`]:{borderColor:mt.colorPrimaryHover},[`p${st}-drag-icon`]:{marginBottom:mt.margin,[Ct]:{color:mt.colorPrimary,fontSize:mt.uploadThumbnailSize}},[`p${st}-text`]:{margin:`0 0 ${mt.marginXXS}px`,color:mt.colorTextHeading,fontSize:mt.fontSizeLG},[`p${st}-hint`]:{color:mt.colorTextDescription,fontSize:mt.fontSize},[`&${st}-disabled`]:{cursor:"not-allowed",[`p${st}-drag-icon ${Ct},
|
|
|
p${st}-text,
|
|
|
p${st}-hint
|
|
|
`]:{color:mt.colorTextDisabled}}}}}},ri=mt=>{const{componentCls:st,antCls:Ct,iconCls:fn,fontSize:Bn,lineHeight:hn}=mt,vn=`${st}-list-item`,xn=`${vn}-actions`,Nn=`${vn}-action`,hr=Math.round(Bn*hn);return{[`${st}-wrapper`]:{[`${st}-list`]:Object.assign(Object.assign({},(0,Or.dF)()),{lineHeight:mt.lineHeight,[vn]:{position:"relative",height:mt.lineHeight*Bn,marginTop:mt.marginXS,fontSize:Bn,display:"flex",alignItems:"center",transition:`background-color ${mt.motionDurationSlow}`,"&:hover":{backgroundColor:mt.controlItemBgHover},[`${vn}-name`]:Object.assign(Object.assign({},Or.vS),{padding:`0 ${mt.paddingXS}px`,lineHeight:hn,flex:"auto",transition:`all ${mt.motionDurationSlow}`}),[xn]:{[Nn]:{opacity:0},[`${Nn}${Ct}-btn-sm`]:{height:hr,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${Nn}:focus-visible,
|
|
|
&.picture ${Nn}
|
|
|
`]:{opacity:1},[fn]:{color:mt.actionsColor,transition:`all ${mt.motionDurationSlow}`},[`&:hover ${fn}`]:{color:mt.colorText}},[`${st}-icon ${fn}`]:{color:mt.colorTextDescription,fontSize:Bn},[`${vn}-progress`]:{position:"absolute",bottom:-mt.uploadProgressOffset,width:"100%",paddingInlineStart:Bn+mt.paddingXS,fontSize:Bn,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${vn}:hover ${Nn}`]:{opacity:1,color:mt.colorText},[`${vn}-error`]:{color:mt.colorError,[`${vn}-name, ${st}-icon ${fn}`]:{color:mt.colorError},[xn]:{[`${fn}, ${fn}:hover`]:{color:mt.colorError},[Nn]:{opacity:1}}},[`${st}-list-item-container`]:{transition:`opacity ${mt.motionDurationSlow}, height ${mt.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},yt=se(45930),Mn=se(16932);const An=new yt.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Dn=new yt.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var qn=mt=>{const{componentCls:st}=mt,Ct=`${st}-animate-inline`;return[{[`${st}-wrapper`]:{[`${Ct}-appear, ${Ct}-enter, ${Ct}-leave`]:{animationDuration:mt.motionDurationSlow,animationTimingFunction:mt.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Ct}-appear, ${Ct}-enter`]:{animationName:An},[`${Ct}-leave`]:{animationName:Dn}}},{[`${st}-wrapper`]:(0,Mn.J$)(mt)},An,Dn]},pr=se(47448),$n=se(84780);const qe=mt=>{const{componentCls:st,iconCls:Ct,uploadThumbnailSize:fn,uploadProgressOffset:Bn}=mt,hn=`${st}-list`,vn=`${hn}-item`;return{[`${st}-wrapper`]:{[`
|
|
|
${hn}${hn}-picture,
|
|
|
${hn}${hn}-picture-card,
|
|
|
${hn}${hn}-picture-circle
|
|
|
`]:{[vn]:{position:"relative",height:fn+mt.lineWidth*2+mt.paddingXS*2,padding:mt.paddingXS,border:`${mt.lineWidth}px ${mt.lineType} ${mt.colorBorder}`,borderRadius:mt.borderRadiusLG,"&:hover":{background:"transparent"},[`${vn}-thumbnail`]:Object.assign(Object.assign({},Or.vS),{width:fn,height:fn,lineHeight:`${fn+mt.paddingSM}px`,textAlign:"center",flex:"none",[Ct]:{fontSize:mt.fontSizeHeading2,color:mt.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${vn}-progress`]:{bottom:Bn,width:`calc(100% - ${mt.paddingSM*2}px)`,marginTop:0,paddingInlineStart:fn+mt.paddingXS}},[`${vn}-error`]:{borderColor:mt.colorError,[`${vn}-thumbnail ${Ct}`]:{[`svg path[fill='${pr.blue[0]}']`]:{fill:mt.colorErrorBg},[`svg path[fill='${pr.blue.primary}']`]:{fill:mt.colorError}}},[`${vn}-uploading`]:{borderStyle:"dashed",[`${vn}-name`]:{marginBottom:Bn}}},[`${hn}${hn}-picture-circle ${vn}`]:{[`&, &::before, ${vn}-thumbnail`]:{borderRadius:"50%"}}}}},ut=mt=>{const{componentCls:st,iconCls:Ct,fontSizeLG:fn,colorTextLightSolid:Bn}=mt,hn=`${st}-list`,vn=`${hn}-item`,xn=mt.uploadPicCardSize;return{[`
|
|
|
${st}-wrapper${st}-picture-card-wrapper,
|
|
|
${st}-wrapper${st}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Or.dF)()),{display:"inline-block",width:"100%",[`${st}${st}-select`]:{width:xn,height:xn,marginInlineEnd:mt.marginXS,marginBottom:mt.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:mt.colorFillAlter,border:`${mt.lineWidth}px dashed ${mt.colorBorder}`,borderRadius:mt.borderRadiusLG,cursor:"pointer",transition:`border-color ${mt.motionDurationSlow}`,[`> ${st}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${st}-disabled):hover`]:{borderColor:mt.colorPrimary}},[`${hn}${hn}-picture-card, ${hn}${hn}-picture-circle`]:{[`${hn}-item-container`]:{display:"inline-block",width:xn,height:xn,marginBlock:`0 ${mt.marginXS}px`,marginInline:`0 ${mt.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[vn]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${mt.paddingXS*2}px)`,height:`calc(100% - ${mt.paddingXS*2}px)`,backgroundColor:mt.colorBgMask,opacity:0,transition:`all ${mt.motionDurationSlow}`,content:'" "'}},[`${vn}:hover`]:{[`&::before, ${vn}-actions`]:{opacity:1}},[`${vn}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${mt.motionDurationSlow}`,[`${Ct}-eye, ${Ct}-download, ${Ct}-delete`]:{zIndex:10,width:fn,margin:`0 ${mt.marginXXS}px`,fontSize:fn,cursor:"pointer",transition:`all ${mt.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${vn}-actions, ${vn}-actions:hover`]:{[`${Ct}-eye, ${Ct}-download, ${Ct}-delete`]:{color:new $n.C(Bn).setAlpha(.65).toRgbString(),"&:hover":{color:Bn}}},[`${vn}-thumbnail, ${vn}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${vn}-name`]:{display:"none",textAlign:"center"},[`${vn}-file + ${vn}-name`]:{position:"absolute",bottom:mt.margin,display:"block",width:`calc(100% - ${mt.paddingXS*2}px)`},[`${vn}-uploading`]:{[`&${vn}`]:{backgroundColor:mt.colorFillAlter},[`&::before, ${Ct}-eye, ${Ct}-download, ${Ct}-delete`]:{display:"none"}},[`${vn}-progress`]:{bottom:mt.marginXL,width:`calc(100% - ${mt.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${st}-wrapper${st}-picture-circle-wrapper`]:{[`${st}${st}-select`]:{borderRadius:"50%"}}}};var Vt=mt=>{const{componentCls:st}=mt;return{[`${st}-rtl`]:{direction:"rtl"}}};const We=mt=>{const{componentCls:st,colorTextDisabled:Ct}=mt;return{[`${st}-wrapper`]:Object.assign(Object.assign({},(0,Or.Wf)(mt)),{[st]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${st}-select`]:{display:"inline-block"},[`${st}-disabled`]:{color:Ct,cursor:"not-allowed"}})}};var pt=(0,ur.Z)("Upload",mt=>{const{fontSizeHeading3:st,fontSize:Ct,lineHeight:fn,lineWidth:Bn,controlHeightLG:hn}=mt,vn=Math.round(Ct*fn),xn=(0,si.TS)(mt,{uploadThumbnailSize:st*2,uploadProgressOffset:vn/2+Bn,uploadPicCardSize:hn*2.55});return[We(xn),Bi(xn),qe(xn),ut(xn),ri(xn),qn(xn),Vt(xn),(0,Vr.Z)(xn)]},mt=>({actionsColor:mt.colorTextDescription})),zt=function(mt,st,Ct,fn){function Bn(hn){return hn instanceof Ct?hn:new Ct(function(vn){vn(hn)})}return new(Ct||(Ct=Promise))(function(hn,vn){function xn(tn){try{hr(fn.next(tn))}catch(Qr){vn(Qr)}}function Nn(tn){try{hr(fn.throw(tn))}catch(Qr){vn(Qr)}}function hr(tn){tn.done?hn(tn.value):Bn(tn.value).then(xn,Nn)}hr((fn=fn.apply(mt,st||[])).next())})};const Bt=`__LIST_IGNORE_${Date.now()}__`,en=(mt,st)=>{const{fileList:Ct,defaultFileList:fn,onRemove:Bn,showUploadList:hn=!0,listType:vn="text",onPreview:xn,onDownload:Nn,onChange:hr,onDrop:tn,previewFile:Qr,disabled:Ur,locale:$i,iconRender:Ai,isImageUrl:gi,progress:qi,prefixCls:xi,className:li,type:Ni="select",children:Gi,style:qr,itemRender:vi,maxCount:Zi,data:la={},multiple:ta=!1,action:ii="",accept:Et="",supportServerRender:wt=!0,rootClassName:Qt}=mt,mn=de.useContext(Qe.Z),On=Ur!=null?Ur:mn,[vr,Ir]=(0,sn.Z)(fn||[],{value:Ct,postState:Re=>Re!=null?Re:[]}),[Wr,Gr]=de.useState("drop"),Hr=de.useRef(null);de.useMemo(()=>{const Re=Date.now();(Ct||[]).forEach((Ke,At)=>{!Ke.uid&&!Object.isFrozen(Ke)&&(Ke.uid=`__AUTO__${Re}_${At}__`)})},[Ct]);const ni=(Re,Ke,At)=>{let dt=(0,He.Z)(Ke),Gt=!1;Zi===1?dt=dt.slice(-1):Zi&&(Gt=dt.length>Zi,dt=dt.slice(0,Zi)),(0,Cn.flushSync)(()=>{Ir(dt)});const pn={file:Re,fileList:dt};At&&(pn.event=At),(!Gt||dt.some(Sn=>Sn.uid===Re.uid))&&(0,Cn.flushSync)(()=>{hr==null||hr(pn)})},yi=(Re,Ke)=>zt(void 0,void 0,void 0,function*(){const{beforeUpload:At,transformFile:dt}=mt;let Gt=Re;if(At){const pn=yield At(Re,Ke);if(pn===!1)return!1;if(delete Re[Bt],pn===Bt)return Object.defineProperty(Re,Bt,{value:!0,configurable:!0}),!1;typeof pn=="object"&&pn&&(Gt=pn)}return dt&&(Gt=yield dt(Gt)),Gt}),Ar=Re=>{const Ke=Re.filter(Gt=>!Gt.file[Bt]);if(!Ke.length)return;const At=Ke.map(Gt=>Lt(Gt.file));let dt=(0,He.Z)(vr);At.forEach(Gt=>{dt=Rt(Gt,dt)}),At.forEach((Gt,pn)=>{let Sn=Gt;if(Ke[pn].parsedFile)Gt.status="uploading";else{const{originFileObj:Kn}=Gt;let Tn;try{Tn=new File([Kn],Kn.name,{type:Kn.type})}catch(cn){Tn=new Blob([Kn],{type:Kn.type}),Tn.name=Kn.name,Tn.lastModifiedDate=new Date,Tn.lastModified=new Date().getTime()}Tn.uid=Gt.uid,Sn=Tn}ni(Sn,dt)})},pi=(Re,Ke,At)=>{try{typeof Re=="string"&&(Re=JSON.parse(Re))}catch(pn){}if(!Ft(Ke,vr))return;const dt=Lt(Ke);dt.status="done",dt.percent=100,dt.response=Re,dt.xhr=At;const Gt=Rt(dt,vr);ni(dt,Gt)},Ti=(Re,Ke)=>{if(!Ft(Ke,vr))return;const At=Lt(Ke);At.status="uploading",At.percent=Re.percent;const dt=Rt(At,vr);ni(At,dt,Re)},Ei=(Re,Ke,At)=>{if(!Ft(At,vr))return;const dt=Lt(At);dt.error=Re,dt.response=Ke,dt.status="error";const Gt=Rt(dt,vr);ni(dt,Gt)},De=Re=>{let Ke;Promise.resolve(typeof Bn=="function"?Bn(Re):Bn).then(At=>{var dt;if(At===!1)return;const Gt=Jt(Re,vr);Gt&&(Ke=Object.assign(Object.assign({},Re),{status:"removed"}),vr==null||vr.forEach(pn=>{const Sn=Ke.uid!==void 0?"uid":"name";pn[Sn]===Ke[Sn]&&!Object.isFrozen(pn)&&(pn.status="removed")}),(dt=Hr.current)===null||dt===void 0||dt.abort(Ke),ni(Ke,Gt))})},Fe=Re=>{Gr(Re.type),Re.type==="drop"&&(tn==null||tn(Re))};de.useImperativeHandle(st,()=>({onBatchStart:Ar,onSuccess:pi,onProgress:Ti,onError:Ei,fileList:vr,upload:Hr.current}));const{getPrefixCls:ze,direction:Ze,upload:nt}=de.useContext(or.E_),lt=ze("upload",xi),Mt=Object.assign(Object.assign({onBatchStart:Ar,onError:Ei,onProgress:Ti,onSuccess:pi},mt),{data:la,multiple:ta,action:ii,accept:Et,supportServerRender:wt,prefixCls:lt,disabled:On,beforeUpload:yi,onChange:void 0});delete Mt.className,delete Mt.style,(!Gi||On)&&delete Mt.id;const[an,un]=pt(lt),[Jn]=(0,Ce.Z)("Upload",ht.Z.Upload),{showRemoveIcon:br,showPreviewIcon:Vn,showDownloadIcon:kn,removeIcon:wn,previewIcon:Pn,downloadIcon:zn}=typeof hn=="boolean"?{}:hn,gr=(Re,Ke)=>hn?de.createElement(Er,{prefixCls:lt,listType:vn,items:vr,previewFile:Qr,onPreview:xn,onDownload:Nn,onRemove:De,showRemoveIcon:!On&&br,showPreviewIcon:Vn,showDownloadIcon:kn,removeIcon:wn,previewIcon:Pn,downloadIcon:zn,iconRender:Ai,locale:Object.assign(Object.assign({},Jn),$i),isImageUrl:gi,progress:qi,appendAction:Re,appendActionVisible:Ke,itemRender:vi,disabled:On}):Re,Yn=Ve()(`${lt}-wrapper`,li,Qt,un,nt==null?void 0:nt.className,{[`${lt}-rtl`]:Ze==="rtl",[`${lt}-picture-card-wrapper`]:vn==="picture-card",[`${lt}-picture-circle-wrapper`]:vn==="picture-circle"}),Xn=Object.assign(Object.assign({},nt==null?void 0:nt.style),qr);if(Ni==="drag"){const Re=Ve()(un,lt,`${lt}-drag`,{[`${lt}-drag-uploading`]:vr.some(Ke=>Ke.status==="uploading"),[`${lt}-drag-hover`]:Wr==="dragover",[`${lt}-disabled`]:On,[`${lt}-rtl`]:Ze==="rtl"});return an(de.createElement("span",{className:Yn},de.createElement("div",{className:Re,style:Xn,onDrop:Fe,onDragOver:Fe,onDragLeave:Fe},de.createElement(Nt,Object.assign({},Mt,{ref:Hr,className:`${lt}-btn`}),de.createElement("div",{className:`${lt}-drag-container`},Gi))),gr()))}const ir=Ve()(lt,`${lt}-select`,{[`${lt}-disabled`]:On}),xr=(Re=>de.createElement("div",{className:ir,style:Re},de.createElement(Nt,Object.assign({},Mt,{ref:Hr}))))(Gi?void 0:{display:"none"});return an(vn==="picture-card"||vn==="picture-circle"?de.createElement("span",{className:Yn},gr(xr,!!Gi)):de.createElement("span",{className:Yn},xr,gr()))};var jn=de.forwardRef(en),Lr=function(mt,st){var Ct={};for(var fn in mt)Object.prototype.hasOwnProperty.call(mt,fn)&&st.indexOf(fn)<0&&(Ct[fn]=mt[fn]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bn=0,fn=Object.getOwnPropertySymbols(mt);Bn<fn.length;Bn++)st.indexOf(fn[Bn])<0&&Object.prototype.propertyIsEnumerable.call(mt,fn[Bn])&&(Ct[fn[Bn]]=mt[fn[Bn]]);return Ct},tr=de.forwardRef((mt,st)=>{var{style:Ct,height:fn}=mt,Bn=Lr(mt,["style","height"]);return de.createElement(jn,Object.assign({ref:st},Bn,{type:"drag",style:Object.assign(Object.assign({},Ct),{height:fn})}))});const dr=jn;dr.Dragger=tr,dr.LIST_IGNORE=Bt;var fr=dr},72665:function(En,Wt){"use strict";var se;var de=typeof Symbol=="function"&&Symbol.for,He=de?Symbol.for("react.element"):60103,Be=de?Symbol.for("react.portal"):60106,Ve=de?Symbol.for("react.fragment"):60107,ve=de?Symbol.for("react.strict_mode"):60108,we=de?Symbol.for("react.profiler"):60114,Ee=de?Symbol.for("react.provider"):60109,xe=de?Symbol.for("react.context"):60110,me=de?Symbol.for("react.async_mode"):60111,Ie=de?Symbol.for("react.concurrent_mode"):60111,ot=de?Symbol.for("react.forward_ref"):60112,Oe=de?Symbol.for("react.suspense"):60113,St=de?Symbol.for("react.suspense_list"):60120,ft=de?Symbol.for("react.memo"):60115,it=de?Symbol.for("react.lazy"):60116,Je=de?Symbol.for("react.block"):60121,Le=de?Symbol.for("react.fundamental"):60117,gt=de?Symbol.for("react.responder"):60118,qt=de?Symbol.for("react.scope"):60119;function tt(ke){if(typeof ke=="object"&&ke!==null){var Se=ke.$$typeof;switch(Se){case He:switch(ke=ke.type,ke){case me:case Ie:case Ve:case we:case ve:case Oe:return ke;default:switch(ke=ke&&ke.$$typeof,ke){case xe:case ot:case it:case ft:case Ee:return ke;default:return Se}}case Be:return Se}}}function ct(ke){return tt(ke)===Ie}se=me,se=Ie,se=xe,se=Ee,se=He,se=ot,se=Ve,se=it,se=ft,se=Be,se=we,se=ve,se=Oe,se=function(ke){return ct(ke)||tt(ke)===me},se=ct,se=function(ke){return tt(ke)===xe},se=function(ke){return tt(ke)===Ee},se=function(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===He},se=function(ke){return tt(ke)===ot},se=function(ke){return tt(ke)===Ve},se=function(ke){return tt(ke)===it},Wt.isMemo=function(ke){return tt(ke)===ft},se=function(ke){return tt(ke)===Be},se=function(ke){return tt(ke)===we},se=function(ke){return tt(ke)===ve},se=function(ke){return tt(ke)===Oe},se=function(ke){return typeof ke=="string"||typeof ke=="function"||ke===Ve||ke===Ie||ke===we||ke===ve||ke===Oe||ke===St||typeof ke=="object"&&ke!==null&&(ke.$$typeof===it||ke.$$typeof===ft||ke.$$typeof===Ee||ke.$$typeof===xe||ke.$$typeof===ot||ke.$$typeof===Le||ke.$$typeof===gt||ke.$$typeof===qt||ke.$$typeof===Je)},se=tt},12060:function(En,Wt,se){"use strict";En.exports=se(72665)},41771:function(En,Wt){"use strict";var se;var de=typeof Symbol=="function"&&Symbol.for,He=de?Symbol.for("react.element"):60103,Be=de?Symbol.for("react.portal"):60106,Ve=de?Symbol.for("react.fragment"):60107,ve=de?Symbol.for("react.strict_mode"):60108,we=de?Symbol.for("react.profiler"):60114,Ee=de?Symbol.for("react.provider"):60109,xe=de?Symbol.for("react.context"):60110,me=de?Symbol.for("react.async_mode"):60111,Ie=de?Symbol.for("react.concurrent_mode"):60111,ot=de?Symbol.for("react.forward_ref"):60112,Oe=de?Symbol.for("react.suspense"):60113,St=de?Symbol.for("react.suspense_list"):60120,ft=de?Symbol.for("react.memo"):60115,it=de?Symbol.for("react.lazy"):60116,Je=de?Symbol.for("react.block"):60121,Le=de?Symbol.for("react.fundamental"):60117,gt=de?Symbol.for("react.responder"):60118,qt=de?Symbol.for("react.scope"):60119;function tt(ke){if(typeof ke=="object"&&ke!==null){var Se=ke.$$typeof;switch(Se){case He:switch(ke=ke.type,ke){case me:case Ie:case Ve:case we:case ve:case Oe:return ke;default:switch(ke=ke&&ke.$$typeof,ke){case xe:case ot:case it:case ft:case Ee:return ke;default:return Se}}case Be:return Se}}}function ct(ke){return tt(ke)===Ie}se=me,se=Ie,se=xe,se=Ee,se=He,se=ot,se=Ve,se=it,se=ft,se=Be,se=we,se=ve,se=Oe,se=function(ke){return ct(ke)||tt(ke)===me},se=ct,se=function(ke){return tt(ke)===xe},se=function(ke){return tt(ke)===Ee},se=function(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===He},se=function(ke){return tt(ke)===ot},Wt.isFragment=function(ke){return tt(ke)===Ve},se=function(ke){return tt(ke)===it},se=function(ke){return tt(ke)===ft},se=function(ke){return tt(ke)===Be},se=function(ke){return tt(ke)===we},se=function(ke){return tt(ke)===ve},se=function(ke){return tt(ke)===Oe},se=function(ke){return typeof ke=="string"||typeof ke=="function"||ke===Ve||ke===Ie||ke===we||ke===ve||ke===Oe||ke===St||typeof ke=="object"&&ke!==null&&(ke.$$typeof===it||ke.$$typeof===ft||ke.$$typeof===Ee||ke.$$typeof===xe||ke.$$typeof===ot||ke.$$typeof===Le||ke.$$typeof===gt||ke.$$typeof===qt||ke.$$typeof===Je)},se=tt},47655:function(En,Wt,se){"use strict";En.exports=se(41771)},64701:function(En,Wt,se){"use strict";se.r(Wt),se.d(Wt,{ResizableTextArea:function(){return Ut},default:function(){return rn}});var de=se(87462),He=se(1413),Be=se(4942),Ve=se(71002),ve=se(97685),we=se(45987),Ee=se(74902),xe=se(94184),me=se.n(xe),Ie=se(67656),ot=se(87887),Oe=se(67294);function St($t){var Zt=Oe.useRef();Zt.current=$t;var yn=Oe.useCallback(function(){for(var ln,Ae=arguments.length,ue=new Array(Ae),le=0;le<Ae;le++)ue[le]=arguments[le];return(ln=Zt.current)===null||ln===void 0?void 0:ln.call.apply(ln,[Zt].concat(ue))},[]);return yn}function ft(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var it=ft()?Oe.useLayoutEffect:Oe.useEffect,Je=it,Le=function(Zt,yn){var ln=Oe.useRef(!0);it(function(){if(!ln.current)return Zt()},yn),it(function(){return ln.current=!1,function(){ln.current=!0}},[])};function gt($t){var Zt=Oe.useRef(!1),yn=Oe.useState($t),ln=(0,ve.Z)(yn,2),Ae=ln[0],ue=ln[1];Oe.useEffect(function(){return Zt.current=!1,function(){Zt.current=!0}},[]);function le(pe,he){he&&Zt.current||ue(pe)}return[Ae,le]}function qt($t){return $t!==void 0}function tt($t,Zt){var yn=Zt||{},ln=yn.defaultValue,Ae=yn.value,ue=yn.onChange,le=yn.postState,pe=gt(function(){return qt(Ae)?Ae:qt(ln)?typeof ln=="function"?ln():ln:typeof $t=="function"?$t():$t}),he=(0,ve.Z)(pe,2),oe=he[0],Te=he[1],Ye=Ae!==void 0?Ae:oe,Lt=le?le(Ye):Ye,Rt=St(ue),Ft=gt([Ye]),Jt=(0,ve.Z)(Ft,2),Xt=Jt[0],Hn=Jt[1];Le(function(){var Tt=Xt[0];oe!==Tt&&Rt(oe,Tt)},[Xt]),Le(function(){qt(Ae)||Te(Ae)},[Ae]);var Rn=St(function(Tt,dn){Te(Tt,dn),Hn([Ye],dn)});return[Lt,Rn]}var ct=se(48555),ke=function(Zt){return+setTimeout(Zt,16)},Se=function(Zt){return clearTimeout(Zt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ke=function(Zt){return window.requestAnimationFrame(Zt)},Se=function(Zt){return window.cancelAnimationFrame(Zt)});var Ue=0,je=new Map;function _t($t){je.delete($t)}var vt=function(Zt){var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ue+=1;var ln=Ue;function Ae(ue){if(ue===0)_t(ln),Zt();else{var le=ke(function(){Ae(ue-1)});je.set(ln,le)}}return Ae(yn),ln};vt.cancel=function($t){var Zt=je.get($t);return _t(Zt),Se(Zt)};var kt=vt,Xe=`
|
|
|
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"],Ot={},bn;function Nt($t){var Zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yn=$t.getAttribute("id")||$t.getAttribute("data-reactid")||$t.getAttribute("name");if(Zt&&Ot[yn])return Ot[yn];var ln=window.getComputedStyle($t),Ae=ln.getPropertyValue("box-sizing")||ln.getPropertyValue("-moz-box-sizing")||ln.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(ln.getPropertyValue("padding-bottom"))+parseFloat(ln.getPropertyValue("padding-top")),le=parseFloat(ln.getPropertyValue("border-bottom-width"))+parseFloat(ln.getPropertyValue("border-top-width")),pe=Kt.map(function(oe){return"".concat(oe,":").concat(ln.getPropertyValue(oe))}).join(";"),he={sizingStyle:pe,paddingSize:ue,borderSize:le,boxSizing:Ae};return Zt&&yn&&(Ot[yn]=he),he}function sn($t){var Zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ln=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;bn||(bn=document.createElement("textarea"),bn.setAttribute("tab-index","-1"),bn.setAttribute("aria-hidden","true"),document.body.appendChild(bn)),$t.getAttribute("wrap")?bn.setAttribute("wrap",$t.getAttribute("wrap")):bn.removeAttribute("wrap");var Ae=Nt($t,Zt),ue=Ae.paddingSize,le=Ae.borderSize,pe=Ae.boxSizing,he=Ae.sizingStyle;bn.setAttribute("style","".concat(he,";").concat(Xe)),bn.value=$t.value||$t.placeholder||"";var oe=void 0,Te=void 0,Ye,Lt=bn.scrollHeight;if(pe==="border-box"?Lt+=le:pe==="content-box"&&(Lt-=ue),yn!==null||ln!==null){bn.value=" ";var Rt=bn.scrollHeight-ue;yn!==null&&(oe=Rt*yn,pe==="border-box"&&(oe=oe+ue+le),Lt=Math.max(oe,Lt)),ln!==null&&(Te=Rt*ln,pe==="border-box"&&(Te=Te+ue+le),Ye=Lt>Te?"":"hidden",Lt=Math.min(Te,Lt))}var Ft={height:Lt,overflowY:Ye,resize:"none"};return oe&&(Ft.minHeight=oe),Te&&(Ft.maxHeight=Te),Ft}var Cn=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],or=0,Qe=1,Ce=2,ht=Oe.forwardRef(function($t,Zt){var yn=$t,ln=yn.prefixCls,Ae=yn.onPressEnter,ue=yn.defaultValue,le=yn.value,pe=yn.autoSize,he=yn.onResize,oe=yn.className,Te=yn.style,Ye=yn.disabled,Lt=yn.onChange,Rt=yn.onInternalAutoSize,Ft=(0,we.Z)(yn,Cn),Jt=tt(ue,{value:le,postState:function(Dn){return Dn!=null?Dn:""}}),Xt=(0,ve.Z)(Jt,2),Hn=Xt[0],Rn=Xt[1],Tt=function(Dn){Rn(Dn.target.value),Lt==null||Lt(Dn)},dn=Oe.useRef();Oe.useImperativeHandle(Zt,function(){return{textArea:dn.current}});var cr=Oe.useMemo(function(){return pe&&(0,Ve.Z)(pe)==="object"?[pe.minRows,pe.maxRows]:[]},[pe]),Mr=(0,ve.Z)(cr,2),at=Mr[0],Ht=Mr[1],Fn=!!pe,er=function(){try{if(document.activeElement===dn.current){var Dn=dn.current,lr=Dn.selectionStart,qn=Dn.selectionEnd,pr=Dn.scrollTop;dn.current.setSelectionRange(lr,qn),dn.current.scrollTop=pr}}catch($n){}},nr=Oe.useState(Ce),Sr=(0,ve.Z)(nr,2),Tr=Sr[0],Er=Sr[1],Or=Oe.useState(),Vr=(0,ve.Z)(Or,2),ur=Vr[0],si=Vr[1],Li=function(){Er(or)};Je(function(){Fn&&Li()},[le,at,Ht,Fn]),Je(function(){if(Tr===or)Er(Qe);else if(Tr===Qe){var An=sn(dn.current,!1,at,Ht);Er(Ce),si(An)}else er()},[Tr]);var Bi=Oe.useRef(),Hi=function(){kt.cancel(Bi.current)},ri=function(Dn){Tr===Ce&&(he==null||he(Dn),pe&&(Hi(),Bi.current=kt(function(){Li()})))};Oe.useEffect(function(){return Hi},[]);var yt=Fn?ur:null,Mn=(0,He.Z)((0,He.Z)({},Te),yt);return(Tr===or||Tr===Qe)&&(Mn.overflowY="hidden",Mn.overflowX="hidden"),Oe.createElement(ct.Z,{onResize:ri,disabled:!(pe||he)},Oe.createElement("textarea",(0,de.Z)({},Ft,{ref:dn,style:Mn,className:me()(ln,oe,(0,Be.Z)({},"".concat(ln,"-disabled"),Ye)),disabled:Ye,value:Hn,onChange:Tt})))}),Ut=ht,Yt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ge($t,Zt){return(0,Ee.Z)($t||"").slice(0,Zt).join("")}function rt($t,Zt,yn,ln){var Ae=yn;return $t?Ae=Ge(yn,ln):(0,Ee.Z)(Zt||"").length<yn.length&&(0,Ee.Z)(yn||"").length>ln&&(Ae=Zt),Ae}var jt=Oe.forwardRef(function($t,Zt){var yn,ln=$t.defaultValue,Ae=$t.value,ue=$t.onFocus,le=$t.onBlur,pe=$t.onChange,he=$t.allowClear,oe=$t.maxLength,Te=$t.onCompositionStart,Ye=$t.onCompositionEnd,Lt=$t.suffix,Rt=$t.prefixCls,Ft=Rt===void 0?"rc-textarea":Rt,Jt=$t.classes,Xt=$t.showCount,Hn=$t.className,Rn=$t.style,Tt=$t.disabled,dn=$t.hidden,cr=$t.classNames,Mr=$t.styles,at=$t.onResize,Ht=(0,we.Z)($t,Yt),Fn=tt(ln,{value:Ae,defaultValue:ln}),er=(0,ve.Z)(Fn,2),nr=er[0],Sr=er[1],Tr=(0,Oe.useRef)(null),Er=Oe.useState(!1),Or=(0,ve.Z)(Er,2),Vr=Or[0],ur=Or[1],si=Oe.useState(!1),Li=(0,ve.Z)(si,2),Bi=Li[0],Hi=Li[1],ri=Oe.useRef(),yt=Oe.useRef(0),Mn=Oe.useState(null),An=(0,ve.Z)(Mn,2),Dn=An[0],lr=An[1],qn=function(){var dr;(dr=Tr.current)===null||dr===void 0||dr.textArea.focus()};(0,Oe.useImperativeHandle)(Zt,function(){return{resizableTextArea:Tr.current,focus:qn,blur:function(){var dr;(dr=Tr.current)===null||dr===void 0||dr.textArea.blur()}}}),(0,Oe.useEffect)(function(){ur(function(tr){return!Tt&&tr})},[Tt]);var pr=Number(oe)>0,$n=function(dr){Hi(!0),ri.current=nr,yt.current=dr.currentTarget.selectionStart,Te==null||Te(dr)},qe=function(dr){Hi(!1);var fr=dr.currentTarget.value;if(pr){var mt,st=yt.current>=oe+1||yt.current===((mt=ri.current)===null||mt===void 0?void 0:mt.length);fr=rt(st,ri.current,fr,oe)}fr!==nr&&(Sr(fr),(0,ot.rJ)(dr.currentTarget,dr,pe,fr)),Ye==null||Ye(dr)},ut=function(dr){var fr=dr.target.value;if(!Bi&&pr){var mt=dr.target.selectionStart>=oe+1||dr.target.selectionStart===fr.length||!dr.target.selectionStart;fr=rt(mt,nr,fr,oe)}Sr(fr),(0,ot.rJ)(dr.currentTarget,dr,pe,fr)},Dt=function(dr){var fr=Ht.onPressEnter,mt=Ht.onKeyDown;dr.key==="Enter"&&fr&&fr(dr),mt==null||mt(dr)},Vt=function(dr){ur(!0),ue==null||ue(dr)},We=function(dr){ur(!1),le==null||le(dr)},pt=function(dr){var fr;Sr(""),qn(),(0,ot.rJ)((fr=Tr.current)===null||fr===void 0?void 0:fr.textArea,dr,pe)},zt=(0,ot.D7)(nr);!Bi&&pr&&Ae==null&&(zt=Ge(zt,oe));var Bt=Lt,en;if(Xt){var nn=(0,Ee.Z)(zt).length;(0,Ve.Z)(Xt)==="object"?en=Xt.formatter({value:zt,count:nn,maxLength:oe}):en="".concat(nn).concat(pr?" / ".concat(oe):""),Bt=Oe.createElement(Oe.Fragment,null,Bt,Oe.createElement("span",{className:me()("".concat(Ft,"-data-count"),cr==null?void 0:cr.count),style:Mr==null?void 0:Mr.count},en))}var jn=function(dr){var fr;at==null||at(dr),(fr=Tr.current)!==null&&fr!==void 0&&fr.textArea.style.height&&lr(!0)},Lr=!Ht.autoSize&&!Xt&&!he,rr=Oe.createElement(Ie.BaseInput,{value:zt,allowClear:he,handleReset:pt,suffix:Bt,prefixCls:Ft,classes:{affixWrapper:me()(Jt==null?void 0:Jt.affixWrapper,(yn={},(0,Be.Z)(yn,"".concat(Ft,"-show-count"),Xt),(0,Be.Z)(yn,"".concat(Ft,"-textarea-allow-clear"),he),yn))},disabled:Tt,focused:Vr,className:Hn,style:(0,He.Z)((0,He.Z)({},Rn),Dn&&!Lr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof en=="string"?en:void 0}},hidden:dn,inputElement:Oe.createElement(Ut,(0,de.Z)({},Ht,{onKeyDown:Dt,onChange:ut,onFocus:Vt,onBlur:We,onCompositionStart:$n,onCompositionEnd:qe,className:cr==null?void 0:cr.textarea,style:(0,He.Z)((0,He.Z)({},Mr==null?void 0:Mr.textarea),{},{resize:Rn==null?void 0:Rn.resize}),disabled:Tt,prefixCls:Ft,onResize:jn,ref:Tr}))});return rr}),_n=jt,rn=_n},1337:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return xe}});var de=se(1413),He=`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`,Be=`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`,Ve="".concat(He," ").concat(Be).split(/[\s\n]+/),ve="aria-",we="data-";function Ee(me,Ie){return me.indexOf(Ie)===0}function xe(me){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot;Ie===!1?ot={aria:!0,data:!0,attr:!0}:Ie===!0?ot={aria:!0}:ot=(0,de.Z)({},Ie);var Oe={};return Object.keys(me).forEach(function(St){(ot.aria&&(St==="role"||Ee(St,ve))||ot.data&&Ee(St,we)||ot.attr&&Ve.includes(St))&&(Oe[St]=me[St])}),Oe}},88386:function(En,Wt,se){(function(de){de(se(4631))})(function(de){de.defineOption("placeholder","",function(xe,me,Ie){var ot=Ie&&Ie!=de.Init;if(me&&!ot)xe.on("blur",ve),xe.on("change",we),xe.on("swapDoc",we),de.on(xe.getInputField(),"compositionupdate",xe.state.placeholderCompose=function(){Ve(xe)}),we(xe);else if(!me&&ot){xe.off("blur",ve),xe.off("change",we),xe.off("swapDoc",we),de.off(xe.getInputField(),"compositionupdate",xe.state.placeholderCompose),He(xe);var Oe=xe.getWrapperElement();Oe.className=Oe.className.replace(" CodeMirror-empty","")}me&&!xe.hasFocus()&&ve(xe)});function He(xe){xe.state.placeholder&&(xe.state.placeholder.parentNode.removeChild(xe.state.placeholder),xe.state.placeholder=null)}function Be(xe){He(xe);var me=xe.state.placeholder=document.createElement("pre");me.style.cssText="height: 0; overflow: visible",me.style.direction=xe.getOption("direction"),me.className="CodeMirror-placeholder CodeMirror-line-like";var Ie=xe.getOption("placeholder");typeof Ie=="string"&&(Ie=document.createTextNode(Ie)),me.appendChild(Ie),xe.display.lineSpace.insertBefore(me,xe.display.lineSpace.firstChild)}function Ve(xe){setTimeout(function(){var me=!1,Ie=xe.getInputField();Ie.nodeName=="TEXTAREA"?me=!Ie.value:xe.lineCount()==1&&(me=!/[^\u200b]/.test(Ie.querySelector(".CodeMirror-line").textContent)),me?Be(xe):He(xe)},20)}function ve(xe){Ee(xe)&&Be(xe)}function we(xe){var me=xe.getWrapperElement(),Ie=Ee(xe);me.className=me.className.replace(" CodeMirror-empty","")+(Ie?" CodeMirror-empty":""),Ie?Be(xe):He(xe)}function Ee(xe){return xe.lineCount()===1&&xe.getLine(0)===""}})},82801:function(En,Wt,se){(function(de){de(se(4631))})(function(de){var He={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Be=de.Pos;de.defineOption("autoCloseBrackets",!1,function(it,Je,Le){Le&&Le!=de.Init&&(it.removeKeyMap(ve),it.state.closeBrackets=null),Je&&(we(Ve(Je,"pairs")),it.state.closeBrackets=Je,it.addKeyMap(ve))});function Ve(it,Je){return Je=="pairs"&&typeof it=="string"?it:typeof it=="object"&&it[Je]!=null?it[Je]:He[Je]}var ve={Backspace:me,Enter:Ie};function we(it){for(var Je=0;Je<it.length;Je++){var Le=it.charAt(Je),gt="'"+Le+"'";ve[gt]||(ve[gt]=Ee(Le))}}we(He.pairs+"`");function Ee(it){return function(Je){return Oe(Je,it)}}function xe(it){var Je=it.state.closeBrackets;if(!Je||Je.override)return Je;var Le=it.getModeAt(it.getCursor());return Le.closeBrackets||Je}function me(it){var Je=xe(it);if(!Je||it.getOption("disableInput"))return de.Pass;for(var Le=Ve(Je,"pairs"),gt=it.listSelections(),qt=0;qt<gt.length;qt++){if(!gt[qt].empty())return de.Pass;var tt=St(it,gt[qt].head);if(!tt||Le.indexOf(tt)%2!=0)return de.Pass}for(var qt=gt.length-1;qt>=0;qt--){var ct=gt[qt].head;it.replaceRange("",Be(ct.line,ct.ch-1),Be(ct.line,ct.ch+1),"+delete")}}function Ie(it){var Je=xe(it),Le=Je&&Ve(Je,"explode");if(!Le||it.getOption("disableInput"))return de.Pass;for(var gt=it.listSelections(),qt=0;qt<gt.length;qt++){if(!gt[qt].empty())return de.Pass;var tt=St(it,gt[qt].head);if(!tt||Le.indexOf(tt)%2!=0)return de.Pass}it.operation(function(){var ct=it.lineSeparator()||`
|
|
|
`;it.replaceSelection(ct+ct,null),it.execCommand("goCharLeft"),gt=it.listSelections();for(var ke=0;ke<gt.length;ke++){var Se=gt[ke].head.line;it.indentLine(Se,null,!0),it.indentLine(Se+1,null,!0)}})}function ot(it){var Je=de.cmpPos(it.anchor,it.head)>0;return{anchor:new Be(it.anchor.line,it.anchor.ch+(Je?-1:1)),head:new Be(it.head.line,it.head.ch+(Je?1:-1))}}function Oe(it,Je){var Le=xe(it);if(!Le||it.getOption("disableInput"))return de.Pass;var gt=Ve(Le,"pairs"),qt=gt.indexOf(Je);if(qt==-1)return de.Pass;for(var tt=Ve(Le,"closeBefore"),ct=Ve(Le,"triples"),ke=gt.charAt(qt+1)==Je,Se=it.listSelections(),Ue=qt%2==0,je,_t=0;_t<Se.length;_t++){var vt=Se[_t],kt=vt.head,Xe,Kt=it.getRange(kt,Be(kt.line,kt.ch+1));if(Ue&&!vt.empty())Xe="surround";else if((ke||!Ue)&&Kt==Je)ke&&ft(it,kt)?Xe="both":ct.indexOf(Je)>=0&&it.getRange(kt,Be(kt.line,kt.ch+3))==Je+Je+Je?Xe="skipThree":Xe="skip";else if(ke&&kt.ch>1&&ct.indexOf(Je)>=0&&it.getRange(Be(kt.line,kt.ch-2),kt)==Je+Je){if(kt.ch>2&&/\bstring/.test(it.getTokenTypeAt(Be(kt.line,kt.ch-2))))return de.Pass;Xe="addFour"}else if(ke){var Ot=kt.ch==0?" ":it.getRange(Be(kt.line,kt.ch-1),kt);if(!de.isWordChar(Kt)&&Ot!=Je&&!de.isWordChar(Ot))Xe="both";else return de.Pass}else if(Ue&&(Kt.length===0||/\s/.test(Kt)||tt.indexOf(Kt)>-1))Xe="both";else return de.Pass;if(!je)je=Xe;else if(je!=Xe)return de.Pass}var bn=qt%2?gt.charAt(qt-1):Je,Nt=qt%2?Je:gt.charAt(qt+1);it.operation(function(){if(je=="skip")it.execCommand("goCharRight");else if(je=="skipThree")for(var sn=0;sn<3;sn++)it.execCommand("goCharRight");else if(je=="surround"){for(var Cn=it.getSelections(),sn=0;sn<Cn.length;sn++)Cn[sn]=bn+Cn[sn]+Nt;it.replaceSelections(Cn,"around"),Cn=it.listSelections().slice();for(var sn=0;sn<Cn.length;sn++)Cn[sn]=ot(Cn[sn]);it.setSelections(Cn)}else je=="both"?(it.replaceSelection(bn+Nt,null),it.triggerElectric(bn+Nt),it.execCommand("goCharLeft")):je=="addFour"&&(it.replaceSelection(bn+bn+bn+bn,"before"),it.execCommand("goCharRight"))})}function St(it,Je){var Le=it.getRange(Be(Je.line,Je.ch-1),Be(Je.line,Je.ch+1));return Le.length==2?Le:null}function ft(it,Je){var Le=it.getTokenAt(Be(Je.line,Je.ch+1));return/\bstring/.test(Le.type)&&Le.start==Je.ch&&(Je.ch==0||!/\bstring/.test(it.getTokenTypeAt(Je)))}})},57341:function(En,Wt,se){(function(de){de(se(4631),se(4786))})(function(de){de.defineOption("autoCloseTags",!1,function(me,Ie,ot){if(ot!=de.Init&&ot&&me.removeKeyMap("autoCloseTags"),!!Ie){var Oe={name:"autoCloseTags"};(typeof Ie!="object"||Ie.whenClosing!==!1)&&(Oe["'/'"]=function(St){return we(St)}),(typeof Ie!="object"||Ie.whenOpening!==!1)&&(Oe["'>'"]=function(St){return Ve(St)}),me.addKeyMap(Oe)}});var He=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Be=["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 Ve(me){if(me.getOption("disableInput"))return de.Pass;for(var Ie=me.listSelections(),ot=[],Oe=me.getOption("autoCloseTags"),St=0;St<Ie.length;St++){if(!Ie[St].empty())return de.Pass;var ft=Ie[St].head,it=me.getTokenAt(ft),Je=de.innerMode(me.getMode(),it.state),Le=Je.state,gt=Je.mode.xmlCurrentTag&&Je.mode.xmlCurrentTag(Le),qt=gt&>.name;if(!qt)return de.Pass;var tt=Je.mode.configuration=="html",ct=typeof Oe=="object"&&Oe.dontCloseTags||tt&&He,ke=typeof Oe=="object"&&Oe.indentTags||tt&&Be;it.end>ft.ch&&(qt=qt.slice(0,qt.length-it.end+ft.ch));var Se=qt.toLowerCase();if(!qt||it.type=="string"&&(it.end!=ft.ch||!/[\"\']/.test(it.string.charAt(it.string.length-1))||it.string.length==1)||it.type=="tag"&>.close||it.string.indexOf("/")==ft.ch-it.start-1||ct&&Ee(ct,Se)>-1||xe(me,Je.mode.xmlCurrentContext&&Je.mode.xmlCurrentContext(Le)||[],qt,ft,!0))return de.Pass;var Ue=typeof Oe=="object"&&Oe.emptyTags;if(Ue&&Ee(Ue,qt)>-1){ot[St]={text:"/>",newPos:de.Pos(ft.line,ft.ch+2)};continue}var je=ke&&Ee(ke,Se)>-1;ot[St]={indent:je,text:">"+(je?`
|
|
|
|
|
|
`:"")+"</"+qt+">",newPos:je?de.Pos(ft.line+1,0):de.Pos(ft.line,ft.ch+1)}}for(var _t=typeof Oe=="object"&&Oe.dontIndentOnAutoClose,St=Ie.length-1;St>=0;St--){var vt=ot[St];me.replaceRange(vt.text,Ie[St].head,Ie[St].anchor,"+insert");var kt=me.listSelections().slice(0);kt[St]={head:vt.newPos,anchor:vt.newPos},me.setSelections(kt),!_t&&vt.indent&&(me.indentLine(vt.newPos.line,null,!0),me.indentLine(vt.newPos.line+1,null,!0))}}function ve(me,Ie){for(var ot=me.listSelections(),Oe=[],St=Ie?"/":"</",ft=me.getOption("autoCloseTags"),it=typeof ft=="object"&&ft.dontIndentOnSlash,Je=0;Je<ot.length;Je++){if(!ot[Je].empty())return de.Pass;var Le=ot[Je].head,gt=me.getTokenAt(Le),qt=de.innerMode(me.getMode(),gt.state),tt=qt.state;if(Ie&&(gt.type=="string"||gt.string.charAt(0)!="<"||gt.start!=Le.ch-1))return de.Pass;var ct,ke=qt.mode.name!="xml"&&me.getMode().name=="htmlmixed";if(ke&&qt.mode.name=="javascript")ct=St+"script";else if(ke&&qt.mode.name=="css")ct=St+"style";else{var Se=qt.mode.xmlCurrentContext&&qt.mode.xmlCurrentContext(tt);if(!Se||Se.length&&xe(me,Se,Se[Se.length-1],Le))return de.Pass;ct=St+Se[Se.length-1]}me.getLine(Le.line).charAt(gt.end)!=">"&&(ct+=">"),Oe[Je]=ct}if(me.replaceSelections(Oe),ot=me.listSelections(),!it)for(var Je=0;Je<ot.length;Je++)(Je==ot.length-1||ot[Je].head.line<ot[Je+1].head.line)&&me.indentLine(ot[Je].head.line)}function we(me){return me.getOption("disableInput")?de.Pass:ve(me,!0)}de.commands.closeTag=function(me){return ve(me)};function Ee(me,Ie){if(me.indexOf)return me.indexOf(Ie);for(var ot=0,Oe=me.length;ot<Oe;++ot)if(me[ot]==Ie)return ot;return-1}function xe(me,Ie,ot,Oe,St){if(!de.scanForClosingTag)return!1;var ft=Math.min(me.lastLine()+1,Oe.line+500),it=de.scanForClosingTag(me,Oe,null,ft);if(!it||it.tag!=ot)return!1;for(var Je=St?1:0,Le=Ie.length-1;Le>=0&&Ie[Le]==ot;Le--)++Je;Oe=it.to;for(var Le=1;Le<Je;Le++){var gt=de.scanForClosingTag(me,Oe,null,ft);if(!gt||gt.tag!=ot)return!1;Oe=gt.to}return!0}})},4786:function(En,Wt,se){(function(de){de(se(4631))})(function(de){"use strict";var He=de.Pos;function Be(Le,gt){return Le.line-gt.line||Le.ch-gt.ch}var Ve="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ve=Ve+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",we=new RegExp("<(/?)(["+Ve+"]["+ve+"]*)","g");function Ee(Le,gt,qt,tt){this.line=gt,this.ch=qt,this.cm=Le,this.text=Le.getLine(gt),this.min=tt?Math.max(tt.from,Le.firstLine()):Le.firstLine(),this.max=tt?Math.min(tt.to-1,Le.lastLine()):Le.lastLine()}function xe(Le,gt){var qt=Le.cm.getTokenTypeAt(He(Le.line,gt));return qt&&/\btag\b/.test(qt)}function me(Le){if(!(Le.line>=Le.max))return Le.ch=0,Le.text=Le.cm.getLine(++Le.line),!0}function Ie(Le){if(!(Le.line<=Le.min))return Le.text=Le.cm.getLine(--Le.line),Le.ch=Le.text.length,!0}function ot(Le){for(;;){var gt=Le.text.indexOf(">",Le.ch);if(gt==-1){if(me(Le))continue;return}if(!xe(Le,gt+1)){Le.ch=gt+1;continue}var qt=Le.text.lastIndexOf("/",gt),tt=qt>-1&&!/\S/.test(Le.text.slice(qt+1,gt));return Le.ch=gt+1,tt?"selfClose":"regular"}}function Oe(Le){for(;;){var gt=Le.ch?Le.text.lastIndexOf("<",Le.ch-1):-1;if(gt==-1){if(Ie(Le))continue;return}if(!xe(Le,gt+1)){Le.ch=gt;continue}we.lastIndex=gt,Le.ch=gt;var qt=we.exec(Le.text);if(qt&&qt.index==gt)return qt}}function St(Le){for(;;){we.lastIndex=Le.ch;var gt=we.exec(Le.text);if(!gt){if(me(Le))continue;return}if(!xe(Le,gt.index+1)){Le.ch=gt.index+1;continue}return Le.ch=gt.index+gt[0].length,gt}}function ft(Le){for(;;){var gt=Le.ch?Le.text.lastIndexOf(">",Le.ch-1):-1;if(gt==-1){if(Ie(Le))continue;return}if(!xe(Le,gt+1)){Le.ch=gt;continue}var qt=Le.text.lastIndexOf("/",gt),tt=qt>-1&&!/\S/.test(Le.text.slice(qt+1,gt));return Le.ch=gt+1,tt?"selfClose":"regular"}}function it(Le,gt){for(var qt=[];;){var tt=St(Le),ct,ke=Le.line,Se=Le.ch-(tt?tt[0].length:0);if(!tt||!(ct=ot(Le)))return;if(ct!="selfClose")if(tt[1]){for(var Ue=qt.length-1;Ue>=0;--Ue)if(qt[Ue]==tt[2]){qt.length=Ue;break}if(Ue<0&&(!gt||gt==tt[2]))return{tag:tt[2],from:He(ke,Se),to:He(Le.line,Le.ch)}}else qt.push(tt[2])}}function Je(Le,gt){for(var qt=[];;){var tt=ft(Le);if(!tt)return;if(tt=="selfClose"){Oe(Le);continue}var ct=Le.line,ke=Le.ch,Se=Oe(Le);if(!Se)return;if(Se[1])qt.push(Se[2]);else{for(var Ue=qt.length-1;Ue>=0;--Ue)if(qt[Ue]==Se[2]){qt.length=Ue;break}if(Ue<0&&(!gt||gt==Se[2]))return{tag:Se[2],from:He(Le.line,Le.ch),to:He(ct,ke)}}}}de.registerHelper("fold","xml",function(Le,gt){for(var qt=new Ee(Le,gt.line,0);;){var tt=St(qt);if(!tt||qt.line!=gt.line)return;var ct=ot(qt);if(!ct)return;if(!tt[1]&&ct!="selfClose"){var ke=He(qt.line,qt.ch),Se=it(qt,tt[2]);return Se&&Be(Se.from,ke)>0?{from:ke,to:Se.from}:null}}}),de.findMatchingTag=function(Le,gt,qt){var tt=new Ee(Le,gt.line,gt.ch,qt);if(!(tt.text.indexOf(">")==-1&&tt.text.indexOf("<")==-1)){var ct=ot(tt),ke=ct&&He(tt.line,tt.ch),Se=ct&&Oe(tt);if(!(!ct||!Se||Be(tt,gt)>0)){var Ue={from:He(tt.line,tt.ch),to:ke,tag:Se[2]};return ct=="selfClose"?{open:Ue,close:null,at:"open"}:Se[1]?{open:Je(tt,Se[2]),close:Ue,at:"close"}:(tt=new Ee(Le,ke.line,ke.ch,qt),{open:Ue,close:it(tt,Se[2]),at:"open"})}}},de.findEnclosingTag=function(Le,gt,qt,tt){for(var ct=new Ee(Le,gt.line,gt.ch,qt);;){var ke=Je(ct,tt);if(!ke)break;var Se=new Ee(Le,gt.line,gt.ch,qt),Ue=it(Se,ke.tag);if(Ue)return{open:ke,close:Ue}}},de.scanForClosingTag=function(Le,gt,qt,tt){var ct=new Ee(Le,gt.line,gt.ch,tt?{from:0,to:tt}:null);return it(ct,qt)}})},4631:function(En){(function(Wt,se){En.exports=se()})(this,function(){"use strict";var Wt=navigator.userAgent,se=navigator.platform,de=/gecko\/\d/i.test(Wt),He=/MSIE \d/.test(Wt),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt),Ve=/Edge\/(\d+)/.exec(Wt),ve=He||Be||Ve,we=ve&&(He?document.documentMode||6:+(Ve||Be)[1]),Ee=!Ve&&/WebKit\//.test(Wt),xe=Ee&&/Qt\/\d+\.\d+/.test(Wt),me=!Ve&&/Chrome\//.test(Wt),Ie=/Opera\//.test(Wt),ot=/Apple Computer/.test(navigator.vendor),Oe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Wt),St=/PhantomJS/.test(Wt),ft=!Ve&&/AppleWebKit/.test(Wt)&&/Mobile\/\w+/.test(Wt),it=/Android/.test(Wt),Je=ft||it||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Wt),Le=ft||/Mac/.test(se),gt=/\bCrOS\b/.test(Wt),qt=/win/i.test(se),tt=Ie&&Wt.match(/Version\/(\d*\.\d*)/);tt&&(tt=Number(tt[1])),tt&&tt>=15&&(Ie=!1,Ee=!0);var ct=Le&&(xe||Ie&&(tt==null||tt<12.11)),ke=de||ve&&we>=9;function Se(x){return new RegExp("(^|\\s)"+x+"(?:$|\\s)\\s*")}var Ue=function(x,z){var ne=x.className,te=Se(z).exec(ne);if(te){var ie=ne.slice(te.index+te[0].length);x.className=ne.slice(0,te.index)+(ie?te[1]+ie:"")}};function je(x){for(var z=x.childNodes.length;z>0;--z)x.removeChild(x.firstChild);return x}function _t(x,z){return je(x).appendChild(z)}function vt(x,z,ne,te){var ie=document.createElement(x);if(ne&&(ie.className=ne),te&&(ie.style.cssText=te),typeof z=="string")ie.appendChild(document.createTextNode(z));else if(z)for(var ce=0;ce<z.length;++ce)ie.appendChild(z[ce]);return ie}function kt(x,z,ne,te){var ie=vt(x,z,ne,te);return ie.setAttribute("role","presentation"),ie}var Xe;document.createRange?Xe=function(x,z,ne,te){var ie=document.createRange();return ie.setEnd(te||x,ne),ie.setStart(x,z),ie}:Xe=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 Ot(){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 bn(x,z){var ne=x.className;Se(z).test(ne)||(x.className+=(ne?" ":"")+z)}function Nt(x,z){for(var ne=x.split(" "),te=0;te<ne.length;te++)ne[te]&&!Se(ne[te]).test(z)&&(z+=" "+ne[te]);return z}var sn=function(x){x.select()};ft?sn=function(x){x.selectionStart=0,x.selectionEnd=x.value.length}:ve&&(sn=function(x){try{x.select()}catch(z){}});function Cn(x){var z=Array.prototype.slice.call(arguments,1);return function(){return x.apply(null,z)}}function or(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 Qe(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 _e=x.indexOf(" ",ce);if(_e<0||_e>=z)return ye+(z-ce);ye+=_e-ce,ye+=ne-ye%ne,ce=_e+1}}var Ce=function(){this.id=null,this.f=null,this.time=0,this.handler=Cn(this.onTimeout,this)};Ce.prototype.onTimeout=function(x){x.id=0,x.time<=+new Date?x.f():setTimeout(x.handler,x.time-+new Date)},Ce.prototype.set=function(x,z){this.f=z;var ne=+new Date+x;(!this.id||ne<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,x),this.time=ne)};function ht(x,z){for(var ne=0;ne<x.length;++ne)if(x[ne]==z)return ne;return-1}var Ut=50,Yt={toString:function(){return"CodeMirror.Pass"}},Ge={scroll:!1},rt={origin:"*mouse"},jt={origin:"+move"};function _n(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 rn=[""];function $t(x){for(;rn.length<=x;)rn.push(Zt(rn)+" ");return rn[x]}function Zt(x){return x[x.length-1]}function yn(x,z){for(var ne=[],te=0;te<x.length;te++)ne[te]=z(x[te],te);return ne}function ln(x,z,ne){for(var te=0,ie=ne(z);te<x.length&&ne(x[te])<=ie;)te++;x.splice(te,0,z)}function Ae(){}function ue(x,z){var ne;return Object.create?ne=Object.create(x):(Ae.prototype=x,ne=new Ae),z&&or(z,ne),ne}var le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pe(x){return/\w/.test(x)||x>"\x80"&&(x.toUpperCase()!=x.toLowerCase()||le.test(x))}function he(x,z){return z?z.source.indexOf("\\w")>-1&&pe(x)?!0:z.test(x):pe(x)}function oe(x){for(var z in x)if(x.hasOwnProperty(z)&&x[z])return!1;return!0}var Te=/[\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 Ye(x){return x.charCodeAt(0)>=768&&Te.test(x)}function Lt(x,z,ne){for(;(ne<0?z>0:z<x.length)&&Ye(x.charAt(z));)z+=ne;return z}function Rt(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 Ft(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 Jt=null;function Xt(x,z,ne){var te;Jt=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:Jt=ie),ce.from==z&&(ce.from!=ce.to&&ne!="before"?te=ie:Jt=ie)}return te!=null?te:Jt}var Hn=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]/,_e=/[1n]/;function Pe($e,bt,Pt){this.level=$e,this.from=bt,this.to=Pt}return function($e,bt){var Pt=bt=="ltr"?"L":"R";if($e.length==0||bt=="ltr"&&!te.test($e))return!1;for(var gn=$e.length,on=[],Qn=0;Qn<gn;++Qn)on.push(ne($e.charCodeAt(Qn)));for(var yr=0,$r=Pt;yr<gn;++yr){var Xr=on[yr];Xr=="m"?on[yr]=$r:$r=Xr}for(var ai=0,Zr=Pt;ai<gn;++ai){var oi=on[ai];oi=="1"&&Zr=="r"?on[ai]="n":ce.test(oi)&&(Zr=oi,oi=="r"&&(on[ai]="R"))}for(var Ki=1,ji=on[0];Ki<gn-1;++Ki){var ba=on[Ki];ba=="+"&&ji=="1"&&on[Ki+1]=="1"?on[Ki]="1":ba==","&&ji==on[Ki+1]&&(ji=="1"||ji=="n")&&(on[Ki]=ji),ji=ba}for(var to=0;to<gn;++to){var Wo=on[to];if(Wo==",")on[to]="N";else if(Wo=="%"){var bo=void 0;for(bo=to+1;bo<gn&&on[bo]=="%";++bo);for(var us=to&&on[to-1]=="!"||bo<gn&&on[bo]=="1"?"1":"N",ds=to;ds<bo;++ds)on[ds]=us;to=bo-1}}for(var Do=0,fs=Pt;Do<gn;++Do){var sa=on[Do];fs=="L"&&sa=="1"?on[Do]="L":ce.test(sa)&&(fs=sa)}for(var So=0;So<gn;++So)if(ie.test(on[So])){var xo=void 0;for(xo=So+1;xo<gn&&ie.test(on[xo]);++xo);for(var Co=(So?on[So-1]:Pt)=="L",ko=(xo<gn?on[xo]:Pt)=="L",Wl=Co==ko?Co?"L":"R":Pt,ys=So;ys<xo;++ys)on[ys]=Wl;So=xo-1}for(var Go=[],Wa,$o=0;$o<gn;)if(ye.test(on[$o])){var Mu=$o;for(++$o;$o<gn&&ye.test(on[$o]);++$o);Go.push(new Pe(0,Mu,$o))}else{var sl=$o,xl=Go.length,Zs=bt=="rtl"?1:0;for(++$o;$o<gn&&on[$o]!="L";++$o);for(var Po=sl;Po<$o;)if(_e.test(on[Po])){sl<Po&&(Go.splice(xl,0,new Pe(1,sl,Po)),xl+=Zs);var Ul=Po;for(++Po;Po<$o&&_e.test(on[Po]);++Po);Go.splice(xl,0,new Pe(2,Ul,Po)),xl+=Zs,sl=Po}else++Po;sl<$o&&Go.splice(xl,0,new Pe(1,sl,$o))}return bt=="ltr"&&(Go[0].level==1&&(Wa=$e.match(/^\s+/))&&(Go[0].from=Wa[0].length,Go.unshift(new Pe(0,0,Wa[0].length))),Zt(Go).level==1&&(Wa=$e.match(/\s+$/))&&(Zt(Go).to-=Wa[0].length,Go.push(new Pe(0,gn-Wa[0].length,gn)))),bt=="rtl"?Go.reverse():Go}}();function Rn(x,z){var ne=x.order;return ne==null&&(ne=x.order=Hn(x.text,z)),ne}var Tt=[],dn=function(x,z,ne){if(x.addEventListener)x.addEventListener(z,ne,!1);else if(x.attachEvent)x.attachEvent("on"+z,ne);else{var te=x._handlers||(x._handlers={});te[z]=(te[z]||Tt).concat(ne)}};function cr(x,z){return x._handlers&&x._handlers[z]||Tt}function Mr(x,z,ne){if(x.removeEventListener)x.removeEventListener(z,ne,!1);else if(x.detachEvent)x.detachEvent("on"+z,ne);else{var te=x._handlers,ie=te&&te[z];if(ie){var ce=ht(ie,ne);ce>-1&&(te[z]=ie.slice(0,ce).concat(ie.slice(ce+1)))}}}function at(x,z){var ne=cr(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 Ht(x,z,ne){return typeof z=="string"&&(z={type:z,preventDefault:function(){this.defaultPrevented=!0}}),at(x,ne||z.type,x,z),Er(z)||z.codemirrorIgnore}function Fn(x){var z=x._handlers&&x._handlers.cursorActivity;if(z)for(var ne=x.curOp.cursorActivityHandlers||(x.curOp.cursorActivityHandlers=[]),te=0;te<z.length;++te)ht(ne,z[te])==-1&&ne.push(z[te])}function er(x,z){return cr(x,z).length>0}function nr(x){x.prototype.on=function(z,ne){dn(this,z,ne)},x.prototype.off=function(z,ne){Mr(this,z,ne)}}function Sr(x){x.preventDefault?x.preventDefault():x.returnValue=!1}function Tr(x){x.stopPropagation?x.stopPropagation():x.cancelBubble=!0}function Er(x){return x.defaultPrevented!=null?x.defaultPrevented:x.returnValue==!1}function Or(x){Sr(x),Tr(x)}function Vr(x){return x.target||x.srcElement}function ur(x){var z=x.which;return z==null&&(x.button&1?z=1:x.button&2?z=3:x.button&4&&(z=2)),Le&&x.ctrlKey&&z==1&&(z=3),z}var si=function(){if(ve&&we<9)return!1;var x=vt("div");return"draggable"in x||"dragDrop"in x}(),Li;function Bi(x){if(Li==null){var z=vt("span","\u200B");_t(x,vt("span",[z,document.createTextNode("x")])),x.firstChild.offsetHeight!=0&&(Li=z.offsetWidth<=1&&z.offsetHeight>2&&!(ve&&we<8))}var ne=Li?vt("span","\u200B"):vt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ne.setAttribute("cm-text",""),ne}var Hi;function ri(x){if(Hi!=null)return Hi;var z=_t(x,document.createTextNode("A\u062EA")),ne=Xe(z,0,1).getBoundingClientRect(),te=Xe(z,1,2).getBoundingClientRect();return je(x),!ne||ne.left==ne.right?!1:Hi=te.right-ne.right<3}var yt=`
|
|
|
|
|
|
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/)},Mn=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},An=function(){var x=vt("div");return"oncopy"in x?!0:(x.setAttribute("oncopy","return;"),typeof x.oncopy=="function")}(),Dn=null;function lr(x){if(Dn!=null)return Dn;var z=_t(x,vt("span","x")),ne=z.getBoundingClientRect(),te=Xe(z,0,1).getBoundingClientRect();return Dn=Math.abs(ne.left-te.left)>1}var qn={},pr={};function $n(x,z){arguments.length>2&&(z.dependencies=Array.prototype.slice.call(arguments,2)),qn[x]=z}function qe(x,z){pr[x]=z}function ut(x){if(typeof x=="string"&&pr.hasOwnProperty(x))x=pr[x];else if(x&&typeof x.name=="string"&&pr.hasOwnProperty(x.name)){var z=pr[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 ut("application/xml");if(typeof x=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(x))return ut("application/json")}return typeof x=="string"?{name:x}:x||{name:"null"}}function Dt(x,z){z=ut(z);var ne=qn[z.name];if(!ne)return Dt(x,"text/plain");var te=ne(x,z);if(Vt.hasOwnProperty(z.name)){var ie=Vt[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 Vt={};function We(x,z){var ne=Vt.hasOwnProperty(x)?Vt[x]:Vt[x]={};or(z,ne)}function pt(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 zt(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 Bt(x,z,ne){return x.startState?x.startState(z,ne):!0}var en=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};en.prototype.eol=function(){return this.pos>=this.string.length},en.prototype.sol=function(){return this.pos==this.lineStart},en.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},en.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},en.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},en.prototype.eatWhile=function(x){for(var z=this.pos;this.eat(x););return this.pos>z},en.prototype.eatSpace=function(){for(var x=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>x},en.prototype.skipToEnd=function(){this.pos=this.string.length},en.prototype.skipTo=function(x){var z=this.string.indexOf(x,this.pos);if(z>-1)return this.pos=z,!0},en.prototype.backUp=function(x){this.pos-=x},en.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},en.prototype.indentation=function(){return Qe(this.string,null,this.tabSize)-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},en.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)}},en.prototype.current=function(){return this.string.slice(this.start,this.pos)},en.prototype.hideFirstChars=function(x,z){this.lineStart+=x;try{return z()}finally{this.lineStart-=x}},en.prototype.lookAhead=function(x){var z=this.lineOracle;return z&&z.lookAhead(x)},en.prototype.baseToken=function(){var x=this.lineOracle;return x&&x.baseToken(this.pos)};function nn(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 jn(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 Lr(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 tr(x){if(x.parent==null)return null;for(var z=x.parent,ne=ht(z.lines,x),te=z.parent;te;z=te,te=te.parent)for(var ie=0;te.children[ie]!=z;++ie)ne+=te.children[ie].chunkSize();return ne+z.first}function dr(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 _e=x.lines[ye],Pe=_e.height;if(z<Pe)break;z-=Pe}return ne+ye}function fr(x,z){return z>=x.first&&z<x.first+x.size}function mt(x,z){return String(x.lineNumberFormatter(z+x.firstLineNumber))}function st(x,z,ne){if(ne===void 0&&(ne=null),!(this instanceof st))return new st(x,z,ne);this.line=x,this.ch=z,this.sticky=ne}function Ct(x,z){return x.line-z.line||x.ch-z.ch}function fn(x,z){return x.sticky==z.sticky&&Ct(x,z)==0}function Bn(x){return st(x.line,x.ch)}function hn(x,z){return Ct(x,z)<0?z:x}function vn(x,z){return Ct(x,z)<0?x:z}function xn(x,z){return Math.max(x.first,Math.min(z,x.first+x.size-1))}function Nn(x,z){if(z.line<x.first)return st(x.first,0);var ne=x.first+x.size-1;return z.line>ne?st(ne,nn(x,ne).text.length):hr(z,nn(x,z.line).text.length)}function hr(x,z){var ne=x.ch;return ne==null||ne>z?st(x.line,z):ne<0?st(x.line,0):x}function tn(x,z){for(var ne=[],te=0;te<z.length;te++)ne[te]=Nn(x,z[te]);return ne}var Qr=function(x,z){this.state=x,this.lookAhead=z},Ur=function(x,z,ne,te){this.state=z,this.doc=x,this.line=ne,this.maxLookAhead=te||0,this.baseTokens=null,this.baseTokenPos=1};Ur.prototype.lookAhead=function(x){var z=this.doc.getLine(this.line+x);return z!=null&&x>this.maxLookAhead&&(this.maxLookAhead=x),z},Ur.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}},Ur.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ur.fromSaved=function(x,z,ne){return z instanceof Qr?new Ur(x,pt(x.mode,z.state),ne,z.lookAhead):new Ur(x,pt(x.mode,z),ne)},Ur.prototype.save=function(x){var z=x!==!1?pt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Qr(z,this.maxLookAhead):z};function $i(x,z,ne,te){var ie=[x.state.modeGen],ce={};vi(x,z.text,x.doc.mode,ne,function($e,bt){return ie.push($e,bt)},ce,te);for(var ye=ne.state,_e=function($e){ne.baseTokens=ie;var bt=x.state.overlays[$e],Pt=1,gn=0;ne.state=!0,vi(x,z.text,bt.mode,ne,function(on,Qn){for(var yr=Pt;gn<on;){var $r=ie[Pt];$r>on&&ie.splice(Pt,1,on,ie[Pt+1],$r),Pt+=2,gn=Math.min(on,$r)}if(Qn)if(bt.opaque)ie.splice(yr,Pt-yr,on,"overlay "+Qn),Pt=yr+2;else for(;yr<Pt;yr+=2){var Xr=ie[yr+1];ie[yr+1]=(Xr?Xr+" ":"")+"overlay "+Qn}},ce),ne.state=ye,ne.baseTokens=null,ne.baseTokenPos=1},Pe=0;Pe<x.state.overlays.length;++Pe)_e(Pe);return{styles:ie,classes:ce.bgClass||ce.textClass?ce:null}}function Ai(x,z,ne){if(!z.styles||z.styles[0]!=x.state.modeGen){var te=gi(x,tr(z)),ie=z.text.length>x.options.maxHighlightLength&&pt(x.doc.mode,te.state),ce=$i(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 gi(x,z,ne){var te=x.doc,ie=x.display;if(!te.mode.startState)return new Ur(te,!0,z);var ce=Zi(x,z,ne),ye=ce>te.first&&nn(te,ce-1).stateAfter,_e=ye?Ur.fromSaved(te,ye,ce):new Ur(te,Bt(te.mode),ce);return te.iter(ce,z,function(Pe){qi(x,Pe.text,_e);var $e=_e.line;Pe.stateAfter=$e==z-1||$e%5==0||$e>=ie.viewFrom&&$e<ie.viewTo?_e.save():null,_e.nextLine()}),ne&&(te.modeFrontier=_e.line),_e}function qi(x,z,ne,te){var ie=x.doc.mode,ce=new en(z,x.options.tabSize,ne);for(ce.start=ce.pos=te||0,z==""&&xi(ie,ne.state);!ce.eol();)li(ie,ce,ne.state),ce.start=ce.pos}function xi(x,z){if(x.blankLine)return x.blankLine(z);if(x.innerMode){var ne=zt(x,z);if(ne.mode.blankLine)return ne.mode.blankLine(ne.state)}}function li(x,z,ne,te){for(var ie=0;ie<10;ie++){te&&(te[0]=zt(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 Ni=function(x,z,ne){this.start=x.start,this.end=x.pos,this.string=x.current(),this.type=z||null,this.state=ne};function Gi(x,z,ne,te){var ie=x.doc,ce=ie.mode,ye;z=Nn(ie,z);var _e=nn(ie,z.line),Pe=gi(x,z.line,ne),$e=new en(_e.text,x.options.tabSize,Pe),bt;for(te&&(bt=[]);(te||$e.pos<z.ch)&&!$e.eol();)$e.start=$e.pos,ye=li(ce,$e,Pe.state),te&&bt.push(new Ni($e,ye,pt(ie.mode,Pe.state)));return te?bt:new Ni($e,ye,Pe.state)}function qr(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 vi(x,z,ne,te,ie,ce,ye){var _e=ne.flattenSpans;_e==null&&(_e=x.options.flattenSpans);var Pe=0,$e=null,bt=new en(z,x.options.tabSize,te),Pt,gn=x.options.addModeClass&&[null];for(z==""&&qr(xi(ne,te.state),ce);!bt.eol();){if(bt.pos>x.options.maxHighlightLength?(_e=!1,ye&&qi(x,z,te,bt.pos),bt.pos=z.length,Pt=null):Pt=qr(li(ne,bt,te.state,gn),ce),gn){var on=gn[0].name;on&&(Pt="m-"+(Pt?on+" "+Pt:on))}if(!_e||$e!=Pt){for(;Pe<bt.start;)Pe=Math.min(bt.start,Pe+5e3),ie(Pe,$e);$e=Pt}bt.start=bt.pos}for(;Pe<bt.pos;){var Qn=Math.min(bt.pos,Pe+5e3);ie(Qn,$e),Pe=Qn}}function Zi(x,z,ne){for(var te,ie,ce=x.doc,ye=ne?-1:z-(x.doc.mode.innerMode?1e3:100),_e=z;_e>ye;--_e){if(_e<=ce.first)return ce.first;var Pe=nn(ce,_e-1),$e=Pe.stateAfter;if($e&&(!ne||_e+($e instanceof Qr?$e.lookAhead:0)<=ce.modeFrontier))return _e;var bt=Qe(Pe.text,null,x.options.tabSize);(ie==null||te>bt)&&(ie=_e-1,te=bt)}return ie}function la(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=nn(x,te).stateAfter;if(ie&&(!(ie instanceof Qr)||te+ie.lookAhead<z)){ne=te+1;break}}x.highlightFrontier=Math.min(x.highlightFrontier,ne)}}var ta=!1,ii=!1;function Et(){ta=!0}function wt(){ii=!0}function Qt(x,z,ne){this.marker=x,this.from=z,this.to=ne}function mn(x,z){if(x)for(var ne=0;ne<x.length;++ne){var te=x[ne];if(te.marker==z)return te}}function On(x,z){for(var ne,te=0;te<x.length;++te)x[te]!=z&&(ne||(ne=[])).push(x[te]);return ne}function vr(x,z){x.markedSpans=x.markedSpans?x.markedSpans.concat([z]):[z],z.marker.attachLine(x)}function Ir(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=ce.marker,_e=ce.from==null||(ye.inclusiveLeft?ce.from<=z:ce.from<z);if(_e||ce.from==z&&ye.type=="bookmark"&&(!ne||!ce.marker.insertLeft)){var Pe=ce.to==null||(ye.inclusiveRight?ce.to>=z:ce.to>z);(te||(te=[])).push(new Qt(ye,ce.from,Pe?null:ce.to))}}return te}function Wr(x,z,ne){var te;if(x)for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=ce.marker,_e=ce.to==null||(ye.inclusiveRight?ce.to>=z:ce.to>z);if(_e||ce.from==z&&ye.type=="bookmark"&&(!ne||ce.marker.insertLeft)){var Pe=ce.from==null||(ye.inclusiveLeft?ce.from<=z:ce.from<z);(te||(te=[])).push(new Qt(ye,Pe?null:ce.from-z,ce.to==null?null:ce.to-z))}}return te}function Gr(x,z){if(z.full)return null;var ne=fr(x,z.from.line)&&nn(x,z.from.line).markedSpans,te=fr(x,z.to.line)&&nn(x,z.to.line).markedSpans;if(!ne&&!te)return null;var ie=z.from.ch,ce=z.to.ch,ye=Ct(z.from,z.to)==0,_e=Ir(ne,ie,ye),Pe=Wr(te,ce,ye),$e=z.text.length==1,bt=Zt(z.text).length+($e?ie:0);if(_e)for(var Pt=0;Pt<_e.length;++Pt){var gn=_e[Pt];if(gn.to==null){var on=mn(Pe,gn.marker);on?$e&&(gn.to=on.to==null?null:on.to+bt):gn.to=ie}}if(Pe)for(var Qn=0;Qn<Pe.length;++Qn){var yr=Pe[Qn];if(yr.to!=null&&(yr.to+=bt),yr.from==null){var $r=mn(_e,yr.marker);$r||(yr.from=bt,$e&&(_e||(_e=[])).push(yr))}else yr.from+=bt,$e&&(_e||(_e=[])).push(yr)}_e&&(_e=Hr(_e)),Pe&&Pe!=_e&&(Pe=Hr(Pe));var Xr=[_e];if(!$e){var ai=z.text.length-2,Zr;if(ai>0&&_e)for(var oi=0;oi<_e.length;++oi)_e[oi].to==null&&(Zr||(Zr=[])).push(new Qt(_e[oi].marker,null,null));for(var Ki=0;Ki<ai;++Ki)Xr.push(Zr);Xr.push(Pe)}return Xr}function Hr(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 ni(x,z,ne){var te=null;if(x.iter(z.line,ne.line+1,function(on){if(on.markedSpans)for(var Qn=0;Qn<on.markedSpans.length;++Qn){var yr=on.markedSpans[Qn].marker;yr.readOnly&&(!te||ht(te,yr)==-1)&&(te||(te=[])).push(yr)}}),!te)return null;for(var ie=[{from:z,to:ne}],ce=0;ce<te.length;++ce)for(var ye=te[ce],_e=ye.find(0),Pe=0;Pe<ie.length;++Pe){var $e=ie[Pe];if(!(Ct($e.to,_e.from)<0||Ct($e.from,_e.to)>0)){var bt=[Pe,1],Pt=Ct($e.from,_e.from),gn=Ct($e.to,_e.to);(Pt<0||!ye.inclusiveLeft&&!Pt)&&bt.push({from:$e.from,to:_e.from}),(gn>0||!ye.inclusiveRight&&!gn)&&bt.push({from:_e.to,to:$e.to}),ie.splice.apply(ie,bt),Pe+=bt.length-3}}return ie}function yi(x){var z=x.markedSpans;if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.detachLine(x);x.markedSpans=null}}function Ar(x,z){if(z){for(var ne=0;ne<z.length;++ne)z[ne].marker.attachLine(x);x.markedSpans=z}}function pi(x){return x.inclusiveLeft?-1:0}function Ti(x){return x.inclusiveRight?1:0}function Ei(x,z){var ne=x.lines.length-z.lines.length;if(ne!=0)return ne;var te=x.find(),ie=z.find(),ce=Ct(te.from,ie.from)||pi(x)-pi(z);if(ce)return-ce;var ye=Ct(te.to,ie.to)||Ti(x)-Ti(z);return ye||z.id-x.id}function De(x,z){var ne=ii&&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||Ei(te,ie.marker)<0)&&(te=ie.marker);return te}function Fe(x){return De(x,!0)}function ze(x){return De(x,!1)}function Ze(x,z){var ne=ii&&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||Ei(te,ce.marker)<0)&&(te=ce.marker)}return te}function nt(x,z,ne,te,ie){var ce=nn(x,z),ye=ii&&ce.markedSpans;if(ye)for(var _e=0;_e<ye.length;++_e){var Pe=ye[_e];if(Pe.marker.collapsed){var $e=Pe.marker.find(0),bt=Ct($e.from,ne)||pi(Pe.marker)-pi(ie),Pt=Ct($e.to,te)||Ti(Pe.marker)-Ti(ie);if(!(bt>=0&&Pt<=0||bt<=0&&Pt>=0)&&(bt<=0&&(Pe.marker.inclusiveRight&&ie.inclusiveLeft?Ct($e.to,ne)>=0:Ct($e.to,ne)>0)||bt>=0&&(Pe.marker.inclusiveRight&&ie.inclusiveLeft?Ct($e.from,te)<=0:Ct($e.from,te)<0)))return!0}}}function lt(x){for(var z;z=Fe(x);)x=z.find(-1,!0).line;return x}function Mt(x){for(var z;z=ze(x);)x=z.find(1,!0).line;return x}function an(x){for(var z,ne;z=ze(x);)x=z.find(1,!0).line,(ne||(ne=[])).push(x);return ne}function un(x,z){var ne=nn(x,z),te=lt(ne);return ne==te?z:tr(te)}function Jn(x,z){if(z>x.lastLine())return z;var ne=nn(x,z),te;if(!br(x,ne))return z;for(;te=ze(ne);)ne=te.find(1,!0).line;return tr(ne)+1}function br(x,z){var ne=ii&&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,mn(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 kn(x){x=lt(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 _e=ce.children[ye];if(_e==ne)break;z+=_e.height}return z}function wn(x){if(x.height==0)return 0;for(var z=x.text.length,ne,te=x;ne=Fe(te);){var ie=ne.find(0,!0);te=ie.from.line,z+=ie.from.ch-ie.to.ch}for(te=x;ne=ze(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 Pn(x){var z=x.display,ne=x.doc;z.maxLine=nn(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 zn=function(x,z,ne){this.text=x,Ar(this,z),this.height=ne?ne(this):1};zn.prototype.lineNo=function(){return tr(this)},nr(zn);function gr(x,z,ne,te){x.text=z,x.stateAfter&&(x.stateAfter=null),x.styles&&(x.styles=null),x.order!=null&&(x.order=null),yi(x),Ar(x,ne);var ie=te?te(x):1;ie!=x.height&&rr(x,ie)}function Yn(x){x.parent=null,yi(x)}var Xn={},ir={};function ar(x,z){if(!x||/^\s*$/.test(x))return null;var ne=z.addModeClass?ir:Xn;return ne[x]||(ne[x]=x.replace(/\S+/g,"cm-$&"))}function xr(x,z){var ne=kt("span",null,null,Ee?"padding-right: .1px":null),te={pre:kt("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=Ke,ri(x.display.measure)&&(ye=Rn(ce,x.doc.direction))&&(te.addToken=dt(te.addToken,ye)),te.map=[];var _e=z!=x.display.externalMeasured&&tr(ce);pn(ce,te,Ai(x,ce,_e)),ce.styleClasses&&(ce.styleClasses.bgClass&&(te.bgClass=Nt(ce.styleClasses.bgClass,te.bgClass||"")),ce.styleClasses.textClass&&(te.textClass=Nt(ce.styleClasses.textClass,te.textClass||""))),te.map.length==0&&te.map.push(0,0,te.content.appendChild(Bi(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 Pe=te.content.lastChild;(/\bcm-tab\b/.test(Pe.className)||Pe.querySelector&&Pe.querySelector(".cm-tab"))&&(te.content.className="cm-tab-wrap-hack")}return at(x,"renderLine",x,z.line,te.pre),te.pre.className&&(te.textClass=Nt(te.pre.className,te.textClass||"")),te}function Re(x){var z=vt("span","\u2022","cm-invalidchar");return z.title="\\u"+x.charCodeAt(0).toString(16),z.setAttribute("aria-label",z.title),z}function Ke(x,z,ne,te,ie,ce,ye){if(z){var _e=x.splitSpaces?At(z,x.trailingSpace):z,Pe=x.cm.state.specialChars,$e=!1,bt;if(!Pe.test(z))x.col+=z.length,bt=document.createTextNode(_e),x.map.push(x.pos,x.pos+z.length,bt),ve&&we<9&&($e=!0),x.pos+=z.length;else{bt=document.createDocumentFragment();for(var Pt=0;;){Pe.lastIndex=Pt;var gn=Pe.exec(z),on=gn?gn.index-Pt:z.length-Pt;if(on){var Qn=document.createTextNode(_e.slice(Pt,Pt+on));ve&&we<9?bt.appendChild(vt("span",[Qn])):bt.appendChild(Qn),x.map.push(x.pos,x.pos+on,Qn),x.col+=on,x.pos+=on}if(!gn)break;Pt+=on+1;var yr=void 0;if(gn[0]==" "){var $r=x.cm.options.tabSize,Xr=$r-x.col%$r;yr=bt.appendChild(vt("span",$t(Xr),"cm-tab")),yr.setAttribute("role","presentation"),yr.setAttribute("cm-text"," "),x.col+=Xr}else gn[0]=="\r"||gn[0]==`
|
|
|
`?(yr=bt.appendChild(vt("span",gn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),yr.setAttribute("cm-text",gn[0]),x.col+=1):(yr=x.cm.options.specialCharPlaceholder(gn[0]),yr.setAttribute("cm-text",gn[0]),ve&&we<9?bt.appendChild(vt("span",[yr])):bt.appendChild(yr),x.col+=1);x.map.push(x.pos,x.pos+1,yr),x.pos++}}if(x.trailingSpace=_e.charCodeAt(z.length-1)==32,ne||te||ie||$e||ce||ye){var ai=ne||"";te&&(ai+=te),ie&&(ai+=ie);var Zr=vt("span",[bt],ai,ce);if(ye)for(var oi in ye)ye.hasOwnProperty(oi)&&oi!="style"&&oi!="class"&&Zr.setAttribute(oi,ye[oi]);return x.content.appendChild(Zr)}x.content.appendChild(bt)}}function At(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,_e,Pe){ie=ie?ie+" cm-force-border":"cm-force-border";for(var $e=ne.pos,bt=$e+te.length;;){for(var Pt=void 0,gn=0;gn<z.length&&(Pt=z[gn],!(Pt.to>$e&&Pt.from<=$e));gn++);if(Pt.to>=bt)return x(ne,te,ie,ce,ye,_e,Pe);x(ne,te.slice(0,Pt.to-$e),ie,ce,null,_e,Pe),ce=null,te=te.slice(Pt.to-$e),$e=Pt.to}}}function Gt(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 pn(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]),ar(ne[ye+1],z.cm.options));return}for(var _e=ie.length,Pe=0,$e=1,bt="",Pt,gn,on=0,Qn,yr,$r,Xr,ai;;){if(on==Pe){Qn=yr=$r=gn="",ai=null,Xr=null,on=1/0;for(var Zr=[],oi=void 0,Ki=0;Ki<te.length;++Ki){var ji=te[Ki],ba=ji.marker;if(ba.type=="bookmark"&&ji.from==Pe&&ba.widgetNode)Zr.push(ba);else if(ji.from<=Pe&&(ji.to==null||ji.to>Pe||ba.collapsed&&ji.to==Pe&&ji.from==Pe)){if(ji.to!=null&&ji.to!=Pe&&on>ji.to&&(on=ji.to,yr=""),ba.className&&(Qn+=" "+ba.className),ba.css&&(gn=(gn?gn+";":"")+ba.css),ba.startStyle&&ji.from==Pe&&($r+=" "+ba.startStyle),ba.endStyle&&ji.to==on&&(oi||(oi=[])).push(ba.endStyle,ji.to),ba.title&&((ai||(ai={})).title=ba.title),ba.attributes)for(var to in ba.attributes)(ai||(ai={}))[to]=ba.attributes[to];ba.collapsed&&(!Xr||Ei(Xr.marker,ba)<0)&&(Xr=ji)}else ji.from>Pe&&on>ji.from&&(on=ji.from)}if(oi)for(var Wo=0;Wo<oi.length;Wo+=2)oi[Wo+1]==on&&(yr+=" "+oi[Wo]);if(!Xr||Xr.from==Pe)for(var bo=0;bo<Zr.length;++bo)Gt(z,0,Zr[bo]);if(Xr&&(Xr.from||0)==Pe){if(Gt(z,(Xr.to==null?_e+1:Xr.to)-Pe,Xr.marker,Xr.from==null),Xr.to==null)return;Xr.to==Pe&&(Xr=!1)}}if(Pe>=_e)break;for(var us=Math.min(_e,on);;){if(bt){var ds=Pe+bt.length;if(!Xr){var Do=ds>us?bt.slice(0,us-Pe):bt;z.addToken(z,Do,Pt?Pt+Qn:Qn,$r,Pe+Do.length==on?yr:"",gn,ai)}if(ds>=us){bt=bt.slice(us-Pe),Pe=us;break}Pe=ds,$r=""}bt=ie.slice(ce,ce=ne[$e++]),Pt=ar(ne[$e++],z.cm.options)}}}function Sn(x,z,ne){this.line=z,this.rest=an(z),this.size=this.rest?tr(Zt(this.rest))-ne+1:1,this.node=this.text=null,this.hidden=br(x,z)}function Kn(x,z,ne){for(var te=[],ie,ce=z;ce<ne;ce=ie){var ye=new Sn(x.doc,nn(x.doc,ce),ce);ie=ce+ye.size,te.push(ye)}return te}var Tn=null;function cn(x){Tn?Tn.ops.push(x):x.ownsGroup=Tn={ops:[x],delayedCallbacks:[]}}function Wn(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 Zn(x,z){var ne=x.ownsGroup;if(ne)try{Wn(ne)}finally{Tn=null,z(ne)}}var wr=null;function Un(x,z){var ne=cr(x,z);if(ne.length){var te=Array.prototype.slice.call(arguments,2),ie;Tn?ie=Tn.delayedCallbacks:wr?ie=wr:(ie=wr=[],setTimeout(Rr,0));for(var ce=function(_e){ie.push(function(){return ne[_e].apply(null,te)})},ye=0;ye<ne.length;++ye)ce(ye)}}function Rr(){var x=wr;wr=null;for(var z=0;z<x.length;++z)x[z]()}function Yr(x,z,ne,te){for(var ie=0;ie<z.changes.length;ie++){var ce=z.changes[ie];ce=="text"?zr(x,z):ce=="gutter"?ci(x,z,ne,te):ce=="class"?ei(x,z):ce=="widget"&&Fr(x,z,te)}z.changes=null}function Nr(x){return x.node==x.text&&(x.node=vt("div",null,null,"position: relative"),x.text.parentNode&&x.text.parentNode.replaceChild(x.node,x.text),x.node.appendChild(x.text),ve&&we<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=Nr(z);z.background=te.insertBefore(vt("div",null,ne),te.firstChild),x.display.input.setUneditable(z.background)}}function kr(x,z){var ne=x.display.externalMeasured;return ne&&ne.line==z.line?(x.display.externalMeasured=null,z.measure=ne.measure,ne.built):xr(x,z)}function zr(x,z){var ne=z.text.className,te=kr(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,ei(x,z)):ne&&(z.text.className=ne)}function ei(x,z){jr(x,z),z.line.wrapClass?Nr(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 ci(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=Nr(z);z.gutterBackground=vt("div",null,"CodeMirror-gutter-background "+z.line.gutterClass,"left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px; width: "+te.gutterTotalWidth+"px"),x.display.input.setUneditable(z.gutterBackground),ie.insertBefore(z.gutterBackground,z.text)}var ce=z.line.gutterMarkers;if(x.options.lineNumbers||ce){var ye=Nr(z),_e=z.gutter=vt("div",null,"CodeMirror-gutter-wrapper","left: "+(x.options.fixedGutter?te.fixedPos:-te.gutterTotalWidth)+"px");if(x.display.input.setUneditable(_e),ye.insertBefore(_e,z.text),z.line.gutterClass&&(_e.className+=" "+z.line.gutterClass),x.options.lineNumbers&&(!ce||!ce["CodeMirror-linenumbers"])&&(z.lineNumber=_e.appendChild(vt("div",mt(x.options,ne),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+te.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+x.display.lineNumInnerWidth+"px"))),ce)for(var Pe=0;Pe<x.display.gutterSpecs.length;++Pe){var $e=x.display.gutterSpecs[Pe].className,bt=ce.hasOwnProperty($e)&&ce[$e];bt&&_e.appendChild(vt("div",[bt],"CodeMirror-gutter-elt","left: "+te.gutterLeft[$e]+"px; width: "+te.gutterWidth[$e]+"px"))}}}function Fr(x,z,ne){z.alignable&&(z.alignable=null);for(var te=Se("CodeMirror-linewidget"),ie=z.node.firstChild,ce=void 0;ie;ie=ce)ce=ie.nextSibling,te.test(ie.className)&&z.node.removeChild(ie);Oi(x,z,ne)}function fi(x,z,ne,te){var ie=kr(x,z);return z.text=z.node=ie.pre,ie.bgClass&&(z.bgClass=ie.bgClass),ie.textClass&&(z.textClass=ie.textClass),ei(x,z),ci(x,z,ne,te),Oi(x,z,te),z.node}function Oi(x,z,ne){if(na(x,z.line,z,ne,!0),z.rest)for(var te=0;te<z.rest.length;te++)na(x,z.rest[te],z,ne,!1)}function na(x,z,ne,te,ie){if(z.widgets)for(var ce=Nr(ne),ye=0,_e=z.widgets;ye<_e.length;++ye){var Pe=_e[ye],$e=vt("div",[Pe.node],"CodeMirror-linewidget"+(Pe.className?" "+Pe.className:""));Pe.handleMouseEvents||$e.setAttribute("cm-ignore-events","true"),Xi(Pe,$e,ne,te),x.display.input.setUneditable($e),ie&&Pe.above?ce.insertBefore($e,ne.gutter||ne.text):ce.appendChild($e),Un(Pe,"redraw")}}function Xi(x,z,ne,te){if(x.noHScroll){(ne.alignable||(ne.alignable=[])).push(z);var ie=te.wrapperWidth;z.style.left=te.fixedPos+"px",x.coverGutter||(ie-=te.gutterTotalWidth,z.style.paddingLeft=te.gutterTotalWidth+"px"),z.style.width=ie+"px"}x.coverGutter&&(z.style.zIndex=5,z.style.position="relative",x.noHScroll||(z.style.marginLeft=-te.gutterTotalWidth+"px"))}function Fi(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;"),_t(z.display.measure,vt("div",[x.node],null,ne))}return x.height=x.node.parentNode.offsetHeight}function Ji(x,z){for(var ne=Vr(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 Qi(x){return x.lineSpace.offsetTop}function wi(x){return x.mover.offsetHeight-x.lineSpace.offsetHeight}function zi(x){if(x.cachedPaddingH)return x.cachedPaddingH;var z=_t(x.measure,vt("pre","x","CodeMirror-line-like")),ne=window.getComputedStyle?window.getComputedStyle(z):z.currentStyle,te={left:parseInt(ne.paddingLeft),right:parseInt(ne.paddingRight)};return!isNaN(te.left)&&!isNaN(te.right)&&(x.cachedPaddingH=te),te}function Jr(x){return Ut-x.display.nativeBarWidth}function hi(x){return x.display.scroller.clientWidth-Jr(x)-x.display.barWidth}function Ii(x){return x.display.scroller.clientHeight-Jr(x)-x.display.barHeight}function Yi(x,z,ne){var te=x.options.lineWrapping,ie=te&&hi(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(),_e=0;_e<ye.length-1;_e++){var Pe=ye[_e],$e=ye[_e+1];Math.abs(Pe.bottom-$e.bottom)>2&&ce.push((Pe.bottom+$e.top)/2-ne.top)}}ce.push(ne.bottom-ne.top)}}function $a(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(tr(x.rest[ie])>ne)return{map:x.measure.maps[ie],cache:x.measure.caches[ie],before:!0}}function Na(x,z){z=lt(z);var ne=tr(z),te=x.display.externalMeasured=new Sn(x.doc,z,ne);te.lineN=ne;var ie=te.built=xr(x,te);return te.text=ie.pre,_t(x.display.lineMeasure,ie.pre),te}function Aa(x,z,ne,te){return Mi(x,ea(x,z),ne,te)}function ca(x,z){if(z>=x.display.viewFrom&&z<x.display.viewTo)return x.display.view[ra(x,z)];var ne=x.display.externalMeasured;if(ne&&z>=ne.lineN&&z<ne.lineN+ne.size)return ne}function ea(x,z){var ne=tr(z),te=ca(x,ne);te&&!te.text?te=null:te&&te.changes&&(Yr(x,te,ne,ho(x)),x.curOp.forceUpdate=!0),te||(te=Na(x,z));var ie=$a(te,z,ne);return{line:z,view:te,rect:null,map:ie.map,cache:ie.cache,before:ie.before,hasHeights:!1}}function Mi(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||(Yi(x,z.view,z.rect),z.hasHeights=!0),ye=Wi(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 Oa={left:0,right:0,top:0,bottom:0};function ki(x,z,ne){for(var te,ie,ce,ye,_e,Pe,$e=0;$e<x.length;$e+=3)if(_e=x[$e],Pe=x[$e+1],z<_e?(ie=0,ce=1,ye="left"):z<Pe?(ie=z-_e,ce=ie+1):($e==x.length-3||z==Pe&&x[$e+3]>z)&&(ce=Pe-_e,ie=ce-1,z>=Pe&&(ye="right")),ie!=null){if(te=x[$e+2],_e==Pe&&ne==(te.insertLeft?"left":"right")&&(ye=ne),ne=="left"&&ie==0)for(;$e&&x[$e-2]==x[$e-3]&&x[$e-1].insertLeft;)te=x[($e-=3)+2],ye="left";if(ne=="right"&&ie==Pe-_e)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:_e,coverEnd:Pe}}function ti(x,z){var ne=Oa;if(z=="left")for(var te=0;te<x.length&&(ne=x[te]).left==ne.right;te++);else for(var ie=x.length-1;ie>=0&&(ne=x[ie]).left==ne.right;ie--);return ne}function Wi(x,z,ne,te){var ie=ki(z.map,ne,te),ce=ie.node,ye=ie.start,_e=ie.end,Pe=ie.collapse,$e;if(ce.nodeType==3){for(var bt=0;bt<4;bt++){for(;ye&&Ye(z.line.text.charAt(ie.coverStart+ye));)--ye;for(;ie.coverStart+_e<ie.coverEnd&&Ye(z.line.text.charAt(ie.coverStart+_e));)++_e;if(ve&&we<9&&ye==0&&_e==ie.coverEnd-ie.coverStart?$e=ce.parentNode.getBoundingClientRect():$e=ti(Xe(ce,ye,_e).getClientRects(),te),$e.left||$e.right||ye==0)break;_e=ye,ye=ye-1,Pe="right"}ve&&we<11&&($e=ua(x.display.measure,$e))}else{ye>0&&(Pe=te="right");var Pt;x.options.lineWrapping&&(Pt=ce.getClientRects()).length>1?$e=Pt[te=="right"?Pt.length-1:0]:$e=ce.getBoundingClientRect()}if(ve&&we<9&&!ye&&(!$e||!$e.left&&!$e.right)){var gn=ce.parentNode.getClientRects()[0];gn?$e={left:gn.left,right:gn.left+io(x.display),top:gn.top,bottom:gn.bottom}:$e=Oa}for(var on=$e.top-z.rect.top,Qn=$e.bottom-z.rect.top,yr=(on+Qn)/2,$r=z.view.measure.heights,Xr=0;Xr<$r.length-1&&!(yr<$r[Xr]);Xr++);var ai=Xr?$r[Xr-1]:0,Zr=$r[Xr],oi={left:(Pe=="right"?$e.right:$e.left)-z.rect.left,right:(Pe=="left"?$e.left:$e.right)-z.rect.left,top:ai,bottom:Zr};return!$e.left&&!$e.right&&(oi.bogus=!0),x.options.singleCursorHeightPerLine||(oi.rtop=on,oi.rbottom=Qn),oi}function ua(x,z){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!lr(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 Vi(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 aa(x){x.display.externalMeasure=null,je(x.display.lineMeasure);for(var z=0;z<x.display.view.length;z++)Vi(x.display.view[z])}function mi(x){aa(x),x.display.cachedCharWidth=x.display.cachedTextHeight=x.display.cachedPaddingH=null,x.options.lineWrapping||(x.display.maxLineChanged=!0),x.display.lineNumChars=null}function pa(){return me&&it?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function xa(){return me&&it?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function fa(x){var z=0;if(x.widgets)for(var ne=0;ne<x.widgets.length;++ne)x.widgets[ne].above&&(z+=Fi(x.widgets[ne]));return z}function wa(x,z,ne,te,ie){if(!ie){var ce=fa(z);ne.top+=ce,ne.bottom+=ce}if(te=="line")return ne;te||(te="local");var ye=kn(z);if(te=="local"?ye+=Qi(x.display):ye-=x.display.viewOffset,te=="page"||te=="window"){var _e=x.display.lineSpace.getBoundingClientRect();ye+=_e.top+(te=="window"?0:xa());var Pe=_e.left+(te=="window"?0:pa());ne.left+=Pe,ne.right+=Pe}return ne.top+=ye,ne.bottom+=ye,ne}function Ma(x,z,ne){if(ne=="div")return z;var te=z.left,ie=z.top;if(ne=="page")te-=pa(),ie-=xa();else if(ne=="local"||!ne){var 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 Za(x,z,ne,te,ie){return te||(te=nn(x.doc,z.line)),wa(x,te,Aa(x,te,z.ch,ie),ne)}function ha(x,z,ne,te,ie,ce){te=te||nn(x.doc,z.line),ie||(ie=ea(x,te));function ye(Qn,yr){var $r=Mi(x,ie,Qn,yr?"right":"left",ce);return yr?$r.left=$r.right:$r.right=$r.left,wa(x,te,$r,ne)}var _e=Rn(te,x.doc.direction),Pe=z.ch,$e=z.sticky;if(Pe>=te.text.length?(Pe=te.text.length,$e="before"):Pe<=0&&(Pe=0,$e="after"),!_e)return ye($e=="before"?Pe-1:Pe,$e=="before");function bt(Qn,yr,$r){var Xr=_e[yr],ai=Xr.level==1;return ye($r?Qn-1:Qn,ai!=$r)}var Pt=Xt(_e,Pe,$e),gn=Jt,on=bt(Pe,Pt,$e=="before");return gn!=null&&(on.other=bt(Pe,gn,$e!="before")),on}function ka(x,z){var ne=0;z=Nn(x.doc,z),x.options.lineWrapping||(ne=io(x.display)*z.ch);var te=nn(x.doc,z.line),ie=kn(te)+Qi(x.display);return{left:ne,right:ne,top:ie,bottom:ie+te.height}}function Ja(x,z,ne,te,ie){var ce=st(x,z,ne);return ce.xRel=ie,te&&(ce.outside=te),ce}function Ga(x,z,ne){var te=x.doc;if(ne+=x.display.viewOffset,ne<0)return Ja(te.first,0,null,-1,-1);var ie=dr(te,ne),ce=te.first+te.size-1;if(ie>ce)return Ja(te.first+te.size-1,nn(te,ce).text.length,null,1,1);z<0&&(z=0);for(var ye=nn(te,ie);;){var _e=_i(x,ye,ie,z,ne),Pe=Ze(ye,_e.ch+(_e.xRel>0||_e.outside>0?1:0));if(!Pe)return _e;var $e=Pe.find(1);if($e.line==ie)return $e;ye=nn(te,ie=$e.line)}}function so(x,z,ne,te){te-=fa(z);var ie=z.text.length,ce=Rt(function(ye){return Mi(x,ne,ye-1).bottom<=te},ie,0);return ie=Rt(function(ye){return Mi(x,ne,ye).top>te},ce,ie),{begin:ce,end:ie}}function Fa(x,z,ne,te){ne||(ne=ea(x,z));var ie=wa(x,z,Mi(x,ne,te),"line").top;return so(x,z,ne,ie)}function Ca(x,z,ne,te){return x.bottom<=ne?!1:x.top>ne?!0:(te?x.left:x.right)>z}function _i(x,z,ne,te,ie){ie-=kn(z);var ce=ea(x,z),ye=fa(z),_e=0,Pe=z.text.length,$e=!0,bt=Rn(z,x.doc.direction);if(bt){var Pt=(x.options.lineWrapping?da:Ui)(x,z,ne,ce,bt,te,ie);$e=Pt.level!=1,_e=$e?Pt.from:Pt.to-1,Pe=$e?Pt.to:Pt.from-1}var gn=null,on=null,Qn=Rt(function(Ki){var ji=Mi(x,ce,Ki);return ji.top+=ye,ji.bottom+=ye,Ca(ji,te,ie,!1)?(ji.top<=ie&&ji.left<=te&&(gn=Ki,on=ji),!0):!1},_e,Pe),yr,$r,Xr=!1;if(on){var ai=te-on.left<on.right-te,Zr=ai==$e;Qn=gn+(Zr?0:1),$r=Zr?"after":"before",yr=ai?on.left:on.right}else{!$e&&(Qn==Pe||Qn==_e)&&Qn++,$r=Qn==0?"after":Qn==z.text.length?"before":Mi(x,ce,Qn-($e?1:0)).bottom+ye<=ie==$e?"after":"before";var oi=ha(x,st(ne,Qn,$r),"line",z,ce);yr=oi.left,Xr=ie<oi.top?-1:ie>=oi.bottom?1:0}return Qn=Lt(z.text,Qn,1),Ja(ne,Qn,$r,Xr,te-yr)}function Ui(x,z,ne,te,ie,ce,ye){var _e=Rt(function(Pt){var gn=ie[Pt],on=gn.level!=1;return Ca(ha(x,st(ne,on?gn.to:gn.from,on?"before":"after"),"line",z,te),ce,ye,!0)},0,ie.length-1),Pe=ie[_e];if(_e>0){var $e=Pe.level!=1,bt=ha(x,st(ne,$e?Pe.from:Pe.to,$e?"after":"before"),"line",z,te);Ca(bt,ce,ye,!0)&&bt.top>ye&&(Pe=ie[_e-1])}return Pe}function da(x,z,ne,te,ie,ce,ye){var _e=so(x,z,te,ye),Pe=_e.begin,$e=_e.end;/\s/.test(z.text.charAt($e-1))&&$e--;for(var bt=null,Pt=null,gn=0;gn<ie.length;gn++){var on=ie[gn];if(!(on.from>=$e||on.to<=Pe)){var Qn=on.level!=1,yr=Mi(x,te,Qn?Math.min($e,on.to)-1:Math.max(Pe,on.from)).right,$r=yr<ce?ce-yr+1e9:yr-ce;(!bt||Pt>$r)&&(bt=on,Pt=$r)}}return bt||(bt=ie[ie.length-1]),bt.from<Pe&&(bt={from:Pe,to:bt.to,level:bt.level}),bt.to>$e&&(bt={from:bt.from,to:$e,level:bt.level}),bt}var Sa;function Ka(x){if(x.cachedTextHeight!=null)return x.cachedTextHeight;if(Sa==null){Sa=vt("pre",null,"CodeMirror-line-like");for(var z=0;z<49;++z)Sa.appendChild(document.createTextNode("x")),Sa.appendChild(vt("br"));Sa.appendChild(document.createTextNode("x"))}_t(x.measure,Sa);var ne=Sa.offsetHeight/50;return ne>3&&(x.cachedTextHeight=ne),je(x.measure),ne||1}function io(x){if(x.cachedCharWidth!=null)return x.cachedCharWidth;var z=vt("span","xxxxxxxxxx"),ne=vt("pre",[z],"CodeMirror-line-like");_t(x.measure,ne);var te=z.getBoundingClientRect(),ie=(te.right-te.left)/10;return ie>2&&(x.cachedCharWidth=ie),ie||10}function ho(x){for(var z=x.display,ne={},te={},ie=z.gutters.clientLeft,ce=z.gutters.firstChild,ye=0;ce;ce=ce.nextSibling,++ye){var _e=x.display.gutterSpecs[ye].className;ne[_e]=ce.offsetLeft+ce.clientLeft+ie,te[_e]=ce.clientWidth}return{fixedPos:Oo(z),gutterTotalWidth:z.gutters.offsetWidth,gutterLeft:ne,gutterWidth:te,wrapperWidth:z.wrapper.clientWidth}}function Oo(x){return x.scroller.getBoundingClientRect().left-x.sizer.getBoundingClientRect().left}function Ro(x){var z=Ka(x.display),ne=x.options.lineWrapping,te=ne&&Math.max(5,x.display.scroller.clientWidth/io(x.display)-3);return function(ie){if(br(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 lo(x){var z=x.doc,ne=Ro(x);z.iter(function(te){var ie=ne(te);ie!=te.height&&rr(te,ie)})}function Ao(x,z,ne,te){var ie=x.display;if(!ne&&Vr(z).getAttribute("cm-not-content")=="true")return null;var ce,ye,_e=ie.lineSpace.getBoundingClientRect();try{ce=z.clientX-_e.left,ye=z.clientY-_e.top}catch(Pt){return null}var Pe=Ga(x,ce,ye),$e;if(te&&Pe.xRel>0&&($e=nn(x.doc,Pe.line).text).length==Pe.ch){var bt=Qe($e,$e.length,x.options.tabSize)-$e.length;Pe=st(Pe.line,Math.max(0,Math.round((ce-zi(x.display).left)/io(x.display))-bt))}return Pe}function ra(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 Ri(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)ii&&un(x.doc,z)<ie.viewTo&&_a(x);else if(ne<=ie.viewFrom)ii&&Jn(x.doc,ne+te)>ie.viewFrom?_a(x):(ie.viewFrom+=te,ie.viewTo+=te);else if(z<=ie.viewFrom&&ne>=ie.viewTo)_a(x);else if(z<=ie.viewFrom){var ce=co(x,ne,ne+te,1);ce?(ie.view=ie.view.slice(ce.index),ie.viewFrom=ce.lineN,ie.viewTo+=te):_a(x)}else if(ne>=ie.viewTo){var ye=co(x,z,z,-1);ye?(ie.view=ie.view.slice(0,ye.index),ie.viewTo=ye.lineN):_a(x)}else{var _e=co(x,z,z,-1),Pe=co(x,ne,ne+te,1);_e&&Pe?(ie.view=ie.view.slice(0,_e.index).concat(Kn(x,_e.lineN,Pe.lineN)).concat(ie.view.slice(Pe.index)),ie.viewTo+=te):_a(x)}var $e=ie.externalMeasured;$e&&(ne<$e.lineN?$e.lineN+=te:z<$e.lineN+$e.size&&(ie.externalMeasured=null))}function Ta(x,z,ne){x.curOp.viewChanged=!0;var te=x.display,ie=x.display.externalMeasured;if(ie&&z>=ie.lineN&&z<ie.lineN+ie.size&&(te.externalMeasured=null),!(z<te.viewFrom||z>=te.viewTo)){var ce=te.view[ra(x,z)];if(ce.node!=null){var ye=ce.changes||(ce.changes=[]);ht(ye,ne)==-1&&ye.push(ne)}}}function _a(x){x.display.viewFrom=x.display.viewTo=x.doc.first,x.display.view=[],x.display.viewOffset=0}function co(x,z,ne,te){var ie=ra(x,z),ce,ye=x.display.view;if(!ii||ne==x.doc.first+x.doc.size)return{index:ie,lineN:ne};for(var _e=x.display.viewFrom,Pe=0;Pe<ie;Pe++)_e+=ye[Pe].size;if(_e!=z){if(te>0){if(ie==ye.length-1)return null;ce=_e+ye[ie].size-z,ie++}else ce=_e-z;z+=ce,ne+=ce}for(;un(x.doc,ne)!=ne;){if(ie==(te<0?0:ye.length-1))return null;ne+=te*ye[ie-(te<0?1:0)].size,ie+=te}return{index:ie,lineN:ne}}function ao(x,z,ne){var te=x.display,ie=te.view;ie.length==0||z>=te.viewTo||ne<=te.viewFrom?(te.view=Kn(x,z,ne),te.viewFrom=z):(te.viewFrom>z?te.view=Kn(x,z,te.viewFrom).concat(te.view):te.viewFrom<z&&(te.view=te.view.slice(ra(x,z))),te.viewFrom=z,te.viewTo<ne?te.view=te.view.concat(Kn(x,te.viewTo,ne)):te.viewTo>ne&&(te.view=te.view.slice(0,ra(x,ne)))),te.viewTo=ne}function hs(x){for(var z=x.display.view,ne=0,te=0;te<z.length;te++){var ie=z[te];!ie.hidden&&(!ie.node||ie.changes)&&++ne}return ne}function Qo(x){x.display.input.showSelection(x.display.input.prepareSelection())}function ps(x,z){z===void 0&&(z=!0);for(var ne=x.doc,te={},ie=te.cursors=document.createDocumentFragment(),ce=te.selection=document.createDocumentFragment(),ye=0;ye<ne.sel.ranges.length;ye++)if(!(!z&&ye==ne.sel.primIndex)){var _e=ne.sel.ranges[ye];if(!(_e.from().line>=x.display.viewTo||_e.to().line<x.display.viewFrom)){var Pe=_e.empty();(Pe||x.options.showCursorWhenSelecting)&&oa(x,_e.head,ie),Pe||Si(x,_e,ce)}}return te}function oa(x,z,ne){var te=ha(x,z,"div",null,null,!x.options.singleCursorHeightPerLine),ie=ne.appendChild(vt("div","\xA0","CodeMirror-cursor"));if(ie.style.left=te.left+"px",ie.style.top=te.top+"px",ie.style.height=Math.max(0,te.bottom-te.top)*x.options.cursorHeight+"px",te.other){var ce=ne.appendChild(vt("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 Br(x,z){return x.top-z.top||x.left-z.left}function Si(x,z,ne){var te=x.display,ie=x.doc,ce=document.createDocumentFragment(),ye=zi(x.display),_e=ye.left,Pe=Math.max(te.sizerWidth,hi(x)-te.sizer.offsetLeft)-ye.right,$e=ie.direction=="ltr";function bt(Zr,oi,Ki,ji){oi<0&&(oi=0),oi=Math.round(oi),ji=Math.round(ji),ce.appendChild(vt("div",null,"CodeMirror-selected","position: absolute; left: "+Zr+`px;
|
|
|
top: `+oi+"px; width: "+(Ki==null?Pe-Zr:Ki)+`px;
|
|
|
height: `+(ji-oi)+"px"))}function Pt(Zr,oi,Ki){var ji=nn(ie,Zr),ba=ji.text.length,to,Wo;function bo(Do,fs){return Za(x,st(Zr,Do),"div",ji,fs)}function us(Do,fs,sa){var So=Fa(x,ji,null,Do),xo=fs=="ltr"==(sa=="after")?"left":"right",Co=sa=="after"?So.begin:So.end-(/\s/.test(ji.text.charAt(So.end-1))?2:1);return bo(Co,xo)[xo]}var ds=Rn(ji,ie.direction);return Ft(ds,oi||0,Ki==null?ba:Ki,function(Do,fs,sa,So){var xo=sa=="ltr",Co=bo(Do,xo?"left":"right"),ko=bo(fs-1,xo?"right":"left"),Wl=oi==null&&Do==0,ys=Ki==null&&fs==ba,Go=So==0,Wa=!ds||So==ds.length-1;if(ko.top-Co.top<=3){var $o=($e?Wl:ys)&&Go,Mu=($e?ys:Wl)&&Wa,sl=$o?_e:(xo?Co:ko).left,xl=Mu?Pe:(xo?ko:Co).right;bt(sl,Co.top,xl-sl,Co.bottom)}else{var Zs,Po,Ul,Xo;xo?(Zs=$e&&Wl&&Go?_e:Co.left,Po=$e?Pe:us(Do,sa,"before"),Ul=$e?_e:us(fs,sa,"after"),Xo=$e&&ys&&Wa?Pe:ko.right):(Zs=$e?us(Do,sa,"before"):_e,Po=!$e&&Wl&&Go?Pe:Co.right,Ul=!$e&&ys&&Wa?_e:ko.left,Xo=$e?us(fs,sa,"after"):Pe),bt(Zs,Co.top,Po-Zs,Co.bottom),Co.bottom<ko.top&&bt(_e,Co.bottom,null,ko.top),bt(Ul,ko.top,Xo-Ul,ko.bottom)}(!to||Br(Co,to)<0)&&(to=Co),Br(ko,to)<0&&(to=ko),(!Wo||Br(Co,Wo)<0)&&(Wo=Co),Br(ko,Wo)<0&&(Wo=ko)}),{start:to,end:Wo}}var gn=z.from(),on=z.to();if(gn.line==on.line)Pt(gn.line,gn.ch,on.ch);else{var Qn=nn(ie,gn.line),yr=nn(ie,on.line),$r=lt(Qn)==lt(yr),Xr=Pt(gn.line,gn.ch,$r?Qn.text.length+1:null).end,ai=Pt(on.line,$r?0:null,on.ch).start;$r&&(Xr.top<ai.top-2?(bt(Xr.right,Xr.top,null,Xr.bottom),bt(_e,ai.top,ai.left,ai.bottom)):bt(Xr.right,Xr.top,ai.left-Xr.right,Xr.bottom)),Xr.bottom<ai.top&&bt(_e,Xr.bottom,null,ai.top)}ne.appendChild(ce)}function Ci(x){if(x.state.focused){var z=x.display;clearInterval(z.blinker);var ne=!0;z.cursorDiv.style.visibility="",x.options.cursorBlinkRate>0?z.blinker=setInterval(function(){x.hasFocus()||Fo(x),z.cursorDiv.style.visibility=(ne=!ne)?"":"hidden"},x.options.cursorBlinkRate):x.options.cursorBlinkRate<0&&(z.cursorDiv.style.visibility="hidden")}}function Di(x){x.state.focused||(x.display.input.focus(),Va(x))}function Ha(x){x.state.delayingBlurEvent=!0,setTimeout(function(){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1,Fo(x))},100)}function Va(x,z){x.state.delayingBlurEvent&&(x.state.delayingBlurEvent=!1),x.options.readOnly!="nocursor"&&(x.state.focused||(at(x,"focus",x,z),x.state.focused=!0,bn(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()),Ci(x))}function Fo(x,z){x.state.delayingBlurEvent||(x.state.focused&&(at(x,"blur",x,z),x.state.focused=!1,Ue(x.display.wrapper,"CodeMirror-focused")),clearInterval(x.display.blinker),setTimeout(function(){x.state.focused||(x.display.shift=!1)},150))}function Uo(x){for(var z=x.display,ne=z.lineDiv.offsetTop,te=0;te<z.view.length;te++){var ie=z.view[te],ce=x.options.lineWrapping,ye=void 0,_e=0;if(!ie.hidden){if(ve&&we<8){var Pe=ie.node.offsetTop+ie.node.offsetHeight;ye=Pe-ne,ne=Pe}else{var $e=ie.node.getBoundingClientRect();ye=$e.bottom-$e.top,!ce&&ie.text.firstChild&&(_e=ie.text.firstChild.getBoundingClientRect().right-$e.left-1)}var bt=ie.line.height-ye;if((bt>.005||bt<-.005)&&(rr(ie.line,ye),ls(ie.line),ie.rest))for(var Pt=0;Pt<ie.rest.length;Pt++)ls(ie.rest[Pt]);if(_e>x.display.sizerWidth){var gn=Math.ceil(_e/io(x.display));gn>x.display.maxLineLength&&(x.display.maxLineLength=gn,x.display.maxLine=ie.line,x.display.maxLineChanged=!0)}}}}function ls(x){if(x.widgets)for(var z=0;z<x.widgets.length;++z){var ne=x.widgets[z],te=ne.node.parentNode;te&&(ne.height=te.offsetHeight)}}function va(x,z,ne){var te=ne&&ne.top!=null?Math.max(0,ne.top):x.scroller.scrollTop;te=Math.floor(te-Qi(x));var ie=ne&&ne.bottom!=null?ne.bottom:te+x.wrapper.clientHeight,ce=dr(z,te),ye=dr(z,ie);if(ne&&ne.ensure){var _e=ne.ensure.from.line,Pe=ne.ensure.to.line;_e<ce?(ce=_e,ye=dr(z,kn(nn(z,_e))+x.wrapper.clientHeight)):Math.min(Pe,z.lastLine())>=ye&&(ce=dr(z,kn(nn(z,Pe))-x.wrapper.clientHeight),ye=Pe)}return{from:ce,to:Math.max(ye,ce+1)}}function Bo(x,z){if(!Ht(x,"scrollCursorIntoView")){var ne=x.display,te=ne.sizer.getBoundingClientRect(),ie=null;if(z.top+te.top<0?ie=!0:z.bottom+te.top>(window.innerHeight||document.documentElement.clientHeight)&&(ie=!1),ie!=null&&!St){var ce=vt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(z.top-ne.viewOffset-Qi(x.display))+`px;
|
|
|
height: `+(z.bottom-z.top+Jr(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 cs(x,z,ne,te){te==null&&(te=0);var ie;!x.options.lineWrapping&&z==ne&&(z=z.ch?st(z.line,z.sticky=="before"?z.ch-1:z.ch,"after"):z,ne=z.sticky=="before"?st(z.line,z.ch+1,"before"):z);for(var ce=0;ce<5;ce++){var ye=!1,_e=ha(x,z),Pe=!ne||ne==z?_e:ha(x,ne);ie={left:Math.min(_e.left,Pe.left),top:Math.min(_e.top,Pe.top)-te,right:Math.max(_e.left,Pe.left),bottom:Math.max(_e.bottom,Pe.bottom)+te};var $e=As(x,ie),bt=x.doc.scrollTop,Pt=x.doc.scrollLeft;if($e.scrollTop!=null&&(Ia(x,$e.scrollTop),Math.abs(x.doc.scrollTop-bt)>1&&(ye=!0)),$e.scrollLeft!=null&&(go(x,$e.scrollLeft),Math.abs(x.doc.scrollLeft-Pt)>1&&(ye=!0)),!ye)break}return ie}function ul(x,z){var ne=As(x,z);ne.scrollTop!=null&&Ia(x,ne.scrollTop),ne.scrollLeft!=null&&go(x,ne.scrollLeft)}function As(x,z){var ne=x.display,te=Ka(x.display);z.top<0&&(z.top=0);var ie=x.curOp&&x.curOp.scrollTop!=null?x.curOp.scrollTop:ne.scroller.scrollTop,ce=Ii(x),ye={};z.bottom-z.top>ce&&(z.bottom=z.top+ce);var _e=x.doc.height+wi(ne),Pe=z.top<te,$e=z.bottom>_e-te;if(z.top<ie)ye.scrollTop=Pe?0:z.top;else if(z.bottom>ie+ce){var bt=Math.min(z.top,($e?_e:z.bottom)-ce);bt!=ie&&(ye.scrollTop=bt)}var Pt=x.options.fixedGutter?0:ne.gutters.offsetWidth,gn=x.curOp&&x.curOp.scrollLeft!=null?x.curOp.scrollLeft:ne.scroller.scrollLeft-Pt,on=hi(x)-ne.gutters.offsetWidth,Qn=z.right-z.left>on;return Qn&&(z.right=z.left+on),z.left<10?ye.scrollLeft=0:z.left<gn?ye.scrollLeft=Math.max(0,z.left+Pt-(Qn?0:10)):z.right>on+gn-3&&(ye.scrollLeft=z.right+(Qn?0:10)-on),ye}function ms(x,z){z!=null&&(qs(x),x.curOp.scrollTop=(x.curOp.scrollTop==null?x.doc.scrollTop:x.curOp.scrollTop)+z)}function zo(x){qs(x);var z=x.getCursor();x.curOp.scrollToPos={from:z,to:z,margin:x.options.cursorScrollMargin}}function Ts(x,z,ne){(z!=null||ne!=null)&&qs(x),z!=null&&(x.curOp.scrollLeft=z),ne!=null&&(x.curOp.scrollTop=ne)}function Is(x,z){qs(x),x.curOp.scrollToPos=z}function qs(x){var z=x.curOp.scrollToPos;if(z){x.curOp.scrollToPos=null;var ne=ka(x,z.from),te=ka(x,z.to);oo(x,ne,te,z.margin)}}function oo(x,z,ne,te){var ie=As(x,{left:Math.min(z.left,ne.left),top:Math.min(z.top,ne.top)-te,right:Math.max(z.right,ne.right),bottom:Math.max(z.bottom,ne.bottom)+te});Ts(x,ie.scrollLeft,ie.scrollTop)}function Ia(x,z){Math.abs(x.doc.scrollTop-z)<2||(de||qc(x,{top:z}),Xa(x,z,!0),de&&qc(x),is(x,100))}function Xa(x,z,ne){z=Math.max(0,Math.min(x.display.scroller.scrollHeight-x.display.scroller.clientHeight,z)),!(x.display.scroller.scrollTop==z&&!ne)&&(x.doc.scrollTop=z,x.display.scrollbars.setScrollTop(z),x.display.scroller.scrollTop!=z&&(x.display.scroller.scrollTop=z))}function go(x,z,ne,te){z=Math.max(0,Math.min(z,x.display.scroller.scrollWidth-x.display.scroller.clientWidth)),!((ne?z==x.doc.scrollLeft:Math.abs(x.doc.scrollLeft-z)<2)&&!te)&&(x.doc.scrollLeft=z,Zu(x),x.display.scroller.scrollLeft!=z&&(x.display.scroller.scrollLeft=z),x.display.scrollbars.setScrollLeft(z))}function yo(x){var z=x.display,ne=z.gutters.offsetWidth,te=Math.round(x.doc.height+wi(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+Jr(x)+z.barHeight,nativeBarWidth:z.nativeBarWidth,gutterWidth:ne}}var Ko=function(x,z,ne){this.cm=ne;var te=this.vert=vt("div",[vt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ie=this.horiz=vt("div",[vt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");te.tabIndex=ie.tabIndex=-1,x(te),x(ie),dn(te,"scroll",function(){te.clientHeight&&z(te.scrollTop,"vertical")}),dn(ie,"scroll",function(){ie.clientWidth&&z(ie.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ve&&we<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ko.prototype.update=function(x){var z=x.scrollWidth>x.clientWidth+1,ne=x.scrollHeight>x.clientHeight+1,te=x.nativeBarWidth;if(ne){this.vert.style.display="block",this.vert.style.bottom=z?te+"px":"0";var ie=x.viewHeight-(z?te:0);this.vert.firstChild.style.height=Math.max(0,x.scrollHeight-x.clientHeight+ie)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(z){this.horiz.style.display="block",this.horiz.style.right=ne?te+"px":"0",this.horiz.style.left=x.barLeft+"px";var 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}},Ko.prototype.setScrollLeft=function(x){this.horiz.scrollLeft!=x&&(this.horiz.scrollLeft=x),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ko.prototype.setScrollTop=function(x){this.vert.scrollTop!=x&&(this.vert.scrollTop=x),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ko.prototype.zeroWidthHack=function(){var x=Le&&!Oe?"12px":"18px";this.horiz.style.height=this.vert.style.width=x,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ce,this.disableVert=new Ce},Ko.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)},Ko.prototype.clear=function(){var x=this.horiz.parentNode;x.removeChild(this.horiz),x.removeChild(this.vert)};var wo=function(){};wo.prototype.update=function(){return{bottom:0,right:0}},wo.prototype.setScrollLeft=function(){},wo.prototype.setScrollTop=function(){},wo.prototype.clear=function(){};function xs(x,z){z||(z=yo(x));var ne=x.display.barWidth,te=x.display.barHeight;Xl(x,z);for(var ie=0;ie<4&&ne!=x.display.barWidth||te!=x.display.barHeight;ie++)ne!=x.display.barWidth&&x.options.lineWrapping&&Uo(x),Xl(x,yo(x)),ne=x.display.barWidth,te=x.display.barHeight}function Xl(x,z){var ne=x.display,te=ne.scrollbars.update(z);ne.sizer.style.paddingRight=(ne.barWidth=te.right)+"px",ne.sizer.style.paddingBottom=(ne.barHeight=te.bottom)+"px",ne.heightForcer.style.borderBottom=te.bottom+"px solid transparent",te.right&&te.bottom?(ne.scrollbarFiller.style.display="block",ne.scrollbarFiller.style.height=te.bottom+"px",ne.scrollbarFiller.style.width=te.right+"px"):ne.scrollbarFiller.style.display="",te.bottom&&x.options.coverGutterNextToScrollbar&&x.options.fixedGutter?(ne.gutterFiller.style.display="block",ne.gutterFiller.style.height=te.bottom+"px",ne.gutterFiller.style.width=z.gutterWidth+"px"):ne.gutterFiller.style.display=""}var Yl={native:Ko,null:wo};function vc(x){x.display.scrollbars&&(x.display.scrollbars.clear(),x.display.scrollbars.addClass&&Ue(x.display.wrapper,x.display.scrollbars.addClass)),x.display.scrollbars=new Yl[x.options.scrollbarStyle](function(z){x.display.wrapper.insertBefore(z,x.display.scrollbarFiller),dn(z,"mousedown",function(){x.state.focused&&setTimeout(function(){return x.display.input.focus()},0)}),z.setAttribute("cm-not-content","true")},function(z,ne){ne=="horizontal"?go(x,z):Ia(x,z)},x),x.display.scrollbars.addClass&&bn(x.display.wrapper,x.display.scrollbars.addClass)}var Xc=0;function Ks(x){x.curOp={cm:x,viewChanged:!1,startHeight:x.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xc},cn(x.curOp)}function Ds(x){var z=x.curOp;z&&Zn(z,function(ne){for(var te=0;te<ne.ops.length;te++)ne.ops[te].cm.curOp=null;yc(ne)})}function yc(x){for(var z=x.ops,ne=0;ne<z.length;ne++)ql(z[ne]);for(var te=0;te<z.length;te++)Da(z[te]);for(var ie=0;ie<z.length;ie++)ma(z[ie]);for(var ce=0;ce<z.length;ce++)Ho(z[ce]);for(var ye=0;ye<z.length;ye++)es(z[ye])}function ql(x){var z=x.cm,ne=z.display;Jl(z),x.updateMaxLine&&Pn(z),x.mustUpdate=x.viewChanged||x.forceUpdate||x.scrollTop!=null||x.scrollToPos&&(x.scrollToPos.from.line<ne.viewFrom||x.scrollToPos.to.line>=ne.viewTo)||ne.maxLineChanged&&z.options.lineWrapping,x.update=x.mustUpdate&&new gs(z,x.mustUpdate&&{top:x.scrollTop,ensure:x.scrollToPos},x.forceUpdate)}function Da(x){x.updatedDisplay=x.mustUpdate&&Yc(x.cm,x.update)}function ma(x){var z=x.cm,ne=z.display;x.updatedDisplay&&Uo(z),x.barMeasure=yo(z),ne.maxLineChanged&&!z.options.lineWrapping&&(x.adjustWidthTo=Aa(z,ne.maxLine,ne.maxLine.text.length).left+3,z.display.sizerWidth=x.adjustWidthTo,x.barMeasure.scrollWidth=Math.max(ne.scroller.clientWidth,ne.sizer.offsetLeft+x.adjustWidthTo+Jr(z)+z.display.barWidth),x.maxScrollLeft=Math.max(0,ne.sizer.offsetLeft+x.adjustWidthTo-hi(z))),(x.updatedDisplay||x.selectionChanged)&&(x.preparedSelection=ne.input.prepareSelection())}function Ho(x){var z=x.cm;x.adjustWidthTo!=null&&(z.display.sizer.style.minWidth=x.adjustWidthTo+"px",x.maxScrollLeft<z.doc.scrollLeft&&go(z,Math.min(z.display.scroller.scrollLeft,x.maxScrollLeft),!0),z.display.maxLineChanged=!1);var ne=x.focus&&x.focus==Ot();x.preparedSelection&&z.display.input.showSelection(x.preparedSelection,ne),(x.updatedDisplay||x.startHeight!=z.doc.height)&&xs(z,x.barMeasure),x.updatedDisplay&&Qc(z,x.barMeasure),x.selectionChanged&&Ci(z),z.state.focused&&x.updateInput&&z.display.input.reset(x.typing),ne&&Di(x.cm)}function es(x){var z=x.cm,ne=z.display,te=z.doc;if(x.updatedDisplay&&ju(z,x.update),ne.wheelStartX!=null&&(x.scrollTop!=null||x.scrollLeft!=null||x.scrollToPos)&&(ne.wheelStartX=ne.wheelStartY=null),x.scrollTop!=null&&Xa(z,x.scrollTop,x.forceScroll),x.scrollLeft!=null&&go(z,x.scrollLeft,!0,!0),x.scrollToPos){var ie=cs(z,Nn(te,x.scrollToPos.from),Nn(te,x.scrollToPos.to),x.scrollToPos.margin);Bo(z,ie)}var ce=x.maybeHiddenMarkers,ye=x.maybeUnhiddenMarkers;if(ce)for(var _e=0;_e<ce.length;++_e)ce[_e].lines.length||at(ce[_e],"hide");if(ye)for(var Pe=0;Pe<ye.length;++Pe)ye[Pe].lines.length&&at(ye[Pe],"unhide");ne.wrapper.offsetHeight&&(te.scrollTop=z.display.scroller.scrollTop),x.changeObjs&&at(z,"changes",z,x.changeObjs),x.update&&x.update.finish()}function ga(x,z){if(x.curOp)return z();Ks(x);try{return z()}finally{Ds(x)}}function za(x,z){return function(){if(x.curOp)return z.apply(x,arguments);Ks(x);try{return z.apply(x,arguments)}finally{Ds(x)}}}function Ra(x){return function(){if(this.curOp)return x.apply(this,arguments);Ks(this);try{return x.apply(this,arguments)}finally{Ds(this)}}}function po(x){return function(){var z=this.cm;if(!z||z.curOp)return x.apply(this,arguments);Ks(z);try{return x.apply(this,arguments)}finally{Ds(z)}}}function is(x,z){x.doc.highlightFrontier<x.display.viewTo&&x.state.highlight.set(z,Cn(Hs,x))}function Hs(x){var z=x.doc;if(!(z.highlightFrontier>=x.display.viewTo)){var ne=+new Date+x.options.workTime,te=gi(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,_e=ce.text.length>x.options.maxHighlightLength?pt(z.mode,te.state):null,Pe=$i(x,ce,te,!0);_e&&(te.state=_e),ce.styles=Pe.styles;var $e=ce.styleClasses,bt=Pe.classes;bt?ce.styleClasses=bt:$e&&(ce.styleClasses=null);for(var Pt=!ye||ye.length!=ce.styles.length||$e!=bt&&(!$e||!bt||$e.bgClass!=bt.bgClass||$e.textClass!=bt.textClass),gn=0;!Pt&&gn<ye.length;++gn)Pt=ye[gn]!=ce.styles[gn];Pt&&ie.push(te.line),ce.stateAfter=te.save(),te.nextLine()}else ce.text.length<=x.options.maxHighlightLength&&qi(x,ce.text,te),ce.stateAfter=te.line%5==0?te.save():null,te.nextLine();if(+new Date>ne)return is(x,x.options.workDelay),!0}),z.highlightFrontier=te.line,z.modeFrontier=Math.max(z.modeFrontier,te.line),ie.length&&ga(x,function(){for(var ce=0;ce<ie.length;ce++)Ta(x,ie[ce],"text")})}}var gs=function(x,z,ne){var te=x.display;this.viewport=z,this.visible=va(te,x.doc,z),this.editorIsHidden=!te.wrapper.offsetWidth,this.wrapperHeight=te.wrapper.clientHeight,this.wrapperWidth=te.wrapper.clientWidth,this.oldDisplayWidth=hi(x),this.force=ne,this.dims=ho(x),this.events=[]};gs.prototype.signal=function(x,z){er(x,z)&&this.events.push(arguments)},gs.prototype.finish=function(){for(var x=0;x<this.events.length;x++)at.apply(null,this.events[x])};function Jl(x){var z=x.display;!z.scrollbarsClipped&&z.scroller.offsetWidth&&(z.nativeBarWidth=z.scroller.offsetWidth-z.scroller.clientWidth,z.heightForcer.style.height=Jr(x)+"px",z.sizer.style.marginBottom=-z.nativeBarWidth+"px",z.sizer.style.borderRightWidth=Jr(x)+"px",z.scrollbarsClipped=!0)}function jd(x){if(x.hasFocus())return null;var z=Ot();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 Zd(x){if(!(!x||!x.activeElt||x.activeElt==Ot())&&(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 Yc(x,z){var ne=x.display,te=x.doc;if(z.editorIsHidden)return _a(x),!1;if(!z.force&&z.visible.from>=ne.viewFrom&&z.visible.to<=ne.viewTo&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo)&&ne.renderedView==ne.view&&hs(x)==0)return!1;bc(x)&&(_a(x),z.dims=ho(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)),ii&&(ce=un(x.doc,ce),ye=Jn(x.doc,ye));var _e=ce!=ne.viewFrom||ye!=ne.viewTo||ne.lastWrapHeight!=z.wrapperHeight||ne.lastWrapWidth!=z.wrapperWidth;ao(x,ce,ye),ne.viewOffset=kn(nn(x.doc,ne.viewFrom)),x.display.mover.style.top=ne.viewOffset+"px";var Pe=hs(x);if(!_e&&Pe==0&&!z.force&&ne.renderedView==ne.view&&(ne.updateLineNumbers==null||ne.updateLineNumbers>=ne.viewTo))return!1;var $e=jd(x);return Pe>4&&(ne.lineDiv.style.display="none"),Vd(x,ne.updateLineNumbers,z.dims),Pe>4&&(ne.lineDiv.style.display=""),ne.renderedView=ne.view,Zd($e),je(ne.cursorDiv),je(ne.selectionDiv),ne.gutters.style.height=ne.sizer.style.minHeight=0,_e&&(ne.lastWrapHeight=z.wrapperHeight,ne.lastWrapWidth=z.wrapperWidth,is(x,400)),ne.updateLineNumbers=null,!0}function ju(x,z){for(var ne=z.viewport,te=!0;;te=!1){if(!te||!x.options.lineWrapping||z.oldDisplayWidth==hi(x)){if(ne&&ne.top!=null&&(ne={top:Math.min(x.doc.height+wi(x.display)-Ii(x),ne.top)}),z.visible=va(x.display,x.doc,ne),z.visible.from>=x.display.viewFrom&&z.visible.to<=x.display.viewTo)break}else te&&(z.visible=va(x.display,x.doc,ne));if(!Yc(x,z))break;Uo(x);var ie=yo(x);Qo(x),xs(x,ie),Qc(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 qc(x,z){var ne=new gs(x,z);if(Yc(x,ne)){Uo(x),ju(x,ne);var te=yo(x);Qo(x),xs(x,te),Qc(x,te),ne.finish()}}function Vd(x,z,ne){var te=x.display,ie=x.options.lineNumbers,ce=te.lineDiv,ye=ce.firstChild;function _e(Qn){var yr=Qn.nextSibling;return Ee&&Le&&x.display.currentWheelTarget==Qn?Qn.style.display="none":Qn.parentNode.removeChild(Qn),yr}for(var Pe=te.view,$e=te.viewFrom,bt=0;bt<Pe.length;bt++){var Pt=Pe[bt];if(!Pt.hidden)if(!Pt.node||Pt.node.parentNode!=ce){var gn=fi(x,Pt,$e,ne);ce.insertBefore(gn,ye)}else{for(;ye!=Pt.node;)ye=_e(ye);var on=ie&&z!=null&&z<=$e&&Pt.lineNumber;Pt.changes&&(ht(Pt.changes,"gutter")>-1&&(on=!1),Yr(x,Pt,$e,ne)),on&&(je(Pt.lineNumber),Pt.lineNumber.appendChild(document.createTextNode(mt(x.options,$e)))),ye=Pt.node.nextSibling}$e+=Pt.size}for(;ye;)ye=_e(ye)}function Jc(x){var z=x.gutters.offsetWidth;x.sizer.style.marginLeft=z+"px"}function Qc(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+Jr(x)+"px"}function Zu(x){var z=x.display,ne=z.view;if(!(!z.alignWidgets&&(!z.gutters.firstChild||!x.options.fixedGutter))){for(var te=Oo(z)-z.scroller.scrollLeft+x.doc.scrollLeft,ie=z.gutters.offsetWidth,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 _e=ne[ye].alignable;if(_e)for(var Pe=0;Pe<_e.length;Pe++)_e[Pe].style.left=ce}x.options.fixedGutter&&(z.gutters.style.left=te+ie+"px")}}function bc(x){if(!x.options.lineNumbers)return!1;var z=x.doc,ne=mt(x.options,z.first+z.size-1),te=x.display;if(ne.length!=te.lineNumChars){var ie=te.measure.appendChild(vt("div",[vt("div",ne)],"CodeMirror-linenumber CodeMirror-gutter-elt")),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",Jc(x.display),!0}return!1}function eu(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 Vu(x){var z=x.gutters,ne=x.gutterSpecs;je(z),x.lineGutter=null;for(var te=0;te<ne.length;++te){var ie=ne[te],ce=ie.className,ye=ie.style,_e=z.appendChild(vt("div",null,"CodeMirror-gutter "+ce));ye&&(_e.style.cssText=ye),ce=="CodeMirror-linenumbers"&&(x.lineGutter=_e,_e.style.width=(x.lineNumWidth||1)+"px")}z.style.display=ne.length?"":"none",Jc(x)}function Ql(x){Vu(x.display),Ri(x),Zu(x)}function Gd(x,z,ne,te){var ie=this;this.input=ne,ie.scrollbarFiller=vt("div",null,"CodeMirror-scrollbar-filler"),ie.scrollbarFiller.setAttribute("cm-not-content","true"),ie.gutterFiller=vt("div",null,"CodeMirror-gutter-filler"),ie.gutterFiller.setAttribute("cm-not-content","true"),ie.lineDiv=kt("div",null,"CodeMirror-code"),ie.selectionDiv=vt("div",null,null,"position: relative; z-index: 1"),ie.cursorDiv=vt("div",null,"CodeMirror-cursors"),ie.measure=vt("div",null,"CodeMirror-measure"),ie.lineMeasure=vt("div",null,"CodeMirror-measure"),ie.lineSpace=kt("div",[ie.measure,ie.lineMeasure,ie.selectionDiv,ie.cursorDiv,ie.lineDiv],null,"position: relative; outline: none");var ce=kt("div",[ie.lineSpace],"CodeMirror-lines");ie.mover=vt("div",[ce],null,"position: relative"),ie.sizer=vt("div",[ie.mover],"CodeMirror-sizer"),ie.sizerWidth=null,ie.heightForcer=vt("div",null,null,"position: absolute; height: "+Ut+"px; width: 1px;"),ie.gutters=vt("div",null,"CodeMirror-gutters"),ie.lineGutter=null,ie.scroller=vt("div",[ie.sizer,ie.heightForcer,ie.gutters],"CodeMirror-scroll"),ie.scroller.setAttribute("tabIndex","-1"),ie.wrapper=vt("div",[ie.scrollbarFiller,ie.gutterFiller,ie.scroller],"CodeMirror"),ve&&we<8&&(ie.gutters.style.zIndex=-1,ie.scroller.style.paddingRight=0),!Ee&&!(de&&Je)&&(ie.scroller.draggable=!0),x&&(x.appendChild?x.appendChild(ie.wrapper):x(ie.wrapper)),ie.viewFrom=ie.viewTo=z.first,ie.reportedViewFrom=ie.reportedViewTo=z.first,ie.view=[],ie.renderedView=null,ie.externalMeasured=null,ie.viewOffset=0,ie.lastWrapHeight=ie.lastWrapWidth=0,ie.updateLineNumbers=null,ie.nativeBarWidth=ie.barHeight=ie.barWidth=0,ie.scrollbarsClipped=!1,ie.lineNumWidth=ie.lineNumInnerWidth=ie.lineNumChars=null,ie.alignWidgets=!1,ie.cachedCharWidth=ie.cachedTextHeight=ie.cachedPaddingH=null,ie.maxLine=null,ie.maxLineLength=0,ie.maxLineChanged=!1,ie.wheelDX=ie.wheelDY=ie.wheelStartX=ie.wheelStartY=null,ie.shift=!1,ie.selForContextMenu=null,ie.activeTouch=null,ie.gutterSpecs=eu(te.gutters,te.lineNumbers),Vu(ie),ne.init(ie)}var xc=0,jo=null;ve?jo=-.53:de?jo=15:me?jo=-.7:ot&&(jo=-1/3);function Pl(x){var z=x.wheelDeltaX,ne=x.wheelDeltaY;return z==null&&x.detail&&x.axis==x.HORIZONTAL_AXIS&&(z=x.detail),ne==null&&x.detail&&x.axis==x.VERTICAL_AXIS?ne=x.detail:ne==null&&(ne=x.wheelDelta),{x:z,y:ne}}function Gu(x){var z=Pl(x);return z.x*=jo,z.y*=jo,z}function Xu(x,z){var ne=Pl(z),te=ne.x,ie=ne.y,ce=x.display,ye=ce.scroller,_e=ye.scrollWidth>ye.clientWidth,Pe=ye.scrollHeight>ye.clientHeight;if(te&&_e||ie&&Pe){if(ie&&Le&&Ee){e:for(var $e=z.target,bt=ce.view;$e!=ye;$e=$e.parentNode)for(var Pt=0;Pt<bt.length;Pt++)if(bt[Pt].node==$e){x.display.currentWheelTarget=$e;break e}}if(te&&!de&&!Ie&&jo!=null){ie&&Pe&&Ia(x,Math.max(0,ye.scrollTop+ie*jo)),go(x,Math.max(0,ye.scrollLeft+te*jo)),(!ie||ie&&Pe)&&Sr(z),ce.wheelStartX=null;return}if(ie&&jo!=null){var gn=ie*jo,on=x.doc.scrollTop,Qn=on+ce.wrapper.clientHeight;gn<0?on=Math.max(0,on+gn-50):Qn=Math.min(x.doc.height,Qn+gn+50),qc(x,{top:on,bottom:Qn})}xc<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 yr=ye.scrollLeft-ce.wheelStartX,$r=ye.scrollTop-ce.wheelStartY,Xr=$r&&ce.wheelDY&&$r/ce.wheelDY||yr&&ce.wheelDX&&yr/ce.wheelDX;ce.wheelStartX=ce.wheelStartY=null,Xr&&(jo=(jo*xc+Xr)/(xc+1),++xc)}},200)):(ce.wheelDX+=te,ce.wheelDY+=ie))}}var vs=function(x,z){this.ranges=x,this.primIndex=z};vs.prototype.primary=function(){return this.ranges[this.primIndex]},vs.prototype.equals=function(x){if(x==this)return!0;if(x.primIndex!=this.primIndex||x.ranges.length!=this.ranges.length)return!1;for(var z=0;z<this.ranges.length;z++){var ne=this.ranges[z],te=x.ranges[z];if(!fn(ne.anchor,te.anchor)||!fn(ne.head,te.head))return!1}return!0},vs.prototype.deepCopy=function(){for(var x=[],z=0;z<this.ranges.length;z++)x[z]=new ja(Bn(this.ranges[z].anchor),Bn(this.ranges[z].head));return new vs(x,this.primIndex)},vs.prototype.somethingSelected=function(){for(var x=0;x<this.ranges.length;x++)if(!this.ranges[x].empty())return!0;return!1},vs.prototype.contains=function(x,z){z||(z=x);for(var ne=0;ne<this.ranges.length;ne++){var te=this.ranges[ne];if(Ct(z,te.from())>=0&&Ct(x,te.to())<=0)return ne}return-1};var ja=function(x,z){this.anchor=x,this.head=z};ja.prototype.from=function(){return vn(this.anchor,this.head)},ja.prototype.to=function(){return hn(this.anchor,this.head)},ja.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ms(x,z,ne){var te=x&&x.options.selectionsMayTouch,ie=z[ne];z.sort(function(gn,on){return Ct(gn.from(),on.from())}),ne=ht(z,ie);for(var ce=1;ce<z.length;ce++){var ye=z[ce],_e=z[ce-1],Pe=Ct(_e.to(),ye.from());if(te&&!ye.empty()?Pe>0:Pe>=0){var $e=vn(_e.from(),ye.from()),bt=hn(_e.to(),ye.to()),Pt=_e.empty()?ye.from()==ye.head:_e.from()==_e.head;ce<=ne&&--ne,z.splice(--ce,2,new ja(Pt?bt:$e,Pt?$e:bt))}}return new vs(z,ne)}function Ps(x,z){return new vs([new ja(x,z||x)],0)}function Js(x){return x.text?st(x.from.line+x.text.length-1,Zt(x.text).length+(x.text.length==1?x.from.ch:0)):x.to}function Yu(x,z){if(Ct(x,z.from)<0)return x;if(Ct(x,z.to)<=0)return Js(z);var ne=x.line+z.text.length-(z.to.line-z.from.line)-1,te=x.ch;return x.line==z.to.line&&(te+=Js(z).ch-z.to.ch),st(ne,te)}function tu(x,z){for(var ne=[],te=0;te<x.sel.ranges.length;te++){var ie=x.sel.ranges[te];ne.push(new ja(Yu(ie.anchor,z),Yu(ie.head,z)))}return Ms(x.cm,ne,x.sel.primIndex)}function Ol(x,z,ne){return x.line==z.line?st(ne.line,x.ch-z.ch+ne.ch):st(ne.line+(x.line-z.line),x.ch)}function nu(x,z,ne){for(var te=[],ie=st(x.first,0),ce=ie,ye=0;ye<z.length;ye++){var _e=z[ye],Pe=Ol(_e.from,ie,ce),$e=Ol(Js(_e),ie,ce);if(ie=_e.to,ce=$e,ne=="around"){var bt=x.sel.ranges[ye],Pt=Ct(bt.head,bt.anchor)<0;te[ye]=new ja(Pt?$e:Pe,Pt?Pe:$e)}else te[ye]=new ja(Pe,Pe)}return new vs(te,x.sel.primIndex)}function ru(x){x.doc.mode=Dt(x.options,x.doc.modeOption),Rl(x)}function Rl(x){x.doc.iter(function(z){z.stateAfter&&(z.stateAfter=null),z.styles&&(z.styles=null)}),x.doc.modeFrontier=x.doc.highlightFrontier=x.doc.first,is(x,100),x.state.modeGen++,x.curOp&&Ri(x)}function qu(x,z){return z.from.ch==0&&z.to.ch==0&&Zt(z.text)==""&&(!x.cm||x.cm.options.wholeLineUpdateBefore)}function iu(x,z,ne,te){function ie(ai){return ne?ne[ai]:null}function ce(ai,Zr,oi){gr(ai,Zr,oi,te),Un(ai,"change",ai,z)}function ye(ai,Zr){for(var oi=[],Ki=ai;Ki<Zr;++Ki)oi.push(new zn($e[Ki],ie(Ki),te));return oi}var _e=z.from,Pe=z.to,$e=z.text,bt=nn(x,_e.line),Pt=nn(x,Pe.line),gn=Zt($e),on=ie($e.length-1),Qn=Pe.line-_e.line;if(z.full)x.insert(0,ye(0,$e.length)),x.remove($e.length,x.size-$e.length);else if(qu(x,z)){var yr=ye(0,$e.length-1);ce(Pt,Pt.text,on),Qn&&x.remove(_e.line,Qn),yr.length&&x.insert(_e.line,yr)}else if(bt==Pt)if($e.length==1)ce(bt,bt.text.slice(0,_e.ch)+gn+bt.text.slice(Pe.ch),on);else{var $r=ye(1,$e.length-1);$r.push(new zn(gn+bt.text.slice(Pe.ch),on,te)),ce(bt,bt.text.slice(0,_e.ch)+$e[0],ie(0)),x.insert(_e.line+1,$r)}else if($e.length==1)ce(bt,bt.text.slice(0,_e.ch)+$e[0]+Pt.text.slice(Pe.ch),ie(0)),x.remove(_e.line+1,Qn);else{ce(bt,bt.text.slice(0,_e.ch)+$e[0],ie(0)),ce(Pt,gn+Pt.text.slice(Pe.ch),on);var Xr=ye(1,$e.length-1);Qn>1&&x.remove(_e.line+1,Qn-1),x.insert(_e.line+1,Xr)}Un(x,"change",x,z)}function Qs(x,z,ne){function te(ie,ce,ye){if(ie.linked)for(var _e=0;_e<ie.linked.length;++_e){var Pe=ie.linked[_e];if(Pe.doc!=ce){var $e=ye&&Pe.sharedHist;ne&&!$e||(z(Pe.doc,$e),te(Pe.doc,ie,$e))}}}te(x,null,!0)}function wc(x,z){if(z.cm)throw new Error("This document is already in use.");x.doc=z,z.cm=x,lo(x),ru(x),Sc(x),x.options.lineWrapping||Pn(x),x.options.mode=z.modeOption,Ri(x)}function Sc(x){(x.doc.direction=="rtl"?bn:Ue)(x.display.lineDiv,"CodeMirror-rtl")}function au(x){ga(x,function(){Sc(x),Ri(x)})}function Cc(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 ou(x,z){var ne={from:Bn(z.from),to:Js(z),text:jn(x,z.from,z.to)};return uu(x,ne,z.from.line,z.to.line+1),Qs(x,function(te){return uu(te,ne,z.from.line,z.to.line+1)},!0),ne}function Ju(x){for(;x.length;){var z=Zt(x);if(z.ranges)x.pop();else break}}function su(x,z){if(z)return Ju(x.done),Zt(x.done);if(x.done.length&&!Zt(x.done).ranges)return Zt(x.done);if(x.done.length>1&&!x.done[x.done.length-2].ranges)return x.done.pop(),Zt(x.done)}function Ec(x,z,ne,te){var ie=x.history;ie.undone.length=0;var ce=+new Date,ye,_e;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=su(ie,ie.lastOp==te)))_e=Zt(ye.changes),Ct(z.from,z.to)==0&&Ct(z.from,_e.to)==0?_e.to=Js(z):ye.changes.push(ou(x,z));else{var Pe=Zt(ie.done);for((!Pe||!Pe.ranges)&&Mc(x.sel,ie.done),ye={changes:[ou(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,_e||at(x,"historyAdded")}function lu(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 cu(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||lu(x,ce,Zt(ie.done),z))?ie.done[ie.done.length-1]=z:Mc(z,ie.done),ie.lastSelTime=+new Date,ie.lastSelOrigin=ce,ie.lastSelOp=ne,te&&te.clearRedo!==!1&&Ju(ie.undone)}function Mc(x,z){var ne=Zt(z);ne&&ne.ranges&&ne.equals(x)||z.push(x)}function uu(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 du(x){if(!x)return null;for(var z,ne=0;ne<x.length;++ne)x[ne].marker.explicitlyCleared?z||(z=x.slice(0,ne)):z&&z.push(x[ne]);return z?z.length?z:null:x}function Xd(x,z){var ne=z["spans_"+x.id];if(!ne)return null;for(var te=[],ie=0;ie<z.text.length;++ie)te.push(du(ne[ie]));return te}function Qu(x,z){var ne=Xd(x,z),te=Gr(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 _e=0;_e<ye.length;++_e){for(var Pe=ye[_e],$e=0;$e<ce.length;++$e)if(ce[$e].marker==Pe.marker)continue e;ce.push(Pe)}else ye&&(ne[ie]=ye)}return ne}function Bl(x,z,ne){for(var te=[],ie=0;ie<x.length;++ie){var ce=x[ie];if(ce.ranges){te.push(ne?vs.prototype.deepCopy.call(ce):ce);continue}var ye=ce.changes,_e=[];te.push({changes:_e});for(var Pe=0;Pe<ye.length;++Pe){var $e=ye[Pe],bt=void 0;if(_e.push({from:$e.from,to:$e.to,text:$e.text}),z)for(var Pt in $e)(bt=Pt.match(/^spans_(\d+)$/))&&ht(z,Number(bt[1]))>-1&&(Zt(_e)[Pt]=$e[Pt],delete $e[Pt])}}return te}function fu(x,z,ne,te){if(te){var ie=x.anchor;if(ne){var ce=Ct(z,ie)<0;ce!=Ct(ne,ie)<0?(ie=z,z=ne):ce!=Ct(z,ne)<0&&(z=ne)}return new ja(ie,z)}else return new ja(ne||z,z)}function $l(x,z,ne,te,ie){ie==null&&(ie=x.cm&&(x.cm.display.shift||x.extend)),To(x,new vs([fu(x.sel.primary(),z,ne,ie)],0),te)}function ui(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]=fu(x.sel.ranges[ce],z[ce],null,ie);var ye=Ms(x.cm,te,x.sel.primIndex);To(x,ye,ne)}function ws(x,z,ne,te){var ie=x.sel.ranges.slice(0);ie[z]=ne,To(x,Ms(x.cm,ie,x.sel.primIndex),te)}function ed(x,z,ne,te){To(x,Ps(z,ne),te)}function Yd(x,z,ne){var te={ranges:z.ranges,update:function(ie){this.ranges=[];for(var ce=0;ce<ie.length;ce++)this.ranges[ce]=new ja(Nn(x,ie[ce].anchor),Nn(x,ie[ce].head))},origin:ne&&ne.origin};return at(x,"beforeSelectionChange",x,te),x.cm&&at(x.cm,"beforeSelectionChange",x.cm,te),te.ranges!=z.ranges?Ms(x.cm,te.ranges,te.ranges.length-1):z}function as(x,z,ne){var te=x.history.done,ie=Zt(te);ie&&ie.ranges?(te[te.length-1]=z,kc(x,z,ne)):To(x,z,ne)}function To(x,z,ne){kc(x,z,ne),cu(x,x.sel,x.cm?x.cm.curOp.id:NaN,ne)}function kc(x,z,ne){(er(x,"beforeSelectionChange")||x.cm&&er(x.cm,"beforeSelectionChange"))&&(z=Yd(x,z,ne));var te=ne&&ne.bias||(Ct(z.primary().head,x.sel.primary().head)<0?-1:1);qd(x,Nl(x,z,te,!0)),!(ne&&ne.scroll===!1)&&x.cm&&zo(x.cm)}function qd(x,z){z.equals(x.sel)||(x.sel=z,x.cm&&(x.cm.curOp.updateInput=1,x.cm.curOp.selectionChanged=!0,Fn(x.cm)),Un(x,"cursorActivity",x))}function Jd(x){qd(x,Nl(x,x.sel,null,!1))}function Nl(x,z,ne,te){for(var ie,ce=0;ce<z.ranges.length;ce++){var ye=z.ranges[ce],_e=z.ranges.length==x.sel.ranges.length&&x.sel.ranges[ce],Pe=hu(x,ye.anchor,_e&&_e.anchor,ne,te),$e=hu(x,ye.head,_e&&_e.head,ne,te);(ie||Pe!=ye.anchor||$e!=ye.head)&&(ie||(ie=z.ranges.slice(0,ce)),ie[ce]=new ja(Pe,$e))}return ie?Ms(x.cm,ie,z.primIndex):z}function os(x,z,ne,te,ie){var ce=nn(x,z.line);if(ce.markedSpans)for(var ye=0;ye<ce.markedSpans.length;++ye){var _e=ce.markedSpans[ye],Pe=_e.marker,$e="selectLeft"in Pe?!Pe.selectLeft:Pe.inclusiveLeft,bt="selectRight"in Pe?!Pe.selectRight:Pe.inclusiveRight;if((_e.from==null||($e?_e.from<=z.ch:_e.from<z.ch))&&(_e.to==null||(bt?_e.to>=z.ch:_e.to>z.ch))){if(ie&&(at(Pe,"beforeCursorEnter"),Pe.explicitlyCleared))if(ce.markedSpans){--ye;continue}else break;if(!Pe.atomic)continue;if(ne){var Pt=Pe.find(te<0?1:-1),gn=void 0;if((te<0?bt:$e)&&(Pt=el(x,Pt,-te,Pt&&Pt.line==z.line?ce:null)),Pt&&Pt.line==z.line&&(gn=Ct(Pt,ne))&&(te<0?gn<0:gn>0))return os(x,Pt,z,te,ie)}var on=Pe.find(te<0?-1:1);return(te<0?$e:bt)&&(on=el(x,on,te,on.line==z.line?ce:null)),on?os(x,on,z,te,ie):null}}return z}function hu(x,z,ne,te,ie){var ce=te||1,ye=os(x,z,ne,ce,ie)||!ie&&os(x,z,ne,ce,!0)||os(x,z,ne,-ce,ie)||!ie&&os(x,z,ne,-ce,!0);return ye||(x.cantEdit=!0,st(x.first,0))}function el(x,z,ne,te){return ne<0&&z.ch==0?z.line>x.first?Nn(x,st(z.line-1)):null:ne>0&&z.ch==(te||nn(x,z.line)).text.length?z.line<x.first+x.size-1?st(z.line+1,0):null:new st(z.line,z.ch+ne)}function td(x){x.setSelection(st(x.firstLine(),0),st(x.lastLine()),Ge)}function pu(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,_e){ie&&(te.from=Nn(x,ie)),ce&&(te.to=Nn(x,ce)),ye&&(te.text=ye),_e!==void 0&&(te.origin=_e)}),at(x,"beforeChange",x,te),x.cm&&at(x.cm,"beforeChange",x.cm,te),te.canceled?(x.cm&&(x.cm.curOp.updateInput=2),null):{from:te.from,to:te.to,text:te.text,origin:te.origin}}function dl(x,z,ne){if(x.cm){if(!x.cm.curOp)return za(x.cm,dl)(x,z,ne);if(x.cm.state.suppressEdits)return}if(!((er(x,"beforeChange")||x.cm&&er(x.cm,"beforeChange"))&&(z=pu(x,z,!0),!z))){var te=ta&&!ne&&ni(x,z.from,z.to);if(te)for(var ie=te.length-1;ie>=0;--ie)nd(x,{from:te[ie].from,to:te[ie].to,text:ie?[""]:z.text,origin:z.origin});else nd(x,z)}}function nd(x,z){if(!(z.text.length==1&&z.text[0]==""&&Ct(z.from,z.to)==0)){var ne=tu(x,z);Ec(x,z,ne,x.cm?x.cm.curOp.id:NaN),Fl(x,z,ne,Gr(x,z));var te=[];Qs(x,function(ie,ce){!ce&&ht(te,ie.history)==-1&&(_c(ie.history,z),te.push(ie.history)),Fl(ie,z,null,Gr(ie,z))})}}function tl(x,z,ne){var te=x.cm&&x.cm.state.suppressEdits;if(!(te&&!ne)){for(var ie=x.history,ce,ye=x.sel,_e=z=="undo"?ie.done:ie.undone,Pe=z=="undo"?ie.undone:ie.done,$e=0;$e<_e.length&&(ce=_e[$e],!(ne?ce.ranges&&!ce.equals(x.sel):!ce.ranges));$e++);if($e!=_e.length){for(ie.lastOrigin=ie.lastSelOrigin=null;;)if(ce=_e.pop(),ce.ranges){if(Mc(ce,Pe),ne&&!ce.equals(x.sel)){To(x,ce,{clearRedo:!1});return}ye=ce}else if(te){_e.push(ce);return}else break;var bt=[];Mc(ye,Pe),Pe.push({changes:bt,generation:ie.generation}),ie.generation=ce.generation||++ie.maxGeneration;for(var Pt=er(x,"beforeChange")||x.cm&&er(x.cm,"beforeChange"),gn=function(yr){var $r=ce.changes[yr];if($r.origin=z,Pt&&!pu(x,$r,!1))return _e.length=0,{};bt.push(ou(x,$r));var Xr=yr?tu(x,$r):Zt(_e);Fl(x,$r,Xr,Qu(x,$r)),!yr&&x.cm&&x.cm.scrollIntoView({from:$r.from,to:Js($r)});var ai=[];Qs(x,function(Zr,oi){!oi&&ht(ai,Zr.history)==-1&&(_c(Zr.history,$r),ai.push(Zr.history)),Fl(Zr,$r,null,Qu(Zr,$r))})},on=ce.changes.length-1;on>=0;--on){var Qn=gn(on);if(Qn)return Qn.v}}}}function mu(x,z){if(z!=0&&(x.first+=z,x.sel=new vs(yn(x.sel.ranges,function(ie){return new ja(st(ie.anchor.line+z,ie.anchor.ch),st(ie.head.line+z,ie.head.ch))}),x.sel.primIndex),x.cm)){Ri(x.cm,x.first,x.first-z,z);for(var ne=x.cm.display,te=ne.viewFrom;te<ne.viewTo;te++)Ta(x.cm,te,"gutter")}}function Fl(x,z,ne,te){if(x.cm&&!x.cm.curOp)return za(x.cm,Fl)(x,z,ne,te);if(z.to.line<x.first){mu(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);mu(x,ie),z={from:st(x.first,0),to:st(z.to.line+ie,z.to.ch),text:[Zt(z.text)],origin:z.origin}}var ce=x.lastLine();z.to.line>ce&&(z={from:z.from,to:st(ce,nn(x,ce).text.length),text:[z.text[0]],origin:z.origin}),z.removed=jn(x,z.from,z.to),ne||(ne=tu(x,z)),x.cm?Qd(x.cm,z,te):iu(x,z,te),kc(x,ne,Ge),x.cantEdit&&hu(x,st(x.firstLine(),0))&&(x.cantEdit=!1)}}function Qd(x,z,ne){var te=x.doc,ie=x.display,ce=z.from,ye=z.to,_e=!1,Pe=ce.line;x.options.lineWrapping||(Pe=tr(lt(nn(te,ce.line))),te.iter(Pe,ye.line+1,function(on){if(on==ie.maxLine)return _e=!0,!0})),te.sel.contains(z.from,z.to)>-1&&Fn(x),iu(te,z,ne,Ro(x)),x.options.lineWrapping||(te.iter(Pe,ce.line+z.text.length,function(on){var Qn=wn(on);Qn>ie.maxLineLength&&(ie.maxLine=on,ie.maxLineLength=Qn,ie.maxLineChanged=!0,_e=!1)}),_e&&(x.curOp.updateMaxLine=!0)),la(te,ce.line),is(x,400);var $e=z.text.length-(ye.line-ce.line)-1;z.full?Ri(x):ce.line==ye.line&&z.text.length==1&&!qu(x.doc,z)?Ta(x,ce.line,"text"):Ri(x,ce.line,ye.line+1,$e);var bt=er(x,"changes"),Pt=er(x,"change");if(Pt||bt){var gn={from:ce,to:ye,text:z.text,removed:z.removed,origin:z.origin};Pt&&Un(x,"change",x,gn),bt&&(x.curOp.changeObjs||(x.curOp.changeObjs=[])).push(gn)}x.display.selForContextMenu=null}function ec(x,z,ne,te,ie){var ce;te||(te=ne),Ct(te,ne)<0&&(ce=[te,ne],ne=ce[0],te=ce[1]),typeof z=="string"&&(z=x.splitLines(z)),dl(x,{from:ne,to:te,text:z,origin:ie})}function ef(x,z,ne,te){ne<x.line?x.line+=te:z<x.line&&(x.line=z,x.ch=0)}function tf(x,z,ne,te){for(var ie=0;ie<x.length;++ie){var ce=x[ie],ye=!0;if(ce.ranges){ce.copied||(ce=x[ie]=ce.deepCopy(),ce.copied=!0);for(var _e=0;_e<ce.ranges.length;_e++)ef(ce.ranges[_e].anchor,z,ne,te),ef(ce.ranges[_e].head,z,ne,te);continue}for(var Pe=0;Pe<ce.changes.length;++Pe){var $e=ce.changes[Pe];if(ne<$e.from.line)$e.from=st($e.from.line+te,$e.from.ch),$e.to=st($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 _c(x,z){var ne=z.from.line,te=z.to.line,ie=z.text.length-(te-ne)-1;tf(x.done,ne,te,ie),tf(x.undone,ne,te,ie)}function Lc(x,z,ne,te){var ie=z,ce=z;return typeof z=="number"?ce=nn(x,xn(x,z)):ie=tr(z),ie==null?null:(te(ce,ie)&&x.cm&&Ta(x.cm,ie,ne),ce)}function fl(x){this.lines=x,this.parent=null;for(var z=0,ne=0;ne<x.length;++ne)x[ne].parent=this,z+=x[ne].height;this.height=z}fl.prototype={chunkSize:function(){return this.lines.length},removeInner:function(x,z){for(var ne=x,te=x+z;ne<te;++ne){var ie=this.lines[ne];this.height-=ie.height,Yn(ie),Un(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 tc(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}tc.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 fl))){var _e=[];this.collapse(_e),this.children=[new fl(_e)],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,_e=ye;_e<ie.lines.length;){var Pe=new fl(ie.lines.slice(_e,_e+=25));ie.height-=Pe.height,this.children.splice(++te,0,Pe),Pe.parent=this}ie.lines=ie.lines.slice(0,ye),this.maybeSpill()}break}x-=ce}},maybeSpill:function(){if(!(this.children.length<=10)){var x=this;do{var z=x.children.splice(x.children.length-5,5),ne=new tc(z);if(x.parent){x.size-=ne.size,x.height-=ne.height;var ie=ht(x.parent.children,x);x.parent.children.splice(ie+1,0,ne)}else{var te=new tc(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 nc=function(x,z,ne){if(ne)for(var te in ne)ne.hasOwnProperty(te)&&(this[te]=ne[te]);this.doc=x,this.node=z};nc.prototype.clear=function(){var x=this.doc.cm,z=this.line.widgets,ne=this.line,te=tr(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=Fi(this);rr(ne,Math.max(0,ne.height-ce)),x&&(ga(x,function(){nf(x,ne,-ce),Ta(x,te,"widget")}),Un(x,"lineWidgetCleared",x,this,te))}},nc.prototype.changed=function(){var x=this,z=this.height,ne=this.doc.cm,te=this.line;this.height=null;var ie=Fi(this)-z;ie&&(br(this.doc,te)||rr(te,te.height+ie),ne&&ga(ne,function(){ne.curOp.forceUpdate=!0,nf(ne,te,ie),Un(ne,"lineWidgetChanged",ne,x,tr(te))}))},nr(nc);function nf(x,z,ne){kn(z)<(x.curOp&&x.curOp.scrollTop||x.doc.scrollTop)&&ms(x,ne)}function rf(x,z,ne,te){var ie=new nc(x,ne,te),ce=x.cm;return ce&&ie.noHScroll&&(ce.display.alignWidgets=!0),Lc(x,z,"widget",function(ye){var _e=ye.widgets||(ye.widgets=[]);if(ie.insertAt==null?_e.push(ie):_e.splice(Math.min(_e.length-1,Math.max(0,ie.insertAt)),0,ie),ie.line=ye,ce&&!br(x,ye)){var Pe=kn(ye)<x.scrollTop;rr(ye,ye.height+Fi(ie)),Pe&&ms(ce,ie.height),ce.curOp.forceUpdate=!0}return!0}),ce&&Un(ce,"lineWidgetAdded",ce,ie,typeof z=="number"?z:tr(z)),ie}var af=0,hl=function(x,z){this.lines=[],this.type=z,this.doc=x,this.id=++af};hl.prototype.clear=function(){if(!this.explicitlyCleared){var x=this.doc.cm,z=x&&!x.curOp;if(z&&Ks(x),er(this,"clear")){var ne=this.find();ne&&Un(this,"clear",ne.from,ne.to)}for(var te=null,ie=null,ce=0;ce<this.lines.length;++ce){var ye=this.lines[ce],_e=mn(ye.markedSpans,this);x&&!this.collapsed?Ta(x,tr(ye),"text"):x&&(_e.to!=null&&(ie=tr(ye)),_e.from!=null&&(te=tr(ye))),ye.markedSpans=On(ye.markedSpans,_e),_e.from==null&&this.collapsed&&!br(this.doc,ye)&&x&&rr(ye,Ka(x.display))}if(x&&this.collapsed&&!x.options.lineWrapping)for(var Pe=0;Pe<this.lines.length;++Pe){var $e=lt(this.lines[Pe]),bt=wn($e);bt>x.display.maxLineLength&&(x.display.maxLine=$e,x.display.maxLineLength=bt,x.display.maxLineChanged=!0)}te!=null&&x&&this.collapsed&&Ri(x,te,ie+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,x&&Jd(x.doc)),x&&Un(x,"markerCleared",x,this,te,ie),z&&Ds(x),this.parent&&this.parent.clear()}},hl.prototype.find=function(x,z){x==null&&this.type=="bookmark"&&(x=1);for(var ne,te,ie=0;ie<this.lines.length;++ie){var ce=this.lines[ie],ye=mn(ce.markedSpans,this);if(ye.from!=null&&(ne=st(z?ce:tr(ce),ye.from),x==-1))return ne;if(ye.to!=null&&(te=st(z?ce:tr(ce),ye.to),x==1))return te}return ne&&{from:ne,to:te}},hl.prototype.changed=function(){var x=this,z=this.find(-1,!0),ne=this,te=this.doc.cm;!z||!te||ga(te,function(){var ie=z.line,ce=tr(z.line),ye=ca(te,ce);if(ye&&(Vi(ye),te.curOp.selectionChanged=te.curOp.forceUpdate=!0),te.curOp.updateMaxLine=!0,!br(ne.doc,ie)&&ne.height!=null){var _e=ne.height;ne.height=null;var Pe=Fi(ne)-_e;Pe&&rr(ie,ie.height+Pe)}Un(te,"markerChanged",te,x)})},hl.prototype.attachLine=function(x){if(!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(!z.maybeHiddenMarkers||ht(z.maybeHiddenMarkers,this)==-1)&&(z.maybeUnhiddenMarkers||(z.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(x)},hl.prototype.detachLine=function(x){if(this.lines.splice(ht(this.lines,x),1),!this.lines.length&&this.doc.cm){var z=this.doc.cm.curOp;(z.maybeHiddenMarkers||(z.maybeHiddenMarkers=[])).push(this)}},nr(hl);function nl(x,z,ne,te,ie){if(te&&te.shared)return uo(x,z,ne,te,ie);if(x.cm&&!x.cm.curOp)return za(x.cm,nl)(x,z,ne,te,ie);var ce=new hl(x,ie),ye=Ct(z,ne);if(te&&or(te,ce,!1),ye>0||ye==0&&ce.clearWhenEmpty!==!1)return ce;if(ce.replacedWith&&(ce.collapsed=!0,ce.widgetNode=kt("span",[ce.replacedWith],"CodeMirror-widget"),te.handleMouseEvents||ce.widgetNode.setAttribute("cm-ignore-events","true"),te.insertLeft&&(ce.widgetNode.insertLeft=!0)),ce.collapsed){if(nt(x,z.line,z,ne,ce)||z.line!=ne.line&&nt(x,ne.line,z,ne,ce))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt()}ce.addToHistory&&Ec(x,{from:z,to:ne,origin:"markText"},x.sel,NaN);var _e=z.line,Pe=x.cm,$e;if(x.iter(_e,ne.line+1,function(Pt){Pe&&ce.collapsed&&!Pe.options.lineWrapping&<(Pt)==Pe.display.maxLine&&($e=!0),ce.collapsed&&_e!=z.line&&rr(Pt,0),vr(Pt,new Qt(ce,_e==z.line?z.ch:null,_e==ne.line?ne.ch:null)),++_e}),ce.collapsed&&x.iter(z.line,ne.line+1,function(Pt){br(x,Pt)&&rr(Pt,0)}),ce.clearOnEnter&&dn(ce,"beforeCursorEnter",function(){return ce.clear()}),ce.readOnly&&(Et(),(x.history.done.length||x.history.undone.length)&&x.clearHistory()),ce.collapsed&&(ce.id=++af,ce.atomic=!0),Pe){if($e&&(Pe.curOp.updateMaxLine=!0),ce.collapsed)Ri(Pe,z.line,ne.line+1);else if(ce.className||ce.startStyle||ce.endStyle||ce.css||ce.attributes||ce.title)for(var bt=z.line;bt<=ne.line;bt++)Ta(Pe,bt,"text");ce.atomic&&Jd(Pe.doc),Un(Pe,"markerAdded",Pe,ce)}return ce}var ya=function(x,z){this.markers=x,this.primary=z;for(var ne=0;ne<x.length;++ne)x[ne].parent=this};ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var x=0;x<this.markers.length;++x)this.markers[x].clear();Un(this,"clear")}},ya.prototype.find=function(x,z){return this.primary.find(x,z)},nr(ya);function uo(x,z,ne,te,ie){te=or(te),te.shared=!1;var ce=[nl(x,z,ne,te,ie)],ye=ce[0],_e=te.widgetNode;return Qs(x,function(Pe){_e&&(te.widgetNode=_e.cloneNode(!0)),ce.push(nl(Pe,Nn(Pe,z),Nn(Pe,ne),te,ie));for(var $e=0;$e<Pe.linked.length;++$e)if(Pe.linked[$e].isParent)return;ye=Zt(ce)}),new ya(ce,ye)}function pl(x){return x.findMarks(st(x.first,0),x.clipPos(st(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(Ct(ce,ye)){var _e=nl(x,ce,ye,te.primary,te.primary.type);te.markers.push(_e),_e.parent=te}}}function Ss(x){for(var z=function(te){var ie=x[te],ce=[ie.primary.doc];Qs(ie.primary.doc,function(Pe){return ce.push(Pe)});for(var ye=0;ye<ie.markers.length;ye++){var _e=ie.markers[ye];ht(ce,_e.doc)==-1&&(_e.parent=null,ie.markers.splice(ye--,1))}},ne=0;ne<x.length;ne++)z(ne)}var sf=0,Mo=function(x,z,ne,te,ie){if(!(this instanceof Mo))return new Mo(x,z,ne,te,ie);ne==null&&(ne=0),tc.call(this,[new fl([new zn("",null)])]),this.first=ne,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ne;var ce=st(ne,0);this.sel=Ps(ce),this.history=new Cc(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)),iu(this,{from:ce,to:ce,text:x}),To(this,Ps(ce),Ge)};Mo.prototype=ue(tc.prototype,{constructor:Mo,iter:function(x,z,ne){ne?this.iterN(x-this.first,z-x,ne):this.iterN(this.first,this.first+this.size,x)},insert:function(x,z){for(var ne=0,te=0;te<z.length;++te)ne+=z[te].height;this.insertInner(x-this.first,z,ne)},remove:function(x,z){this.removeInner(x-this.first,z)},getValue:function(x){var z=Lr(this,this.first,this.first+this.size);return x===!1?z:z.join(x||this.lineSeparator())},setValue:po(function(x){var z=st(this.first,0),ne=this.first+this.size-1;dl(this,{from:z,to:st(ne,nn(this,ne).text.length),text:this.splitLines(x),origin:"setValue",full:!0},!0),this.cm&&Ts(this.cm,0,0),To(this,Ps(z),Ge)}),replaceRange:function(x,z,ne,te){z=Nn(this,z),ne=ne?Nn(this,ne):z,ec(this,x,z,ne,te)},getRange:function(x,z,ne){var te=jn(this,Nn(this,x),Nn(this,z));return ne===!1?te:te.join(ne||this.lineSeparator())},getLine:function(x){var z=this.getLineHandle(x);return z&&z.text},getLineHandle:function(x){if(fr(this,x))return nn(this,x)},getLineNumber:function(x){return tr(x)},getLineHandleVisualStart:function(x){return typeof x=="number"&&(x=nn(this,x)),lt(x)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(x){return Nn(this,x)},getCursor:function(x){var z=this.sel.primary(),ne;return x==null||x=="head"?ne=z.head:x=="anchor"?ne=z.anchor:x=="end"||x=="to"||x===!1?ne=z.to():ne=z.from(),ne},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:po(function(x,z,ne){ed(this,Nn(this,typeof x=="number"?st(x,z||0):x),null,ne)}),setSelection:po(function(x,z,ne){ed(this,Nn(this,x),Nn(this,z||x),ne)}),extendSelection:po(function(x,z,ne){$l(this,Nn(this,x),z&&Nn(this,z),ne)}),extendSelections:po(function(x,z){ui(this,tn(this,x),z)}),extendSelectionsBy:po(function(x,z){var ne=yn(this.sel.ranges,x);ui(this,tn(this,ne),z)}),setSelections:po(function(x,z,ne){if(x.length){for(var te=[],ie=0;ie<x.length;ie++)te[ie]=new ja(Nn(this,x[ie].anchor),Nn(this,x[ie].head));z==null&&(z=Math.min(x.length-1,this.sel.primIndex)),To(this,Ms(this.cm,te,z),ne)}}),addSelection:po(function(x,z,ne){var te=this.sel.ranges.slice(0);te.push(new ja(Nn(this,x),Nn(this,z||x))),To(this,Ms(this.cm,te,te.length-1),ne)}),getSelection:function(x){for(var z=this.sel.ranges,ne,te=0;te<z.length;te++){var ie=jn(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=jn(this,ne[te].from(),ne[te].to());x!==!1&&(ie=ie.join(x||this.lineSeparator())),z[te]=ie}return z},replaceSelection:function(x,z,ne){for(var te=[],ie=0;ie<this.sel.ranges.length;ie++)te[ie]=x;this.replaceSelections(te,z,ne||"+input")},replaceSelections:po(function(x,z,ne){for(var te=[],ie=this.sel,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 _e=z&&z!="end"&&nu(this,te,z),Pe=te.length-1;Pe>=0;Pe--)dl(this,te[Pe]);_e?as(this,_e):this.cm&&zo(this.cm)}),undo:po(function(){tl(this,"undo")}),redo:po(function(){tl(this,"redo")}),undoSelection:po(function(){tl(this,"undo",!0)}),redoSelection:po(function(){tl(this,"redo",!0)}),setExtending:function(x){this.extend=x},getExtending:function(){return this.extend},historySize:function(){for(var x=this.history,z=0,ne=0,te=0;te<x.done.length;te++)x.done[te].ranges||++z;for(var ie=0;ie<x.undone.length;ie++)x.undone[ie].ranges||++ne;return{undo:z,redo:ne}},clearHistory:function(){var x=this;this.history=new Cc(this.history.maxGeneration),Qs(this,function(z){return z.history=x.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(x){return x&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(x){return this.history.generation==(x||this.cleanGeneration)},getHistory:function(){return{done:Bl(this.history.done),undone:Bl(this.history.undone)}},setHistory:function(x){var z=this.history=new Cc(this.history.maxGeneration);z.done=Bl(x.done.slice(0),null,!0),z.undone=Bl(x.undone.slice(0),null,!0)},setGutterMarker:po(function(x,z,ne){return Lc(this,x,"gutter",function(te){var ie=te.gutterMarkers||(te.gutterMarkers={});return ie[z]=ne,!ne&&oe(ie)&&(te.gutterMarkers=null),!0})}),clearGutter:po(function(x){var z=this;this.iter(function(ne){ne.gutterMarkers&&ne.gutterMarkers[x]&&Lc(z,ne,"gutter",function(){return ne.gutterMarkers[x]=null,oe(ne.gutterMarkers)&&(ne.gutterMarkers=null),!0})})}),lineInfo:function(x){var z;if(typeof x=="number"){if(!fr(this,x)||(z=x,x=nn(this,x),!x))return null}else if(z=tr(x),z==null)return null;return{line:z,handle:x,text:x.text,gutterMarkers:x.gutterMarkers,textClass:x.textClass,bgClass:x.bgClass,wrapClass:x.wrapClass,widgets:x.widgets}},addLineClass:po(function(x,z,ne){return Lc(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(Se(ne).test(te[ie]))return!1;te[ie]+=" "+ne}return!0})}),removeLineClass:po(function(x,z,ne){return Lc(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(Se(ne));if(!ye)return!1;var _e=ye.index+ye[0].length;te[ie]=ce.slice(0,ye.index)+(!ye.index||_e==ce.length?"":" ")+ce.slice(_e)||null}else return!1;return!0})}),addLineWidget:po(function(x,z,ne){return rf(this,x,z,ne)}),removeLineWidget:function(x){x.clear()},markText:function(x,z,ne){return nl(this,Nn(this,x),Nn(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=Nn(this,x),nl(this,x,x,ne,"bookmark")},findMarksAt:function(x){x=Nn(this,x);var z=[],ne=nn(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=Nn(this,x),z=Nn(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 _e=0;_e<ye.length;_e++){var Pe=ye[_e];!(Pe.to!=null&&ie==x.line&&x.ch>=Pe.to||Pe.from==null&&ie!=x.line||Pe.from!=null&&ie==z.line&&Pe.from>=z.ch)&&(!ne||ne(Pe.marker))&&te.push(Pe.marker.parent||Pe.marker)}++ie}),te},getAllMarks:function(){var x=[];return this.iter(function(z){var ne=z.markedSpans;if(ne)for(var te=0;te<ne.length;++te)ne[te].from!=null&&x.push(ne[te].marker)}),x},posFromIndex:function(x){var z,ne=this.first,te=this.lineSeparator().length;return this.iter(function(ie){var ce=ie.text.length+te;if(ce>x)return z=x,!0;x-=ce,++ne}),Nn(this,st(ne,z))},indexFromPos:function(x){x=Nn(this,x);var z=x.ch;if(x.line<this.first||x.ch<0)return 0;var ne=this.lineSeparator().length;return this.iter(this.first,x.line,function(te){z+=te.text.length+ne}),z},copy:function(x){var z=new Mo(Lr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return z.scrollTop=this.scrollTop,z.scrollLeft=this.scrollLeft,z.sel=this.sel,z.extend=!1,x&&(z.history.undoDepth=this.history.undoDepth,z.setHistory(this.getHistory())),z},linkedDoc:function(x){x||(x={});var z=this.first,ne=this.first+this.size;x.from!=null&&x.from>z&&(z=x.from),x.to!=null&&x.to<ne&&(ne=x.to);var te=new Mo(Lr(this,z,ne),x.mode||this.modeOption,z,this.lineSep,this.direction);return x.sharedHist&&(te.history=this.history),(this.linked||(this.linked=[])).push({doc:te,sharedHist:x.sharedHist}),te.linked=[{doc:this,isParent:!0,sharedHist:x.sharedHist}],of(te,pl(this)),te},unlinkDoc:function(x){if(x instanceof ia&&(x=x.doc),this.linked)for(var z=0;z<this.linked.length;++z){var ne=this.linked[z];if(ne.doc==x){this.linked.splice(z,1),x.unlinkDoc(this),Ss(pl(this));break}}if(x.history==this.history){var te=[x.id];Qs(x,function(ie){return te.push(ie.id)},!0),x.history=new Cc(null),x.history.done=Bl(this.history.done,te),x.history.undone=Bl(this.history.undone,te)}},iterLinkedDocs:function(x){Qs(this,x)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(x){return this.lineSep?x.split(this.lineSep):yt(x)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:po(function(x){x!="rtl"&&(x="ltr"),x!=this.direction&&(this.direction=x,this.iter(function(z){return z.order=null}),this.cm&&au(this.cm))})}),Mo.prototype.eachLine=Mo.prototype.iter;var rd=0;function eh(x){var z=this;if(rc(z),!(Ht(z,x)||Ji(z.display,x))){Sr(x),ve&&(rd=+new Date);var ne=Ao(z,x,!0),te=x.dataTransfer.files;if(!(!ne||z.isReadOnly()))if(te&&te.length&&window.FileReader&&window.File)for(var ie=te.length,ce=Array(ie),ye=0,_e=function(){++ye==ie&&za(z,function(){ne=Nn(z.doc,ne);var on={from:ne,to:ne,text:z.doc.splitLines(ce.filter(function(Qn){return Qn!=null}).join(z.doc.lineSeparator())),origin:"paste"};dl(z.doc,on),as(z.doc,Ps(Nn(z.doc,ne),Nn(z.doc,Js(on))))})()},Pe=function(on,Qn){if(z.options.allowDropFileTypes&&ht(z.options.allowDropFileTypes,on.type)==-1){_e();return}var yr=new FileReader;yr.onerror=function(){return _e()},yr.onload=function(){var $r=yr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test($r)){_e();return}ce[Qn]=$r,_e()},yr.readAsText(on)},$e=0;$e<te.length;$e++)Pe(te[$e],$e);else{if(z.state.draggingText&&z.doc.sel.contains(ne)>-1){z.state.draggingText(x),setTimeout(function(){return z.display.input.focus()},20);return}try{var bt=x.dataTransfer.getData("Text");if(bt){var Pt;if(z.state.draggingText&&!z.state.draggingText.copy&&(Pt=z.listSelections()),kc(z.doc,Ps(ne,ne)),Pt)for(var gn=0;gn<Pt.length;++gn)ec(z.doc,"",Pt[gn].anchor,Pt[gn].head,"drag");z.replaceSelection(bt,"around","paste"),z.display.input.focus()}}catch(on){}}}}function th(x,z){if(ve&&(!x.state.draggingText||+new Date-rd<100)){Or(z);return}if(!(Ht(x,z)||Ji(x.display,z))&&(z.dataTransfer.setData("Text",x.getSelection()),z.dataTransfer.effectAllowed="copyMove",z.dataTransfer.setDragImage&&!ot)){var ne=vt("img",null,null,"position: fixed; left: 0; top: 0;");ne.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ie&&(ne.width=ne.height=1,x.display.wrapper.appendChild(ne),ne._top=ne.offsetTop),z.dataTransfer.setDragImage(ne,0,0),Ie&&ne.parentNode.removeChild(ne)}}function id(x,z){var ne=Ao(x,z);if(ne){var te=document.createDocumentFragment();oa(x,ne,te),x.display.dragCursor||(x.display.dragCursor=vt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),x.display.lineSpace.insertBefore(x.display.dragCursor,x.display.cursorDiv)),_t(x.display.dragCursor,te)}}function rc(x){x.display.dragCursor&&(x.display.lineSpace.removeChild(x.display.dragCursor),x.display.dragCursor=null)}function ic(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 Dr=!1;function ad(){Dr||(gu(),Dr=!0)}function gu(){var x;dn(window,"resize",function(){x==null&&(x=setTimeout(function(){x=null,ic(vu)},100))}),dn(window,"blur",function(){return ic(Fo)})}function vu(x){var z=x.display;z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.scrollbarsClipped=!1,x.setSize()}for(var Os={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ac=0;Ac<10;Ac++)Os[Ac+48]=Os[Ac+96]=String(Ac);for(var yu=65;yu<=90;yu++)Os[yu]=String.fromCharCode(yu);for(var Tc=1;Tc<=12;Tc++)Os[Tc+111]=Os[Tc+63235]="F"+Tc;var Qa={};Qa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Qa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Qa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Qa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Qa.default=Le?Qa.macDefault:Qa.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 _e=z[ye];if(/^(cmd|meta|m)$/i.test(_e))ce=!0;else if(/^a(lt)?$/i.test(_e))ne=!0;else if(/^(c|ctrl|control)$/i.test(_e))te=!0;else if(/^s(hift)?$/i.test(_e))ie=!0;else throw new Error("Unrecognized modifier name: "+_e)}return ne&&(x="Alt-"+x),te&&(x="Ctrl-"+x),ce&&(x="Cmd-"+x),ie&&(x="Shift-"+x),x}function od(x){var z={};for(var ne in x)if(x.hasOwnProperty(ne)){var te=x[ne];if(/^(name|fallthrough|(de|at)tach)$/.test(ne))continue;if(te=="..."){delete x[ne];continue}for(var ie=yn(ne.split(" "),nh),ce=0;ce<ie.length;ce++){var ye=void 0,_e=void 0;ce==ie.length-1?(_e=ie.join(" "),ye=te):(_e=ie.slice(0,ce+1).join(" "),ye="...");var Pe=z[_e];if(!Pe)z[_e]=ye;else if(Pe!=ye)throw new Error("Inconsistent bindings for "+_e)}delete x[ne]}for(var $e in z)x[$e]=z[$e];return x}function rl(x,z,ne,te){z=ss(z);var ie=z.call?z.call(x,te):z[x];if(ie===!1)return"nothing";if(ie==="...")return"multi";if(ie!=null&&ne(ie))return"handled";if(z.fallthrough){if(Object.prototype.toString.call(z.fallthrough)!="[object Array]")return rl(x,z.fallthrough,ne,te);for(var ce=0;ce<z.fallthrough.length;ce++){var ye=rl(x,z.fallthrough[ce],ne,te);if(ye)return ye}}}function Ic(x){var z=typeof x=="string"?x:Os[x.keyCode];return z=="Ctrl"||z=="Alt"||z=="Shift"||z=="Mod"}function ml(x,z,ne){var te=x;return z.altKey&&te!="Alt"&&(x="Alt-"+x),(ct?z.metaKey:z.ctrlKey)&&te!="Ctrl"&&(x="Ctrl-"+x),(ct?z.ctrlKey:z.metaKey)&&te!="Mod"&&(x="Cmd-"+x),!ne&&z.shiftKey&&te!="Shift"&&(x="Shift-"+x),x}function zl(x,z){if(Ie&&x.keyCode==34&&x.char)return!1;var ne=Os[x.keyCode];return ne==null||x.altGraphKey?!1:(x.keyCode==3&&x.code&&(ne=x.code),ml(ne,x,z))}function ss(x){return typeof x=="string"?Qa[x]:x}function ks(x,z){for(var ne=x.doc.sel.ranges,te=[],ie=0;ie<ne.length;ie++){for(var ce=z(ne[ie]);te.length&&Ct(ce.from,Zt(te).to)<=0;){var ye=te.pop();if(Ct(ye.from,ce.from)<0){ce.from=ye.from;break}}te.push(ce)}ga(x,function(){for(var _e=te.length-1;_e>=0;_e--)ec(x.doc,"",te[_e].from,te[_e].to,"+delete");zo(x)})}function Zo(x,z,ne){var te=Lt(x.text,z+ne,ne);return te<0||te>x.text.length?null:te}function Ws(x,z,ne){var te=Zo(x,z.ch,ne);return te==null?null:new st(z.line,te,ne<0?"after":"before")}function Kl(x,z,ne,te,ie){if(x){z.doc.direction=="rtl"&&(ie=-ie);var ce=Rn(ne,z.doc.direction);if(ce){var ye=ie<0?Zt(ce):ce[0],_e=ie<0==(ye.level==1),Pe=_e?"after":"before",$e;if(ye.level>0||z.doc.direction=="rtl"){var bt=ea(z,ne);$e=ie<0?ne.text.length-1:0;var Pt=Mi(z,bt,$e).top;$e=Rt(function(gn){return Mi(z,bt,gn).top==Pt},ie<0==(ye.level==1)?ye.from:ye.to-1,$e),Pe=="before"&&($e=Zo(ne,$e,1))}else $e=ie<0?ye.to:ye.from;return new st(te,$e,Pe)}}return new st(te,ie<0?ne.text.length:0,ie<0?"before":"after")}function Us(x,z,ne,te){var ie=Rn(z,x.doc.direction);if(!ie)return Ws(z,ne,te);ne.ch>=z.text.length?(ne.ch=z.text.length,ne.sticky="before"):ne.ch<=0&&(ne.ch=0,ne.sticky="after");var ce=Xt(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 Ws(z,ne,te);var _e=function(Xr,ai){return Zo(z,Xr instanceof st?Xr.ch:Xr,ai)},Pe,$e=function(Xr){return x.options.lineWrapping?(Pe=Pe||ea(x,z),Fa(x,z,Pe,Xr)):{begin:0,end:z.text.length}},bt=$e(ne.sticky=="before"?_e(ne,-1):ne.ch);if(x.doc.direction=="rtl"||ye.level==1){var Pt=ye.level==1==te<0,gn=_e(ne,Pt?1:-1);if(gn!=null&&(Pt?gn<=ye.to&&gn<=bt.end:gn>=ye.from&&gn>=bt.begin)){var on=Pt?"before":"after";return new st(ne.line,gn,on)}}var Qn=function(Xr,ai,Zr){for(var oi=function(to,Wo){return Wo?new st(ne.line,_e(to,1),"before"):new st(ne.line,to,"after")};Xr>=0&&Xr<ie.length;Xr+=ai){var Ki=ie[Xr],ji=ai>0==(Ki.level!=1),ba=ji?Zr.begin:_e(Zr.end,-1);if(Ki.from<=ba&&ba<Ki.to||(ba=ji?Ki.from:_e(Ki.to,-1),Zr.begin<=ba&&ba<Zr.end))return oi(ba,ji)}},yr=Qn(ce+te,te,bt);if(yr)return yr;var $r=te>0?bt.end:_e(bt.begin,-1);return $r!=null&&!(te>0&&$r==z.text.length)&&(yr=Qn(te>0?0:ie.length-1,te,$e($r)),yr)?yr:null}var ac={selectAll:td,singleSelection:function(x){return x.setSelection(x.getCursor("anchor"),x.getCursor("head"),Ge)},killLine:function(x){return ks(x,function(z){if(z.empty()){var ne=nn(x.doc,z.head.line).text.length;return z.head.ch==ne&&z.head.line<x.lastLine()?{from:z.head,to:st(z.head.line+1,0)}:{from:z.head,to:st(z.head.line,ne)}}else return{from:z.from(),to:z.to()}})},deleteLine:function(x){return ks(x,function(z){return{from:st(z.from().line,0),to:Nn(x.doc,st(z.to().line+1,0))}})},delLineLeft:function(x){return ks(x,function(z){return{from:st(z.from().line,0),to:z.from()}})},delWrappedLineLeft:function(x){return ks(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 ks(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(st(x.firstLine(),0))},goDocEnd:function(x){return x.extendSelection(st(x.lastLine()))},goLineStart:function(x){return x.extendSelectionsBy(function(z){return sd(x,z.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(x){return x.extendSelectionsBy(function(z){return lf(x,z.head)},{origin:"+move",bias:1})},goLineEnd:function(x){return x.extendSelectionsBy(function(z){return ld(x,z.head.line)},{origin:"+move",bias:-1})},goLineRight:function(x){return x.extendSelectionsBy(function(z){var ne=x.cursorCoords(z.head,"div").top+5;return x.coordsChar({left:x.display.lineDiv.offsetWidth+100,top:ne},"div")},jt)},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")},jt)},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},jt)},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=Qe(x.getLine(ce.line),ce.ch,te);z.push($t(te-ye%te))}x.replaceSelections(z)},defaultTab:function(x){x.somethingSelected()?x.indentSelection("add"):x.execCommand("insertTab")},transposeChars:function(x){return ga(x,function(){for(var z=x.listSelections(),ne=[],te=0;te<z.length;te++)if(z[te].empty()){var ie=z[te].head,ce=nn(x.doc,ie.line).text;if(ce){if(ie.ch==ce.length&&(ie=new st(ie.line,ie.ch-1)),ie.ch>0)ie=new st(ie.line,ie.ch+1),x.replaceRange(ce.charAt(ie.ch-1)+ce.charAt(ie.ch-2),st(ie.line,ie.ch-2),ie,"+transpose");else if(ie.line>x.doc.first){var ye=nn(x.doc,ie.line-1).text;ye&&(ie=new st(ie.line,1),x.replaceRange(ce.charAt(0)+x.doc.lineSeparator()+ye.charAt(ye.length-1),st(ie.line-1,ye.length-1),ie,"+transpose"))}}ne.push(new ja(ie,ie))}x.setSelections(ne)})},newlineAndIndent:function(x){return ga(x,function(){for(var z=x.listSelections(),ne=z.length-1;ne>=0;ne--)x.replaceRange(x.doc.lineSeparator(),z[ne].anchor,z[ne].head,"+input");z=x.listSelections();for(var te=0;te<z.length;te++)x.indentLine(z[te].from().line,null,!0);zo(x)})},openLine:function(x){return x.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(x){return x.toggleOverwrite()}};function sd(x,z){var ne=nn(x.doc,z),te=lt(ne);return te!=ne&&(z=tr(te)),Kl(!0,x,te,z,1)}function ld(x,z){var ne=nn(x.doc,z),te=Mt(ne);return te!=ne&&(z=tr(te)),Kl(!0,x,ne,z,-1)}function lf(x,z){var ne=sd(x,z.line),te=nn(x.doc,ne.line),ie=Rn(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 st(ne.line,ye?0:ce,ne.sticky)}return ne}function Io(x,z,ne){if(typeof z=="string"&&(z=ac[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)!=Yt}finally{x.display.shift=te,x.state.suppressEdits=!1}return ie}function js(x,z,ne){for(var te=0;te<x.state.keyMaps.length;te++){var ie=rl(z,x.state.keyMaps[te],ne,x);if(ie)return ie}return x.options.extraKeys&&rl(z,x.options.extraKeys,ne,x)||rl(z,x.options.keyMap,ne,x)}var rh=new Ce;function oc(x,z,ne,te){var ie=x.state.keySeq;if(ie){if(Ic(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())}),bu(x,ie+" "+z,ne,te))return!0}return bu(x,z,ne,te)}function bu(x,z,ne,te){var ie=js(x,z,te);return ie=="multi"&&(x.state.keySeq=z),ie=="handled"&&Un(x,"keyHandled",x,z,ne),(ie=="handled"||ie=="multi")&&(Sr(ne),Ci(x)),!!ie}function La(x,z){var ne=zl(z,!0);return ne?z.shiftKey&&!x.state.keySeq?oc(x,"Shift-"+ne,z,function(te){return Io(x,te,!0)})||oc(x,ne,z,function(te){if(typeof te=="string"?/^go[A-Z]/.test(te):te.motion)return Io(x,te)}):oc(x,ne,z,function(te){return Io(x,te)}):!1}function sc(x,z,ne){return oc(x,"'"+ne+"'",z,function(te){return Io(x,te,!0)})}var il=null;function Dc(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&(z.curOp.focus=Ot(),!Ht(z,x))){ve&&we<11&&x.keyCode==27&&(x.returnValue=!1);var ne=x.keyCode;z.display.shift=ne==16||x.shiftKey;var te=La(z,x);Ie&&(il=te?ne:null,!te&&ne==88&&!An&&(Le?x.metaKey:x.ctrlKey)&&z.replaceSelection("",null,"cut")),de&&!Le&&!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;bn(z,"CodeMirror-crosshair");function ne(te){(te.keyCode==18||!te.altKey)&&(Ue(z,"CodeMirror-crosshair"),Mr(document,"keyup",ne),Mr(document,"mouseover",ne))}dn(document,"keyup",ne),dn(document,"mouseover",ne)}function cf(x){x.keyCode==16&&(this.doc.sel.shift=!1),Ht(this,x)}function uf(x){var z=this;if(!(x.target&&x.target!=z.display.input.getField())&&!(Ji(z.display,x)||Ht(z,x)||x.ctrlKey&&!x.altKey||Le&&x.metaKey)){var ne=x.keyCode,te=x.charCode;if(Ie&&ne==il){il=null,Sr(x);return}if(!(Ie&&(!x.which||x.which<10)&&La(z,x))){var ie=String.fromCharCode(te==null?ne:te);ie!="\b"&&(sc(z,x,ie)||z.display.input.onKeyPress(x))}}}var cd=400,ud=function(x,z,ne){this.time=x,this.pos=z,this.button=ne};ud.prototype.compare=function(x,z,ne){return this.time+cd>x&&Ct(z,this.pos)==0&&ne==this.button};var al,Pc;function ih(x,z){var ne=+new Date;return Pc&&Pc.compare(ne,x,z)?(al=Pc=null,"triple"):al&&al.compare(ne,x,z)?(Pc=new ud(ne,x,z),al=null,"double"):(al=new ud(ne,x,z),Pc=null,"single")}function Vo(x){var z=this,ne=z.display;if(!(Ht(z,x)||ne.activeTouch&&ne.input.supportsTouch())){if(ne.input.ensurePolled(),ne.shift=x.shiftKey,Ji(ne,x)){Ee||(ne.scroller.draggable=!1,setTimeout(function(){return ne.scroller.draggable=!0},100));return}if(!ts(z,x)){var te=Ao(z,x),ie=ur(x),ce=te?ih(te,ie):"single";window.focus(),ie==1&&z.state.selectingText&&z.state.selectingText(x),!(te&&gl(z,ie,te,ce,x))&&(ie==1?te?wu(z,te,ce,x):Vr(x)==ne.scroller&&Sr(x):ie==2?(te&&$l(z.doc,te),setTimeout(function(){return ne.input.focus()},20)):ie==3&&(ke?z.display.input.onContextMenu(x):Ha(z)))}}}function gl(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,oc(x,ml(ce,ie),ie,function(ye){if(typeof ye=="string"&&(ye=ac[ye]),!ye)return!1;var _e=!1;try{x.isReadOnly()&&(x.state.suppressEdits=!0),_e=ye(x,ne)!=Yt}finally{x.state.suppressEdits=!1}return _e})}function xu(x,z,ne){var te=x.getOption("configureMouse"),ie=te?te(x,z,ne):{};if(ie.unit==null){var ce=gt?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=Le?ne.metaKey:ne.ctrlKey),ie.moveOnDrag==null&&(ie.moveOnDrag=!(Le?ne.altKey:ne.ctrlKey)),ie}function wu(x,z,ne,te){ve?setTimeout(Cn(Di,x),0):x.curOp.focus=Ot();var ie=xu(x,ne,te),ce=x.doc.sel,ye;x.options.dragDrop&&si&&!x.isReadOnly()&&ne=="single"&&(ye=ce.contains(z))>-1&&(Ct((ye=ce.ranges[ye]).from(),z)<0||z.xRel>0)&&(Ct(ye.to(),z)>0||z.xRel<0)?ah(x,te,z,ie):dd(x,te,z,ie)}function ah(x,z,ne,te){var ie=x.display,ce=!1,ye=za(x,function($e){Ee&&(ie.scroller.draggable=!1),x.state.draggingText=!1,Mr(ie.wrapper.ownerDocument,"mouseup",ye),Mr(ie.wrapper.ownerDocument,"mousemove",_e),Mr(ie.scroller,"dragstart",Pe),Mr(ie.scroller,"drop",ye),ce||(Sr($e),te.addNew||$l(x.doc,ne,null,null,te.extend),Ee&&!ot||ve&&we==9?setTimeout(function(){ie.wrapper.ownerDocument.body.focus({preventScroll:!0}),ie.input.focus()},20):ie.input.focus())}),_e=function($e){ce=ce||Math.abs(z.clientX-$e.clientX)+Math.abs(z.clientY-$e.clientY)>=10},Pe=function(){return ce=!0};Ee&&(ie.scroller.draggable=!0),x.state.draggingText=ye,ye.copy=!te.moveOnDrag,ie.scroller.dragDrop&&ie.scroller.dragDrop(),dn(ie.wrapper.ownerDocument,"mouseup",ye),dn(ie.wrapper.ownerDocument,"mousemove",_e),dn(ie.scroller,"dragstart",Pe),dn(ie.scroller,"drop",ye),Ha(x),setTimeout(function(){return ie.input.focus()},20)}function df(x,z,ne){if(ne=="char")return new ja(z,z);if(ne=="word")return x.findWordAt(z);if(ne=="line")return new ja(st(z.line,0),Nn(x.doc,st(z.line+1,0)));var te=ne(x,z);return new ja(te.from,te.to)}function dd(x,z,ne,te){var ie=x.display,ce=x.doc;Sr(z);var ye,_e,Pe=ce.sel,$e=Pe.ranges;if(te.addNew&&!te.extend?(_e=ce.sel.contains(ne),_e>-1?ye=$e[_e]:ye=new ja(ne,ne)):(ye=ce.sel.primary(),_e=ce.sel.primIndex),te.unit=="rectangle")te.addNew||(ye=new ja(ne,ne)),ne=Ao(x,z,!0,!0),_e=-1;else{var bt=df(x,ne,te.unit);te.extend?ye=fu(ye,bt.anchor,bt.head,te.extend):ye=bt}te.addNew?_e==-1?(_e=$e.length,To(ce,Ms(x,$e.concat([ye]),_e),{scroll:!1,origin:"*mouse"})):$e.length>1&&$e[_e].empty()&&te.unit=="char"&&!te.extend?(To(ce,Ms(x,$e.slice(0,_e).concat($e.slice(_e+1)),0),{scroll:!1,origin:"*mouse"}),Pe=ce.sel):ws(ce,_e,ye,rt):(_e=0,To(ce,new vs([ye],0),rt),Pe=ce.sel);var Pt=ne;function gn(Zr){if(Ct(Pt,Zr)!=0)if(Pt=Zr,te.unit=="rectangle"){for(var oi=[],Ki=x.options.tabSize,ji=Qe(nn(ce,ne.line).text,ne.ch,Ki),ba=Qe(nn(ce,Zr.line).text,Zr.ch,Ki),to=Math.min(ji,ba),Wo=Math.max(ji,ba),bo=Math.min(ne.line,Zr.line),us=Math.min(x.lastLine(),Math.max(ne.line,Zr.line));bo<=us;bo++){var ds=nn(ce,bo).text,Do=_n(ds,to,Ki);to==Wo?oi.push(new ja(st(bo,Do),st(bo,Do))):ds.length>Do&&oi.push(new ja(st(bo,Do),st(bo,_n(ds,Wo,Ki))))}oi.length||oi.push(new ja(ne,ne)),To(ce,Ms(x,Pe.ranges.slice(0,_e).concat(oi),_e),{origin:"*mouse",scroll:!1}),x.scrollIntoView(Zr)}else{var fs=ye,sa=df(x,Zr,te.unit),So=fs.anchor,xo;Ct(sa.anchor,So)>0?(xo=sa.head,So=vn(fs.from(),sa.anchor)):(xo=sa.anchor,So=hn(fs.to(),sa.head));var Co=Pe.ranges.slice(0);Co[_e]=ff(x,new ja(Nn(ce,So),xo)),To(ce,Ms(x,Co,_e),rt)}}var on=ie.wrapper.getBoundingClientRect(),Qn=0;function yr(Zr){var oi=++Qn,Ki=Ao(x,Zr,!0,te.unit=="rectangle");if(Ki)if(Ct(Ki,Pt)!=0){x.curOp.focus=Ot(),gn(Ki);var ji=va(ie,ce);(Ki.line>=ji.to||Ki.line<ji.from)&&setTimeout(za(x,function(){Qn==oi&&yr(Zr)}),150)}else{var ba=Zr.clientY<on.top?-20:Zr.clientY>on.bottom?20:0;ba&&setTimeout(za(x,function(){Qn==oi&&(ie.scroller.scrollTop+=ba,yr(Zr))}),50)}}function $r(Zr){x.state.selectingText=!1,Qn=1/0,Zr&&(Sr(Zr),ie.input.focus()),Mr(ie.wrapper.ownerDocument,"mousemove",Xr),Mr(ie.wrapper.ownerDocument,"mouseup",ai),ce.history.lastSelOrigin=null}var Xr=za(x,function(Zr){Zr.buttons===0||!ur(Zr)?$r(Zr):yr(Zr)}),ai=za(x,$r);x.state.selectingText=ai,dn(ie.wrapper.ownerDocument,"mousemove",Xr),dn(ie.wrapper.ownerDocument,"mouseup",ai)}function ff(x,z){var ne=z.anchor,te=z.head,ie=nn(x.doc,ne.line);if(Ct(ne,te)==0&&ne.sticky==te.sticky)return z;var ce=Rn(ie);if(!ce)return z;var ye=Xt(ce,ne.ch,ne.sticky),_e=ce[ye];if(_e.from!=ne.ch&&_e.to!=ne.ch)return z;var Pe=ye+(_e.from==ne.ch==(_e.level!=1)?0:1);if(Pe==0||Pe==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 bt=Xt(ce,te.ch,te.sticky),Pt=bt-ye||(te.ch-ne.ch)*(_e.level==1?-1:1);bt==Pe-1||bt==Pe?$e=Pt<0:$e=Pt>0}var gn=ce[Pe+($e?-1:0)],on=$e==(gn.level==1),Qn=on?gn.from:gn.to,yr=on?"after":"before";return ne.ch==Qn&&ne.sticky==yr?z:new ja(new st(ne.line,Qn,yr),te)}function Oc(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&&Sr(z);var ye=x.display,_e=ye.lineDiv.getBoundingClientRect();if(ce>_e.bottom||!er(x,ne))return Er(z);ce-=_e.top-ye.viewOffset;for(var Pe=0;Pe<x.display.gutterSpecs.length;++Pe){var $e=ye.gutters.childNodes[Pe];if($e&&$e.getBoundingClientRect().right>=ie){var bt=dr(x.doc,ce),Pt=x.display.gutterSpecs[Pe];return at(x,ne,x,bt,Pt.className,z),Er(z)}}}function ts(x,z){return Oc(x,z,"gutterClick",!0)}function vl(x,z){Ji(x.display,z)||hf(x,z)||Ht(x,z,"contextmenu")||ke||x.display.input.onContextMenu(z)}function hf(x,z){return er(x,"gutterContextMenu")?Oc(x,z,"gutterContextMenu",!1):!1}function fd(x){x.display.wrapper.className=x.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+x.options.theme.replace(/(^|\s)\s*/g," cm-s-"),mi(x)}var yl={toString:function(){return"CodeMirror.Init"}},pf={},Su={};function oh(x){var z=x.optionHandlers;function ne(te,ie,ce,ye){x.defaults[te]=ie,ce&&(z[te]=ye?function(_e,Pe,$e){$e!=yl&&ce(_e,Pe,$e)}:ce)}x.defineOption=ne,x.Init=yl,ne("value","",function(te,ie){return te.setValue(ie)},!0),ne("mode",null,function(te,ie){te.doc.modeOption=ie,ru(te)},!0),ne("indentUnit",2,ru,!0),ne("indentWithTabs",!1),ne("smartIndent",!0),ne("tabSize",4,function(te){Rl(te),mi(te),Ri(te)},!0),ne("lineSeparator",null,function(te,ie){if(te.doc.lineSep=ie,!!ie){var ce=[],ye=te.doc.first;te.doc.iter(function(Pe){for(var $e=0;;){var bt=Pe.text.indexOf(ie,$e);if(bt==-1)break;$e=bt+ie.length,ce.push(st(ye,bt))}ye++});for(var _e=ce.length-1;_e>=0;_e--)ec(te.doc,ie,ce[_e],st(ce[_e].line,ce[_e].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!=yl&&te.refresh()}),ne("specialCharPlaceholder",Re,function(te){return te.refresh()},!0),ne("electricChars",!0),ne("inputStyle",Je?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ne("spellcheck",!1,function(te,ie){return te.getInputField().spellcheck=ie},!0),ne("autocorrect",!1,function(te,ie){return te.getInputField().autocorrect=ie},!0),ne("autocapitalize",!1,function(te,ie){return te.getInputField().autocapitalize=ie},!0),ne("rtlMoveVisually",!qt),ne("wholeLineUpdateBefore",!0),ne("theme","default",function(te){fd(te),Ql(te)},!0),ne("keyMap","default",function(te,ie,ce){var ye=ss(ie),_e=ce!=yl&&ss(ce);_e&&_e.detach&&_e.detach(te,ye),ye.attach&&ye.attach(te,_e||null)}),ne("extraKeys",null),ne("configureMouse",null),ne("lineWrapping",!1,mf,!0),ne("gutters",[],function(te,ie){te.display.gutterSpecs=eu(ie,te.options.lineNumbers),Ql(te)},!0),ne("fixedGutter",!0,function(te,ie){te.display.gutters.style.left=ie?Oo(te.display)+"px":"0",te.refresh()},!0),ne("coverGutterNextToScrollbar",!1,function(te){return xs(te)},!0),ne("scrollbarStyle","native",function(te){vc(te),xs(te),te.display.scrollbars.setScrollTop(te.doc.scrollTop),te.display.scrollbars.setScrollLeft(te.doc.scrollLeft)},!0),ne("lineNumbers",!1,function(te,ie){te.display.gutterSpecs=eu(te.options.gutters,ie),Ql(te)},!0),ne("firstLineNumber",1,Ql,!0),ne("lineNumberFormatter",function(te){return te},Ql,!0),ne("showCursorWhenSelecting",!1,Qo,!0),ne("resetSelectionOnContextMenu",!0),ne("lineWiseCopyCut",!0),ne("pasteLinesPerSelection",!0),ne("selectionsMayTouch",!1),ne("readOnly",!1,function(te,ie){ie=="nocursor"&&(Fo(te),te.display.input.blur()),te.display.input.readOnlyChanged(ie)}),ne("screenReaderLabel",null,function(te,ie){ie=ie===""?null:ie,te.display.input.screenReaderLabelChanged(ie)}),ne("disableInput",!1,function(te,ie){ie||te.display.input.reset()},!0),ne("dragDrop",!0,sh),ne("allowDropFileTypes",null),ne("cursorBlinkRate",530),ne("cursorScrollMargin",0),ne("cursorHeight",1,Qo,!0),ne("singleCursorHeightPerLine",!0,Qo,!0),ne("workTime",100),ne("workDelay",100),ne("flattenSpans",!0,Rl,!0),ne("addModeClass",!1,Rl,!0),ne("pollInterval",100),ne("undoDepth",200,function(te,ie){return te.doc.history.undoDepth=ie}),ne("historyEventDelay",1250),ne("viewportMargin",10,function(te){return te.refresh()},!0),ne("maxHighlightLength",1e4,Rl,!0),ne("moveInputWithCursor",!0,function(te,ie){ie||te.display.input.resetPosition()}),ne("tabindex",null,function(te,ie){return te.display.input.getField().tabIndex=ie||""}),ne("autofocus",null),ne("direction","ltr",function(te,ie){return te.doc.setDirection(ie)},!0),ne("phrases",null)}function sh(x,z,ne){var te=ne&&ne!=yl;if(!z!=!te){var ie=x.display.dragFunctions,ce=z?dn:Mr;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?(bn(x.display.wrapper,"CodeMirror-wrap"),x.display.sizer.style.minWidth="",x.display.sizerWidth=null):(Ue(x.display.wrapper,"CodeMirror-wrap"),Pn(x)),lo(x),Ri(x),mi(x),setTimeout(function(){return xs(x)},100)}function ia(x,z){var ne=this;if(!(this instanceof ia))return new ia(x,z);this.options=z=z?or(z):{},or(pf,z,!1);var te=z.value;typeof te=="string"?te=new Mo(te,z.mode,null,z.lineSeparator,z.direction):z.mode&&(te.modeOption=z.mode),this.doc=te;var ie=new ia.inputStyles[z.inputStyle](this),ce=this.display=new Gd(x,te,ie,z);ce.wrapper.CodeMirror=this,fd(this),z.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),vc(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 Ce,keySeq:null,specialChars:null},z.autofocus&&!Je&&ce.input.focus(),ve&&we<11&&setTimeout(function(){return ne.display.input.reset(!0)},20),lh(this),ad(),Ks(this),this.curOp.forceUpdate=!0,wc(this,te),z.autofocus&&!Je||this.hasFocus()?setTimeout(function(){ne.hasFocus()&&!ne.state.focused&&Va(ne)},20):Fo(this);for(var ye in Su)Su.hasOwnProperty(ye)&&Su[ye](this,z[ye],yl);bc(this),z.finishInit&&z.finishInit(this);for(var _e=0;_e<hd.length;++_e)hd[_e](this);Ds(this),Ee&&z.lineWrapping&&getComputedStyle(ce.lineDiv).textRendering=="optimizelegibility"&&(ce.lineDiv.style.textRendering="auto")}ia.defaults=pf,ia.optionHandlers=Su;function lh(x){var z=x.display;dn(z.scroller,"mousedown",za(x,Vo)),ve&&we<11?dn(z.scroller,"dblclick",za(x,function(Pe){if(!Ht(x,Pe)){var $e=Ao(x,Pe);if(!(!$e||ts(x,Pe)||Ji(x.display,Pe))){Sr(Pe);var bt=x.findWordAt($e);$l(x.doc,bt.anchor,bt.head)}}})):dn(z.scroller,"dblclick",function(Pe){return Ht(x,Pe)||Sr(Pe)}),dn(z.scroller,"contextmenu",function(Pe){return vl(x,Pe)}),dn(z.input.getField(),"contextmenu",function(Pe){z.scroller.contains(Pe.target)||vl(x,Pe)});var ne,te={end:0};function ie(){z.activeTouch&&(ne=setTimeout(function(){return z.activeTouch=null},1e3),te=z.activeTouch,te.end=+new Date)}function ce(Pe){if(Pe.touches.length!=1)return!1;var $e=Pe.touches[0];return $e.radiusX<=1&&$e.radiusY<=1}function ye(Pe,$e){if($e.left==null)return!0;var bt=$e.left-Pe.left,Pt=$e.top-Pe.top;return bt*bt+Pt*Pt>20*20}dn(z.scroller,"touchstart",function(Pe){if(!Ht(x,Pe)&&!ce(Pe)&&!ts(x,Pe)){z.input.ensurePolled(),clearTimeout(ne);var $e=+new Date;z.activeTouch={start:$e,moved:!1,prev:$e-te.end<=300?te:null},Pe.touches.length==1&&(z.activeTouch.left=Pe.touches[0].pageX,z.activeTouch.top=Pe.touches[0].pageY)}}),dn(z.scroller,"touchmove",function(){z.activeTouch&&(z.activeTouch.moved=!0)}),dn(z.scroller,"touchend",function(Pe){var $e=z.activeTouch;if($e&&!Ji(z,Pe)&&$e.left!=null&&!$e.moved&&new Date-$e.start<300){var bt=x.coordsChar(z.activeTouch,"page"),Pt;!$e.prev||ye($e,$e.prev)?Pt=new ja(bt,bt):!$e.prev.prev||ye($e,$e.prev.prev)?Pt=x.findWordAt(bt):Pt=new ja(st(bt.line,0),Nn(x.doc,st(bt.line+1,0))),x.setSelection(Pt.anchor,Pt.head),x.focus(),Sr(Pe)}ie()}),dn(z.scroller,"touchcancel",ie),dn(z.scroller,"scroll",function(){z.scroller.clientHeight&&(Ia(x,z.scroller.scrollTop),go(x,z.scroller.scrollLeft,!0),at(x,"scroll",x))}),dn(z.scroller,"mousewheel",function(Pe){return Xu(x,Pe)}),dn(z.scroller,"DOMMouseScroll",function(Pe){return Xu(x,Pe)}),dn(z.wrapper,"scroll",function(){return z.wrapper.scrollTop=z.wrapper.scrollLeft=0}),z.dragFunctions={enter:function(Pe){Ht(x,Pe)||Or(Pe)},over:function(Pe){Ht(x,Pe)||(id(x,Pe),Or(Pe))},start:function(Pe){return th(x,Pe)},drop:za(x,eh),leave:function(Pe){Ht(x,Pe)||rc(x)}};var _e=z.input.getField();dn(_e,"keyup",function(Pe){return cf.call(x,Pe)}),dn(_e,"keydown",za(x,Dc)),dn(_e,"keypress",za(x,uf)),dn(_e,"focus",function(Pe){return Va(x,Pe)}),dn(_e,"blur",function(Pe){return Fo(x,Pe)})}var hd=[];ia.defineInitHook=function(x){return hd.push(x)};function Rs(x,z,ne,te){var ie=x.doc,ce;ne==null&&(ne="add"),ne=="smart"&&(ie.mode.indent?ce=gi(x,z).state:ne="prev");var ye=x.options.tabSize,_e=nn(ie,z),Pe=Qe(_e.text,null,ye);_e.stateAfter&&(_e.stateAfter=null);var $e=_e.text.match(/^\s*/)[0],bt;if(!te&&!/\S/.test(_e.text))bt=0,ne="not";else if(ne=="smart"&&(bt=ie.mode.indent(ce,_e.text.slice($e.length),_e.text),bt==Yt||bt>150)){if(!te)return;ne="prev"}ne=="prev"?z>ie.first?bt=Qe(nn(ie,z-1).text,null,ye):bt=0:ne=="add"?bt=Pe+x.options.indentUnit:ne=="subtract"?bt=Pe-x.options.indentUnit:typeof ne=="number"&&(bt=Pe+ne),bt=Math.max(0,bt);var Pt="",gn=0;if(x.options.indentWithTabs)for(var on=Math.floor(bt/ye);on;--on)gn+=ye,Pt+=" ";if(gn<bt&&(Pt+=$t(bt-gn)),Pt!=$e)return ec(ie,Pt,st(z,0),st(z,$e.length),"+input"),_e.stateAfter=null,!0;for(var Qn=0;Qn<ie.sel.ranges.length;Qn++){var yr=ie.sel.ranges[Qn];if(yr.head.line==z&&yr.head.ch<$e.length){var $r=st(z,$e.length);ws(ie,Qn,new ja($r,$r));break}}}var Bs=null;function bl(x){Bs=x}function pd(x,z,ne,te,ie){var ce=x.doc;x.display.shift=!1,te||(te=ce.sel);var ye=+new Date-200,_e=ie=="paste"||x.state.pasteIncoming>ye,Pe=yt(z),$e=null;if(_e&&te.ranges.length>1)if(Bs&&Bs.text.join(`
|
|
|
`)==z){if(te.ranges.length%Bs.text.length==0){$e=[];for(var bt=0;bt<Bs.text.length;bt++)$e.push(ce.splitLines(Bs.text[bt]))}}else Pe.length==te.ranges.length&&x.options.pasteLinesPerSelection&&($e=yn(Pe,function(Xr){return[Xr]}));for(var Pt=x.curOp.updateInput,gn=te.ranges.length-1;gn>=0;gn--){var on=te.ranges[gn],Qn=on.from(),yr=on.to();on.empty()&&(ne&&ne>0?Qn=st(Qn.line,Qn.ch-ne):x.state.overwrite&&!_e?yr=st(yr.line,Math.min(nn(ce,yr.line).text.length,yr.ch+Zt(Pe).length)):_e&&Bs&&Bs.lineWise&&Bs.text.join(`
|
|
|
`)==Pe.join(`
|
|
|
`)&&(Qn=yr=st(Qn.line,0)));var $r={from:Qn,to:yr,text:$e?$e[gn%$e.length]:Pe,origin:ie||(_e?"paste":x.state.cutIncoming>ye?"cut":"+input")};dl(x.doc,$r),Un(x,"inputRead",x,$r)}z&&!_e&&gd(x,z),zo(x),x.curOp.updateInput<2&&(x.curOp.updateInput=Pt),x.curOp.typing=!0,x.state.pasteIncoming=x.state.cutIncoming=-1}function md(x,z){var ne=x.clipboardData&&x.clipboardData.getData("Text");if(ne)return x.preventDefault(),!z.isReadOnly()&&!z.options.disableInput&&ga(z,function(){return pd(z,ne,0,null,"paste")}),!0}function gd(x,z){if(!(!x.options.electricChars||!x.options.smartIndent))for(var ne=x.doc.sel,te=ne.ranges.length-1;te>=0;te--){var ie=ne.ranges[te];if(!(ie.head.ch>100||te&&ne.ranges[te-1].head.line==ie.head.line)){var ce=x.getModeAt(ie.head),ye=!1;if(ce.electricChars){for(var _e=0;_e<ce.electricChars.length;_e++)if(z.indexOf(ce.electricChars.charAt(_e))>-1){ye=Rs(x,ie.head.line,"smart");break}}else ce.electricInput&&ce.electricInput.test(nn(x.doc,ie.head.line).text.slice(0,ie.head.ch))&&(ye=Rs(x,ie.head.line,"smart"));ye&&Un(x,"electricInput",x,ie.head.line)}}}function lc(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:st(ie,0),head:st(ie+1,0)};ne.push(ce),z.push(x.getRange(ce.anchor,ce.head))}return{text:z,ranges:ne}}function gf(x,z,ne,te){x.setAttribute("autocorrect",ne?"":"off"),x.setAttribute("autocapitalize",te?"":"off"),x.setAttribute("spellcheck",!!z)}function vd(){var x=vt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),z=vt("div",[x],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ee?x.style.width="1000px":x.setAttribute("wrap","off"),ft&&(x.style.border="1px solid black"),gf(x),z}function yd(x){var z=x.optionHandlers,ne=x.helpers={};x.prototype={constructor:x,focus:function(){window.focus(),this.display.input.focus()},setOption:function(te,ie){var ce=this.options,ye=ce[te];ce[te]==ie&&te!="mode"||(ce[te]=ie,z.hasOwnProperty(te)&&za(this,z[te])(this,ie,ye),at(this,"optionChange",this,te))},getOption:function(te){return this.options[te]},getDoc:function(){return this.doc},addKeyMap:function(te,ie){this.state.keyMaps[ie?"push":"unshift"](ss(te))},removeKeyMap:function(te){for(var ie=this.state.keyMaps,ce=0;ce<ie.length;++ce)if(ie[ce]==te||ie[ce].name==te)return ie.splice(ce,1),!0},addOverlay:Ra(function(te,ie){var ce=te.token?te:x.getMode(this.options,te);if(ce.startState)throw new Error("Overlays may not be stateful.");ln(this.state.overlays,{mode:ce,modeSpec:te,opaque:ie&&ie.opaque,priority:ie&&ie.priority||0},function(ye){return ye.priority}),this.state.modeGen++,Ri(this)}),removeOverlay:Ra(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++,Ri(this);return}}}),indentLine:Ra(function(te,ie,ce){typeof ie!="string"&&typeof ie!="number"&&(ie==null?ie=this.options.smartIndent?"smart":"prev":ie=ie?"add":"subtract"),fr(this.doc,te)&&Rs(this,te,ie,ce)}),indentSelection:Ra(function(te){for(var ie=this.doc.sel.ranges,ce=-1,ye=0;ye<ie.length;ye++){var _e=ie[ye];if(_e.empty())_e.head.line>ce&&(Rs(this,_e.head.line,te,!0),ce=_e.head.line,ye==this.doc.sel.primIndex&&zo(this));else{var Pe=_e.from(),$e=_e.to(),bt=Math.max(ce,Pe.line);ce=Math.min(this.lastLine(),$e.line-($e.ch?0:1))+1;for(var Pt=bt;Pt<ce;++Pt)Rs(this,Pt,te);var gn=this.doc.sel.ranges;Pe.ch==0&&ie.length==gn.length&&gn[ye].from().ch>0&&ws(this.doc,ye,new ja(Pe,gn[ye].to()),Ge)}}}),getTokenAt:function(te,ie){return Gi(this,te,ie)},getLineTokens:function(te,ie){return Gi(this,st(te),ie,!0)},getTokenTypeAt:function(te){te=Nn(this.doc,te);var ie=Ai(this,nn(this.doc,te.line)),ce=0,ye=(ie.length-1)/2,_e=te.ch,Pe;if(_e==0)Pe=ie[2];else for(;;){var $e=ce+ye>>1;if(($e?ie[$e*2-1]:0)>=_e)ye=$e;else if(ie[$e*2+1]<_e)ce=$e+1;else{Pe=ie[$e*2+2];break}}var bt=Pe?Pe.indexOf("overlay "):-1;return bt<0?Pe:bt==0?null:Pe.slice(0,bt-1)},getModeAt:function(te){var ie=this.doc.mode;return ie.innerMode?x.innerMode(ie,this.getTokenAt(te).state).mode:ie},getHelper:function(te,ie){return this.getHelpers(te,ie)[0]},getHelpers:function(te,ie){var ce=[];if(!ne.hasOwnProperty(ie))return ce;var ye=ne[ie],_e=this.getModeAt(te);if(typeof _e[ie]=="string")ye[_e[ie]]&&ce.push(ye[_e[ie]]);else if(_e[ie])for(var Pe=0;Pe<_e[ie].length;Pe++){var $e=ye[_e[ie][Pe]];$e&&ce.push($e)}else _e.helperType&&ye[_e.helperType]?ce.push(ye[_e.helperType]):ye[_e.name]&&ce.push(ye[_e.name]);for(var bt=0;bt<ye._global.length;bt++){var Pt=ye._global[bt];Pt.pred(_e,this)&&ht(ce,Pt.val)==-1&&ce.push(Pt.val)}return ce},getStateAfter:function(te,ie){var ce=this.doc;return te=xn(ce,te==null?ce.first+ce.size-1:te),gi(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=Nn(this.doc,te):ce=te?ye.from():ye.to(),ha(this,ce,ie||"page")},charCoords:function(te,ie){return Za(this,Nn(this.doc,te),ie||"page")},coordsChar:function(te,ie){return te=Ma(this,te,ie||"page"),Ga(this,te.left,te.top)},lineAtHeight:function(te,ie){return te=Ma(this,{top:te,left:0},ie||"page").top,dr(this.doc,te+this.display.viewOffset)},heightAtLine:function(te,ie,ce){var ye=!1,_e;if(typeof te=="number"){var Pe=this.doc.first+this.doc.size-1;te<this.doc.first?te=this.doc.first:te>Pe&&(te=Pe,ye=!0),_e=nn(this.doc,te)}else _e=te;return wa(this,_e,{top:0,left:0},ie||"page",ce||ye).top+(ye?this.doc.height-kn(_e):0)},defaultTextHeight:function(){return Ka(this.display)},defaultCharWidth:function(){return io(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(te,ie,ce,ye,_e){var Pe=this.display;te=ha(this,Nn(this.doc,te));var $e=te.bottom,bt=te.left;if(ie.style.position="absolute",ie.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ie),Pe.sizer.appendChild(ie),ye=="over")$e=te.top;else if(ye=="above"||ye=="near"){var Pt=Math.max(Pe.wrapper.clientHeight,this.doc.height),gn=Math.max(Pe.sizer.clientWidth,Pe.lineSpace.clientWidth);(ye=="above"||te.bottom+ie.offsetHeight>Pt)&&te.top>ie.offsetHeight?$e=te.top-ie.offsetHeight:te.bottom+ie.offsetHeight<=Pt&&($e=te.bottom),bt+ie.offsetWidth>gn&&(bt=gn-ie.offsetWidth)}ie.style.top=$e+"px",ie.style.left=ie.style.right="",_e=="right"?(bt=Pe.sizer.clientWidth-ie.offsetWidth,ie.style.right="0px"):(_e=="left"?bt=0:_e=="middle"&&(bt=(Pe.sizer.clientWidth-ie.offsetWidth)/2),ie.style.left=bt+"px"),ce&&ul(this,{left:bt,top:$e,right:bt+ie.offsetWidth,bottom:$e+ie.offsetHeight})},triggerOnKeyDown:Ra(Dc),triggerOnKeyPress:Ra(uf),triggerOnKeyUp:cf,triggerOnMouseDown:Ra(Vo),execCommand:function(te){if(ac.hasOwnProperty(te))return ac[te].call(null,this)},triggerElectric:Ra(function(te){gd(this,te)}),findPosH:function(te,ie,ce,ye){var _e=1;ie<0&&(_e=-1,ie=-ie);for(var Pe=Nn(this.doc,te),$e=0;$e<ie&&(Pe=Cu(this.doc,Pe,_e,ce,ye),!Pe.hitSide);++$e);return Pe},moveH:Ra(function(te,ie){var ce=this;this.extendSelectionsBy(function(ye){return ce.display.shift||ce.doc.extend||ye.empty()?Cu(ce.doc,ye.head,te,ie,ce.options.rtlMoveVisually):te<0?ye.from():ye.to()},jt)}),deleteH:Ra(function(te,ie){var ce=this.doc.sel,ye=this.doc;ce.somethingSelected()?ye.replaceSelection("",null,"+delete"):ks(this,function(_e){var Pe=Cu(ye,_e.head,te,ie,!1);return te<0?{from:Pe,to:_e.head}:{from:_e.head,to:Pe}})}),findPosV:function(te,ie,ce,ye){var _e=1,Pe=ye;ie<0&&(_e=-1,ie=-ie);for(var $e=Nn(this.doc,te),bt=0;bt<ie;++bt){var Pt=ha(this,$e,"div");if(Pe==null?Pe=Pt.left:Pt.left=Pe,$e=vf(this,Pt,_e,ce),$e.hitSide)break}return $e},moveV:Ra(function(te,ie){var ce=this,ye=this.doc,_e=[],Pe=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(bt){if(Pe)return te<0?bt.from():bt.to();var Pt=ha(ce,bt.head,"div");bt.goalColumn!=null&&(Pt.left=bt.goalColumn),_e.push(Pt.left);var gn=vf(ce,Pt,te,ie);return ie=="page"&&bt==ye.sel.primary()&&ms(ce,Za(ce,gn,"div").top-Pt.top),gn},jt),_e.length)for(var $e=0;$e<ye.sel.ranges.length;$e++)ye.sel.ranges[$e].goalColumn=_e[$e]}),findWordAt:function(te){var ie=this.doc,ce=nn(ie,te.line).text,ye=te.ch,_e=te.ch;if(ce){var Pe=this.getHelper(te,"wordChars");(te.sticky=="before"||_e==ce.length)&&ye?--ye:++_e;for(var $e=ce.charAt(ye),bt=he($e,Pe)?function(Pt){return he(Pt,Pe)}:/\s/.test($e)?function(Pt){return/\s/.test(Pt)}:function(Pt){return!/\s/.test(Pt)&&!he(Pt)};ye>0&&bt(ce.charAt(ye-1));)--ye;for(;_e<ce.length&&bt(ce.charAt(_e));)++_e}return new ja(st(te.line,ye),st(te.line,_e))},toggleOverwrite:function(te){te!=null&&te==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?bn(this.display.cursorDiv,"CodeMirror-overwrite"):Ue(this.display.cursorDiv,"CodeMirror-overwrite"),at(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ot()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ra(function(te,ie){Ts(this,te,ie)}),getScrollInfo:function(){var te=this.display.scroller;return{left:te.scrollLeft,top:te.scrollTop,height:te.scrollHeight-Jr(this)-this.display.barHeight,width:te.scrollWidth-Jr(this)-this.display.barWidth,clientHeight:Ii(this),clientWidth:hi(this)}},scrollIntoView:Ra(function(te,ie){te==null?(te={from:this.doc.sel.primary().head,to:null},ie==null&&(ie=this.options.cursorScrollMargin)):typeof te=="number"?te={from:st(te,0),to:null}:te.from==null&&(te={from:te,to:null}),te.to||(te.to=te.from),te.margin=ie||0,te.from.line!=null?Is(this,te):oo(this,te.from,te.to,te.margin)}),setSize:Ra(function(te,ie){var ce=this,ye=function(Pe){return typeof Pe=="number"||/^\d+$/.test(String(Pe))?Pe+"px":Pe};te!=null&&(this.display.wrapper.style.width=ye(te)),ie!=null&&(this.display.wrapper.style.height=ye(ie)),this.options.lineWrapping&&aa(this);var _e=this.display.viewFrom;this.doc.iter(_e,this.display.viewTo,function(Pe){if(Pe.widgets){for(var $e=0;$e<Pe.widgets.length;$e++)if(Pe.widgets[$e].noHScroll){Ta(ce,_e,"widget");break}}++_e}),this.curOp.forceUpdate=!0,at(this,"refresh",this)}),operation:function(te){return ga(this,te)},startOperation:function(){return Ks(this)},endOperation:function(){return Ds(this)},refresh:Ra(function(){var te=this.display.cachedTextHeight;Ri(this),this.curOp.forceUpdate=!0,mi(this),Ts(this,this.doc.scrollLeft,this.doc.scrollTop),Jc(this.display),(te==null||Math.abs(te-Ka(this.display))>.5||this.options.lineWrapping)&&lo(this),at(this,"refresh",this)}),swapDoc:Ra(function(te){var ie=this.doc;return ie.cm=null,this.state.selectingText&&this.state.selectingText(),wc(this,te),mi(this),this.display.input.reset(),Ts(this,te.scrollLeft,te.scrollTop),this.curOp.forceScroll=!0,Un(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}},nr(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 Cu(x,z,ne,te,ie){var ce=z,ye=ne,_e=nn(x,z.line),Pe=ie&&x.direction=="rtl"?-ne:ne;function $e(){var ai=z.line+Pe;return ai<x.first||ai>=x.first+x.size?!1:(z=new st(ai,z.ch,z.sticky),_e=nn(x,ai))}function bt(ai){var Zr;if(te=="codepoint"){var oi=_e.text.charCodeAt(z.ch+(te>0?0:-1));isNaN(oi)?Zr=null:Zr=new st(z.line,Math.max(0,Math.min(_e.text.length,z.ch+ne*(oi>=55296&&oi<56320?2:1))),-ne)}else ie?Zr=Us(x.cm,_e,z,ne):Zr=Ws(_e,z,ne);if(Zr==null)if(!ai&&$e())z=Kl(ie,x.cm,_e,z.line,Pe);else return!1;else z=Zr;return!0}if(te=="char"||te=="codepoint")bt();else if(te=="column")bt(!0);else if(te=="word"||te=="group")for(var Pt=null,gn=te=="group",on=x.cm&&x.cm.getHelper(z,"wordChars"),Qn=!0;!(ne<0&&!bt(!Qn));Qn=!1){var yr=_e.text.charAt(z.ch)||`
|
|
|
`,$r=he(yr,on)?"w":gn&&yr==`
|
|
|
`?"n":!gn||/\s/.test(yr)?null:"p";if(gn&&!Qn&&!$r&&($r="s"),Pt&&Pt!=$r){ne<0&&(ne=1,bt(),z.sticky="after");break}if($r&&(Pt=$r),ne>0&&!bt(!Qn))break}var Xr=hu(x,z,ce,ye,!0);return fn(ce,Xr)&&(Xr.hitSide=!0),Xr}function vf(x,z,ne,te){var ie=x.doc,ce=z.left,ye;if(te=="page"){var _e=Math.min(x.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Pe=Math.max(_e-.5*Ka(x.display),3);ye=(ne>0?z.bottom:z.top)+ne*Pe}else te=="line"&&(ye=ne>0?z.bottom+3:z.top-3);for(var $e;$e=Ga(x,ce,ye),!!$e.outside;){if(ne<0?ye<=0:ye>=ie.height){$e.hitSide=!0;break}ye+=ne*5}return $e}var Ya=function(x){this.cm=x,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ya.prototype.init=function(x){var z=this,ne=this,te=ne.cm,ie=ne.div=x.lineDiv;gf(ie,te.options.spellcheck,te.options.autocorrect,te.options.autocapitalize);function ce(_e){for(var Pe=_e.target;Pe;Pe=Pe.parentNode){if(Pe==ie)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Pe.className))break}return!1}dn(ie,"paste",function(_e){!ce(_e)||Ht(te,_e)||md(_e,te)||we<=11&&setTimeout(za(te,function(){return z.updateFromDOM()}),20)}),dn(ie,"compositionstart",function(_e){z.composing={data:_e.data,done:!1}}),dn(ie,"compositionupdate",function(_e){z.composing||(z.composing={data:_e.data,done:!1})}),dn(ie,"compositionend",function(_e){z.composing&&(_e.data!=z.composing.data&&z.readFromDOMSoon(),z.composing.done=!0)}),dn(ie,"touchstart",function(){return ne.forceCompositionEnd()}),dn(ie,"input",function(){z.composing||z.readFromDOMSoon()});function ye(_e){if(!(!ce(_e)||Ht(te,_e))){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()}),_e.type=="cut"&&te.replaceSelection("",null,"cut");else if(te.options.lineWiseCopyCut){var Pe=lc(te);bl({lineWise:!0,text:Pe.text}),_e.type=="cut"&&te.operation(function(){te.setSelections(Pe.ranges,0,Ge),te.replaceSelection("",null,"cut")})}else return;if(_e.clipboardData){_e.clipboardData.clearData();var $e=Bs.text.join(`
|
|
|
`);if(_e.clipboardData.setData("Text",$e),_e.clipboardData.getData("Text")==$e){_e.preventDefault();return}}var bt=vd(),Pt=bt.firstChild;te.display.lineSpace.insertBefore(bt,te.display.lineSpace.firstChild),Pt.value=Bs.text.join(`
|
|
|
`);var gn=document.activeElement;sn(Pt),setTimeout(function(){te.display.lineSpace.removeChild(bt),gn.focus(),gn==ie&&ne.showPrimarySelection()},50)}}dn(ie,"copy",ye),dn(ie,"cut",ye)},Ya.prototype.screenReaderLabelChanged=function(x){x?this.div.setAttribute("aria-label",x):this.div.removeAttribute("aria-label")},Ya.prototype.prepareSelection=function(){var x=ps(this.cm,!1);return x.focus=document.activeElement==this.div,x},Ya.prototype.showSelection=function(x,z){!x||!this.cm.display.view.length||((x.focus||z)&&this.showPrimarySelection(),this.showMultipleSelections(x))},Ya.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ya.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=Eu(z,x.anchorNode,x.anchorOffset),ye=Eu(z,x.focusNode,x.focusOffset);if(!(ce&&!ce.bad&&ye&&!ye.bad&&Ct(vn(ce,ye),te)==0&&Ct(hn(ce,ye),ie)==0)){var _e=z.display.view,Pe=te.line>=z.display.viewFrom&&yf(z,te)||{node:_e[0].measure.map[2],offset:0},$e=ie.line<z.display.viewTo&&yf(z,ie);if(!$e){var bt=_e[_e.length-1].measure,Pt=bt.maps?bt.maps[bt.maps.length-1]:bt.map;$e={node:Pt[Pt.length-1],offset:Pt[Pt.length-2]-Pt[Pt.length-3]}}if(!Pe||!$e){x.removeAllRanges();return}var gn=x.rangeCount&&x.getRangeAt(0),on;try{on=Xe(Pe.node,Pe.offset,$e.offset,$e.node)}catch(Qn){}on&&(!de&&z.state.focused?(x.collapse(Pe.node,Pe.offset),on.collapsed||(x.removeAllRanges(),x.addRange(on))):(x.removeAllRanges(),x.addRange(on)),gn&&x.anchorNode==null?x.addRange(gn):de&&this.startGracePeriod()),this.rememberSelection()}},Ya.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)},Ya.prototype.showMultipleSelections=function(x){_t(this.cm.display.cursorDiv,x.cursors),_t(this.cm.display.selectionDiv,x.selection)},Ya.prototype.rememberSelection=function(){var x=this.getSelection();this.lastAnchorNode=x.anchorNode,this.lastAnchorOffset=x.anchorOffset,this.lastFocusNode=x.focusNode,this.lastFocusOffset=x.focusOffset},Ya.prototype.selectionInEditor=function(){var x=this.getSelection();if(!x.rangeCount)return!1;var z=x.getRangeAt(0).commonAncestorContainer;return Kt(this.div,z)},Ya.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ya.prototype.blur=function(){this.div.blur()},Ya.prototype.getField=function(){return this.div},Ya.prototype.supportsTouch=function(){return!0},Ya.prototype.receivedFocus=function(){var x=this;this.selectionInEditor()?this.pollSelection():ga(this.cm,function(){return x.cm.curOp.selectionChanged=!0});function z(){x.cm.state.focused&&(x.pollSelection(),x.polling.set(x.cm.options.pollInterval,z))}this.polling.set(this.cm.options.pollInterval,z)},Ya.prototype.selectionChanged=function(){var x=this.getSelection();return x.anchorNode!=this.lastAnchorNode||x.anchorOffset!=this.lastAnchorOffset||x.focusNode!=this.lastFocusNode||x.focusOffset!=this.lastFocusOffset},Ya.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var x=this.getSelection(),z=this.cm;if(it&&me&&this.cm.display.gutterSpecs.length&&ch(x.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ne=Eu(z,x.anchorNode,x.anchorOffset),te=Eu(z,x.focusNode,x.focusOffset);ne&&te&&ga(z,function(){To(z.doc,Ps(ne,te),Ge),(ne.bad||te.bad)&&(z.curOp.selectionChanged=!0)})}}},Ya.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=st(te.line-1,nn(x.doc,te.line-1).length)),ie.ch==nn(x.doc,ie.line).text.length&&ie.line<x.lastLine()&&(ie=st(ie.line+1,0)),te.line<z.viewFrom||ie.line>z.viewTo-1)return!1;var ce,ye,_e;te.line==z.viewFrom||(ce=ra(x,te.line))==0?(ye=tr(z.view[0].line),_e=z.view[0].node):(ye=tr(z.view[ce].line),_e=z.view[ce-1].node.nextSibling);var Pe=ra(x,ie.line),$e,bt;if(Pe==z.view.length-1?($e=z.viewTo-1,bt=z.lineDiv.lastChild):($e=tr(z.view[Pe+1].line)-1,bt=z.view[Pe+1].node.previousSibling),!_e)return!1;for(var Pt=x.doc.splitLines(uh(x,_e,bt,ye,$e)),gn=jn(x.doc,st(ye,0),st($e,nn(x.doc,$e).text.length));Pt.length>1&&gn.length>1;)if(Zt(Pt)==Zt(gn))Pt.pop(),gn.pop(),$e--;else if(Pt[0]==gn[0])Pt.shift(),gn.shift(),ye++;else break;for(var on=0,Qn=0,yr=Pt[0],$r=gn[0],Xr=Math.min(yr.length,$r.length);on<Xr&&yr.charCodeAt(on)==$r.charCodeAt(on);)++on;for(var ai=Zt(Pt),Zr=Zt(gn),oi=Math.min(ai.length-(Pt.length==1?on:0),Zr.length-(gn.length==1?on:0));Qn<oi&&ai.charCodeAt(ai.length-Qn-1)==Zr.charCodeAt(Zr.length-Qn-1);)++Qn;if(Pt.length==1&&gn.length==1&&ye==te.line)for(;on&&on>te.ch&&ai.charCodeAt(ai.length-Qn-1)==Zr.charCodeAt(Zr.length-Qn-1);)on--,Qn++;Pt[Pt.length-1]=ai.slice(0,ai.length-Qn).replace(/^\u200b+/,""),Pt[0]=Pt[0].slice(on).replace(/\u200b+$/,"");var Ki=st(ye,on),ji=st($e,gn.length?Zt(gn).length-Qn:0);if(Pt.length>1||Pt[0]||Ct(Ki,ji))return ec(x.doc,Pt,Ki,ji,"+input"),!0},Ya.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ya.prototype.reset=function(){this.forceCompositionEnd()},Ya.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ya.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))},Ya.prototype.updateFromDOM=function(){var x=this;(this.cm.isReadOnly()||!this.pollContent())&&ga(this.cm,function(){return Ri(x.cm)})},Ya.prototype.setUneditable=function(x){x.contentEditable="false"},Ya.prototype.onKeyPress=function(x){x.charCode==0||this.composing||(x.preventDefault(),this.cm.isReadOnly()||za(this.cm,pd)(this.cm,String.fromCharCode(x.charCode==null?x.keyCode:x.charCode),0))},Ya.prototype.readOnlyChanged=function(x){this.div.contentEditable=String(x!="nocursor")},Ya.prototype.onContextMenu=function(){},Ya.prototype.resetPosition=function(){},Ya.prototype.needsContentAttribute=!0;function yf(x,z){var ne=ca(x,z.line);if(!ne||ne.hidden)return null;var te=nn(x.doc,z.line),ie=$a(ne,te,z.line),ce=Rn(te,x.doc.direction),ye="left";if(ce){var _e=Xt(ce,z.ch);ye=_e%2?"right":"left"}var Pe=ki(ie.map,z.ch,ye);return Pe.offset=Pe.collapse=="right"?Pe.end:Pe.start,Pe}function ch(x){for(var z=x;z;z=z.parentNode)if(/CodeMirror-gutter-wrapper/.test(z.className))return!0;return!1}function cc(x,z){return z&&(x.bad=!0),x}function uh(x,z,ne,te,ie){var ce="",ye=!1,_e=x.doc.lineSeparator(),Pe=!1;function $e(on){return function(Qn){return Qn.id==on}}function bt(){ye&&(ce+=_e,Pe&&(ce+=_e),ye=Pe=!1)}function Pt(on){on&&(bt(),ce+=on)}function gn(on){if(on.nodeType==1){var Qn=on.getAttribute("cm-text");if(Qn){Pt(Qn);return}var yr=on.getAttribute("cm-marker"),$r;if(yr){var Xr=x.findMarks(st(te,0),st(ie+1,0),$e(+yr));Xr.length&&($r=Xr[0].find(0))&&Pt(jn(x.doc,$r.from,$r.to).join(_e));return}if(on.getAttribute("contenteditable")=="false")return;var ai=/^(pre|div|p|li|table|br)$/i.test(on.nodeName);if(!/^br$/i.test(on.nodeName)&&on.textContent.length==0)return;ai&&bt();for(var Zr=0;Zr<on.childNodes.length;Zr++)gn(on.childNodes[Zr]);/^(pre|p)$/i.test(on.nodeName)&&(Pe=!0),ai&&(ye=!0)}else on.nodeType==3&&Pt(on.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;gn(z),z!=ne;)z=z.nextSibling,Pe=!1;return ce}function Eu(x,z,ne){var te;if(z==x.display.lineDiv){if(te=x.display.lineDiv.childNodes[ne],!te)return cc(x.clipPos(st(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 cc(st(tr(x.line),0),!0);if(z==te&&(ie=!0,z=te.childNodes[ne],ne=0,!z)){var ce=x.rest?Zt(x.rest):x.line;return cc(st(tr(ce),ce.text.length),ie)}var ye=z.nodeType==3?z:null,_e=z;for(!ye&&z.childNodes.length==1&&z.firstChild.nodeType==3&&(ye=z.firstChild,ne&&(ne=ye.nodeValue.length));_e.parentNode!=te;)_e=_e.parentNode;var Pe=x.measure,$e=Pe.maps;function bt($r,Xr,ai){for(var Zr=-1;Zr<($e?$e.length:0);Zr++)for(var oi=Zr<0?Pe.map:$e[Zr],Ki=0;Ki<oi.length;Ki+=3){var ji=oi[Ki+2];if(ji==$r||ji==Xr){var ba=tr(Zr<0?x.line:x.rest[Zr]),to=oi[Ki]+ai;return(ai<0||ji!=$r)&&(to=oi[Ki+(ai?1:0)]),st(ba,to)}}}var Pt=bt(ye,_e,ne);if(Pt)return cc(Pt,ie);for(var gn=_e.nextSibling,on=ye?ye.nodeValue.length-ne:0;gn;gn=gn.nextSibling){if(Pt=bt(gn,gn.firstChild,0),Pt)return cc(st(Pt.line,Pt.ch-on),ie);on+=gn.textContent.length}for(var Qn=_e.previousSibling,yr=ne;Qn;Qn=Qn.previousSibling){if(Pt=bt(Qn,Qn.firstChild,-1),Pt)return cc(st(Pt.line,Pt.ch+yr),ie);yr+=Qn.textContent.length}}var eo=function(x){this.cm=x,this.prevInput="",this.pollingFast=!1,this.polling=new Ce,this.hasSelection=!1,this.composing=null};eo.prototype.init=function(x){var z=this,ne=this,te=this.cm;this.createField(x);var ie=this.textarea;x.wrapper.insertBefore(this.wrapper,x.wrapper.firstChild),ft&&(ie.style.width="0px"),dn(ie,"input",function(){ve&&we>=9&&z.hasSelection&&(z.hasSelection=null),ne.poll()}),dn(ie,"paste",function(ye){Ht(te,ye)||md(ye,te)||(te.state.pasteIncoming=+new Date,ne.fastPoll())});function ce(ye){if(!Ht(te,ye)){if(te.somethingSelected())bl({lineWise:!1,text:te.getSelections()});else if(te.options.lineWiseCopyCut){var _e=lc(te);bl({lineWise:!0,text:_e.text}),ye.type=="cut"?te.setSelections(_e.ranges,null,Ge):(ne.prevInput="",ie.value=_e.text.join(`
|
|
|
`),sn(ie))}else return;ye.type=="cut"&&(te.state.cutIncoming=+new Date)}}dn(ie,"cut",ce),dn(ie,"copy",ce),dn(x.scroller,"paste",function(ye){if(!(Ji(x,ye)||Ht(te,ye))){if(!ie.dispatchEvent){te.state.pasteIncoming=+new Date,ne.focus();return}var _e=new Event("paste");_e.clipboardData=ye.clipboardData,ie.dispatchEvent(_e)}}),dn(x.lineSpace,"selectstart",function(ye){Ji(x,ye)||Sr(ye)}),dn(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"})}}),dn(ie,"compositionend",function(){ne.composing&&(ne.poll(),ne.composing.range.clear(),ne.composing=null)})},eo.prototype.createField=function(x){this.wrapper=vd(),this.textarea=this.wrapper.firstChild},eo.prototype.screenReaderLabelChanged=function(x){x?this.textarea.setAttribute("aria-label",x):this.textarea.removeAttribute("aria-label")},eo.prototype.prepareSelection=function(){var x=this.cm,z=x.display,ne=x.doc,te=ps(x);if(x.options.moveInputWithCursor){var ie=ha(x,ne.sel.primary().head,"div"),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},eo.prototype.showSelection=function(x){var z=this.cm,ne=z.display;_t(ne.cursorDiv,x.cursors),_t(ne.selectionDiv,x.selection),x.teTop!=null&&(this.wrapper.style.top=x.teTop+"px",this.wrapper.style.left=x.teLeft+"px")},eo.prototype.reset=function(x){if(!(this.contextMenuPending||this.composing)){var z=this.cm;if(z.somethingSelected()){this.prevInput="";var ne=z.getSelection();this.textarea.value=ne,z.state.focused&&sn(this.textarea),ve&&we>=9&&(this.hasSelection=ne)}else x||(this.prevInput=this.textarea.value="",ve&&we>=9&&(this.hasSelection=null))}},eo.prototype.getField=function(){return this.textarea},eo.prototype.supportsTouch=function(){return!1},eo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Je||Ot()!=this.textarea))try{this.textarea.focus()}catch(x){}},eo.prototype.blur=function(){this.textarea.blur()},eo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},eo.prototype.receivedFocus=function(){this.slowPoll()},eo.prototype.slowPoll=function(){var x=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){x.poll(),x.cm.state.focused&&x.slowPoll()})},eo.prototype.fastPoll=function(){var x=!1,z=this;z.pollingFast=!0;function ne(){var te=z.poll();!te&&!x?(x=!0,z.polling.set(60,ne)):(z.pollingFast=!1,z.slowPoll())}z.polling.set(20,ne)},eo.prototype.poll=function(){var x=this,z=this.cm,ne=this.textarea,te=this.prevInput;if(this.contextMenuPending||!z.state.focused||Mn(ne)&&!te&&!this.composing||z.isReadOnly()||z.options.disableInput||z.state.keySeq)return!1;var ie=ne.value;if(ie==te&&!z.somethingSelected())return!1;if(ve&&we>=9&&this.hasSelection===ie||Le&&/[\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,_e=Math.min(te.length,ie.length);ye<_e&&te.charCodeAt(ye)==ie.charCodeAt(ye);)++ye;return ga(z,function(){pd(z,ie.slice(ye),te.length-ye,null,x.composing?"*compose":null),ie.length>1e3||ie.indexOf(`
|
|
|
`)>-1?ne.value=x.prevInput="":x.prevInput=ie,x.composing&&(x.composing.range.clear(),x.composing.range=z.markText(x.composing.start,z.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},eo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},eo.prototype.onKeyPress=function(){ve&&we>=9&&(this.hasSelection=null),this.fastPoll()},eo.prototype.onContextMenu=function(x){var z=this,ne=z.cm,te=ne.display,ie=z.textarea;z.contextMenuPending&&z.contextMenuPending();var ce=Ao(ne,x),ye=te.scroller.scrollTop;if(!ce||Ie)return;var _e=ne.options.resetSelectionOnContextMenu;_e&&ne.doc.sel.contains(ce)==-1&&za(ne,To)(ne.doc,Ps(ce),Ge);var Pe=ie.style.cssText,$e=z.wrapper.style.cssText,bt=z.wrapper.offsetParent.getBoundingClientRect();z.wrapper.style.cssText="position: static",ie.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(x.clientY-bt.top-5)+"px; left: "+(x.clientX-bt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(ve?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Pt;Ee&&(Pt=window.scrollY),te.input.focus(),Ee&&window.scrollTo(null,Pt),te.input.reset(),ne.somethingSelected()||(ie.value=z.prevInput=" "),z.contextMenuPending=on,te.selForContextMenu=ne.doc.sel,clearTimeout(te.detectingSelectAll);function gn(){if(ie.selectionStart!=null){var yr=ne.somethingSelected(),$r="\u200B"+(yr?ie.value:"");ie.value="\u21DA",ie.value=$r,z.prevInput=yr?"":"\u200B",ie.selectionStart=1,ie.selectionEnd=$r.length,te.selForContextMenu=ne.doc.sel}}function on(){if(z.contextMenuPending==on&&(z.contextMenuPending=!1,z.wrapper.style.cssText=$e,ie.style.cssText=Pe,ve&&we<9&&te.scrollbars.setScrollTop(te.scroller.scrollTop=ye),ie.selectionStart!=null)){(!ve||ve&&we<9)&&gn();var yr=0,$r=function(){te.selForContextMenu==ne.doc.sel&&ie.selectionStart==0&&ie.selectionEnd>0&&z.prevInput=="\u200B"?za(ne,td)(ne):yr++<10?te.detectingSelectAll=setTimeout($r,500):(te.selForContextMenu=null,te.input.reset())};te.detectingSelectAll=setTimeout($r,200)}}if(ve&&we>=9&&gn(),ke){Or(x);var Qn=function(){Mr(window,"mouseup",Qn),setTimeout(on,20)};dn(window,"mouseup",Qn)}else setTimeout(on,50)},eo.prototype.readOnlyChanged=function(x){x||this.reset(),this.textarea.disabled=x=="nocursor",this.textarea.readOnly=!!x},eo.prototype.setUneditable=function(){},eo.prototype.needsContentAttribute=!1;function Hl(x,z){if(z=z?or(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=Ot();z.autofocus=ne==x||x.getAttribute("autofocus")!=null&&ne==document.body}function te(){x.value=_e.getValue()}var ie;if(x.form&&(dn(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(Pe){}}z.finishInit=function(Pe){Pe.save=te,Pe.getTextArea=function(){return x},Pe.toTextArea=function(){Pe.toTextArea=isNaN,te(),x.parentNode.removeChild(Pe.getWrapperElement()),x.style.display="",x.form&&(Mr(x.form,"submit",te),!z.leaveSubmitMethodAlone&&typeof x.form.submit=="function"&&(x.form.submit=ie))}},x.style.display="none";var _e=ia(function(Pe){return x.parentNode.insertBefore(Pe,x.nextSibling)},z);return _e}function uc(x){x.off=Mr,x.on=dn,x.wheelEventPixels=Gu,x.Doc=Mo,x.splitLines=yt,x.countColumn=Qe,x.findColumn=_n,x.isWordChar=pe,x.Pass=Yt,x.signal=at,x.Line=zn,x.changeEnd=Js,x.scrollbarModel=Yl,x.Pos=st,x.cmpPos=Ct,x.modes=qn,x.mimeModes=pr,x.resolveMode=ut,x.getMode=Dt,x.modeExtensions=Vt,x.extendMode=We,x.copyState=pt,x.startState=Bt,x.innerMode=zt,x.commands=ac,x.keyMap=Qa,x.keyName=zl,x.isModifierKey=Ic,x.lookupKey=rl,x.normalizeKeyMap=od,x.StringStream=en,x.SharedTextMarker=ya,x.TextMarker=hl,x.LineWidget=nc,x.e_preventDefault=Sr,x.e_stopPropagation=Tr,x.e_stop=Or,x.addClass=bn,x.contains=Kt,x.rmClass=Ue,x.keyNames=Os}oh(ia),yd(ia);var ol="iter insert remove copy getEditor constructor".split(" ");for(var _s in Mo.prototype)Mo.prototype.hasOwnProperty(_s)&&ht(ol,_s)<0&&(ia.prototype[_s]=function(x){return function(){return x.apply(this.doc,arguments)}}(Mo.prototype[_s]));return nr(Mo),ia.inputStyles={textarea:eo,contenteditable:Ya},ia.defineMode=function(x){!ia.defaults.mode&&x!="null"&&(ia.defaults.mode=x),$n.apply(this,arguments)},ia.defineMIME=qe,ia.defineMode("null",function(){return{token:function(x){return x.skipToEnd()}}}),ia.defineMIME("text/plain","null"),ia.defineExtension=function(x,z){ia.prototype[x]=z},ia.defineDocExtension=function(x,z){Mo.prototype[x]=z},ia.fromTextArea=Hl,uc(ia),ia.version="5.58.2",ia})},49047:function(En,Wt,se){(function(de){de(se(4631),se(29589),se(52539))})(function(de){"use strict";de.defineMode("markdown",function(He,Be){var Ve=de.getMode(He,"text/html"),ve=Ve.name=="null";function we(Qe){if(de.findModeByName){var Ce=de.findModeByName(Qe);Ce&&(Qe=Ce.mime||Ce.mimes[0])}var ht=de.getMode(He,Qe);return ht.name=="null"?null:ht}Be.highlightFormatting===void 0&&(Be.highlightFormatting=!1),Be.maxBlockquoteDepth===void 0&&(Be.maxBlockquoteDepth=0),Be.taskLists===void 0&&(Be.taskLists=!1),Be.strikethrough===void 0&&(Be.strikethrough=!1),Be.emoji===void 0&&(Be.emoji=!1),Be.fencedCodeBlockHighlighting===void 0&&(Be.fencedCodeBlockHighlighting=!0),Be.fencedCodeBlockDefaultMode===void 0&&(Be.fencedCodeBlockDefaultMode="text/plain"),Be.xml===void 0&&(Be.xml=!0),Be.tokenTypeOverrides===void 0&&(Be.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 xe in Ee)Ee.hasOwnProperty(xe)&&Be.tokenTypeOverrides[xe]&&(Ee[xe]=Be.tokenTypeOverrides[xe]);var me=/^([*\-_])(?:\s*\1){2,}\s*$/,Ie=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ot=/^\[(x| )\](?=\s)/i,Oe=Be.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,St=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ft=/^[^#!\[\]*_\\<>` "'(~:]+/,it=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Je=/^\s*\[[^\]]+?\]:.*$/,Le=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,gt=" ";function qt(Qe,Ce,ht){return Ce.f=Ce.inline=ht,ht(Qe,Ce)}function tt(Qe,Ce,ht){return Ce.f=Ce.block=ht,ht(Qe,Ce)}function ct(Qe){return!Qe||!/\S/.test(Qe.string)}function ke(Qe){if(Qe.linkTitle=!1,Qe.linkHref=!1,Qe.linkText=!1,Qe.em=!1,Qe.strong=!1,Qe.strikethrough=!1,Qe.quote=0,Qe.indentedCode=!1,Qe.f==Ue){var Ce=ve;if(!Ce){var ht=de.innerMode(Ve,Qe.htmlState);Ce=ht.mode.name=="xml"&&ht.state.tagStart===null&&!ht.state.context&&ht.state.tokenize.isInText}Ce&&(Qe.f=kt,Qe.block=Se,Qe.htmlState=null)}return Qe.trailingSpace=0,Qe.trailingSpaceNewLine=!1,Qe.prevLine=Qe.thisLine,Qe.thisLine={stream:null},null}function Se(Qe,Ce){var ht=Qe.column()===Ce.indentation,Ut=ct(Ce.prevLine.stream),Yt=Ce.indentedCode,Ge=Ce.prevLine.hr,rt=Ce.list!==!1,jt=(Ce.listStack[Ce.listStack.length-1]||0)+3;Ce.indentedCode=!1;var _n=Ce.indentation;if(Ce.indentationDiff===null&&(Ce.indentationDiff=Ce.indentation,rt)){for(Ce.list=null;_n<Ce.listStack[Ce.listStack.length-1];)Ce.listStack.pop(),Ce.listStack.length?Ce.indentation=Ce.listStack[Ce.listStack.length-1]:Ce.list=!1;Ce.list!==!1&&(Ce.indentationDiff=_n-Ce.listStack[Ce.listStack.length-1])}var rn=!Ut&&!Ge&&!Ce.prevLine.header&&(!rt||!Yt)&&!Ce.prevLine.fencedCodeEnd,$t=(Ce.list===!1||Ge||Ut)&&Ce.indentation<=jt&&Qe.match(me),Zt=null;if(Ce.indentationDiff>=4&&(Yt||Ce.prevLine.fencedCodeEnd||Ce.prevLine.header||Ut))return Qe.skipToEnd(),Ce.indentedCode=!0,Ee.code;if(Qe.eatSpace())return null;if(ht&&Ce.indentation<=jt&&(Zt=Qe.match(Oe))&&Zt[1].length<=6)return Ce.quote=0,Ce.header=Zt[1].length,Ce.thisLine.header=!0,Be.highlightFormatting&&(Ce.formatting="header"),Ce.f=Ce.inline,_t(Ce);if(Ce.indentation<=jt&&Qe.eat(">"))return Ce.quote=ht?1:Ce.quote+1,Be.highlightFormatting&&(Ce.formatting="quote"),Qe.eatSpace(),_t(Ce);if(!$t&&!Ce.setext&&ht&&Ce.indentation<=jt&&(Zt=Qe.match(Ie))){var yn=Zt[1]?"ol":"ul";return Ce.indentation=_n+Qe.current().length,Ce.list=!0,Ce.quote=0,Ce.listStack.push(Ce.indentation),Ce.em=!1,Ce.strong=!1,Ce.code=!1,Ce.strikethrough=!1,Be.taskLists&&Qe.match(ot,!1)&&(Ce.taskList=!0),Ce.f=Ce.inline,Be.highlightFormatting&&(Ce.formatting=["list","list-"+yn]),_t(Ce)}else{if(ht&&Ce.indentation<=jt&&(Zt=Qe.match(it,!0)))return Ce.quote=0,Ce.fencedEndRE=new RegExp(Zt[1]+"+ *$"),Ce.localMode=Be.fencedCodeBlockHighlighting&&we(Zt[2]||Be.fencedCodeBlockDefaultMode),Ce.localMode&&(Ce.localState=de.startState(Ce.localMode)),Ce.f=Ce.block=je,Be.highlightFormatting&&(Ce.formatting="code-block"),Ce.code=-1,_t(Ce);if(Ce.setext||(!rn||!rt)&&!Ce.quote&&Ce.list===!1&&!Ce.code&&!$t&&!Je.test(Qe.string)&&(Zt=Qe.lookAhead(1))&&(Zt=Zt.match(St)))return Ce.setext?(Ce.header=Ce.setext,Ce.setext=0,Qe.skipToEnd(),Be.highlightFormatting&&(Ce.formatting="header")):(Ce.header=Zt[0].charAt(0)=="="?1:2,Ce.setext=Ce.header),Ce.thisLine.header=!0,Ce.f=Ce.inline,_t(Ce);if($t)return Qe.skipToEnd(),Ce.hr=!0,Ce.thisLine.hr=!0,Ee.hr;if(Qe.peek()==="[")return qt(Qe,Ce,Nt)}return qt(Qe,Ce,Ce.inline)}function Ue(Qe,Ce){var ht=Ve.token(Qe,Ce.htmlState);if(!ve){var Ut=de.innerMode(Ve,Ce.htmlState);(Ut.mode.name=="xml"&&Ut.state.tagStart===null&&!Ut.state.context&&Ut.state.tokenize.isInText||Ce.md_inside&&Qe.current().indexOf(">")>-1)&&(Ce.f=kt,Ce.block=Se,Ce.htmlState=null)}return ht}function je(Qe,Ce){var ht=Ce.listStack[Ce.listStack.length-1]||0,Ut=Ce.indentation<ht,Yt=ht+3;if(Ce.fencedEndRE&&Ce.indentation<=Yt&&(Ut||Qe.match(Ce.fencedEndRE))){Be.highlightFormatting&&(Ce.formatting="code-block");var Ge;return Ut||(Ge=_t(Ce)),Ce.localMode=Ce.localState=null,Ce.block=Se,Ce.f=kt,Ce.fencedEndRE=null,Ce.code=0,Ce.thisLine.fencedCodeEnd=!0,Ut?tt(Qe,Ce,Ce.block):Ge}else return Ce.localMode?Ce.localMode.token(Qe,Ce.localState):(Qe.skipToEnd(),Ee.code)}function _t(Qe){var Ce=[];if(Qe.formatting){Ce.push(Ee.formatting),typeof Qe.formatting=="string"&&(Qe.formatting=[Qe.formatting]);for(var ht=0;ht<Qe.formatting.length;ht++)Ce.push(Ee.formatting+"-"+Qe.formatting[ht]),Qe.formatting[ht]==="header"&&Ce.push(Ee.formatting+"-"+Qe.formatting[ht]+"-"+Qe.header),Qe.formatting[ht]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=Qe.quote?Ce.push(Ee.formatting+"-"+Qe.formatting[ht]+"-"+Qe.quote):Ce.push("error"))}if(Qe.taskOpen)return Ce.push("meta"),Ce.length?Ce.join(" "):null;if(Qe.taskClosed)return Ce.push("property"),Ce.length?Ce.join(" "):null;if(Qe.linkHref?Ce.push(Ee.linkHref,"url"):(Qe.strong&&Ce.push(Ee.strong),Qe.em&&Ce.push(Ee.em),Qe.strikethrough&&Ce.push(Ee.strikethrough),Qe.emoji&&Ce.push(Ee.emoji),Qe.linkText&&Ce.push(Ee.linkText),Qe.code&&Ce.push(Ee.code),Qe.image&&Ce.push(Ee.image),Qe.imageAltText&&Ce.push(Ee.imageAltText,"link"),Qe.imageMarker&&Ce.push(Ee.imageMarker)),Qe.header&&Ce.push(Ee.header,Ee.header+"-"+Qe.header),Qe.quote&&(Ce.push(Ee.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=Qe.quote?Ce.push(Ee.quote+"-"+Qe.quote):Ce.push(Ee.quote+"-"+Be.maxBlockquoteDepth)),Qe.list!==!1){var Ut=(Qe.listStack.length-1)%3;Ut?Ut===1?Ce.push(Ee.list2):Ce.push(Ee.list3):Ce.push(Ee.list1)}return Qe.trailingSpaceNewLine?Ce.push("trailing-space-new-line"):Qe.trailingSpace&&Ce.push("trailing-space-"+(Qe.trailingSpace%2?"a":"b")),Ce.length?Ce.join(" "):null}function vt(Qe,Ce){if(Qe.match(ft,!0))return _t(Ce)}function kt(Qe,Ce){var ht=Ce.text(Qe,Ce);if(typeof ht!="undefined")return ht;if(Ce.list)return Ce.list=null,_t(Ce);if(Ce.taskList){var Ut=Qe.match(ot,!0)[1]===" ";return Ut?Ce.taskOpen=!0:Ce.taskClosed=!0,Be.highlightFormatting&&(Ce.formatting="task"),Ce.taskList=!1,_t(Ce)}if(Ce.taskOpen=!1,Ce.taskClosed=!1,Ce.header&&Qe.match(/^#+$/,!0))return Be.highlightFormatting&&(Ce.formatting="header"),_t(Ce);var Yt=Qe.next();if(Ce.linkTitle){Ce.linkTitle=!1;var Ge=Yt;Yt==="("&&(Ge=")"),Ge=(Ge+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rt="^\\s*(?:[^"+Ge+"\\\\]+|\\\\\\\\|\\\\.)"+Ge;if(Qe.match(new RegExp(rt),!0))return Ee.linkHref}if(Yt==="`"){var jt=Ce.formatting;Be.highlightFormatting&&(Ce.formatting="code"),Qe.eatWhile("`");var _n=Qe.current().length;if(Ce.code==0&&(!Ce.quote||_n==1))return Ce.code=_n,_t(Ce);if(_n==Ce.code){var rn=_t(Ce);return Ce.code=0,rn}else return Ce.formatting=jt,_t(Ce)}else if(Ce.code)return _t(Ce);if(Yt==="\\"&&(Qe.next(),Be.highlightFormatting)){var $t=_t(Ce),Zt=Ee.formatting+"-escape";return $t?$t+" "+Zt:Zt}if(Yt==="!"&&Qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ce.imageMarker=!0,Ce.image=!0,Be.highlightFormatting&&(Ce.formatting="image"),_t(Ce);if(Yt==="["&&Ce.imageMarker&&Qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ce.imageMarker=!1,Ce.imageAltText=!0,Be.highlightFormatting&&(Ce.formatting="image"),_t(Ce);if(Yt==="]"&&Ce.imageAltText){Be.highlightFormatting&&(Ce.formatting="image");var $t=_t(Ce);return Ce.imageAltText=!1,Ce.image=!1,Ce.inline=Ce.f=Kt,$t}if(Yt==="["&&!Ce.image)return Ce.linkText&&Qe.match(/^.*?\]/)||(Ce.linkText=!0,Be.highlightFormatting&&(Ce.formatting="link")),_t(Ce);if(Yt==="]"&&Ce.linkText){Be.highlightFormatting&&(Ce.formatting="link");var $t=_t(Ce);return Ce.linkText=!1,Ce.inline=Ce.f=Qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Kt:kt,$t}if(Yt==="<"&&Qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ce.f=Ce.inline=Xe,Be.highlightFormatting&&(Ce.formatting="link");var $t=_t(Ce);return $t?$t+=" ":$t="",$t+Ee.linkInline}if(Yt==="<"&&Qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ce.f=Ce.inline=Xe,Be.highlightFormatting&&(Ce.formatting="link");var $t=_t(Ce);return $t?$t+=" ":$t="",$t+Ee.linkEmail}if(Be.xml&&Yt==="<"&&Qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var yn=Qe.string.indexOf(">",Qe.pos);if(yn!=-1){var ln=Qe.string.substring(Qe.start,yn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ln)&&(Ce.md_inside=!0)}return Qe.backUp(1),Ce.htmlState=de.startState(Ve),tt(Qe,Ce,Ue)}if(Be.xml&&Yt==="<"&&Qe.match(/^\/\w*?>/))return Ce.md_inside=!1,"tag";if(Yt==="*"||Yt==="_"){for(var Ae=1,ue=Qe.pos==1?" ":Qe.string.charAt(Qe.pos-2);Ae<3&&Qe.eat(Yt);)Ae++;var le=Qe.peek()||" ",pe=!/\s/.test(le)&&(!Le.test(le)||/\s/.test(ue)||Le.test(ue)),he=!/\s/.test(ue)&&(!Le.test(ue)||/\s/.test(le)||Le.test(le)),oe=null,Te=null;if(Ae%2&&(!Ce.em&&pe&&(Yt==="*"||!he||Le.test(ue))?oe=!0:Ce.em==Yt&&he&&(Yt==="*"||!pe||Le.test(le))&&(oe=!1)),Ae>1&&(!Ce.strong&&pe&&(Yt==="*"||!he||Le.test(ue))?Te=!0:Ce.strong==Yt&&he&&(Yt==="*"||!pe||Le.test(le))&&(Te=!1)),Te!=null||oe!=null){Be.highlightFormatting&&(Ce.formatting=oe==null?"strong":Te==null?"em":"strong em"),oe===!0&&(Ce.em=Yt),Te===!0&&(Ce.strong=Yt);var rn=_t(Ce);return oe===!1&&(Ce.em=!1),Te===!1&&(Ce.strong=!1),rn}}else if(Yt===" "&&(Qe.eat("*")||Qe.eat("_"))){if(Qe.peek()===" ")return _t(Ce);Qe.backUp(1)}if(Be.strikethrough){if(Yt==="~"&&Qe.eatWhile(Yt)){if(Ce.strikethrough){Be.highlightFormatting&&(Ce.formatting="strikethrough");var rn=_t(Ce);return Ce.strikethrough=!1,rn}else if(Qe.match(/^[^\s]/,!1))return Ce.strikethrough=!0,Be.highlightFormatting&&(Ce.formatting="strikethrough"),_t(Ce)}else if(Yt===" "&&Qe.match(/^~~/,!0)){if(Qe.peek()===" ")return _t(Ce);Qe.backUp(2)}}if(Be.emoji&&Yt===":"&&Qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ce.emoji=!0,Be.highlightFormatting&&(Ce.formatting="emoji");var Ye=_t(Ce);return Ce.emoji=!1,Ye}return Yt===" "&&(Qe.match(/^ +$/,!1)?Ce.trailingSpace++:Ce.trailingSpace&&(Ce.trailingSpaceNewLine=!0)),_t(Ce)}function Xe(Qe,Ce){var ht=Qe.next();if(ht===">"){Ce.f=Ce.inline=kt,Be.highlightFormatting&&(Ce.formatting="link");var Ut=_t(Ce);return Ut?Ut+=" ":Ut="",Ut+Ee.linkInline}return Qe.match(/^[^>]+/,!0),Ee.linkInline}function Kt(Qe,Ce){if(Qe.eatSpace())return null;var ht=Qe.next();return ht==="("||ht==="["?(Ce.f=Ce.inline=bn(ht==="("?")":"]"),Be.highlightFormatting&&(Ce.formatting="link-string"),Ce.linkHref=!0,_t(Ce)):"error"}var Ot={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function bn(Qe){return function(Ce,ht){var Ut=Ce.next();if(Ut===Qe){ht.f=ht.inline=kt,Be.highlightFormatting&&(ht.formatting="link-string");var Yt=_t(ht);return ht.linkHref=!1,Yt}return Ce.match(Ot[Qe]),ht.linkHref=!0,_t(ht)}}function Nt(Qe,Ce){return Qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ce.f=sn,Qe.next(),Be.highlightFormatting&&(Ce.formatting="link"),Ce.linkText=!0,_t(Ce)):qt(Qe,Ce,kt)}function sn(Qe,Ce){if(Qe.match(/^\]:/,!0)){Ce.f=Ce.inline=Cn,Be.highlightFormatting&&(Ce.formatting="link");var ht=_t(Ce);return Ce.linkText=!1,ht}return Qe.match(/^([^\]\\]|\\.)+/,!0),Ee.linkText}function Cn(Qe,Ce){return Qe.eatSpace()?null:(Qe.match(/^[^\s]+/,!0),Qe.peek()===void 0?Ce.linkTitle=!0:Qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ce.f=Ce.inline=kt,Ee.linkHref+" url")}var or={startState:function(){return{f:Se,prevLine:{stream:null},thisLine:{stream:null},block:Se,htmlState:null,indentation:0,inline:kt,text:vt,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(Qe){return{f:Qe.f,prevLine:Qe.prevLine,thisLine:Qe.thisLine,block:Qe.block,htmlState:Qe.htmlState&&de.copyState(Ve,Qe.htmlState),indentation:Qe.indentation,localMode:Qe.localMode,localState:Qe.localMode?de.copyState(Qe.localMode,Qe.localState):null,inline:Qe.inline,text:Qe.text,formatting:!1,linkText:Qe.linkText,linkTitle:Qe.linkTitle,linkHref:Qe.linkHref,code:Qe.code,em:Qe.em,strong:Qe.strong,strikethrough:Qe.strikethrough,emoji:Qe.emoji,header:Qe.header,setext:Qe.setext,hr:Qe.hr,taskList:Qe.taskList,list:Qe.list,listStack:Qe.listStack.slice(0),quote:Qe.quote,indentedCode:Qe.indentedCode,trailingSpace:Qe.trailingSpace,trailingSpaceNewLine:Qe.trailingSpaceNewLine,md_inside:Qe.md_inside,fencedEndRE:Qe.fencedEndRE}},token:function(Qe,Ce){if(Ce.formatting=!1,Qe!=Ce.thisLine.stream){if(Ce.header=0,Ce.hr=!1,Qe.match(/^\s*$/,!0))return ke(Ce),null;if(Ce.prevLine=Ce.thisLine,Ce.thisLine={stream:Qe},Ce.taskList=!1,Ce.trailingSpace=0,Ce.trailingSpaceNewLine=!1,!Ce.localState&&(Ce.f=Ce.block,Ce.f!=Ue)){var ht=Qe.match(/^\s*/,!0)[0].replace(/\t/g,gt).length;if(Ce.indentation=ht,Ce.indentationDiff=null,ht>0)return null}}return Ce.f(Qe,Ce)},innerMode:function(Qe){return Qe.block==Ue?{state:Qe.htmlState,mode:Ve}:Qe.localState?{state:Qe.localState,mode:Qe.localMode}:{state:Qe,mode:or}},indent:function(Qe,Ce,ht){return Qe.block==Ue&&Ve.indent?Ve.indent(Qe.htmlState,Ce,ht):Qe.localState&&Qe.localMode.indent?Qe.localMode.indent(Qe.localState,Ce,ht):de.Pass},blankLine:ke,getType:_t,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return or},"xml"),de.defineMIME("text/markdown","markdown"),de.defineMIME("text/x-markdown","markdown")})},52539:function(En,Wt,se){(function(de){de(se(4631))})(function(de){"use strict";de.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 He=0;He<de.modeInfo.length;He++){var Be=de.modeInfo[He];Be.mimes&&(Be.mime=Be.mimes[0])}de.findModeByMIME=function(Ve){Ve=Ve.toLowerCase();for(var ve=0;ve<de.modeInfo.length;ve++){var we=de.modeInfo[ve];if(we.mime==Ve)return we;if(we.mimes){for(var Ee=0;Ee<we.mimes.length;Ee++)if(we.mimes[Ee]==Ve)return we}}if(/\+xml$/.test(Ve))return de.findModeByMIME("application/xml");if(/\+json$/.test(Ve))return de.findModeByMIME("application/json")},de.findModeByExtension=function(Ve){Ve=Ve.toLowerCase();for(var ve=0;ve<de.modeInfo.length;ve++){var we=de.modeInfo[ve];if(we.ext){for(var Ee=0;Ee<we.ext.length;Ee++)if(we.ext[Ee]==Ve)return we}}},de.findModeByFileName=function(Ve){for(var ve=0;ve<de.modeInfo.length;ve++){var we=de.modeInfo[ve];if(we.file&&we.file.test(Ve))return we}var Ee=Ve.lastIndexOf("."),xe=Ee>-1&&Ve.substring(Ee+1,Ve.length);if(xe)return de.findModeByExtension(xe)},de.findModeByName=function(Ve){Ve=Ve.toLowerCase();for(var ve=0;ve<de.modeInfo.length;ve++){var we=de.modeInfo[ve];if(we.name.toLowerCase()==Ve)return we;if(we.alias){for(var Ee=0;Ee<we.alias.length;Ee++)if(we.alias[Ee].toLowerCase()==Ve)return we}}}})},80785:function(En,Wt,se){(function(de){de(se(4631))})(function(de){"use strict";de.defineMode("stex",function(He,Be){"use strict";function Ve(ft,it){ft.cmdState.push(it)}function ve(ft){return ft.cmdState.length>0?ft.cmdState[ft.cmdState.length-1]:null}function we(ft){var it=ft.cmdState.pop();it&&it.closeBracket()}function Ee(ft){for(var it=ft.cmdState,Je=it.length-1;Je>=0;Je--){var Le=it[Je];if(Le.name!="DEFAULT")return Le}return{styleIdentifier:function(){return null}}}function xe(ft,it,Je){return function(){this.name=ft,this.bracketNo=0,this.style=it,this.styles=Je,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var me={};me.importmodule=xe("importmodule","tag",["string","builtin"]),me.documentclass=xe("documentclass","tag",["","atom"]),me.usepackage=xe("usepackage","tag",["atom"]),me.begin=xe("begin","tag",["atom"]),me.end=xe("end","tag",["atom"]),me.label=xe("label","tag",["atom"]),me.ref=xe("ref","tag",["atom"]),me.eqref=xe("eqref","tag",["atom"]),me.cite=xe("cite","tag",["atom"]),me.bibitem=xe("bibitem","tag",["atom"]),me.Bibitem=xe("Bibitem","tag",["atom"]),me.RBibitem=xe("RBibitem","tag",["atom"]),me.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ie(ft,it){ft.f=it}function ot(ft,it){var Je;if(ft.match(/^\\[a-zA-Z@]+/)){var Le=ft.current().slice(1);return Je=me.hasOwnProperty(Le)?me[Le]:me.DEFAULT,Je=new Je,Ve(it,Je),Ie(it,St),Je.style}if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/\\]/))return"tag";if(ft.match("\\["))return Ie(it,function(qt,tt){return Oe(qt,tt,"\\]")}),"keyword";if(ft.match("\\("))return Ie(it,function(qt,tt){return Oe(qt,tt,"\\)")}),"keyword";if(ft.match("$$"))return Ie(it,function(qt,tt){return Oe(qt,tt,"$$")}),"keyword";if(ft.match("$"))return Ie(it,function(qt,tt){return Oe(qt,tt,"$")}),"keyword";var gt=ft.next();if(gt=="%")return ft.skipToEnd(),"comment";if(gt=="}"||gt=="]"){if(Je=ve(it),Je)Je.closeBracket(gt),Ie(it,St);else return"error";return"bracket"}else return gt=="{"||gt=="["?(Je=me.DEFAULT,Je=new Je,Ve(it,Je),"bracket"):/\d/.test(gt)?(ft.eatWhile(/[\w.%]/),"atom"):(ft.eatWhile(/[\w\-_]/),Je=Ee(it),Je.name=="begin"&&(Je.argument=ft.current()),Je.styleIdentifier())}function Oe(ft,it,Je){if(ft.eatSpace())return null;if(Je&&ft.match(Je))return Ie(it,ot),"keyword";if(ft.match(/^\\[a-zA-Z@]+/))return"tag";if(ft.match(/^[a-zA-Z]+/))return"variable-2";if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/]/)||ft.match(/^[\^_&]/))return"tag";if(ft.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ft.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Le=ft.next();return Le=="{"||Le=="}"||Le=="["||Le=="]"||Le=="("||Le==")"?"bracket":Le=="%"?(ft.skipToEnd(),"comment"):"error"}function St(ft,it){var Je=ft.peek(),Le;return Je=="{"||Je=="["?(Le=ve(it),Le.openBracket(Je),ft.eat(Je),Ie(it,ot),"bracket"):/[ \t\r]/.test(Je)?(ft.eat(Je),null):(Ie(it,ot),we(it),ot(ft,it))}return{startState:function(){var ft=Be.inMathMode?function(it,Je){return Oe(it,Je)}:ot;return{cmdState:[],f:ft}},copyState:function(ft){return{cmdState:ft.cmdState.slice(),f:ft.f}},token:function(ft,it){return it.f(ft,it)},blankLine:function(ft){ft.f=ot,ft.cmdState.length=0},lineComment:"%"}}),de.defineMIME("text/x-stex","stex"),de.defineMIME("text/x-latex","stex")})},29589:function(En,Wt,se){(function(de){de(se(4631))})(function(de){"use strict";var He={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},Be={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};de.defineMode("xml",function(Ve,ve){var we=Ve.indentUnit,Ee={},xe=ve.htmlMode?He:Be;for(var me in xe)Ee[me]=xe[me];for(var me in ve)Ee[me]=ve[me];var Ie,ot;function Oe(Xe,Kt){function Ot(sn){return Kt.tokenize=sn,sn(Xe,Kt)}var bn=Xe.next();if(bn=="<")return Xe.eat("!")?Xe.eat("[")?Xe.match("CDATA[")?Ot(it("atom","]]>")):null:Xe.match("--")?Ot(it("comment","-->")):Xe.match("DOCTYPE",!0,!0)?(Xe.eatWhile(/[\w\._\-]/),Ot(Je(1))):null:Xe.eat("?")?(Xe.eatWhile(/[\w\._\-]/),Kt.tokenize=it("meta","?>"),"meta"):(Ie=Xe.eat("/")?"closeTag":"openTag",Kt.tokenize=St,"tag bracket");if(bn=="&"){var Nt;return Xe.eat("#")?Xe.eat("x")?Nt=Xe.eatWhile(/[a-fA-F\d]/)&&Xe.eat(";"):Nt=Xe.eatWhile(/[\d]/)&&Xe.eat(";"):Nt=Xe.eatWhile(/[\w\.\-:]/)&&Xe.eat(";"),Nt?"atom":"error"}else return Xe.eatWhile(/[^&<]/),null}Oe.isInText=!0;function St(Xe,Kt){var Ot=Xe.next();if(Ot==">"||Ot=="/"&&Xe.eat(">"))return Kt.tokenize=Oe,Ie=Ot==">"?"endTag":"selfcloseTag","tag bracket";if(Ot=="=")return Ie="equals",null;if(Ot=="<"){Kt.tokenize=Oe,Kt.state=tt,Kt.tagName=Kt.tagStart=null;var bn=Kt.tokenize(Xe,Kt);return bn?bn+" tag error":"tag error"}else return/[\'\"]/.test(Ot)?(Kt.tokenize=ft(Ot),Kt.stringStartCol=Xe.column(),Kt.tokenize(Xe,Kt)):(Xe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ft(Xe){var Kt=function(Ot,bn){for(;!Ot.eol();)if(Ot.next()==Xe){bn.tokenize=St;break}return"string"};return Kt.isInAttribute=!0,Kt}function it(Xe,Kt){return function(Ot,bn){for(;!Ot.eol();){if(Ot.match(Kt)){bn.tokenize=Oe;break}Ot.next()}return Xe}}function Je(Xe){return function(Kt,Ot){for(var bn;(bn=Kt.next())!=null;){if(bn=="<")return Ot.tokenize=Je(Xe+1),Ot.tokenize(Kt,Ot);if(bn==">")if(Xe==1){Ot.tokenize=Oe;break}else return Ot.tokenize=Je(Xe-1),Ot.tokenize(Kt,Ot)}return"meta"}}function Le(Xe,Kt,Ot){this.prev=Xe.context,this.tagName=Kt,this.indent=Xe.indented,this.startOfLine=Ot,(Ee.doNotIndent.hasOwnProperty(Kt)||Xe.context&&Xe.context.noIndent)&&(this.noIndent=!0)}function gt(Xe){Xe.context&&(Xe.context=Xe.context.prev)}function qt(Xe,Kt){for(var Ot;;){if(!Xe.context||(Ot=Xe.context.tagName,!Ee.contextGrabbers.hasOwnProperty(Ot)||!Ee.contextGrabbers[Ot].hasOwnProperty(Kt)))return;gt(Xe)}}function tt(Xe,Kt,Ot){return Xe=="openTag"?(Ot.tagStart=Kt.column(),ct):Xe=="closeTag"?ke:tt}function ct(Xe,Kt,Ot){return Xe=="word"?(Ot.tagName=Kt.current(),ot="tag",je):Ee.allowMissingTagName&&Xe=="endTag"?(ot="tag bracket",je(Xe,Kt,Ot)):(ot="error",ct)}function ke(Xe,Kt,Ot){if(Xe=="word"){var bn=Kt.current();return Ot.context&&Ot.context.tagName!=bn&&Ee.implicitlyClosed.hasOwnProperty(Ot.context.tagName)&>(Ot),Ot.context&&Ot.context.tagName==bn||Ee.matchClosing===!1?(ot="tag",Se):(ot="tag error",Ue)}else return Ee.allowMissingTagName&&Xe=="endTag"?(ot="tag bracket",Se(Xe,Kt,Ot)):(ot="error",Ue)}function Se(Xe,Kt,Ot){return Xe!="endTag"?(ot="error",Se):(gt(Ot),tt)}function Ue(Xe,Kt,Ot){return ot="error",Se(Xe,Kt,Ot)}function je(Xe,Kt,Ot){if(Xe=="word")return ot="attribute",_t;if(Xe=="endTag"||Xe=="selfcloseTag"){var bn=Ot.tagName,Nt=Ot.tagStart;return Ot.tagName=Ot.tagStart=null,Xe=="selfcloseTag"||Ee.autoSelfClosers.hasOwnProperty(bn)?qt(Ot,bn):(qt(Ot,bn),Ot.context=new Le(Ot,bn,Nt==Ot.indented)),tt}return ot="error",je}function _t(Xe,Kt,Ot){return Xe=="equals"?vt:(Ee.allowMissing||(ot="error"),je(Xe,Kt,Ot))}function vt(Xe,Kt,Ot){return Xe=="string"?kt:Xe=="word"&&Ee.allowUnquoted?(ot="string",je):(ot="error",je(Xe,Kt,Ot))}function kt(Xe,Kt,Ot){return Xe=="string"?kt:je(Xe,Kt,Ot)}return{startState:function(Xe){var Kt={tokenize:Oe,state:tt,indented:Xe||0,tagName:null,tagStart:null,context:null};return Xe!=null&&(Kt.baseIndent=Xe),Kt},token:function(Xe,Kt){if(!Kt.tagName&&Xe.sol()&&(Kt.indented=Xe.indentation()),Xe.eatSpace())return null;Ie=null;var Ot=Kt.tokenize(Xe,Kt);return(Ot||Ie)&&Ot!="comment"&&(ot=null,Kt.state=Kt.state(Ie||Ot,Xe,Kt),ot&&(Ot=ot=="error"?Ot+" error":ot)),Ot},indent:function(Xe,Kt,Ot){var bn=Xe.context;if(Xe.tokenize.isInAttribute)return Xe.tagStart==Xe.indented?Xe.stringStartCol+1:Xe.indented+we;if(bn&&bn.noIndent)return de.Pass;if(Xe.tokenize!=St&&Xe.tokenize!=Oe)return Ot?Ot.match(/^(\s*)/)[0].length:0;if(Xe.tagName)return Ee.multilineTagIndentPastTag!==!1?Xe.tagStart+Xe.tagName.length+2:Xe.tagStart+we*(Ee.multilineTagIndentFactor||1);if(Ee.alignCDATA&&/<!\[CDATA\[/.test(Kt))return 0;var Nt=Kt&&/^<(\/)?([\w_:\.-]*)/.exec(Kt);if(Nt&&Nt[1])for(;bn;)if(bn.tagName==Nt[2]){bn=bn.prev;break}else if(Ee.implicitlyClosed.hasOwnProperty(bn.tagName))bn=bn.prev;else break;else if(Nt)for(;bn;){var sn=Ee.contextGrabbers[bn.tagName];if(sn&&sn.hasOwnProperty(Nt[2]))bn=bn.prev;else break}for(;bn&&bn.prev&&!bn.startOfLine;)bn=bn.prev;return bn?bn.indent+we:Xe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ee.htmlMode?"html":"xml",helperType:Ee.htmlMode?"html":"xml",skipAttribute:function(Xe){Xe.state==vt&&(Xe.state=je)},xmlCurrentTag:function(Xe){return Xe.tagName?{name:Xe.tagName,close:Xe.type=="closeTag"}:null},xmlCurrentContext:function(Xe){for(var Kt=[],Ot=Xe.context;Ot;Ot=Ot.prev)Ot.tagName&&Kt.push(Ot.tagName);return Kt.reverse()}}}),de.defineMIME("text/xml","xml"),de.defineMIME("application/xml","xml"),de.mimeModes.hasOwnProperty("text/html")||de.defineMIME("text/html",{name:"xml",htmlMode:!0})})},15979:function(En,Wt,se){"use strict";se.d(Wt,{hP:function(){return ln}});var de=function(Ae,ue){return(de=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,pe){le.__proto__=pe}||function(le,pe){for(var he in pe)Object.prototype.hasOwnProperty.call(pe,he)&&(le[he]=pe[he])})(Ae,ue)};function He(Ae,ue){function le(){this.constructor=Ae}de(Ae,ue),Ae.prototype=ue===null?Object.create(ue):(le.prototype=ue.prototype,new le)}function Be(Ae,ue,le,pe){return new(le||(le=Promise))(function(he,oe){function Te(Rt){try{Lt(pe.next(Rt))}catch(Ft){oe(Ft)}}function Ye(Rt){try{Lt(pe.throw(Rt))}catch(Ft){oe(Ft)}}function Lt(Rt){var Ft;Rt.done?he(Rt.value):(Ft=Rt.value,Ft instanceof le?Ft:new le(function(Jt){Jt(Ft)})).then(Te,Ye)}Lt((pe=pe.apply(Ae,ue||[])).next())})}function Ve(Ae,ue){var le,pe,he,oe,Te={label:0,sent:function(){if(1&he[0])throw he[1];return he[1]},trys:[],ops:[]};return oe={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Ye(Lt){return function(Rt){return function(Ft){if(le)throw new TypeError("Generator is already executing.");for(;Te;)try{if(le=1,pe&&(he=2&Ft[0]?pe.return:Ft[0]?pe.throw||((he=pe.return)&&he.call(pe),0):pe.next)&&!(he=he.call(pe,Ft[1])).done)return he;switch(pe=0,he&&(Ft=[2&Ft[0],he.value]),Ft[0]){case 0:case 1:he=Ft;break;case 4:return Te.label++,{value:Ft[1],done:!1};case 5:Te.label++,pe=Ft[1],Ft=[0];continue;case 7:Ft=Te.ops.pop(),Te.trys.pop();continue;default:if(he=Te.trys,!((he=he.length>0&&he[he.length-1])||Ft[0]!==6&&Ft[0]!==2)){Te=0;continue}if(Ft[0]===3&&(!he||Ft[1]>he[0]&&Ft[1]<he[3])){Te.label=Ft[1];break}if(Ft[0]===6&&Te.label<he[1]){Te.label=he[1],he=Ft;break}if(he&&Te.label<he[2]){Te.label=he[2],Te.ops.push(Ft);break}he[2]&&Te.ops.pop(),Te.trys.pop();continue}Ft=ue.call(Ae,Te)}catch(Jt){Ft=[6,Jt],pe=0}finally{le=he=0}if(5&Ft[0])throw Ft[1];return{value:Ft[0]?Ft[1]:void 0,done:!0}}([Lt,Rt])}}}function ve(){for(var Ae=0,ue=0,le=arguments.length;ue<le;ue++)Ae+=arguments[ue].length;var pe=Array(Ae),he=0;for(ue=0;ue<le;ue++)for(var oe=arguments[ue],Te=0,Ye=oe.length;Te<Ye;Te++,he++)pe[he]=oe[Te];return pe}var we=function(){function Ae(){}return Ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ae.setAttributes=function(ue,le){for(var pe=0,he=le;pe<he.length;pe++){var oe=he[pe],Te=oe[0],Ye=oe[1];ue.setAttribute(Te,Ye)}},Ae.createRect=function(ue,le,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","rect");return he.setAttribute("width",ue.toString()),he.setAttribute("height",le.toString()),pe&&Ae.setAttributes(he,pe),he},Ae.createLine=function(ue,le,pe,he,oe){var Te=document.createElementNS("http://www.w3.org/2000/svg","line");return Te.setAttribute("x1",ue.toString()),Te.setAttribute("y1",le.toString()),Te.setAttribute("x2",pe.toString()),Te.setAttribute("y2",he.toString()),oe&&Ae.setAttributes(Te,oe),Te},Ae.createPolygon=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return pe.setAttribute("points",ue),le&&Ae.setAttributes(pe,le),pe},Ae.createCircle=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","circle");return pe.setAttribute("cx",(ue/2).toString()),pe.setAttribute("cy",(ue/2).toString()),pe.setAttribute("r",ue.toString()),le&&Ae.setAttributes(pe,le),pe},Ae.createEllipse=function(ue,le,pe){var he=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return he.setAttribute("cx",(ue/2).toString()),he.setAttribute("cy",(le/2).toString()),he.setAttribute("rx",(ue/2).toString()),he.setAttribute("ry",(le/2).toString()),pe&&Ae.setAttributes(he,pe),he},Ae.createGroup=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","g");return ue&&Ae.setAttributes(le,ue),le},Ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ae.createMarker=function(ue,le,pe,he,oe,Te,Ye){var Lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ae.setAttributes(Lt,[["id",ue],["orient",le],["markerWidth",pe.toString()],["markerHeight",he.toString()],["refX",oe.toString()],["refY",Te.toString()]]),Lt.appendChild(Ye),Lt},Ae.createText=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","text");return le.setAttribute("x","0"),le.setAttribute("y","0"),ue&&Ae.setAttributes(le,ue),le},Ae.createTSpan=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return pe.textContent=ue,le&&Ae.setAttributes(pe,le),pe},Ae.createImage=function(ue){var le=document.createElementNS("http://www.w3.org/2000/svg","image");return ue&&Ae.setAttributes(le,ue),le},Ae.createPoint=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return pe.x=ue,pe.y=le,pe},Ae.createPath=function(ue,le){var pe=document.createElementNS("http://www.w3.org/2000/svg","path");return pe.setAttribute("d",ue),le&&Ae.setAttributes(pe,le),pe},Ae}(),Ee=function(){function Ae(){}return Ae.addKey=function(ue){Ae.key=ue},Object.defineProperty(Ae,"isLicensed",{get:function(){return!!Ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ae.key)},enumerable:!1,configurable:!0}),Ae}(),xe=function(){function Ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ae.prototype.rasterize=function(ue,le,pe){var he=this;return new Promise(function(oe){var Te=pe!==void 0?pe:document.createElement("canvas");ue===null&&(he.markersOnly=!0,he.naturalSize=!1);var Ye=document.createElementNS("http://www.w3.org/2000/svg","svg");Ye.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ye.setAttribute("width",le.width.baseVal.valueAsString),Ye.setAttribute("height",le.height.baseVal.valueAsString),Ye.setAttribute("viewBox","0 0 "+le.viewBox.baseVal.width.toString()+" "+le.viewBox.baseVal.height.toString()),Ye.innerHTML=le.innerHTML,he.naturalSize===!0?(Ye.width.baseVal.value=ue.naturalWidth,Ye.height.baseVal.value=ue.naturalHeight):he.width!==void 0&&he.height!==void 0&&(Ye.width.baseVal.value=he.width,Ye.height.baseVal.value=he.height),Te.width=Ye.width.baseVal.value,Te.height=Ye.height.baseVal.value;var Lt=Ye.outerHTML,Rt=Te.getContext("2d");he.markersOnly!==!0&&Rt.drawImage(ue,0,0,Te.width,Te.height);var Ft=window.URL,Jt=new Image(Te.width,Te.height);Jt.setAttribute("crossOrigin","anonymous");var Xt=new Blob([Lt],{type:"image/svg+xml"}),Hn=Ft.createObjectURL(Xt);Jt.onload=function(){Rt.drawImage(Jt,0,0),Ft.revokeObjectURL(Hn);var Rn=Te.toDataURL(he.imageType,he.imageQuality);oe(Rn)},Jt.src=Hn})},Ae}(),me=function(){},Ie=function(){function Ae(ue){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ue+"_"}return Object.defineProperty(Ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ae.prototype.addClass=function(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},Ae.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)},Ae.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 ot("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ot("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ot("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Oe("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Oe("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Ae.prototype.removeStyleSheet=function(){var ue;this.styleSheet&&(((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ae}(),ot=function(Ae,ue){this.selector=Ae,this.style=ue},Oe=function(Ae,ue){this.localName=Ae,this.style=ue},St=function(){function Ae(ue,le,pe,he,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ue,this.displayMode=le,this.markerItems=pe,this.uiStyleSettings=he,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ae.prototype.show=function(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 pe=document.createElement("div");pe.className=this.toolbarBlockStyleClass.name,pe.style.whiteSpace="nowrap",this.uiContainer.appendChild(pe),this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(pe,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Te=document.createElement("div");Te.className=""+le.toolbarButtonStyleClass.name,Te.setAttribute("data-type-name",oe.typeName),Te.innerHTML=oe.icon,Te.addEventListener("click",function(){le.markerToolbarButtonClicked(Te,oe)}),le.buttons.push(Te),le.markerButtons.push(Te)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var he=document.createElement("div");he.className=this.toolbarBlockStyleClass.name,he.style.whiteSpace="nowrap",he.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(he),this.addActionButton(he,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(he,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ae.prototype.addButtonClickListener=function(ue){this.buttonClickListeners.push(ue)},Ae.prototype.removeButtonClickListener=function(ue){this.buttonClickListeners.indexOf(ue)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ue),1)},Ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ae.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]))}},Ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Ae.prototype.resetButtonStyles=function(){var 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)})},Ae.prototype.addActionButton=function(ue,le,pe){var he=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=le,oe.setAttribute("data-action",pe),oe.addEventListener("click",function(){he.actionToolbarButtonClicked(oe,pe)}),pe){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}ue.appendChild(oe),this.buttons.push(oe)},Ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Oe("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Oe("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Oe("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Oe("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new Oe("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var ue=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Oe("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 Oe("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ot("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ot("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Ae.prototype.markerToolbarButtonClicked=function(ue,le){this.setActiveButton(ue),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("marker",le)}),this.markerButtonOverflowBlock.style.display="none"},Ae.prototype.actionToolbarButtonClicked=function(ue,le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(pe){return pe("action",le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ae.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)},Ae.prototype.setActiveMarkerButton=function(ue){var le=this.markerButtons.find(function(pe){return pe.getAttribute("data-type-name")===ue});le&&this.setActiveButton(le)},Ae.prototype.setCurrentMarker=function(ue){var le=this;this.currentMarker=ue,this.buttons.filter(function(pe){return/delete|notes/.test(pe.getAttribute("data-action"))}).forEach(function(pe){le.currentMarker===void 0?(pe.style.fillOpacity="0.4",pe.style.pointerEvents="none"):(pe.style.fillOpacity="1",pe.style.pointerEvents="all")})},Ae}(),ft=function(){function Ae(ue,le,pe,he){this.panels=[],this.panelButtons=[],this.markerjsContainer=ue,this.displayMode=le,this.uiStyleSettings=pe,this.styles=he,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ae.prototype.addStyles=function(){var ue;this.toolboxStyleClass=this.styles.addClass(new Oe("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new Oe("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Oe("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Oe("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Oe("toolbox-panel-row_colors",`
|
|
|
background-color: `+((ue=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ue!==void 0?ue:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Oe("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 Oe("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Oe("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ot("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ot("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Ae.prototype.show=function(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)},Ae.prototype.setPanelButtons=function(ue){var le,pe,he=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+" "+((pe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&pe!==void 0?pe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Te;oe.uiStyleSettings=he.uiStyleSettings;var Ye=document.createElement("div");Ye.className=he.toolboxButtonStyleClass.name+" "+((Te=he.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Te!==void 0?Te:he.toolboxButtonStyleColorsClass.name),Ye.innerHTML=oe.icon,Ye.title=oe.title,Ye.addEventListener("click",function(){he.panelButtonClick(oe)}),he.panelButtons.push(Ye),he.buttonRow.appendChild(Ye)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ae.prototype.panelButtonClick=function(ue){var le=this,pe=-1;if(ue!==this.activePanel){pe=this.panels.indexOf(ue),this.panelRow.innerHTML="";var he=ue.getUi();he.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(he),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=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(oe,Te){var Ye,Lt;oe.className=le.toolboxButtonStyleClass.name+" "+(Te===pe?""+((Ye=le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:le.toolboxActiveButtonStyleColorsClass.name):""+((Lt=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Lt!==void 0?Lt:le.toolboxButtonStyleColorsClass.name))})},Ae}(),it=function(Ae,ue){this.title=Ae,this.icon=ue},Je=function(Ae){function ue(le,pe,he,oe){var Te=Ae.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Te.colors=[],Te.addTransparent=!1,Te.colorBoxes=[],Te.colors=pe,Te.currentColor=he,Te.setCurrentColor=Te.setCurrentColor.bind(Te),Te.getColorBox=Te.getColorBox.bind(Te),Te}return He(ue,Ae),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.whiteSpace="nowrap",this.colors.forEach(function(he){var oe=le.getColorBox(he);pe.appendChild(oe),le.colorBoxes.push(oe)}),pe},ue.prototype.getColorBox=function(le){var pe=this,he=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-he,Te=document.createElement("div");Te.style.display="inline-block",Te.style.boxSizing="content-box",Te.style.width=oe-2+"px",Te.style.height=oe-2+"px",Te.style.padding="1px",Te.style.marginRight="2px",Te.style.marginBottom="2px",Te.style.borderWidth="2px",Te.style.borderStyle="solid",Te.style.borderRadius=(oe+2)/2+"px",Te.style.borderColor=le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Te.addEventListener("click",function(){pe.setCurrentColor(le,Te)});var Ye=document.createElement("div");return Ye.style.display="inline-block",Ye.style.width=oe-2+"px",Ye.style.height=oe-2+"px",Ye.style.backgroundColor=le,Ye.style.borderRadius=oe/2+"px",le==="transparent"&&(Ye.style.fill=this.uiStyleSettings.toolboxAccentColor,Ye.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>`),Te.appendChild(Ye),Te},ue.prototype.setCurrentColor=function(le,pe){var he=this;this.currentColor=le,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(le)},ue}(it),Le=function(){function Ae(ue,le,pe){this._state="new",this._isSelected=!1,this._container=ue,this._overlayContainer=le,this.globalSettings=pe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ae.prototype.ownsTarget=function(ue){return!1},Object.defineProperty(Ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ae.prototype.pointerDown=function(ue,le){},Ae.prototype.dblClick=function(ue,le){},Ae.prototype.manipulate=function(ue){},Ae.prototype.pointerUp=function(ue){this.stateChanged()},Ae.prototype.dispose=function(){},Ae.prototype.addMarkerVisualToContainer=function(ue){this.container.childNodes.length>0?this.container.insertBefore(ue,this.container.childNodes[0]):this.container.appendChild(ue)},Ae.prototype.getState=function(){return{typeName:Ae.typeName,state:this.state,notes:this.notes}},Ae.prototype.restoreState=function(ue){this._state=ue.state,this.notes=ue.notes},Ae.prototype.scale=function(ue,le){},Ae.prototype.colorChanged=function(ue){this.onColorChanged&&this.onColorChanged(ue),this.stateChanged()},Ae.prototype.fillColorChanged=function(ue){this.onFillColorChanged&&this.onFillColorChanged(ue),this.stateChanged()},Ae.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)}},Ae.typeName="MarkerBase",Ae}(),gt=function(){function Ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ae.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},Ae}(),qt=function(){function Ae(){this.GRIP_SIZE=10,this.visual=we.createGroup(),this.visual.appendChild(we.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(we.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ae.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},Ae}(),tt=function(){function Ae(){}return Ae.toITransformMatrix=function(ue){return{a:ue.a,b:ue.b,c:ue.c,d:ue.d,e:ue.e,f:ue.f}},Ae.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},Ae}(),ct=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(we.createTransform()),oe.setupControlBox(),oe}return He(ue,Ae),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 pe=we.createTransform();this._visual.transform.baseVal.appendItem(pe)},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!!Ae.prototype.ownsTarget.call(this,le)||!!(this.controlGrips.findGripByVisual(le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(le))},ue.prototype.pointerDown=function(le,pe){Ae.prototype.pointerDown.call(this,le,pe),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 he=this.unrotatePoint(le);if(this.manipulationStartX=he.x,this.manipulationStartY=he.y,this.offsetX=he.x-this.left,this.offsetY=he.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(pe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(pe)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Te=this.container.transform.baseVal.getItem(0);Te.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Te,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ue.prototype.pointerUp=function(le){var pe=this.state;Ae.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",pe==="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 pe=this.unrotatePoint(le);this.state==="creating"?this.resize(le):this.state==="move"?(this.left=this.manipulationStartLeft+(pe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(pe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(pe):this.state==="rotate"&&this.rotate(le)},ue.prototype.resize=function(le){var pe=this.manipulationStartLeft,he=this.manipulationStartWidth,oe=this.manipulationStartTop,Te=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:pe=this.manipulationStartLeft+le.x-this.manipulationStartX,he=this.manipulationStartWidth+this.manipulationStartLeft-pe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:he=this.manipulationStartWidth+le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+le.y-this.manipulationStartY,Te=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Te=this.manipulationStartHeight+le.y-this.manipulationStartY}he>=0?(this.left=pe,this.width=he):(this.left=pe+he,this.width=-he),Te>=0?(this.top=oe,this.height=Te):(this.top=oe+Te,this.height=-Te),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 pe=Math.sign(le.x-this.centerX);this.rotationAngle=180*Math.atan((le.y-this.centerY)/(le.x-this.centerX))/Math.PI+90*pe,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 pe=this.container.getCTM(),he=we.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},ue.prototype.unrotatePoint=function(le){if(this.rotationAngle===0)return le;var pe=this.container.getCTM();pe=pe.inverse();var he=we.createPoint(le.x,le.y);return{x:(he=he.matrixTransform(pe)).x,y:he.y}},ue.prototype.select=function(){Ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){Ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=we.createGroup();var le=we.createTransform();le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(le),this.container.appendChild(this.controlBox),this.controlRect=we.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=we.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 gt,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 qt;return le.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(le.visual),le},ue.prototype.positionGrips=function(){var le=this.controlGrips.topLeft.GRIP_SIZE,pe=-le/2,he=pe,oe=(this.width+this.CB_DISTANCE)/2-le/2,Te=(this.height+this.CB_DISTANCE)/2-le/2,Ye=this.height+this.CB_DISTANCE-le/2,Lt=this.width+this.CB_DISTANCE-le/2;this.positionGrip(this.controlGrips.topLeft.visual,pe,he),this.positionGrip(this.controlGrips.topCenter.visual,oe,he),this.positionGrip(this.controlGrips.topRight.visual,Lt,he),this.positionGrip(this.controlGrips.centerLeft.visual,pe,Te),this.positionGrip(this.controlGrips.centerRight.visual,Lt,Te),this.positionGrip(this.controlGrips.bottomLeft.visual,pe,Ye),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Ye),this.positionGrip(this.controlGrips.bottomRight.visual,Lt,Ye),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,he-3*this.CB_DISTANCE)},ue.prototype.positionGrip=function(le,pe,he){var oe=le.transform.baseVal.getItem(0);oe.setTranslate(pe,he),le.transform.baseVal.replaceItem(oe,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:tt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:tt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ae.prototype.getState.call(this))},ue.prototype.restoreState=function(le){Ae.prototype.restoreState.call(this,le);var pe=le;this.left=pe.left,this.top=pe.top,this.width=pe.width,this.height=pe.height,this.rotationAngle=pe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,pe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,pe.containerTransformMatrix))},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe);var he=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:he.x*le,y:he.y*pe});this.left=oe.x,this.top=oe.y,this.width=this.width*le,this.height=this.height*pe,this.adjustControlBox()},ue}(Le),ke=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=we.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,pe){Ae.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Ae.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Ae.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){Ae.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ue.prototype.pointerUp=function(le){Ae.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&we.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},Ae.prototype.getState.call(this))},ue.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),Ae.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),this.setSize()},ue.title="Rectangle marker",ue}(ct),Se=function(Ae){function ue(le,pe,he,oe){var Te=Ae.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Te.widths=[],Te.widthBoxes=[],Te.widths=pe,Te.currentWidth=he,Te.setCurrentWidth=Te.setCurrentWidth.bind(Te),Te}return He(ue,Ae),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.widths.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===le.currentWidth?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentWidth(he,oe)}),pe.appendChild(oe);var Te=document.createElement("div");Te.innerText=he.toString(),Te.style.marginRight="5px",oe.appendChild(Te);var Ye=document.createElement("div");Ye.style.minHeight="20px",Ye.style.flexGrow="2",Ye.style.display="flex",Ye.style.alignItems="center";var Lt=document.createElement("hr");Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop=he+"px solid "+le.uiStyleSettings.toolboxColor,Lt.style.flexGrow="2",Ye.appendChild(Lt),oe.appendChild(Ye),le.widthBoxes.push(oe)}),pe},ue.prototype.setCurrentWidth=function(le,pe){var he=this;this.currentWidth=le,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ue}(it),Ue=function(Ae){function ue(le,pe,he,oe){var Te=Ae.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Te.styles=[],Te.styleBoxes=[],Te.styles=pe,Te.currentStyle=he,Te.setCurrentStyle=Te.setCurrentStyle.bind(Te),Te}return He(ue,Ae),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",this.styles.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/le.styles.length-5+"%",oe.style.borderColor=he===le.currentStyle?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentStyle(he,oe)}),pe.appendChild(oe);var Te=document.createElement("div");Te.style.minHeight="20px",Te.style.flexGrow="2",Te.style.overflow="hidden";var Ye=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(he!==""?'stroke-dasharray="'+he+'"':"")+` />
|
|
|
</svg>`;Te.innerHTML=Ye,oe.appendChild(Te),le.styleBoxes.push(oe)}),pe},ue.prototype.setCurrentStyle=function(le,pe){var he=this;this.currentStyle=le,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ue}(it),je=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new Je("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Se("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return He(ue,Ae),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Ae.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}(ke),_t=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},vt=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!!Ae.prototype.ownsTarget.call(this,le)||!(!this.grip1.ownsTarget(le)&&!this.grip2.ownsTarget(le))},ue.prototype.pointerDown=function(le,pe){Ae.prototype.pointerDown.call(this,le,pe),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(pe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(pe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ue.prototype.pointerUp=function(le){var pe=this.state;Ae.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",pe==="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(){Ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ue.prototype.deselect=function(){Ae.prototype.deselect.call(this),this.controlBox.style.display="none"},ue.prototype.setupControlBox=function(){this.controlBox=we.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 qt;return le.visual.transform.baseVal.appendItem(we.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,pe,he){var oe=le.transform.baseVal.getItem(0);oe.setTranslate(pe,he),le.transform.baseVal.replaceItem(oe,0)},ue.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ae.prototype.getState.call(this))},ue.prototype.restoreState=function(le){Ae.prototype.restoreState.call(this,le);var pe=le;this.x1=pe.x1,this.y1=pe.y1,this.x2=pe.x2,this.y2=pe.y2},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),this.x1=this.x1*le,this.y1=this.y1*pe,this.x2=this.x2*le,this.y2=this.y2*pe,this.adjustVisual(),this.adjustControlBox()},ue}(Le),kt=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new Je("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Se("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.selectorLine&&le!==this.visibleLine)},ue.prototype.createVisual=function(){this.visual=we.createGroup(),this.selectorLine=we.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=we.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,pe){Ae.prototype.pointerDown.call(this,le,pe),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()),we.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),we.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},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Ae.prototype.restoreState.call(this,le);var pe=le;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.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}(vt),Xe=function(Ae){function ue(le,pe,he,oe){var Te=Ae.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Te.fonts=[],Te.fontBoxes=[],Te.fonts=pe,Te.currentFont=he,Te.setCurrentFont=Te.setCurrentFont.bind(Te),Te}return He(ue,Ae),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.overflow="hidden",pe.style.flexGrow="2",this.fonts.forEach(function(he){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/le.fonts.length-5+"%",oe.style.borderColor=he===le.currentFont?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentFont(he,oe)}),pe.appendChild(oe);var Te=document.createElement("div");Te.style.display="flex",Te.style.minHeight="20px",Te.style.flexGrow="2",Te.style.fontFamily=he,Te.style.overflow="hidden";var Ye=document.createElement("div");Ye.style.whiteSpace="nowrap",Ye.style.overflow="hidden",Ye.style.textOverflow="ellipsis",Ye.innerHTML="The quick brown fox jumps over the lazy dog",Te.appendChild(Ye),oe.appendChild(Te),le.fontBoxes.push(oe)}),pe},ue.prototype.setCurrentFont=function(le,pe){var he=this;this.currentFont=le,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ue}(it),Kt=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=he.defaultColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new Je("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Xe("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){if(Ae.prototype.ownsTarget.call(this,le)||le===this.visual||le===this.textElement||le===this.bgRectangle)return!0;var pe=!1;return this.textElement.childNodes.forEach(function(he){he===le&&(pe=!0)}),pe},ue.prototype.createVisual=function(){this.visual=we.createGroup(),this.bgRectangle=we.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=we.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.textElement.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ue.prototype.pointerDown=function(le,pe){Ae.prototype.pointerDown.call(this,le,pe),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(pe){le.textElement.appendChild(we.createTSpan(pe.trim()===""?" ":pe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ue.prototype.getTextScale=function(){var le=this.textElement.getBBox(),pe=1;if(le.width>0&&le.height>0){var he=(1*this.width-this.width*this.padding*2/100)/le.width,oe=(1*this.height-this.height*this.padding*2/100)/le.height;pe=Math.min(he,oe)}return pe},ue.prototype.getTextPosition=function(le){var pe=this.textElement.getBBox(),he=0,oe=0;return pe.width>0&&pe.height>0&&(he=(this.width-pe.width*le)/2,oe=this.height/2-pe.height*le/2),{x:he,y:oe}},ue.prototype.sizeText=function(){var le=this.textElement.getBBox(),pe=this.getTextScale(),he=this.getTextPosition(pe);he.y-=le.y*pe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+he.x+"px, "+he.y+"px) scale("+pe+", "+pe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(he.x,he.y),this.textElement.transform.baseVal.getItem(1).setScale(pe,pe))},ue.prototype.manipulate=function(le){Ae.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){Ae.prototype.resize.call(this,le),this.isMoved=!0,this.setSize(),this.sizeText()},ue.prototype.setSize=function(){Ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ue.prototype.pointerUp=function(le){var pe=this.state;pe==="creating"&&(this._suppressMarkerCreateEvent=!0),Ae.prototype.pointerUp.call(this,le),this.setSize(),(pe==="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(pe){pe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var pe=Number.parseFloat(le.textEditor.style.fontSize);le.textEditor.clientWidth>=Number.parseInt(le.textEditor.style.maxWidth)&&pe>.9;)pe-=.1,le.textEditor.style.fontSize=Math.max(pe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(pe){pe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(pe){if(pe.clipboardData){var he=pe.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(he)),pe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){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(),pe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),he=this.textElement.getBBox(),oe={x:he.width*le,y:he.height*le};pe.x-=oe.x/2,pe.y-=oe.y/2,this.textEditor.style.top=pe.y+"px",this.textEditor.style.left=pe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-pe.x+"px",this.textEditor.style.fontSize=Math.max(16*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(){Ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ue.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ae.prototype.deselect.call(this)},ue.prototype.dblClick=function(le,pe){Ae.prototype.dblClick.call(this,le,pe),this.showTextEditor()},ue.prototype.setColor=function(le){this.textElement&&we.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&&we.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},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.color=pe.color,this.fontFamily=pe.fontFamily,this.padding=pe.padding,this.text=pe.text,this.createVisual(),Ae.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),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}(ct),Ot=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=he.defaultColor,oe.lineWidth=he.defaultStrokeWidth,oe.pixelRatio=he.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new Je("Color",he.defaultColorSet,he.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new Se("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.drawingImage)},ue.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var le=we.createTransform();this.visual.transform.baseVal.appendItem(le),this.addMarkerVisualToContainer(this.visual)},ue.prototype.pointerDown=function(le,pe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(le.x,le.y),this.drawing=!0):Ae.prototype.pointerDown.call(this,le,pe)},ue.prototype.manipulate=function(le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(le.x,le.y),this.canvasContext.stroke()):Ae.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Ae.prototype.resize.call(this,le),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.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()):Ae.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(),Ae.prototype.select.call(this)},ue.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ae.prototype.deselect.call(this)},ue.prototype.finishCreation=function(){for(var le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),pe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],he=pe[0],oe=pe[1],Te=pe[2],Ye=pe[3],Lt=!1,Rt=0;Rt<this.canvasElement.height;Rt++)for(var Ft=0;Ft<this.canvasElement.width;Ft++)le.data[Rt*this.canvasElement.width*4+4*Ft+3]>0&&(Lt=!0,Rt<oe&&(oe=Rt),Ft<he&&(he=Ft),Rt>Ye&&(Ye=Rt),Ft>Te&&(Te=Ft));if(Lt){this.left=he/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Te-he)/this.pixelRatio,this.height=(Ye-oe)/this.pixelRatio;var Jt=document.createElement("canvas");Jt.width=Te-he,Jt.height=Ye-oe,Jt.getContext("2d").putImageData(this.canvasContext.getImageData(he,oe,Te-he,Ye-oe),0,0),this.drawingImgUrl=Jt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ue.prototype.setDrawingImage=function(){we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),we.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},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){this.createVisual(),Ae.prototype.restoreState.call(this,le),this.drawingImgUrl=le.drawingImgUrl,this.setDrawingImage()},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),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}(ct),bn=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,he||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=pe,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return He(ue,Ae),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2";for(var he=function(Ye){var Lt="both";switch(Ye){case 0:Lt="both";break;case 1:Lt="start";break;case 2:Lt="end";break;case 3:Lt="none"}var Rt=document.createElement("div");if(Rt.style.display="flex",Rt.style.flexGrow="2",Rt.style.alignItems="center",Rt.style.justifyContent="space-between",Rt.style.padding="5px",Rt.style.borderWidth="2px",Rt.style.borderStyle="solid",Rt.style.borderColor=Lt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Rt.addEventListener("click",function(){le.setCurrentType(Lt,Rt)}),pe.appendChild(Rt),Lt==="both"||Lt==="start"){var Ft=document.createElement("div");Ft.style.display="flex",Ft.style.alignItems="center",Ft.style.minHeight="20px",Ft.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ft.style.marginLeft="5px",Rt.appendChild(Ft)}var Jt=document.createElement("div");Jt.style.display="flex",Jt.style.alignItems="center",Jt.style.minHeight="20px",Jt.style.flexGrow="2";var Xt=document.createElement("hr");if(Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Xt.style.flexGrow="2",Jt.appendChild(Xt),Rt.appendChild(Jt),Lt==="both"||Lt==="end"){var Hn=document.createElement("div");Hn.style.display="flex",Hn.style.alignItems="center",Hn.style.minHeight="20px",Hn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Hn.style.marginRight="5px",Rt.appendChild(Hn)}oe.typeBoxes.push(Rt)},oe=this,Te=0;Te<4;Te++)he(Te);return pe},ue.prototype.setCurrentType=function(le,pe){var he=this;this.currentType=le,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings!==void 0?he.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ue}(it),Nt=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new bn("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.arrow1&&le!==this.arrow2)},ue.prototype.getArrowPoints=function(le,pe){var he=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return le-he/2+","+(pe+oe/2)+" "+le+","+(pe-oe/2)+" "+(le+he/2)+","+(pe+oe/2)},ue.prototype.createTips=function(){this.arrow1=we.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=we.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(we.createTransform()),this.visual.appendChild(this.arrow2)},ue.prototype.pointerDown=function(le,pe){Ae.prototype.pointerDown.call(this,le,pe),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(Ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",we.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),we.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 pe=this.arrow1.transform.baseVal.getItem(0);pe.setRotate(le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(pe,0);var he=this.arrow2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(he,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},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Ae.prototype.restoreState.call(this,le);var pe=le;this.arrowType=pe.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}(kt),sn=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.fillColor=he.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new Je("Color",he.defaultColorSet,he.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return He(ue,Ae),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Ae.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}(ke),Cn=function(Ae){function ue(le,pe,he,oe){var Te=Ae.call(this,le,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Te.opacities=[],Te.opacityBoxes=[],Te.opacities=pe,Te.currentOpacity=he,Te.setCurrentOpacity=Te.setCurrentOpacity.bind(Te),Te}return He(ue,Ae),ue.prototype.getUi=function(){var le=this,pe=document.createElement("div");return pe.style.display="flex",pe.style.overflow="hidden",pe.style.flexGrow="2",pe.style.justifyContent="space-between",this.opacities.forEach(function(he){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=he===le.currentOpacity?le.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){le.setCurrentOpacity(he,oe)}),pe.appendChild(oe);var Te=document.createElement("div");Te.innerText=100*he+"%",oe.appendChild(Te),le.opacityBoxes.push(oe)}),pe},ue.prototype.setCurrentOpacity=function(le,pe){var he=this;this.currentOpacity=le,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===pe?he.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ue}(it),or=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=he.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=he.defaultHighlightOpacity,oe.fillPanel=new Je("Color",he.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Cn("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return He(ue,Ae),ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&we.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=Ae.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}(sn),Qe='<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>',Ce='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ht=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=he.defaultStrokeColor,oe.bgColor=he.defaultFillColor,oe.fontFamily=he.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new Je("Text color",he.defaultColorSet,oe.color,Qe),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new Je("Fill color",he.defaultColorSet,oe.bgColor,Ce),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Xe("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new qt,oe.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return Ae.prototype.ownsTarget.call(this,le)||this.tipGrip.ownsTarget(le)||this.tip===le},ue.prototype.createTip=function(){we.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=we.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ue.prototype.pointerDown=function(le,pe){this.state==="new"&&Ae.prototype.pointerDown.call(this,le,pe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(pe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ae.prototype.pointerDown.call(this,le,pe)},ue.prototype.pointerUp=function(le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ae.prototype.pointerUp.call(this,le);else{var pe=this.state==="creating";Ae.prototype.pointerUp.call(this,le),this.setTipPoints(pe),this.positionTip()}},ue.prototype.manipulate=function(le){if(this.tipMoving){var pe=this.unrotatePoint(le);this.tipPosition={x:pe.x-this.manipulationStartLeft,y:pe.y-this.manipulationStartTop},this.positionTip()}else Ae.prototype.manipulate.call(this,le)},ue.prototype.setBgColor=function(le){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",le]]),we.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 pe=Math.min(this.height/2,15),he=this.height/5;le&&(this.tipPosition={x:pe+he/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:0},this.tipBase2Position={x:pe+he,y:0}):(this.tipBase1Position={x:0,y:pe},this.tipBase2Position={x:0,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:0},this.tipBase2Position={x:this.width-pe,y:0}):(this.tipBase1Position={x:this.width,y:pe},this.tipBase2Position={x:this.width,y:pe+he}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-pe-he,y:this.height},this.tipBase2Position={x:this.width-pe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-pe-he},this.tipBase2Position={x:this.width,y:this.height-pe}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(he=this.width/5,pe=Math.min(this.width/2,15),this.tipBase1Position={x:pe,y:this.height},this.tipBase2Position={x:pe+he,y:this.height}):(this.tipBase1Position={x:0,y:this.height-pe},this.tipBase2Position={x:0,y:this.height-pe-he})},ue.prototype.resize=function(le){Ae.prototype.resize.call(this,le),this.positionTip()},ue.prototype.positionTip=function(){we.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(),Ae.prototype.select.call(this)},ue.prototype.getState=function(){var le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.bgColor=pe.bgColor,this.tipPosition=pe.tipPosition,Ae.prototype.restoreState.call(this,le),this.createTip(),this.setTipPoints()},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),this.tipPosition={x:this.tipPosition.x*le,y:this.tipPosition.y*pe},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),Ut=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new Je("Line color",ve(he.defaultColorSet,["transparent"]),he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Je("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,Ce),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new Se("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Cn("Opacity",he.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.visual)},ue.prototype.createVisual=function(){this.visual=we.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,pe){Ae.prototype.pointerDown.call(this,le,pe),this.state==="new"&&(this.createVisual(),this.moveVisual(le),this._state="creating")},ue.prototype.manipulate=function(le){Ae.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){Ae.prototype.resize.call(this,le),this.setSize()},ue.prototype.setSize=function(){Ae.prototype.setSize.call(this),we.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){Ae.prototype.pointerUp.call(this,le),this.setSize()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ue.prototype.setOpacity=function(le){this.opacity=le,this.visual&&we.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},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.opacity=pe.opacity,this.createVisual(),Ae.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),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}(ct),Yt=function(Ae){function ue(le,pe,he){return Ae.call(this,le,pe,he)||this}return He(ue,Ae),Object.defineProperty(ue.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.tip1&&le!==this.tip2)},ue.prototype.createTips=function(){this.tip1=we.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(we.createTransform()),this.visual.appendChild(this.tip1),this.tip2=we.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(we.createTransform()),this.visual.appendChild(this.tip2)},ue.prototype.pointerDown=function(le,pe){Ae.prototype.pointerDown.call(this,le,pe),this.state==="creating"&&this.createTips()},ue.prototype.adjustVisual=function(){if(Ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(we.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()]]),we.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),pe=this.tip1.transform.baseVal.getItem(0);pe.setRotate(le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(pe,0);var he=this.tip2.transform.baseVal.getItem(0);he.setRotate(le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(he,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=Ae.prototype.getState.call(this);return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Ae.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}(kt),Ge=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.strokePanel.colors=he.defaultColorSet,oe.fillColor="transparent",oe}return He(ue,Ae),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ue.prototype.getState=function(){var le=Ae.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}(Ut),rt=function(){function Ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ae.prototype.addUndoStep=function(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))},Ae.prototype.replaceLastUndoStep=function(ue){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ue)},Ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ae.prototype.undo=function(){if(this.undoStack.length>1){var ue=this.undoStack.pop();return ue!==void 0&&this.redoStack.push(ue),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ae}(),jt=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.strokePanel=new Je("Line color",he.defaultColorSet,he.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Se("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.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=we.createGroup(),this.selectorCurve=we.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=we.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,pe){Ae.prototype.pointerDown.call(this,le,pe),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(pe)&&(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()),we.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),we.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),we.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ue.prototype.setupControlBox=function(){Ae.prototype.setupControlBox.call(this),this.curveControlLine1=we.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=we.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,Ae.prototype.addControlGrips.call(this)},ue.prototype.positionGrips=function(){Ae.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),Ae.prototype.manipulate.call(this,le)},ue.prototype.resize=function(le){this.activeGrip===this.curveGrip&&(this.curveX=le.x,this.curveY=le.y),Ae.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,pe){this.curveX=this.curveX*le,this.curveY=this.curveY*pe,Ae.prototype.scale.call(this,le,pe)},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},Ae.prototype.getState.call(this));return le.typeName=ue.typeName,le},ue.prototype.restoreState=function(le){Ae.prototype.restoreState.call(this,le);var pe=le;this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.curveX=pe.curveX,this.curveY=pe.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}(vt),_n=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,pe,he)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=he.defaultColor,oe.strokeWidth=he.defaultStrokeWidth,oe.strokeDasharray=he.defaultStrokeDasharray,oe.fillColor=he.defaultFillColor,oe.textColor=he.defaultStrokeColor,oe.fontFamily=he.defaultFontFamily,oe.fontSize=he.defaultCaptionFontSize,oe.captionText=he.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new Je("Line color",ve(he.defaultColorSet,["transparent"]),oe.strokeColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Je("Fill color",ve(he.defaultColorSet,["transparent"]),oe.fillColor,Ce),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new Se("Line width",he.defaultStrokeWidths,he.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new Ue("Line style",he.defaultStrokeDasharrays,he.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new Xe("Font",he.defaultFontFamilies,he.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new Je("Text color",he.defaultColorSet,oe.textColor,Qe),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return He(ue,Ae),ue.prototype.ownsTarget=function(le){return!(!Ae.prototype.ownsTarget.call(this,le)&&le!==this.visual&&le!==this.frame&&le!==this.captionBg&&le!==this.captionElement)},ue.prototype.createVisual=function(){this.visual=we.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=we.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=we.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=we.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,pe){Ae.prototype.pointerDown.call(this,le,pe),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){Ae.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){Ae.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),we.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')"]]),we.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(pe){pe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(pe){pe.key==="Enter"&&le.finishTextEditing(le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(pe){pe.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&&we.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&&we.setAttributes(this.captionElement,[["fill",le]]),this.textColor=le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ue.prototype.setSize=function(){Ae.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ue.prototype.pointerUp=function(le){Ae.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,pe){Ae.prototype.dblClick.call(this,le,pe),this.showTextEditor()},ue.prototype.setStrokeColor=function(le){this.strokeColor=le,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(le),this.stateChanged()},ue.prototype.setFillColor=function(le){this.fillColor=le,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(le),this.stateChanged()},ue.prototype.setStrokeWidth=function(le){this.strokeWidth=le,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ue.prototype.setStrokeDasharray=function(le){this.strokeDasharray=le,this.frame&&we.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},Ae.prototype.getState.call(this));return le.typeName=this.typeName,le},ue.prototype.restoreState=function(le){var pe=le;this.fillColor=pe.fillColor,this.strokeColor=pe.strokeColor,this.strokeWidth=pe.strokeWidth,this.strokeDasharray=pe.strokeDasharray,this.textColor=pe.textColor,this.fontFamily=pe.fontFamily,this.captionText=pe.captionText,this.fontSize=pe.fontSize,this.createVisual(),Ae.prototype.restoreState.call(this,le),this.setSize()},ue.prototype.scale=function(le,pe){Ae.prototype.scale.call(this,le,pe),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}(ct),rn=function(){function Ae(ue,le){le===void 0&&(le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ue,this.cancelable=le}return Object.defineProperty(Ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ae.prototype.preventDefault=function(){this._defaultPrevented=!0},Ae}(),$t=function(Ae){function ue(le,pe,he){var oe=Ae.call(this,le,!1)||this;return oe.dataUrl=pe,oe.state=he,oe}return He(ue,Ae),ue}(rn),Zt=function(Ae){function ue(le,pe,he){he===void 0&&(he=!1);var oe=Ae.call(this,le,he)||this;return oe.marker=pe,oe}return He(ue,Ae),ue}(rn),yn=function(){function Ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Ae.prototype.addEventListener=function(ue,le){this[ue].push(le)},Ae.prototype.removeEventListener=function(ue,le){var pe=this[ue].indexOf(le);pe>-1&&this[ue].splice(pe,1)},Ae}(),ln=function(){function Ae(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 _t,this._isOpen=!1,this.undoRedoManager=new rt,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 yn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ae.instanceCounter++,this.styles=new Ie(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(Ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,Ot,Nt,Kt,Ge,Ut,or,ht,Yt,sn,kt,jt,_n]},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,Ot,Nt,Kt,Ut,or,ht]},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,Ot,Nt,Kt,or]},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ue){var le=this;this._availableMarkerTypes.splice(0),ue.forEach(function(pe){if(typeof pe=="string"){var he=le.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===pe});he!==void 0&&le._availableMarkerTypes.push(he)}else le._availableMarkerTypes.push(pe)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(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(Ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ee.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ae.prototype.show=function(){var ue=this;this.styles.styleSheetRoot===void 0&&me.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=me.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(le){return le(new rn(ue))})},Ae.prototype.render=function(){return Be(this,void 0,void 0,function(){var ue;return Ve(this,function(le){switch(le.label){case 0:return this.setCurrentMarker(),(ue=new xe).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()]}})})},Ae.prototype.close=function(ue){var le=this;if(ue===void 0&&(ue=!1),this.isOpen){var pe=!1;ue||this.eventListeners.beforeclose.forEach(function(he){var oe=new rn(le,!0);he(oe),oe.defaultPrevented&&(pe=!0)}),pe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(he){return he(new rn(le))}),this.detachEvents(),this._isOpen=!1)}},Ae.prototype.addMarkersToToolbar=function(){for(var ue,le=[],pe=0;pe<arguments.length;pe++)le[pe]=arguments[pe];(ue=this._availableMarkerTypes).push.apply(ue,le)},Ae.prototype.addRenderEventListener=function(ue){this.addEventListener("render",function(le){ue(le.dataUrl,le.state)})},Ae.prototype.removeRenderEventListener=function(ue){},Ae.prototype.addCloseEventListener=function(ue){this.addEventListener("close",function(){ue()})},Ae.prototype.removeCloseEventListener=function(ue){},Ae.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))},Ae.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,pe=le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ue;this.resize(le,pe)},Ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ae.prototype.resize=function(ue,le){this._isResizing=!0;var pe=ue/this.imageWidth,he=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(pe,he),this._isResizing=!1},Ae.prototype.scaleMarkers=function(ue,le){var pe,he=this;this._currentMarker&&this._currentMarker instanceof Kt?this._currentMarker.scale(ue,le):(pe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==he._currentMarker&&oe.scale(ue,le)}),pe!==void 0&&this.setCurrentMarker(pe)},Ae.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Ae.prototype.setTopLeft=function(){var ue=this.editingTarget.getBoundingClientRect(),le=this.editorCanvas.getBoundingClientRect();this.left=ue.left-le.left,this.top=ue.top-le.top},Ae.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Ae.prototype.addDefs=function(){for(var ue,le=[],pe=0;pe<arguments.length;pe++)le[pe]=arguments[pe];this.defs=we.createDefs(),this.addDefsToImage(),(ue=this.defs).append.apply(ue,le)},Ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ae.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ae.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ae.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var 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()},Ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var 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 St(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new ft(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ae.prototype.removeMarker=function(ue){this.markerImage.removeChild(ue.container),this.markers.indexOf(ue)>-1&&this.markers.splice(this.markers.indexOf(ue),1),ue.dispose()},Ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Ae.prototype.toolbarButtonClicked=function(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()}},Ae.prototype.deleteSelectedMarker=function(){var ue=this;if(this._currentMarker!==void 0){var le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(he){var oe=new Zt(ue,ue._currentMarker,!0);he(oe),oe.defaultPrevented&&(le=!0)}),!le){var pe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(he){return he(new Zt(ue,pe))})}}},Ae.prototype.clear=function(){var ue=this,le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Te){var Ye=new Zt(ue,void 0,!0);Te(Ye),Ye.defaultPrevented&&(le=!0)}),!le)){this.setCurrentMarker();for(var pe=function(Te){var Ye=he.markers[Te];he.setCurrentMarker(he.markers[Te]),he._currentMarker.dispose(),he.markerImage.removeChild(he._currentMarker.container),he.markers.splice(he.markers.indexOf(he._currentMarker),1),he.eventListeners.markerdelete.forEach(function(Lt){return Lt(new Zt(ue,Ye))})},he=this,oe=this.markers.length-1;oe>=0;oe--)pe(oe);this.addUndoStep()}},Object.defineProperty(Ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ae.prototype.showNotesEditor=function(){var 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))},Ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ae.prototype.addUndoStep=function(){var ue=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var le=this.getState(),pe=this.undoRedoManager.getLastUndoStep();if(!pe||pe.width===le.width&&pe.height===le.height){var he=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(le),he<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new rn(ue))})}else this.undoRedoManager.replaceLastUndoStep(le),this.eventListeners.statechange.forEach(function(oe){return oe(new rn(ue))})}},Ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ae.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(pe){return pe(new rn(ue))}))},Ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ae.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(pe){return pe(new rn(ue))}))},Ae.prototype.stepZoom=function(){var ue=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ue<this.zoomSteps.length-1?this.zoomSteps[ue+1]:this.zoomSteps[0]},Ae.prototype.panTo=function(ue){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ue.x,top:this.prevPanPoint.y-ue.y}),this.prevPanPoint=ue},Ae.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var ue,le,pe=this;return Ve(this,function(he){switch(he.label){case 0:return[4,this.render()];case 1:return ue=he.sent(),le=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new $t(pe,ue,le))}),this.close(!0),[2]}})})},Ae.prototype.getState=function(ue){ue===!0&&this.setCurrentMarker();var le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(pe){return le.markers.push(pe.getState())}),le},Ae.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(pe){var he=le._availableMarkerTypes.find(function(Te){return Te.typeName===pe.typeName});if(he!==void 0){var oe=le.addNewMarker(he);oe.restoreState(pe),le.markers.push(oe)}}),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(pe){return pe(new rn(le))})},Ae.prototype.addNewMarker=function(ue){var le=we.createGroup();return this.markerImage.appendChild(le),new ue(le,this.overlayContainer,this.settings)},Ae.prototype.createNewMarker=function(ue){var le,pe=this;(le=typeof ue=="string"?this._availableMarkerTypes.find(function(he){return he.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(he){return he(new Zt(pe,pe._currentMarker))}))},Ae.prototype.markerCreated=function(ue){var le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ue),this.setCurrentMarker(ue),ue instanceof Ot&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ot):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(pe){return pe(new Zt(le,le._currentMarker))})},Ae.prototype.colorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ue,this.settings.defaultStrokeColor=ue)},Ae.prototype.fillColorChanged=function(ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ue)},Ae.prototype.markerStateChanged=function(ue){var le=this;this.eventListeners.markerchange.forEach(function(pe){return pe(new Zt(le,ue))})},Ae.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(pe){return pe(new Zt(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(pe){return pe(new Zt(le,le._currentMarker))}))},Ae.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(pe){return pe.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))},Ae.prototype.onDblClick=function(ue){if(this._isFocused||this.focus(),this.mode==="select"){var le=this.markers.find(function(pe){return pe.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()}},Ae.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}))},Ae.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()},Ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ae.prototype.onKeyUp=function(ue){this._currentMarker===void 0||this.notesArea!==void 0||ue.key!=="Delete"&&ue.key!=="Backspace"||this.deleteSelectedMarker()},Ae.prototype.clientToLocalCoordinates=function(ue,le){var pe=this.markerImage.getBoundingClientRect();return{x:(ue-pe.left)/this.zoomLevel,y:(le-pe.top)/this.zoomLevel}},Ae.prototype.onWindowResize=function(){this.positionUI()},Ae.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()},Ae.prototype.addLicenseKey=function(ue){Ee.addKey(ue)},Ae.prototype.addEventListener=function(ue,le){this.eventListeners.addEventListener(ue,le)},Ae.prototype.removeEventListener=function(ue,le){this.eventListeners.removeEventListener(ue,le)},Ae.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(Ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ae.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 rn(ue))}))},Ae.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 rn(ue))}))},Ae.instanceCounter=0,Ae}()},95860:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return tt}});var de=se(87462),He=se(1413),Be=se(4942),Ve=se(97685),ve=se(45987),we=se(94184),Ee=se.n(we),xe=se(67294);function me(ct){var ke=xe.useRef();ke.current=ct;var Se=xe.useCallback(function(){for(var Ue,je=arguments.length,_t=new Array(je),vt=0;vt<je;vt++)_t[vt]=arguments[vt];return(Ue=ke.current)===null||Ue===void 0?void 0:Ue.call.apply(Ue,[ke].concat(_t))},[]);return Se}function Ie(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ot=Ie()?xe.useLayoutEffect:xe.useEffect,Oe=function(ke,Se){var Ue=xe.useRef(!0);ot(function(){return ke(Ue.current)},Se),ot(function(){return Ue.current=!1,function(){Ue.current=!0}},[])},St=function(ke,Se){Oe(function(Ue){if(!Ue)return ke()},Se)},ft=null;function it(ct){var ke=xe.useRef(!1),Se=xe.useState(ct),Ue=(0,Ve.Z)(Se,2),je=Ue[0],_t=Ue[1];xe.useEffect(function(){return ke.current=!1,function(){ke.current=!0}},[]);function vt(kt,Xe){Xe&&ke.current||_t(kt)}return[je,vt]}function Je(ct){return ct!==void 0}function Le(ct,ke){var Se=ke||{},Ue=Se.defaultValue,je=Se.value,_t=Se.onChange,vt=Se.postState,kt=it(function(){return Je(je)?je:Je(Ue)?typeof Ue=="function"?Ue():Ue:typeof ct=="function"?ct():ct}),Xe=(0,Ve.Z)(kt,2),Kt=Xe[0],Ot=Xe[1],bn=je!==void 0?je:Kt,Nt=vt?vt(bn):bn,sn=me(_t),Cn=it([bn]),or=(0,Ve.Z)(Cn,2),Qe=or[0],Ce=or[1];St(function(){var Ut=Qe[0];Kt!==Ut&&sn(Kt,Ut)},[Qe]),St(function(){Je(je)||Ot(je)},[je]);var ht=me(function(Ut,Yt){Ot(Ut,Yt),Ce([bn],Yt)});return[Nt,ht]}var gt=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],qt=(0,xe.forwardRef)(function(ct,ke){var Se,Ue=ct.prefixCls,je=Ue===void 0?"rc-checkbox":Ue,_t=ct.className,vt=ct.style,kt=ct.checked,Xe=ct.disabled,Kt=ct.defaultChecked,Ot=Kt===void 0?!1:Kt,bn=ct.type,Nt=bn===void 0?"checkbox":bn,sn=ct.title,Cn=ct.onChange,or=(0,ve.Z)(ct,gt),Qe=(0,xe.useRef)(null),Ce=Le(Ot,{value:kt}),ht=(0,Ve.Z)(Ce,2),Ut=ht[0],Yt=ht[1];(0,xe.useImperativeHandle)(ke,function(){return{focus:function(){var _n;(_n=Qe.current)===null||_n===void 0||_n.focus()},blur:function(){var _n;(_n=Qe.current)===null||_n===void 0||_n.blur()},input:Qe.current}});var Ge=Ee()(je,_t,(Se={},(0,Be.Z)(Se,"".concat(je,"-checked"),Ut),(0,Be.Z)(Se,"".concat(je,"-disabled"),Xe),Se)),rt=function(_n){Xe||("checked"in ct||Yt(_n.target.checked),Cn==null||Cn({target:(0,He.Z)((0,He.Z)({},ct),{},{type:Nt,checked:_n.target.checked}),stopPropagation:function(){_n.stopPropagation()},preventDefault:function(){_n.preventDefault()},nativeEvent:_n.nativeEvent}))};return xe.createElement("span",{className:Ge,title:sn,style:vt},xe.createElement("input",(0,de.Z)({},or,{className:"".concat(je,"-input"),ref:Qe,onChange:rt,disabled:Xe,checked:!!Ut,type:Nt})),xe.createElement("span",{className:"".concat(je,"-inner")}))}),tt=qt},26819:function(En,Wt){"use strict";var se;var de=typeof Symbol=="function"&&Symbol.for,He=de?Symbol.for("react.element"):60103,Be=de?Symbol.for("react.portal"):60106,Ve=de?Symbol.for("react.fragment"):60107,ve=de?Symbol.for("react.strict_mode"):60108,we=de?Symbol.for("react.profiler"):60114,Ee=de?Symbol.for("react.provider"):60109,xe=de?Symbol.for("react.context"):60110,me=de?Symbol.for("react.async_mode"):60111,Ie=de?Symbol.for("react.concurrent_mode"):60111,ot=de?Symbol.for("react.forward_ref"):60112,Oe=de?Symbol.for("react.suspense"):60113,St=de?Symbol.for("react.suspense_list"):60120,ft=de?Symbol.for("react.memo"):60115,it=de?Symbol.for("react.lazy"):60116,Je=de?Symbol.for("react.block"):60121,Le=de?Symbol.for("react.fundamental"):60117,gt=de?Symbol.for("react.responder"):60118,qt=de?Symbol.for("react.scope"):60119;function tt(ke){if(typeof ke=="object"&&ke!==null){var Se=ke.$$typeof;switch(Se){case He:switch(ke=ke.type,ke){case me:case Ie:case Ve:case we:case ve:case Oe:return ke;default:switch(ke=ke&&ke.$$typeof,ke){case xe:case ot:case it:case ft:case Ee:return ke;default:return Se}}case Be:return Se}}}function ct(ke){return tt(ke)===Ie}se=me,se=Ie,se=xe,se=Ee,se=He,se=ot,se=Ve,se=it,se=ft,se=Be,se=we,se=ve,se=Oe,se=function(ke){return ct(ke)||tt(ke)===me},se=ct,se=function(ke){return tt(ke)===xe},se=function(ke){return tt(ke)===Ee},se=function(ke){return typeof ke=="object"&&ke!==null&&ke.$$typeof===He},se=function(ke){return tt(ke)===ot},se=function(ke){return tt(ke)===Ve},se=function(ke){return tt(ke)===it},Wt.isMemo=function(ke){return tt(ke)===ft},se=function(ke){return tt(ke)===Be},se=function(ke){return tt(ke)===we},se=function(ke){return tt(ke)===ve},se=function(ke){return tt(ke)===Oe},se=function(ke){return typeof ke=="string"||typeof ke=="function"||ke===Ve||ke===Ie||ke===we||ke===ve||ke===Oe||ke===St||typeof ke=="object"&&ke!==null&&(ke.$$typeof===it||ke.$$typeof===ft||ke.$$typeof===Ee||ke.$$typeof===xe||ke.$$typeof===ot||ke.$$typeof===Le||ke.$$typeof===gt||ke.$$typeof===qt||ke.$$typeof===Je)},se=tt},18459:function(En,Wt,se){"use strict";En.exports=se(26819)},16651:function(En,Wt){"use strict";var se;var de=Symbol.for("react.element"),He=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ve=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),we=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),xe=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),St=Symbol.for("react.lazy"),ft=Symbol.for("react.offscreen"),it;it=Symbol.for("react.module.reference");function Je(Le){if(typeof Le=="object"&&Le!==null){var gt=Le.$$typeof;switch(gt){case de:switch(Le=Le.type,Le){case Be:case ve:case Ve:case Ie:case ot:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case xe:case Ee:case me:case St:case Oe:case we:return Le;default:return gt}}case He:return gt}}}se=Ee,se=we,se=de,se=me,se=Be,se=St,se=Oe,se=He,se=ve,se=Ve,se=Ie,se=ot,se=function(){return!1},se=function(){return!1},se=function(Le){return Je(Le)===Ee},se=function(Le){return Je(Le)===we},se=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===de},se=function(Le){return Je(Le)===me},se=function(Le){return Je(Le)===Be},se=function(Le){return Je(Le)===St},se=function(Le){return Je(Le)===Oe},se=function(Le){return Je(Le)===He},se=function(Le){return Je(Le)===ve},se=function(Le){return Je(Le)===Ve},se=function(Le){return Je(Le)===Ie},se=function(Le){return Je(Le)===ot},se=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===Be||Le===ve||Le===Ve||Le===Ie||Le===ot||Le===ft||typeof Le=="object"&&Le!==null&&(Le.$$typeof===St||Le.$$typeof===Oe||Le.$$typeof===we||Le.$$typeof===Ee||Le.$$typeof===me||Le.$$typeof===it||Le.getModuleId!==void 0)},se=Je},33993:function(En,Wt,se){"use strict";se(16651)},82523:function(En,Wt){"use strict";var se;var de=Symbol.for("react.element"),He=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ve=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),we=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),xe=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),St=Symbol.for("react.lazy"),ft=Symbol.for("react.offscreen"),it;it=Symbol.for("react.module.reference");function Je(Le){if(typeof Le=="object"&&Le!==null){var gt=Le.$$typeof;switch(gt){case de:switch(Le=Le.type,Le){case Be:case ve:case Ve:case Ie:case ot:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case xe:case Ee:case me:case St:case Oe:case we:return Le;default:return gt}}case He:return gt}}}se=Ee,se=we,se=de,se=me,se=Be,se=St,se=Oe,se=He,se=ve,se=Ve,se=Ie,se=ot,se=function(){return!1},se=function(){return!1},se=function(Le){return Je(Le)===Ee},se=function(Le){return Je(Le)===we},se=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===de},se=function(Le){return Je(Le)===me},se=function(Le){return Je(Le)===Be},se=function(Le){return Je(Le)===St},se=function(Le){return Je(Le)===Oe},se=function(Le){return Je(Le)===He},se=function(Le){return Je(Le)===ve},se=function(Le){return Je(Le)===Ve},se=function(Le){return Je(Le)===Ie},se=function(Le){return Je(Le)===ot},se=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===Be||Le===ve||Le===Ve||Le===Ie||Le===ot||Le===ft||typeof Le=="object"&&Le!==null&&(Le.$$typeof===St||Le.$$typeof===Oe||Le.$$typeof===we||Le.$$typeof===Ee||Le.$$typeof===me||Le.$$typeof===it||Le.getModuleId!==void 0)},se=Je},27183:function(En,Wt,se){"use strict";se(82523)},67656:function(En,Wt,se){"use strict";se.r(Wt),se.d(Wt,{BaseInput:function(){return Ie},default:function(){return qt}});var de=se(87462),He=se(1413),Be=se(4942),Ve=se(71002),ve=se(94184),we=se.n(ve),Ee=se(67294),xe=se(87887),me=function(ct){var ke,Se,Ue=ct.inputElement,je=ct.prefixCls,_t=ct.prefix,vt=ct.suffix,kt=ct.addonBefore,Xe=ct.addonAfter,Kt=ct.className,Ot=ct.style,bn=ct.disabled,Nt=ct.readOnly,sn=ct.focused,Cn=ct.triggerFocus,or=ct.allowClear,Qe=ct.value,Ce=ct.handleReset,ht=ct.hidden,Ut=ct.classes,Yt=ct.classNames,Ge=ct.dataAttrs,rt=ct.styles,jt=ct.components,_n=(jt==null?void 0:jt.affixWrapper)||"span",rn=(jt==null?void 0:jt.groupWrapper)||"span",$t=(jt==null?void 0:jt.wrapper)||"span",Zt=(jt==null?void 0:jt.groupAddon)||"span",yn=(0,Ee.useRef)(null),ln=function(Jt){var Xt;(Xt=yn.current)!==null&&Xt!==void 0&&Xt.contains(Jt.target)&&(Cn==null||Cn())},Ae=function(){var Jt;if(!or)return null;var Xt=!bn&&!Nt&&Qe,Hn="".concat(je,"-clear-icon"),Rn=(0,Ve.Z)(or)==="object"&&or!==null&&or!==void 0&&or.clearIcon?or.clearIcon:"\u2716";return Ee.createElement("span",{onClick:Ce,onMouseDown:function(dn){return dn.preventDefault()},className:we()(Hn,(Jt={},(0,Be.Z)(Jt,"".concat(Hn,"-hidden"),!Xt),(0,Be.Z)(Jt,"".concat(Hn,"-has-suffix"),!!vt),Jt)),role:"button",tabIndex:-1},Rn)},ue=(0,Ee.cloneElement)(Ue,{value:Qe,hidden:ht,className:we()((ke=Ue.props)===null||ke===void 0?void 0:ke.className,!(0,xe.X3)(ct)&&!(0,xe.He)(ct)&&Kt)||null,style:(0,He.Z)((0,He.Z)({},(Se=Ue.props)===null||Se===void 0?void 0:Se.style),!(0,xe.X3)(ct)&&!(0,xe.He)(ct)?Ot:{})});if((0,xe.X3)(ct)){var le,pe="".concat(je,"-affix-wrapper"),he=we()(pe,(le={},(0,Be.Z)(le,"".concat(pe,"-disabled"),bn),(0,Be.Z)(le,"".concat(pe,"-focused"),sn),(0,Be.Z)(le,"".concat(pe,"-readonly"),Nt),(0,Be.Z)(le,"".concat(pe,"-input-with-clear-btn"),vt&&or&&Qe),le),!(0,xe.He)(ct)&&Kt,Ut==null?void 0:Ut.affixWrapper,Yt==null?void 0:Yt.affixWrapper),oe=(vt||or)&&Ee.createElement("span",{className:we()("".concat(je,"-suffix"),Yt==null?void 0:Yt.suffix),style:rt==null?void 0:rt.suffix},Ae(),vt);ue=Ee.createElement(_n,(0,de.Z)({className:he,style:(0,He.Z)((0,He.Z)({},(0,xe.He)(ct)?void 0:Ot),rt==null?void 0:rt.affixWrapper),hidden:!(0,xe.He)(ct)&&ht,onClick:ln},Ge==null?void 0:Ge.affixWrapper,{ref:yn}),_t&&Ee.createElement("span",{className:we()("".concat(je,"-prefix"),Yt==null?void 0:Yt.prefix),style:rt==null?void 0:rt.prefix},_t),(0,Ee.cloneElement)(Ue,{value:Qe,hidden:null}),oe)}if((0,xe.He)(ct)){var Te="".concat(je,"-group"),Ye="".concat(Te,"-addon"),Lt=we()("".concat(je,"-wrapper"),Te,Ut==null?void 0:Ut.wrapper),Rt=we()("".concat(je,"-group-wrapper"),Kt,Ut==null?void 0:Ut.group);return Ee.createElement(rn,{className:Rt,style:Ot,hidden:ht},Ee.createElement($t,{className:Lt},kt&&Ee.createElement(Zt,{className:Ye},kt),(0,Ee.cloneElement)(ue,{hidden:null}),Xe&&Ee.createElement(Zt,{className:Ye},Xe)))}return ue},Ie=me,ot=se(74902),Oe=se(97685),St=se(45987),ft=se(21770),it=se(98423),Je=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],Le=(0,Ee.forwardRef)(function(tt,ct){var ke=tt.autoComplete,Se=tt.onChange,Ue=tt.onFocus,je=tt.onBlur,_t=tt.onPressEnter,vt=tt.onKeyDown,kt=tt.prefixCls,Xe=kt===void 0?"rc-input":kt,Kt=tt.disabled,Ot=tt.htmlSize,bn=tt.className,Nt=tt.maxLength,sn=tt.suffix,Cn=tt.showCount,or=tt.type,Qe=or===void 0?"text":or,Ce=tt.classes,ht=tt.classNames,Ut=tt.styles,Yt=(0,St.Z)(tt,Je),Ge=(0,ft.Z)(tt.defaultValue,{value:tt.value}),rt=(0,Oe.Z)(Ge,2),jt=rt[0],_n=rt[1],rn=(0,Ee.useState)(!1),$t=(0,Oe.Z)(rn,2),Zt=$t[0],yn=$t[1],ln=(0,Ee.useRef)(null),Ae=function(Rt){ln.current&&(0,xe.nH)(ln.current,Rt)};(0,Ee.useImperativeHandle)(ct,function(){return{focus:Ae,blur:function(){var Rt;(Rt=ln.current)===null||Rt===void 0||Rt.blur()},setSelectionRange:function(Rt,Ft,Jt){var Xt;(Xt=ln.current)===null||Xt===void 0||Xt.setSelectionRange(Rt,Ft,Jt)},select:function(){var Rt;(Rt=ln.current)===null||Rt===void 0||Rt.select()},input:ln.current}}),(0,Ee.useEffect)(function(){yn(function(Lt){return Lt&&Kt?!1:Lt})},[Kt]);var ue=function(Rt){tt.value===void 0&&_n(Rt.target.value),ln.current&&(0,xe.rJ)(ln.current,Rt,Se)},le=function(Rt){_t&&Rt.key==="Enter"&&_t(Rt),vt==null||vt(Rt)},pe=function(Rt){yn(!0),Ue==null||Ue(Rt)},he=function(Rt){yn(!1),je==null||je(Rt)},oe=function(Rt){_n(""),Ae(),ln.current&&(0,xe.rJ)(ln.current,Rt,Se)},Te=function(){var Rt=(0,it.Z)(tt,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return Ee.createElement("input",(0,de.Z)({autoComplete:ke},Rt,{onChange:ue,onFocus:pe,onBlur:he,onKeyDown:le,className:we()(Xe,(0,Be.Z)({},"".concat(Xe,"-disabled"),Kt),ht==null?void 0:ht.input),style:Ut==null?void 0:Ut.input,ref:ln,size:Ot,type:Qe}))},Ye=function(){var Rt=Number(Nt)>0;if(sn||Cn){var Ft=(0,xe.D7)(jt),Jt=(0,ot.Z)(Ft).length,Xt=(0,Ve.Z)(Cn)==="object"?Cn.formatter({value:Ft,count:Jt,maxLength:Nt}):"".concat(Jt).concat(Rt?" / ".concat(Nt):"");return Ee.createElement(Ee.Fragment,null,!!Cn&&Ee.createElement("span",{className:we()("".concat(Xe,"-show-count-suffix"),(0,Be.Z)({},"".concat(Xe,"-show-count-has-suffix"),!!sn),ht==null?void 0:ht.count),style:(0,He.Z)({},Ut==null?void 0:Ut.count)},Xt),sn)}return null};return Ee.createElement(Ie,(0,de.Z)({},Yt,{prefixCls:Xe,className:bn,inputElement:Te(),handleReset:oe,value:(0,xe.D7)(jt),focused:Zt,triggerFocus:Ae,suffix:Ye(),disabled:Kt,classes:Ce,classNames:ht,styles:Ut}))}),gt=Le,qt=gt},87887:function(En,Wt,se){"use strict";se.d(Wt,{D7:function(){return ve},He:function(){return de},X3:function(){return He},nH:function(){return Ve},rJ:function(){return Be}});function de(we){return!!(we.addonBefore||we.addonAfter)}function He(we){return!!(we.prefix||we.suffix||we.allowClear)}function Be(we,Ee,xe,me){if(xe){var Ie=Ee;if(Ee.type==="click"){var ot=we.cloneNode(!0);Ie=Object.create(Ee,{target:{value:ot},currentTarget:{value:ot}}),ot.value="",xe(Ie);return}if(me!==void 0){Ie=Object.create(Ee,{target:{value:we},currentTarget:{value:we}}),we.value=me,xe(Ie);return}xe(Ie)}}function Ve(we,Ee){if(we){we.focus(Ee);var xe=Ee||{},me=xe.cursor;if(me){var Ie=we.value.length;switch(me){case"start":we.setSelectionRange(0,0);break;case"end":we.setSelectionRange(Ie,Ie);break;default:we.setSelectionRange(0,Ie)}}}}function ve(we){return typeof we=="undefined"||we===null?"":String(we)}},78595:function(En,Wt,se){"use strict";se.d(Wt,{iz:function(){return Gr},ck:function(){return hr},BW:function(){return Wr},sN:function(){return hr},Wd:function(){return Qt},ZP:function(){return Fe},Xl:function(){return Xt}});var de=se(87462),He=se(4942),Be=se(1413),Ve=se(74902),ve=se(97685),we=se(45987),Ee=se(94184),xe=se.n(Ee),me=se(67294),Ie=se(48555);function ot(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Oe=ot()?me.useLayoutEffect:me.useEffect,St=function(Ze,nt){var lt=me.useRef(!0);Oe(function(){return Ze(lt.current)},nt),Oe(function(){return lt.current=!1,function(){lt.current=!0}},[])},ft=function(Ze,nt){St(function(lt){if(!lt)return Ze()},nt)},it=St,Je=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Le=void 0;function gt(ze,Ze){var nt=ze.prefixCls,lt=ze.invalidate,Mt=ze.item,an=ze.renderItem,un=ze.responsive,Jn=ze.responsiveDisabled,br=ze.registerSize,Vn=ze.itemKey,kn=ze.className,wn=ze.style,Pn=ze.children,zn=ze.display,gr=ze.order,Yn=ze.component,Xn=Yn===void 0?"div":Yn,ir=(0,we.Z)(ze,Je),ar=un&&!zn;function xr(Gt){br(Vn,Gt)}me.useEffect(function(){return function(){xr(null)}},[]);var Re=an&&Mt!==Le?an(Mt):Pn,Ke;lt||(Ke={opacity:ar?0:1,height:ar?0:Le,overflowY:ar?"hidden":Le,order:un?gr:Le,pointerEvents:ar?"none":Le,position:ar?"absolute":Le});var At={};ar&&(At["aria-hidden"]=!0);var dt=me.createElement(Xn,(0,de.Z)({className:xe()(!lt&&nt,kn),style:(0,Be.Z)((0,Be.Z)({},Ke),wn)},At,ir,{ref:Ze}),Re);return un&&(dt=me.createElement(Ie.Z,{onResize:function(pn){var Sn=pn.offsetWidth;xr(Sn)},disabled:Jn},dt)),dt}var qt=me.forwardRef(gt);qt.displayName="Item";var tt=qt;function ct(ze){var Ze=me.useRef();Ze.current=ze;var nt=me.useCallback(function(){for(var lt,Mt=arguments.length,an=new Array(Mt),un=0;un<Mt;un++)an[un]=arguments[un];return(lt=Ze.current)===null||lt===void 0?void 0:lt.call.apply(lt,[Ze].concat(an))},[]);return nt}var ke=se(73935),Se=function(Ze){return+setTimeout(Ze,16)},Ue=function(Ze){return clearTimeout(Ze)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Se=function(Ze){return window.requestAnimationFrame(Ze)},Ue=function(Ze){return window.cancelAnimationFrame(Ze)});var je=0,_t=new Map;function vt(ze){_t.delete(ze)}var kt=function(Ze){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;je+=1;var lt=je;function Mt(an){if(an===0)vt(lt),Ze();else{var un=Se(function(){Mt(an-1)});_t.set(lt,un)}}return Mt(nt),lt};kt.cancel=function(ze){var Ze=_t.get(ze);return vt(Ze),Ue(Ze)};var Xe=kt;function Kt(ze){if(typeof MessageChannel=="undefined")Xe(ze);else{var Ze=new MessageChannel;Ze.port1.onmessage=function(){return ze()},Ze.port2.postMessage(void 0)}}function Ot(){var ze=me.useRef(null),Ze=function(lt){ze.current||(ze.current=[],Kt(function(){(0,ke.unstable_batchedUpdates)(function(){ze.current.forEach(function(Mt){Mt()}),ze.current=null})})),ze.current.push(lt)};return Ze}function bn(ze,Ze){var nt=me.useState(Ze),lt=(0,ve.Z)(nt,2),Mt=lt[0],an=lt[1],un=ct(function(Jn){ze(function(){an(Jn)})});return[Mt,un]}var Nt=me.createContext(null),sn=["component"],Cn=["className"],or=["className"],Qe=function(Ze,nt){var lt=me.useContext(Nt);if(!lt){var Mt=Ze.component,an=Mt===void 0?"div":Mt,un=(0,we.Z)(Ze,sn);return me.createElement(an,(0,de.Z)({},un,{ref:nt}))}var Jn=lt.className,br=(0,we.Z)(lt,Cn),Vn=Ze.className,kn=(0,we.Z)(Ze,or);return me.createElement(Nt.Provider,{value:null},me.createElement(tt,(0,de.Z)({ref:nt,className:xe()(Jn,Vn)},br,kn)))},Ce=me.forwardRef(Qe);Ce.displayName="RawItem";var ht=Ce,Ut=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Yt="responsive",Ge="invalidate";function rt(ze){return"+ ".concat(ze.length," ...")}function jt(ze,Ze){var nt=ze.prefixCls,lt=nt===void 0?"rc-overflow":nt,Mt=ze.data,an=Mt===void 0?[]:Mt,un=ze.renderItem,Jn=ze.renderRawItem,br=ze.itemKey,Vn=ze.itemWidth,kn=Vn===void 0?10:Vn,wn=ze.ssr,Pn=ze.style,zn=ze.className,gr=ze.maxCount,Yn=ze.renderRest,Xn=ze.renderRawRest,ir=ze.suffix,ar=ze.component,xr=ar===void 0?"div":ar,Re=ze.itemComponent,Ke=ze.onVisibleChange,At=(0,we.Z)(ze,Ut),dt=wn==="full",Gt=Ot(),pn=bn(Gt,null),Sn=(0,ve.Z)(pn,2),Kn=Sn[0],Tn=Sn[1],cn=Kn||0,Wn=bn(Gt,new Map),Zn=(0,ve.Z)(Wn,2),wr=Zn[0],Un=Zn[1],Rr=bn(Gt,0),Yr=(0,ve.Z)(Rr,2),Nr=Yr[0],jr=Yr[1],kr=bn(Gt,0),zr=(0,ve.Z)(kr,2),ei=zr[0],ci=zr[1],Fr=bn(Gt,0),fi=(0,ve.Z)(Fr,2),Oi=fi[0],na=fi[1],Xi=(0,me.useState)(null),Fi=(0,ve.Z)(Xi,2),Ji=Fi[0],Qi=Fi[1],wi=(0,me.useState)(null),zi=(0,ve.Z)(wi,2),Jr=zi[0],hi=zi[1],Ii=me.useMemo(function(){return Jr===null&&dt?Number.MAX_SAFE_INTEGER:Jr||0},[Jr,Kn]),Yi=(0,me.useState)(!1),$a=(0,ve.Z)(Yi,2),Na=$a[0],Aa=$a[1],ca="".concat(lt,"-item"),ea=Math.max(Nr,ei),Mi=gr===Yt,Oa=an.length&&Mi,ki=gr===Ge,ti=Oa||typeof gr=="number"&&an.length>gr,Wi=(0,me.useMemo)(function(){var _i=an;return Oa?Kn===null&&dt?_i=an:_i=an.slice(0,Math.min(an.length,cn/kn)):typeof gr=="number"&&(_i=an.slice(0,gr)),_i},[an,kn,Kn,gr,Oa]),ua=(0,me.useMemo)(function(){return Oa?an.slice(Ii+1):an.slice(Wi.length)},[an,Wi,Oa,Ii]),Vi=(0,me.useCallback)(function(_i,Ui){var da;return typeof br=="function"?br(_i):(da=br&&(_i==null?void 0:_i[br]))!==null&&da!==void 0?da:Ui},[br]),aa=(0,me.useCallback)(un||function(_i){return _i},[un]);function mi(_i,Ui,da){Jr===_i&&(Ui===void 0||Ui===Ji)||(hi(_i),da||(Aa(_i<an.length-1),Ke==null||Ke(_i)),Ui!==void 0&&Qi(Ui))}function pa(_i,Ui){Tn(Ui.clientWidth)}function xa(_i,Ui){Un(function(da){var Sa=new Map(da);return Ui===null?Sa.delete(_i):Sa.set(_i,Ui),Sa})}function fa(_i,Ui){ci(Ui),jr(ei)}function wa(_i,Ui){na(Ui)}function Ma(_i){return wr.get(Vi(Wi[_i],_i))}it(function(){if(cn&&typeof ea=="number"&&Wi){var _i=Oi,Ui=Wi.length,da=Ui-1;if(!Ui){mi(0,null);return}for(var Sa=0;Sa<Ui;Sa+=1){var Ka=Ma(Sa);if(dt&&(Ka=Ka||0),Ka===void 0){mi(Sa-1,void 0,!0);break}if(_i+=Ka,da===0&&_i<=cn||Sa===da-1&&_i+Ma(da)<=cn){mi(da,null);break}else if(_i+ea>cn){mi(Sa-1,_i-Ka-Oi+ei);break}}ir&&Ma(0)+Oi>cn&&Qi(null)}},[cn,wr,ei,Oi,Vi,Wi]);var Za=Na&&!!ua.length,ha={};Ji!==null&&Oa&&(ha={position:"absolute",left:Ji,top:0});var ka={prefixCls:ca,responsive:Oa,component:Re,invalidate:ki},Ja=Jn?function(_i,Ui){var da=Vi(_i,Ui);return me.createElement(Nt.Provider,{key:da,value:(0,Be.Z)((0,Be.Z)({},ka),{},{order:Ui,item:_i,itemKey:da,registerSize:xa,display:Ui<=Ii})},Jn(_i,Ui))}:function(_i,Ui){var da=Vi(_i,Ui);return me.createElement(tt,(0,de.Z)({},ka,{order:Ui,key:da,item:_i,renderItem:aa,itemKey:da,registerSize:xa,display:Ui<=Ii}))},Ga,so={order:Za?Ii:Number.MAX_SAFE_INTEGER,className:"".concat(ca,"-rest"),registerSize:fa,display:Za};if(Xn)Xn&&(Ga=me.createElement(Nt.Provider,{value:(0,Be.Z)((0,Be.Z)({},ka),so)},Xn(ua)));else{var Fa=Yn||rt;Ga=me.createElement(tt,(0,de.Z)({},ka,so),typeof Fa=="function"?Fa(ua):Fa)}var Ca=me.createElement(xr,(0,de.Z)({className:xe()(!ki&<,zn),style:Pn,ref:Ze},At),Wi.map(Ja),ti?Ga:null,ir&&me.createElement(tt,(0,de.Z)({},ka,{responsive:Mi,responsiveDisabled:!Oa,order:Ii,className:"".concat(ca,"-suffix"),registerSize:wa,display:!0,style:ha}),ir));return Mi&&(Ca=me.createElement(Ie.Z,{onResize:pa,disabled:!Oa},Ca)),Ca}var _n=me.forwardRef(jt);_n.displayName="Overflow",_n.Item=ht,_n.RESPONSIVE=Yt,_n.INVALIDATE=Ge;var rn=_n,$t=rn,Zt=se(21770),yn=se(80334),ln=se(91881),Ae=me.createContext(null);function ue(ze,Ze){return ze===void 0?null:"".concat(ze,"-").concat(Ze)}function le(ze){var Ze=me.useContext(Ae);return ue(Ze,ze)}var pe=se(56982),he=["children","locked"],oe=me.createContext(null);function Te(ze,Ze){var nt=(0,Be.Z)({},ze);return Object.keys(Ze).forEach(function(lt){var Mt=Ze[lt];Mt!==void 0&&(nt[lt]=Mt)}),nt}function Ye(ze){var Ze=ze.children,nt=ze.locked,lt=(0,we.Z)(ze,he),Mt=me.useContext(oe),an=(0,pe.Z)(function(){return Te(Mt,lt)},[Mt,lt],function(un,Jn){return!nt&&(un[0]!==Jn[0]||!(0,ln.Z)(un[1],Jn[1],!0))});return me.createElement(oe.Provider,{value:an},Ze)}var Lt=[],Rt=me.createContext(null);function Ft(){return me.useContext(Rt)}var Jt=me.createContext(Lt);function Xt(ze){var Ze=me.useContext(Jt);return me.useMemo(function(){return ze!==void 0?[].concat((0,Ve.Z)(Ze),[ze]):Ze},[Ze,ze])}var Hn=me.createContext(null),Rn=me.createContext({}),Tt=Rn,dn=se(15105),cr=se(75164),Mr=function(ze){if(!ze)return!1;if(ze instanceof Element){if(ze.offsetParent)return!0;if(ze.getBBox){var Ze=ze.getBBox(),nt=Ze.width,lt=Ze.height;if(nt||lt)return!0}if(ze.getBoundingClientRect){var Mt=ze.getBoundingClientRect(),an=Mt.width,un=Mt.height;if(an||un)return!0}}return!1};function at(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Mr(ze)){var nt=ze.nodeName.toLowerCase(),lt=["input","select","textarea","button"].includes(nt)||ze.isContentEditable||nt==="a"&&!!ze.getAttribute("href"),Mt=ze.getAttribute("tabindex"),an=Number(Mt),un=null;return Mt&&!Number.isNaN(an)?un=an:lt&&un===null&&(un=0),lt&&ze.disabled&&(un=null),un!==null&&(un>=0||Ze&&un<0)}return!1}function Ht(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=(0,Ve.Z)(ze.querySelectorAll("*")).filter(function(lt){return at(lt,Ze)});return at(ze,Ze)&&nt.unshift(ze),nt}var Fn=null;function er(){Fn=document.activeElement}function nr(){Fn=null}function Sr(){if(Fn)try{Fn.focus()}catch(ze){}}function Tr(ze,Ze){if(Ze.keyCode===9){var nt=Ht(ze),lt=nt[Ze.shiftKey?0:nt.length-1],Mt=lt===document.activeElement||ze===document.activeElement;if(Mt){var an=nt[Ze.shiftKey?nt.length-1:0];an.focus(),Ze.preventDefault()}}}var Er=dn.Z.LEFT,Or=dn.Z.RIGHT,Vr=dn.Z.UP,ur=dn.Z.DOWN,si=dn.Z.ENTER,Li=dn.Z.ESC,Bi=dn.Z.HOME,Hi=dn.Z.END,ri=[Vr,ur,Er,Or];function yt(ze,Ze,nt,lt){var Mt,an,un,Jn,br="prev",Vn="next",kn="children",wn="parent";if(ze==="inline"&<===si)return{inlineTrigger:!0};var Pn=(Mt={},(0,He.Z)(Mt,Vr,br),(0,He.Z)(Mt,ur,Vn),Mt),zn=(an={},(0,He.Z)(an,Er,nt?Vn:br),(0,He.Z)(an,Or,nt?br:Vn),(0,He.Z)(an,ur,kn),(0,He.Z)(an,si,kn),an),gr=(un={},(0,He.Z)(un,Vr,br),(0,He.Z)(un,ur,Vn),(0,He.Z)(un,si,kn),(0,He.Z)(un,Li,wn),(0,He.Z)(un,Er,nt?kn:wn),(0,He.Z)(un,Or,nt?wn:kn),un),Yn={inline:Pn,horizontal:zn,vertical:gr,inlineSub:Pn,horizontalSub:gr,verticalSub:gr},Xn=(Jn=Yn["".concat(ze).concat(Ze?"":"Sub")])===null||Jn===void 0?void 0:Jn[lt];switch(Xn){case br:return{offset:-1,sibling:!0};case Vn:return{offset:1,sibling:!0};case wn:return{offset:-1,sibling:!1};case kn:return{offset:1,sibling:!1};default:return null}}function Mn(ze){for(var Ze=ze;Ze;){if(Ze.getAttribute("data-menu-list"))return Ze;Ze=Ze.parentElement}return null}function An(ze,Ze){for(var nt=ze||document.activeElement;nt;){if(Ze.has(nt))return nt;nt=nt.parentElement}return null}function Dn(ze,Ze){var nt=Ht(ze,!0);return nt.filter(function(lt){return Ze.has(lt)})}function lr(ze,Ze,nt){var lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ze)return null;var Mt=Dn(ze,Ze),an=Mt.length,un=Mt.findIndex(function(Jn){return nt===Jn});return lt<0?un===-1?un=an-1:un-=1:lt>0&&(un+=1),un=(un+an)%an,Mt[un]}function qn(ze,Ze,nt,lt,Mt,an,un,Jn,br,Vn){var kn=me.useRef(),wn=me.useRef();wn.current=Ze;var Pn=function(){cr.Z.cancel(kn.current)};return me.useEffect(function(){return function(){Pn()}},[]),function(zn){var gr=zn.which;if([].concat(ri,[si,Li,Bi,Hi]).includes(gr)){var Yn,Xn,ir,ar=function(){Yn=new Set,Xn=new Map,ir=new Map;var Zn=an();return Zn.forEach(function(wr){var Un=document.querySelector("[data-menu-id='".concat(ue(lt,wr),"']"));Un&&(Yn.add(Un),ir.set(Un,wr),Xn.set(wr,Un))}),Yn};ar();var xr=Xn.get(Ze),Re=An(xr,Yn),Ke=ir.get(Re),At=yt(ze,un(Ke,!0).length===1,nt,gr);if(!At&&gr!==Bi&&gr!==Hi)return;(ri.includes(gr)||[Bi,Hi].includes(gr))&&zn.preventDefault();var dt=function(Zn){if(Zn){var wr=Zn,Un=Zn.querySelector("a");Un!=null&&Un.getAttribute("href")&&(wr=Un);var Rr=ir.get(Zn);Jn(Rr),Pn(),kn.current=(0,cr.Z)(function(){wn.current===Rr&&wr.focus()})}};if([Bi,Hi].includes(gr)||At.sibling||!Re){var Gt;!Re||ze==="inline"?Gt=Mt.current:Gt=Mn(Re);var pn,Sn=Dn(Gt,Yn);gr===Bi?pn=Sn[0]:gr===Hi?pn=Sn[Sn.length-1]:pn=lr(Gt,Yn,Re,At.offset),dt(pn)}else if(At.inlineTrigger)br(Ke);else if(At.offset>0)br(Ke,!0),Pn(),kn.current=(0,cr.Z)(function(){ar();var Wn=Re.getAttribute("aria-controls"),Zn=document.getElementById(Wn),wr=lr(Zn,Yn);dt(wr)},5);else if(At.offset<0){var Kn=un(Ke,!0),Tn=Kn[Kn.length-2],cn=Xn.get(Tn);br(Tn,!1),dt(cn)}}Vn==null||Vn(zn)}}function pr(ze){Promise.resolve().then(ze)}var $n="__RC_UTIL_PATH_SPLIT__",qe=function(Ze){return Ze.join($n)},ut=function(Ze){return Ze.split($n)},Dt="rc-menu-more";function Vt(){var ze=me.useState({}),Ze=(0,ve.Z)(ze,2),nt=Ze[1],lt=(0,me.useRef)(new Map),Mt=(0,me.useRef)(new Map),an=me.useState([]),un=(0,ve.Z)(an,2),Jn=un[0],br=un[1],Vn=(0,me.useRef)(0),kn=(0,me.useRef)(!1),wn=function(){kn.current||nt({})},Pn=(0,me.useCallback)(function(xr,Re){var Ke=qe(Re);Mt.current.set(Ke,xr),lt.current.set(xr,Ke),Vn.current+=1;var At=Vn.current;pr(function(){At===Vn.current&&wn()})},[]),zn=(0,me.useCallback)(function(xr,Re){var Ke=qe(Re);Mt.current.delete(Ke),lt.current.delete(xr)},[]),gr=(0,me.useCallback)(function(xr){br(xr)},[]),Yn=(0,me.useCallback)(function(xr,Re){var Ke=lt.current.get(xr)||"",At=ut(Ke);return Re&&Jn.includes(At[0])&&At.unshift(Dt),At},[Jn]),Xn=(0,me.useCallback)(function(xr,Re){return xr.some(function(Ke){var At=Yn(Ke,!0);return At.includes(Re)})},[Yn]),ir=function(){var Re=(0,Ve.Z)(lt.current.keys());return Jn.length&&Re.push(Dt),Re},ar=(0,me.useCallback)(function(xr){var Re="".concat(lt.current.get(xr)).concat($n),Ke=new Set;return(0,Ve.Z)(Mt.current.keys()).forEach(function(At){At.startsWith(Re)&&Ke.add(Mt.current.get(At))}),Ke},[]);return me.useEffect(function(){return function(){kn.current=!0}},[]),{registerPath:Pn,unregisterPath:zn,refreshOverflowKeys:gr,isSubPathKey:Xn,getKeyPath:Yn,getKeys:ir,getSubPathKeys:ar}}function We(ze){var Ze=me.useRef(ze);Ze.current=ze;var nt=me.useCallback(function(){for(var lt,Mt=arguments.length,an=new Array(Mt),un=0;un<Mt;un++)an[un]=arguments[un];return(lt=Ze.current)===null||lt===void 0?void 0:lt.call.apply(lt,[Ze].concat(an))},[]);return ze?nt:void 0}var pt=Math.random().toFixed(5).toString().slice(2),zt=0;function Bt(ze){var Ze=(0,Zt.Z)(ze,{value:ze}),nt=(0,ve.Z)(Ze,2),lt=nt[0],Mt=nt[1];return me.useEffect(function(){zt+=1;var an="".concat(pt,"-").concat(zt);Mt("rc-menu-uuid-".concat(an))},[]),lt}var en=se(15671),nn=se(43144),jn=se(60136),Lr=se(51630),rr=se(98423),tr=se(42550);function dr(ze,Ze,nt,lt){var Mt=me.useContext(oe),an=Mt.activeKey,un=Mt.onActive,Jn=Mt.onInactive,br={active:an===ze};return Ze||(br.onMouseEnter=function(Vn){nt==null||nt({key:ze,domEvent:Vn}),un(ze)},br.onMouseLeave=function(Vn){lt==null||lt({key:ze,domEvent:Vn}),Jn(ze)}),br}function fr(ze){var Ze=me.useContext(oe),nt=Ze.mode,lt=Ze.rtl,Mt=Ze.inlineIndent;if(nt!=="inline")return null;var an=ze;return lt?{paddingRight:an*Mt}:{paddingLeft:an*Mt}}function mt(ze){var Ze=ze.icon,nt=ze.props,lt=ze.children,Mt;return Ze===null||Ze===!1?null:(typeof Ze=="function"?Mt=me.createElement(Ze,(0,Be.Z)({},nt)):typeof Ze!="boolean"&&(Mt=Ze),Mt||lt||null)}var st=["item"];function Ct(ze){var Ze=ze.item,nt=(0,we.Z)(ze,st);return Object.defineProperty(nt,"item",{get:function(){return(0,yn.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ze}}),nt}var fn=["title","attribute","elementRef"],Bn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],hn=["active"],vn=function(ze){(0,jn.Z)(nt,ze);var Ze=(0,Lr.Z)(nt);function nt(){return(0,en.Z)(this,nt),Ze.apply(this,arguments)}return(0,nn.Z)(nt,[{key:"render",value:function(){var Mt=this.props,an=Mt.title,un=Mt.attribute,Jn=Mt.elementRef,br=(0,we.Z)(Mt,fn),Vn=(0,rr.Z)(br,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,yn.ZP)(!un,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),me.createElement($t.Item,(0,de.Z)({},un,{title:typeof an=="string"?an:void 0},Vn,{ref:Jn}))}}]),nt}(me.Component),xn=me.forwardRef(function(ze,Ze){var nt,lt=ze.style,Mt=ze.className,an=ze.eventKey,un=ze.warnKey,Jn=ze.disabled,br=ze.itemIcon,Vn=ze.children,kn=ze.role,wn=ze.onMouseEnter,Pn=ze.onMouseLeave,zn=ze.onClick,gr=ze.onKeyDown,Yn=ze.onFocus,Xn=(0,we.Z)(ze,Bn),ir=le(an),ar=me.useContext(oe),xr=ar.prefixCls,Re=ar.onItemClick,Ke=ar.disabled,At=ar.overflowDisabled,dt=ar.itemIcon,Gt=ar.selectedKeys,pn=ar.onActive,Sn=me.useContext(Tt),Kn=Sn._internalRenderMenuItem,Tn="".concat(xr,"-item"),cn=me.useRef(),Wn=me.useRef(),Zn=Ke||Jn,wr=(0,tr.x1)(Ze,Wn),Un=Xt(an),Rr=function(Fi){return{key:an,keyPath:(0,Ve.Z)(Un).reverse(),item:cn.current,domEvent:Fi}},Yr=br||dt,Nr=dr(an,Zn,wn,Pn),jr=Nr.active,kr=(0,we.Z)(Nr,hn),zr=Gt.includes(an),ei=fr(Un.length),ci=function(Fi){if(!Zn){var Ji=Rr(Fi);zn==null||zn(Ct(Ji)),Re(Ji)}},Fr=function(Fi){if(gr==null||gr(Fi),Fi.which===dn.Z.ENTER){var Ji=Rr(Fi);zn==null||zn(Ct(Ji)),Re(Ji)}},fi=function(Fi){pn(an),Yn==null||Yn(Fi)},Oi={};ze.role==="option"&&(Oi["aria-selected"]=zr);var na=me.createElement(vn,(0,de.Z)({ref:cn,elementRef:wr,role:kn===null?"none":kn||"menuitem",tabIndex:Jn?null:-1,"data-menu-id":At&&ir?null:ir},Xn,kr,Oi,{component:"li","aria-disabled":Jn,style:(0,Be.Z)((0,Be.Z)({},ei),lt),className:xe()(Tn,(nt={},(0,He.Z)(nt,"".concat(Tn,"-active"),jr),(0,He.Z)(nt,"".concat(Tn,"-selected"),zr),(0,He.Z)(nt,"".concat(Tn,"-disabled"),Zn),nt),Mt),onClick:ci,onKeyDown:Fr,onFocus:fi}),Vn,me.createElement(mt,{props:(0,Be.Z)((0,Be.Z)({},ze),{},{isSelected:zr}),icon:Yr}));return Kn&&(na=Kn(na,ze,{selected:zr})),na});function Nn(ze,Ze){var nt=ze.eventKey,lt=Ft(),Mt=Xt(nt);return me.useEffect(function(){if(lt)return lt.registerPath(nt,Mt),function(){lt.unregisterPath(nt,Mt)}},[Mt]),lt?null:me.createElement(xn,(0,de.Z)({},ze,{ref:Ze}))}var hr=me.forwardRef(Nn),tn=["className","children"],Qr=function(Ze,nt){var lt=Ze.className,Mt=Ze.children,an=(0,we.Z)(Ze,tn),un=me.useContext(oe),Jn=un.prefixCls,br=un.mode,Vn=un.rtl;return me.createElement("ul",(0,de.Z)({className:xe()(Jn,Vn&&"".concat(Jn,"-rtl"),"".concat(Jn,"-sub"),"".concat(Jn,"-").concat(br==="inline"?"inline":"vertical"),lt),role:"menu"},an,{"data-menu-list":!0,ref:nt}),Mt)},Ur=me.forwardRef(Qr);Ur.displayName="SubMenuList";var $i=Ur,Ai=se(50344);function gi(ze,Ze){return(0,Ai.Z)(ze).map(function(nt,lt){if(me.isValidElement(nt)){var Mt,an,un=nt.key,Jn=(Mt=(an=nt.props)===null||an===void 0?void 0:an.eventKey)!==null&&Mt!==void 0?Mt:un,br=Jn==null;br&&(Jn="tmp_key-".concat([].concat((0,Ve.Z)(Ze),[lt]).join("-")));var Vn={key:Jn,eventKey:Jn};return me.cloneElement(nt,Vn)}return nt})}var qi=se(62709),xi={adjustX:1,adjustY:1},li={topLeft:{points:["bl","tl"],overflow:xi},topRight:{points:["br","tr"],overflow:xi},bottomLeft:{points:["tl","bl"],overflow:xi},bottomRight:{points:["tr","br"],overflow:xi},leftTop:{points:["tr","tl"],overflow:xi},leftBottom:{points:["br","bl"],overflow:xi},rightTop:{points:["tl","tr"],overflow:xi},rightBottom:{points:["bl","br"],overflow:xi}},Ni={topLeft:{points:["bl","tl"],overflow:xi},topRight:{points:["br","tr"],overflow:xi},bottomLeft:{points:["tl","bl"],overflow:xi},bottomRight:{points:["tr","br"],overflow:xi},rightTop:{points:["tr","tl"],overflow:xi},rightBottom:{points:["br","bl"],overflow:xi},leftTop:{points:["tl","tr"],overflow:xi},leftBottom:{points:["bl","br"],overflow:xi}},Gi=null;function qr(ze,Ze,nt){if(Ze)return Ze;if(nt)return nt[ze]||nt.other}var vi={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Zi(ze){var Ze=ze.prefixCls,nt=ze.visible,lt=ze.children,Mt=ze.popup,an=ze.popupStyle,un=ze.popupClassName,Jn=ze.popupOffset,br=ze.disabled,Vn=ze.mode,kn=ze.onVisibleChange,wn=me.useContext(oe),Pn=wn.getPopupContainer,zn=wn.rtl,gr=wn.subMenuOpenDelay,Yn=wn.subMenuCloseDelay,Xn=wn.builtinPlacements,ir=wn.triggerSubMenuAction,ar=wn.forceSubMenuRender,xr=wn.rootClassName,Re=wn.motion,Ke=wn.defaultMotions,At=me.useState(!1),dt=(0,ve.Z)(At,2),Gt=dt[0],pn=dt[1],Sn=zn?(0,Be.Z)((0,Be.Z)({},Ni),Xn):(0,Be.Z)((0,Be.Z)({},li),Xn),Kn=vi[Vn],Tn=qr(Vn,Re,Ke),cn=me.useRef(Tn);Vn!=="inline"&&(cn.current=Tn);var Wn=(0,Be.Z)((0,Be.Z)({},cn.current),{},{leavedClassName:"".concat(Ze,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Zn=me.useRef();return me.useEffect(function(){return Zn.current=(0,cr.Z)(function(){pn(nt)}),function(){cr.Z.cancel(Zn.current)}},[nt]),me.createElement(qi.Z,{prefixCls:Ze,popupClassName:xe()("".concat(Ze,"-popup"),(0,He.Z)({},"".concat(Ze,"-rtl"),zn),un,xr),stretch:Vn==="horizontal"?"minWidth":null,getPopupContainer:Pn,builtinPlacements:Sn,popupPlacement:Kn,popupVisible:Gt,popup:Mt,popupStyle:an,popupAlign:Jn&&{offset:Jn},action:br?[]:[ir],mouseEnterDelay:gr,mouseLeaveDelay:Yn,onPopupVisibleChange:kn,forceRender:ar,popupMotion:Wn,fresh:!0},lt)}var la=se(62874);function ta(ze){var Ze=ze.id,nt=ze.open,lt=ze.keyPath,Mt=ze.children,an="inline",un=me.useContext(oe),Jn=un.prefixCls,br=un.forceSubMenuRender,Vn=un.motion,kn=un.defaultMotions,wn=un.mode,Pn=me.useRef(!1);Pn.current=wn===an;var zn=me.useState(!Pn.current),gr=(0,ve.Z)(zn,2),Yn=gr[0],Xn=gr[1],ir=Pn.current?nt:!1;me.useEffect(function(){Pn.current&&Xn(!1)},[wn]);var ar=(0,Be.Z)({},qr(an,Vn,kn));lt.length>1&&(ar.motionAppear=!1);var xr=ar.onVisibleChanged;return ar.onVisibleChanged=function(Re){return!Pn.current&&!Re&&Xn(!0),xr==null?void 0:xr(Re)},Yn?null:me.createElement(Ye,{mode:an,locked:!Pn.current},me.createElement(la.Z,(0,de.Z)({visible:ir},ar,{forceRender:br,removeOnLeave:!1,leavedClassName:"".concat(Jn,"-hidden")}),function(Re){var Ke=Re.className,At=Re.style;return me.createElement($i,{id:Ze,className:Ke,style:At},Mt)}))}var ii=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Et=["active"],wt=function(Ze){var nt,lt=Ze.style,Mt=Ze.className,an=Ze.title,un=Ze.eventKey,Jn=Ze.warnKey,br=Ze.disabled,Vn=Ze.internalPopupClose,kn=Ze.children,wn=Ze.itemIcon,Pn=Ze.expandIcon,zn=Ze.popupClassName,gr=Ze.popupOffset,Yn=Ze.popupStyle,Xn=Ze.onClick,ir=Ze.onMouseEnter,ar=Ze.onMouseLeave,xr=Ze.onTitleClick,Re=Ze.onTitleMouseEnter,Ke=Ze.onTitleMouseLeave,At=(0,we.Z)(Ze,ii),dt=le(un),Gt=me.useContext(oe),pn=Gt.prefixCls,Sn=Gt.mode,Kn=Gt.openKeys,Tn=Gt.disabled,cn=Gt.overflowDisabled,Wn=Gt.activeKey,Zn=Gt.selectedKeys,wr=Gt.itemIcon,Un=Gt.expandIcon,Rr=Gt.onItemClick,Yr=Gt.onOpenChange,Nr=Gt.onActive,jr=me.useContext(Tt),kr=jr._internalRenderSubMenuItem,zr=me.useContext(Hn),ei=zr.isSubPathKey,ci=Xt(),Fr="".concat(pn,"-submenu"),fi=Tn||br,Oi=me.useRef(),na=me.useRef(),Xi=wn!=null?wn:wr,Fi=Pn!=null?Pn:Un,Ji=Kn.includes(un),Qi=!cn&&Ji,wi=ei(Zn,un),zi=dr(un,fi,Re,Ke),Jr=zi.active,hi=(0,we.Z)(zi,Et),Ii=me.useState(!1),Yi=(0,ve.Z)(Ii,2),$a=Yi[0],Na=Yi[1],Aa=function(wa){fi||Na(wa)},ca=function(wa){Aa(!0),ir==null||ir({key:un,domEvent:wa})},ea=function(wa){Aa(!1),ar==null||ar({key:un,domEvent:wa})},Mi=me.useMemo(function(){return Jr||(Sn!=="inline"?$a||ei([Wn],un):!1)},[Sn,Jr,Wn,$a,un,ei]),Oa=fr(ci.length),ki=function(wa){fi||(xr==null||xr({key:un,domEvent:wa}),Sn==="inline"&&Yr(un,!Ji))},ti=We(function(fa){Xn==null||Xn(Ct(fa)),Rr(fa)}),Wi=function(wa){Sn!=="inline"&&Yr(un,wa)},ua=function(){Nr(un)},Vi=dt&&"".concat(dt,"-popup"),aa=me.createElement("div",(0,de.Z)({role:"menuitem",style:Oa,className:"".concat(Fr,"-title"),tabIndex:fi?null:-1,ref:Oi,title:typeof an=="string"?an:null,"data-menu-id":cn&&dt?null:dt,"aria-expanded":Qi,"aria-haspopup":!0,"aria-controls":Vi,"aria-disabled":fi,onClick:ki,onFocus:ua},hi),an,me.createElement(mt,{icon:Sn!=="horizontal"?Fi:void 0,props:(0,Be.Z)((0,Be.Z)({},Ze),{},{isOpen:Qi,isSubMenu:!0})},me.createElement("i",{className:"".concat(Fr,"-arrow")}))),mi=me.useRef(Sn);if(Sn!=="inline"&&ci.length>1?mi.current="vertical":mi.current=Sn,!cn){var pa=mi.current;aa=me.createElement(Zi,{mode:pa,prefixCls:Fr,visible:!Vn&&Qi&&Sn!=="inline",popupClassName:zn,popupOffset:gr,popupStyle:Yn,popup:me.createElement(Ye,{mode:pa==="horizontal"?"vertical":pa},me.createElement($i,{id:Vi,ref:na},kn)),disabled:fi,onVisibleChange:Wi},aa)}var xa=me.createElement($t.Item,(0,de.Z)({role:"none"},At,{component:"li",style:lt,className:xe()(Fr,"".concat(Fr,"-").concat(Sn),Mt,(nt={},(0,He.Z)(nt,"".concat(Fr,"-open"),Qi),(0,He.Z)(nt,"".concat(Fr,"-active"),Mi),(0,He.Z)(nt,"".concat(Fr,"-selected"),wi),(0,He.Z)(nt,"".concat(Fr,"-disabled"),fi),nt)),onMouseEnter:ca,onMouseLeave:ea}),aa,!cn&&me.createElement(ta,{id:Vi,open:Qi,keyPath:ci},kn));return kr&&(xa=kr(xa,Ze,{selected:wi,active:Mi,open:Qi,disabled:fi})),me.createElement(Ye,{onItemClick:ti,mode:Sn==="horizontal"?"vertical":Sn,itemIcon:Xi,expandIcon:Fi},xa)};function Qt(ze){var Ze=ze.eventKey,nt=ze.children,lt=Xt(Ze),Mt=gi(nt,lt),an=Ft();me.useEffect(function(){if(an)return an.registerPath(Ze,lt),function(){an.unregisterPath(Ze,lt)}},[lt]);var un;return an?un=Mt:un=me.createElement(wt,ze,Mt),me.createElement(Jt.Provider,{value:lt},un)}var mn=se(71002),On=["className","title","eventKey","children"],vr=["children"],Ir=function(Ze){var nt=Ze.className,lt=Ze.title,Mt=Ze.eventKey,an=Ze.children,un=(0,we.Z)(Ze,On),Jn=me.useContext(oe),br=Jn.prefixCls,Vn="".concat(br,"-item-group");return me.createElement("li",(0,de.Z)({role:"presentation"},un,{onClick:function(wn){return wn.stopPropagation()},className:xe()(Vn,nt)}),me.createElement("div",{role:"presentation",className:"".concat(Vn,"-title"),title:typeof lt=="string"?lt:void 0},lt),me.createElement("ul",{role:"group",className:"".concat(Vn,"-list")},an))};function Wr(ze){var Ze=ze.children,nt=(0,we.Z)(ze,vr),lt=Xt(nt.eventKey),Mt=gi(Ze,lt),an=Ft();return an?Mt:me.createElement(Ir,(0,rr.Z)(nt,["warnKey"]),Mt)}function Gr(ze){var Ze=ze.className,nt=ze.style,lt=me.useContext(oe),Mt=lt.prefixCls,an=Ft();return an?null:me.createElement("li",{role:"separator",className:xe()("".concat(Mt,"-item-divider"),Ze),style:nt})}var Hr=["label","children","key","type"];function ni(ze){return(ze||[]).map(function(Ze,nt){if(Ze&&(0,mn.Z)(Ze)==="object"){var lt=Ze,Mt=lt.label,an=lt.children,un=lt.key,Jn=lt.type,br=(0,we.Z)(lt,Hr),Vn=un!=null?un:"tmp-".concat(nt);return an||Jn==="group"?Jn==="group"?me.createElement(Wr,(0,de.Z)({key:Vn},br,{title:Mt}),ni(an)):me.createElement(Qt,(0,de.Z)({key:Vn},br,{title:Mt}),ni(an)):Jn==="divider"?me.createElement(Gr,(0,de.Z)({key:Vn},br)):me.createElement(hr,(0,de.Z)({key:Vn},br),Mt)}return null}).filter(function(Ze){return Ze})}function yi(ze,Ze,nt){var lt=ze;return Ze&&(lt=ni(Ze)),gi(lt,nt)}var Ar=["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"],pi=[],Ti=me.forwardRef(function(ze,Ze){var nt,lt,Mt=ze,an=Mt.prefixCls,un=an===void 0?"rc-menu":an,Jn=Mt.rootClassName,br=Mt.style,Vn=Mt.className,kn=Mt.tabIndex,wn=kn===void 0?0:kn,Pn=Mt.items,zn=Mt.children,gr=Mt.direction,Yn=Mt.id,Xn=Mt.mode,ir=Xn===void 0?"vertical":Xn,ar=Mt.inlineCollapsed,xr=Mt.disabled,Re=Mt.disabledOverflow,Ke=Mt.subMenuOpenDelay,At=Ke===void 0?.1:Ke,dt=Mt.subMenuCloseDelay,Gt=dt===void 0?.1:dt,pn=Mt.forceSubMenuRender,Sn=Mt.defaultOpenKeys,Kn=Mt.openKeys,Tn=Mt.activeKey,cn=Mt.defaultActiveFirst,Wn=Mt.selectable,Zn=Wn===void 0?!0:Wn,wr=Mt.multiple,Un=wr===void 0?!1:wr,Rr=Mt.defaultSelectedKeys,Yr=Mt.selectedKeys,Nr=Mt.onSelect,jr=Mt.onDeselect,kr=Mt.inlineIndent,zr=kr===void 0?24:kr,ei=Mt.motion,ci=Mt.defaultMotions,Fr=Mt.triggerSubMenuAction,fi=Fr===void 0?"hover":Fr,Oi=Mt.builtinPlacements,na=Mt.itemIcon,Xi=Mt.expandIcon,Fi=Mt.overflowedIndicator,Ji=Fi===void 0?"...":Fi,Qi=Mt.overflowedIndicatorPopupClassName,wi=Mt.getPopupContainer,zi=Mt.onClick,Jr=Mt.onOpenChange,hi=Mt.onKeyDown,Ii=Mt.openAnimation,Yi=Mt.openTransitionName,$a=Mt._internalRenderMenuItem,Na=Mt._internalRenderSubMenuItem,Aa=(0,we.Z)(Mt,Ar),ca=me.useMemo(function(){return yi(zn,Pn,pi)},[zn,Pn]),ea=me.useState(!1),Mi=(0,ve.Z)(ea,2),Oa=Mi[0],ki=Mi[1],ti=me.useRef(),Wi=Bt(Yn),ua=gr==="rtl",Vi=(0,Zt.Z)(Sn,{value:Kn,postState:function(Ia){return Ia||pi}}),aa=(0,ve.Z)(Vi,2),mi=aa[0],pa=aa[1],xa=function(Ia){var Xa=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function go(){pa(Ia),Jr==null||Jr(Ia)}Xa?(0,ke.flushSync)(go):go()},fa=me.useState(mi),wa=(0,ve.Z)(fa,2),Ma=wa[0],Za=wa[1],ha=me.useRef(!1),ka=me.useMemo(function(){return(ir==="inline"||ir==="vertical")&&ar?["vertical",ar]:[ir,!1]},[ir,ar]),Ja=(0,ve.Z)(ka,2),Ga=Ja[0],so=Ja[1],Fa=Ga==="inline",Ca=me.useState(Ga),_i=(0,ve.Z)(Ca,2),Ui=_i[0],da=_i[1],Sa=me.useState(so),Ka=(0,ve.Z)(Sa,2),io=Ka[0],ho=Ka[1];me.useEffect(function(){da(Ga),ho(so),ha.current&&(Fa?pa(Ma):xa(pi))},[Ga,so]);var Oo=me.useState(0),Ro=(0,ve.Z)(Oo,2),lo=Ro[0],Ao=Ro[1],ra=lo>=ca.length-1||Ui!=="horizontal"||Re;me.useEffect(function(){Fa&&Za(mi)},[mi]),me.useEffect(function(){return ha.current=!0,function(){ha.current=!1}},[]);var Ri=Vt(),Ta=Ri.registerPath,_a=Ri.unregisterPath,co=Ri.refreshOverflowKeys,ao=Ri.isSubPathKey,hs=Ri.getKeyPath,Qo=Ri.getKeys,ps=Ri.getSubPathKeys,oa=me.useMemo(function(){return{registerPath:Ta,unregisterPath:_a}},[Ta,_a]),Br=me.useMemo(function(){return{isSubPathKey:ao}},[ao]);me.useEffect(function(){co(ra?pi:ca.slice(lo+1).map(function(oo){return oo.key}))},[lo,ra]);var Si=(0,Zt.Z)(Tn||cn&&((nt=ca[0])===null||nt===void 0?void 0:nt.key),{value:Tn}),Ci=(0,ve.Z)(Si,2),Di=Ci[0],Ha=Ci[1],Va=We(function(oo){Ha(oo)}),Fo=We(function(){Ha(void 0)});(0,me.useImperativeHandle)(Ze,function(){return{list:ti.current,focus:function(Ia){var Xa,go=Di!=null?Di:(Xa=ca.find(function(xs){return!xs.props.disabled}))===null||Xa===void 0?void 0:Xa.key;if(go){var yo,Ko,wo;(yo=ti.current)===null||yo===void 0||(Ko=yo.querySelector("li[data-menu-id='".concat(ue(Wi,go),"']")))===null||Ko===void 0||(wo=Ko.focus)===null||wo===void 0||wo.call(Ko,Ia)}}}});var Uo=(0,Zt.Z)(Rr||[],{value:Yr,postState:function(Ia){return Array.isArray(Ia)?Ia:Ia==null?pi:[Ia]}}),ls=(0,ve.Z)(Uo,2),va=ls[0],Bo=ls[1],cs=function(Ia){if(Zn){var Xa=Ia.key,go=va.includes(Xa),yo;Un?go?yo=va.filter(function(wo){return wo!==Xa}):yo=[].concat((0,Ve.Z)(va),[Xa]):yo=[Xa],Bo(yo);var Ko=(0,Be.Z)((0,Be.Z)({},Ia),{},{selectedKeys:yo});go?jr==null||jr(Ko):Nr==null||Nr(Ko)}!Un&&mi.length&&Ui!=="inline"&&xa(pi)},ul=We(function(oo){zi==null||zi(Ct(oo)),cs(oo)}),As=We(function(oo,Ia){var Xa=mi.filter(function(yo){return yo!==oo});if(Ia)Xa.push(oo);else if(Ui!=="inline"){var go=ps(oo);Xa=Xa.filter(function(yo){return!go.has(yo)})}(0,ln.Z)(mi,Xa,!0)||xa(Xa,!0)}),ms=function(Ia,Xa){var go=Xa!=null?Xa:!mi.includes(Ia);As(Ia,go)},zo=qn(Ui,Di,ua,Wi,ti,Qo,hs,Ha,ms,hi);me.useEffect(function(){ki(!0)},[]);var Ts=me.useMemo(function(){return{_internalRenderMenuItem:$a,_internalRenderSubMenuItem:Na}},[$a,Na]),Is=Ui!=="horizontal"||Re?ca:ca.map(function(oo,Ia){return me.createElement(Ye,{key:oo.key,overflowDisabled:Ia>lo},oo)}),qs=me.createElement($t,(0,de.Z)({id:Yn,ref:ti,prefixCls:"".concat(un,"-overflow"),component:"ul",itemComponent:hr,className:xe()(un,"".concat(un,"-root"),"".concat(un,"-").concat(Ui),Vn,(lt={},(0,He.Z)(lt,"".concat(un,"-inline-collapsed"),io),(0,He.Z)(lt,"".concat(un,"-rtl"),ua),lt),Jn),dir:gr,style:br,role:"menu",tabIndex:wn,data:Is,renderRawItem:function(Ia){return Ia},renderRawRest:function(Ia){var Xa=Ia.length,go=Xa?ca.slice(-Xa):null;return me.createElement(Qt,{eventKey:Dt,title:Ji,disabled:ra,internalPopupClose:Xa===0,popupClassName:Qi},go)},maxCount:Ui!=="horizontal"||Re?$t.INVALIDATE:$t.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ia){Ao(Ia)},onKeyDown:zo},Aa));return me.createElement(Tt.Provider,{value:Ts},me.createElement(Ae.Provider,{value:Wi},me.createElement(Ye,{prefixCls:un,rootClassName:Jn,mode:Ui,openKeys:mi,rtl:ua,disabled:xr,motion:Oa?ei:null,defaultMotions:Oa?ci:null,activeKey:Di,onActive:Va,onInactive:Fo,selectedKeys:va,inlineIndent:zr,subMenuOpenDelay:At,subMenuCloseDelay:Gt,forceSubMenuRender:pn,builtinPlacements:Oi,triggerSubMenuAction:fi,getPopupContainer:wi,itemIcon:na,expandIcon:Xi,onItemClick:ul,onOpenChange:As},me.createElement(Hn.Provider,{value:Br},qs),me.createElement("div",{style:{display:"none"},"aria-hidden":!0},me.createElement(Rt.Provider,{value:oa},ca)))))}),Ei=Ti,De=Ei;De.Item=hr,De.SubMenu=Qt,De.ItemGroup=Wr,De.Divider=Gr;var Fe=De},66680:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return He}});var de=se(67294);function He(Be){var Ve=de.useRef();Ve.current=Be;var ve=de.useCallback(function(){for(var we,Ee=arguments.length,xe=new Array(Ee),me=0;me<Ee;me++)xe[me]=arguments[me];return(we=Ve.current)===null||we===void 0?void 0:we.call.apply(we,[Ve].concat(xe))},[]);return ve}},21770:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return we}});var de=se(97685),He=se(66680),Be=se(8410),Ve=se(63896);function ve(Ee){return Ee!==void 0}function we(Ee,xe){var me=xe||{},Ie=me.defaultValue,ot=me.value,Oe=me.onChange,St=me.postState,ft=(0,Ve.Z)(function(){return ve(ot)?ot:ve(Ie)?typeof Ie=="function"?Ie():Ie:typeof Ee=="function"?Ee():Ee}),it=(0,de.Z)(ft,2),Je=it[0],Le=it[1],gt=ot!==void 0?ot:Je,qt=St?St(gt):gt,tt=(0,He.Z)(Oe),ct=(0,Ve.Z)([gt]),ke=(0,de.Z)(ct,2),Se=ke[0],Ue=ke[1];(0,Be.o)(function(){var _t=Se[0];Je!==_t&&tt(Je,_t)},[Se]),(0,Be.o)(function(){ve(ot)||Le(ot)},[ot]);var je=(0,He.Z)(function(_t,vt){Le(_t,vt),Ue([gt],vt)});return[qt,je]}},91881:function(En,Wt,se){"use strict";var de=se(71002),He=se(80334);function Be(Ve,ve){var we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ee=new Set;function xe(me,Ie){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Oe=Ee.has(me);if((0,He.ZP)(!Oe,"Warning: There may be circular references"),Oe)return!1;if(me===Ie)return!0;if(we&&ot>1)return!1;Ee.add(me);var St=ot+1;if(Array.isArray(me)){if(!Array.isArray(Ie)||me.length!==Ie.length)return!1;for(var ft=0;ft<me.length;ft++)if(!xe(me[ft],Ie[ft],St))return!1;return!0}if(me&&Ie&&(0,de.Z)(me)==="object"&&(0,de.Z)(Ie)==="object"){var it=Object.keys(me);return it.length!==Object.keys(Ie).length?!1:it.every(function(Je){return xe(me[Je],Ie[Je],St)})}return!1}return xe(Ve,ve)}Wt.Z=Be},98423:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return He}});var de=se(1413);function He(Be,Ve){var ve=(0,de.Z)({},Be);return Array.isArray(Ve)&&Ve.forEach(function(we){delete ve[we]}),ve}},64217:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return xe}});var de=se(1413),He=`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`,Be=`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`,Ve="".concat(He," ").concat(Be).split(/[\s\n]+/),ve="aria-",we="data-";function Ee(me,Ie){return me.indexOf(Ie)===0}function xe(me){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot;Ie===!1?ot={aria:!0,data:!0,attr:!0}:Ie===!0?ot={aria:!0}:ot=(0,de.Z)({},Ie);var Oe={};return Object.keys(me).forEach(function(St){(ot.aria&&(St==="role"||Ee(St,ve))||ot.data&&Ee(St,we)||ot.attr&&Ve.includes(St))&&(Oe[St]=me[St])}),Oe}},73299:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return ri}});var de=se(87462),He=se(1413),Be=se(71002),Ve=se(97685),ve=se(4942),we=se(45987),Ee=se(67294),xe=se(73935),me=se(94184),Ie=se.n(me),ot=se(48555),Oe=Ee.forwardRef(function(yt,Mn){var An=yt.height,Dn=yt.offsetY,lr=yt.offsetX,qn=yt.children,pr=yt.prefixCls,$n=yt.onInnerResize,qe=yt.innerProps,ut=yt.rtl,Dt=yt.extra,Vt={},We={display:"flex",flexDirection:"column"};if(Dn!==void 0){var pt;Vt={height:An,position:"relative",overflow:"hidden"},We=(0,He.Z)((0,He.Z)({},We),{},(pt={transform:"translateY(".concat(Dn,"px)")},(0,ve.Z)(pt,ut?"marginRight":"marginLeft",-lr),(0,ve.Z)(pt,"position","absolute"),(0,ve.Z)(pt,"left",0),(0,ve.Z)(pt,"right",0),(0,ve.Z)(pt,"top",0),pt))}return Ee.createElement("div",{style:Vt},Ee.createElement(ot.Z,{onResize:function(Bt){var en=Bt.offsetHeight;en&&$n&&$n()}},Ee.createElement("div",(0,de.Z)({style:We,className:Ie()((0,ve.Z)({},"".concat(pr,"-holder-inner"),pr)),ref:Mn},qe),qn,Dt)))});Oe.displayName="Filler";var St=Oe,ft=function(Mn){return+setTimeout(Mn,16)},it=function(Mn){return clearTimeout(Mn)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ft=function(Mn){return window.requestAnimationFrame(Mn)},it=function(Mn){return window.cancelAnimationFrame(Mn)});var Je=0,Le=new Map;function gt(yt){Le.delete(yt)}var qt=function(Mn){var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Je+=1;var Dn=Je;function lr(qn){if(qn===0)gt(Dn),Mn();else{var pr=ft(function(){lr(qn-1)});Le.set(Dn,pr)}}return lr(An),Dn};qt.cancel=function(yt){var Mn=Le.get(yt);return gt(Mn),it(Mn)};var tt=qt;function ct(yt,Mn){var An="touches"in yt?yt.touches[0]:yt;return An[Mn?"pageX":"pageY"]}var ke=Ee.forwardRef(function(yt,Mn){var An,Dn=yt.prefixCls,lr=yt.rtl,qn=yt.scrollOffset,pr=yt.scrollRange,$n=yt.onStartMove,qe=yt.onStopMove,ut=yt.onScroll,Dt=yt.horizontal,Vt=yt.spinSize,We=yt.containerSize,pt=yt.style,zt=yt.thumbStyle,Bt=Ee.useState(!1),en=(0,Ve.Z)(Bt,2),nn=en[0],jn=en[1],Lr=Ee.useState(null),rr=(0,Ve.Z)(Lr,2),tr=rr[0],dr=rr[1],fr=Ee.useState(null),mt=(0,Ve.Z)(fr,2),st=mt[0],Ct=mt[1],fn=!lr,Bn=Ee.useRef(),hn=Ee.useRef(),vn=Ee.useState(!1),xn=(0,Ve.Z)(vn,2),Nn=xn[0],hr=xn[1],tn=Ee.useRef(),Qr=function(){clearTimeout(tn.current),hr(!0),tn.current=setTimeout(function(){hr(!1)},3e3)},Ur=pr-We||0,$i=We-Vt||0,Ai=Ur>0,gi=Ee.useMemo(function(){if(qn===0||Ur===0)return 0;var la=qn/Ur;return la*$i},[qn,Ur,$i]),qi=function(ta){ta.stopPropagation(),ta.preventDefault()},xi=Ee.useRef({top:gi,dragging:nn,pageY:tr,startTop:st});xi.current={top:gi,dragging:nn,pageY:tr,startTop:st};var li=function(ta){jn(!0),dr(ct(ta,Dt)),Ct(xi.current.top),$n(),ta.stopPropagation(),ta.preventDefault()};Ee.useEffect(function(){var la=function(wt){wt.preventDefault()},ta=Bn.current,ii=hn.current;return ta.addEventListener("touchstart",la),ii.addEventListener("touchstart",li),function(){ta.removeEventListener("touchstart",la),ii.removeEventListener("touchstart",li)}},[]);var Ni=Ee.useRef();Ni.current=Ur;var Gi=Ee.useRef();Gi.current=$i,Ee.useEffect(function(){if(nn){var la,ta=function(wt){var Qt=xi.current,mn=Qt.dragging,On=Qt.pageY,vr=Qt.startTop;if(tt.cancel(la),mn){var Ir=ct(wt,Dt)-On,Wr=vr;!fn&&Dt?Wr-=Ir:Wr+=Ir;var Gr=Ni.current,Hr=Gi.current,ni=Hr?Wr/Hr:0,yi=Math.ceil(ni*Gr);yi=Math.max(yi,0),yi=Math.min(yi,Gr),la=tt(function(){ut(yi,Dt)})}},ii=function(){jn(!1),qe()};return window.addEventListener("mousemove",ta),window.addEventListener("touchmove",ta),window.addEventListener("mouseup",ii),window.addEventListener("touchend",ii),function(){window.removeEventListener("mousemove",ta),window.removeEventListener("touchmove",ta),window.removeEventListener("mouseup",ii),window.removeEventListener("touchend",ii),tt.cancel(la)}}},[nn]),Ee.useEffect(function(){Qr()},[qn]),Ee.useImperativeHandle(Mn,function(){return{delayHidden:Qr}});var qr="".concat(Dn,"-scrollbar"),vi={position:"absolute",visibility:Nn&&Ai?null:"hidden"},Zi={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Dt?(vi.height=8,vi.left=0,vi.right=0,vi.bottom=0,Zi.height="100%",Zi.width=Vt,fn?Zi.left=gi:Zi.right=gi):(vi.width=8,vi.top=0,vi.bottom=0,fn?vi.right=0:vi.left=0,Zi.width="100%",Zi.height=Vt,Zi.top=gi),Ee.createElement("div",{ref:Bn,className:Ie()(qr,(An={},(0,ve.Z)(An,"".concat(qr,"-horizontal"),Dt),(0,ve.Z)(An,"".concat(qr,"-vertical"),!Dt),(0,ve.Z)(An,"".concat(qr,"-visible"),Nn),An)),style:(0,He.Z)((0,He.Z)({},vi),pt),onMouseDown:qi,onMouseMove:Qr},Ee.createElement("div",{ref:hn,className:Ie()("".concat(qr,"-thumb"),(0,ve.Z)({},"".concat(qr,"-thumb-moving"),nn)),style:(0,He.Z)((0,He.Z)({},Zi),zt),onMouseDown:li}))}),Se=ke;function Ue(yt){var Mn=yt.children,An=yt.setRef,Dn=Ee.useCallback(function(lr){An(lr)},[]);return Ee.cloneElement(Mn,{ref:Dn})}function je(yt,Mn,An,Dn,lr,qn,pr){var $n=pr.getKey;return yt.slice(Mn,An+1).map(function(qe,ut){var Dt=Mn+ut,Vt=qn(qe,Dt,{style:{width:Dn}}),We=$n(qe);return Ee.createElement(Ue,{key:We,setRef:function(zt){return lr(qe,zt)}},Vt)})}function _t(yt){return yt instanceof HTMLElement||yt instanceof SVGElement}function vt(yt){return _t(yt)?yt:yt instanceof Ee.Component?xe.findDOMNode(yt):null}var kt=se(15671),Xe=se(43144),Kt=function(){function yt(){(0,kt.Z)(this,yt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Xe.Z)(yt,[{key:"set",value:function(An,Dn){this.maps[An]=Dn,this.id+=1}},{key:"get",value:function(An){return this.maps[An]}}]),yt}(),Ot=Kt;function bn(yt,Mn,An){var Dn=Ee.useState(0),lr=(0,Ve.Z)(Dn,2),qn=lr[0],pr=lr[1],$n=(0,Ee.useRef)(new Map),qe=(0,Ee.useRef)(new Ot),ut=(0,Ee.useRef)();function Dt(){tt.cancel(ut.current)}function Vt(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Dt();var zt=function(){$n.current.forEach(function(en,nn){if(en&&en.offsetParent){var jn=vt(en),Lr=jn.offsetHeight;qe.current.get(nn)!==Lr&&qe.current.set(nn,jn.offsetHeight)}}),pr(function(en){return en+1})};pt?zt():ut.current=tt(zt)}function We(pt,zt){var Bt=yt(pt),en=$n.current.get(Bt);zt?($n.current.set(Bt,zt),Vt()):$n.current.delete(Bt),!en!=!zt&&(zt?Mn==null||Mn(pt):An==null||An(pt))}return(0,Ee.useEffect)(function(){return Dt},[]),[We,Vt,qe.current,qn]}function Nt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var sn=Nt()?Ee.useLayoutEffect:Ee.useEffect,Cn=function(Mn,An){var Dn=Ee.useRef(!0);sn(function(){return Mn(Dn.current)},An),sn(function(){return Dn.current=!1,function(){Dn.current=!0}},[])},or=function(Mn,An){Cn(function(Dn){if(!Dn)return Mn()},An)},Qe=Cn;function Ce(yt){var Mn=Ee.useRef();Mn.current=yt;var An=Ee.useCallback(function(){for(var Dn,lr=arguments.length,qn=new Array(lr),pr=0;pr<lr;pr++)qn[pr]=arguments[pr];return(Dn=Mn.current)===null||Dn===void 0?void 0:Dn.call.apply(Dn,[Mn].concat(qn))},[]);return An}function ht(yt){var Mn=React.useRef(!1),An=React.useState(yt),Dn=_slicedToArray(An,2),lr=Dn[0],qn=Dn[1];React.useEffect(function(){return Mn.current=!1,function(){Mn.current=!0}},[]);function pr($n,qe){qe&&Mn.current||qn($n)}return[lr,pr]}function Ut(yt){return yt!==void 0}function Yt(yt,Mn){var An=Mn||{},Dn=An.defaultValue,lr=An.value,qn=An.onChange,pr=An.postState,$n=useState(function(){return Ut(lr)?lr:Ut(Dn)?typeof Dn=="function"?Dn():Dn:typeof yt=="function"?yt():yt}),qe=_slicedToArray($n,2),ut=qe[0],Dt=qe[1],Vt=lr!==void 0?lr:ut,We=pr?pr(Vt):Vt,pt=useEvent(qn),zt=useState([Vt]),Bt=_slicedToArray(zt,2),en=Bt[0],nn=Bt[1];useLayoutUpdateEffect(function(){var Lr=en[0];ut!==Lr&&pt(ut,Lr)},[en]),useLayoutUpdateEffect(function(){Ut(lr)||Dt(lr)},[lr]);var jn=useEvent(function(Lr,rr){Dt(Lr,rr),nn([Vt],rr)});return[We,jn]}var Ge=se(31461);function rt(yt,Mn,An){var Dn=React.useRef({});return(!("value"in Dn.current)||An(Dn.current.condition,Mn))&&(Dn.current.value=yt(),Dn.current.condition=Mn),Dn.current.value}function jt(yt,Mn){typeof yt=="function"?yt(Mn):_typeof(yt)==="object"&&yt&&"current"in yt&&(yt.current=Mn)}function _n(){for(var yt=arguments.length,Mn=new Array(yt),An=0;An<yt;An++)Mn[An]=arguments[An];var Dn=Mn.filter(function(lr){return lr});return Dn.length<=1?Dn[0]:function(lr){Mn.forEach(function(qn){jt(qn,lr)})}}function rn(){for(var yt=arguments.length,Mn=new Array(yt),An=0;An<yt;An++)Mn[An]=arguments[An];return useMemo(function(){return _n.apply(void 0,Mn)},Mn,function(Dn,lr){return Dn.length!==lr.length||Dn.every(function(qn,pr){return qn!==lr[pr]})})}function $t(yt){var Mn,An,Dn=isMemo(yt)?yt.type.type:yt.type;return!(typeof Dn=="function"&&!((Mn=Dn.prototype)!==null&&Mn!==void 0&&Mn.render)||typeof yt=="function"&&!((An=yt.prototype)!==null&&An!==void 0&&An.render))}function Zt(yt){return!isValidElement(yt)||isFragment(yt)?!1:$t(yt)}function yn(yt,Mn,An,Dn){if(!Mn.length)return An;var lr=_toArray(Mn),qn=lr[0],pr=lr.slice(1),$n;return!yt&&typeof qn=="number"?$n=[]:Array.isArray(yt)?$n=_toConsumableArray(yt):$n=_objectSpread({},yt),Dn&&An===void 0&&pr.length===1?delete $n[qn][pr[0]]:$n[qn]=yn($n[qn],pr,An,Dn),$n}function ln(yt,Mn,An){var Dn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Mn.length&&Dn&&An===void 0&&!get(yt,Mn.slice(0,-1))?yt:yn(yt,Mn,An,Dn)}function Ae(yt){return _typeof(yt)==="object"&&yt!==null&&Object.getPrototypeOf(yt)===Object.prototype}function ue(yt){return Array.isArray(yt)?[]:{}}var le=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function pe(){for(var yt=arguments.length,Mn=new Array(yt),An=0;An<yt;An++)Mn[An]=arguments[An];var Dn=ue(Mn[0]);return Mn.forEach(function(lr){function qn(pr,$n){var qe=new Set($n),ut=get(lr,pr),Dt=Array.isArray(ut);if(Dt||Ae(ut)){if(!qe.has(ut)){qe.add(ut);var Vt=get(Dn,pr);Dt?Dn=ln(Dn,pr,[]):(!Vt||_typeof(Vt)!=="object")&&(Dn=ln(Dn,pr,ue(ut))),le(ut).forEach(function(We){qn([].concat(_toConsumableArray(pr),[We]),qe)})}}else Dn=ln(Dn,pr,ut)}qn([])}),Dn}var he={},oe=[],Te=function(Mn){oe.push(Mn)};function Ye(yt,Mn){if(0)var An}function Lt(yt,Mn){if(0)var An}function Rt(){he={}}function Ft(yt,Mn,An){!Mn&&!he[An]&&(yt(!1,An),he[An]=!0)}function Jt(yt,Mn){Ft(Ye,yt,Mn)}function Xt(yt,Mn){Ft(Lt,yt,Mn)}Jt.preMessage=Te,Jt.resetWarned=Rt,Jt.noteOnce=Xt;var Hn=null,Rn=10;function Tt(yt,Mn,An,Dn,lr,qn,pr,$n){var qe=Ee.useRef(),ut=Ee.useState(null),Dt=(0,Ve.Z)(ut,2),Vt=Dt[0],We=Dt[1];return Qe(function(){if(Vt&&Vt.times<Rn){if(!yt.current){We(function(Qr){return(0,He.Z)({},Qr)});return}qn();var pt=Vt.targetAlign,zt=Vt.originAlign,Bt=Vt.index,en=Vt.offset,nn=yt.current.clientHeight,jn=!1,Lr=pt,rr=null;if(nn){for(var tr=pt||zt,dr=0,fr=0,mt=0,st=Math.min(Mn.length-1,Bt),Ct=0;Ct<=st;Ct+=1){var fn=lr(Mn[Ct]);fr=dr;var Bn=An.get(fn);mt=fr+(Bn===void 0?Dn:Bn),dr=mt}for(var hn=tr==="top"?en:nn-en,vn=st;vn>=0;vn-=1){var xn=lr(Mn[vn]),Nn=An.get(xn);if(Nn===void 0){jn=!0;break}if(hn-=Nn,hn<=0)break}switch(tr){case"top":rr=fr-en;break;case"bottom":rr=mt-nn+en;break;default:{var hr=yt.current.scrollTop,tn=hr+nn;fr<hr?Lr="top":mt>tn&&(Lr="bottom")}}rr!==null&&pr(rr),rr!==Vt.lastTop&&(jn=!0)}jn&&We(function(Qr){return(0,He.Z)((0,He.Z)({},Qr),{},{times:Qr.times+1,targetAlign:Lr,lastTop:rr})})}},[Vt,yt.current]),function(pt){if(pt==null){$n();return}if(tt.cancel(qe.current),typeof pt=="number")pr(pt);else if(pt&&(0,Be.Z)(pt)==="object"){var zt,Bt=pt.align;"index"in pt?zt=pt.index:zt=Mn.findIndex(function(jn){return lr(jn)===pt.key});var en=pt.offset,nn=en===void 0?0:en;We({times:0,index:zt,offset:nn,originAlign:Bt})}}}function dn(yt,Mn,An,Dn){var lr=An-yt,qn=Mn-An,pr=Math.min(lr,qn)*2;if(Dn<=pr){var $n=Math.floor(Dn/2);return Dn%2?An+$n+1:An-$n}return lr>qn?An-(Dn-qn):An+(Dn-lr)}function cr(yt,Mn,An){var Dn=yt.length,lr=Mn.length,qn,pr;if(Dn===0&&lr===0)return null;Dn<lr?(qn=yt,pr=Mn):(qn=Mn,pr=yt);var $n={__EMPTY_ITEM__:!0};function qe(zt){return zt!==void 0?An(zt):$n}for(var ut=null,Dt=Math.abs(Dn-lr)!==1,Vt=0;Vt<pr.length;Vt+=1){var We=qe(qn[Vt]),pt=qe(pr[Vt]);if(We!==pt){ut=Vt,Dt=Dt||We!==qe(pr[Vt+1]);break}}return ut===null?null:{index:ut,multiple:Dt}}function Mr(yt,Mn,An){var Dn=Ee.useState(yt),lr=(0,Ve.Z)(Dn,2),qn=lr[0],pr=lr[1],$n=Ee.useState(null),qe=(0,Ve.Z)($n,2),ut=qe[0],Dt=qe[1];return Ee.useEffect(function(){var Vt=cr(qn||[],yt||[],Mn);(Vt==null?void 0:Vt.index)!==void 0&&(An==null||An(Vt.index),Dt(yt[Vt.index])),pr(yt)},[yt]),[ut]}var at=(typeof navigator=="undefined"?"undefined":(0,Be.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ht=at,Fn=function(yt,Mn){var An=(0,Ee.useRef)(!1),Dn=(0,Ee.useRef)(null);function lr(){clearTimeout(Dn.current),An.current=!0,Dn.current=setTimeout(function(){An.current=!1},50)}var qn=(0,Ee.useRef)({top:yt,bottom:Mn});return qn.current.top=yt,qn.current.bottom=Mn,function(pr){var $n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=pr<0&&qn.current.top||pr>0&&qn.current.bottom;return $n&&qe?(clearTimeout(Dn.current),An.current=!1):(!qe||An.current)&&lr(),!An.current&&qe}};function er(yt,Mn,An,Dn,lr){var qn=(0,Ee.useRef)(0),pr=(0,Ee.useRef)(null),$n=(0,Ee.useRef)(null),qe=(0,Ee.useRef)(!1),ut=Fn(Mn,An);function Dt(en,nn){tt.cancel(pr.current),qn.current+=nn,$n.current=nn,!ut(nn)&&(Ht||en.preventDefault(),pr.current=tt(function(){var jn=qe.current?10:1;lr(qn.current*jn),qn.current=0}))}function Vt(en,nn){lr(nn,!0),Ht||en.preventDefault()}var We=(0,Ee.useRef)(null),pt=(0,Ee.useRef)(null);function zt(en){if(yt){tt.cancel(pt.current),pt.current=tt(function(){We.current=null},2);var nn=en.deltaX,jn=en.deltaY,Lr=en.shiftKey,rr=nn,tr=jn;(We.current==="sx"||!We.current&&Lr&&jn&&!nn)&&(rr=jn,tr=0,We.current="sx");var dr=Math.abs(rr),fr=Math.abs(tr);We.current===null&&(We.current=Dn&&dr>fr?"x":"y"),We.current==="y"?Dt(en,tr):Vt(en,rr)}}function Bt(en){yt&&(qe.current=en.detail===$n.current)}return[zt,Bt]}var nr=14/15;function Sr(yt,Mn,An){var Dn=(0,Ee.useRef)(!1),lr=(0,Ee.useRef)(0),qn=(0,Ee.useRef)(null),pr=(0,Ee.useRef)(null),$n,qe=function(We){if(Dn.current){var pt=Math.ceil(We.touches[0].pageY),zt=lr.current-pt;lr.current=pt,An(zt)&&We.preventDefault(),clearInterval(pr.current),pr.current=setInterval(function(){zt*=nr,(!An(zt,!0)||Math.abs(zt)<=.1)&&clearInterval(pr.current)},16)}},ut=function(){Dn.current=!1,$n()},Dt=function(We){$n(),We.touches.length===1&&!Dn.current&&(Dn.current=!0,lr.current=Math.ceil(We.touches[0].pageY),qn.current=We.target,qn.current.addEventListener("touchmove",qe),qn.current.addEventListener("touchend",ut))};$n=function(){qn.current&&(qn.current.removeEventListener("touchmove",qe),qn.current.removeEventListener("touchend",ut))},Qe(function(){return yt&&Mn.current.addEventListener("touchstart",Dt),function(){var Vt;(Vt=Mn.current)===null||Vt===void 0||Vt.removeEventListener("touchstart",Dt),$n(),clearInterval(pr.current)}},[yt])}var Tr=20;function Er(){var yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,An=yt/Mn*100;return isNaN(An)&&(An=0),An=Math.max(An,Tr),An=Math.min(An,yt/2),Math.floor(An)}function Or(yt,Mn,An,Dn){var lr=Ee.useMemo(function(){return[new Map,[]]},[yt,An.id,Dn]),qn=(0,Ve.Z)(lr,2),pr=qn[0],$n=qn[1],qe=function(Dt){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dt,We=pr.get(Dt),pt=pr.get(Vt);if(We===void 0||pt===void 0)for(var zt=yt.length,Bt=$n.length;Bt<zt;Bt+=1){var en,nn=yt[Bt],jn=Mn(nn);pr.set(jn,Bt);var Lr=(en=An.get(jn))!==null&&en!==void 0?en:Dn;if($n[Bt]=($n[Bt-1]||0)+Lr,jn===Dt&&(We=Bt),jn===Vt&&(pt=Bt),We!==void 0&&pt!==void 0)break}return{top:$n[We-1]||0,bottom:$n[pt]}};return qe}var Vr=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],ur=[],si={overflowY:"auto",overflowAnchor:"none"};function Li(yt,Mn){var An=yt.prefixCls,Dn=An===void 0?"rc-virtual-list":An,lr=yt.className,qn=yt.height,pr=yt.itemHeight,$n=yt.fullHeight,qe=$n===void 0?!0:$n,ut=yt.style,Dt=yt.data,Vt=yt.children,We=yt.itemKey,pt=yt.virtual,zt=yt.direction,Bt=yt.scrollWidth,en=yt.component,nn=en===void 0?"div":en,jn=yt.onScroll,Lr=yt.onVirtualScroll,rr=yt.onVisibleChange,tr=yt.innerProps,dr=yt.extraRender,fr=yt.styles,mt=(0,we.Z)(yt,Vr),st=!!(pt!==!1&&qn&&pr),Ct=st&&Dt&&(pr*Dt.length>qn||!!Bt),fn=zt==="rtl",Bn=Ie()(Dn,(0,ve.Z)({},"".concat(Dn,"-rtl"),fn),lr),hn=Dt||ur,vn=(0,Ee.useRef)(),xn=(0,Ee.useRef)(),Nn=(0,Ee.useState)(0),hr=(0,Ve.Z)(Nn,2),tn=hr[0],Qr=hr[1],Ur=(0,Ee.useState)(0),$i=(0,Ve.Z)(Ur,2),Ai=$i[0],gi=$i[1],qi=(0,Ee.useState)(!1),xi=(0,Ve.Z)(qi,2),li=xi[0],Ni=xi[1],Gi=function(){Ni(!0)},qr=function(){Ni(!1)},vi=Ee.useCallback(function(cn){return typeof We=="function"?We(cn):cn==null?void 0:cn[We]},[We]),Zi={getKey:vi};function la(cn){Qr(function(Wn){var Zn;typeof cn=="function"?Zn=cn(Wn):Zn=cn;var wr=Jn(Zn);return vn.current.scrollTop=wr,wr})}var ta=(0,Ee.useRef)({start:0,end:hn.length}),ii=(0,Ee.useRef)(),Et=Mr(hn,vi),wt=(0,Ve.Z)(Et,1),Qt=wt[0];ii.current=Qt;var mn=bn(vi,null,null),On=(0,Ve.Z)(mn,4),vr=On[0],Ir=On[1],Wr=On[2],Gr=On[3],Hr=Ee.useMemo(function(){if(!st)return{scrollHeight:void 0,start:0,end:hn.length-1,offset:void 0};if(!Ct){var cn;return{scrollHeight:((cn=xn.current)===null||cn===void 0?void 0:cn.offsetHeight)||0,start:0,end:hn.length-1,offset:void 0}}for(var Wn=0,Zn,wr,Un,Rr=hn.length,Yr=0;Yr<Rr;Yr+=1){var Nr=hn[Yr],jr=vi(Nr),kr=Wr.get(jr),zr=Wn+(kr===void 0?pr:kr);zr>=tn&&Zn===void 0&&(Zn=Yr,wr=Wn),zr>tn+qn&&Un===void 0&&(Un=Yr),Wn=zr}return Zn===void 0&&(Zn=0,wr=0,Un=Math.ceil(qn/pr)),Un===void 0&&(Un=hn.length-1),Un=Math.min(Un+1,hn.length-1),{scrollHeight:Wn,start:Zn,end:Un,offset:wr}},[Ct,st,tn,hn,Gr,qn]),ni=Hr.scrollHeight,yi=Hr.start,Ar=Hr.end,pi=Hr.offset;ta.current.start=yi,ta.current.end=Ar;var Ti=Ee.useState({width:0,height:qn}),Ei=(0,Ve.Z)(Ti,2),De=Ei[0],Fe=Ei[1],ze=function(Wn){Fe({width:Wn.width||Wn.offsetWidth,height:Wn.height||Wn.offsetHeight})},Ze=(0,Ee.useRef)(),nt=(0,Ee.useRef)(),lt=Ee.useMemo(function(){return Er(De.width,Bt)},[De.width,Bt]),Mt=Ee.useMemo(function(){return Er(De.height,ni)},[De.height,ni]),an=ni-qn,un=(0,Ee.useRef)(an);un.current=an;function Jn(cn){var Wn=cn;return Number.isNaN(un.current)||(Wn=Math.min(Wn,un.current)),Wn=Math.max(Wn,0),Wn}var br=tn<=0,Vn=tn>=an,kn=Fn(br,Vn),wn=function(){return{x:fn?-Ai:Ai,y:tn}},Pn=(0,Ee.useRef)(wn()),zn=Ce(function(){if(Lr){var cn=wn();(Pn.current.x!==cn.x||Pn.current.y!==cn.y)&&(Lr(cn),Pn.current=cn)}});function gr(cn,Wn){var Zn=cn;Wn?((0,xe.flushSync)(function(){gi(Zn)}),zn()):la(Zn)}function Yn(cn){var Wn=cn.currentTarget.scrollTop;Wn!==tn&&la(Wn),jn==null||jn(cn),zn()}var Xn=function(Wn){var Zn=Wn,wr=Bt-De.width;return Zn=Math.max(Zn,0),Zn=Math.min(Zn,wr),Zn},ir=Ce(function(cn,Wn){Wn?((0,xe.flushSync)(function(){gi(function(Zn){var wr=Zn+(fn?-cn:cn);return Xn(wr)})}),zn()):la(function(Zn){var wr=Zn+cn;return wr})}),ar=er(st,br,Vn,!!Bt,ir),xr=(0,Ve.Z)(ar,2),Re=xr[0],Ke=xr[1];Sr(st,vn,function(cn,Wn){return kn(cn,Wn)?!1:(Re({preventDefault:function(){},deltaY:cn}),!0)}),Qe(function(){function cn(Zn){st&&Zn.preventDefault()}var Wn=vn.current;return Wn.addEventListener("wheel",Re),Wn.addEventListener("DOMMouseScroll",Ke),Wn.addEventListener("MozMousePixelScroll",cn),function(){Wn.removeEventListener("wheel",Re),Wn.removeEventListener("DOMMouseScroll",Ke),Wn.removeEventListener("MozMousePixelScroll",cn)}},[st]),Qe(function(){Bt&&gi(function(cn){return Xn(cn)})},[De.width,Bt]);var At=function(){var Wn,Zn;(Wn=Ze.current)===null||Wn===void 0||Wn.delayHidden(),(Zn=nt.current)===null||Zn===void 0||Zn.delayHidden()},dt=Tt(vn,hn,Wr,pr,vi,function(){return Ir(!0)},la,At);Ee.useImperativeHandle(Mn,function(){return{getScrollInfo:wn,scrollTo:function(Wn){function Zn(wr){return wr&&(0,Be.Z)(wr)==="object"&&("left"in wr||"top"in wr)}Zn(Wn)?(Wn.left!==void 0&&gi(Xn(Wn.left)),dt(Wn.top)):dt(Wn)}}}),Qe(function(){if(rr){var cn=hn.slice(yi,Ar+1);rr(cn,hn)}},[yi,Ar,hn]);var Gt=Or(hn,vi,Wr,pr),pn=dr==null?void 0:dr({start:yi,end:Ar,virtual:Ct,offsetX:Ai,offsetY:pi,rtl:fn,getSize:Gt}),Sn=je(hn,yi,Ar,Bt,vr,Vt,Zi),Kn=null;qn&&(Kn=(0,He.Z)((0,ve.Z)({},qe?"height":"maxHeight",qn),si),st&&(Kn.overflowY="hidden",Bt&&(Kn.overflowX="hidden"),li&&(Kn.pointerEvents="none")));var Tn={};return fn&&(Tn.dir="rtl"),Ee.createElement("div",(0,de.Z)({style:(0,He.Z)((0,He.Z)({},ut),{},{position:"relative"}),className:Bn},Tn,mt),Ee.createElement(ot.Z,{onResize:ze},Ee.createElement(nn,{className:"".concat(Dn,"-holder"),style:Kn,ref:vn,onScroll:Yn,onMouseEnter:At},Ee.createElement(St,{prefixCls:Dn,height:ni,offsetX:Ai,offsetY:pi,scrollWidth:Bt,onInnerResize:Ir,ref:xn,innerProps:tr,rtl:fn,extra:pn},Sn))),Ct&&ni>qn&&Ee.createElement(Se,{ref:Ze,prefixCls:Dn,scrollOffset:tn,scrollRange:ni,rtl:fn,onScroll:gr,onStartMove:Gi,onStopMove:qr,spinSize:Mt,containerSize:De.height,style:fr==null?void 0:fr.verticalScrollBar,thumbStyle:fr==null?void 0:fr.verticalScrollBarThumb}),Ct&&Bt&&Ee.createElement(Se,{ref:nt,prefixCls:Dn,scrollOffset:Ai,scrollRange:Bt,rtl:fn,onScroll:gr,onStartMove:Gi,onStopMove:qr,spinSize:lt,containerSize:De.width,horizontal:!0,style:fr==null?void 0:fr.horizontalScrollBar,thumbStyle:fr==null?void 0:fr.horizontalScrollBarThumb}))}var Bi=Ee.forwardRef(Li);Bi.displayName="List";var Hi=Bi,ri=Hi},66392:function(En,Wt){"use strict";var se;var de=Symbol.for("react.element"),He=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ve=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),we=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),xe=Symbol.for("react.server_context"),me=Symbol.for("react.forward_ref"),Ie=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),Oe=Symbol.for("react.memo"),St=Symbol.for("react.lazy"),ft=Symbol.for("react.offscreen"),it;it=Symbol.for("react.module.reference");function Je(Le){if(typeof Le=="object"&&Le!==null){var gt=Le.$$typeof;switch(gt){case de:switch(Le=Le.type,Le){case Be:case ve:case Ve:case Ie:case ot:return Le;default:switch(Le=Le&&Le.$$typeof,Le){case xe:case Ee:case me:case St:case Oe:case we:return Le;default:return gt}}case He:return gt}}}se=Ee,se=we,se=de,se=me,se=Be,se=St,se=Oe,se=He,se=ve,se=Ve,se=Ie,se=ot,se=function(){return!1},se=function(){return!1},se=function(Le){return Je(Le)===Ee},se=function(Le){return Je(Le)===we},se=function(Le){return typeof Le=="object"&&Le!==null&&Le.$$typeof===de},se=function(Le){return Je(Le)===me},se=function(Le){return Je(Le)===Be},se=function(Le){return Je(Le)===St},se=function(Le){return Je(Le)===Oe},se=function(Le){return Je(Le)===He},se=function(Le){return Je(Le)===ve},se=function(Le){return Je(Le)===Ve},se=function(Le){return Je(Le)===Ie},se=function(Le){return Je(Le)===ot},se=function(Le){return typeof Le=="string"||typeof Le=="function"||Le===Be||Le===ve||Le===Ve||Le===Ie||Le===ot||Le===ft||typeof Le=="object"&&Le!==null&&(Le.$$typeof===St||Le.$$typeof===Oe||Le.$$typeof===we||Le.$$typeof===Ee||Le.$$typeof===me||Le.$$typeof===it||Le.getModuleId!==void 0)},se=Je},31461:function(En,Wt,se){"use strict";se(66392)},84279:function(En,Wt,se){"use strict";var de=Object.defineProperty,He=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,Ee=(a,y,b)=>y in a?de(a,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):a[y]=b,xe=(a,y)=>{for(var b in y||(y={}))ve.call(y,b)&&Ee(a,b,y[b]);if(Ve)for(var b of Ve(y))we.call(y,b)&&Ee(a,b,y[b]);return a},me=(a,y)=>He(a,Be(y)),Ie=a=>typeof a=="symbol"?a:a+"",ot=(a,y)=>{var b={};for(var E in a)ve.call(a,E)&&y.indexOf(E)<0&&(b[E]=a[E]);if(a!=null&&Ve)for(var E of Ve(a))y.indexOf(E)<0&&we.call(a,E)&&(b[E]=a[E]);return b};function Oe(a){return Array.isArray(a)}var St={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function ft(){return"window"in globalThis&&"document"in globalThis}function it(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function Je(){return typeof navigator.vibrate=="function"}function Le(){var a,y;if(!ft())return"other";const b=(y=(a=navigator.userAgentData)==null?void 0:a.platform)!=null?y:navigator.platform;return/^mac/i.test(b)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(b)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function gt(){if(!ft())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 qt(){return HTMLElement.prototype.hasOwnProperty("popover")}var tt={strings:St,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return tt._locale||(tt._locale=ft()?navigator.language.slice(0,5):"en-US"),tt._locale},set locale(a){tt._locale=a,tt._numberFormatter=void 0,tt.dirty=!0},get numberFormatter(){return tt._numberFormatter||(tt._numberFormatter=new Intl.NumberFormat(tt.locale)),tt._numberFormatter},merge(a,y){if(typeof a=="string"&&y)tt.strings[a]=xe(xe({},tt.strings[a]),y),tt.dirty=!0;else for(const b of Object.keys(a))tt.merge(b,a[b])},get dirty(){return tt._dirty},set dirty(a){tt._dirty||tt._dirty===a||(tt._dirty=!0,setTimeout(()=>{tt._dirty=!1,this._subscribers.forEach(y=>y==null?void 0:y())},0))},subscribe(a){return tt._subscribers.push(a),tt._subscribers.length-1},unsubscribe(a){a<0||a>=tt._subscribers.length||(tt._subscribers[a]=void 0)},update(a){let y=a.querySelectorAll("[data-l10n-tooltip]");for(const b of y){const E=b.getAttribute("data-l10n-tooltip");if(E){const ee=ct(E);ee&&b.setAttribute("data-tooltip",ee)}}y=a.querySelectorAll("[data-l10n-arial-label]");for(const b of y){const E=b.getAttribute("data-l10n-arial-label");if(E){const ee=ct(E);ee&&b.setAttribute("aria-label",ee)}}}};function ct(a,...y){if(a===void 0)return;let b="";const E=tt.locale;tt.strings[E]&&(b=tt.strings[E][a]);const ee=E.slice(0,2);if(!b&&tt.strings[ee]&&(b=tt.strings[ee][a]),b||(b=tt.strings.en[a]),!b)return;const re=/(%@|%([0-9]+)\$@)/g;let ae=re.exec(b),fe=0;for(;ae;){if(y[fe++]){const be=ae[2]?parseInt(ae[2],10)-1:fe-1;let Me=y[be];typeof Me=="number"&&(Me=tt.numberFormatter.format(Me)),b=b.replace(ae[1],Me)}ae=re.exec(b)}return b=b.replace(/%%/g,"%"),b}var ke={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Se={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Ue={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},je={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},_t={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},vt={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function kt(a){var y,b,E,ee,re,ae;const fe=a.split("!");let ge,be,Me,Ne=255,et=255,xt=255,It=-1;const In=fe.length>0&&fe[0].startsWith("-");In&&(fe[0]=fe[0].slice(1));for(let _r=0;_r<fe.length;_r++){ge=Ne,be=et,Me=xt;const Ln=(y=fe[_r].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:y[1],sr=Ln==null?void 0:Ln.toLowerCase(),Pr=Ln&&(ae=(re=(ee=(E=(b=je[sr])!=null?b:je[_t[Ln]])!=null?E:Se[Ln])!=null?ee:vt[Ln])!=null?re:ke[Ln])!=null?ae:fe[_r].trim();let mr=Pr.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(mr!=null&&mr[1]&&mr[2]&&mr[3])Ne=Math.max(0,Math.min(255,Number.parseInt(mr[1],16))),et=Math.max(0,Math.min(255,Number.parseInt(mr[2],16))),xt=Math.max(0,Math.min(255,Number.parseInt(mr[3],16)));else if(mr=Pr.match(/^#([\da-f]{3})$/i),mr!=null&&mr[1]){const di=Number.parseInt(mr[1][0],16),Pi=Number.parseInt(mr[1][1],16),bi=Number.parseInt(mr[1][2],16);Ne=Math.max(0,Math.min(255,di*16+di)),et=Math.max(0,Math.min(255,Pi*16+Pi)),xt=Math.max(0,Math.min(255,bi*16+bi))}else if(mr=Pr.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),mr!=null&&mr[1]&&mr[2]&&mr[3])Ne=Math.max(0,Math.min(255,Number.parseInt(mr[1]))),et=Math.max(0,Math.min(255,Number.parseInt(mr[2]))),xt=Math.max(0,Math.min(255,Number.parseInt(mr[3])));else return;It>=0&&(Ne=(1-It)*Ne+It*ge,et=(1-It)*et+It*be,xt=(1-It)*xt+It*Me,It=-1),_r+1<fe.length&&(It=Math.max(0,Math.min(100,Number.parseInt(fe[++_r])))/100)}return It>=0&&(Ne=It*Ne+(1-It)*ge,et=It*et+(1-It)*be,xt=It*xt+(1-It)*Me),In&&(Ne=255-Ne,et=255-et,xt=255-xt),"#"+("00"+Math.round(Ne).toString(16)).slice(-2)+("00"+Math.round(et).toString(16)).slice(-2)+("00"+Math.round(xt).toString(16)).slice(-2)}function Xe(a){var y,b;return a=a.trim(),(b=(y=Ue[a.toLowerCase()])!=null?y:Ue[_t[a]])!=null?b:kt(a)}function Kt(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&y.a===void 0&&(y.a=1),y}function Ot(a,y,b){return b<0&&(b+=6),b>=6&&(b-=6),b<1?(y-a)*b+a:b<3?y:b<4?(y-a)*(4-b)+a:a}function bn(a){let[y,b,E]=[a.h,a.s,a.l];y=(y+360)%360/60,E=Math.max(0,Math.min(E,1)),b=Math.max(0,Math.min(b,1));const ee=E<=.5?E*(b+1):E+b-E*b,re=E*2-ee;return{r:Math.round(255*Ot(re,ee,y+2)),g:Math.round(255*Ot(re,ee,y)),b:Math.round(255*Ot(re,ee,y-2))}}function Nt(a){return a<0?0:a>255?255:Math.round(a)}function sn(a){const{r:y,g:b,b:E}=a;let ee=((1<<24)+(Nt(y)<<16)+(Nt(b)<<8)+Nt(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 Cn(a){let{r:y,g:b,b:E}=a;y=y/255,b=b/255,E=E/255;const ee=Math.min(y,b,E),re=Math.max(y,b,E),ae=re-ee;let fe,ge;re===ee?fe=0:y===re?fe=(b-E)/ae:b===re?fe=2+(E-y)/ae:E===re&&(fe=4+(y-b)/ae),fe=Math.min(fe*60,360),fe<0&&(fe+=360);const be=(ee+re)/2;return re===ee?ge=0:be<=.5?ge=ae/(re+ee):ge=ae/(2-re-ee),{h:fe,s:ge,l:be}}function or(a){let y=Kt(a);if(!y)return a;let{h:b,s:E,l:ee}=Cn(y);return E+=.1,ee-=.1,sn(bn({h:b,s:E,l:ee}))}var Qe={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"},Ce={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},ht=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Ut(a,y,b){if(!/[A-Za-z\d]/.test(a)||(b==="up"&&(b=void 0),!y&&!b))return a;const E=a.codePointAt(0);if(E===void 0)return a;for(const ee of ht)if((!y||ee.variant===y)&&(!b||ee.style===b)&&E>=ee.offset&&E<ee.offset+ee.len){const re=ee.start+E-ee.offset;return String.fromCodePoint(Ce[re]||re)}return a}function Yt(a){var y;if((a<119808||a>120831)&&(a<8448||a>8527))return{char:String.fromCodePoint(a)};for(const b in Ce)if(Ce[b]===a){a=(y=b.codePointAt(0))!=null?y:0;break}for(const b of ht)if(a>=b.start&&a<b.start+b.len)return{char:String.fromCodePoint(a-b.start+b.offset),variant:b.variant,style:b.style};return{char:String.fromCodePoint(a)}}function Ge(a){var y;let b="";for(const E of a){if("{}<>[]$&#^_%:'\u02DC".includes(E)){b+=E;continue}const ee=(y=E.codePointAt(0))!=null?y:0;let re=Qe[ee];if(re)re.startsWith("\\")?b+=re+" ":b+=re;else{const{char:ae,variant:fe,style:ge}=Yt(ee);switch(re=ae,fe){case"double-struck":re=`\\mathbb{${re}}`;break;case"fraktur":re=`\\mathfrak{${re}}`;break;case"script":re=`\\mathscr{${re}}`;break;case"sans-serif":re=`\\mathsf{${re}}`;break;case"monospace":re=`\\mathtt{${re}}`;break;case"calligraphic":re=`\\mathcal{${re}}`;break}switch(ge){case"bold":re=`\\mathbf{${re}}`;break;case"italic":re=`\\mathit{${re}}`;break;case"bolditalic":re=`\\mathbfit{${re}}`;break}b+=re}}return b}function rt(a){return a?Array.isArray(a)?a:typeof a=="object"&&"group"in a?a.group:[]:[]}var jt={},_n=xe({},Qe),rn={},$t={},Zt={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}"},yn={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}},ln={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},Ae={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:ln},"amsmath.sty":{package:yn,primitive:!0},"texvc.sty":{package:Zt,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!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,pe,he;gt()?(pe=new RegExp("\\p{Letter}","u"),he=new RegExp("[0-9\\p{Letter}]","u")):(pe=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,he=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function oe(a,y,b="mord",E){y!==void 0&&(jt[a]={definitionType:"symbol",type:b,variant:E,codepoint:y},_n[y]||(_n[y]=a))}function Te(a,y,b){if(typeof a=="string"){for(let E=0;E<a.length;E++){const ee=a.charAt(E);oe(ee,ee.codePointAt(0))}return}for(const[E,ee,re,ae]of a)oe(E,ee,re!=null?re:y,ae!=null?ae:b)}function Ye(a,y){for(let b=a;b<=y;b++)oe(String.fromCodePoint(b),b)}function Lt(a){var y;return(y=$t[a])!=null?y:null}function Rt(a,y){var b,E;if(y.length===0||y==="\\"||!y.startsWith("\\"))return[];const ee=[];for(const ae in rn)ae.startsWith(y)&&!rn[ae].infix&&ee.push({match:ae,frequency:(b=rn[ae].frequency)!=null?b:0});for(const ae in jt)ae.startsWith(y)&&ee.push({match:ae,frequency:(E=jt[ae].frequency)!=null?E:0});const re=y.substring(1);for(const ae of Object.keys(a.options.macros))ae.startsWith(re)&&ee.push({match:"\\"+ae,frequency:0});return ee.sort((ae,fe)=>{var ge,be;return ae.frequency===fe.frequency?ae.match.length===fe.match.length?ae.match<fe.match?-1:1:ae.match.length-fe.match.length:((ge=fe.frequency)!=null?ge:0)-((be=ae.frequency)!=null?be:0)}),ee.map(ae=>ae.match)}function Ft(a){let y="auto";const b=a.match(/:([^=]+)/);return b&&(y=b[1].trim()),y}function Jt(a){if(!a)return[];const y=[];let b=a.split("]");if(b[0].startsWith("[")){y.push({isOptional:!0,type:Ft(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Jt(b[E]))}else if(b=a.split("}"),b[0].startsWith("{")){y.push({isOptional:!1,type:Ft(b[0].slice(1))});for(let E=1;E<=b.length;E++)y.push(...Jt(b[E]))}return y}function Xt(a){if(!a)return"";let y="",b=!0;for(const E of a)typeof E.value=="string"?y+=E.value:b=!1;return b?y:""}function Hn(a,y){typeof a=="string"&&(a=[a]);const b={tabular:!1,params:[],createAtom:y};for(const E of a)$t[E]=b}function Rn(a,y,b){typeof a=="string"&&(a=[a]);const ee={tabular:!0,params:Jt(y),createAtom:b};for(const re of a)$t[re]=ee}function Tt(a,y,b){var E,ee;b||(b={});const re={definitionType:"function",params:Jt(y),ifMode:b.ifMode,isFunction:(E=b.isFunction)!=null?E:!1,applyMode:b.applyMode,infix:(ee=b.infix)!=null?ee:!1,parse:b.parse,createAtom:b.createAtom,applyStyle:b.applyStyle,serialize:b.serialize,render:b.render};if(typeof a=="string")rn["\\"+a]=re;else for(const ae of a)rn["\\"+ae]=re}var dn;function cr(a){return dn||(dn=at(Ae)),a?at(xe(xe({},dn),a)):dn}function Mr(a,y){var b,E,ee,re;if(typeof a=="string"){let ae=0;const fe=a;return/(^|[^\\])#1/.test(fe)&&(ae=1),/(^|[^\\])#2/.test(fe)&&(ae=2),/(^|[^\\])#3/.test(fe)&&(ae=3),/(^|[^\\])#4/.test(fe)&&(ae=4),/(^|[^\\])#5/.test(fe)&&(ae=5),/(^|[^\\])#6/.test(fe)&&(ae=6),/(^|[^\\])#7/.test(fe)&&(ae=7),/(^|[^\\])#8/.test(fe)&&(ae=8),/(^|[^\\])#9/.test(fe)&&(ae=9),{expand:(b=y==null?void 0:y.expand)!=null?b:!0,captureSelection:(E=y==null?void 0:y.captureSelection)!=null?E:!0,args:ae,def:fe}}return xe({expand:(ee=y==null?void 0:y.expand)!=null?ee:!0,captureSelection:(re=y==null?void 0:y.captureSelection)!=null?re:!0,args:0},a)}function at(a){if(!a)return{};const y={};for(const b of Object.keys(a)){const E=a[b];if(E==null)delete y[b];else if(typeof E=="object"&&"package"in E)for(const ee of Object.keys(E.package))y[ee]=Mr(E.package[ee],{expand:!E.primitive,captureSelection:E.captureSelection});else y[b]=Mr(E)}return y}function Ht(a,y="math"){if(!a||a.length===0)return null;let b=null;if(a.startsWith("\\")){if(b=rn[a],b)return!b.ifMode||b.ifMode===y?b:null;y==="math"?b=jt[a]:ue[a]&&(b={definitionType:"symbol",type:"mord",codepoint:ue[a]})}else if(y==="math"){if(b=jt[a],!b&&a.length===1){const E=er("math",a.codePointAt(0));return E.startsWith("\\")?me(xe({},Ht(E,"math")),{command:E}):null}}else ue[a]?b={definitionType:"symbol",type:"mord",codepoint:ue[a]}:y==="text"&&(b={definitionType:"symbol",type:"mord",codepoint:a.codePointAt(0)});return b!=null?b:null}function Fn(a,y){if(!a.startsWith("\\"))return null;const b=a.slice(1);return y[b]}function er(a,y){if(y===void 0)return"";if(a==="math"&&_n[y])return _n[y];if(a==="text"){const b=Object.keys(ue).find(E=>ue[E]===y);return b||String.fromCodePoint(y)}return String.fromCodePoint(y)}var nr=[0,.68889,0,0,.72222],Sr=[0,.68889,0,0,.66667],Tr=[0,.68889,0,0,.77778],Er=[0,.68889,0,0,.61111],Or=[.16667,.68889,0,0,.77778],Vr=[0,.68889,0,0,.55556],ur=[0,0,0,0,.25],si=[0,.825,0,0,2.33334],Li=[0,.9,0,0,2.33334],Bi=[0,.68889,0,0,.54028],Hi=[-.03598,.46402,0,0,.5],ri=[-.13313,.36687,0,0,1],yt=[.01354,.52239,0,0,1],Mn=[.01354,.52239,0,0,1.11111],An=[0,.54986,0,0,1],Dn=[0,.69224,0,0,.5],lr=[0,.43056,0,0,1],qn=[.08198,.58198,0,0,.77778],pr=[.19444,.69224,0,0,.41667],$n=[.1808,.675,0,0,1],qe=[.19444,.69224,0,0,.83334],ut=[.13667,.63667,0,0,1],Dt=[-.064,.437,0,0,1.334],Vt=[.08167,.58167,0,0,.77778],We=[0,.69224,0,0,.72222],pt=[0,.69224,0,0,.66667],zt=[-.13313,.36687,0,0,.77778],Bt=[.06062,.54986,0,0,.77778],en=[0,.69224,0,0,.77778],nn=[.25583,.75583,0,0,.77778],jn=[.25142,.75726,0,0,.77778],Lr=[.20576,.70576,0,0,.77778],rr=[.30274,.79383,0,0,.77778],tr=[.22958,.72958,0,0,.77778],dr=[.1808,.675,0,0,.77778],fr=[.13667,.63667,0,0,.77778],mt=[.13597,.63597,0,0,.77778],st=[.03517,.54986,0,0,.77778],Ct=[0,.675,0,0,.77778],fn=[.19444,.69224,0,0,.61111],Bn=[0,.54986,0,0,.76042],hn=[0,.54986,0,0,.66667],vn=[.0391,.5391,0,0,.77778],xn=[.03517,.54986,0,0,1.33334],Nn=[.38569,.88569,0,0,.77778],hr=[.23222,.74111,0,0,.77778],tn=[.19444,.69224,0,0,.77778],Qr=[0,.37788,0,0,.5],Ur=[0,.54986,0,0,.72222],$i=[0,.69224,0,0,.83334],Ai=[.11111,.69224,0,0,.66667],gi=[.26167,.75726,0,0,.77778],qi=[.48256,.98256,0,0,.77778],xi=[.28481,.79383,0,0,.77778],li=[.08167,.58167,0,0,.22222],Ni=[.08167,.58167,0,0,.38889],Gi=[0,.43056,.04028,0,.66667],qr=[.41951,.91951,0,0,.77778],vi=[.24982,.74947,0,0,.38865],Zi=[.08319,.58283,0,0,.75623],la=[0,.10803,0,0,.27764],ta=[0,.47534,0,0,.50181],ii=[.18906,.47534,0,0,.50181],Et=[0,.69141,0,0,.50181],wt=[.24982,.74947,0,0,.27764],Qt=[0,.69141,0,0,.21471],mn=[.25,.75,0,0,.44722],On=[0,.64444,0,0,.575],vr=[.08556,.58556,0,0,.89444],Ir=[0,.69444,0,0,.89444],Wr=[0,.68611,0,0,.9],Gr=[0,.68611,0,0,.86944],Hr=[.25,.75,0,0,.575],ni=[.25,.75,0,0,.31944],yi=[0,.69444,0,0,.63889],Ar=[0,.69444,0,0,.31944],pi=[0,.44444,0,0,.63889],Ti=[0,.44444,0,0,.51111],Ei=[0,.69444,0,0,.575],De=[.13333,.63333,0,0,.89444],Fe=[0,.44444,0,0,.31944],ze=[0,.69444,0,0,.86944],Ze=[0,.68611,0,0,.69166],nt=[0,.68611,0,0,.83055],lt=[0,.68611,0,0,.89444],Mt=[0,.69444,0,0,.60278],an=[.19444,.69444,0,0,.51111],un=[0,.69444,0,0,.83055],Jn=[-.10889,.39111,0,0,1.14999],br=[.19444,.69444,0,0,.575],Vn=[.19444,.69444,0,0,1.14999],kn=[.19444,.69444,0,0,.70277],wn=[.05556,.75,0,0,.575],Pn=[0,.68611,0,0,.95833],zn=[.08556,.58556,0,0,.76666],gr=[-.02639,.47361,0,0,.575],Yn=[0,.44444,0,0,.89444],Xn=[0,.55556,0,0,.76666],ir=[-.10889,.39111,0,0,.89444],ar=[.00222,.50222,0,0,.89444],xr=[.19667,.69667,0,0,.89444],Re=[.08556,.58556,0,0,1.14999],Ke=[0,.69444,0,0,.70277],At=[-.02778,.47222,0,0,.575],dt=[.25,.75,0,0,.51111],Gt=[-.13889,.36111,0,0,1.14999],pn=[.19444,.69444,0,0,1.02222],Sn=[.12963,.69444,0,0,.89444],Kn=[.19444,.69444,0,0,.44722],Tn=[0,.64444,.13167,0,.59111],cn=[.19444,.64444,.13167,0,.59111],Wn=[0,.68611,.17208,0,.8961],Zn=[.19444,.44444,.105,0,.53222],wr=[0,.44444,.085,0,.82666],Un=[0,.69444,.06709,0,.59111],Rr=[0,.69444,.12945,0,.35555],Yr=[0,.69444,0,0,.94888],Nr=[0,.69444,.11472,0,.59111],jr=[0,.68611,.10778,0,.88555],kr=[0,.69444,.07939,0,.62055],zr=[0,.69444,.12417,0,.30667],ei=[0,.64444,.13556,0,.51111],ci=[.19444,.64444,.13556,0,.51111],Fr=[0,.68333,.16389,0,.74333],fi=[.19444,.43056,.08847,0,.46],Oi=[0,.43056,.07514,0,.71555],na=[0,.69444,.06646,0,.51111],Xi=[0,.69444,0,0,.83129],Fi=[0,.69444,.1225,0,.51111],Ji=[0,.68333,.09403,0,.76666],Qi=[0,.68333,.11111,0,.76666],wi=[0,.69444,.06961,0,.51444],zi=[0,.69444,0,0,.27778],Jr=[.25,.75,0,0,.38889],hi=[0,.64444,0,0,.5],Ii=[0,.69444,0,0,.77778],Yi=[0,.68333,0,0,.75],$a=[0,.68333,0,0,.77778],Na=[0,.68333,0,0,.68056],Aa=[0,.68333,0,0,.72222],ca=[.25,.75,0,0,.5],ea=[.25,.75,0,0,.27778],Mi=[0,.69444,0,0,.5],Oa=[0,.69444,0,0,.55556],ki=[0,.43056,0,0,.44445],ti=[0,.43056,0,0,.5],Wi=[.19444,.43056,0,0,.55556],ua=[0,.43056,0,0,.55556],Vi=[.08333,.58333,0,0,.77778],aa=[0,.43056,0,0,.27778],mi=[0,.66786,0,0,.27778],pa=[0,.69444,0,0,.75],xa=[0,.66786,0,0,.5],fa=[0,.68333,0,0,.625],wa=[.19444,.69444,0,0,.44445],Ma=[0,.69444,0,0,.72222],Za=[.19444,.69444,0,0,.5],ha=[.19444,.69444,0,0,1],ka=[.011,.511,0,0,1.126],Ja=[.19444,.69444,0,0,.61111],Ga=[.05556,.75,0,0,.5],so=[0,.68333,0,0,.83334],Fa=[.0391,.5391,0,0,.66667],Ca=[-.05555,.44445,0,0,.5],_i=[0,.43056,0,0,.77778],Ui=[0,.55556,0,0,.66667],da=[-.03625,.46375,0,0,.77778],Sa=[-.01688,.48312,0,0,.77778],Ka=[.0391,.5391,0,0,1],io=[0,.69444,0,0,.61111],ho=[-.03472,.46528,0,0,.5],Oo=[.25,.75,0,0,.44445],Ro=[-.14236,.35764,0,0,1],lo=[.244,.744,0,0,.412],Ao=[.19444,.69444,0,0,.88889],ra=[.12963,.69444,0,0,.77778],Ri=[.19444,.69444,0,0,.38889],Ta=[.011,.511,0,0,1.638],_a=[.19444,.69444,0,0,0],co=[0,.44444,0,0,.575],ao=[.19444,.44444,0,0,.575],hs=[0,.68611,0,0,.75555],Qo=[0,.69444,0,0,.66759],ps=[0,.68611,0,0,.80555],oa=[0,.68611,.08229,0,.98229],Br=[0,.68611,0,0,.76666],Si=[0,.44444,0,0,.58472],Ci=[.19444,.44444,0,0,.6118],Di=[.19444,.43056,0,0,.5],Ha=[0,.68333,.02778,.08334,.76278],Va=[0,.68333,.08125,.05556,.83125],Fo=[0,.43056,0,.05556,.48472],Uo=[.19444,.43056,0,.08334,.51702],ls=[.25,.75,0,0,.42778],va=[0,.69444,0,0,.55],Bo=[0,.69444,0,0,.73334],cs=[0,.69444,0,0,.79445],ul=[0,.69444,0,0,.51945],As=[0,.69444,0,0,.70278],ms=[0,.69444,0,0,.76389],zo=[.25,.75,0,0,.34306],Ts=[0,.69444,0,0,.56111],Is=[0,.69444,0,0,.25556],qs=[.19444,.45833,0,0,.56111],oo=[0,.45833,0,0,.56111],Ia=[0,.69444,0,0,.30556],Xa=[0,.69444,0,0,.58056],go=[0,.69444,0,0,.67223],yo=[0,.69444,0,0,.85556],Ko=[0,.69444,0,0,.55834],wo=[0,.65556,.11156,0,.5],xs=[0,.69444,.08094,0,.70834],Xl=[.17014,0,0,0,.44445],Yl=[0,.69444,.0799,0,.5],vc=[0,.69444,0,0,.73752],Xc=[0,.69444,.09205,0,.5],Ks=[0,.69444,.09031,0,.77778],Ds=[0,.69444,.07816,0,.27778],yc=[0,.69444,.00316,0,.5],ql=[.19444,.69444,0,0,.83334],Da=[.05556,.75,0,0,.83334],ma=[0,.75,0,0,.5],Ho=[.125,.08333,0,0,.27778],es=[0,.08333,0,0,.27778],ga=[0,.65556,0,0,.5],za=[0,.69444,0,0,.47222],Ra=[0,.69444,0,0,.66667],po=[0,.69444,0,0,.59722],is=[0,.69444,0,0,.54167],Hs=[0,.69444,0,0,.70834],gs=[.25,.75,0,0,.28889],Jl=[0,.69444,0,0,.51667],jd=[0,.44444,0,0,.44445],Zd=[.19444,.44444,0,0,.51667],Yc=[0,.44444,0,0,.38333],ju=[0,.44444,0,0,.51667],qc=[0,.69444,0,0,.83334],Vd=[.35001,.85,0,0,.45834],Jc=[.35001,.85,0,0,.57778],Qc=[.35001,.85,0,0,.41667],Zu=[.35001,.85,0,0,.58334],bc=[0,.72222,0,0,.55556],eu=[1e-5,.6,0,0,.66667],Vu=[1e-5,.6,0,0,.77778],Ql=[.25001,.75,0,0,.94445],Gd=[.306,.805,.19445,0,.47222],xc=[.30612,.805,.19445,0,.47222],jo=[.25001,.75,0,0,.83334],Pl=[.35001,.85,0,0,.47222],Gu=[.25001,.75,0,0,1.11111],Xu=[.65002,1.15,0,0,.59722],vs=[.65002,1.15,0,0,.81111],ja=[.65002,1.15,0,0,.47222],Ms=[.65002,1.15,0,0,.66667],Ps=[0,.75,0,0,1],Js=[.55001,1.05,0,0,1.27778],Yu=[.862,1.36,.44445,0,.55556],tu=[.86225,1.36,.44445,0,.55556],Ol=[.55001,1.05,0,0,1.11111],nu=[.65002,1.15,0,0,.52778],ru=[.65002,1.15,0,0,.61111],Rl=[.55001,1.05,0,0,1.51112],qu=[.95003,1.45,0,0,.73611],iu=[.95003,1.45,0,0,1.04445],Qs=[.95003,1.45,0,0,.52778],wc=[.95003,1.45,0,0,.75],Sc=[0,.75,0,0,1.44445],au=[.95003,1.45,0,0,.58334],Cc=[1.25003,1.75,0,0,.79167],ou=[1.25003,1.75,0,0,1.27778],Ju=[1.25003,1.75,0,0,.58334],su=[1.25003,1.75,0,0,.80556],Ec=[0,.825,0,0,1.8889],lu=[1.25003,1.75,0,0,.63889],cu=[.64502,1.155,0,0,.875],Mc=[1e-5,.6,0,0,.875],uu=[-99e-5,.601,0,0,.66667],du=[.64502,1.155,0,0,.66667],Xd=[1e-5,.9,0,0,.88889],Qu=[.65002,1.15,0,0,.88889],Bl=[.90001,0,0,0,.88889],fu=[-.00499,.605,0,0,1.05556],$l=[0,.12,0,0,.45],ui=[0,.61111,0,0,.525],ws=[.08333,.69444,0,0,.525],ed=[-.08056,.53055,0,0,.525],Yd=[-.05556,.55556,0,0,.525],as=[0,.43056,0,0,.525],To=[.22222,.43056,0,0,.525],kc=[0,0,0,0,.525],qd={"AMS-Regular":{32:ur,65:nr,66:Sr,67:nr,68:nr,69:Sr,70:Er,71:Tr,72:Tr,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Tr,76:Sr,77:[0,.68889,0,0,.94445],78:nr,79:Or,80:Er,81:Or,82:nr,83:Vr,84:Sr,85:nr,86:nr,87:[0,.68889,0,0,1],88:nr,89:nr,90:Sr,107:Vr,160:ur,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Vr,295:Bi,710:si,732:Li,770:si,771:Li,989:Vt,1008:Gi,8245:[0,.54986,0,0,.275],8463:Bi,8487:nr,8498:Vr,8502:Sr,8503:[0,.68889,0,0,.44445],8504:Sr,8513:[0,.68889,0,0,.63889],8592:Hi,8594:Hi,8602:ri,8603:ri,8606:yt,8608:yt,8610:Mn,8611:Mn,8619:An,8620:An,8621:[-.13313,.37788,0,0,1.38889],8622:ri,8624:Dn,8625:Dn,8630:lr,8631:lr,8634:qn,8635:qn,8638:pr,8639:pr,8642:pr,8643:pr,8644:$n,8646:$n,8647:$n,8648:qe,8649:$n,8650:qe,8651:yt,8652:yt,8653:ri,8654:ri,8655:ri,8666:ut,8667:ut,8669:[-.13313,.37788,0,0,1],8672:Dt,8674:Dt,8705:[0,.825,0,0,.5],8708:Vr,8709:Vt,8717:[0,.43056,0,0,.42917],8722:Hi,8724:[.08198,.69224,0,0,.77778],8726:Vt,8733:en,8736:We,8737:We,8738:[.03517,.52239,0,0,.72222],8739:li,8740:[.25142,.74111,0,0,.27778],8741:Ni,8742:[.25142,.74111,0,0,.5],8756:pt,8757:pt,8764:zt,8765:[-.13313,.37788,0,0,.77778],8769:zt,8770:da,8774:rr,8776:Sa,8778:Vt,8782:Bt,8783:Bt,8785:qn,8786:qn,8787:qn,8790:en,8791:tr,8796:[.08198,.91667,0,0,.77778],8806:nn,8807:nn,8808:jn,8809:jn,8812:[.25583,.75583,0,0,.5],8814:Lr,8815:Lr,8816:rr,8817:rr,8818:tr,8819:tr,8822:dr,8823:dr,8828:fr,8829:fr,8830:tr,8831:tr,8832:Lr,8833:Lr,8840:rr,8841:rr,8842:mt,8843:mt,8847:st,8848:st,8858:qn,8859:qn,8861:qn,8862:Ct,8863:Ct,8864:Ct,8865:Ct,8872:[0,.69224,0,0,.61111],8873:We,8874:[0,.69224,0,0,.88889],8876:Er,8877:Er,8878:nr,8879:nr,8882:st,8883:st,8884:fr,8885:fr,8888:[0,.54986,0,0,1.11111],8890:Wi,8891:fn,8892:fn,8901:[0,.54986,0,0,.27778],8903:Vt,8905:Vt,8906:Vt,8907:en,8908:en,8909:[-.03598,.46402,0,0,.77778],8910:Bn,8911:Bn,8912:st,8913:st,8914:hn,8915:hn,8916:pt,8918:vn,8919:vn,8920:xn,8921:xn,8922:Nn,8923:Nn,8926:fr,8927:fr,8928:rr,8929:rr,8934:hr,8935:hr,8936:hr,8937:hr,8938:Lr,8939:Lr,8940:rr,8941:rr,8994:tn,8995:tn,9416:[.15559,.69224,0,0,.90222],9484:Dn,9488:Dn,9492:Qr,9496:Qr,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Ct,9633:Ct,9650:Ur,9651:Ur,9654:st,9660:Ur,9661:Ur,9664:st,9674:Ai,9733:[.19444,.69224,0,0,.94445],10003:$i,10016:$i,10731:Ai,10846:[.19444,.75583,0,0,.61111],10877:fr,10878:fr,10885:nn,10886:nn,10887:mt,10888:mt,10889:gi,10890:gi,10891:qi,10892:qi,10901:fr,10902:fr,10933:jn,10934:jn,10935:gi,10936:gi,10937:gi,10938:gi,10949:nn,10950:nn,10955:xi,10956:xi,57350:li,57351:Ni,57352:Vt,57353:Gi,57356:jn,57357:jn,57358:qr,57359:rr,57360:rr,57361:qr,57366:jn,57367:jn,57368:jn,57369:jn,57370:mt,57371:mt},"Caligraphic-Regular":{32:ur,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:ur},"Fraktur-Regular":{32:ur,33:[0,.69141,0,0,.29574],34:Qt,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:vi,41:vi,42:[0,.62119,0,0,.27764],43:Zi,44:la,45:Zi,46:la,47:[.24982,.74947,0,0,.50181],48:ta,49:ta,50:ta,51:ii,52:ii,53:ii,54:Et,55:ii,56:Et,57:ii,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:wt,93:wt,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:ur,8216:Qt,8217:Qt,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:ur,33:[0,.69444,0,0,.35],34:Mt,35:[.19444,.69444,0,0,.95833],36:wn,37:[.05556,.75,0,0,.95833],38:Ir,39:Ar,40:mn,41:mn,42:[0,.75,0,0,.575],43:De,44:[.19444,.15556,0,0,.31944],45:Yc,46:[0,.15556,0,0,.31944],47:Hr,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,58:Fe,59:[.19444,.44444,0,0,.31944],60:vr,61:ir,62:vr,63:[0,.69444,0,0,.54305],64:Ir,65:Gr,66:[0,.68611,0,0,.81805],67:nt,68:[0,.68611,0,0,.88194],69:hs,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Wr,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:Ze,77:[0,.68611,0,0,1.09166],78:Wr,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:Gr,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:ni,92:Hr,93:ni,94:Ei,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:yi,99:Ti,100:yi,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:yi,105:Ar,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Ar,109:[0,.44444,0,0,.95833],110:pi,111:co,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:pi,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:Ti,123:Hr,124:ni,125:Hr,126:[.35,.34444,0,0,.575],160:ur,163:[0,.69444,0,0,.86853],168:Ei,172:[0,.44444,0,0,.76666],176:ze,177:De,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:De,216:[.04861,.73472,0,0,.89444],223:po,230:[0,.44444,0,0,.83055],247:De,248:[.09722,.54167,0,0,.575],305:Fe,338:[0,.68611,0,0,1.16944],339:Yn,567:[.19444,.44444,0,0,.35139],710:Ei,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Ei,715:Ei,728:Ei,729:Ar,730:ze,732:Ei,733:Ei,915:Ze,916:Pn,920:lt,923:ps,926:Br,928:Wr,931:nt,933:lt,934:nt,936:lt,937:nt,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Ar,8217:Ar,8220:Mt,8221:Mt,8224:an,8225:an,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:Qo,8465:un,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:un,8501:Ke,8592:Jn,8593:br,8594:Jn,8595:br,8596:Jn,8597:Hr,8598:Vn,8599:Vn,8600:Vn,8601:Vn,8636:Jn,8637:Jn,8640:Jn,8641:Jn,8656:Jn,8657:kn,8658:Jn,8659:kn,8660:Jn,8661:[.25,.75,0,0,.70277],8704:yi,8706:[0,.69444,.06389,0,.62847],8707:yi,8709:wn,8711:Pn,8712:zn,8715:zn,8722:De,8723:De,8725:Hr,8726:Hr,8727:At,8728:gr,8729:gr,8730:[.18,.82,0,0,.95833],8733:Yn,8734:[0,.44444,0,0,1.14999],8736:We,8739:ni,8741:Hr,8743:Xn,8744:Xn,8745:Xn,8746:Xn,8747:[.19444,.69444,.12778,0,.56875],8764:ir,8768:[.19444,.69444,0,0,.31944],8771:ar,8776:[.02444,.52444,0,0,.89444],8781:ar,8801:ar,8804:xr,8805:xr,8810:Re,8811:Re,8826:vr,8827:vr,8834:vr,8835:vr,8838:xr,8839:xr,8846:Xn,8849:xr,8850:xr,8851:Xn,8852:Xn,8853:De,8854:De,8855:De,8856:De,8857:De,8866:Ke,8867:Ke,8868:Ir,8869:Ir,8900:gr,8901:[-.02639,.47361,0,0,.31944],8902:At,8968:dt,8969:dt,8970:dt,8971:dt,8994:Gt,8995:Gt,9651:pn,9657:At,9661:pn,9667:At,9711:Vn,9824:Sn,9825:Sn,9826:Sn,9827:Sn,9837:[0,.75,0,0,.44722],9838:Kn,9839:Kn,10216:mn,10217:mn,10815:Wr,10927:xr,10928:xr,57376:_a},"Main-BoldItalic":{32:ur,33:[0,.69444,.11417,0,.38611],34:kr,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Rr,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:Tn,49:Tn,50:Tn,51:Tn,52:cn,53:Tn,54:Tn,55:cn,56:Tn,57:Tn,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Nr,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:Wn,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:Wn,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:Un,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:Zn,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:Zn,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:ur,168:[0,.69444,.11473,0,.59111],176:Yr,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:wr,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:wr,567:[.19444,.44444,.04611,0,.385],710:Un,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:Rr,730:Yr,732:Nr,733:Nr,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:Wn,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:Rr,8217:Rr,8220:[0,.69444,.16772,0,.62055],8221:kr},"Main-Italic":{32:ur,33:zr,34:wi,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:zr,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:ei,49:ei,50:ei,51:ei,52:ci,53:ei,54:ei,55:ci,56:ei,57:ei,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Fi,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:Fr,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:Fr,79:Ji,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:Fr,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:na,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:fi,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:fi,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:ur,168:[0,.66786,.10474,0,.51111],176:Xi,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:Oi,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:Oi,710:na,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:Xi,732:[0,.66786,.11585,0,.51111],733:Fi,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Ji,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Fr,931:[0,.68333,.12028,0,.71555],933:Qi,934:[0,.68333,.05986,0,.71555],936:Qi,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:zr,8217:zr,8220:[0,.69444,.1685,0,.51444],8221:wi,8463:Bi},"Main-Regular":{32:ur,33:zi,34:Mi,35:ql,36:Ga,37:Da,38:Ii,39:zi,40:Jr,41:Jr,42:ma,43:Vi,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ca,48:hi,49:hi,50:hi,51:hi,52:hi,53:hi,54:hi,55:hi,56:hi,57:hi,58:aa,59:[.19444,.43056,0,0,.27778],60:vn,61:zt,62:vn,63:za,64:Ii,65:Yi,66:[0,.68333,0,0,.70834],67:Aa,68:[0,.68333,0,0,.76389],69:Na,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Yi,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:$a,76:fa,77:[0,.68333,0,0,.91667],78:Yi,79:$a,80:Na,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Aa,85:Yi,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Yi,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:ea,92:ca,93:ea,94:Mi,95:[.31,.12056,.02778,0,.5],97:ti,98:Oa,99:ki,100:Oa,101:ki,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Oa,105:mi,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:zi,109:[0,.43056,0,0,.83334],110:ua,111:ti,112:Wi,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:ua,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:ki,123:ca,124:ea,125:ca,126:[.35,.31786,0,0,.5],160:ur,163:[0,.69444,0,0,.76909],167:wa,168:xa,172:[0,.43056,0,0,.66667],176:pa,177:Vi,182:Ja,184:Xl,198:[0,.68333,0,0,.90278],215:Vi,216:[.04861,.73194,0,0,.77778],223:Mi,230:[0,.43056,0,0,.72222],247:Vi,248:[.09722,.52778,0,0,.5],305:aa,338:[0,.68333,0,0,1.01389],339:_i,567:[.19444,.43056,0,0,.30556],710:Mi,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Mi,715:Mi,728:Mi,729:mi,730:pa,732:xa,733:Mi,915:fa,916:so,920:$a,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Yi,931:Aa,933:$a,934:Aa,936:$a,937:Aa,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:zi,8217:zi,8220:Mi,8221:Mi,8224:wa,8225:wa,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Bi,8465:Ma,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ma,8501:io,8592:ri,8593:Za,8594:ri,8595:Za,8596:ri,8597:ca,8598:ha,8599:ha,8600:ha,8601:ha,8614:[.011,.511,0,0,1],8617:ka,8618:ka,8636:ri,8637:ri,8640:ri,8641:ri,8652:[.011,.671,0,0,1],8656:ri,8657:Ja,8658:ri,8659:Ja,8660:ri,8661:[.25,.75,0,0,.61111],8704:Oa,8706:[0,.69444,.05556,.08334,.5309],8707:Oa,8709:Ga,8711:so,8712:Fa,8715:Fa,8722:Vi,8723:Vi,8725:ca,8726:ca,8727:ho,8728:Ca,8729:Ca,8730:[.2,.8,0,0,.83334],8733:_i,8734:lr,8736:We,8739:ea,8741:ca,8743:Ui,8744:Ui,8745:Ui,8746:Ui,8747:[.19444,.69444,.11111,0,.41667],8764:zt,8768:[.19444,.69444,0,0,.27778],8771:da,8773:[-.022,.589,0,0,1],8776:Sa,8781:da,8784:[-.133,.67,0,0,.778],8801:da,8804:mt,8805:mt,8810:Ka,8811:Ka,8826:vn,8827:vn,8834:vn,8835:vn,8838:mt,8839:mt,8846:Ui,8849:mt,8850:mt,8851:Ui,8852:Ui,8853:Vi,8854:Vi,8855:Vi,8856:Vi,8857:Vi,8866:io,8867:io,8868:Ii,8869:Ii,8872:[.249,.75,0,0,.867],8900:Ca,8901:[-.05555,.44445,0,0,.27778],8902:ho,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Oo,8969:Oo,8970:Oo,8971:Oo,8994:Ro,8995:Ro,9136:lo,9137:lo,9651:Ao,9657:ho,9661:Ao,9667:ho,9711:ha,9824:ra,9825:ra,9826:ra,9827:ra,9837:[0,.75,0,0,.38889],9838:Ri,9839:Ri,10216:Jr,10217:Jr,10222:lo,10223:lo,10229:[.011,.511,0,0,1.609],10230:Ta,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:Ta,10815:Yi,10927:mt,10928:mt,57376:_a},"Math-BoldItalic":{32:ur,48:co,49:co,50:co,51:ao,52:ao,53:ao,54:On,55:ao,56:On,57:ao,65:Gr,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:oa,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:hs,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:Qo,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Si,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:ur,915:[0,.68611,.15972,0,.65694],916:Pn,920:[0,.68611,.03194,0,.86722],923:ps,926:[0,.68611,.07458,0,.84125],928:oa,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Br,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:Si,960:[0,.44444,.03704,0,.68241],961:Ci,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:Ci,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:ur,48:ti,49:ti,50:ti,51:Di,52:Di,53:Di,54:hi,55:Di,56:hi,57:Di,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:Va,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Ha,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:Fo,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:ur,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ha,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Va,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:Fo,960:[0,.43056,.03588,0,.57003],961:Uo,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:Uo,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:ur,33:[0,.69444,0,0,.36667],34:Ko,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Ia,40:ls,41:ls,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:va,49:va,50:va,51:va,52:va,53:va,54:va,55:va,56:va,57:va,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:ul,64:Bo,65:Bo,66:Bo,67:As,68:cs,69:[0,.69444,0,0,.64167],70:io,71:Bo,72:cs,73:[0,.69444,0,0,.33056],74:ul,75:ms,76:Xa,77:[0,.69444,0,0,.97778],78:cs,79:cs,80:As,81:[.10556,.69444,0,0,.79445],82:As,83:io,84:Bo,85:ms,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Bo,89:[0,.69444,.0275,0,.73334],90:go,91:zo,93:zo,94:va,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Ts,99:[0,.45833,0,0,.48889],100:Ts,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Ts,105:Is,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Is,109:[0,.45833,0,0,.86667],110:oo,111:[0,.45833,0,0,.55],112:qs,113:qs,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:oo,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:ur,168:va,176:Bo,180:va,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:va,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:va,729:Ia,730:Bo,732:va,733:va,915:Xa,916:[0,.69444,0,0,.91667],920:yo,923:go,926:Bo,928:cs,931:cs,933:yo,934:cs,936:yo,937:cs,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ia,8217:Ia,8220:Ko,8221:Ko},"SansSerif-Italic":{32:ur,33:[0,.69444,.05733,0,.31945],34:yc,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:Ds,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:Ho,45:[0,.44444,.01946,0,.33333],46:es,47:[.25,.75,.13164,0,.5],48:wo,49:wo,50:wo,51:wo,52:wo,53:wo,54:wo,55:wo,56:wo,57:wo,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:Ra,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:xs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:is,77:[0,.69444,.08094,0,.875],78:xs,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:Yl,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:ur,168:[0,.67937,.06385,0,.5],176:vc,184:Xl,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Yl,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Xc,715:Mi,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:vc,732:[0,.67659,.08826,0,.5],733:Xc,915:[0,.69444,.13372,0,.54167],916:qc,920:[0,.69444,.07555,0,.77778],923:io,926:[0,.69444,.12816,0,.66667],928:xs,931:[0,.69444,.11983,0,.72222],933:Ks,934:[0,.69444,.04603,0,.72222],936:Ks,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ds,8217:Ds,8220:[0,.69444,.14205,0,.5],8221:yc},"SansSerif-Regular":{32:ur,33:[0,.69444,0,0,.31945],34:Mi,35:ql,36:Ga,37:Da,38:[0,.69444,0,0,.75834],39:zi,40:Jr,41:Jr,42:ma,43:Vi,44:Ho,45:[0,.44444,0,0,.33333],46:es,47:ca,48:ga,49:ga,50:ga,51:ga,52:ga,53:ga,54:ga,55:ga,56:ga,57:ga,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:za,64:Ra,65:Ra,66:Ra,67:yi,68:[0,.69444,0,0,.72223],69:po,70:[0,.69444,0,0,.56945],71:Ra,72:Hs,73:zi,74:za,75:[0,.69444,0,0,.69445],76:is,77:[0,.69444,0,0,.875],78:Hs,79:[0,.69444,0,0,.73611],80:yi,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Oa,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:Ra,89:[0,.69444,.025,0,.66667],90:io,91:gs,93:gs,94:Mi,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Jl,99:jd,100:Jl,101:jd,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Jl,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:ju,111:[0,.44444,0,0,.5],112:Zd,113:Zd,114:[0,.44444,.01389,0,.34167],115:Yc,116:[0,.57143,0,0,.36111],117:ju,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:ur,168:[0,.67937,0,0,.5],176:Ra,184:Xl,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Mi,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Mi,715:Mi,728:Mi,729:[0,.67937,0,0,.27778],730:Ra,732:[0,.67659,0,0,.5],733:Mi,915:is,916:qc,920:Ii,923:io,926:Ra,928:Hs,931:Ma,933:Ii,934:Ma,936:Ii,937:Ma,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:zi,8217:zi,8220:Mi,8221:Mi},"Script-Regular":{32:ur,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:ur},"Size1-Regular":{32:ur,40:Vd,41:Vd,47:Jc,91:Qc,92:Jc,93:Qc,123:Zu,125:Zu,160:ur,710:bc,732:bc,770:bc,771:bc,8214:[-99e-5,.601,0,0,.77778],8593:eu,8595:eu,8657:Vu,8659:Vu,8719:Ql,8720:Ql,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:xc,8748:Gd,8749:Gd,8750:xc,8896:jo,8897:jo,8898:jo,8899:jo,8968:Pl,8969:Pl,8970:Pl,8971:Pl,9168:uu,10216:Pl,10217:Pl,10752:Gu,10753:Gu,10754:Gu,10756:jo,10758:jo},"Size2-Regular":{32:ur,40:Xu,41:Xu,47:vs,91:ja,92:vs,93:ja,123:Ms,125:Ms,160:ur,710:Ps,732:Ps,770:Ps,771:Ps,8719:Js,8720:Js,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:tu,8748:Yu,8749:Yu,8750:tu,8896:Ol,8897:Ol,8898:Ol,8899:Ol,8968:nu,8969:nu,8970:nu,8971:nu,10216:ru,10217:ru,10752:Rl,10753:Rl,10754:Rl,10756:Ol,10758:Ol},"Size3-Regular":{32:ur,40:qu,41:qu,47:iu,91:Qs,92:iu,93:Qs,123:wc,125:wc,160:ur,710:Sc,732:Sc,770:Sc,771:Sc,8730:[.95003,1.45,0,0,1],8968:au,8969:au,8970:au,8971:au,10216:wc,10217:wc},"Size4-Regular":{32:ur,40:Cc,41:Cc,47:ou,91:Ju,92:ou,93:Ju,123:su,125:su,160:ur,710:Ec,732:Ec,770:Ec,771:Ec,8730:[1.25003,1.75,0,0,1],8968:lu,8969:lu,8970:lu,8971:lu,9115:cu,9116:Mc,9117:cu,9118:cu,9119:Mc,9120:cu,9121:du,9122:uu,9123:du,9124:du,9125:uu,9126:du,9127:Xd,9128:Qu,9129:Bl,9130:[0,.3,0,0,.88889],9131:Xd,9132:Qu,9133:Bl,9143:[.88502,.915,0,0,1.05556],10216:su,10217:su,57344:fu,57345:fu,57680:$l,57681:$l,57682:$l,57683:$l},"Typewriter-Regular":{32:kc,33:ui,34:ui,35:ui,36:ws,37:ws,38:ui,39:ui,40:ws,41:ws,42:[0,.52083,0,0,.525],43:ed,44:[.13889,.125,0,0,.525],45:ed,46:[0,.125,0,0,.525],47:ws,48:ui,49:ui,50:ui,51:ui,52:ui,53:ui,54:ui,55:ui,56:ui,57:ui,58:as,59:[.13889,.43056,0,0,.525],60:Yd,61:[-.19549,.41562,0,0,.525],62:Yd,63:ui,64:ui,65:ui,66:ui,67:ui,68:ui,69:ui,70:ui,71:ui,72:ui,73:ui,74:ui,75:ui,76:ui,77:ui,78:ui,79:ui,80:ui,81:[.13889,.61111,0,0,.525],82:ui,83:ui,84:ui,85:ui,86:ui,87:ui,88:ui,89:ui,90:ui,91:ws,92:ws,93:ws,94:ui,95:[.09514,0,0,0,.525],96:ui,97:as,98:ui,99:as,100:ui,101:as,102:ui,103:To,104:ui,105:ui,106:[.22222,.61111,0,0,.525],107:ui,108:ui,109:as,110:as,111:as,112:To,113:To,114:as,115:as,116:[0,.55358,0,0,.525],117:as,118:as,119:as,120:as,121:To,122:as,123:ws,124:ws,125:ws,126:ui,127:ui,160:kc,176:ui,184:[.19445,0,0,0,.525],305:as,567:To,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:ui,715:ui,728:ui,730:ui,770:ui,771:ui,776:ui,915:ui,916:ui,920:ui,923:ui,926:ui,928:ui,931:ui,933:ui,934:ui,936:ui,937:ui,8216:ui,8217:ui,8242:ui,9251:[.11111,.21944,0,0,.525]}},Jd=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,Nl=10,os=.25,hu=1.2,el=.431,td={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[el,el,el],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[os,os,os],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},pu=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dl=5,nd={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function tl(a,y){a===void 0&&(a=77);const b=qd[y][a];if(b)return{defaultMetrics:!1,depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]};if(a===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const E=String.fromCodePoint(a);if(E in nd)a=nd[E].codePointAt(0);else if(Jd.test(E))return a=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var mu={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Fl={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Qd={doubleleftarrow:`M262 157
|
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
|
|
|
c -179 0 -524 -115 -524 -115
|
|
|
c -5 -1 -9 -5 -9 -10
|
|
|
c 0 -1 1 -2 1 -3
|
|
|
l 4 -22
|
|
|
c 1 -5 5 -9 11 -9
|
|
|
h 2
|
|
|
s 338 93 512 92
|
|
|
c 174 0 513 -92 513 -92
|
|
|
h 2
|
|
|
c 5 0 9 4 11 9
|
|
|
l 5 22
|
|
|
c 1 6 -2 12 -8 13
|
|
|
c 0 0 -342 115 -520 115
|
|
|
z
|
|
|
`,leftgroup:`M400000 80
|
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function ec(a){if(Fl[a]){const[be,Me,Ne]=Fl[a],et=`<span class="stretchy" style="height:${Ne}em"><svg width="100%" height="${Ne}em" viewBox="0 0 ${be} ${Me}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Qd[a]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*Ne/2)/100}em;min-width:0">${et}</span>`}const[y,b,E,ee]=mu[a];let re,ae;const fe=E/1e3;y.length===3?(re=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],ae=["xMinYMin","xMidYMin","xMaxYMin"]):y.length===2?(re=["slice-1-of-2","slice-2-of-2"],ae=["xMinYMin","xMaxYMin"]):(re=["slice-1-of-1"],ae=[ee]);const ge=y.map((be,Me)=>`<span class="${re[Me]}" style=height:${fe}em><svg width=400em height=${fe}em viewBox="0 0 400000 ${E}" preserveAspectRatio="${ae[Me]} slice"><path fill="currentcolor" d="${Qd[be]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${fe}em;min-width:${b}em;">${ge}</span>`}function ef(a){return mu[a]?mu[a][2]/1e3:Fl[a][2]}function tf(a){const y=[];for(let b=0;b<a.length;b++){let E=a.charCodeAt(b);if(E===13&&a.charCodeAt(b+1)===10&&(E=10,b++),(E===13||E===12)&&(E=10),E===0&&(E=65533),E>=55296&&E<=56319){const ee=a.charCodeAt(b+1);if(ee>=56320&&ee<=57343){const re=E-55296,ae=ee-56320;E=Dl(2,16)+re*Dl(2,10)+ae,b++}}y.push(E)}return y}var _c=8205,Lc=[[_c,1],[65038,2],[127995,5],[129456,4],[917536,96]],fl,tc=[127462,127487];function nc(a){var y;if(fl===void 0){fl={};for(const b of Lc)for(let E=b[0];E<=b[0]+b[1]-1;E++)fl[E]=!0}return(y=fl[a])!=null?y:!1}function nf(a){return a>=tc[0]&&a<=tc[1]}function rf(a){if(/^[\u0020-\u00FF]*$/.test(a))return a;const y=[],b=tf(a);let E=0;for(;E<b.length;){const ee=b[E++],re=b[E];if(re===_c){const ae=E-1;for(E+=2;b[E]===_c;)E+=2;y.push(String.fromCodePoint(...b.slice(ae,E-ae+1)))}else if(nc(re)){const ae=E-1;for(;nc(b[E]);)E+=b[E]===_c?2:1;y.push(String.fromCodePoint(...b.slice(ae,2*E-ae-1)))}else nf(ee)?(E+=1,y.push(String.fromCodePoint(...b.slice(E-2,2)))):y.push(String.fromCodePoint(ee))}return y}var af=class{constructor(a){this.obeyspaces=!1,this.pos=0,this.s=rf(a)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(a){const y=typeof this.s=="string"?a.exec(this.s.slice(this.pos)):a.exec(this.s.slice(this.pos).join(""));return y!=null&&y[0]?(this.pos+=y[0].length,y[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const a=this.get();if(a==="\\"){if(!this.end()){let y=this.match(/^[a-zA-Z\*]+/);return y?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):y=this.get(),"\\"+y}}else{if(a==="{")return"<{>";if(a==="}")return"<}>";if(a==="^"){if(this.peek()==="^"){this.get();const y=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(y)return String.fromCodePoint(Number.parseInt(y.slice(y.lastIndexOf("^")+1),16))}return a}else if(a==="#"){if(!this.end()){let y=!1;if(/[\d?@]/.test(this.peek())&&(y=!0,this.pos+1<this.s.length)){const b=this.s[this.pos+1];y=/[^\dA-Za-z]/.test(b)}return y?"#"+this.get():"#"}}else if(a==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return a}};function hl(a,y){var b,E,ee,re;const ae=[];let fe=a.next();if(fe&&fe!=="\\relax"){if(fe==="\\noexpand")fe=a.next(),fe&&ae.push(fe);else if(fe==="\\obeyspaces")a.obeyspaces=!0;else if(fe==="\\bgroup")ae.push("<{>");else if(fe==="\\egroup")ae.push("<}>");else if(fe==="\\string"){if(fe=a.next(),fe)if(fe.startsWith("\\"))for(const ge of fe)ae.push(ge==="\\"?"\\backslash":ge);else fe==="<{>"?ae.push("\\{"):fe==="<space>"?ae.push("~"):fe==="<}>"&&ae.push("\\}")}else if(fe==="\\csname"){for(;a.peek()==="<space>";)a.next();let ge="",be=!1,Me=[];do{if(Me.length===0)if(/^#[\d?@]$/.test(a.peek())){const Ne=a.get().slice(1);Me=nl((E=(b=y==null?void 0:y(Ne))!=null?b:y==null?void 0:y("?"))!=null?E:"\\placeholder{}",y),fe=Me[0]}else fe=a.next(),Me=fe?[fe]:[];be=Me.length===0,!be&&fe==="\\endcsname"&&(be=!0,Me.shift()),be||(be=fe==="<$>"||fe==="<$$>"||fe==="<{>"||fe==="<}>"||typeof fe=="string"&&fe.length>1&&fe.startsWith("\\")),be||(ge+=Me.shift())}while(!be);ge&&ae.push("\\"+ge),ae.push(...Me)}else if(fe!=="\\endcsname")if(fe.length>1&&fe.startsWith("#")){const ge=fe.slice(1);ae.push(...nl((re=(ee=y==null?void 0:y(ge))!=null?ee:y==null?void 0:y("?"))!=null?re:"\\placeholder{}",y))}else ae.push(fe)}return ae}function nl(a,y=null){const b=[];let E="";for(const ae of a.toString().split(/\r?\n/)){E&&b.push(E),E=" ";const fe=ae.match(/((?:\\%)|[^%])*/);fe!==null&&b.push(fe[0])}const ee=new af(Ge(b.join(""))),re=[];do re.push(...hl(ee,y));while(!ee.end());return re}function ya(a){let y="";const b=[];for(const E of a)E&&(y&&/^[a-zA-Z\*]/.test(E)&&b.push(y),b.push(E),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(E)&&b.push(" "),y=/\\[a-zA-Z]+\*?$/.test(E)?" ":"");return b.join("")}function uo(a,...y){return console.assert(a.startsWith("\\")),y.length===0?a:ya([a,...y.map(b=>`{${b}}`)])}function pl(a){return ya(a.map(y=>{var b;return(b={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[y])!=null?b:y}))}var of=class Ud{constructor(y){Ud._registry[y]=this}static createAtom(y,b,E){return Ud._registry[y].createAtom(b,Ht(b,y),E)}static serialize(y,b){var E;if(!y||y.length===0)return"";if((E=b.skipStyles)!=null&&E){const ee=[];for(const re of sf(y)){const ae=Ud._registry[re[0].mode];ee.push(...ae.serialize(re,b))}return ya(ee)}return ya(th(y,b))}static getFont(y,b,E){return Ud._registry[y].getFont(b,E)}};of._registry={};var Ss=of;function sf(a){const y=[];let b=[],E="NONE";for(const ee of a)ee.type!=="first"&&(ee.mode!==E?(b.length>0&&y.push(b),b=[ee],E=ee.mode):b.push(ee));return b.length>0&&y.push(b),y}function Mo(a,y){const b=[];let E=[],ee;for(const re of a)if(re.type!=="first"&&re.style){let ae;y==="variant"?(ae=re.style.variant,re.style.variantStyle&&re.style.variantStyle!=="up"&&(ae+="-"+re.style.variantStyle)):ae=re.style[y],ae===ee?E.push(re):(E.length>0&&b.push(E),E=[re],ee=ae)}return E.length>0&&b.push(E),b}function rd(a,y){var b;const{parent:E}=a[0],ee=E==null?void 0:E.computedStyle.color,re=[];for(const ae of sf(a)){const fe=y.defaultMode;for(const ge of Mo(ae,"color")){const be=ge[0].computedStyle,Me=Ss._registry[ge[0].mode].serialize(ge,me(xe({},y),{defaultMode:fe==="text"?"text":"math"}));!y.skipStyles&&be.color&&be.color!=="none"&&(!E||ee!==be.color)?re.push(uo("\\textcolor",(b=be.verbatimColor)!=null?b:be.color,ya(Me))):re.push(ya(Me))}}return re}function eh(a,y){const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.backgroundColor;return Mo(a,"backgroundColor").map(ee=>{var re;if(ee.length>0||ee[0].type!=="box"){const ae=ee[0].computedStyle;if(ae.backgroundColor&&ae.backgroundColor!=="none"&&(!b||E!==ae.backgroundColor))return uo("\\colorbox",(re=ae.verbatimBackgroundColor)!=null?re:ae.backgroundColor,ya(rd(ee,me(xe({},y),{defaultMode:"text"}))))}return ya(rd(ee,y))})}function th(a,y){if(a.length===0)return[];const{parent:b}=a[0],E=b==null?void 0:b.computedStyle.fontSize,ee=[];for(const re of Mo(a,"fontSize")){const ae=re[0].computedStyle.fontSize,fe=eh(re,y);fe&&(ae&&ae!=="auto"&&(!b||E!==ae)?ee.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][ae],...fe):ee.push(...fe))}return ee}function id(a){return a?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[a]:void 0}function rc(a){if(a.length===0)return"ord";const y=id(a[0].type),b=id(a[a.length-1].type);return y&&y===b?y:"ord"}function ic(a,y){if(typeof a=="string")return a;if(typeof a=="number"){console.assert(Number.isFinite(a));const b=Math.ceil(100*a)/100;return b===0?"0":b.toString()+(y!=null?y:"")}return""}var Dr=class Ep{constructor(y,b){var E,ee,re,ae,fe;if(typeof y=="number"?this.value=String.fromCodePoint(y):typeof y=="string"?this.value=y:Oe(y)?this.children=y.filter(be=>be!==null):y&&y instanceof Ep&&(this.children=[y]),this.children)for(const be of this.children)be.parent=this;this.type=(E=b==null?void 0:b.type)!=null?E:"ignore",this.isSelected=(b==null?void 0:b.isSelected)===!0,b!=null&&b.caret&&(this.caret=b.caret),this.classes=(ee=b==null?void 0:b.classes)!=null?ee:"",this.isTight=(re=b==null?void 0:b.isTight)!=null?re:!1,b!=null&&b.attributes&&(this.attributes=b.attributes);let ge=b==null?void 0:b.fontFamily;b!=null&&b.style&&this.value&&(ge=(fe=Ss.getFont((ae=b.mode)!=null?ae:"math",this,me(xe({variant:"normal"},b.style),{letterShapeStyle:b.letterShapeStyle})))!=null?fe:void 0),ge||(ge="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(b==null?void 0:b.maxFontSize)!==void 0&&(this.maxFontSize=b.maxFontSize),Ac(this,ge)}set atomID(y){y===void 0||y.length===0||(this.id=y)}selected(y){if(this.isSelected!==y&&(this.isSelected=y,this.children))for(const b of this.children)b.selected(y)}setStyle(y,b,E){if(b===void 0)return;const ee=ic(b,E);ee.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[y]=ee)}setTop(y){Number.isFinite(y)&&Math.abs(y)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=ic(y,"em"),this.height-=y,this.depth+=y)}get left(){var y;return(y=this.cssProperties)!=null&&y["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=ic(y,"em")))}set right(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=ic(y,"em")))}set bottom(y){Number.isFinite(y)&&(y===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=ic(y,"em")))}get width(){return this._width*this.scale}set width(y){this._width=y,this.hasExplicitWidth=!0}set softWidth(y){}get height(){return this._height*this.scale}set height(y){this._height=y}get depth(){return this._depth*this.scale}set depth(y){this._depth=y}wrap(y){const b=y.parent;if(!b)return this;y.isPhantom&&this.setStyle("opacity",0);const E=y.color;E&&E!==b.color&&this.setStyle("color",E);let ee=y.backgroundColor;this.isSelected&&(ee=or(ee)),ee&&ee!==b.backgroundColor&&(this.setStyle("background-color",ee),this.setStyle("display","inline-block"));const re=y.scalingFactor;return this.scale=re,this.skew*=re,this.italic*=re,this}toMarkup(){var y,b,E,ee;let re=(y=this.value)!=null?y:"";if(this.children)for(const xt of this.children)re+=xt.toMarkup();let ae="";if(this.svgBody)ae=ec(this.svgBody);else if(this.svgOverlay){ae='<span style="',ae+="display: inline-block;",ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,ae+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,ae+='">',ae+=re,ae+="</span>",ae+='<svg style="position:absolute;overflow:visible;',ae+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const xt=(b=this.cssProperties)==null?void 0:b.padding;xt?(ae+=`top:${xt};`,ae+=`left:${xt};`,ae+=`width:calc(100% - 2 * ${xt} );`):ae+="top:0;left:0;width:100%;",ae+="z-index:2;",ae+='"',this.svgStyle&&(ae+=this.svgStyle),ae+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,ae+=`>${this.svgOverlay}</svg>`}let fe="";const ge=this.classes.split(" ");ge.push((E={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?E:""),this.caret==="latex"&&ge.push("ML__latex-caret"),this.isSelected&&ge.push("ML__selected");const be=ge.length===1?ge[0]:ge.filter((xt,It,In)=>xt.length>0&&In.indexOf(xt)===It).join(" ");if(be.length>0&&(fe+=` class="${be}"`),this.id&&(fe+=` data-atom-id=${this.id}`),this.cssId&&(fe+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(fe+=" "+Object.keys(this.attributes).map(xt=>`${xt}="${this.attributes[xt]}"`).join(" ")),this.htmlData){const xt=this.htmlData.split(",");for(const It of xt){const In=It.match(/([^=]+)=(.+$)/);if(In){const _r=In[1].trim().replace(/ /g,"-");_r&&(fe+=` data-${_r}="${In[2]}" `)}else{const _r=It.trim().replace(/ /g,"-");_r&&(fe+=` data-${_r} `)}}}const Me=(ee=this.cssProperties)!=null?ee:{};this.hasExplicitWidth&&Me.width===void 0&&(Me.width=`${Math.ceil(this._width*100)/100}em`);const Ne=Object.keys(Me).map(xt=>`${xt}:${Me[xt]}`);if(this.scale!==void 0&&this.scale!==1&&(re.length>0||ae.length>0)&&Ne.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const xt=this.htmlStyle.split(";");let It="";for(const In of xt){const _r=In.match(/([^=]+):(.+$)/);if(_r){const Ln=_r[1].trim().replace(/ /g,"-");Ln&&(It+=`${Ln}:${_r[2]};`)}}It&&(fe+=` style="${It}"`)}Ne.length>0&&(fe+=` style="${Ne.join(";")}"`);let et="";return fe.length>0||ae.length>0?et=`<span${fe}>${re}${ae}</span>`:et=re,this.caret==="text"?et+='<span class="ML__text-caret"></span>':this.caret==="math"&&(et+='<span class="ML__caret"></span>'),et}tryCoalesceWith(y){if(this.svgBody||!this.value||y.svgBody||!y.value)return!1;const b=this.children&&this.children.length>0,E=y.children&&y.children.length>0;if(b||E)return!1;if(y.cssProperties||this.cssProperties){for(const ge of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(y.cssProperties&&ge in y.cssProperties||this.cssProperties&&ge in this.cssProperties)return!1}const ee=this.cssProperties?Object.keys(this.cssProperties).length:0,re=y.cssProperties?Object.keys(y.cssProperties).length:0;if(ee!==re)return!1;if(ee>0){for(const ge of Object.keys(this.cssProperties))if(this.cssProperties[ge]!==y.cssProperties[ge])return!1}const ae=this.classes.trim().replace(/\s+/g," ").split(" "),fe=y.classes.trim().replace(/\s+/g," ").split(" ");if(ae.length!==fe.length)return!1;ae.sort(),fe.sort();for(const[ge,be]of ae.entries())if(be==="vertical-separator"||be!==fe[ge])return!1;return this.value+=y.value,this.height=Math.max(this.height,y.height),this.depth=Math.max(this.depth,y.depth),this._width=this._width+y._width,this.maxFontSize=Math.max(this.maxFontSize,y.maxFontSize),this.italic=y.italic,!0}};function ad(a){if(!a||a.length===0)return[];a[0].children=ad(a[0].children);const y=[a[0]];for(let b=1;b<a.length;b++)y[y.length-1].tryCoalesceWith(a[b])||(a[b].children=ad(a[b].children),y.push(a[b]));return y}function gu(a){return a.children&&(a.children=ad(a.children)),a}function vu(a,y){if(!a)return new Dr(null,y);const b=new Dr(null,{classes:"ML__strut",type:"ignore"});b.setStyle("height",Math.max(0,a.height),"em");const E=[b];if(a.depth!==0){const ee=new Dr(null,{classes:"ML__strut--bottom",type:"ignore"});ee.setStyle("height",a.height+a.depth,"em"),ee.setStyle("vertical-align",-a.depth,"em"),E.push(ee)}return E.push(a),new Dr(E,me(xe({},y),{type:"lift"}))}function Os(a){const y=ef(a)/2,b=new Dr(null,{maxFontSize:0});return b.height=y+.166,b.depth=y-.166,b.svgBody=a,b}function Ac(a,y){var b;if(a.type==="latex"){a.height=.9,a.depth=.2,a._width=1;return}if(a.value){a.height=-1/0,a.depth=-1/0,a._width=0,a.skew=-1/0,a.italic=-1/0;for(let E=0;E<a.value.length;E++){const ee=tl(a.value.codePointAt(E),y);a.height=Math.max(a.height,ee.height),a.depth=Math.max(a.depth,ee.depth),a._width+=ee.width,a.skew=ee.skew,a.italic=ee.italic}return}if(a.children&&a.children.length>0){let E=-1/0,ee=-1/0,re=0;for(const ae of a.children)ae.height>E&&(E=ae.height),ae.depth>ee&&(ee=ae.depth),re=Math.max(re,(b=ae.maxFontSize)!=null?b:0);a.height=E,a.depth=ee,a._width=a.children.reduce((ae,fe)=>ae+fe.width,0),a.maxFontSize=re}}function yu(a){if("individualShift"in a){const y=a.individualShift;let b=y[0];const E=[b],ee=-b.shift-b.box.depth;let re=ee;for(let ae=1;ae<y.length;ae++){const fe=y[ae],ge=-fe.shift-re-fe.box.depth,be=ge-(b.box.height+b.box.depth);re=re+ge,E.push(be),E.push(fe),b=fe}return[E,ee]}if("top"in a){let y=a.top;for(const b of a.children)y-=typeof b=="number"?b:b.box.height+b.box.depth;return[a.children,y]}else{if("bottom"in a)return[a.children,-a.bottom];if("firstBaseline"in a){const y=a.firstBaseline[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.firstBaseline,-y.box.depth]}else if("shift"in a){const y=a.children[0];if(typeof y=="number")throw new Error("First child must be an element.");return[a.children,-y.box.depth-a.shift]}}return[null,0]}function Tc(a){var y;const[b,E]=yu(a);if(!b)return[[],0,0];const ee=new Dr(null,{classes:"pstrut"});let re=0;for(const It of b)if(typeof It!="number"){const In=It.box;re=Math.max(re,In.maxFontSize,In.height)}re+=2,ee.height=re,ee.setStyle("height",re,"em");const ae=[];let fe=E,ge=E,be=E,Me=0;for(const It of b){if(typeof It=="number")be+=It;else{const In=It.box,_r=(y=It.classes)!=null?y:[],Ln=new Dr([ee,In],{classes:_r.join(" "),style:It.style});In.setStyle("height",In.height+In.depth,"em"),In.setStyle("display","inline-block"),Ln.setStyle("top",-re-be-In.depth,"em"),It.marginLeft&&Ln.setStyle("margin-left",It.marginLeft,"em"),It.marginRight&&Ln.setStyle("margin-right",It.marginRight,"em"),ae.push(Ln),be+=In.height+In.depth,Me=Math.max(Me,Ln.width)}fe=Math.min(fe,be),ge=Math.max(ge,be)}ae.forEach(It=>{It.softWidth=Me});const Ne=new Dr(ae,{classes:"vlist"});if(Ne.softWidth=Me,Ne.height=ge,Ne.setStyle("height",ge,"em"),fe>=0)return[[new Dr(Ne,{classes:"vlist-r"})],ge,-fe];const et=new Dr(new Dr(null),{classes:"vlist"});et.height=-fe,et.setStyle("height",-fe,"em");const xt=new Dr(8203,{classes:"vlist-s",maxFontSize:0});return xt.softWidth=0,xt.height=0,xt.depth=0,[[new Dr([Ne,xt],{classes:"vlist-r"}),new Dr(et,{classes:"vlist-r"})],ge,-fe]}var Qa=class extends Dr{constructor(a,y){var b;const[E,ee,re]=Tc(a);super(E.length===1?E[0]:E,{type:y==null?void 0:y.type,classes:((b=y==null?void 0:y.classes)!=null?b:"")+" vlist-t"+(E.length===2?" vlist-t2":"")}),this.height=ee,this.depth=re,this.softWidth=E.reduce((ae,fe)=>Math.max(ae,fe.width),0)}};function nh(a,y){var b,E,ee,re,ae;const fe=a.metrics,ge=new Dr(y.base),be=(b=y.baseShift)!=null?b:0,Me=(E=y.slant)!=null?E:0;let Ne=0,et=0;y.above&&(Ne=(ee=y.aboveShift)!=null?ee:Math.max(fe.bigOpSpacing1,fe.bigOpSpacing3-y.above.depth)),y.below&&(et=(re=y.belowShift)!=null?re:Math.max(fe.bigOpSpacing2,fe.bigOpSpacing4-y.below.height));let xt=null;if(y.below&&y.above){const It=fe.bigOpSpacing5+y.below.height+y.below.depth+et+ge.depth+be;xt=new Qa({bottom:It,children:[fe.bigOpSpacing5,{box:y.below,marginLeft:-Me,classes:["ML__center"]},et,{box:ge,classes:["ML__center"]},Ne,{box:y.above,marginLeft:Me,classes:["ML__center"]},fe.bigOpSpacing5]}).wrap(a)}else if(y.below&&!y.above)xt=new Qa({top:ge.height-be,children:[fe.bigOpSpacing5,{box:y.below,marginLeft:-Me,classes:["ML__center"]},et,{box:ge,classes:["ML__center"]}]}).wrap(a);else if(!y.below&&y.above){const It=ge.depth+be;xt=new Qa({bottom:It,children:[{box:ge,classes:["ML__center"]},Ne,{box:y.above,marginLeft:Me,classes:["ML__center"]},fe.bigOpSpacing5]}).wrap(a)}else{const It=ge.depth+be;xt=new Qa({bottom:It,children:[{box:ge},fe.bigOpSpacing5]}).wrap(a)}return new Dr(xt,{type:(ae=y.type)!=null?ae:"op"})}var od=7,rl=6,Ic=5,ml=4,zl=3,ss=2,ks=1,Zo=0,Ws=class{constructor(a,y,b){this.id=a,this.sizeDelta=y,this.cramped=b;const E={"-4":2,"-3":1,0:0}[y];this.metrics=Object.keys(td).reduce((ee,re)=>me(xe({},ee),{[re]:td[re][E]}),{})}getFontSize(a){return Math.max(1,a+this.sizeDelta)}get sup(){return Us[[Zo,ks,Zo,ks,ss,zl,ss,zl][this.id]]}get sub(){return Us[[Zo,Zo,Zo,Zo,ss,ss,ss,ss][this.id]]}get fracNum(){return Us[[Zo,ks,Zo,ks,ss,zl,ml,Ic][this.id]]}get fracDen(){return Us[[Zo,Zo,Zo,Zo,ss,ss,ml,ml][this.id]]}get cramp(){return Us[[Zo,Zo,ss,ss,ml,ml,rl,rl][this.id]]}get isTight(){return this.sizeDelta<0}},Kl={7:new Ws(od,0,!1),6:new Ws(rl,0,!0),5:new Ws(Ic,0,!1),4:new Ws(ml,0,!0),3:new Ws(zl,-3,!1),2:new Ws(ss,-3,!0),1:new Ws(ks,-4,!1),0:new Ws(Zo,-4,!0)},Us=me(xe({},Kl),{displaystyle:Kl[od],textstyle:Kl[Ic],scriptstyle:Kl[zl],scriptscriptstyle:Kl[ks]});function ac(a,y){var b;if(!a)return 0;const E={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:Nl,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(b=a.unit)!=null?b:"pt"];if(Number.isFinite(y)){const ee=Dl(10,y);return Math.round(a.dimension/Nl*E*ee)/ee}return a.dimension*E}function sd(a,y){if(a===null)return 0;const b=ac(a)/Nl;if(Number.isFinite(y)){const E=Dl(10,y);return Math.round(b*E)/E}return b}function ld(a){var y;return`${a.dimension}${(y=a.unit)!=null?y:"pt"}`}function lf(a){let y=ld(a.glue);return a.grow&&a.grow.dimension!==0&&(y+=` plus ${ld(a.grow)}`),a.shrink&&a.shrink.dimension!==0&&(y+=` minus ${ld(a.shrink)}`),y}function Io(a){var y,b;if(a==null)return null;let E="";if("dimension"in a&&(E=`${a.dimension}${(y=a.unit)!=null?y:"pt"}`),"glue"in a&&(E=lf(a)),"number"in a)if(!("base"in a)||a.base==="decimal")E=Number(a.number).toString();else if(a.base==="alpha")E=`\`${String.fromCodePoint(a.number)}`;else{const ee=Math.round(a.number)>>>0;a.base==="hexadecimal"?(E=Number(ee).toString(16).toUpperCase(),ee<=255?E=E.padStart(2,"0"):ee<=65535?E=E.padStart(4,"0"):ee<=16777215?E=E.padStart(6,"0"):E=E.padStart(8,"0"),E=`"${E}`):a.base==="octal"&&(E=Number(ee).toString(8),ee<=63?E=E.padStart(2,"0"):ee<=30583?E=E.padStart(4,"0"):E=E.padStart(8,"0"),E=`'${E}`)}return"register"in a&&("factor"in a&&(a.factor===-1?E="-":a.factor!==1&&(E=Number(a.factor).toString())),"global"in a&&a.global&&(E+="\\global"),E+=`\\${a.register}`),"string"in a&&(E=a.string),(b=a.relax)!=null&&b&&(E+="\\relax"),E}function js(a,y){return a==null?null:"number"in a?me(xe({},a),{number:a.number*y}):"register"in a?"factor"in a&&a.factor?me(xe({},a),{factor:a.factor*y}):me(xe({},a),{factor:y}):"dimension"in a?me(xe({},a),{dimension:a.dimension*y}):"glue"in a?a.shrink&&a.grow?{glue:js(a.glue,y),shrink:js(a.shrink,y),grow:js(a.grow,y)}:a.shrink?{glue:js(a.glue,y),shrink:js(a.shrink,y)}:a.grow?{glue:js(a.glue,y),grow:js(a.grow,y)}:{glue:js(a.glue,y)}:null}var rh={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function oc(){return xe({},rh)}function bu(){return{registers:oc(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:tt.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:kt,backgroundColorMap:Xe,getMacro:a=>Fn(a,cr())}}var La=class Mp{constructor(y,b){var E,ee,re,ae,fe,ge,be,Me,Ne,et,xt,It,In,_r,Ln;let sr;y!=null&&y.parent?(this.parent=y.parent,sr=y.parent,this.registers={}):(sr=xe(xe({},bu()),(E=y==null?void 0:y.from)!=null?E:{}),this.registers=sr.registers),sr.atomIdsSettings&&(this.atomIdsSettings=xe({},sr.atomIdsSettings)),this.renderPlaceholder=sr.renderPlaceholder,this.isPhantom=(ae=(re=y==null?void 0:y.isPhantom)!=null?re:(ee=this.parent)==null?void 0:ee.isPhantom)!=null?ae:!1,this.letterShapeStyle=sr.letterShapeStyle,this.minFontScale=sr.minFontScale,b!=null&&b.color&&b.color!=="none"?this.color=b.color:this.color=(ge=(fe=this.parent)==null?void 0:fe.color)!=null?ge:"",b!=null&&b.backgroundColor&&b.backgroundColor!=="none"?this.backgroundColor=b.backgroundColor:this.backgroundColor=(Me=(be=this.parent)==null?void 0:be.backgroundColor)!=null?Me:"",b!=null&&b.fontSize&&b.fontSize!=="auto"&&b.fontSize!==((Ne=this.parent)==null?void 0:Ne.size)?this.size=b.fontSize:this.size=(xt=(et=this.parent)==null?void 0:et.size)!=null?xt:dl;let Pr=(In=(It=this.parent)==null?void 0:It.mathstyle)!=null?In:Us.displaystyle;if(typeof(y==null?void 0:y.mathstyle)=="string"){if(sr instanceof Mp)switch(y.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(y.mathstyle){case"textstyle":Pr=Us.textstyle;break;case"displaystyle":Pr=Us.displaystyle;break;case"scriptstyle":Pr=Us.scriptstyle;break;case"scriptscriptstyle":Pr=Us.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Pr,this.smartFence=sr.smartFence,this.placeholderSymbol=sr.placeholderSymbol,this.colorMap=(_r=sr.colorMap)!=null?_r:mr=>mr,this.backgroundColorMap=(Ln=sr.backgroundColorMap)!=null?Ln:mr=>mr,this.getMacro=sr.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const y=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,y}scale(y){return y*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===od||this.mathstyle.id===rl}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(pu[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(y){var b;if((b=this.registers)!=null&&b[y])return this.registers[y];if(this.parent)return this.parent.getRegister(y)}getRegisterAsNumber(y){const b=this.getRegister(y);if(typeof b=="number")return b;if(typeof b=="string")return Number(b)}getRegisterAsGlue(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E:typeof E=="object"&&"dimension"in E?{glue:{dimension:E.dimension}}:typeof E=="number"?{glue:{dimension:E}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(y)}getRegisterAsEm(y,b){return sd(this.getRegisterAsDimension(y),b)}getRegisterAsDimension(y){var b;if((b=this.registers)!=null&&b[y]){const E=this.registers[y];return typeof E=="object"&&"glue"in E?E.glue:typeof E=="object"&&"dimension"in E?E:typeof E=="number"?{dimension:E}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(y)}setRegister(y,b){if(b===void 0){delete this.registers[y];return}this.registers[y]=b}evaluate(y){if(!y||!("register"in y))return y;let b=this;if("global"in y&&y.global)for(;b.parent;)b=b.parent;let E=1;"factor"in y&&y.factor!==1&&y.factor!==void 0&&(E=y.factor);const ee=b.getRegister(y.register);if(ee===void 0)return;if(typeof ee=="string")return{string:Number(ee).toString()+ee};if(typeof ee=="number")return{number:E*ee};const re=b.evaluate(ee);if(re!==void 0)return"string"in re?{string:Number(ee).toString()+re.string}:"number"in re?{number:E*re.number}:"dimension"in re?me(xe({},re),{dimension:E*re.dimension}):"glue"in re?me(xe({},re),{glue:me(xe({},re.glue),{dimension:E*re.glue.dimension}),shrink:re.shrink?me(xe({},re.shrink),{dimension:E*re.shrink.dimension}):void 0,grow:re.grow?me(xe({},re.grow),{dimension:E*re.grow.dimension}):void 0}):y}toDimension(y){const b=this.evaluate(y);return b===void 0?null:"dimension"in b?b:"glue"in b?b.glue:"number"in b?{dimension:b.number}:null}toEm(y,b){if(y===null)return 0;const E=this.toDimension(y);return E===null?0:ac(E,b)/Nl}toNumber(y){if(y===null)return null;const b=this.evaluate(y);return b===void 0?null:"number"in b?b.number:"dimension"in b?b.dimension:"glue"in b?b.glue.dimension:"string"in b?Number(b.string):null}toColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.colorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}toBackgroundColor(y){var b,E;if(y===null)return null;const ee=this.evaluate(y);return ee===void 0?null:"string"in ee?(E=(b=this.backgroundColorMap)==null?void 0:b.call(this,ee.string))!=null?E:ee.string:null}},sc=["body","above","below","superscript","subscript"];function il(a){return typeof a=="string"&&sc.includes(a)}function Dc(a){return a!==void 0&&Array.isArray(a)&&a.length===2}var Gn=class Vl{constructor(y){var b,E,ee,re,ae,fe;this.type=y.type,typeof y.value=="string"&&(this.value=y.value),this.command=(E=(b=y.command)!=null?b:this.value)!=null?E:"",this.mode=(ee=y.mode)!=null?ee:"math",y.isFunction&&(this.isFunction=!0),y.limits&&(this.subsupPlacement=y.limits),this.style=xe({},y.style),this.displayContainsHighlight=(re=y.displayContainsHighlight)!=null?re:!1,this.captureSelection=(ae=y.captureSelection)!=null?ae:!1,this.skipBoundary=(fe=y.skipBoundary)!=null?fe:!1,y.verbatimLatex!==void 0&&y.verbatimLatex!==null&&(this.verbatimLatex=y.verbatimLatex),y.args&&(this.args=y.args),y.body&&(this.body=y.body),this._changeCounter=0}static createBox(y,b,E){var ee;if(!b)return null;const re=cf(b),ae=[];for(const ge of re){const be=ge[0].style,Me=uf(y,ge,{style:{color:be.color,backgroundColor:be.backgroundColor,fontSize:be.fontSize}});Me&&ae.push(Me)}if(ae.length===0)return null;const fe=((ee=E==null?void 0:E.classes)!=null?ee:"").trim();return ae.length===1&&!fe&&!(E!=null&&E.type)?ae[0].wrap(y):new Dr(ae,{classes:fe,type:E==null?void 0:E.type}).wrap(y)}static serialize(y,b){return Ss.serialize(y,b)}static commonAncestor(y,b){if(y===b||y.parent===b.parent)return y.parent;const E=new WeakSet;let{parent:ee}=y;for(;ee;)E.add(ee),ee=ee.parent;for(ee=b.parent;ee;){if(E.has(ee))return ee;ee=ee.parent}console.assert(!!ee)}static fromJson(y){return typeof y=="string"?new Vl({type:"mord",value:y,mode:"math"}):new Vl(y)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const y={};if(this.type&&(y.type=this.type),this.mode!=="math"&&(y.mode=this.mode),this.command&&this.command!==this.value&&(y.command=this.command),this.value!==void 0&&(y.value=this.value),this.style&&Object.keys(this.style).length>0&&(y.style=xe({},this.style)),this.verbatimLatex!==void 0&&(y.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(y.explicitSubsupPlacement=!0),this.isFunction&&(y.isFunction=!0),this.displayContainsHighlight&&(y.displayContainsHighlight=!0),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.skipBoundary&&(y.skipBoundary=!0),this.captureSelection&&(y.captureSelection=!0),this.args&&(y.args=ud(this.args)),this._branches)for(const b of Object.keys(this._branches))this._branches[b]&&(y[b]=this._branches[b].filter(E=>E.type!=="first").map(E=>E.toJson()));return y.type==="mord"&&Object.keys(y).length===2&&"value"in y?y.value:y}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(y){if(y){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:b}=this;for(;b;)b.parent||b._changeCounter++,"verbatimLatex"in b&&(b.verbatimLatex=void 0),b._children=void 0,b=b.parent}}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):this.body&&this.command?ya([uo(this.command,this.bodyToLatex(y)),this.supsubToLatex(y)]):this.body?ya([this.bodyToLatex(y),this.supsubToLatex(y)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(y){var b;return Ss.serialize(this.body,me(xe({},y),{defaultMode:(b=y.defaultMode)!=null?b:this.latexMode}))}aboveToLatex(y){return Ss.serialize(this.above,y)}belowToLatex(y){return Ss.serialize(this.below,y)}supsubToLatex(y){let b="";if(y=me(xe({},y),{defaultMode:"math"}),this.branch("subscript")!==void 0){const E=Ss.serialize(this.subscript,y);E.length===0?b+="_{}":E.length===1?/^[0-9]$/.test(E)?b+=`_${E}`:b+=`_{${E}}`:b+=`_{${E}}`}if(this.branch("superscript")!==void 0){const E=Ss.serialize(this.superscript,y);E.length===0?b+="^{}":E.length===1?E==="\u2032"?b+="^\\prime ":E==="\u2033"?b+="^\\doubleprime ":/^[0-9]$/.test(E)?b+=`^${E}`:b+=`^{${E}}`:b+=`^{${E}}`}return b}get treeDepth(){let y=1,b=this.parent;for(;b;)b=b.parent,y+=1;return y}get inCaptureSelection(){let y=this;for(;y;){if(y.captureSelection)return!0;y=y.parent}return!1}get parentPrompt(){let y=this.parent;for(;y;){if(y.type==="prompt"&&!y.captureSelection)return y;y=y.parent}return null}branch(y){if(il(y)&&this._branches)return this._branches[y]}get branches(){if(!this._branches)return[];const y=[];for(const b of sc)this._branches[b]&&y.push(b);return y}createBranch(y){return console.assert(il(y)),il(y)?(this._branches?this._branches[y]||(this._branches[y]=[this.makeFirstAtom(y)]):this._branches={[y]:[this.makeFirstAtom(y)]},this.isDirty=!0,this._branches[y]):[]}get row(){return Dc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Dc(this.parentBranch)?this.parentBranch[1]:-1}get body(){var y;return(y=this._branches)==null?void 0:y.body}set body(y){this.setChildren(y,"body")}get superscript(){var y;return(y=this._branches)==null?void 0:y.superscript}set superscript(y){this.setChildren(y,"superscript")}get subscript(){var y;return(y=this._branches)==null?void 0:y.subscript}set subscript(y){this.setChildren(y,"subscript")}get above(){var y;return(y=this._branches)==null?void 0:y.above}set above(y){this.setChildren(y,"above")}get below(){var y;return(y=this._branches)==null?void 0:y.below}set below(y){this.setChildren(y,"below")}get computedStyle(){var y,b;const E=typeof this.style.verbatimColor=="string",ee=typeof this.style.verbatimBackgroundColor=="string",re=xe(xe({},(b=(y=this.parent)==null?void 0:y.computedStyle)!=null?b:{}),this.style);return delete re.variant,delete re.variantStyle,ee||delete re.verbatimBackgroundColor,E||delete re.verbatimColor,re}applyStyle(y){this.isDirty=!0,this.style=xe(xe({},this.style),y),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const b of this.children)b.applyStyle(y)}getInitialBaseElement(){var y,b,E;return this.hasEmptyBranch("body")?this:(console.assert(((y=this.body)==null?void 0:y[0].type)==="first"),(E=(b=this.body[1])==null?void 0:b.getInitialBaseElement())!=null?E:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(y){const b=this.branch(y);return b?(console.assert(b.length>0),console.assert(b[0].type==="first"),b.length===1):!0}setChildren(y,b){var E;if(!y||(console.assert(il(b)),!il(b)))return;console.assert(((E=y[0])==null?void 0:E.type)!=="first");const ee=[this.makeFirstAtom(b),...y];this._branches?this._branches[b]=ee:this._branches={[b]:ee};for(const re of y)re.parent=this,re.parentBranch=b;this.isDirty=!0}makeFirstAtom(y){const b=new Vl({type:"first",mode:this.mode});return b.parent=this,b.parentBranch=y,b}addChild(y,b){console.assert(y.type!=="first"),this.createBranch(b).push(y),this.isDirty=!0,y.parent=this,y.parentBranch=b}addChildBefore(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b),0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildAfter(y,b){console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,y),this.isDirty=!0,y.parent=this,y.parentBranch=b.parentBranch}addChildren(y,b){const E=this.createBranch(b);for(const ee of y)ee.parent=this,ee.parentBranch=b,E.push(ee);this.isDirty=!0}addChildrenAfter(y,b){console.assert(y.length===0||y[0].type!=="first"),console.assert(b.parentBranch!==void 0);const E=this.createBranch(b.parentBranch);E.splice(E.indexOf(b)+1,0,...y),this.isDirty=!0;for(const ee of y)ee.parent=this,ee.parentBranch=b.parentBranch;return y[y.length-1]}removeBranch(y){const b=this.branch(y);if(il(y)&&(this._branches[y]=void 0),!b)return[];for(const E of b)E.parent=void 0,E.parentBranch=void 0;return console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}removeChild(y){if(console.assert(y.parent===this),y.type==="first")return;const b=this.branch(y.parentBranch),E=b.indexOf(y);console.assert(E>=0),b.splice(E,1),this.isDirty=!0,y.parent=void 0,y.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:y}=this;return y[y.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const y=this.parent.branch(this.parentBranch);return y[y.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:y}=this;return y[y.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const y=[];for(const b of sc)if(this._branches[b])for(const E of this._branches[b])y.push(...E.children),y.push(E);return this._children=y,y}render(y){if(this.type==="first"&&!y.atomIdsSettings)return null;const b=Ht(this.command,this.mode);if(b!=null&&b.render)return b.render(this,y);const E=new La({parent:y},this.style);let ee=this.createBox(E,{classes:this.parent?"":"ML__base"});return ee?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(ee=this.attachSupsub(E,{base:ee})),ee.wrap(E)):null}attachSupsub(y,b){var E;const ee=b.base,re=this.superscript,ae=this.subscript;if(!re&&!ae)return ee;let fe=null,ge=null;const be=(E=b.isCharacterBox)!=null?E:this.isCharacterBox();let Me=0;if(re){const In=new La({parent:y,mathstyle:"superscript"});fe=Vl.createBox(In,re),be||(Me=ee.height-y.metrics.supDrop*In.scalingFactor)}let Ne=0;if(ae){const In=new La({parent:y,mathstyle:"subscript"});ge=Vl.createBox(In,ae),be||(Ne=ee.depth+y.metrics.subDrop*In.scalingFactor)}let et;y.isDisplayStyle?et=y.metrics.sup1:y.isCramped?et=y.metrics.sup3:et=y.metrics.sup2;const xt=.5/Nl/y.scalingFactor;let It=null;if(ge&&fe){Me=Math.max(Me,et,fe.depth+.25*y.metrics.xHeight),Ne=Math.max(Ne,y.metrics.sub2);const In=y.metrics.defaultRuleThickness;if(Me-fe.depth-(ge.height-Ne)<4*In){Ne=4*In-(Me-fe.depth)+ge.height;const Ln=.8*y.metrics.xHeight-(Me-fe.depth);Ln>0&&(Me+=Ln,Ne-=Ln)}const _r=this.isExtensibleSymbol&&ee.italic?-ee.italic:0;It=new Qa({individualShift:[{box:ge,shift:Ne,marginLeft:_r},{box:fe,shift:-Me}]}).wrap(y)}else ge&&!fe?(Ne=Math.max(Ne,y.metrics.sub1,ge.height-.8*el),It=new Qa({shift:Ne,children:[{box:ge,marginRight:xt,marginLeft:this.isCharacterBox()?-ee.italic:0}]})):!ge&&fe&&(Me=Math.max(Me,et,fe.depth+.25*el),It=new Qa({shift:-Me,children:[{box:fe,marginRight:xt}]}));return new Dr([ee,new Dr(It,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:b.type})}attachLimits(y,b){const E=this.superscript?Vl.createBox(new La({parent:y,mathstyle:"superscript"},this.style),this.superscript):null,ee=this.subscript?Vl.createBox(new La({parent:y,mathstyle:"subscript"},this.style),this.subscript):null;return!E&&!ee?b.base.wrap(y):nh(y,me(xe({},b),{above:E,below:ee}))}bind(y,b){if(!b||y.isPhantom||this.value==="\u200B")return b;let E=this.parent;for(;E&&!E.captureSelection;)E=E.parent;return E!=null&&E.captureSelection||(this.id||(this.id=y.makeID()),b.atomID=this.id),b}createBox(y,b){var E,ee,re,ae;const fe=(E=this.value)!=null?E:this.body,ge=(ee=b==null?void 0:b.boxType)!=null?ee:id(this.type);let be=(re=b==null?void 0:b.classes)!=null?re:"";this.mode==="text"&&(be+=" ML__text");const Me=typeof fe=="string"||fe===void 0?new Dr(fe!=null?fe:null,{type:ge,isSelected:this.isSelected,mode:this.mode,maxFontSize:y.scalingFactor,style:me(xe({variant:"normal"},this.style),{fontSize:Math.max(1,y.size+y.mathstyle.sizeDelta)}),letterShapeStyle:y.letterShapeStyle,classes:be}):(ae=Vl.createBox(y,fe,{type:ge,classes:be}))!=null?ae:new Dr(null);return y.isTight&&(Me.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(Me.italic=0),Me.right=Me.italic,this.bind(y,Me),this.caret&&!this.superscript&&!this.subscript&&(Me.caret=this.caret),Me}isDigit(){var y;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((y=this.body)==null?void 0:y.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var y;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((y=this.body)==null?void 0:y.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function cf(a){let y;const b=[];let E=[];for(const ee of a)if(!y&&!ee.style)E.push(ee);else{const re=ee.computedStyle;y&&re.color===y.color&&re.backgroundColor===y.backgroundColor&&re.fontSize===y.fontSize?E.push(ee):(E.length>0&&b.push(E),E=[ee],y=re)}return E.length>0&&b.push(E),b}function uf(a,y,b){var E,ee,re,ae,fe;if(!y||y.length===0)return null;const ge=new La({parent:a},b.style),be=!((E=ge.atomIdsSettings)!=null&&E.groupNumbers);let Me=[];if(y.length===1){const et=y[0],xt=et.render(ge);xt&&(be&&et.isSelected&&xt.selected(!0),Me=[xt])}else{let et="",xt=!0;for(const It of y){(ee=ge.atomIdsSettings)!=null&&ee.groupNumbers&&et&&(xt&&It.isDigit()||!xt&&cd(It))&&(ge.atomIdsSettings.overrideID=et);const In=It.render(ge);ge.atomIdsSettings&&(ge.atomIdsSettings.overrideID=void 0),In&&((re=ge.atomIdsSettings)!=null&&re.groupNumbers&&((It.isDigit()||cd(It))&&(!et||xt!==It.isDigit())&&(xt=It.isDigit(),et=(ae=It.id)!=null?ae:""),et&&(!(It.isDigit()||cd(It))||!It.hasEmptyBranch("superscript")||!It.hasEmptyBranch("subscript"))&&(et="")),be&&It.isSelected&&In.selected(!0),Me.push(In))}}if(Me.length===0)return null;const Ne=new Dr(Me,me(xe({isTight:ge.isTight},b),{type:(fe=b.type)!=null?fe:"lift"}));return Ne.isSelected=Me.every(et=>et.isSelected),Ne.wrap(ge)}function cd(a){return a.mode==="text"}function ud(a){return a.map(y=>y===null?"<null>":Array.isArray(y)&&y[0]instanceof Gn?{atoms:y.map(b=>b.toJson())}:typeof y=="object"&&"group"in y?{group:y.group.map(b=>b.toJson())}:y)}var al=class kp extends Gn{constructor(y,b,E){super({type:"text",command:y,mode:"text",displayContainsHighlight:!0}),this.value=b,this.verbatimLatex=b,this.applyStyle(E)}static fromJson(y){return new kp(y.command,y.value,y.style)}render(y){const b=this.createBox(y);return this.caret&&(b.caret=this.caret),b}_serialize(y){var b;return(b=this.verbatimLatex)!=null?b:er("text",this.value.codePointAt(0))}};function Pc(a,y){if(a.direction===y.direction){const b=a.ranges.length;if(y.ranges.length===b){let E=0;for(;E<b&&ih(a.ranges[E],y.ranges[E])==="equal";)E++;return E===b?"equal":"different"}}return"different"}function ih(a,y){return a[0]===y[0]&&a[1]===y[1]?"equal":"different"}function Vo(a){let y=1/0,b=-1/0;for(const E of a.ranges)y=Math.min(y,E[0],E[1]),b=Math.max(b,E[0],E[1]);return[y,b]}function gl(a){return typeof a=="number"&&!Number.isNaN(a)}function xu(a){return Array.isArray(a)&&a.length===2}function wu(a){return a!=null&&typeof a=="object"&&"ranges"in a&&Array.isArray(a.ranges)}function ah(a,y){const b=a.at(y);let E;if(b){E=b.mode;let ee=b.parent;for(;!E&ⅇ)ee&&(E=ee.mode),ee=ee.parent}return E}function df(a,y){if(!y)return"";if(typeof y=="string")return y;if(!a||y.after===void 0)return y.value;let b=!1,E=!1,ee=!1,re=!1,ae=!1,fe=!1,ge=!1,be=!1,Me=!1,Ne=!1,et=!1,xt=!1,It=!1,In=!1,_r=!1,Ln=a[0],sr=0;for(;Ln!=null&&Ln.type&&/^(subsup|placeholder)$/.test(Ln.type);)sr+=1,Ln=a[sr];return b=!Ln||Ln.type==="first",Ln&&(In=Ln.mode==="text",E=!In&&Ln.type==="mord"&&pe.test(Ln.value),ee=!In&&Ln.type==="mord"&&/\d+$/.test(Ln.value),re=!In&&Ln.isFunction,ae=Ln.type==="genfrac",fe=Ln.type==="surd",ge=Ln.type==="mbin",be=Ln.type==="mrel",Me=Ln.type==="mop"||Ln.type==="operator"||Ln.type==="extensible-symbol",Ne=Ln.type==="mpunct"||Ln.type==="minner",et=Ln.type==="array",xt=Ln.type==="mopen",It=Ln.type==="mclose"||Ln.type==="leftright",_r=Ln.type==="space"),y.after.includes("nothing")&&b||y.after.includes("letter")&&E||y.after.includes("digit")&&ee||y.after.includes("function")&&re||y.after.includes("frac")&&ae||y.after.includes("surd")&&fe||y.after.includes("binop")&&ge||y.after.includes("relop")&&be||y.after.includes("operator")&&Me||y.after.includes("punct")&&Ne||y.after.includes("array")&&et||y.after.includes("openfence")&&xt||y.after.includes("closefence")&&It||y.after.includes("text")&&In||y.after.includes("space")&&_r?y.value:""}function dd(a,y,b){return b?df(a,b[y]):""}var ff={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function Oc(a,y){var b;let E=(b=y==null?void 0:y.format)!=null?b:"auto";return E==="auto"&&([E,a]=pf(a)),E==="ascii-math"?(a=a.replace(/\u2061/gu,""),a=a.replace(/\u3016/gu,"{"),a=a.replace(/\u3017/gu,"}"),a=a.replace(/([^\\])sinx/g,"$1\\sin x"),a=a.replace(/([^\\])cosx/g,"$1\\cos x "),a=a.replace(/\u2013/g,"-"),["ascii-math",ts(a,{inlineShortcuts:y==null?void 0:y.inlineShortcuts})]):["latex",a]}function ts(a,y){var b,E,ee;if(!a)return"";let re=!1,ae;const fe=(b=y.inlineShortcuts)!=null?b:ff;if(!re&&(a.startsWith("^")||a.startsWith("_"))&&(ae=vl(a.slice(1),{inlineShortcuts:fe,noWrap:!0}),a=a[0]+"{"+ae.match+"}",a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^(sqrt|\u221A)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:fe,noWrap:!0}),a="\\sqrt{"+((E=ae.match)!=null?E:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^(\\cbrt|\u221B)(.*)/),ae&&(ae=vl(ae[2],{inlineShortcuts:fe,noWrap:!0}),a="\\sqrt[3]{"+((ee=ae.match)!=null?ee:"\\placeholder{}")+"}",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^abs(.*)/),ae&&(ae=vl(ae[1],{inlineShortcuts:fe,noWrap:!0}),a="\\left|"+ae.match+"\\right|",a+=ts(ae.rest,y),re=!0)),re||(ae=a.match(/^["”“](.*?)["”“](.*)/),ae&&(a="\\text{"+ae[1]+"}",a+=ts(ae[2],y),re=!0)),re||(ae=a.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),ae&&(a=hf(ae[1],fe),a+=ts(ae[2],y),re=!0)),!re&&/^([fgh])[^a-zA-Z]/.test(a)&&(ae=vl(a.slice(1),{inlineShortcuts:fe,noWrap:!0}),a=a[1]==="("?a[0]+"\\left("+ae.match+"\\right)":a[0]+ae.match,a+=ts(ae.rest,y),re=!0),re||(ae=a.match(/^([a-zA-Z]+)(.*)/),ae&&(a=hf(ae[1],fe),a+=ts(ae[2],y),re=!0)),!re)if(ae=vl(a,{inlineShortcuts:fe,noWrap:!0}),ae.match&&ae.rest[0]==="/"){const ge=vl(ae.rest.slice(1),{inlineShortcuts:fe,noWrap:!0});ge.match&&(a="\\frac{"+ae.match+"}{"+ge.match+"}"+ts(ge.rest,y)),re=!0}else ae.match&&(a=a.startsWith("(")?"\\left("+ae.match+"\\right)"+ts(ae.rest,y):ae.match+ts(ae.rest,y),re=!0);return re||(ae=a.match(/^(\s+)(.*)$/),ae&&(a=" "+ts(ae[2],y),re=!0)),a}function vl(a,y){let b="";a=a.trim();let E=a,ee=a.charAt(0),re={"(":")","{":"}","[":"]"}[ee];if(re){let ae=1,fe=1;for(;fe<a.length&&ae>0;)a[fe]===ee&&ae++,a[fe]===re&&ae--,fe++;ae===0?(y.noWrap&&ee==="("?b=ts(a.substring(1,fe-1),y):(ee==="{"&&re==="}"&&(ee="\\{",re="\\}"),b="\\left"+ee+ts(a.substring(1,fe-1),y)+"\\right"+re),E=a.slice(Math.max(0,fe))):(b=a.substring(1,fe),E="")}else{let ae=a.match(/^([a-zA-Z]+)/);if(ae){let fe=dd(null,a,y.inlineShortcuts);if(fe)return fe=fe.replace("_{#?}",""),fe=fe.replace("^{#?}",""),{match:fe,rest:a.slice(fe.length)}}if(ae=a.match(/^([a-zA-Z])/),ae)return{match:ae[1],rest:a.slice(1)};if(ae=a.match(/^(-)?\d+(\.\d*)?/),ae)return{match:ae[0],rest:a.slice(ae[0].length)};/^\\(left|right)/.test(a)||(ae=a.match(/^(\\[a-zA-Z]+)/),ae&&(E=a.slice(ae[1].length),b=ae[1]))}return{match:b,rest:E}}function hf(a,y){let b=dd(null,a,y);return b?(b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),b+=" "):b=a,b}var fd=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function yl(a){const y=a.trim();for(const b of fd)if(y.startsWith(b[0])&&y.endsWith(b[1]))return[!0,y.substring(b[0].length,y.length-b[1].length)];return[!1,a]}function pf(a){if(a=a.trim(),a.length<=1)return["latex",a];let y;return[y,a]=yl(a),y?["latex",a]:a.startsWith("`")&&a.endsWith("`")?(a=a.substring(1,a.length-1),["ascii-math",a]):a.includes("\\")?["latex",a]:/\$.+\$/.test(a)?["latex",`\\text{${a}}`]:[void 0,a]}var Su="$$",oh="$$",sh=(a,y,b)=>(fd.some(E=>y.startsWith(E[0])&&y.endsWith(E[1]))||(y=`${Su} ${y} ${oh}`),y),mf=class Qf{constructor(y){Qf._modes[y]=this}static onPaste(y,b,E){var ee;if(!b.contentEditable&&b.userSelect==="none")return b.model.announce("plonk"),!1;if(typeof E=="string"){const ae=new DataTransfer;ae.setData("text/plain",E),E=ae}const re=new ClipboardEvent("paste",{clipboardData:E,cancelable:!0});return(ee=b.host)!=null&&ee.dispatchEvent(re)?Qf._modes[y].onPaste(b,E):!1}static copyToClipboard(y,b){if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const E=y.model,ee=E.selectionIsCollapsed?[0,E.lastOffset]:Vo(E.selection),re=E.getValue(ee,b);navigator.clipboard.writeText(re).then(()=>{},()=>y.model.announce("plonk"))}static onCopy(y,b){var E;if(!b.clipboardData)return;if(!y.contentEditable&&y.userSelect==="none"){y.model.announce("plonk");return}const ee=y.model,re=ee.selectionIsCollapsed?[0,ee.lastOffset]:Vo(ee.selection);let ae=ee.getAtoms(re);if(ae.every(fe=>fe.mode==="text"||!fe.mode))b.clipboardData.setData("text/plain",ae.filter(fe=>fe instanceof al).map(fe=>fe.value).join(""));else if(ae.every(fe=>fe.mode==="latex"))b.clipboardData.setData("text/plain",ee.getAtoms(re,{includeChildren:!0}).map(fe=>{var ge;return(ge=fe.value)!=null?ge:""}).join(""));else{let fe;ae.length===1&&ae[0].verbatimLatex!==void 0?fe=ae[0].verbatimLatex:fe=ee.getValue(re,"latex-expanded"),b.clipboardData.setData("application/x-latex",fe);try{b.clipboardData.setData("text/plain",y.options.onExport(y,fe,re))}catch(ge){}if(ae.length===1){const ge=ae[0];(ge.type==="root"||ge.type==="group")&&(ae=ge.body.filter(be=>be.type!=="first"))}try{b.clipboardData.setData("application/json+mathlive",JSON.stringify(ae.map(ge=>ge.toJson())))}catch(ge){}if((E=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&E.ComputeEngine){const ge=window.MathfieldElement.computeEngine;if(ge)try{const be=ge.jsonSerializationOptions;ge.jsonSerializationOptions={metadata:["latex"]};const Me=ge.parse(ee.getValue(re,"latex-unstyled"));ge.jsonSerializationOptions=be;const Ne=JSON.stringify(Me.json);Ne&&b.clipboardData.setData("application/json",Ne)}catch(be){}}}b.preventDefault()}static insert(y,b,E={}){var ee;const re=E.mode==="auto"?y.mode:(ee=E.mode)!=null?ee:y.mode;return Qf._modes[re].insert(y,b,E)}onPaste(y,b){return!1}insert(y,b,E){return!1}};mf._modes={};var ia=mf,lh=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],hd={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function Rs(a){var y;return((y=a.element)==null?void 0:y.mathfield)===a}function Bs(a){var y,b;return(b=(y=a.querySelector(".ML__caret"))!=null?y:a.querySelector(".ML__text-caret"))!=null?b:a.querySelector(".ML__latex-caret")}function bl(a){const y=Bs(a);if(!y)return null;const b=y.getBoundingClientRect();return{x:b.right,y:b.bottom,height:b.height}}function pd(a){var y;if(!a.parent)return"root";let b=(y=a.parent.id)!=null?y:"";return b+=typeof a.parentBranch=="string"?"-"+a.parentBranch:`-${a.parentBranch[0]}/${a.parentBranch[0]}`,b}function md(a,y,b){if(!y)return null;const E=a.field.getBoundingClientRect(),ee=y.right-y.left,re=y.bottom-y.top,ae=Math.ceil(y.left-E.left+a.field.scrollLeft*b),fe=Math.ceil(y.top-E.top);return{left:ae,right:ae+ee,top:fe,bottom:fe+re}}function gd(a){const y=a.getBoundingClientRect(),b=parseInt(getComputedStyle(a).marginRight),E={top:y.top-1,bottom:y.bottom,left:y.left,right:y.right-1+b};if(a.children.length===0||a.tagName.toUpperCase()==="SVG")return E;for(const ee of a.children)if(ee.nodeType===1&&"atomId"in ee.dataset&&!ee.classList.contains("pstrut")){const re=gd(ee);E.left=Math.min(E.left,re.left),E.right=Math.max(E.right,re.right),E.top=Math.min(E.top,re.top),E.bottom=Math.max(E.bottom,re.bottom)}return E}function lc(a,y){var b,E;if(!y.id)return null;let ee=(E=(b=a.atomBoundsCache)==null?void 0:b.get(y.id))!=null?E:null;if(ee!==null)return ee;const re=a.field.querySelector(`[data-atom-id="${y.id}"]`);return ee=re?gd(re):null,a.atomBoundsCache&&(ee?a.atomBoundsCache.set(y.id,ee):a.atomBoundsCache.delete(y.id)),ee!=null?ee:null}function gf(a,y,b){const E=new Map;for(const ee of a.model.getAtoms(y,{includeChildren:!0})){if(b!=null&&b.excludeAtomsWithBackground&&ee.style.backgroundColor)continue;const re=a.field,ae=re.offsetWidth;let ge=Math.floor(re.getBoundingClientRect().width)/ae;ge=isNaN(ge)?1:ge;const be=md(a,lc(a,ee),ge);if(be){const Me=pd(ee);if(E.has(Me)){const Ne=E.get(Me);E.set(Me,{left:Math.min(Ne.left,be.left),right:Math.max(Ne.right,be.right),top:Math.min(Ne.top,be.top),bottom:Math.max(Ne.bottom,be.bottom)})}else E.set(Me,be)}}return[...E.values()]}function vd(a,y){return a.model.selection.ranges.reduce((b,E)=>b.concat(...gf(a,E,y)),[])}function yd(a,y){return a==="*"||y==="none"?!0:y==="same-origin"?!window.origin||a===window.origin:typeof y=="function"?y(a):!1}function Cu(a){let y=0,b=0;const E=a.offsetWidth,ee=a.offsetHeight;for(;a instanceof HTMLElement;)y+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;return new DOMRect(b,y,E,ee)}var vf=`@keyframes ML__caret-blink {
|
|
|
0%,
|
|
|
100% {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
50% {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
}
|
|
|
.ML__container {
|
|
|
display: inline-flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
min-height: 39px;
|
|
|
/* Need some room for the virtual keyboard toggle */
|
|
|
width: 100%;
|
|
|
/* Encourage browsers to consider allocating a hardware accelerated
|
|
|
layer for this element. */
|
|
|
isolation: isolate;
|
|
|
/* Prevent the browser from trying to interpret touch gestures in the field */
|
|
|
/* "Disabling double-tap to zoom removes the need for browsers to
|
|
|
delay the generation of click events when the user taps the screen." */
|
|
|
touch-action: none;
|
|
|
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_selection-color: var(--selection-color, #000);
|
|
|
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
|
|
|
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
|
|
|
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
|
|
|
--_smart-fence-color: var(--smart-fence-color, currentColor);
|
|
|
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
|
|
|
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
|
|
|
--_correct-color: var(--correct-color, #10a000);
|
|
|
--_incorrect-color: var(--incorrect-color, #a01b00);
|
|
|
--_composition-background-color: var(--composition-background-color, #fff1c2);
|
|
|
--_composition-text-color: var(--composition-text-color, black);
|
|
|
--_composition-underline-color: var(--composition-underline-color, transparent);
|
|
|
}
|
|
|
/* This is the actual field content (formula) */
|
|
|
.ML__content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
align-self: center;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 2px 3px 2px 1px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle,
|
|
|
.ML__menu-toggle {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
flex-shrink: 0;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
padding: 0;
|
|
|
margin-right: 4px;
|
|
|
cursor: pointer;
|
|
|
/* Avoid some weird blinking with :hover */
|
|
|
border-radius: 8px;
|
|
|
border: 1px solid transparent;
|
|
|
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
color: hsl(var(--_hue), 40%, 50%);
|
|
|
fill: currentColor;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:hover,
|
|
|
.ML__menu-toggle:hover {
|
|
|
background: hsla(0, 0%, 70%, 0.3);
|
|
|
color: #333;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle > span,
|
|
|
.ML__menu-toggle > span {
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
/* The invisible element used to capture keyboard events. We're just trying
|
|
|
really hard to make sure it doesn't show. */
|
|
|
.ML__keyboard-sink {
|
|
|
display: inline-block;
|
|
|
resize: none;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
/* Need these for Microsoft Edge */
|
|
|
position: fixed;
|
|
|
clip: rect(0 0 0 0);
|
|
|
/* Need this to prevent iOS Safari from auto-zooming */
|
|
|
font-size: 1em;
|
|
|
font-family: KaTeX_Main;
|
|
|
line-height: 0.5;
|
|
|
/* On Chromium, if this is 0, no keyboard events are received */
|
|
|
}
|
|
|
[part="placeholder"] {
|
|
|
color: var(--neutral-400);
|
|
|
}
|
|
|
.ML__composition {
|
|
|
background: var(--_composition-background-color);
|
|
|
color: var(--_composition-text-color);
|
|
|
text-decoration: underline var(--_composition-underline-color);
|
|
|
}
|
|
|
.ML__caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__text-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__latex-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_latex-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.019em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__focused .ML__latex-caret::after,
|
|
|
.ML__focused .ML__text-caret::after,
|
|
|
.ML__focused .ML__caret::after {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.ML__focused .ML__text {
|
|
|
background: var(--_text-highlight-background-color);
|
|
|
}
|
|
|
/* When using smartFence, the anticipated closing fence is displayed
|
|
|
with this style */
|
|
|
.ML__smart-fence__close {
|
|
|
opacity: var(--_smart-fence-opacity);
|
|
|
color: var(--_smart-fence-color);
|
|
|
}
|
|
|
.ML__selected,
|
|
|
.ML__focused .ML__selected .ML__contains-caret,
|
|
|
.ML__focused .ML__selected .ML__smart-fence__close,
|
|
|
.ML__focused .ML__selected .ML__placeholder {
|
|
|
color: var(--_selection-color);
|
|
|
opacity: 1;
|
|
|
}
|
|
|
.ML__selection {
|
|
|
box-sizing: border-box;
|
|
|
background: var(--_selection-background-color) !important;
|
|
|
}
|
|
|
.ML__contains-caret.ML__close,
|
|
|
.ML__contains-caret.ML__open,
|
|
|
.ML__contains-caret > .ML__close,
|
|
|
.ML__contains-caret > .ML__open,
|
|
|
.ML__contains-caret .ML__sqrt-sign,
|
|
|
.ML__contains-caret .ML__sqrt-line {
|
|
|
color: var(--_caret-color);
|
|
|
}
|
|
|
.ML__contains-highlight {
|
|
|
box-sizing: border-box;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__focused .ML__contains-highlight {
|
|
|
background: var(--_contains-highlight-background-color);
|
|
|
}
|
|
|
.ML__raw-latex {
|
|
|
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
font-weight: 400;
|
|
|
font-size: 0.8em;
|
|
|
letter-spacing: -0.05em;
|
|
|
color: var(--_latex-color);
|
|
|
}
|
|
|
.ML__suggestion {
|
|
|
color: var(--neutral-500);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:focus {
|
|
|
outline: none;
|
|
|
border-radius: 8px;
|
|
|
border: 2px solid hsl(var(--_hue), 40%, 50%);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-pressed,
|
|
|
.ML__virtual-keyboard-toggle.is-active:hover,
|
|
|
.ML__virtual-keyboard-toggle.is-active {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to automatically show a
|
|
|
tooltip over a element on hover.
|
|
|
*/
|
|
|
[data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
[data-tooltip]::after {
|
|
|
content: attr(data-tooltip);
|
|
|
position: absolute;
|
|
|
display: block;
|
|
|
z-index: 2;
|
|
|
pointer-events: none;
|
|
|
right: auto;
|
|
|
top: calc(-100% - 4px);
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
border-radius: 4px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
text-align: center;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
/* Phone */
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
[data-tooltip]::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
menu [data-tooltip]::after {
|
|
|
left: 100%;
|
|
|
top: 0%;
|
|
|
}
|
|
|
menu .ML__base {
|
|
|
cursor: default;
|
|
|
}
|
|
|
/** Don't display if we're tracking, i.e. have the pointer down */
|
|
|
.tracking [data-tooltip]:hover::after {
|
|
|
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
/** But do display if tracking and inside a menu */
|
|
|
.tracking menu li[data-tooltip]:hover::after,
|
|
|
[data-tooltip]:hover::after {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
transition-property: opacity, scale;
|
|
|
transition-duration: 0.15s;
|
|
|
transition-delay: 1s;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__prompt {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.ML__editablePromptBox {
|
|
|
outline: 1px solid #acacac;
|
|
|
border-radius: 2px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__focusedPromptBox {
|
|
|
outline: highlight auto 1px;
|
|
|
}
|
|
|
.ML__lockedPromptBox {
|
|
|
background-color: rgba(142, 142, 141, 0.4);
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__correctPromptBox {
|
|
|
outline: 1px solid var(--_correct-color);
|
|
|
box-shadow: 0 0 5px var(--_correct-color);
|
|
|
}
|
|
|
.ML__incorrectPromptBox {
|
|
|
outline: 1px solid var(--_incorrect-color);
|
|
|
box-shadow: 0 0 5px var(--_incorrect-color);
|
|
|
}
|
|
|
.variant-submenu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding: 8px;
|
|
|
}
|
|
|
.variant-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
text-align: center;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.insert-matrix-submenu {
|
|
|
display: grid;
|
|
|
padding: 8px;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
}
|
|
|
.insert-matrix-submenu [part=menu-item] {
|
|
|
font-size: 21px;
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
line-height: 21px;
|
|
|
text-align: center;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.border-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
line-height: 1.2;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.swatches-submenu {
|
|
|
--_swatch-size: 2rem;
|
|
|
--_columns: 4;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
padding: 8px;
|
|
|
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.menu-swatch {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
box-sizing: border-box;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
margin: 2px;
|
|
|
padding: 0;
|
|
|
background: var(--neutral-200);
|
|
|
}
|
|
|
.menu-swatch > .label {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
.menu-swatch > .label > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
min-width: var(--_swatch-size);
|
|
|
min-height: var(--_swatch-size);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.menu-swatch.active {
|
|
|
background: var(--neutral-100);
|
|
|
scale: 1.4;
|
|
|
}
|
|
|
.menu-swatch.active > .label > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.menu-swatch .ui-checkmark,
|
|
|
.menu-swatch .ui-mixedmark {
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: white;
|
|
|
}
|
|
|
.menu-swatch.dark-contrast .ui-checkmark,
|
|
|
.menu-swatch.dark-contrast .ui-mixedmark {
|
|
|
color: #000;
|
|
|
}
|
|
|
`,Ya=`.ML__container {
|
|
|
min-height: auto !important;
|
|
|
--_hue: var(--hue, 212);
|
|
|
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
|
|
|
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
|
|
|
}
|
|
|
.ML__sr-only {
|
|
|
position: absolute;
|
|
|
width: 1px;
|
|
|
height: 1px;
|
|
|
margin: -1px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
clip-path: inset(50%);
|
|
|
white-space: nowrap;
|
|
|
border: 0;
|
|
|
}
|
|
|
.ML__is-inline {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__base {
|
|
|
visibility: inherit;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: text;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
box-sizing: content-box;
|
|
|
border: 0;
|
|
|
outline: 0;
|
|
|
vertical-align: baseline;
|
|
|
font-weight: inherit;
|
|
|
font-family: inherit;
|
|
|
font-style: inherit;
|
|
|
text-decoration: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__strut,
|
|
|
.ML__strut--bottom {
|
|
|
display: inline-block;
|
|
|
min-height: 0.5em;
|
|
|
}
|
|
|
.ML__small-delim {
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
/* Text mode */
|
|
|
.ML__text {
|
|
|
font-family: var(--_text-font-family);
|
|
|
white-space: pre;
|
|
|
}
|
|
|
/* Use cmr for 'math upright' */
|
|
|
.ML__cmr {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.ML__mathit {
|
|
|
font-family: KaTeX_Math;
|
|
|
/* The KaTeX_Math font is italic by default, so the font-style below is only
|
|
|
useful when a fallback font is used
|
|
|
*/
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__mathbf {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
|
|
|
to match TeX idiosyncratic behavior */
|
|
|
.lcGreek.ML__mathbf {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.ML__mathbfit {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: bold;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__ams {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
/* Blackboard */
|
|
|
.ML__bb {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
.ML__cal {
|
|
|
font-family: KaTeX_Caligraphic;
|
|
|
}
|
|
|
.ML__frak {
|
|
|
font-family: KaTeX_Fraktur;
|
|
|
}
|
|
|
.ML__tt {
|
|
|
font-family: KaTeX_Typewriter;
|
|
|
}
|
|
|
.ML__script {
|
|
|
font-family: KaTeX_Script;
|
|
|
}
|
|
|
.ML__sans {
|
|
|
font-family: KaTeX_SansSerif;
|
|
|
}
|
|
|
.ML__series_ul {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_el {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_l {
|
|
|
font-weight: 200;
|
|
|
}
|
|
|
.ML__series_sl {
|
|
|
font-weight: 300;
|
|
|
}
|
|
|
.ML__series_sb {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
.ML__bold,
|
|
|
.ML__boldsymbol {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
.ML__series_eb {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
.ML__series_ub {
|
|
|
font-weight: 900;
|
|
|
}
|
|
|
.ML__series_uc {
|
|
|
font-stretch: ultra-condensed;
|
|
|
}
|
|
|
.ML__series_ec {
|
|
|
font-stretch: extra-condensed;
|
|
|
}
|
|
|
.ML__series_c {
|
|
|
font-stretch: condensed;
|
|
|
}
|
|
|
.ML__series_sc {
|
|
|
font-stretch: semi-condensed;
|
|
|
}
|
|
|
.ML__series_sx {
|
|
|
font-stretch: semi-expanded;
|
|
|
}
|
|
|
.ML__series_x {
|
|
|
font-stretch: expanded;
|
|
|
}
|
|
|
.ML__series_ex {
|
|
|
font-stretch: extra-expanded;
|
|
|
}
|
|
|
.ML__series_ux {
|
|
|
font-stretch: ultra-expanded;
|
|
|
}
|
|
|
.ML__it {
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__shape_ol {
|
|
|
-webkit-text-stroke: 1px black;
|
|
|
text-stroke: 1px black;
|
|
|
color: transparent;
|
|
|
}
|
|
|
.ML__shape_sc {
|
|
|
font-variant: small-caps;
|
|
|
}
|
|
|
.ML__shape_sl {
|
|
|
font-style: oblique;
|
|
|
}
|
|
|
/* First level emphasis */
|
|
|
.ML__emph {
|
|
|
color: #bc2612;
|
|
|
}
|
|
|
/* Second level emphasis */
|
|
|
.ML__emph .ML__emph {
|
|
|
color: #0c7f99;
|
|
|
}
|
|
|
.ML__highlight {
|
|
|
color: #007cb2;
|
|
|
background: #edd1b0;
|
|
|
}
|
|
|
.ML__center {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__label_padding {
|
|
|
padding: 0 0.5em;
|
|
|
}
|
|
|
.ML__frac-line {
|
|
|
width: 100%;
|
|
|
min-height: 1px;
|
|
|
}
|
|
|
.ML__frac-line:after {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: max(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
/* There's a bug since Chrome 62 where
|
|
|
sub-pixel border lines don't draw at some zoom
|
|
|
levels (110%, 90%).
|
|
|
Setting the min-height used to work around it, but that workaround
|
|
|
broke in Chrome 84 or so.
|
|
|
Setting the background (and the min-height) seems to work for now.
|
|
|
*/
|
|
|
background: currentColor;
|
|
|
box-sizing: content-box;
|
|
|
/* Vuetify sets the box-sizing to inherit
|
|
|
causes the fraction line to not draw at all sizes (see #26) */
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__sqrt-sign {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__sqrt-line {
|
|
|
display: inline-block;
|
|
|
height: max(1px, 0.04em);
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__sqrt-line:before {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: min(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
background: currentColor;
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt-line:after {
|
|
|
border-bottom-width: 1px;
|
|
|
content: ' ';
|
|
|
display: block;
|
|
|
margin-top: -0.1em;
|
|
|
}
|
|
|
.ML__sqrt-index {
|
|
|
margin-left: 0.27777778em;
|
|
|
margin-right: -0.55555556em;
|
|
|
}
|
|
|
.ML__delim-size1 {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-size2 {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__delim-size3 {
|
|
|
font-family: KaTeX_Size3;
|
|
|
}
|
|
|
.ML__delim-size4 {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size1 > span {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size4 > span {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__accent-body > span {
|
|
|
font-family: KaTeX_Main;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__accent-vec {
|
|
|
position: relative;
|
|
|
left: 0.24em;
|
|
|
}
|
|
|
/** The markup for a LaTeX formula, either in an editable mathfield or
|
|
|
in a static display.
|
|
|
*/
|
|
|
.ML__latex {
|
|
|
display: inline-block;
|
|
|
direction: ltr;
|
|
|
text-align: left;
|
|
|
text-indent: 0;
|
|
|
text-rendering: auto;
|
|
|
font-family: KaTeX_Main, 'Times New Roman', serif;
|
|
|
font-style: normal;
|
|
|
font-size-adjust: none;
|
|
|
font-stretch: normal;
|
|
|
font-variant-caps: normal;
|
|
|
letter-spacing: normal;
|
|
|
line-height: 1.2;
|
|
|
word-wrap: normal;
|
|
|
word-spacing: normal;
|
|
|
white-space: nowrap;
|
|
|
text-shadow: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__latex .style-wrap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .mfrac {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .left-right {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist-t {
|
|
|
display: inline-table;
|
|
|
table-layout: fixed;
|
|
|
border-collapse: collapse;
|
|
|
}
|
|
|
.ML__latex .vlist-r {
|
|
|
display: table-row;
|
|
|
}
|
|
|
.ML__latex .vlist {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span {
|
|
|
display: block;
|
|
|
height: 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span > span {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist > span > .pstrut {
|
|
|
overflow: hidden;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__latex .vlist-t2 {
|
|
|
margin-right: -2px;
|
|
|
}
|
|
|
.ML__latex .vlist-s {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
font-size: 1px;
|
|
|
width: 2px;
|
|
|
min-width: 2px;
|
|
|
}
|
|
|
.ML__latex .msubsup {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .negativethinspace {
|
|
|
display: inline-block;
|
|
|
margin-left: -0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thinspace {
|
|
|
display: inline-block;
|
|
|
width: 0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .mediumspace {
|
|
|
display: inline-block;
|
|
|
width: 0.22222em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thickspace {
|
|
|
display: inline-block;
|
|
|
width: 0.27778em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .enspace {
|
|
|
display: inline-block;
|
|
|
width: 0.5em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .quad {
|
|
|
display: inline-block;
|
|
|
width: 1em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .qquad {
|
|
|
display: inline-block;
|
|
|
width: 2em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .llap,
|
|
|
.ML__latex .rlap {
|
|
|
width: 0;
|
|
|
position: relative;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner,
|
|
|
.ML__latex .rlap > .inner {
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__latex .llap > .fix,
|
|
|
.ML__latex .rlap > .fix {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner {
|
|
|
right: 0;
|
|
|
}
|
|
|
.ML__latex .rlap > .inner {
|
|
|
left: 0;
|
|
|
}
|
|
|
.ML__latex .rule {
|
|
|
display: inline-block;
|
|
|
border: solid 0;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line,
|
|
|
.ML__latex .underline .underline-line {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:before,
|
|
|
.ML__latex .underline .underline-line:before {
|
|
|
content: '';
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:after,
|
|
|
.ML__latex .underline .underline-line:after {
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: -1px;
|
|
|
}
|
|
|
.ML__latex .stretchy {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .stretchy:before,
|
|
|
.ML__latex .stretchy:after {
|
|
|
content: '';
|
|
|
}
|
|
|
.ML__latex .stretchy svg {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: inherit;
|
|
|
fill: currentColor;
|
|
|
stroke: currentColor;
|
|
|
fill-rule: nonzero;
|
|
|
fill-opacity: 1;
|
|
|
stroke-width: 1;
|
|
|
stroke-linecap: butt;
|
|
|
stroke-linejoin: miter;
|
|
|
stroke-miterlimit: 4;
|
|
|
stroke-dasharray: none;
|
|
|
stroke-dashoffset: 0;
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
width: 50%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-3-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-1 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .nulldelimiter {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-group {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-symbol {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .op-symbol.small-op {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__latex .op-symbol.large-op {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__latex .mtable .vertical-separator {
|
|
|
display: inline-block;
|
|
|
min-width: 1px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .mtable .arraycolsep {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-m > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-c > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-l > .vlist-t {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-r > .vlist-t {
|
|
|
text-align: right;
|
|
|
}
|
|
|
.ML__error {
|
|
|
display: inline-block;
|
|
|
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
|
|
|
background-color: hsla(341, 100%, 40%, 0.1);
|
|
|
background-repeat: repeat-x;
|
|
|
background-size: 3px 3px;
|
|
|
padding-bottom: 3px;
|
|
|
background-position: 0 100%;
|
|
|
}
|
|
|
.ML__error > .ML__error {
|
|
|
background: transparent;
|
|
|
padding: 0;
|
|
|
}
|
|
|
.ML__placeholder {
|
|
|
color: var(--_placeholder-color);
|
|
|
opacity: var(--_placeholder-opacity);
|
|
|
padding-left: 0.4ex;
|
|
|
padding-right: 0.4ex;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
}
|
|
|
.ML__notation {
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
|
|
|
For UI elements, see \`[data-ML__tooltip]\`
|
|
|
*/
|
|
|
.ML__tooltip-container {
|
|
|
position: relative;
|
|
|
transform: scale(0);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content {
|
|
|
position: fixed;
|
|
|
display: inline-table;
|
|
|
visibility: hidden;
|
|
|
z-index: 2;
|
|
|
width: max-content;
|
|
|
max-width: 400px;
|
|
|
padding: 12px 12px;
|
|
|
border-radius: 8px;
|
|
|
background: #616161;
|
|
|
--_selection-color: #fff;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
opacity: 0;
|
|
|
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__text {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__base {
|
|
|
display: contents;
|
|
|
}
|
|
|
.ML__tooltip-container:hover .ML__tooltip-content {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
font-size: 0.75em;
|
|
|
transform: scale(1) translate(0, 3em);
|
|
|
}
|
|
|
`,yf=`#mathlive-environment-popover.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
#mathlive-environment-popover {
|
|
|
--_environment-panel-height: var(--environment-panel-height, 70px);
|
|
|
--_accent-color: var(--accent-color, #aaa);
|
|
|
--_background: var(--environment-panel-background, #fff);
|
|
|
--_button-background: var(--environment-panel-button-background, white);
|
|
|
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
|
|
|
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
|
|
|
--_button-text: var(--environment-panel-button-text, #e3e4e8);
|
|
|
position: absolute;
|
|
|
width: calc(var(--_environment-panel-height) * 2);
|
|
|
height: var(--_environment-panel-height);
|
|
|
border-radius: 4px;
|
|
|
border: 1.5px solid var(--_accent-color);
|
|
|
background-color: var(--_background);
|
|
|
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
|
|
|
pointer-events: all;
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons {
|
|
|
height: calc(var(--_environment-panel-height) * 5/4);
|
|
|
width: calc(var(--_environment-panel-height) * 5/4);
|
|
|
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
|
|
|
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .font {
|
|
|
fill: white;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons circle {
|
|
|
fill: #7f7f7f;
|
|
|
transition: fill 300ms;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
|
|
|
fill-opacity: 1;
|
|
|
fill: var(--_background);
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-width: 3px;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons line {
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-opacity: 0;
|
|
|
stroke-width: 40;
|
|
|
pointer-events: none;
|
|
|
transition: stroke-opacity 300ms;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
|
|
|
height: 100%;
|
|
|
width: 50%;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
|
|
|
width: var(--_environment-panel-height);
|
|
|
height: var(--_environment-panel-height);
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
|
|
|
pointer-events: all;
|
|
|
margin-top: 2px;
|
|
|
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
|
|
|
height: calc(var(--_environment-panel-height) / 3 - 2px);
|
|
|
border-radius: calc(var(--_environment-panel-height) / 25);
|
|
|
background-color: var(--_button-background);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
|
|
|
background-color: var(--_button-background-hover);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
|
|
|
stroke: var(--_button-text);
|
|
|
stroke-width: 2;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
|
|
|
fill-opacity: 0;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
|
|
|
pointer-events: none;
|
|
|
background-color: var(--_button-background-active);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
|
|
|
stroke: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
`,ch=`/* 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;
|
|
|
}
|
|
|
`,cc=`/* 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);*/
|
|
|
}
|
|
|
`,uh=`.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));
|
|
|
}
|
|
|
`,Eu=`:host {
|
|
|
--primary-color: #5898ff;
|
|
|
--primary-color-dimmed: #c0c0f0;
|
|
|
--primary-color-dark: var(--blue-500);
|
|
|
--primary-color-light: var(--blue-100);
|
|
|
--primary-color-reverse: #ffffff;
|
|
|
--secondary-color: #ff8a65;
|
|
|
--secondary-color-dimmed: #f0d5c5;
|
|
|
--secondary-color-dark: var(--orange-500);
|
|
|
--secondary-color-light: var(--orange-100);
|
|
|
--secondary-color-reverse: #ffffff;
|
|
|
--link-color: #5898ff;
|
|
|
--link-color-dimmed: #c5c5c5;
|
|
|
--link-color-dark: #121212;
|
|
|
--link-color-light: #e2e2e2;
|
|
|
--link-color-reverse: #ffffff;
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--neutral-100: #f5f5f5;
|
|
|
--neutral-200: #eeeeee;
|
|
|
--neutral-300: #e0e0e0;
|
|
|
--neutral-400: #bdbdbd;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #757575;
|
|
|
--neutral-700: #616161;
|
|
|
--neutral-800: #424242;
|
|
|
--neutral-900: #212121;
|
|
|
--red-25: #fff8f7;
|
|
|
--red-50: #fff1ef;
|
|
|
--red-100: #ffeae6;
|
|
|
--red-200: #ffcac1;
|
|
|
--red-300: #ffa495;
|
|
|
--red-400: #ff7865;
|
|
|
--red-500: #f21c0d;
|
|
|
--red-600: #e50018;
|
|
|
--red-700: #d30024;
|
|
|
--red-800: #bd002c;
|
|
|
--red-900: #a1002f;
|
|
|
--orange-25: #fffbf8;
|
|
|
--orange-50: #fff7f1;
|
|
|
--orange-100: #fff3ea;
|
|
|
--orange-200: #ffe1c9;
|
|
|
--orange-300: #ffcca2;
|
|
|
--orange-400: #ffb677;
|
|
|
--orange-500: #fe9310;
|
|
|
--orange-600: #f58700;
|
|
|
--orange-700: #ea7c00;
|
|
|
--orange-800: #dc6d00;
|
|
|
--orange-900: #ca5b00;
|
|
|
--brown-25: #fff8ef;
|
|
|
--brown-50: #fff1df;
|
|
|
--brown-100: #ffe9ce;
|
|
|
--brown-200: #ebcca6;
|
|
|
--brown-300: #cdaf8a;
|
|
|
--brown-400: #af936f;
|
|
|
--brown-500: #856a47;
|
|
|
--brown-600: #7f5e34;
|
|
|
--brown-700: #78511f;
|
|
|
--brown-800: #6e4200;
|
|
|
--brown-900: #593200;
|
|
|
--yellow-25: #fffdf9;
|
|
|
--yellow-50: #fffcf2;
|
|
|
--yellow-100: #fffaec;
|
|
|
--yellow-200: #fff2ce;
|
|
|
--yellow-300: #ffe8ab;
|
|
|
--yellow-400: #ffdf85;
|
|
|
--yellow-500: #ffcf33;
|
|
|
--yellow-600: #f1c000;
|
|
|
--yellow-700: #dfb200;
|
|
|
--yellow-800: #c9a000;
|
|
|
--yellow-900: #ad8a00;
|
|
|
--lime-25: #f4ffee;
|
|
|
--lime-50: #e9ffdd;
|
|
|
--lime-100: #ddffca;
|
|
|
--lime-200: #a8fb6f;
|
|
|
--lime-300: #94e659;
|
|
|
--lime-400: #80d142;
|
|
|
--lime-500: #63b215;
|
|
|
--lime-600: #45a000;
|
|
|
--lime-700: #268e00;
|
|
|
--lime-800: #007417;
|
|
|
--lime-900: #005321;
|
|
|
--green-25: #f5fff5;
|
|
|
--green-50: #ebffea;
|
|
|
--green-100: #e0ffdf;
|
|
|
--green-200: #a7ffa7;
|
|
|
--green-300: #5afa65;
|
|
|
--green-400: #45e953;
|
|
|
--green-500: #17cf36;
|
|
|
--green-600: #00b944;
|
|
|
--green-700: #00a34a;
|
|
|
--green-800: #008749;
|
|
|
--green-900: #00653e;
|
|
|
--teal-25: #f3ffff;
|
|
|
--teal-50: #e6fffe;
|
|
|
--teal-100: #d9fffe;
|
|
|
--teal-200: #8dfffe;
|
|
|
--teal-300: #57f4f4;
|
|
|
--teal-400: #43e5e5;
|
|
|
--teal-500: #17cfcf;
|
|
|
--teal-600: #00c2c0;
|
|
|
--teal-700: #00b5b1;
|
|
|
--teal-800: #00a49e;
|
|
|
--teal-900: #009087;
|
|
|
--cyan-25: #f7fcff;
|
|
|
--cyan-50: #eff8ff;
|
|
|
--cyan-100: #e7f5ff;
|
|
|
--cyan-200: #c2e6ff;
|
|
|
--cyan-300: #95d5ff;
|
|
|
--cyan-400: #61c4ff;
|
|
|
--cyan-500: #13a7ec;
|
|
|
--cyan-600: #069eda;
|
|
|
--cyan-700: #0095c9;
|
|
|
--cyan-800: #0088b2;
|
|
|
--cyan-900: #0a7897;
|
|
|
--blue-25: #f7faff;
|
|
|
--blue-50: #eef5ff;
|
|
|
--blue-100: #e5f1ff;
|
|
|
--blue-200: #bfdbff;
|
|
|
--blue-300: #92c2ff;
|
|
|
--blue-400: #63a8ff;
|
|
|
--blue-500: #0d80f2;
|
|
|
--blue-600: #0077db;
|
|
|
--blue-700: #006dc4;
|
|
|
--blue-800: #0060a7;
|
|
|
--blue-900: #005086;
|
|
|
--indigo-25: #f8f7ff;
|
|
|
--indigo-50: #f1efff;
|
|
|
--indigo-100: #eae7ff;
|
|
|
--indigo-200: #ccc3ff;
|
|
|
--indigo-300: #ac99ff;
|
|
|
--indigo-400: #916aff;
|
|
|
--indigo-500: #63c;
|
|
|
--indigo-600: #5a21b2;
|
|
|
--indigo-700: #4e0b99;
|
|
|
--indigo-800: #3b0071;
|
|
|
--indigo-900: #220040;
|
|
|
--purple-25: #fbf7ff;
|
|
|
--purple-50: #f8f0ff;
|
|
|
--purple-100: #f4e8ff;
|
|
|
--purple-200: #e4c4ff;
|
|
|
--purple-300: #d49aff;
|
|
|
--purple-400: #c36aff;
|
|
|
--purple-500: #a219e6;
|
|
|
--purple-600: #9000c4;
|
|
|
--purple-700: #7c009f;
|
|
|
--purple-800: #600073;
|
|
|
--purple-900: #3d0043;
|
|
|
--magenta-25: #fff8fb;
|
|
|
--magenta-50: #fff2f6;
|
|
|
--magenta-100: #ffebf2;
|
|
|
--magenta-200: #ffcddf;
|
|
|
--magenta-300: #ffa8cb;
|
|
|
--magenta-400: #ff7fb7;
|
|
|
--magenta-500: #eb4799;
|
|
|
--magenta-600: #da3689;
|
|
|
--magenta-700: #c82179;
|
|
|
--magenta-800: #b00065;
|
|
|
--magenta-900: #8a004c;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
/* @media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--label-color: #fff;
|
|
|
--active-label-color: #000;
|
|
|
--menu-bg: #525252;
|
|
|
--active-bg: #5898ff;
|
|
|
--active-bg-dimmed: #5c5c5c;
|
|
|
}
|
|
|
} */
|
|
|
:host {
|
|
|
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
|
|
|
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
|
--ui-font-size: 14px;
|
|
|
--ui-line-height: 1.5;
|
|
|
--ui-letter-spacing: 0.007em;
|
|
|
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
|
|
|
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
|
--ui-layer-1: var(--neutral-100);
|
|
|
--ui-layer-2: var(--neutral-200);
|
|
|
--ui-layer-3: var(--neutral-300);
|
|
|
--ui-layer-4: var(--neutral-400);
|
|
|
--ui-layer-5: var(--neutral-500);
|
|
|
--ui-layer-6: var(--neutral-600);
|
|
|
--ui-border-color: var(--primary-color);
|
|
|
--ui-border-radius: 4px;
|
|
|
--ui-text: var(--neutral-900);
|
|
|
--ui-text-secondary: var(--neutral-700);
|
|
|
--ui-text-placeholder: var(--neutral-500);
|
|
|
--ui-text-muted: var(--neutral-300);
|
|
|
/** A field is a UI element in which a user can type data, for
|
|
|
* example an input or textarea element.
|
|
|
*/
|
|
|
--ui-field-bg: var(--neutral-100);
|
|
|
--ui-field-bg-hover: var(--neutral-100);
|
|
|
--ui-field-bg-disabled: var(--neutral-300);
|
|
|
--ui-field-bg-invalid: var(--red-100);
|
|
|
--ui-field-bg-focus: var(--neutral-100);
|
|
|
--ui-field-border: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-hover: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-disabled: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-invalid: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-focus: 0.5px solid var(--border-color);
|
|
|
--ui-menu-bg: var(--neutral-100);
|
|
|
--ui-menu-text: var(--neutral-900);
|
|
|
--ui-menu-bg-hover: var(--neutral-200);
|
|
|
--ui-menu-text-hover: var(--neutral-900);
|
|
|
/** The \`active\` state is used for the state of menu items
|
|
|
* when they are selected.
|
|
|
*/
|
|
|
--ui-menu-bg-active: var(--primary-color);
|
|
|
--ui-menu-text-active: var(--primary-color-reverse);
|
|
|
/** The \`active-muted\` set is used for the state of
|
|
|
* submenus when they are open.
|
|
|
*/
|
|
|
--ui-menu-bg-active-muted: var(--neutral-300);
|
|
|
--ui-menu-text-active-muted: var(--neutral-900);
|
|
|
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
|
|
|
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
|
|
|
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
|
|
|
--ui-menu-divider: 0.5px solid #c7c7c7;
|
|
|
/* var(--neutral-300); */
|
|
|
--ui-menu-z-index: 10000;
|
|
|
--page-bg: var(--neutral-100);
|
|
|
--content-bg: var(--neutral-200);
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
|
|
|
Noto is a Linux/Android font.
|
|
|
*/
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
|
|
|
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
|
|
|
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
|
|
|
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
|
|
|
}
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
|
|
|
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
|
|
|
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
|
|
|
}
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
|
|
|
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
|
|
|
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
|
|
|
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
|
|
|
}
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
|
|
|
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
|
|
|
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh),
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo),
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac),
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std),
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-size: 1rem;
|
|
|
--ui-line-height: 1.7;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
:dir(rtl) {
|
|
|
--ui-line-height: auto;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
`,dh=`.ui-menu *,
|
|
|
.ui-menu ::before,
|
|
|
.ui-menu ::after {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ui-menu {
|
|
|
display: none;
|
|
|
color-scheme: light dark;
|
|
|
-webkit-user-select: none;
|
|
|
/* Important: Safari iOS doesn't respect user-select */
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0 0 0 0);
|
|
|
--active-label-color: #fff;
|
|
|
/* ui-menu-text-active */
|
|
|
--label-color: #121212;
|
|
|
/* ui-menu-text */
|
|
|
--menu-bg: #e2e2e2;
|
|
|
/* ui-menu-background */
|
|
|
--active-bg: #5898ff;
|
|
|
/* ui-menu-background-active */
|
|
|
--active-bg-dimmed: #c5c5c5;
|
|
|
/* ui-menu-background-active-muted */
|
|
|
}
|
|
|
/** Use the :where pseudo selector to make the specificity of the
|
|
|
* selector 0, so that it can be overridden by the user.
|
|
|
*/
|
|
|
:where(.ui-menu-container) {
|
|
|
position: absolute;
|
|
|
overflow: visible;
|
|
|
width: auto;
|
|
|
height: auto;
|
|
|
z-index: 10000;
|
|
|
border-radius: 8px;
|
|
|
background: var(--ui-menu-bg);
|
|
|
box-shadow: var(--ui-menu-shadow);
|
|
|
list-style: none;
|
|
|
padding: 6px 0 6px 0;
|
|
|
margin: 0;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
color: var(--ui-menu-text);
|
|
|
font-weight: normal;
|
|
|
font-style: normal;
|
|
|
text-shadow: none;
|
|
|
text-transform: none;
|
|
|
letter-spacing: 0;
|
|
|
outline: none;
|
|
|
opacity: 1;
|
|
|
/* The [popover] elements have a 1px solid black border. Ugh. */
|
|
|
border: none;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:where(.ui-menu-container > li) {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
align-items: center;
|
|
|
padding: 1px 7px 1px 7px;
|
|
|
margin-top: 0;
|
|
|
margin-left: 6px;
|
|
|
margin-right: 6px;
|
|
|
border-radius: 4px;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
outline: none;
|
|
|
fill: currentColor;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
text-align: left;
|
|
|
color: inherit;
|
|
|
font-family: var(--ui-font-family);
|
|
|
font-size: var(--ui-font-size);
|
|
|
line-height: var(--ui-line-height);
|
|
|
letter-spacing: var(--ui-letter-spacing);
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label) {
|
|
|
appearance: none;
|
|
|
background: none;
|
|
|
outline: none;
|
|
|
width: 100%;
|
|
|
margin: 0;
|
|
|
padding: 1px 2px 1px 1px;
|
|
|
overflow: visible;
|
|
|
border: 1px solid transparent;
|
|
|
white-space: nowrap;
|
|
|
text-align: start;
|
|
|
}
|
|
|
:where(.ui-menu-container > li:has(.heading)) {
|
|
|
margin-top: 0.5em;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.heading) {
|
|
|
font-weight: bold;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.indent > .label) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.indent) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[role='divider']) {
|
|
|
border-bottom: 1px solid var(--ui-menu-divider);
|
|
|
border-radius: 0;
|
|
|
padding: 0;
|
|
|
margin-left: 15px;
|
|
|
margin-right: 15px;
|
|
|
padding-top: 5px;
|
|
|
margin-bottom: 5px;
|
|
|
width: calc(100% - 30px);
|
|
|
/** 100% - (margin-left + margin-right) */
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-disabled='true']) {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active) {
|
|
|
background: var(--ui-menu-bg-active);
|
|
|
background: -apple-system-control-accent;
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active.is-submenu-open) {
|
|
|
background: var(--ui-menu-bg-active-muted);
|
|
|
color: inherit;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
|
|
|
padding-inline-end: 0;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
/** Keyboard shortcut */
|
|
|
:where(.ui-menu-container > li > kbd) {
|
|
|
font-family: var(--ui-font-family);
|
|
|
margin-inline-start: 12px;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active > kbd) {
|
|
|
opacity: 0.85;
|
|
|
}
|
|
|
.ui-trailing-chevron {
|
|
|
display: flex;
|
|
|
margin-inline-start: 24px;
|
|
|
width: 10px;
|
|
|
height: 10px;
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
.ui-trailing-chevron:dir(rtl) {
|
|
|
transform: scaleX(-1);
|
|
|
}
|
|
|
.ui-checkmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
.ui-mixedmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
`,eo;function Hl(a){let y="";switch(a){case"mathfield-element":y=`
|
|
|
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
|
|
|
:host([hidden]) { display: none; }
|
|
|
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
|
|
|
:host(:focus), :host(:focus-within) {
|
|
|
outline: Highlight auto 1px; /* For Firefox */
|
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
|
}
|
|
|
:host([readonly]:focus), :host([readonly]:focus-within),
|
|
|
:host([read-only]:focus), :host([read-only]:focus-within) {
|
|
|
outline: none;
|
|
|
}
|
|
|
@media (hover: none) and (pointer: coarse) {
|
|
|
:host(:not(:focus)) :first-child { pointer-events: none !important; }
|
|
|
}`;break;case"core":y=Ya;break;case"mathfield":y=vf;break;case"environment-popover":y=yf;break;case"suggestion-popover":y=ch;break;case"keystroke-caption":y=cc;break;case"virtual-keyboard":y=uh;break;case"ui":y=Eu;break;case"menu":y=dh;break;default:debugger}return y}function uc(a){return eo||(eo={}),eo[a]||(eo[a]=new CSSStyleSheet,eo[a].replaceSync(Hl(a))),eo[a]}var ol;function _s(a){var y;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${a}`))return;const b=window.document.createElement("style");b.id=`mathlive-style-${a}`,b.append(window.document.createTextNode(Hl(a))),window.document.head.appendChild(b);return}if(ol||(ol={}),((y=ol[a])!=null?y:0)!==0)ol[a]+=1;else{const b=uc(a);document.adoptedStyleSheets=[...document.adoptedStyleSheets,b],ol[a]=1}}function x(a){if("adoptedStyleSheets"in document&&ol!=null&&ol[a]&&(ol[a]-=1,ol[a]<=0)){const y=eo[a];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(b=>b!==y)}}var z=class _p extends Gn{constructor(y){var b;super(me(xe({},y),{type:"accent",body:(b=y.body)!=null?b:void 0})),y.accentChar?this.accent=y.accentChar:this.svgAccent=y==null?void 0:y.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(y){return new _p(y)}toJson(){return me(xe({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(y){var b;const E=new La({parent:y,mathstyle:"cramp"},this.style),ee=(b=Gn.createBox(E,this.body))!=null?b:new Dr("\u25A2",{style:this.style});let re=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(re=ee.skew);let ae=Math.min(ee.height,el),fe;if(this.svgAccent)fe=Os(this.svgAccent),ae=E.metrics.bigOpSpacing1-ae;else if(this.accent){const be=new Dr(this.accent,{fontFamily:"Main-Regular"});be.italic=0;const Me=this.accent===8407?" ML__accent-vec":"";fe=new Dr(new Dr(be),{classes:"ML__accent-body"+Me})}fe=new Qa({shift:0,children:[{box:new Dr(ee)},-ae,{box:fe,marginLeft:ee.left+2*re,classes:["ML__center"]}]});const ge=new Dr(fe,{type:"lift"});return this.caret&&(ge.caret=this.caret),this.bind(E,ge.wrap(E)),this.attachSupsub(E,{base:ge})}},ne={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},te=Object.fromEntries(Object.entries(ne).map(([a,y])=>[y,a]));function ie(a){var y;return(y={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[a])!=null?y:a.codePointAt(0)}function ce(a,y,b,E){var ee;const ae=new Dr(ie(a),{fontFamily:"Main-Regular",isSelected:E.isSelected,classes:"ML__small-delim "+((ee=E.classes)!=null?ee:"")}).wrap(y);return b&&ae.setTop((1-y.scalingFactor)*os),ae}function ye(a,y,b,E,ee){var re,ae;const fe=new La({parent:E,mathstyle:"textstyle"},ee==null?void 0:ee.style),ge=new Dr(ie(a),{fontFamily:`Size${y}-Regular`,isSelected:ee.isSelected,classes:((re=ee.classes)!=null?re:"")+` ML__delim-size${y}`,type:(ae=ee.type)!=null?ae:"ignore"}).wrap(fe);return b&&ge.setTop((1-fe.scalingFactor)*os),ge}function _e(a,y,b,E,ee){var re;let ae,fe,ge,be;ae=ge=be=ie(a),fe=null;let Me="Size1-Regular";a==="\\vert"||a==="\\lvert"||a==="\\rvert"||a==="\\mvert"||a==="\\mid"?ge=ae=be=8739:a==="\\Vert"||a==="\\lVert"||a==="\\rVert"||a==="\\mVert"||a==="\\|"?ge=ae=be=8741:a==="\\uparrow"?ge=be=9168:a==="\\Uparrow"?ge=be=8214:a==="\\downarrow"?ae=ge=9168:a==="\\Downarrow"?ae=ge=8214:a==="\\updownarrow"?(ae=8593,ge=9168,be=8595):a==="\\Updownarrow"?(ae=8657,ge=8214,be=8659):a==="["||a==="\\lbrack"?(ae=9121,ge=9122,be=9123,Me="Size4-Regular"):a==="]"||a==="\\rbrack"?(ae=9124,ge=9125,be=9126,Me="Size4-Regular"):a==="\\lfloor"||a==="\u230A"?(ge=ae=9122,be=9123,Me="Size4-Regular"):a==="\\lceil"||a==="\u2308"?(ae=9121,ge=be=9122,Me="Size4-Regular"):a==="\\rfloor"||a==="\u230B"?(ge=ae=9125,be=9126,Me="Size4-Regular"):a==="\\rceil"||a==="\u2309"?(ae=9124,ge=be=9125,Me="Size4-Regular"):a==="("||a==="\\lparen"?(ae=9115,ge=9116,be=9117,Me="Size4-Regular"):a===")"||a==="\\rparen"?(ae=9118,ge=9119,be=9120,Me="Size4-Regular"):a==="\\{"||a==="\\lbrace"?(ae=9127,fe=9128,be=9129,ge=9130,Me="Size4-Regular"):a==="\\}"||a==="\\rbrace"?(ae=9131,fe=9132,be=9133,ge=9130,Me="Size4-Regular"):a==="\\lgroup"||a==="\u27EE"?(ae=9127,be=9129,ge=9130,Me="Size4-Regular"):a==="\\rgroup"||a==="\u27EF"?(ae=9131,be=9133,ge=9130,Me="Size4-Regular"):a==="\\lmoustache"||a==="\u23B0"?(ae=9127,be=9133,ge=9130,Me="Size4-Regular"):a==="\\rmoustache"||a==="\u23B1"?(ae=9131,be=9129,ge=9130,Me="Size4-Regular"):a==="\\surd"?(ae=57345,be=9143,ge=57344,Me="Size4-Regular"):a==="\\ulcorner"?(ae=9484,ge=be=32):a==="\\urcorner"?(ae=9488,ge=be=32):a==="\\llcorner"?(be=9492,ge=ae=32):a==="\\lrcorner"&&(ae=9496,ge=ae=32);const Ne=tl(ae,Me),et=Ne.height+Ne.depth,xt=tl(ge,Me),It=xt.height+xt.depth,In=tl(be,Me),_r=In.height+In.depth;let Ln=0,sr=1;if(fe!==null){const qo=tl(fe,Me);Ln=qo.height+qo.depth,sr=2}const Pr=et+_r+Ln,mr=Math.max(0,Math.ceil((y-Pr)/(sr*It))),di=Pr+mr*sr*It;let Pi=os;b&&(Pi=Pi*E.scalingFactor);const bi=di/2-Pi,Pa=.008,qa=[];qa.push({box:new Dr(be,{fontFamily:Me})}),qa.push(-Pa);const Kr=new Dr(ge,{fontFamily:Me});if(fe===null)for(let qo=0;qo<mr;qo++)qa.push({box:Kr});else{for(let qo=0;qo<mr;qo++)qa.push({box:Kr});qa.push(-Pa),qa.push({box:new Dr(fe,{fontFamily:Me})}),qa.push(-Pa);for(let qo=0;qo<mr;qo++)qa.push({box:Kr})}qa.push(-Pa),qa.push({box:new Dr(ae,{fontFamily:Me})});let Fs="";Me==="Size1-Regular"?Fs=" delim-size1":Me==="Size4-Regular"&&(Fs=" delim-size4");const _l=new Qa({bottom:bi,children:qa},{classes:Fs});return new Dr(_l,me(xe({},ee!=null?ee:{}),{classes:((re=ee==null?void 0:ee.classes)!=null?re:"")+" ML__delim-mult"}))}var Pe=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),$e=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),bt=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Pt=[0,1.2,1.8,2.4,3];function gn(a,y,b,E){return a===void 0||a==="."?oi(b,E.classes):(a==="<"||a==="\\lt"||a==="\u27E8"?a="\\langle":(a===">"||a==="\\gt"||a==="\u27E9")&&(a="\\rangle"),Pe.has(a)||bt.has(a)?ye(a,y,!1,b,E):$e.has(a)?_e(a,Pt[y],!1,b,E):(console.assert(!1,"Unknown delimiter '"+a+"'"),null))}var on=[{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}],Qn=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],yr=[{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 $r(a){return a.type==="small"?"Main-Regular":a.type==="large"?"Size"+a.size+"-Regular":(console.assert(a.type==="stack"),"Size4-Regular")}function Xr(a,y,b,E){const ee={"-4":0,"-3":1,0:2}[E.mathstyle.sizeDelta];for(let re=ee;re<b.length&&b[re].type!=="stack";re++){const ae=tl(a,$r(b[re]));if(ae.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let fe=ae.height+ae.depth;if(b[re].type==="small"&&(b[re].mathstyle==="scriptscriptstyle"?fe*=Math.max(pu[Math.max(1,E.size-2)],E.minFontScale):b[re].mathstyle==="scriptstyle"&&(fe*=Math.max(pu[Math.max(1,E.size-1)],E.minFontScale))),fe>y)return b[re]}return b[b.length-1]}function ai(a,y,b,E,ee,re){if(!y||y.length===0||y===".")return oi(ee);y==="<"||y==="\\lt"?y="\\langle":(y===">"||y==="\\gt")&&(y="\\rangle");let ae;bt.has(y)?ae=on:Pe.has(y)?ae=yr:ae=Qn;const fe=Xr(ie(y),b,ae,ee),ge=new La({parent:ee,mathstyle:fe.mathstyle},re==null?void 0:re.style);return fe.type==="small"?ce(y,ge,E,me(xe({},re),{type:a})):fe.type==="large"?ye(y,fe.size,E,ge,me(xe({},re),{type:a})):(console.assert(fe.type==="stack"),_e(y,b,E,ge,me(xe({},re),{type:a})))}function Zr(a,y,b,E,ee,re){if(y===".")return oi(ee,re==null?void 0:re.classes);const ae=os*ee.scalingFactor,fe=901,ge=5/Nl,be=Math.max(b-ae,E+ae),Me=Math.max(be/500*fe,2*be-ge);return ai(a,y,Me,!0,ee,re)}function oi(a,y){const b=new Dr(null,{classes:" nulldelimiter "+(y!=null?y:""),type:"ignore"});return b.width=a.getRegisterAsEm("nulldelimiterspace"),b.wrap(new La({parent:a,mathstyle:"textstyle"}))}var Ki=class Lp extends Gn{constructor(y){var b;super({type:"placeholder",command:"\\placeholder",mode:(b=y==null?void 0:y.mode)!=null?b:"math",style:y==null?void 0:y.style}),this.captureSelection=!0}static fromJson(y){return new Lp(y)}toJson(){return super.toJson()}render(y){let b;return this.value=y.placeholderSymbol,typeof y.renderPlaceholder=="function"?b=y.renderPlaceholder(y):b=this.createBox(y),this.caret&&(b.classes+=" ML__placeholder-selected"),b}_serialize(y){return y.skipPlaceholders?"":"\\placeholder{}"}},ji=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],ba=["cases","dcases","rcases"],to=["align","align*","aligned","gather","gathered","split"],Wo=["array","subequations","eqnarray"];function bo(a){return Wo.concat(to).concat(ba).concat(ji).includes(a)}function us(a){return ji.includes(a)}function ds(a){return ba.includes(a)}function Do(a){return to.includes(a)}function fs(a,y,b){let E=0;for(const be of b)"align"in be&&(E+=1);let ee=0;const re=[];for(const be of y){let Me=0;for(ee=Math.max(ee,Math.min(be.length,E));Me<be.length;){const Ne=[],et=Math.min(be.length,Me+E);for(;Me<et;){const xt=be[Me];xt.length===0?Ne.push([new Gn({type:"first",mode:a.mode})]):xt[0].type!=="first"?Ne.push([new Gn({type:"first",mode:a.mode}),...xt]):(console.assert(!xt.slice(1).some(It=>It.type==="first")),Ne.push(xt)),Me+=1}re.push(Ne)}}re.length>0&&re[re.length-1].length===1&&re[re.length-1][0].length===1&&re[re.length-1][0][0].type==="first"&&re.pop();const ae=[];for(const be of re){if(be.length!==ee)for(let Me=be.length;Me<ee;Me++)be.push([new Gn({type:"first",mode:a.mode}),new Ki]);ae.push(be)}let fe=0,ge=0;for(const be of ae){ge=0;for(const Me of be){for(const Ne of Me)Ne.parent=a,Ne.parentBranch=[fe,ge];ge+=1}fe+=1}return a.isDirty=!0,ae}var sa=class Ap extends Gn{constructor(y,b,E,ee={}){var re;super({type:"array"}),this.environmentName=y,this.rowGaps=E,ee.mathstyleName&&(this.mathstyleName=ee.mathstyleName),ee.columns&&(ee.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=ee.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=fs(this,b,this.colFormat),ee.leftDelim&&(this.leftDelim=ee.leftDelim),ee.rightDelim&&(this.rightDelim=ee.rightDelim),ee.arraycolsep!==void 0&&(this.arraycolsep=ee.arraycolsep),this.colSeparationType=ee.colSeparationType,ee.arraystretch!==void 0&&(this.arraystretch=ee.arraystretch),this.minColumns=(re=ee.minColumns)!=null?re:1}static fromJson(y){return new Ap(y.environmentName,y.array,y.rowGaps,y)}toJson(){const y=me(xe({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(b=>b.map(E=>E.map(ee=>ee.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(y.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(y.arraycolsep=this.arraycolsep),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}branch(y){var b;if(Dc(y))return(b=this.array[y[0]][y[1]])!=null?b:void 0}createBranch(y){var b;return Dc(y)?(this.isDirty=!0,(b=this.branch(y))!=null?b:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(y=>!!y.align).length}removeBranch(y){if(il(y))return super.removeBranch(y);const b=this.branch(y);return this.array[y[0]][y[1]]=void 0,b.forEach(E=>{E.parent=void 0,E.parentBranch=void 0}),console.assert(b[0].type==="first"),b.shift(),this.isDirty=!0,b}get hasChildren(){return this.children.length>0}get children(){const y=[];for(const b of this.array)for(const E of b)if(E)for(const ee of E)y.push(...ee.children),y.push(ee);return[...y,...super.children]}render(y){var b,E,ee,re,ae,fe;const ge=new La({parent:y,mathstyle:this.mathstyleName},this.style),be=ge.getRegisterAsEm("arrayrulewidth"),Me=ge.getRegisterAsEm("arraycolsep"),Ne=ge.getRegisterAsEm("doublerulesep"),et=(E=(b=this.arraystretch)!=null?b:ge.getRegisterAsNumber("arraystretch"))!=null?E:1;let xt=typeof this.arraycolsep=="number"?this.arraycolsep:Me;this.colSeparationType==="small"&&(xt=.2778*(new La({parent:y,mathstyle:"scriptstyle"}).scalingFactor/y.scalingFactor));const It=et*hu,In=.7*It,_r=.3*It;let Ln=0;const sr=[];let Pr=0;const mr=this.array.length;for(let ro=0;ro<mr;++ro){const Lo=this.array[ro];Pr=Math.max(Pr,Lo.length);const Jo=new La({parent:ge,mathstyle:this.mathstyleName},this.style);let Ll=In/Jo.scalingFactor,Al=_r/Jo.scalingFactor;const Tl={cells:[],height:0,depth:0,pos:0};for(const cl of Lo){const e0=(ee=Gn.createBox(Jo,cl,{type:"ignore"}))!=null?ee:new Dr(null,{type:"ignore"});Al=Math.max(Al,e0.depth),Ll=Math.max(Ll,e0.height),Tl.cells.push(e0)}let Il=(re=sd(this.rowGaps[ro]))!=null?re:0;Il>0&&(Il+=_r,Al=Math.max(Al,Il),Il=0),ro<mr-1&&!us(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Al+=ge.getRegisterAsEm("jot")),Tl.height=Ll,Tl.depth=Al,Ln+=Ll,Tl.pos=Ln,Ln+=Al+Il,sr.push(Tl)}const di=Ln/2+os,Pi=[];for(let ro=0;ro<Pr;ro++){const Lo=[];for(const Jo of sr){const Ll=Jo.cells[ro];Ll.depth=Jo.depth,Ll.height=Jo.height,Lo.push({box:Ll,shift:Jo.pos-di})}Lo.length>0&&Pi.push(new Qa({individualShift:Lo}))}const bi=[];let Pa=!1,qa=!1,Kr=0,Fs=!this.leftDelim;const{colFormat:_l}=this;for(const ro of _l){if("align"in ro&&Kr>=Pi.length)break;if("align"in ro)Pa?bi.push(xo(2*xt)):(qa||Fs)&&bi.push(xo(xt)),bi.push(new Dr(Pi[Kr],{classes:"col-align-"+ro.align})),Kr++,Pa=!0,qa=!1,Fs=!1;else if("gap"in ro){if(typeof ro.gap=="number")bi.push(xo(ro.gap));else{const Lo=Co(y,sr,di,ro.gap);Lo&&bi.push(Lo)}Pa=!1,qa=!1,Fs=!1}else if("separator"in ro){const Lo=new Dr(null,{classes:"vertical-separator"});Lo.height=Ln,Lo.setStyle("height",Ln,"em"),Lo.setStyle("border-right",`${be}em ${ro.separator} currentColor`),Lo.setStyle("vertical-align",-(Ln-di),"em");let Jo=0;qa?Jo=Ne-be:Pa&&(Jo=xt-be),Lo.left=Jo,bi.push(Lo),Pa=!1,qa=!0,Fs=!1}}Pa&&!this.rightDelim&&bi.push(xo(xt));const Xs=new Dr(bi,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(Xs.caret=this.caret),this.bind(y,Xs);const qo=Xs.height,zs=Xs.depth,Es=this.bind(y,new Dr([this.bind(y,Zr("open",(ae=this.leftDelim)!=null?ae:".",qo,zs,ge,{isSelected:this.isSelected})),Xs,this.bind(y,Zr("close",(fe=this.rightDelim)!=null?fe:".",qo,zs,ge,{isSelected:this.isSelected}))],{type:"ord"}));return Es?(Es.setStyle("display","inline-block"),this.caret&&(Es.caret=this.caret),this.bind(y,this.attachSupsub(y,{base:Es}))):null}_serialize(y){var b;const E=[];if(this.environmentName==="lines"?E.push("{\\displaylines"):E.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(E.push("{"),this.colFormat!==void 0)for(const ee of this.colFormat)"align"in ee&&typeof ee.align=="string"?E.push(ee.align):"separator"in ee&&ee.separator==="solid"?E.push("|"):"separator"in ee&&ee.separator==="dashed"&&E.push(":");E.push("}")}for(let ee=0;ee<this.array.length;ee++){for(let re=0;re<this.array[ee].length;re++)re>0&&E.push(" & "),E.push(Gn.serialize(this.array[ee][re],y));if(ee<this.array.length-1){const re=this.rowGaps[ee];re!=null&&re.dimension?E.push(`\\\\[${re.dimension} ${(b=re.unit)!=null?b:"pt"}] `):E.push("\\\\ ")}}return this.environmentName==="lines"?E.push("}"):E.push(`\\end{${this.environmentName}}`),ya(E)}getCell(y,b){return this.array[y][b]}setCell(y,b,E){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[y][b]!==void 0);for(const re of this.array[y][b])re.parent=void 0,re.parentBranch=void 0;let ee=E;(E.length===0||E[0].type!=="first")&&(ee=[new Gn({type:"first",mode:this.mode}),...E]),this.array[y][b]=ee;for(const re of ee)re.parent=this,re.parentBranch=[y,b];this.isDirty=!0}addRowBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(So(this));this.array.splice(y,0,b);for(let E=y;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addRowAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));const b=[];for(let E=0;E<this.colCount;E++)b.push(So(this));this.array.splice(y+1,0,b);for(let E=y+1;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}removeRow(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>y);const b=this.array.splice(y,1);for(const E of b)for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0;for(let E=y;E<this.rowCount;E++)for(let ee=0;ee<this.colCount;ee++){const re=this.array[E][ee];if(re)for(const ae of re)ae.parentBranch=[E,ee]}this.isDirty=!0}addColumnBefore(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y,0,So(this));for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumnAfter(y){console.assert(this.type==="array"&&Array.isArray(this.array));for(const b of this.array)b.splice(y+1,0,So(this));for(let b=0;b<this.rowCount;b++)for(let E=y+1;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(y){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>y);for(const b of this.array){const E=b.splice(y,1);for(const ee of E)if(ee)for(const re of ee)re.parent=void 0,re.parentBranch=void 0}for(let b=0;b<this.rowCount;b++)for(let E=y;E<this.colCount;E++){const ee=this.array[b][E];if(ee)for(const re of ee)re.parentBranch=[b,E]}this.isDirty=!0}get cells(){const y=[];for(const b of this.array)for(const E of b)E&&y.push(E.filter(ee=>ee.type!=="first"));return y}};function So(a){const y=new Gn({type:"first",mode:a.mode});y.parent=a;const b=new Ki;return b.parent=a,[y,b]}function xo(a){const y=new Dr(null,{classes:"arraycolsep"});return y.width=a,y}function Co(a,y,b,E){if(!E)return null;const ee=[];for(const re of y){const ae=Gn.createBox(a,E,{type:"ignore"});ae&&(ae.depth=re.depth,ae.height=re.height,ee.push({box:ae,shift:re.pos-b}))}return new Qa({individualShift:ee}).wrap(a)}var ko=class Tp extends Gn{constructor(y){super({mode:y.mode,command:y.command,style:y.style,body:y.body,type:"box"}),this.framecolor=y.framecolor,this.backgroundcolor=y.backgroundcolor,this.padding=y.padding,this.offset=y.offset,this.border=y.border}static fromJson(y){return new Tp(y)}toJson(){return me(xe({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(y){var b,E,ee,re;const ae=Gn.createBox(y,this.body,{type:"lift"});if(!ae)return null;const fe=y.toEm((b=this.offset)!=null?b:{dimension:0});ae.depth+=fe,ae.setStyle("display","inline-block"),ae.setStyle("position","relative"),ae.setStyle("height",Math.floor(100*ae.height+ae.depth)/100,"em"),ae.setStyle("vertical-align",-Math.floor(100*ae.height)/100,"em");const ge=new La({parent:y},this.style),be=ge.toEm((E=this.padding)!=null?E:{register:"fboxsep"}),Me=new Dr(null,{classes:"ML__box"});Me.height=ae.height+be,Me.depth=ae.depth+be,Me.setStyle("box-sizing","border-box"),Me.setStyle("position","absolute"),Me.setStyle("top",-be+.3,"em"),Me.setStyle("left",0),Me.setStyle("height",Me.height+Me.depth,"em"),Me.setStyle("width","100%"),this.backgroundcolor&&Me.setStyle("background-color",(ee=ge.toColor(this.backgroundcolor))!=null?ee:"transparent"),this.framecolor&&Me.setStyle("border",`${ge.getRegisterAsEm("fboxrule",2)}em solid ${(re=ge.toColor(this.framecolor))!=null?re:"black"}`),this.border&&Me.setStyle("border",this.border);const Ne=new Dr([Me,ae],{type:"lift"});return Ne.setStyle("display","inline-block"),Ne.setStyle("position","relative"),Ne.setStyle("line-height",0),Ne.height=ae.height+be+(fe>0?fe:0),Ne.depth=ae.depth+be+(fe<0?-fe:0),Ne.setStyle("padding-left",be,"em"),Ne.setStyle("padding-right",be,"em"),Ne.setStyle("height",Math.floor(100*(ae.height+ae.depth+2*be+Math.abs(fe)))/100,"em"),Ne.setStyle("margin-top",-be,"em"),Ne.setStyle("top",Math.floor(100*(ae.depth-ae.height+2*be-fe))/100,"em"),Ne.setStyle("vertical-align",Math.floor(100*(ae.depth+2*be))/100,"em"),this.caret&&(Ne.caret=this.caret),this.attachSupsub(y,{base:Ne})}_serialize(y){return y.skipStyles?ya([this.bodyToLatex(y),this.supsubToLatex(y)]):super._serialize(y)}},Wl=class Ip extends Gn{constructor(y,b){var E;super({type:"composition",mode:(E=b==null?void 0:b.mode)!=null?E:"math",value:y})}static fromJson(y){return new Ip(y.value,y)}toJson(){return super.toJson()}get computedStyle(){return{}}render(y){const b=new Dr(this.value,{classes:"ML__composition",type:"composition"});return this.bind(y,b),this.caret&&(b.caret=this.caret),b}_serialize(y){return""}},ys=class Dp extends Gn{constructor(y){super({type:"error",value:y,command:y,mode:"math"}),this.verbatimLatex=y}static fromJson(y){return new Dp(y.command)}toJson(){return super.toJson()}render(y){const b=this.createBox(y,{classes:"ML__error"});return this.caret&&(b.caret=this.caret),b}},Go=class Pp extends Gn{constructor(y,b,E){super({type:"group",mode:b,style:E}),this.body=y,this.boxType=y.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,y&&y.length===1&&y[0].command===","&&(this.captureSelection=!0)}static fromJson(y){return new Pp(y.body,y.mode,y.style)}render(y){const b=Gn.createBox(y,this.body,{type:this.boxType});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):`{${this.bodyToLatex(y)}}`}},Wa=class Op extends Gn{constructor(y,b,E){super({type:"leftright",style:E.style,displayContainsHighlight:!0}),this.variant=y,this.body=b,this.leftDelim=E.leftDelim,this.rightDelim=E.rightDelim}static fromJson(y){var b;return new Op((b=y.variant)!=null?b:"",y.body,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),y}_serialize(y){var b,E;const ee=this.matchingRightDelim();return this.variant==="left...right"?ya(["\\left",(b=this.leftDelim)!=null?b:".",this.bodyToLatex(y),"\\right",ee]):this.variant==="mleft...mright"?ya(["\\mleft",(E=this.leftDelim)!=null?E:".",this.bodyToLatex(y),"\\mright",ee]):ya([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(y),ee])}matchingRightDelim(){var y,b;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const E=(y=this.leftDelim)!=null?y:".";return(b=ne[E])!=null?b:E}render(y){var b,E;const ee=new La({parent:y},this.style);console.assert(this.body!==void 0);const re=new La({parent:y,mathstyle:"textstyle"},this.style),ae=(b=Gn.createBox(ee,this.body,{type:"inner"}))!=null?b:new Dr(null,{type:"inner"}),fe=ae.height/re.scalingFactor,ge=ae.depth/re.scalingFactor,be=[];if(this.leftDelim&&be.push(this.bind(re,Zr("open",this.leftDelim,fe,ge,re,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),ae&&($o(ae.children,this,ee,fe,ge),be.push(ae)),this.rightDelim){let xt=this.containsCaret?" ML__contains-caret":"",It=this.rightDelim;It==="?"&&(ee.smartFence?(It=this.matchingRightDelim(),xt+=" ML__smart-fence__close"):It="."),be.push(this.bind(re,Zr("close",It,fe,ge,re,{isSelected:this.isSelected,classes:xt+" ML__close",mode:this.mode,style:this.style})))}let Me=this.variant==="mleft...mright";const Ne=this.leftSibling;Ne&&(!Me&&Ne.isFunction&&(Me=!0),!Me&&Ne.type==="subsup"&&((E=Ne.leftSibling)!=null&&E.isFunction)&&(Me=!0));const et=new Dr(be,{type:Me?"close":"inner",classes:"left-right"});return et.setStyle("margin-top",`${-ae.depth}em`),et.setStyle("height",`${ae.height+ae.depth}em`),this.caret&&(et.caret=this.caret),this.bind(ee,et.wrap(ee))}};function $o(a,y,b,E,ee){if(a)for(let re=0;re<a.length;re++){const ae=a[re];ae.type==="middle"?(a[re]=y.bind(b,Zr("inner",ae.value,E,ee,b,{isSelected:y.isSelected})),a[re].caret=ae.caret,a[re].isSelected=ae.isSelected,a[re].cssId=ae.cssId,a[re].htmlData=ae.htmlData,a[re].htmlStyle=ae.htmlStyle,a[re].attributes=ae.attributes,a[re].cssProperties=ae.cssProperties):ae.children&&$o(ae.children,y,b,E,ee)}}var Mu=class Rp extends Gn{constructor(y,b){var E;super({type:"macro",command:y,style:b.style}),this.body=b.body,b.captureSelection===void 0?b.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=b.captureSelection,this.macroArgs=b.args,this.expand=(E=b.expand)!=null?E:!1}static fromJson(y){return new Rp(y.command,y)}toJson(){const y=super.toJson();return this.expand&&(y.expand=!0),this.captureSelection!==void 0&&(y.captureSelection=this.captureSelection),this.macroArgs&&(y.args=this.macroArgs),y}_serialize(y){var b;return y.expandMacro&&this.expand?this.bodyToLatex(y):this.command+((b=this.macroArgs)!=null?b:"")}render(y){const b=Gn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},sl=class Bp extends Gn{constructor(){super({type:"macro-argument"})}static fromJson(y){return new Bp}toJson(){return super.toJson()}_serialize(y){return""}render(y){return null}},xl=class $p extends Gn{constructor(y,b,E=!1,ee,re){var ae;super({type:"prompt",mode:(ae=re==null?void 0:re.mode)!=null?ae:"math",style:re==null?void 0:re.style,command:"\\placeholder"}),this.body=ee,this.correctness=b,this.placeholderId=y,this.locked=E,this.captureSelection=this.locked}static fromJson(y){return new $p(y.placeholderId,y.correctness,y.locked,y.body,y)}toJson(){const y=super.toJson();return this.placeholderId&&(y.placeholderId=this.placeholderId),this.body||delete y.body,this.body&&(y.body=this.body.filter(b=>b.type!=="first").map(b=>b.toJson())),this.correctness&&(y.correctness=this.correctness),y.locked=this.locked,y}render(y){const b=new La({parent:y}),E=b.getRegisterAsEm("fboxsep"),ee=E,re=E,ae=Gn.createBox(y,this.body);if(!ae)return null;ae.height||(ae.height=b.metrics.xHeight),ae.setStyle("vertical-align",-ae.height,"em"),this.correctness==="correct"?ae.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&ae.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const fe=new Dr(ae,{type:"ord"});fe.setStyle("display","inline-block"),fe.setStyle("height",ae.height+ae.depth,"em"),fe.setStyle("vertical-align",-re,"em");let ge="ML__prompt ";this.locked?ge+=" ML__lockedPromptBox ":ge+=" ML__editablePromptBox ",this.correctness==="correct"?ge+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(ge+=" ML__incorrectPromptBox "),this.containsCaret&&(ge+=" ML__focusedPromptBox ");const be=new Dr(null,{classes:ge,attributes:{part:"prompt"}});be.height=fe.height+re,be.depth=fe.depth+re,be.width=fe.width+2*ee,be.setStyle("box-sizing","border-box"),be.setStyle("position","absolute"),be.setStyle("height",fe.height+fe.depth+2*re,"em"),ee===0&&be.setStyle("width","100%"),ee!==0&&(be.setStyle("width",`calc(100% + ${2*ee}em)`),be.setStyle("top",E,"em"),be.setStyle("left",-ee,"em")),(!this.body||this.body.length===1)&&(be.width=3*ee,be.setStyle("width",`calc(100% + ${3*ee}em)`),be.setStyle("left",-1.5*ee,"em"));let Me="";this.correctness==="incorrect"&&(Me+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),Me&&(be.svgOverlay=Me);const Ne=new Dr([be,fe],{classes:"ML__prompt-atom"});return Ne.setStyle("position","relative"),Ne.setStyle("display","inline-block"),Ne.setStyle("line-height",0),Ne.height=fe.height+re+.2,Ne.depth=fe.depth+re,Ne.left=ee,Ne.right=ee,Ne.setStyle("height",fe.height+re,"em"),Ne.setStyle("top",fe.depth-fe.height,"em"),Ne.setStyle("vertical-align",fe.depth+re,"em"),Ne.setStyle("margin-left",.5,"em"),Ne.setStyle("margin-right",.5,"em"),this.caret&&(Ne.caret=this.caret),this.bind(b,this.attachSupsub(y,{base:Ne}))}_serialize(y){var b;const E=(b=this.bodyToLatex(y))!=null?b:"";if(y.skipPlaceholders)return E;let ee="\\placeholder";return this.placeholderId&&(ee+=`[${this.placeholderId}]`),this.correctness==="correct"?ee+="[correct]":this.correctness==="incorrect"&&(ee+="[incorrect]"),this.locked&&(ee+="[locked]"),uo(ee,E)}},Zs=class Np extends Gn{constructor(y){super({type:"subsup",style:y==null?void 0:y.style}),this.subsupPlacement="auto"}static fromJson(y){const b=new Np(y);for(const E of sc)y[E]&&b.setChildren(y[E],E);return b}render(y){var b;const E=new La({parent:y,isPhantom:!0}),ee=this.leftSibling,re=(b=ee.render(E))!=null?b:new Dr(null),ae=new Dr(null);return ae.height=re.height,ae.depth=re.depth,this.attachSupsub(y,{base:ae,isCharacterBox:ee.isCharacterBox(),type:"ignore"})}_serialize(y){return this.supsubToLatex(y)}};function Po(a){return a?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(a):!1}var Ul=class{constructor(a,y,b){this.errors=[],this.index=0,this.endCount=0;var E,ee,re,ae;b!=null||(b={}),this.tokens=a,this.context=y instanceof La&&!(b!=null&&b.parseMode)&&!b.mathstyle?y:new La({from:y,mathstyle:b.mathstyle},b.style),this.args=(E=b.args)!=null?E:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(ee=b.style)!=null?ee:{},parseMode:(re=b.parseMode)!=null?re:"math",mathstyle:(ae=b.mathstyle)!=null?ae:"displaystyle",tabular:!1}}beginContext(a){var y,b,E;const ee=this.parsingContext,re={parent:ee,mathlist:[],style:xe({},ee.style),parseMode:(y=a==null?void 0:a.mode)!=null?y:ee.parseMode,mathstyle:(b=a==null?void 0:a.mathstyle)!=null?b:ee.mathstyle,tabular:(E=a==null?void 0:a.tabular)!=null?E:!1};this.parsingContext=re}endContext(){this.parsingContext=this.parsingContext.parent}onError(a){this.errors.push(xe({before:pl(this.tokens.slice(this.index,this.index+10)),after:pl(this.tokens.slice(Math.max(0,this.index-10),this.index))},a))}get mathlist(){return this.parsingContext.mathlist}set mathlist(a){this.parsingContext.mathlist=a}get parseMode(){return this.parsingContext.parseMode}set parseMode(a){this.parsingContext.parseMode=a}get tabularMode(){return this.parsingContext.tabular}get style(){let a=this.parsingContext;for(;a;){if(a.style)return xe({},a.style);a=a.parent}return{}}set style(a){this.parsingContext.style=a}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(a){return this.tokens[this.index]===a?(this.index++,!0):!1}lastSubsupAtom(){let a;return this.mathlist.length>0&&(a=this.mathlist[this.mathlist.length-1],a.type==="subsup"||a.subsupPlacement!==void 0)||(a=new Zs({style:this.style}),this.mathlist.push(a)),a}hasPattern(a){return a.test(this.tokens[this.index])}hasInfixCommand(){var a;const{index:y}=this;if(y<this.tokens.length&&this.tokens[y].startsWith("\\")){const b=Ht(this.tokens[y],this.parseMode);return!b||b.definitionType==="symbol"||b.ifMode&&!b.ifMode.includes(this.parseMode)?!1:(a=b.infix)!=null?a:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const a=this.peek();return a!=="\\\\"&&a!=="\\cr"&&a!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var a;const y=(a=this.args)==null?void 0:a.call(this,"?");return y?Xo(y,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Ki({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(a){let y=this.tokens[this.index];for(;y&&y!==a;)y=this.tokens[++this.index];y===a&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(a){const y=this.index;let b=this.end(),E="";for(;!b;){const re=this.get();Po(re)?(E+=re,b=this.end()||E.length>=a.length):b=!0}const ee=a.toUpperCase()===E.toUpperCase();return ee||(this.index=y),ee}scanString(){let a="";for(;!this.end();){const y=this.peek();if(y==="]")return a;if(y==="<space>")a+=" ";else if(y.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),a+=y.substring(1);else if(Po(y))a+=y;else return a;this.next()}return a}scanBalancedString(){let a="",y=this.end(),b=1;for(;!y;){const E=this.get();E==="<space>"?a+=" ":E==="<{>"?(a+="{",b+=1):E==="<}>"?(b-=1,b>0?a+="}":this.index-=1):E==="<$>"?a+="$":E==="<$$>"?a+="$$":a+=E,y=b===0||this.end()}return a}scanLiteralGroup(){var a;if(!this.match("<{>"))return"";let y="",b=1;for(;b>0&&!this.end();){const E=this.get();E==="<}>"?(b-=1,b>0&&(y+="}")):E==="<{>"?(b+=1,y+="{"):(/\\[a-zA-Z]+$/.test(y)&&/^[a-zA-Z]/.test(E)&&(y+=" "),y+=(a={"<space>":" ","<$$>":"$$","<$>":"$"}[E])!=null?a:E)}return y}scanNumber(a=!0){var y,b;let E=!1,ee=this.peek();for(;ee==="<space>"||ee==="+"||ee==="-";)this.get(),ee==="-"&&(E=!E),ee=this.peek();a=!!a;let re=10,ae=/\d/;if(this.match("'"))re=8,ae=/[0-7]/,a=!0;else if(this.match('"'))re=16,ae=/[\dA-F]/,a=!0;else if(this.match("x"))re=16,ae=/[\dA-Fa-f]/,a=!0;else if(this.match("`"))return ee=this.get(),ee?ee.length===2&&ee.startsWith("\\")?{number:(E?-1:1)*((y=ee.codePointAt(1))!=null?y:0),base:"alpha"}:{number:(E?-1:1)*((b=ee.codePointAt(0))!=null?b:0),base:"alpha"}:null;let fe="";for(;this.hasPattern(ae);)fe+=this.get();if(!a&&(this.match(".")||this.match(",")))for(fe+=".";this.hasPattern(ae);)fe+=this.get();const ge=a?Number.parseInt(fe,re):Number.parseFloat(fe);return Number.isNaN(ge)?null:{number:E?-ge:ge,base:re===16?"hexadecimal":re===8?"octal":"decimal"}}scanRegister(){var a;const y=this.index,b=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return b;let E=!1;if(b===null)for(;;){const re=this.peek();if(re==="-")E=!E;else if(re!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const re=this.get();return re.startsWith("\\")?b?{register:re,global:!0,factor:(E?-1:1)*b.number}:E?{register:re,global:!0,factor:-1}:{register:re,global:!0}:(this.index=y,null)}let ee=this.get();return ee!=null&&ee.startsWith("\\")?(ee=ee.substring(1),this.context.registers[ee]?!E||b!==null?{register:ee,factor:(E?-1:1)*((a=b==null?void 0:b.number)!=null?a:1)}:{register:ee}:(this.index=y,null)):(this.index=y,null)}scanValue(){const a=this.scanRegister();if(a)return a;const y=this.index,b=this.scanGlueOrDimen();if(b&&("unit"in b||"glue"in b&&"unit"in b.glue))return b;this.index=y;const E=this.scanNumber();if(E)return E;if(this.end()||!Po(this.peek()))return null;const ee=this.scanString();return ee.length>0?{string:ee}:null}scanDimen(){const a=this.scanNumber(!1);if(a===null)return null;const y=a.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let b;return this.matchKeyword("pt")?b="pt":this.matchKeyword("mm")?b="mm":this.matchKeyword("cm")?b="cm":this.matchKeyword("ex")?b="ex":this.matchKeyword("px")?b="px":this.matchKeyword("em")?b="em":this.matchKeyword("bp")?b="bp":this.matchKeyword("dd")?b="dd":this.matchKeyword("pc")?b="pc":this.matchKeyword("in")?b="in":this.matchKeyword("mu")&&(b="mu"),b?{dimension:y,unit:b}:{dimension:y}}scanGlueOrDimen(){const a=this.scanDimen();if(a===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return a;const y={glue:a};if(this.matchKeyword("plus")){const b=this.scanDimen();if(b)y.grow=b;else return y}if(this.skipWhitespace(),this.match("\\relax"))return y;if(this.skipWhitespace(),this.matchKeyword("minus")){const b=this.scanDimen();if(b)y.shrink=b;else return y}return!y.grow&&!y.shrink?a:y}scanColspec(){this.skipWhitespace();const a=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const y=this.get();y==="c"||y==="r"||y==="l"?a.push({align:y}):y==="|"?a.push({separator:"solid"}):y===":"?a.push({separator:"dashed"}):y==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),a.push({gap:this.scan(b=>b==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return a}scanModeSet(){let a;if(this.match("\\(")&&(a="textstyle"),!a&&this.match("\\[")&&(a="displaystyle"),!a)return null;this.beginContext({mode:"math",mathstyle:a});const y=this.scan(b=>b===(a==="displaystyle"?"\\]":"\\)"));return this.match(a==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanModeShift(){let a="";if(this.match("<$>")&&(a="<$>"),!a&&this.match("<$$>")&&(a="<$$>"),!a)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const y=this.scan(b=>b===a);return this.match(a)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),y}scanEnvironment(){if(!this.match("\\begin"))return null;const a=this.scanArgument("string");if(!a)return null;const y=Lt(a);if(!y)return this.onError({code:"unknown-environment",arg:a}),null;const b=[];if(y.params)for(const fe of y.params)if(fe.isOptional)b.push(this.scanOptionalArgument(fe.type));else{const ge=this.scanArgument(fe.type);ge||this.onError({code:"missing-argument",arg:a}),b.push(ge)}this.beginContext({tabular:y.tabular});const E=[],ee=[];let re=[],ae=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae&&this.match("\\end")&&(this.scanArgument("string")!==a&&this.onError({code:"unbalanced-environment",arg:a}),ae=!0),!ae)if(this.matchColumnSeparator())re.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){re.push(this.mathlist),this.mathlist=[];let fe=null;this.skipWhitespace(),this.match("[")&&(fe=this.scanDimen(),this.skipWhitespace(),this.match("]")),ee.push(fe!=null?fe:{dimension:0}),E.push(re),re=[]}else this.mathlist.push(...this.scan(fe=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(fe)));while(!ae);return re.push(this.mathlist),re.length>0&&E.push(re),this.endContext(),y.createAtom(a,E,ee,b)}scanExpression(){const a=this.mathlist;if(this.mathlist=[],this.parseExpression()){const y=this.mathlist;return this.mathlist=a,y}return this.mathlist=a,null}scan(a){this.beginContext(),a||(a=ae=>ae==="<}>");let y="",b=null,E=[],ee=null;for(;!this.end()&&!a(this.peek());)this.hasInfixCommand()&&!y?(y=this.get(),b=Ht(y,"math"),b&&(E=this.scanArguments(b)[1]),ee=this.mathlist,this.mathlist=[]):this.parseExpression();let re;return y?(console.assert(!!b),E.unshift(this.mathlist),ee&&E.unshift(ee),re=[b.createAtom({command:y,args:E,style:this.style,mode:this.parseMode})]):re=this.mathlist,this.endContext(),re}scanGroup(){const a=this.index;if(!this.match("<{>"))return null;const y=this.scan(E=>E==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const b=new Go(y,this.parseMode,this.style);return b.verbatimLatex=pl(this.tokens.slice(a,this.index)),b}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let a=1;for(;!this.end()&&a!==0;)this.match("(")&&(a+=1),this.match(")")&&(a-=1),a!==0&&this.parseExpression();const y=new Wa("",this.mathlist,{leftDelim:"(",rightDelim:a===0?")":"?"});return this.endContext(),y}scanDelim(){this.skipWhitespace();const a=this.peek();if(!a)return this.onError({code:"unexpected-end-of-string"}),null;if(!Po(a)&&!a.startsWith("\\"))return null;this.next();const y=Ht(a,"math");return y?y.definitionType==="function"&&y.ifMode&&!y.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:a}),null):y.definitionType==="symbol"&&(y.type==="mopen"||y.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(a)?a:(this.onError({code:"unexpected-delimiter",arg:a}),null):(this.onError({code:"unknown-command",arg:a}),null)}scanLeftRight(){var a;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new ys("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new ys("\\mright");let y="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;y="\\mright"}const b=this.scanDelim();if(!b)return this.onError({code:"unexpected-delimiter"}),new ys(y==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(y);)this.parseExpression();const E=this.mathlist;this.endContext();const ee=(a=this.scanDelim())!=null?a:".";return new Wa(y==="\\right"?"left...right":"mleft...mright",E,{leftDelim:b,rightDelim:ee,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let a=this.peek();if(a!=="^"&&a!=="_"&&a!=="'")return!1;const y=this.lastSubsupAtom();for(;a==="^"||a==="_"||a==="'";)this.match("'")?this.match("'")?y.addChild(new Gn({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):y.addChild(new Gn({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&y.addChildren(rt(this.scanArgument("expression")),a==="_"?"subscript":"superscript"),a=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const a=this.match("\\limits"),y=!a&&this.match("\\nolimits"),b=!y&&!a&&this.match("\\displaylimits");if(!a&&!y&&!b)return!1;const E=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return E===null?!1:(E.explicitSubsupPlacement=!0,a&&(E.subsupPlacement="over-under"),y&&(E.subsupPlacement="adjacent"),b&&(E.subsupPlacement="auto"),!0)}scanArguments(a){if(!(a!=null&&a.params))return[void 0,[]];let y;const b=[];let E=a.infix?2:0;for(;E<a.params.length;){const ee=a.params[E];ee.type==="rest"?b.push(this.scan(re=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(re))):ee.isOptional?b.push(this.scanOptionalArgument(ee.type)):ee.type.endsWith("*")?y=ee.type.slice(0,-1):b.push(this.scanArgument(ee.type)),E+=1}return[y,b]}scanSymbolOrLiteral(){const a=this.peek();if(!a)return null;this.next();let y;if(Po(a)){const b=Ss.createAtom(this.parseMode,a,xe({},this.style));return b?[b]:null}if(y=this.scanMacro(a),y)return[y];if(a.startsWith("\\")){const b=Ht(a,this.parseMode);if(!b)return this.onError({code:"unknown-command",arg:a}),[new ys(a)];if(b.definitionType==="symbol"){const E=xe({},this.style);b.variant&&(E.variant=b.variant),y=new Gn({type:b.type,command:a,style:E,value:String.fromCodePoint(b.codepoint),mode:this.parseMode,verbatimLatex:a})}else{if(b.applyMode||b.applyStyle||b.infix)return this.onError({code:"invalid-command",arg:a}),[new ys(a)];b.createAtom&&(y=b.createAtom({command:a,args:[],style:this.style,mode:this.parseMode}))}}return y?[y]:null}scanArgument(a){var y;this.skipFiller();const b=this.parseMode;if(a==="auto"&&(a=b),!this.match("<{>")){if(a==="string")return this.scanString();if(a==="value")return this.scanValue();if(a==="delim")return(y=this.scanDelim())!=null?y:".";if(a==="expression")return this.scanExpression();if(a==="math"){a!==b&&this.beginContext({mode:"math"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}if(a==="text"){a!==b&&this.beginContext({mode:"text"});const ee=this.scanSymbolOrLiteral();return a!==b&&this.endContext(),ee}return a==="balanced-string"||console.assert(!1),null}if(a==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}if(a==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}let E=null;if(a==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const ee=this.mathlist;return this.endContext(),{group:ee}}return a==="string"?E=this.scanString():a==="balanced-string"?E=this.scanBalancedString():a==="colspec"?E=this.scanColspec():a==="value"&&(E=this.scanValue()),this.skipUntilToken("<}>"),E}scanOptionalArgument(a){if(a=a==="auto"?this.parseMode:a,this.skipFiller(),!this.match("["))return null;let y=null;for(;!this.end()&&!this.match("]");)if(a==="string")y=this.scanString();else if(a==="value")y=this.scanValue();else if(a==="colspec")y=this.scanColspec();else if(a==="bbox"){const b={},E=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const ee of E){const re=ee.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(re)b.padding={dimension:parseInt(re[1]),unit:re[2]};else{const ae=ee.match(/^\s*border\s*:\s*(.*)/);ae?b.border=ae[1]:b.backgroundcolor={string:ee}}}y=b}else a==="math"&&(this.beginContext({mode:"math"}),y=this.mathlist.concat(this.scan(b=>b==="]")),this.endContext());return y}scanSymbolOrCommand(a){var y,b,E;if(a==="\\placeholder"){const fe=this.scanOptionalArgument("string"),ge=this.scanOptionalArgument("math"),be=Gn.serialize(ge,{defaultMode:"math"});let Me=[],Ne;!Ne&&be==="correct"?Ne="correct":!Ne&&be==="incorrect"?Ne="incorrect":be!==""&&(Me=ge);const et=this.scanOptionalArgument("string")==="locked",xt=this.scanArgument("auto");let It;return xt&&Array.isArray(xt)&&xt.length>0?It=xt:xt&&typeof xt=="object"&&"group"in xt?It=xt.group:It=Me,fe?[new xl(fe,Ne,et,It!=null?It:Me,{mode:this.parseMode,style:this.style})]:[new Ki({mode:this.parseMode,style:this.style})]}if(a==="\\renewcommand"||a==="\\newcommand"||a==="\\providecommand"||a==="\\def"){const fe=this.index,ge=this.scanLiteralGroup()||this.next();if(!ge)return null;if(this.context.registers[ge.substring(1)]){const be=this.scanArgument("string");be!==null&&(this.context.registers[ge.substring(1)]=be);const Me=ya([a,pl(this.tokens.slice(fe,this.index))]);return[new Gn({type:"text",value:"",verbatimLatex:Me})]}}let ee=this.scanMacro(a);if(ee)return[ee];const re=Ht(a,this.parseMode);if(!re)return this.parseMode==="text"?(/[a-zA-Z]/.test((y=this.peek())!=null?y:"")&&(a+=" "),[...a].map(fe=>new Gn({type:"text",value:fe,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:a}),[new ys(a)]);const ae=this.index;if(re.definitionType==="symbol"){const fe=xe({},this.style);re.variant&&(fe.variant=re.variant),ee=new Gn({type:re.type,command:a,style:fe,value:String.fromCodePoint(re.codepoint),mode:this.parseMode})}else{if(re.ifMode&&!re.ifMode.includes(this.parseMode))return[];const fe=this.parseMode;re.applyMode&&(this.parseMode=re.applyMode);let ge,be=[];if(re.parse?be=re.parse(this):[ge,be]=this.scanArguments(re),this.parseMode=fe,re.applyMode&&!re.applyStyle&&!re.createAtom)return rt(be[0]);if(re.infix)return this.onError({code:"too-many-infix-commands",arg:a}),null;if(typeof re.createAtom=="function")ee=re.createAtom({command:a,args:be,style:this.style,mode:this.parseMode}),ge&&(ee.body=rt(this.scanArgument(ge)));else if(typeof re.applyStyle=="function"){const Me=xe(xe({},this.style),re.applyStyle(a,be,this.context)),Ne=this.parseMode;if(re.applyMode&&(this.parseMode=re.applyMode),ge){const et=this.style;this.style=Me;const xt=this.scanArgument(ge);return this.style=et,this.parseMode=Ne,rt(xt)}this.style=Me}else ee=new Gn({type:"mord",command:(b=re.command)!=null?b:a,style:xe({},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 fe=ya([a,pl(this.tokens.slice(ae,this.index))]);fe&&(ee.verbatimLatex=fe)}if(ee.verbatimLatex===null&&(ee.verbatimLatex=void 0),ee.isFunction&&this.smartFence){const fe=this.scanSmartFence();if(fe)return[ee,fe]}return[ee]}scanSymbolCommandOrLiteral(){const a=this.get();if(!a)return null;if(Po(a)){const y=Ss.createAtom(this.parseMode,a,xe({},this.style));if(!y)return null;if(y.isFunction&&this.smartFence){const b=this.scanSmartFence();if(b)return[y,b]}return[y]}return a.startsWith("\\")?this.scanSymbolOrCommand(a):a==="<space>"?this.parseMode==="text"?[new al(" "," ",this.style)]:null:(a==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:a}),null)}scanMacro(a){var y;const b=this.context.getMacro(a);if(!b)return null;const E=this.index,ee=b.args,re={"?":(y=this.args)==null?void 0:y.call(this,"?")};for(let ae=1;ae<=ee;ae++){let fe=this.scanLiteralGroup();if(!fe){const ge=this.index;this.scanExpression(),fe=pl(this.tokens.slice(ge,this.index))}re[ae]=fe}return new Mu(a,{expand:b.expand,captureSelection:b.captureSelection,args:E===this.index?null:pl(this.tokens.slice(E,this.index)),style:this.parsingContext.style,body:Xo(b.def,{context:this.context,parseMode:this.parseMode,args:ae=>re[ae],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var a,y,b,E;let ee=(E=(b=(y=(a=this.scanEnvironment())!=null?a:this.scanModeShift())!=null?y:this.scanModeSet())!=null?b:this.scanGroup())!=null?E:this.scanLeftRight();if(ee===null){if(this.parseSupSub()||this.parseLimits())return!0;ee=this.scanSymbolCommandOrLiteral()}return ee?(Array.isArray(ee)?this.mathlist.push(...ee):this.mathlist.push(ee),!0):!1}};function Xo(a,y){var b,E,ee,re;const ae=(b=y==null?void 0:y.args)!=null?b:void 0,fe=new Ul(nl(a,ae),y==null?void 0:y.context,{args:ae,mathstyle:(E=y==null?void 0:y.mathstyle)!=null?E:"displaystyle",parseMode:(ee=y==null?void 0:y.parseMode)!=null?ee:"math",style:(re=y==null?void 0:y.style)!=null?re:{}}),ge=[];for(;!fe.end();)ge.push(...fe.scan(()=>!1));return ge}function t0(a,y){var b;const E=new Ul(nl(a,null),y==null?void 0:y.context,{mathstyle:"displaystyle",parseMode:(b=y==null?void 0:y.parseMode)!=null?b:"math"});for(;!E.end();)E.scan();return E.errors}var n0=class Fp extends Gn{constructor(y,b){super({type:"chem"},{command:y,mode:"math"});const E=vo.go(Cr.go(b,y==="\\pu"?"pu":"ce"),!1);this.body=Xo(E),this._verbatimLatex=y+"{"+b+"}",this.arg=b,this.captureSelection=!0}static fromJson(y){return new Fp(y.command,y.arg)}set verbatimLatex(y){}get verbatimLatex(){return this._verbatimLatex}toJson(){return me(xe({},super.toJson()),{arg:this.arg})}render(y){const b=Gn.createBox(y,this.body,{type:"inner"});return this.caret&&(b.caret=this.caret),this.bind(y,b)}_serialize(y){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};Tt(["ce","pu"],"{chemformula:balanced-string}",{createAtom:a=>{var y;return new n0(a.command,(y=a.args[0])!=null?y:"")}});var Cr={go:function(a,y){if(!a)return[];y===void 0&&(y="ce");var b="0",E={};E.parenthesisLevel=0,a=a.replace(/\n/g," "),a=a.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),a=a.replace(/[\u2026]/g,"...");for(var ee,re=10,ae=[];;){ee!==a?(re=10,ee=a):re--;var fe=Cr.stateMachines[y],ge=fe.transitions[b]||fe.transitions["*"];e:for(var be=0;be<ge.length;be++){var Me=Cr.patterns.match_(ge[be].pattern,a);if(Me){for(var Ne=ge[be].task,et=0;et<Ne.action_.length;et++){var xt;if(fe.actions[Ne.action_[et].type_])xt=fe.actions[Ne.action_[et].type_](E,Me.match_,Ne.action_[et].option);else if(Cr.actions[Ne.action_[et].type_])xt=Cr.actions[Ne.action_[et].type_](E,Me.match_,Ne.action_[et].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+Ne.action_[et].type_+")"];Cr.concatArray(ae,xt)}if(b=Ne.nextState||b,a.length>0){if(Ne.revisit||(a=Me.remainder),!Ne.toContinue)break e}else return ae}}if(re<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(a,y){if(y)if(Object.prototype.toString.call(y)==="[object Array]")for(var b=0;b<y.length;b++)a.push(y[b]);else a.push(y)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(a){var y=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"(-)(9)^(-9)":function(a){var y=a.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return y&&y[0]?{match_:y.slice(1),remainder:a.substr(y[0].length)}:null},"state of aggregation $":function(a){var y=Cr.patterns.findObserveGroups(a,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(y&&y.remainder.match(/^($|[\s,;\)\]\}])/))return y;var b=a.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return b?{match_:b[0],remainder:a.substr(b[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"^{","","","}")},"^($...$)":function(a){return Cr.patterns.findObserveGroups(a,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(a){return Cr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(a){return Cr.patterns.findObserveGroups(a,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"_{","","","}")},"_($...$)":function(a){return Cr.patterns.findObserveGroups(a,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(a){return Cr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(a){return Cr.patterns.findObserveGroups(a,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(a){return Cr.patterns.findObserveGroups(a,"","{","}","")},"{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"{","","","}")},"$...$":function(a){return Cr.patterns.findObserveGroups(a,"","$","$","")},"${(...)}$":function(a){return Cr.patterns.findObserveGroups(a,"${","","","}$")},"$(...)$":function(a){return Cr.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 Cr.patterns.findObserveGroups(a,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(a){return Cr.patterns.findObserveGroups(a,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(a){return Cr.patterns.findObserveGroups(a,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(a){return Cr.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 Cr.patterns.findObserveGroups(a,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(a){return Cr.patterns.findObserveGroups(a,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(a){return Cr.patterns.findObserveGroups(a,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(a){return Cr.patterns.findObserveGroups(a,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(a){return Cr.patterns.findObserveGroups(a,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(a){var y;if(y=a.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),y)return{match_:y[0],remainder:a.substr(y[0].length)};var b=Cr.patterns.findObserveGroups(a,"","$","$","");return b&&(y=b.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),y)?{match_:y[0],remainder:a.substr(y[0].length)}:null},amount2:function(a){return this.amount(a)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(a){if(a.match(/^\([a-z]+\)$/))return null;var y=a.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return y?{match_:y[0],remainder:a.substr(y[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(a,y,b,E,ee,re,ae,fe,ge,be){var Me=function(Ln,sr){if(typeof sr=="string")return Ln.indexOf(sr)!==0?null:sr;var Pr=Ln.match(sr);return Pr?Pr[0]:null},Ne=function(Ln,sr,Pr){for(var mr=0;sr<Ln.length;){var di=Ln.charAt(sr),Pi=Me(Ln.substr(sr),Pr);if(Pi!==null&&mr===0)return{endMatchBegin:sr,endMatchEnd:sr+Pi.length};if(di==="{")mr++;else if(di==="}"){if(mr===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];mr--}sr++}return mr>0,null},et=Me(a,y);if(et===null||(a=a.substr(et.length),et=Me(a,b),et===null))return null;var xt=Ne(a,et.length,E||ee);if(xt===null)return null;var It=a.substring(0,E?xt.endMatchEnd:xt.endMatchBegin);if(re||ae){var In=this.findObserveGroups(a.substr(xt.endMatchEnd),re,ae,fe,ge);if(In===null)return null;var _r=[It,In.match_];return{match_:be?_r.join(""):_r,remainder:In.remainder}}else return{match_:It,remainder:a.substr(xt.endMatchEnd)}},match_:function(a,y){var b=Cr.patterns.patterns[a];if(b===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+a+")"];if(typeof b=="function")return Cr.patterns.patterns[a](y);var E=y.match(b);if(E){var ee;return E[2]?ee=[E[1],E[2]]:E[1]?ee=E[1]:ee=E[0],{match_:ee,remainder:y.substr(E[0].length)}}return null}},actions:{"a=":function(a,y){a.a=(a.a||"")+y},"b=":function(a,y){a.b=(a.b||"")+y},"p=":function(a,y){a.p=(a.p||"")+y},"o=":function(a,y){a.o=(a.o||"")+y},"q=":function(a,y){a.q=(a.q||"")+y},"d=":function(a,y){a.d=(a.d||"")+y},"rm=":function(a,y){a.rm=(a.rm||"")+y},"text=":function(a,y){a.text_=(a.text_||"")+y},insert:function(a,y,b){return{type_:b}},"insert+p1":function(a,y,b){return{type_:b,p1:y}},"insert+p1+p2":function(a,y,b){return{type_:b,p1:y[0],p2:y[1]}},copy:function(a,y){return y},rm:function(a,y){return{type_:"rm",p1:y||""}},text:function(a,y){return Cr.go(y,"text")},"{text}":function(a,y){var b=["{"];return Cr.concatArray(b,Cr.go(y,"text")),b.push("}"),b},"tex-math":function(a,y){return Cr.go(y,"tex-math")},"tex-math tight":function(a,y){return Cr.go(y,"tex-math tight")},bond:function(a,y,b){return{type_:"bond",kind_:b||y}},"color0-output":function(a,y){return{type_:"color0",color:y[0]}},ce:function(a,y){return Cr.go(y)},"1/2":function(a,y){var b=[];y.match(/^[+\-]/)&&(b.push(y.substr(0,1)),y=y.substr(1));var E=y.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return E[1]=E[1].replace(/\$/g,""),b.push({type_:"frac",p1:E[1],p2:E[2]}),E[3]&&(E[3]=E[3].replace(/\$/g,""),b.push({type_:"tex-math",p1:E[3]})),b},"9,9":function(a,y){return Cr.go(y,"9,9")}},createTransitions:function(a){var y,b,E,ee,re={};for(y in a)for(b in a[y])for(E=b.split("|"),a[y][b].stateArray=E,ee=0;ee<E.length;ee++)re[E[ee]]=[];for(y in a)for(b in a[y])for(E=a[y][b].stateArray||[],ee=0;ee<E.length;ee++){var ae=a[y][b];if(ae.action_){ae.action_=[].concat(ae.action_);for(var fe=0;fe<ae.action_.length;fe++)typeof ae.action_[fe]=="string"&&(ae.action_[fe]={type_:ae.action_[fe]})}else ae.action_=[];for(var ge=y.split("|"),be=0;be<ge.length;be++)if(E[ee]==="*")for(var Me in re)re[Me].push({pattern:ge[be],task:ae});else re[E[ee]].push({pattern:ge[be],task:ae})}return re},stateMachines:{}};Cr.stateMachines={ce:{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(a,y){var b;if((a.d||"").match(/^[0-9]+$/)){var E=a.d;a.d=void 0,b=this.output(a),a.b=E}else b=this.output(a);return Cr.actions["o="](a,y),b},"d= kv":function(a,y){a.d=y,a.dType="kv"},"charge or bond":function(a,y){if(a.beginsWithBond){var b=[];return Cr.concatArray(b,this.output(a)),Cr.concatArray(b,Cr.actions.bond(a,y,"-")),b}else a.d=y},"- after o/d":function(a,y,b){var E=Cr.patterns.match_("orbital",a.o||""),ee=Cr.patterns.match_("one lowercase greek letter $",a.o||""),re=Cr.patterns.match_("one lowercase latin letter $",a.o||""),ae=Cr.patterns.match_("$one lowercase latin letter$ $",a.o||""),fe=y==="-"&&(E&&E.remainder===""||ee||re||ae);fe&&!a.a&&!a.b&&!a.p&&!a.d&&!a.q&&!E&&re&&(a.o="$"+a.o+"$");var ge=[];return fe?(Cr.concatArray(ge,this.output(a)),ge.push({type_:"hyphen"})):(E=Cr.patterns.match_("digits",a.d||""),b&&E&&E.remainder===""?(Cr.concatArray(ge,Cr.actions["d="](a,y)),Cr.concatArray(ge,this.output(a))):(Cr.concatArray(ge,this.output(a)),Cr.concatArray(ge,Cr.actions.bond(a,y,"-")))),ge},"a to o":function(a){a.o=a.a,a.a=void 0},"sb=true":function(a){a.sb=!0},"sb=false":function(a){a.sb=!1},"beginsWithBond=true":function(a){a.beginsWithBond=!0},"beginsWithBond=false":function(a){a.beginsWithBond=!1},"parenthesisLevel++":function(a){a.parenthesisLevel++},"parenthesisLevel--":function(a){a.parenthesisLevel--},"state of aggregation":function(a,y){return{type_:"state of aggregation",p1:Cr.go(y,"o")}},comma:function(a,y){var b=y.replace(/\s*$/,""),E=b!==y;return E&&a.parenthesisLevel===0?{type_:"comma enumeration L",p1:b}:{type_:"comma enumeration M",p1:b}},output:function(a,y,b){var E;if(!a.r)E=[],!a.a&&!a.b&&!a.p&&!a.o&&!a.q&&!a.d&&!b||(a.sb&&E.push({type_:"entitySkip"}),!a.o&&!a.q&&!a.d&&!a.b&&!a.p&&b!==2?(a.o=a.a,a.a=void 0):!a.o&&!a.q&&!a.d&&(a.b||a.p)?(a.o=a.a,a.d=a.b,a.q=a.p,a.a=a.b=a.p=void 0):a.o&&a.dType==="kv"&&Cr.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:Cr.go(a.a,"a"),b:Cr.go(a.b,"bd"),p:Cr.go(a.p,"pq"),o:Cr.go(a.o,"o"),q:Cr.go(a.q,"pq"),d:Cr.go(a.d,a.dType==="oxidation"?"oxidation":"bd"),dType:a.dType}));else{var ee;a.rdt==="M"?ee=Cr.go(a.rd,"tex-math"):a.rdt==="T"?ee=[{type_:"text",p1:a.rd||""}]:ee=Cr.go(a.rd);var re;a.rqt==="M"?re=Cr.go(a.rq,"tex-math"):a.rqt==="T"?re=[{type_:"text",p1:a.rq||""}]:re=Cr.go(a.rq),E={type_:"arrow",r:a.r,rd:ee,rq:re}}for(var ae in a)ae!=="parenthesisLevel"&&ae!=="beginsWithBond"&&delete a[ae];return E},"oxidation-output":function(a,y){var b=["{"];return Cr.concatArray(b,Cr.go(y,"oxidation")),b.push("}"),b},"frac-output":function(a,y){return{type_:"frac-ce",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"overset-output":function(a,y){return{type_:"overset",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"underset-output":function(a,y){return{type_:"underset",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"underbrace-output":function(a,y){return{type_:"underbrace",p1:Cr.go(y[0]),p2:Cr.go(y[1])}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Cr.go(y[1])}},"r=":function(a,y){a.r=y},"rdt=":function(a,y){a.rdt=y},"rd=":function(a,y){a.rd=y},"rqt=":function(a,y){a.rqt=y},"rq=":function(a,y){a.rq=y},operator:function(a,y,b){return{type_:"operator",kind_:b||y}}}},a:{transitions:Cr.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:Cr.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:Cr.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(a){if(a.text_){var y={type_:"text",p1:a.text_};for(var b in a)delete a[b];return y}}}},pq:{transitions:Cr.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(a,y){return{type_:"state of aggregation subscript",p1:Cr.go(y,"o")}},"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Cr.go(y[1],"pq")}}}},bd:{transitions:Cr.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(a,y){return{type_:"color",color1:y[0],color2:Cr.go(y[1],"bd")}}}},oxidation:{transitions:Cr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(a,y){return{type_:"roman numeral",p1:y||""}}}},"tex-math":{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"tex-math tight":{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(a,y){a.o=(a.o||"")+"{"+y+"}"},output:function(a){if(a.o){var y={type_:"tex-math",p1:a.o};for(var b in a)delete a[b];return y}}}},"9,9":{transitions:Cr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),y[1]&&(Cr.concatArray(b,Cr.go(y[1],"pu-9,9")),y[2]&&(y[2].match(/[,.]/)?Cr.concatArray(b,Cr.go(y[2],"pu-9,9")):b.push(y[2])),(y[3]||y[4])&&(y[3]==="e"||y[4]==="*"?b.push({type_:"cdot"}):b.push({type_:"times"}))),y[5]&&b.push("10^{"+y[5]+"}"),b},"number^":function(a,y){var b=[];return y[0]==="+-"||y[0]==="+/-"?b.push("\\pm "):y[0]&&b.push(y[0]),Cr.concatArray(b,Cr.go(y[1],"pu-9,9")),b.push("^{"+y[2]+"}"),b},operator:function(a,y,b){return{type_:"operator",kind_:b||y}},space:function(){return{type_:"pu-space-1"}},output:function(a){var y,b=Cr.patterns.match_("{(...)}",a.d||"");b&&b.remainder===""&&(a.d=b.match_);var E=Cr.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:Cr.go(a.d,"pu"),q:Cr.go(a.q,"pu")};a.o==="//"?y={type_:"pu-frac",p1:ee.d,p2:ee.q}:(y=ee.d,ee.d.length>1||ee.q.length>1?y.push({type_:" / "}):y.push({type_:"/"}),Cr.concatArray(y,ee.q))}else y=Cr.go(a.d,"pu-2");for(var re in a)delete a[re];return y}}},"pu-2":{transitions:Cr.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(a,y){a.rm+="^{"+y+"}"},space:function(){return{type_:"pu-space-2"}},output:function(a){var y=[];if(a.rm){var b=Cr.patterns.match_("{(...)}",a.rm||"");b&&b.remainder===""?y=Cr.go(b.match_,"pu"):y={type_:"rm",p1:a.rm}}for(var E in a)delete a[E];return y}}},"pu-9,9":{transitions:Cr.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){var b=a.text_.length%3;b===0&&(b=3);for(var E=a.text_.length-3;E>0;E-=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(0,b)),y.reverse()}else y.push(a.text_);for(var ee in a)delete a[ee];return y},"output-o":function(a){var y=[];if(a.text_=a.text_||"",a.text_.length>4){for(var b=a.text_.length-3,E=0;E<b;E+=3)y.push(a.text_.substr(E,3)),y.push({type_:"1000 separator"});y.push(a.text_.substr(E))}else y.push(a.text_);for(var ee in a)delete a[ee];return y}}}};var vo={go:function(a,y){if(!a)return"";for(var b="",E=!1,ee=0;ee<a.length;ee++){var re=a[ee];typeof re=="string"?b+=re:(b+=vo._go2(re),re.type_==="1st-level escape"&&(E=!0))}return!y&&!E&&b&&(b="{"+b+"}"),b},_goInner:function(a){return a&&vo.go(a,!0)},_go2:function(a){var y;switch(a.type_){case"chemfive":y="";var b={a:vo._goInner(a.a),b:vo._goInner(a.b),p:vo._goInner(a.p),o:vo._goInner(a.o),q:vo._goInner(a.q),d:vo._goInner(a.d)};b.a&&(b.a.match(/^[+\-]/)&&(b.a="{"+b.a+"}"),y+=b.a+"\\,"),(b.b||b.p)&&(y+="{\\vphantom{X}}",y+="^{\\hphantom{"+(b.b||"")+"}}_{\\hphantom{"+(b.p||"")+"}}",y+="{\\vphantom{X}}",y+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(b.b||"")+"}}",y+="_{\\vphantom{2}\\llap{\\smash[t]{"+(b.p||"")+"}}}"),b.o&&(b.o.match(/^[+\-]/)&&(b.o="{"+b.o+"}"),y+=b.o),a.dType==="kv"?((b.d||b.q)&&(y+="{\\vphantom{X}}"),b.d&&(y+="^{"+b.d+"}"),b.q&&(y+="_{\\smash[t]{"+b.q+"}}")):a.dType==="oxidation"?(b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"),b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}")):(b.q&&(y+="{\\vphantom{X}}",y+="_{\\smash[t]{"+b.q+"}}"),b.d&&(y+="{\\vphantom{X}}",y+="^{"+b.d+"}"));break;case"rm":y="\\mathrm{"+a.p1+"}";break;case"text":a.p1.match(/[\^_]/)?(a.p1=a.p1.replace(" ","~").replace("-","\\text{-}"),y="\\mathrm{"+a.p1+"}"):y="\\text{"+a.p1+"}";break;case"roman numeral":y="\\mathrm{"+a.p1+"}";break;case"state of aggregation":y="\\mskip2mu "+vo._goInner(a.p1);break;case"state of aggregation subscript":y="\\mskip1mu "+vo._goInner(a.p1);break;case"bond":if(y=vo._getBond(a.kind_),!y)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+a.kind_+")"];break;case"frac":var E="\\frac{"+a.p1+"}{"+a.p2+"}";y="\\mathchoice{\\textstyle"+E+"}{"+E+"}{"+E+"}{"+E+"}";break;case"pu-frac":var ee="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";y="\\mathchoice{\\textstyle"+ee+"}{"+ee+"}{"+ee+"}{"+ee+"}";break;case"tex-math":y=a.p1+" ";break;case"frac-ce":y="\\frac{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"overset":y="\\overset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underset":y="\\underset{"+vo._goInner(a.p1)+"}{"+vo._goInner(a.p2)+"}";break;case"underbrace":y="\\underbrace{"+vo._goInner(a.p1)+"}_{"+vo._goInner(a.p2)+"}";break;case"color":y="{\\color{"+a.color1+"}{"+vo._goInner(a.color2)+"}}";break;case"color0":y="\\color{"+a.color+"}";break;case"arrow":var re={rd:vo._goInner(a.rd),rq:vo._goInner(a.rq)},ae=vo._getArrow(a.r);re.rd||re.rq?a.r==="<=>"||a.r==="<=>>"||a.r==="<<=>"||a.r==="<-->"?(ae="\\long"+ae,re.rd&&(ae="\\overset{"+re.rd+"}{"+ae+"}"),re.rq&&(a.r==="<-->"?ae="\\underset{\\lower2mu{"+re.rq+"}}{"+ae+"}":ae="\\underset{\\lower6mu{"+re.rq+"}}{"+ae+"}"),ae=" {}\\mathrel{"+ae+"}{} "):(re.rq&&(ae+="[{"+re.rq+"}]"),ae+="{"+re.rd+"}",ae=" {}\\mathrel{\\x"+ae+"}{} "):ae=" {}\\mathrel{\\long"+ae+"}{} ",y=ae;break;case"operator":y=vo._getOperator(a.kind_);break;case"1st-level escape":y=a.p1+" ";break;case"space":y=" ";break;case"entitySkip":y="~";break;case"pu-space-1":y="~";break;case"pu-space-2":y="\\mkern3mu ";break;case"1000 separator":y="\\mkern2mu ";break;case"commaDecimal":y="{,}";break;case"comma enumeration L":y="{"+a.p1+"}\\mkern6mu ";break;case"comma enumeration M":y="{"+a.p1+"}\\mkern3mu ";break;case"comma enumeration S":y="{"+a.p1+"}\\mkern1mu ";break;case"hyphen":y="\\text{-}";break;case"addition compound":y="\\,{\\cdot}\\,";break;case"electron dot":y="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":y="{\\times}";break;case"prime":y="\\prime ";break;case"cdot":y="\\cdot ";break;case"tight cdot":y="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":y="\\times ";break;case"circa":y="{\\sim}";break;case"^":y="uparrow";break;case"v":y="downarrow";break;case"ellipsis":y="\\ldots ";break;case"/":y="/";break;case" / ":y="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return y},_getArrow:function(a){switch(a){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(a){switch(a){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(a){switch(a){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function M1(a){}function k1(a){}var r0=class zp extends Gn{constructor(y){super(me(xe({},y),{type:"delim"})),this.value=y.delim,this.size=y.size}static fromJson(y){return new zp(y)}toJson(){return me(xe({},super.toJson()),{delim:this.value,size:this.size})}render(y){return new Dr(this.value,{type:"middle"})}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):uo(this.command,this.value)}},i0=class Kp extends Gn{constructor(y){super(me(xe({},y),{type:"sizeddelim",value:y.delim})),this.delimType=y.delimType,this.size=y.size}static fromJson(y){return new Kp(y)}toJson(){return me(xe({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(y){let b=gn(this.value,this.size,y,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return b?(b=this.bind(y,b),this.caret&&(b.caret=this.caret),b):null}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);return b!=null&&b.serialize?b.serialize(this,y):uo(this.command,this.value)}},bd=class Hp extends Gn{constructor(y,b,E,ee){var re,ae;super({type:"enclose",command:y,style:ee.style}),this.body=b,this.backgroundcolor=ee.backgroundcolor,E.updiagonalarrow&&(E.updiagonalstrike=!1),E.box&&(E.left=!1,E.right=!1,E.bottom=!1,E.top=!1),this.notation=E,this.shadow=(re=ee.shadow)!=null?re:"none",this.strokeWidth=(ae=ee.strokeWidth)!=null?ae:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=ee.strokeStyle,this.svgStrokeStyle=ee.svgStrokeStyle,this.strokeColor=ee.strokeColor,this.borderStyle=ee.borderStyle,this.padding=ee.padding,this.captureSelection=!1}static fromJson(y){return new Hp(y.command,y.body,y.notation,y)}toJson(){return me(xe({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(y){var b;if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Ht(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);let ee=(b=this.command)!=null?b:"";if(this.command==="\\enclose"){ee+="{"+Object.keys(this.notation).join(" ")+"}";let re="",ae="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(re+=ae+'mathbackground="'+this.backgroundcolor+'"',ae=","),this.shadow&&this.shadow!=="auto"&&(re+=ae+'shadow="'+this.shadow+'"',ae=","),this.strokeWidth||this.strokeStyle!=="solid"?(re+=ae+this.borderStyle,ae=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(re+=ae+'mathcolor="'+this.strokeColor+'"',ae=","),re&&(ee+=`[${re}]`)}return uo(ee,this.bodyToLatex(y))}render(y){const b=new La({parent:y},this.style),E=Gn.createBox(b,this.body);if(!E)return null;const ee=im(this.borderStyle),re=b.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});E.setStyle("position","relative"),E.setStyle("display","inline-block"),E.setStyle("top",re,"em"),E.setStyle("height",E.height+E.depth,"em"),E.setStyle("width",E.width,"em");const ae=new Dr(null,{classes:"ML__notation"});let fe=E.height+E.depth+2*re;const ge=E.width+2*re;let be="";if(this.notation.horizontalstrike&&(be+=this.line(3,50,97,50)),this.notation.verticalstrike&&(be+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(be+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(be+=this.line(3,3,97,97)),this.notation.updiagonalarrow){be+=this.line(re.toString(),(re+E.depth+E.height).toString(),(re+E.width).toString(),re.toString());const It=.03*Math.sqrt(ge*ge+fe*fe)*1,In=E.width*It,_r=(E.depth+E.height)*It,Ln=re+E.width;let sr=re;sr+_r-.4*In<0&&(sr=.4*In-_r),be+='<polygon points="',be+=`${Ln},${sr} ${Ln-In-.4*_r},${sr+_r-.4*In} `,be+=`${Ln-.7*In},${sr+.7*_r} ${Ln-In+.4*_r},${sr+_r+.4*In} `,be+=`${Ln},${sr}`,be+=`" stroke='none' fill="${this.strokeColor}"`,be+="/>"}let Me=0;if(this.notation.phasorangle){const et=a0(b),xt=(E.height+E.depth+2*et+re).toString(),It=(E.height+E.depth)/2;be+=this.line(re.toString(),xt,(re+It+E.width).toString(),xt),be+=this.line(re.toString(),xt,(re+It).toString(),(re-et).toString()),fe+=et,Me=It,E.left+=fe/2-re}if(this.notation.longdiv){const et=a0(b);fe+=et,be+=this.line(re.toString(),re.toString(),(re+E.width).toString(),re.toString());const xt=.3;Me=xt+et,E.left+=xt+et,E.setTop(re+et),be+='<path d="',be+=`M ${re} ${re} a${xt} ${(E.depth+E.height+2*et)/2}, 0, 1, 1, 0 ${E.depth+E.height+2*et} "`,be+=` stroke-width="${am(b)}" stroke="${this.strokeColor}" fill="none"`,be+="/>"}if(ae.width=E.width+2*re+Me,ae.height=E.height+re,ae.depth=E.depth+re,ae.setStyle("box-sizing","border-box"),ae.setStyle("left",`calc(-${ee} / 2 )`),ae.setStyle("height",`${Math.floor(100*fe)/100}em`),ae.setStyle("top",`calc(${ee} / 2 )`),this.backgroundcolor&&ae.setStyle("background-color",this.backgroundcolor),this.notation.box&&ae.setStyle("border","1px solid red"),this.notation.actuarial&&(ae.setStyle("border-top",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(ae.setStyle("border-bottom",this.borderStyle),ae.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(ae.setStyle("border-radius","8px"),ae.setStyle("border",this.borderStyle)),this.notation.circle&&(ae.setStyle("border-radius","50%"),ae.setStyle("border",this.borderStyle)),this.notation.top&&ae.setStyle("border-top",this.borderStyle),this.notation.left&&ae.setStyle("border-left",this.borderStyle),this.notation.right&&ae.setStyle("border-right",this.borderStyle),this.notation.bottom&&ae.setStyle("border-bottom",this.borderStyle),be){let et="";this.shadow==="auto"&&(et+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(et+=`filter: drop-shadow(${this.shadow})`),et+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,et+=' stroke-linecap="round"',this.svgStrokeStyle&&(et+=` stroke-dasharray="${this.svgStrokeStyle}"`),ae.svgStyle=et,ae.svgOverlay=be}const Ne=new Dr([ae,E]);return Ne.setStyle("position","relative"),Ne.setStyle("vertical-align",re,"em"),Ne.setStyle("height",`${Math.floor(100*(E.height+E.depth+2*re))/100}em`),Ne.setStyle("display","inline-block"),Ne.height=ae.height,Ne.depth=ae.depth,Ne.width=ae.width-2*re,Ne.left=re,Ne.right=re,this.caret&&(Ne.caret=this.caret),Ne.wrap(b)}line(y,b,E,ee){return`<line x1="${bf(y)}" y1="${bf(b)}" x2="${bf(E)}" y2="${bf(ee)}" vector-effect="non-scaling-stroke"></line>`}};function bf(a){return typeof a=="number"?`${Math.floor(100*a)/100}%`:a}function im(a){if(!a)return"1px";const y=a.match(/([0-9][a-zA-Z\%]+)/);return y===null?"1px":y[1]}function am(a){return(Math.floor(100*a.metrics.sqrtRuleThickness/a.scalingFactor)/100/10).toString()+"em"}function a0(a){const y=a.isDisplayStyle?el:a.metrics.defaultRuleThickness;return a.metrics.defaultRuleThickness+a.scalingFactor*y/4}var ku=class Wp extends Gn{constructor(y,b,E){var ee,re;super(me(xe({},E),{type:"genfrac",displayContainsHighlight:!0})),this.above=y,this.below=b,this.hasBarLine=(ee=E==null?void 0:E.hasBarLine)!=null?ee:!0,this.continuousFraction=(re=E==null?void 0:E.continuousFraction)!=null?re:!1,this.numerPrefix=E==null?void 0:E.numerPrefix,this.denomPrefix=E==null?void 0:E.denomPrefix,this.mathstyleName=E==null?void 0:E.mathstyleName,this.leftDelim=E==null?void 0:E.leftDelim,this.rightDelim=E==null?void 0:E.rightDelim,this.fractionNavigationOrder=E==null?void 0:E.fractionNavigationOrder}static fromJson(y){return new Wp(y.above,y.below,y)}toJson(){const y={};return this.continuousFraction&&(y.continuousFraction=!0),this.numerPrefix&&(y.numerPrefix=this.numerPrefix),this.denomPrefix&&(y.denomPrefix=this.denomPrefix),this.leftDelim&&(y.leftDelim=this.leftDelim),this.rightDelim&&(y.rightDelim=this.rightDelim),this.hasBarLine||(y.hasBarLine=!1),this.mathstyleName&&(y.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(y.fractionNavigationOrder=this.fractionNavigationOrder),xe(xe({},super.toJson()),y)}get children(){if(this._children)return this._children;const y=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const b of this.below)y.push(...b.children),y.push(b);for(const b of this.above)y.push(...b.children),y.push(b)}else{for(const b of this.above)y.push(...b.children),y.push(b);for(const b of this.below)y.push(...b.children),y.push(b)}return this._children=y,y}render(y){var b,E;const ee=new La({parent:y,mathstyle:this.mathstyleName},this.style),re=ee.metrics,ae=new La({parent:ee,mathstyle:this.continuousFraction?"":"numerator"},this.style),fe=this.numerPrefix?new Dr([new Dr(this.numerPrefix),Gn.createBox(ae,this.above)],{isTight:ae.isTight,type:"ignore"}):(b=Gn.createBox(ae,this.above,{type:"ignore"}))!=null?b:new Dr(null,{type:"ignore"}),ge=new La({parent:ee,mathstyle:this.continuousFraction?"":"denominator"},this.style),be=this.denomPrefix?new Dr([new Dr(this.denomPrefix),Gn.createBox(ge,this.below,{type:"ignore"})]):(E=Gn.createBox(ge,this.below,{type:"ignore"}))!=null?E:new Dr(null,{type:"ignore"}),Me=this.hasBarLine?re.defaultRuleThickness:0;let Ne,et=0,xt;ee.isDisplayStyle?(Ne=ae.metrics.num1,et=Me>0?3*Me:7*Me,xt=ge.metrics.denom1):(Me>0?(Ne=ae.metrics.num2,et=Me):(Ne=ae.metrics.num3,et=3*re.defaultRuleThickness),xt=ge.metrics.denom2);const It=[];this.isSelected&&It.push("ML__selected");const In=fe.depth,_r=be.height;let Ln;if(Me<=0){const bi=Ne-In-(_r-xt);bi<et&&(Ne+=(et-bi)/2,xt+=(et-bi)/2),Ln=new Qa({individualShift:[{box:fe,shift:-Ne,classes:[...It,"ML__center"]},{box:be,shift:xt,classes:[...It,"ML__center"]}]}).wrap(ee)}else{const bi=new Dr(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});bi.softWidth=Math.max(fe.width,be.width),bi.height=Me/2,bi.depth=Me/2;const Pa=os+Me/2;Ne<et+In+Pa&&(Ne=et+In+Pa);const qa=os-Me/2;xt<et+_r-qa&&(xt=et+_r-qa),Ln=new Qa({individualShift:[{box:be,shift:xt,classes:[...It,"ML__center"]},{box:bi,shift:-qa,classes:It},{box:fe,shift:-Ne,classes:[...It,"ML__center"]}]}).wrap(ee)}const sr=ee.isDisplayStyle?re.delim1:re.delim2,Pr=this.leftDelim?this.bind(y,ai("open",this.leftDelim,sr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):oi(ee,"open");let mr=null;this.continuousFraction?mr=new Dr(null,{type:"close"}):this.rightDelim?mr=this.bind(y,ai("close",this.rightDelim,sr,!0,y,{style:this.style,mode:this.mode,isSelected:this.isSelected})):mr=oi(ee,"close");const di=new Dr([Pr,Ln,mr],{isTight:ee.isTight,type:"inner",classes:"mfrac"}),Pi=this.bind(y,di);return this.caret&&(Pi.caret=this.caret),this.attachSupsub(y,{base:Pi})}},ns=class Up extends Gn{constructor(y,b){var E;super({type:"latex",value:y,mode:"latex"}),this.isSuggestion=(E=b==null?void 0:b.isSuggestion)!=null?E:!1,this.isError=!1}static fromJson(y){const b=new Up(y.value);return y.isSuggestion&&(b.isSuggestion=!0),y.isError&&(b.isError=!0),b}toJson(){const y={};return this.isSuggestion&&(y.isSuggestion=!0),this.isError&&(y.isError=!0),xe({type:"latex",value:this.value},y)}get computedStyle(){return{}}render(y){const b=new Dr(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}},xd=class jp extends Gn{constructor(y){super({type:"latexgroup",mode:"latex"}),this.body=[...y].map(b=>new ns(b)),this.skipBoundary=!1}static fromJson(y){return new jp("")}toJson(){return super.toJson()}render(y){const b=Gn.createBox(y,this.body);return b?(this.caret&&(b.caret=this.caret),this.bind(y,b)):null}_serialize(y){var b,E;return(E=(b=this.body)==null?void 0:b.map(ee=>ee.value).join(""))!=null?E:""}},fh=class Zp extends Gn{constructor(y,b){super(me(xe({},b),{type:"extensible-symbol",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Zp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.isExtensibleSymbol&&(y.isExtensibleSymbol=!0),this.value&&(y.symbol=this.value),y}render(y){var b;const E=y.isDisplayStyle&&this.value!=="\\smallint",ee=new Dr(this.value,{fontFamily:E?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(E?"large-op":"small-op"),type:"op",maxFontSize:y.scalingFactor,isSelected:this.isSelected});if(!ee)return null;ee.right=ee.italic;const re=(ee.height-ee.depth)/2-os*y.scalingFactor,ae=ee.italic;ee.setTop(re);let fe=ee;if(this.superscript||this.subscript){const ge=(b=this.subsupPlacement)!=null?b:"auto";fe=ge==="over-under"||ge==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:ee,baseShift:re,slant:ae}):this.attachSupsub(y,{base:ee})}return new Dr(this.bind(y,fe),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[];return E.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),ya(E)}},Rc=class Vp extends Gn{constructor(y){const b=y.body;super(me(xe({},y),{type:"overlap",body:typeof b=="string"?[new Gn({value:b})]:b,style:y==null?void 0:y.style})),this.skipBoundary=!0,this.align=y==null?void 0:y.align,this.boxType=y==null?void 0:y.boxType}static fromJson(y){return new Vp(y)}toJson(){const y={};return this.align&&(y.align=this.align),this.boxType&&(y.boxType=this.boxType),xe(xe({},super.toJson()),y)}render(y){const b=Gn.createBox(y,this.body,{classes:"inner"});return b?(this.caret&&(b.caret=this.caret),this.bind(y,new Dr([b,new Dr(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},Vs=class Gp extends Gn{constructor(y){var b,E,ee,re;super({type:"overunder",command:y.command,style:y.style,mode:y.mode,body:y.body,skipBoundary:(b=y.skipBoundary)!=null?b:!0}),this.subsupPlacement=y.supsubPlacement,this.svgAbove=y.svgAbove,this.svgBelow=y.svgBelow,this.svgBody=y.svgBody,this.above=y.above,this.below=y.below,this.boxType=(E=y.boxType)!=null?E:"ord",this.paddedBody=(ee=y.paddedBody)!=null?ee:!1,this.paddedLabels=(re=y.paddedLabels)!=null?re:!1}static fromJson(y){return new Gp(y)}toJson(){const y=super.toJson();return this.skipBoundary||(y.skipBoundary=!1),this.subsupPlacement&&(y.subsupPlacement=this.subsupPlacement),this.svgAbove&&(y.svgAbove=this.svgAbove),this.svgBelow&&(y.svgBelow=this.svgBelow),this.svgBody&&(y.svgBody=this.svgBody),this.boxType!=="ord"&&(y.boxType=this.boxType),this.paddedBody&&(y.paddedBody=!0),this.paddedLabels&&(y.paddedLabels=!0),y}render(y){let b=this.svgBody?Os(this.svgBody):Gn.createBox(y,this.body,{type:"ignore"});const E=new La({parent:y,mathstyle:"scriptstyle"},this.style);let ee=null;this.svgAbove?ee=Os(this.svgAbove):this.above&&(ee=Gn.createBox(E,this.above,{type:"ignore"}));let re=null;this.svgBelow?re=Os(this.svgBelow):this.below&&(re=Gn.createBox(E,this.below,{type:"ignore"})),this.paddedBody&&(b=new Dr([oi(y,"open"),b,oi(y,"close")],{type:"ignore"}));let ae=om(y,{base:b,above:ee,below:re,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return ae?(this.subsupPlacement==="over-under"?ae=this.attachLimits(y,{base:ae,type:ae.type}):ae=this.attachSupsub(y,{base:ae}),this.caret&&(ae.caret=this.caret),this.bind(y,ae)):null}};function om(a,y){if(!y.base)return null;if(!y.above&&!y.below){const fe=new Dr(y.base,{type:y.type});return fe.setStyle("position","relative"),fe}let b=0;y.above&&(b=a.metrics.bigOpSpacing5);let E=null;const ee=y.base,re=0,ae=["ML__center"];if(y.paddedAboveBelow&&ae.push("ML__label_padding"),y.below&&y.above){const fe=a.metrics.bigOpSpacing5+y.below.height+y.below.depth+ee.depth+re;E=new Qa({bottom:fe,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]})}else y.below?E=new Qa({top:ee.height-re,children:[a.metrics.bigOpSpacing5,{box:y.below,classes:ae},{box:ee,classes:["ML__center"]}]}):y.above&&(E=new Qa({bottom:ee.depth+re,children:[{box:ee,classes:["ML__center"]},b,{box:y.above,classes:ae},a.metrics.bigOpSpacing5]}));return new Dr(E,{type:y.type})}var wd=class Xp extends Gn{constructor(y){var b,E,ee,re;super(me(xe({},y),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(b=y.isInvisible)!=null?b:!1,this.smashDepth=(E=y.smashDepth)!=null?E:!1,this.smashHeight=(ee=y.smashHeight)!=null?ee:!1,this.smashWidth=(re=y.smashWidth)!=null?re:!1}static fromJson(y){return new Xp(y)}toJson(){const y={};return this.isInvisible&&(y.isInvisible=!0),this.smashDepth&&(y.smashDepth=!0),this.smashHeight&&(y.smashHeight=!0),this.smashWidth&&(y.smashWidth=!0),xe(xe({},super.toJson()),y)}render(y){const b=new La({parent:y,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Gn.createBox(b,this.body,{classes:"inner"});const E=Gn.createBox(this.isInvisible?b:y,this.body);if(!E)return null;if(this.smashWidth){const ee=new Dr(null,{classes:"fix"});return new Dr([E,ee],{classes:"rlap"}).wrap(y)}if(!this.smashHeight&&!this.smashDepth)return E;if(this.smashHeight&&(E.height=0),this.smashDepth&&(E.depth=0),E.children)for(const ee of E.children)this.smashHeight&&(ee.height=0),this.smashDepth&&(ee.depth=0);return new Qa({firstBaseline:[{box:E}]},{type:E.type}).wrap(y)}},Sd=class Yp extends Gn{constructor(y){var b;super(xe({type:"spacing"},y)),this.width=y==null?void 0:y.width,this._braced=(b=y==null?void 0:y.braced)!=null?b:!1}static fromJson(y){return new Yp(y)}toJson(){const y=super.toJson();return this.width!==void 0&&(y.width=this.width),this._braced&&(y.braced=!0),y}render(y){var b;if(this.command==="space")return new Dr(this.mode==="math"?null:" ");let E;if(this.width!==void 0)E=new Dr(null,{classes:"mspace"}),E.left=y.toEm(this.width);else{const ee=(b={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?b:"mediumspace";E=new Dr(null,{classes:ee})}return E=this.bind(y,E),this.caret&&(E.caret=this.caret),E}_serialize(y){var b;if(!y.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const E=Ht(this.command,this.mode);if(E!=null&&E.serialize)return E.serialize(this,y);const ee=(b=this.command)!=null?b:"";return this.width===void 0?ee:this._braced&&!("register"in this.width)?`${ee}{${Io(this.width)}}`:`${ee}${Io(this.width)}`}},o0=class qp extends Gn{constructor(y){var b;super(me(xe({},y),{type:"surd",mode:(b=y.mode)!=null?b:"math",style:y.style,displayContainsHighlight:!0,body:y.body})),this.above=y.index}static fromJson(y){return new qp(me(xe({},y),{index:y.above}))}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=this.command,ee=this.bodyToLatex(y);return this.above&&!this.hasEmptyBranch("above")?uo(`${E}[${this.aboveToLatex(y)}]`,ee):/^[0-9]$/.test(ee)?`${E}${ee}`:uo(E,ee)}get children(){if(this._children)return this._children;const y=[];if(this.above)for(const b of this.above)y.push(...b.children),y.push(b);if(this.body)for(const b of this.body)y.push(...b.children),y.push(b);return this._children=y,y}render(y){var b;const E=new La({parent:y,mathstyle:"cramp"},this.style),ee=(b=Gn.createBox(E,this.body,{type:"inner"}))!=null?b:new Dr(null),re=E.scalingFactor,ae=E.metrics.defaultRuleThickness/re,fe=y.isDisplayStyle?el:ae,ge=new Dr(null,{classes:"ML__sqrt-line",style:this.style});ge.height=ae,ge.softWidth=ee.width;let be=re*(ae+fe/4);const Ne=Math.max(re*2*fe,ee.height+ee.depth)+be+ae,et=new La({parent:y},this.style),xt=this.bind(et,new Dr(ai("inner","\\surd",Ne,!1,et,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!xt)return null;const It=xt.height+xt.depth-ae;It>ee.height+ee.depth+be&&(be=(be+It-(ee.height+ee.depth))/2),xt.setTop(xt.height-ee.height-be);const In=this.bind(y,new Qa({firstBaseline:[{box:new Dr(ee)},be-2*ae,{box:ge},ae]})),_r=Gn.createBox(new La({parent:y,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!_r){const Pr=new Dr([xt,In],{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(y,Pr)}const Ln=new Qa({shift:-.6*(Math.max(xt.height,In.height)-Math.max(xt.depth,In.depth)),children:[{box:_r}]}),sr=new Dr([new Dr(Ln,{classes:"ML__sqrt-index",type:"ignore"}),xt,In],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return sr.height=xt.height,sr.depth=xt.depth,this.caret&&(sr.caret=this.caret),this.bind(y,sr)}},sm=class extends Dr{constructor(a){super(null,{type:"skip"}),this._width=a}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function xf(a,y){if(!a.parent)return;const b=a.parent.children,E=b.indexOf(a);let ee=E-1;for(;ee>=0&&b[ee].type==="ignore";)ee-=1;if(ee<0&&a.parent.parent&&a.parent.type==="lift"){xf(a.parent,y);return}E>0&&b[E-1].type==="skip"?b[E-1].width+=y:b.splice(E,0,new sm(y))}var lm={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},cm={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function um(a){Ed(a,(y,b)=>{b.type==="bin"&&(!y||/^(middle|bin|op|rel|open|punct)$/.test(y.type))&&(b.type="ord"),(y==null?void 0:y.type)==="bin"&&/^(rel|close|punct)$/.test(b.type)&&(y.type="ord"),b.type!=="ignore"&&(y=b)})}function Cd(a,y){if(!a.children)return a;const b=a.children;um(b);const E=y.getRegisterAsEm("thinmuskip"),ee=y.getRegisterAsEm("medmuskip"),re=y.getRegisterAsEm("thickmuskip");return Ed(b,(ae,fe)=>{var ge,be,Me;if(!ae)return;const Ne=ae.type,et=fe.isTight?(ge=cm[Ne])!=null?ge:null:(be=lm[Ne])!=null?be:null,xt=(Me=et==null?void 0:et[fe.type])!=null?Me:null;xt===3&&xf(fe,E),xt===4&&xf(fe,ee),xt===5&&xf(fe,re)}),a}function Ed(a,y,b=void 0){if(!a)return b;a=[...a];for(const E of a)E.type==="lift"?b=Ed(E.children,y,b):E.type==="ignore"?Ed(E.children,y):(y(b,E),Ed(E.children,y),b=E);return b}var hh=class Jp extends Gn{constructor(y){super({type:"tooltip",command:y.command,mode:y.mode,style:y.style,body:y.body,displayContainsHighlight:!0}),this.tooltip=new Gn({type:"root",mode:y.content,body:y.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(y){return new Jp(me(xe({},y),{tooltip:dc(y.tooltip)}))}toJson(){var y;const b=(y=this.tooltip.body)==null?void 0:y.filter(E=>E.type!=="first").map(E=>E.toJson());return me(xe({},super.toJson()),{tooltip:b})}render(y){const b=Gn.createBox(new La,this.body);if(!b)return null;const E=new La({parent:y,mathstyle:"displaystyle"},{fontSize:dl}),ee=gu(Cd(new Dr(this.tooltip.render(E),{classes:"ML__tooltip-content"}),E)),re=new Dr([ee,b],{classes:"ML__tooltip-container"});return this.caret&&(re.caret=this.caret),this.bind(y,re)}},Bc=class Qp extends Gn{constructor(y,b){super(me(xe({},b),{type:"operator",isFunction:b==null?void 0:b.isFunction})),this.value=y,this.variant=b==null?void 0:b.variant,this.variantStyle=b==null?void 0:b.variantStyle,this.subsupPlacement=b==null?void 0:b.limits}static fromJson(y){return new Qp(y.symbol,y)}toJson(){const y=super.toJson();return this.variant&&(y.variant=this.variant),this.variantStyle&&(y.variantStyle=this.variantStyle),this.subsupPlacement&&(y.limits=this.subsupPlacement),this.value&&(y.symbol=this.value),y}render(y){var b;const E=new Dr(this.value,{type:"op",mode:"math",maxFontSize:y.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:y.letterShapeStyle});let ee=E;if(this.superscript||this.subscript){const re=(b=this.subsupPlacement)!=null?b:"auto";ee=re==="over-under"||re==="auto"&&y.isDisplayStyle?this.attachLimits(y,{base:E}):this.attachSupsub(y,{base:E})}return new Dr(this.bind(y,ee),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(y)}_serialize(y){if(!(y.expandMacro||y.skipStyles||y.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const b=Ht(this.command,this.mode);if(b!=null&&b.serialize)return b.serialize(this,y);const E=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&E.push("\\limits"),this.subsupPlacement==="adjacent"&&E.push("\\nolimits"),this.subsupPlacement==="auto"&&E.push("\\displaylimits")),E.push(this.supsubToLatex(y)),ya(E)}};function dc(a){if(Oe(a))return a.map(E=>dc(E));if(typeof a=="string")return Gn.fromJson(a);a=xe({},a);for(const E of sc)a[E]&&(a[E]=dc(a[E]));a.args&&(a.args=dm(a.args)),a.array&&(a.array=dc(a.array));const y=a.type;let b;y==="accent"&&(b=z.fromJson(a)),y==="array"&&(b=sa.fromJson(a)),y==="box"&&(b=ko.fromJson(a)),y==="chem"&&(b=n0.fromJson(a)),y==="composition"&&(b=Wl.fromJson(a)),y==="delim"&&(b=r0.fromJson(a)),y==="enclose"&&(b=bd.fromJson(a)),y==="error"&&(b=ys.fromJson(a)),y==="extensible-symbol"&&(b=fh.fromJson(a)),y==="genfrac"&&(b=ku.fromJson(a)),y==="group"&&(b=Go.fromJson(a)),y==="latex"&&(b=ns.fromJson(a)),y==="latexgroup"&&(b=xd.fromJson(a)),y==="leftright"&&(b=Wa.fromJson(a)),y==="macro"&&(b=Mu.fromJson(a)),y==="macro-argument"&&(b=sl.fromJson(a)),y==="operator"&&(b=Bc.fromJson(a)),y==="overlap"&&(b=Rc.fromJson(a)),y==="overunder"&&(b=Vs.fromJson(a)),y==="placeholder"&&(b=Ki.fromJson(a)),y==="prompt"&&(b=xl.fromJson(a)),y==="phantom"&&(b=wd.fromJson(a)),y==="sizeddelim"&&(b=i0.fromJson(a)),y==="spacing"&&(b=Sd.fromJson(a)),y==="subsup"&&(b=Zs.fromJson(a)),y==="surd"&&(b=o0.fromJson(a)),y==="text"&&(b=al.fromJson(a)),y==="tooltip"&&(b=hh.fromJson(a)),b||(console.assert(!y||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(y),`MathLive 0.98.5: an unexpected atom type "${y}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),b=Gn.fromJson(a));for(const E of sc)a[E]&&b.setChildren(a[E],E);return a.verbatimLatex!==void 0&&(b.verbatimLatex=a.verbatimLatex),a.subsupPlacement&&(b.subsupPlacement=a.subsupPlacement),a.explicitSubsupPlacement&&(b.explicitSubsupPlacement=!0),a.isFunction&&(b.isFunction=!0),a.isExtensibleSymbol&&(b.isExtensibleSymbol=!0),a.skipBoundary&&(b.skipBoundary=!0),a.captureSelection&&(b.captureSelection=!0),b}function dm(a){if(a&&Array.isArray(a))return a.map(y=>y==="<null>"?null:typeof y=="object"&&"group"in y?{group:y.group.map(b=>dc(b))}:typeof y=="object"&&"atoms"in y?y.atoms.map(b=>dc(b)):y)}var s0={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},ph={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},l0=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,fm=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,hm=[/^[a-z]$/,/^[A-Z]$/,l0,fm],pm={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},mm=class extends Ss{constructor(){super("math")}createAtom(a,y,b){var E,ee,re,ae;if(y===null)return new Gn({type:"mord",mode:"math",command:a,value:a,style:b});const fe=window.MathfieldElement.isFunction((E=y.command)!=null?E:a);if(y.definitionType==="symbol"){const be=new Gn({type:(ee=y.type)!=null?ee:"mord",mode:"math",command:(re=y.command)!=null?re:a,value:String.fromCodePoint(y.codepoint),style:b});return fe&&(be.isFunction=!0),a.startsWith("\\")&&(be.verbatimLatex=a),be}const ge=new Gn({type:"mord",mode:"math",command:(ae=y.command)!=null?ae:a,value:a,style:b});return fe&&(ge.isFunction=!0),a.startsWith("\\")&&(ge.verbatimLatex=a),ge}serialize(a,y){const b=gm(a,me(xe({},y),{defaultMode:"math"}));return b.length===0||y.defaultMode!=="text"?b:["$ ",...b," $"]}getFont(a,y){console.assert(y.variant!==void 0);let{variant:b}=y,{variantStyle:E}=y;b==="normal"&&!E&&/[\u00A3\u0131\u0237]/.test(a.value)&&(b="main",E="italic"),b==="normal"&&!E&&a.value.length===1&&hm.forEach((fe,ge)=>{var be;fe.test(a.value)&&pm[(be=y.letterShapeStyle)!=null?be:"tex"][ge]==="it"&&(E="italic")}),E==="up"&&(E=void 0);const ee=E?b+"-"+E:b;console.assert(s0[ee]!==void 0);const[re,ae]=s0[ee];return ph[b]&&!ph[b].test(a.value)?(a.value=Ut(a.value,b,E),null):(l0.test(a.value)&&(a.classes+=" lcGreek"),ae&&(a.classes+=" "+ae),re)}};function gm(a,y){const{parent:b}=a[0],E=c0(b);return Mo(a,"variant").map(ee=>{const re=c0(ee[0]);let ae="";re&&re!==E&&(ae={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[re],console.assert(ae!==void 0));const fe=ya(ee.map(ge=>ge._serialize(y)));return ae?uo(ae,fe):fe})}function c0(a){if(!a)return"";const{style:y}=a;if(y.variant===void 0)return"";let b=y.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(y.variant)&&y.variantStyle&&y.variantStyle!=="up"&&(b+="-"+y.variantStyle),b}new mm;function vm(a,y){return a.map(b=>b._serialize(y))}function ym(a,y){return Mo(a,"fontShape").map(b=>{const E=vm(b,y),{fontShape:ee}=b[0].style;let re="";return ee==="it"&&(re="\\textit"),ee==="sl"&&(re="\\textsl"),ee==="sc"&&(re="\\textsc"),ee==="n"&&(re="\\textup"),!re&&ee?`{${uo("\\fontshape",ee)}${ya(E)}}`:re?uo(re,ya(E)):ya(E)})}function bm(a,y){return Mo(a,"fontSeries").map(b=>{const E=ym(b,y),{fontSeries:ee}=b[0].style;let re="";return ee==="b"&&(re="\\textbf"),ee==="l"&&(re="\\textlf"),ee==="m"&&(re="\\textmd"),ee&&!re?`{${uo("\\fontseries",ee)}${ya(E)}}`:re?uo(re,ya(E)):ya(E)})}function xm(a,y){return Mo(a,"fontSize").map(b=>{var E,ee;const re=bm(b,y),ae=(ee=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(E=b[0].style.fontSize)!=null?E:""])!=null?ee:"";return ae?`${ae} ${ya(re)}`:ya(re)})}function wm(a,y,b){return Mo(a,"fontFamily").map(E=>{var ee,re;const ae=xm(E,y),fe=(re={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(ee=E[0].style.fontFamily)!=null?ee:""])!=null?re:"";return fe?`\\${fe}{${ya(ae)}}`:E[0].style.fontFamily?`{\\fontfamily{${E[0].style.fontFamily}} ${ya(ae)}}`:b?`\\text{${ya(ae)}}`:ya(ae)})}var u0={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Sm=class extends Ss{constructor(){super("text")}createAtom(a,y,b){return y&&y.definitionType==="symbol"?new al(a,String.fromCodePoint(y.codepoint),b!=null?b:{}):null}serialize(a,y){return wm(a,me(xe({},y),{defaultMode:"text"}),y.defaultMode!=="text")}getFont(a,y){var b,E,ee,re,ae;const{fontFamily:fe}=y;if(u0[fe]?a.classes+=" "+u0[fe]:fe&&a.setStyle("font-family",fe),y.fontShape&&(a.classes+=" ",a.classes+=(b={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[y.fontShape])!=null?b:""),y.fontSeries){const ge=y.fontSeries.match(/(.?[lbm])?(.?[cx])?/);ge&&(a.classes+=" ",a.classes+=(ee={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(E=ge[1])!=null?E:""])!=null?ee:"",a.classes+=" ",a.classes+=(ae={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(re=ge[2])!=null?re:""])!=null?ae:"")}return"Main-Regular"}};new Sm;var Cm=class extends Ss{constructor(){super("latex")}createAtom(a){return new ns(a)}serialize(a,y){return a.filter(b=>b instanceof ns&&!b.isSuggestion).map(b=>b.value)}getFont(){return null}};new Cm;var 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:["=","=","=","="]}},km={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},_m={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Lm={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Am={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Tm={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Im={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Dm={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pm={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function h0(a){const y=a.split("+"),b={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:y.pop()};return y.includes("shift")&&(b.shift=!0),y.includes("alt")&&(b.alt=!0),y.includes("ctrl")&&(b.ctrl=!0),y.includes("cmd")&&(b.cmd=!0),y.includes("win")&&(b.win=!0),y.includes("meta")&&(b.meta=!0),b}function _u(a){let y="";return a.shift&&(y+="shift+"),a.alt&&(y+="alt+"),a.ctrl&&(y+="ctrl+"),a.cmd&&(y+="cmd+"),a.win&&(y+="win+"),a.meta&&(y+="meta+"),y+a.key}var Om={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Md=[],kd;function gh(){switch(Le()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function $s(a){(!a.platform||a.platform===gh())&&Md.push(a)}function Rm(a,y){var b;const E={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!a)return E;for(const[ee,re]of Object.entries(y.mapping)){if(re[0]===a)return E.key=`[${ee}]`,E;if(re[1]===a)return E.shift=!0,E.key=`[${ee}]`,E;if(re[2]===a)return E.alt=!0,E.key=`[${ee}]`,E;if(re[3]===a)return E.shift=!0,E.alt=!0,E.key=`[${ee}]`,E}return E.key=(b=Om[a])!=null?b:"",E}function Bm(a){if(a.code)return a;const y=Object.entries(_d().mapping);let b=!1,E=!1,ee="";for(let re=0;re<4;re++){for(const[ae,fe]of y)if(fe[re]===a.key){ee=ae,re===3?(b=!0,E=!0):re===2?b=!0:re===1&&(E=!0);break}if(ee)break}return new KeyboardEvent(a.type,me(xe({},a),{altKey:b,shiftKey:E,code:ee}))}function $m(a){var y,b;if(!a||a.key==="Unidentified"||a.key==="Dead")return;const E=a.shiftKey&&a.altKey?3:a.altKey?2:a.shiftKey?1:0;for(const ee of Md)((y=ee.mapping[a.code])==null?void 0:y[E])===a.key?ee.score+=1:(b=ee.mapping[a.code])!=null&&b[E]&&(ee.score=0);Md.sort((ee,re)=>re.score-ee.score)}function Nm(a){kd=Md.find(y=>a.startsWith(y.locale))}function _d(){return kd!=null?kd:Md[0]}function Fm(){switch(gh()){case"apple":return mh;case"windows":return d0;case"linux":return f0}return mh}switch(gh()){case"apple":$s(mh),$s(Mm),$s(Im),$s(Lm);break;case"windows":$s(d0),$s(km),$s(Dm),$s(Am);break;case"linux":$s(f0),$s(_m),$s(Pm),$s(Tm);break}$s(Em);function vh(a){var y;const b=/macos|ios/.test(Le()),E=a.split("+");let ee="";for(const re of E)ee&&(ee+=b?"\u2009":'<span class="ML__shortcut-join">+</span>'),re.startsWith("[Key")?ee+=re.slice(4,5):re.startsWith("Key")?ee+=re.slice(3,4):re.startsWith("[Digit")?ee+=re.slice(6,7):re.startsWith("Digit")?ee+=re.slice(5,6):ee+=(y={cmd:"\u2318",meta:b?"\u2318":"Ctrl",shift:b?"\u21E7":"Shift",alt:b?"\u2325":"Alt",ctrl:b?"\u2303":"Ctrl","\n":b?"\u23CE":"Return","[return]":b?"\u23CE":"Return","[enter]":b?"\u2324":"Enter","[tab]":b?"\u21E5":"Tab","[escape]":"Esc","[backspace]":b?"\u232B":"Backspace","[delete]":b?"\u2326":"Del","[pageup]":b?"\u21DE":"Page Up","[pagedown]":b?"\u21DF":"Page Down","[home]":b?"\u2912":"Home","[end]":b?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[re.toLowerCase()])!=null?y:re.toUpperCase();return ee}function wf(a){if(a instanceof MouseEvent||a instanceof PointerEvent)return{x:a.clientX,y:a.clientY};if(a instanceof TouchEvent){const y=[...a.touches].reduce((E,ee)=>({x:E.x+ee.clientX,y:E.y+ee.clientY}),{x:0,y:0}),b=a.touches.length;return{x:y.x/b,y:y.y/b}}}function $c(a){const y={alt:!1,control:!1,shift:!1,meta:!1};return(a instanceof MouseEvent||a instanceof PointerEvent||a instanceof TouchEvent||a instanceof KeyboardEvent)&&(a.altKey&&(y.alt=!0),a.ctrlKey&&(y.control=!0),a.metaKey&&(y.meta=!0),a.shiftKey&&(y.shift=!0)),y}function zm(a,y){return!a&&y||a&&!y?!1:!a||!y?!0:a.alt===y.alt&&a.control===y.control&&a.shift===y.shift&&a.meta===y.meta}var Km=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Sf(a){return a.ctrlKey||a.metaKey||["Dead","Process"].includes(a.key)?!1:a.code===""?!0:Km.has(a.code)}function Cf(){var a;let y=document.activeElement;for(;(a=y==null?void 0:y.shadowRoot)!=null&&a.activeElement;)y=y.shadowRoot.activeElement;return y}var wl=class Gl{static get scrim(){return Gl._scrim||(Gl._scrim=new Gl),Gl._scrim}static open(y){Gl.scrim.open(y)}static close(){Gl.scrim.close()}static get state(){return Gl.scrim.state}static get element(){return Gl.scrim.element}constructor(y){var b,E;this.lightDismiss=(b=y==null?void 0:y.lightDismiss)!=null?b:!0,this.translucent=(E=y==null?void 0:y.translucent)!=null?E:!1,this.state="closed"}get element(){if(this._element)return this._element;const y=document.createElement("div");return y.setAttribute("role","presentation"),y.style.position="fixed",y.style.contain="content",y.style.top="0",y.style.left="0",y.style.right="0",y.style.bottom="0",y.style.zIndex="var(--scrim-zindex, 10099)",y.style.outline="none",this.translucent?(y.style.background="rgba(255, 255, 255, .2)",y.style.backdropFilter="contrast(40%)"):y.style.background="transparent",this._element=y,y}open(y){var b;if(this.state!=="closed")return;this.state="opening",this.onDismiss=y==null?void 0:y.onDismiss,this.savedActiveElement=Cf();const{element:E}=this;((b=y==null?void 0:y.root)!=null?b:document.body).appendChild(E),E.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const ee=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const re=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${re+ee}px`,y!=null&&y.child&&E.append(y.child),this.state="open"}close(){var y,b,E,ee;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:re}=this;re.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),re.remove(),document.body.style.overflow=(y=this.savedOverflow)!=null?y:"",document.body.style.marginRight=(b=this.savedMarginRight)!=null?b:"",Cf()!==this.savedActiveElement&&((ee=(E=this.savedActiveElement)==null?void 0:E.focus)==null||ee.call(E)),re.innerHTML="",this.state="closed"}handleEvent(y){this.lightDismiss&&(y.target===this._element&&y.type==="click"?(this.close(),y.preventDefault(),y.stopPropagation()):y.target===document&&(y.type==="touchmove"||y.type==="scroll")&&(this.close(),y.preventDefault(),y.stopPropagation()))}};function Hm(a,y,b){let E=null,ee=null,re=!1,ae=!1,fe=!1;const ge=new AbortController,be=ge.signal;return a.addEventListener("keydown",Me=>{if(re||Me.key==="Process"||Me.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(Me.code)){E=null;return}E=Me,ee=null,b.onKeystroke(Me)?a.textContent="":E=null},{capture:!0,signal:be}),a.addEventListener("keypress",Me=>{re||(E&&ee&&b.onKeystroke(E),ee=Me)},{capture:!0,signal:be}),a.addEventListener("compositionstart",Me=>{a.textContent="",re=!0,b.onCompositionStart(Me.data)},{capture:!0,signal:be}),a.addEventListener("compositionupdate",Me=>{re&&b.onCompositionUpdate(Me.data)},{capture:!0,signal:be}),a.addEventListener("compositionend",Me=>{a.textContent="",re&&(re=!1,b.onCompositionEnd(Me.data))},{capture:!0,signal:be}),a.addEventListener("beforeinput",Me=>Me.stopImmediatePropagation(),{signal:be}),a.addEventListener("input",Me=>{var Ne;if(!re&&(a.textContent="",Me.inputType!=="insertCompositionText")){if(Me.inputType==="insertFromPaste"){Me.preventDefault(),Me.stopPropagation();return}b.onInput((Ne=Me.data)!=null?Ne:""),Me.preventDefault(),Me.stopPropagation()}},{signal:be}),a.addEventListener("paste",Me=>{a.focus({preventScroll:!0}),a.textContent="",b.onPaste(Me)||Me.preventDefault(),Me.stopImmediatePropagation()},{signal:be}),a.addEventListener("cut",Me=>b.onCut(Me),{capture:!0,signal:be}),a.addEventListener("copy",Me=>b.onCopy(Me),{capture:!0,signal:be}),a.addEventListener("blur",Me=>{var Ne,et;if(((et=(Ne=Me.relatedTarget)==null?void 0:Ne._mathfield)==null?void 0:et.element)===y){a.focus({preventScroll:!0}),Me.preventDefault(),Me.stopPropagation();return}const xt=wl.state;if(xt==="open"||xt==="opening"){Me.preventDefault(),Me.stopPropagation();return}if(Me.relatedTarget===Me.target.getRootNode().host){Me.preventDefault(),Me.stopPropagation();return}fe||ae||(fe=!0,E=null,ee=null,b.onBlur(),fe=!1)},{capture:!0,signal:be}),a.addEventListener("focus",Me=>{fe||ae||(ae=!0,b.onFocus(),ae=!1)},{capture:!0,signal:be}),{dispose:()=>ge.abort(),cancelComposition:()=>{re&&(a.blur(),requestAnimationFrame(()=>a.focus({preventScroll:!0})))},blur:()=>{typeof a.blur=="function"&&a.blur()},focus:()=>{!ae&&typeof a.focus=="function"&&a.focus({preventScroll:!0})},hasFocus:()=>Cf()===a,setAriaLabel:Me=>a.setAttribute("aria-label",Me),setValue:Me=>{var Ne;a.textContent=Me,a.style.left="-1000px",(Ne=window.getSelection())==null||Ne.selectAllChildren(a)},moveTo:(Me,Ne)=>{a.style.top=`${Ne}px`,a.style.left=`${Me}px`}}}function Lu(a){var y;if(!a||!Sf(a))return"";let b;return a.key==="Unidentified"&&a.target&&(b=a.target.value),b=(y=b!=null?b:a.key)!=null?y:a.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(b)&&(b=""),b}function p0(a){a=Bm(a);const y=[];return a.ctrlKey&&y.push("ctrl"),a.metaKey&&y.push("meta"),a.altKey&&y.push("alt"),a.shiftKey&&y.push("shift"),y.length===0?`[${a.code}]`:(y.push(`[${a.code}]`),y.join("+"))}function Wm(a){if(ft()){const y=Le(),b=a.startsWith("!"),E=a.endsWith(y);if(b&&!E||!b&&E)return!0}return a==="!other"?!1:a==="other"}function Um(a,y,b){if(a.length===0)return"";const E=_u(h0(p0(b))),ee=_u({key:b.key,shift:b.shiftKey,alt:b.altKey,ctrl:b.ctrlKey,meta:b.metaKey||b.ctrlKey&&/macos|ios/.test(Le()),cmd:!1,win:!1});for(let re=a.length-1;re>=0;re--)if((a[re].key===E||a[re].key===ee)&&(!a[re].ifMode||a[re].ifMode===y))return a[re].command;return""}function m0(a){let y=a;return Oe(y)&&(y=y.length>0?y[0]+"("+y.slice(1).join("")+")":""),y}function jm(a,y){let b=[];if(typeof y=="string"){const re=hd[y];Oe(re)?b=re.slice():re&&b.push(re)}const E=m0(y),ee=new RegExp("^"+E.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const re of a)ee.test(m0(re.command))&&b.push(re.key);return b.map(vh)}function Zm(a,y){if(a.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(a.ifPlatform))throw new Error(`Unexpected platform "${a.ifPlatform}" for keybinding ${a.key}`);if(a.ifLayout!==void 0&&(y.score===0||!a.ifLayout.includes(y.id)))return;const b=h0(a.key);let E=a.ifPlatform;if(b.cmd){if(E&&E!=="macos"&&E!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+E+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);E||(E=Le()==="ios"?"ios":"macos"),b.win=!1,b.cmd=!1,b.meta=!0}if(b.win){if(E&&E!=="windows")throw new Error('Unexpected "win" modifier with platform "'+E+`"
|
|
|
"win" modifier can only be used with Windows platform.`);E="windows",b.win=!1,b.cmd=!1,b.meta=!0}if(E&&!Wm(E))return;if(/^\[.+\]$/.test(b.key))return me(xe({},a),{key:_u(b)});const ee=Rm(b.key,y);if(!ee)return me(xe({},a),{key:_u(b)});if(ee.shift&&b.shift||ee.alt&&b.alt)throw new Error(`The keybinding ${a.key} (${yh(a.command)}) is conflicting with the key combination ${_u(ee)} using the ${y.displayName} keyboard layout`);return ee.shift=ee.shift||b.shift,ee.alt=ee.alt||b.alt,ee.meta=b.meta,ee.ctrl=b.ctrl,me(xe({},a),{key:_u(ee)})}function yh(a){if(Array.isArray(a)){const y=[...a];return y.shift()+"("+y.map(b=>typeof b=="string"?`"${b}"`:b.toString()).join(", ")+")"}return a}function Vm(a,y){const b=[],E=[];for(const ee of a)try{const re=Zm(ee,y);if(!re)continue;const ae=E.find(fe=>fe.key===re.key&&fe.ifMode===re.ifMode);if(ae)throw new Error(`Ambiguous key binding ${ee.key} (${yh(ee.command)}) matches ${ae.key} (${yh(ae.command)}) with the ${y.displayName} keyboard layout`);E.push(re)}catch(re){re instanceof Error&&b.push(re.message)}return[E,b]}var Gm=class extends ia{constructor(){super("latex")}createAtom(a){return new ns(a)}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("application/x-latex")||y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Eo(a)),a.startRecording(),!0):!1}insert(a,y,b){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b||(b={}),b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=[];for(const ge of y)le.test(ge)&&re.push(new ns(ge));let ae=a.at(a.position);if(ae instanceof xd&&(ae=ae.lastChild),!(ae.parent instanceof xd)){const ge=new xd("");ae.parent.addChildAfter(ge,ae),ae=ge.firstChild}const fe=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(fe)):fe&&(a.position=a.offsetOf(fe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function Xm(a){return a.atoms.find(y=>y.type==="latexgroup")}function Ld(a){var y,b;const E=a.atoms.find(ee=>ee.type==="latexgroup");return E?(b=(y=E.body)==null?void 0:y.filter(ee=>ee.type==="latex"))!=null?b:[]:[]}function g0(a,y){var b;let E=0,ee=!1;const re=Number.isFinite(y==null?void 0:y.before)?(b=y==null?void 0:y.before)!=null?b:0:a.lastOffset;for(;E<=re&&!ee;){const ge=a.at(E);ee=ge instanceof ns&&ge.isSuggestion,ee||E++}if(!ee)return[void 0,void 0];let ae=E,fe=!1;for(;ae<=re&&!fe;){const ge=a.at(ae);fe=!(ge instanceof ns&&ge.isSuggestion),fe||ae++}return[E-1,ae-1]}new Gm;function Ef(a){const y=Ld(a.model).filter(b=>b.isSuggestion);if(y.length!==0){a.model.position=a.model.offsetOf(y[0].leftSibling);for(const b of y)b.parent.removeChild(b)}}function Ad(a,y){var b;const{model:E}=a;Ef(a);for(const Me of Ld(E))Me.isError=!1;if(!E.selectionIsCollapsed||a.options.popoverPolicy==="off"){Tu(a);return}const ee=[];let re=E.at(E.position);for(;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)re=re.leftSibling;if(re&&re instanceof ns&&re.value==="\\")for(ee.push(re),re=re.rightSibling;re&&re instanceof ns&&/^[a-zA-Z\*]$/.test(re.value);)ee.push(re),re=re.rightSibling;const ae=ee.map(Me=>Me.value).join(""),fe=Rt(a,ae);if(fe.length===0){if(/^\\[a-zA-Z\*]+$/.test(ae))for(const Me of ee)Me.isError=!0;Tu(a);return}const ge=(b=y==null?void 0:y.atIndex)!=null?b:0;a.suggestionIndex=ge<0?fe.length-1:ge%fe.length;const be=fe[a.suggestionIndex];if(be!==ae){const Me=ee[ee.length-1];Me.parent.addChildrenAfter([...be.slice(ae.length-be.length)].map(Ne=>new ns(Ne,{isSuggestion:!0})),Me),Nc(a,{interactive:!0})}qm(a,fe)}function v0(a){const[y,b]=g0(a,{before:a.position});if(y===void 0||b===void 0)return!1;let E=!1;return a.getAtoms([y,b]).forEach(ee=>{ee.isSuggestion&&(ee.isSuggestion=!1,E=!0)}),E}function Au(a,y="accept",b){var E,ee;Tu(a);const re=Xm(a.model);if(!re)return!1;if(y==="accept-suggestion"||y==="accept-all"){const be=Ld(a.model).filter(Me=>Me.isSuggestion);if(be.length!==0){for(const Me of be)Me.isSuggestion=!1;a.model.position=a.model.offsetOf(be[be.length-1])}if(y==="accept-suggestion")return be.length!==0}const fe=Ld(a.model).filter(be=>!be.isSuggestion).map(be=>be.value).join(""),ge=re.leftSibling;return re.parent.removeChild(re),a.model.position=a.model.offsetOf(ge),a.switchMode((E=b==null?void 0:b.mode)!=null?E:"math"),y==="reject"||(ia.insert(a.model,fe,{selectionMode:(ee=b==null?void 0:b.selectItem)!=null&&ee?"item":"placeholder",format:"latex",mode:"math"}),a.snapshot(),a.model.announce("replacement"),a.switchMode("math")),!0}function Mf(a){var y;let b=document.getElementById(a);return b?b.dataset.refcount=Number(Number.parseInt((y=b.dataset.refcount)!=null?y:"0")+1).toString():(b=document.createElement("div"),b.setAttribute("aria-hidden","true"),b.dataset.refcount="1",b.id=a,document.body.append(b)),b}function bh(a){var y;const b=document.getElementById(a);if(!b)return;const E=Number.parseInt((y=b.getAttribute("data-refcount"))!=null?y:"0");E<=1?b.remove():b.dataset.refcount=Number(E-1).toString()}function Ym(a,y){const b=new La({from:a.context}),E=new Gn({mode:"math",type:"root",body:Xo(y,{context:b})}),ee=gu(Cd(new Dr(E.render(b),{classes:"ML__base"}),b));return vu(ee,{classes:"ML__latex"}).toMarkup()}function qm(a,y){var b;if(y.length===0){Tu(a);return}let E="";for(const[re,ae]of y.entries()){const fe=ae,ge=Ym(a,ae),be=jm(a.keybindings,fe).join("<br>");E+=`<li role="button" data-command="${fe}" ${re===a.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${fe}</span><span class="ML__popover__command">${ge}</span>`,be&&(E+=`<span class="ML__popover__keybinding">${be}</span>`),E+="</li>"}const ee=Jm(a,`<ul>${E}</ul>`);xh()&&((b=ee.querySelector(".ML__popover__current"))==null||b.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var re;ee&&!xh()&&(ee.classList.add("is-visible"),kf(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 kf(a,y){var b;if(!a.element||a.element.mathfield!==a||!xh())return;if(((b=a.model.at(a.model.position))==null?void 0:b.type)!=="latex"){Tu(a);return}if(y!=null&&y.deferred){setTimeout(()=>kf(a),32);return}const E=bl(a.field);if(!E)return;const ee=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,re=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ae=window.innerWidth-document.documentElement.clientWidth,fe=window.innerHeight-document.documentElement.clientHeight,ge=window.mathVirtualKeyboard.boundingRect.height,be=document.getElementById("mathlive-suggestion-popover");E.x+be.offsetWidth/2>re-ae?be.style.left=`${re-be.offsetWidth-ae}px`:E.x-be.offsetWidth/2<0?be.style.left="0":be.style.left=`${E.x-be.offsetWidth/2}px`;const Me=E.y-E.height;ee-fe-ge-E.y<Me?(be.classList.add("ML__popover--reverse-direction"),be.classList.remove("top-tip"),be.classList.add("bottom-tip"),be.style.top=`${E.y-E.height-be.offsetHeight-15}px`):(be.classList.remove("ML__popover--reverse-direction"),be.classList.add("top-tip"),be.classList.remove("bottom-tip"),be.style.top=`${E.y+15}px`)}function Tu(a){a.suggestionIndex=0;const y=document.getElementById("mathlive-suggestion-popover");y&&(y.classList.remove("is-visible"),y.innerHTML="")}function Jm(a,y){let b=document.getElementById("mathlive-suggestion-popover");return b||(b=Mf("mathlive-suggestion-popover"),_s("suggestion-popover"),_s("core"),b.addEventListener("pointerdown",E=>E.preventDefault()),b.addEventListener("click",E=>{let ee=E.target;for(;ee&&!ee.dataset.command;)ee=ee.parentElement;ee&&(Au(a,"reject"),ia.insert(a.model,ee.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),a.dirty=!0,a.focus())})),b.innerHTML=window.MathfieldElement.createHTML(y),b}function Qm(){document.getElementById("mathlive-suggestion-popover")&&(bh("mathlive-suggestion-popover"),x("suggestion-popover"),x("core"))}function eg(){const a=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(a.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let y=a[1],b=y.match(/http.*\.ts[\?:]/);return b&&(y=a[2]),b=y.match(/(https?:.*):[0-9]+:[0-9]+/),b||(b=y.match(/at (.*(\.ts))[\?:]/),b||(b=y.match(/at (.*(\.mjs|\.js))[\?:]/))),b?b[1]:(console.error(a),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${y}").`),"")}var _f=null,y0,b0,wh=((b0=(y0=globalThis==null?void 0:globalThis.document)==null?void 0:y0.currentScript)==null?void 0:b0.src)||eg();function x0(a){return gc(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(a))return new URL(a).href;if(_f===null)try{const y=yield fetch(wh,{method:"HEAD"});y.status===200&&(_f=y.url)}catch(y){console.error(`Invalid URL "${a}" (relative to "${wh}")`)}return new URL(a,_f!=null?_f:wh).href})}function tg(a,y,b={}){return new FontFace(a,`url(${y}.woff2) format('woff2')`,b)}var Ns="not-loaded";function ng(){return gc(this,null,function*(){return Ns="not-loaded",Lf()})}function Lf(){return gc(this,null,function*(){var a;if(Ns!=="not-loaded")return;if(Ns="loading",(a=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?a:!1){Ns="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const b=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],E=Array.from(document.fonts).map(ae=>ae.family);if(b.every(ae=>E.includes(ae))){Ns="ready";return}if(!window.MathfieldElement.fontsDirectory){Ns="not-loaded";return}const ee=yield x0(window.MathfieldElement.fontsDirectory);if(!ee){document.body.classList.add("ML__fonts-did-not-load"),Ns="error";return}const re=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(ae=>tg(ae[0].replace(/-[a-zA-Z]+$/,""),`${ee}/${ae[0]}`,ae[1]));try{(yield Promise.all(re.map(fe=>{try{return fe.load()}catch(ge){}}))).forEach(fe=>document.fonts.add(fe)),Ns="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")}Ns="error"}})}function rg(a){let y=0;for(let b=0;b<a.length;b++)y=y*31+a.charCodeAt(b),y=y|0;return Math.abs(y)}function Eo(a,y){a&&(a.dirty||(a.dirty=!0,requestAnimationFrame(()=>{Rs(a)&&a.dirty&&(a.atomBoundsCache=new Map,Nc(a,y),a.atomBoundsCache=void 0)})))}function ig(a,y){var b;y=y!=null?y:{};const E=new La({from:me(xe({},a.context),{atomIdsSettings:{seed:y.forHighlighting?rg(Gn.serialize([a.model.root],{expandMacro:!1,defaultMode:a.options.defaultMode})):"random",groupNumbers:(b=y.forHighlighting)!=null?b:!1},letterShapeStyle:a.options.letterShapeStyle}),mathstyle:a.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),ee=a.model.root.render(E);return vu(Cd(ee,E),{classes:a.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function w0(a,y){const{model:b}=a;b.root.caret=void 0,b.root.isSelected=!1,b.root.containsCaret=!0;for(const ee of b.atoms)ee.caret=void 0,ee.isSelected=!1,ee.containsCaret=!1;if(b.selectionIsCollapsed){const ee=b.at(b.position);ee.caret=a.model.mode;let re=ee.parent;for(;re;)re.containsCaret=!0,re=re.parent}else{const ee=b.getAtoms(b.selection,{includeChildren:!0});for(const re of ee)re.isSelected=!0}return ig(a,y).toMarkup()}function Nc(a,y){if(!Rs(a))return;y!=null||(y={});const b=a.element.querySelector("[part=virtual-keyboard-toggle]");b&&(b.style.display=a.hasEditableContent?"":"none");const E=a.field;if(!E)return;const ee=a.isSelectionEditable&&a.hasFocus(),re=E.classList.contains("ML__focused");re&&!ee?E.classList.remove("ML__focused"):!re&&ee&&E.classList.add("ML__focused");let ae=w0(a,y);const fe=a.element.querySelector("[part=menu-toggle]");if(fe&&(a.model.atoms.length<=1||a.disabled||a.readOnly&&!a.hasEditableContent||a.userSelect==="none"?fe.style.display="none":fe.style.display=""),a.model.atoms.length<=1){const ge=a.options.contentPlaceholder;ge&&(ae+=`<span part=placeholder class="ML__content-placeholder">${Yo(ge)}</span>`)}E.innerHTML=window.MathfieldElement.createHTML(ae),Af(a,y.interactive),a.dirty=!1}function Af(a,y){const b=a.field;if(!b)return;for(const fe of b.querySelectorAll(".ML__selection, .ML__contains-highlight"))fe.remove();!(y!=null&&y)&&Ns!=="error"&&Ns!=="ready"&&setTimeout(()=>{Ns==="ready"?Af(a):setTimeout(()=>Af(a),128)},32);const E=a.model,ee=b.offsetWidth,re=b.getBoundingClientRect().width;let ae=Math.floor(re)/ee;if(ae=isNaN(ae)?1:ae,E.selectionIsCollapsed){kf(a,{deferred:!0});let fe=E.at(E.position);for(;fe&&fe.type!=="prompt"&&!(fe.containsCaret&&fe.displayContainsHighlight);)fe=fe.parent;if(fe!=null&&fe.containsCaret&&fe.displayContainsHighlight){const ge=md(a,lc(a,fe),ae);if(ge){ge.left/=ae,ge.right/=ae,ge.top/=ae,ge.bottom/=ae;const be=document.createElement("div");be.classList.add("ML__contains-highlight"),be.style.position="absolute",be.style.left=`${ge.left+1}px`,be.style.top=`${Math.ceil(ge.top)}px`,be.style.width=`${Math.ceil(ge.right-ge.left)}px`,be.style.height=`${Math.ceil(ge.bottom-ge.top)}px`,b.insertBefore(be,b.childNodes[0])}}return}for(const fe of ag(vd(a,{excludeAtomsWithBackground:!0}))){fe.left/=ae,fe.right/=ae,fe.top/=ae,fe.bottom/=ae;const ge=document.createElement("div");ge.classList.add("ML__selection"),ge.style.position="absolute",ge.style.left=`${fe.left}px`,ge.style.top=`${fe.top}px`,ge.style.width=`${Math.ceil(fe.right-fe.left)}px`,ge.style.height=`${Math.ceil(fe.bottom-fe.top-1)}px`,b.insertBefore(ge,b.childNodes[0])}}function ag(a){let y=[];for(const b of a){let E=!1;for(const ee of y)if(b.left===ee.left&&b.right===ee.right&&b.top===ee.top&&b.bottom===ee.bottom){E=!0;break}E||y.push(b)}a=y,y=[];for(const b of a){let E=0;for(const ee of a)if(b.left>=ee.left&&b.right<=ee.right&&b.top>=ee.top&&b.bottom<=ee.bottom&&(E+=1,E>1))break;E===1&&y.push(b)}return y}var S0=3,Sl;function Ls(a,y){y=xe({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},y!=null?y:{}),Sl||(Sl={});for(const b of Object.keys(a))console.assert(!Sl[b],"Selector already defined: ",b),Sl[b]=me(xe({},y),{fn:a[b]})}function Sh(a){let y;if(Array.isArray(a)){if(a[0]==="performWithFeedback")return Sh(a[1]);y=a[0]}else y=a;return y=y.replace(/-\w/g,b=>b[1].toUpperCase()),Sl[y]}function Iu(a){var y;return(y=Sh(a))==null?void 0:y.target}function og(a,y){var b;if(!y)return!1;let E,ee=[],re=!1,ae=!1;Oe(y)?(E=y[0],ee=y.slice(1)):E=y,E=E.replace(/-\w/g,be=>be[1].toUpperCase());const fe=Sl[E],ge=fe==null?void 0:fe.target;if(ge==="model"){if(!a.isSelectionEditable&&(fe!=null&&fe.changeContent))return a.model.announce("plonk"),!1;/^(delete|add)/.test(E)&&(E!=="deleteBackward"&&a.flushInlineShortcutBuffer(),a.snapshot(E)),/^complete/.test(E)||Ef(a),Sl[E].fn(a.model,...ee),Ad(a),ae=!0,re=!0}else if(ge==="virtual-keyboard")ae=(b=window.mathVirtualKeyboard.executeCommand(y))!=null?b:!1,re=!0;else if(Sl[E]){if(!a.isSelectionEditable&&(fe!=null&&fe.changeContent))return a.model.announce("plonk"),!1;/^(undo|redo)/.test(E)&&a.flushInlineShortcutBuffer(),ae=Sl[E].fn(a,...ee),re=!0}else throw new Error(`Unknown command "${E}"`);return ge!=="virtual-keyboard"&&(!a.model.selectionIsCollapsed||fe!=null&&fe.changeSelection&&y!=="deleteBackward")&&(a.flushInlineShortcutBuffer(),fe!=null&&fe.changeContent||a.stopCoalescingUndo(),a.defaultStyle={}),ae&&Eo(a),re}function sg(a,y){var b;if(!a)return!1;a.focus(),vp.keypressVibration&&Je()&&navigator.vibrate(S0);const E=Sh(y);window.MathfieldElement.playSound((b=E==null?void 0:E.audioFeedback)!=null?b:"keypress");const ee=a.executeCommand(y);return a.scrollIntoView(),ee}Ls({performWithFeedback:(a,y)=>sg(a,y)});function lg(a){return Ad(a,{atIndex:a.suggestionIndex+1}),!1}function cg(a){return Ad(a,{atIndex:a.suggestionIndex-1}),!1}Ls({complete:Au},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),Ls({nextSuggestion:lg,previousSuggestion:cg},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var Tf="mathlive#virtual-keyboard-message";function Ch(a){var y;return a.type!=="message"?!1:((y=a.data)==null?void 0:y.type)===Tf}var ug=class em{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new em),this._singleton}set alphabeticLayout(y){this.sendMessage("update-setting",{alphabeticLayout:y})}set layouts(y){this.sendMessage("update-setting",{layouts:y})}get normalizedLayouts(){return[]}set editToolbar(y){this.sendMessage("update-setting",{editToolbar:y})}set actionKeycap(y){this.sendMessage("update-setting",{actionKeycap:y})}set shiftKeycap(y){this.sendMessage("update-setting",{shiftKeycap:y})}set backspaceKeycap(y){this.sendMessage("update-setting",{backspaceKeycap:y})}set tabKeycap(y){this.sendMessage("update-setting",{tabKeycap:y})}set container(y){throw new Error("Container inside an iframe cannot be changed")}show(y){this.sendMessage("show",y)}hide(y){this.sendMessage("hide",y)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(y){y?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(y){return this.sendMessage("execute-command",{command:y}),!0}updateToolbar(y){this.sendMessage("update-toolbar",y)}update(y){this.sendMessage("update-setting",y)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");this.handleMessage(y.data)}}handleMessage(y){const{action:b}=y;if(b==="execute-command"){const{command:E}=y;Iu(E)==="virtual-keyboard"&&this.executeCommand(E);return}if(b==="synchronize-proxy"){this._boundingRect=y.boundingRect,this._isShifted=y.isShifted;return}if(b==="geometry-changed"){this._boundingRect=y.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(y,b={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(xe({type:Tf,action:y},b),this.targetOrigin)}},C0={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
|
|
|
.minimalist-backdrop {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
.minimalist-container {
|
|
|
--keycap-height: 40px;
|
|
|
--keycap-max-width: 53px;
|
|
|
--keycap-small-font-size: 12px;
|
|
|
background: var(--keyboard-background);
|
|
|
padding: 20px;
|
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
|
border: 1px solid var(--keyboard-border);
|
|
|
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
|
|
|
}
|
|
|
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},If={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},Td;function E0(a,y){var b,E,ee;const re=fc.singleton;if(!re)return;const ae=Du(a),fe=(E=(b=re.getKeycap(ae==null?void 0:ae.id))==null?void 0:b.variants)!=null?E:"";if(typeof fe=="string"&&!M0(fe)||Array.isArray(fe)&&fe.length===0){y==null||y();return}const ge={};let be="";for(const In of fg(fe)){const _r=_0(In),Ln=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);ge[Ln]=_r;const[sr,Pr]=Df(_r);be+=`<div id=${Ln} class="item ${Pr}">${sr}</div>`}const Me=document.createElement("div");Me.setAttribute("aria-hidden","true"),Me.className="MLK__variant-panel",Me.style.height="auto";const Ne=Object.keys(ge).length;let et=5;Ne===1?et=1:Ne===2||Ne===4?et=2:Ne===3||Ne===5||Ne===6?et=3:Ne>=7&&Ne<14&&(et=4),Me.style.width=`calc(var(--variant-keycap-length) * ${et} + 12px)`,Me.innerHTML=vp.createHTML(be),wl.open({root:(ee=re==null?void 0:re.container)==null?void 0:ee.querySelector(".ML__keyboard"),child:Me}),Td=new AbortController;const{signal:xt}=Td,It=a==null?void 0:a.getBoundingClientRect();if(It){It.top-Me.clientHeight<0&&(Me.style.width="auto",Ne<=6?Me.style.height="56px":Ne<=12?Me.style.height="108px":Ne<=18?Me.style.height="205px":Me.classList.add("compact"));const In=Math.max(0,Math.min(window.innerWidth-Me.offsetWidth,(It.left+It.right-Me.offsetWidth)/2)),_r=It.top-Me.clientHeight+5;Me.style.transform=`translate(${In}px, ${_r}px)`,Me.classList.add("is-visible"),requestAnimationFrame(()=>{Me.addEventListener("pointerup",Ln=>{const sr=Du(Ln.target);!(sr!=null&&sr.id)||!ge[sr.id]||(Eh(ge[sr.id]),Id(),y==null||y(),Ln.preventDefault())},{capture:!0,passive:!1,signal:xt}),Me.addEventListener("pointerenter",Ln=>{const sr=Du(Ln.target);!(sr!=null&&sr.id)||!ge[sr.id]||sr.classList.add("is-active")},{capture:!0,signal:xt}),Me.addEventListener("pointerleave",Ln=>{const sr=Du(Ln.target);!(sr!=null&&sr.id)||!ge[sr.id]||sr.classList.remove("is-active")},{capture:!0,signal:xt}),window.addEventListener("pointercancel",()=>{Id(),y==null||y()},{signal:xt}),window.addEventListener("pointerup",()=>{Id(),y==null||y()},{signal:xt})})}}function Id(){Td==null||Td.abort(),Td=null,wl.state==="open"&&wl.close()}function dg(a){if(a==="foreground-color"){const y=[];for(const b of Object.keys(je))y.push({class:"swatch-button",label:'<span style="border: 3px solid '+je[b]+'"></span>',command:["applyStyle",{color:b}]});return y}if(a==="background-color"){const y=[];for(const b of Object.keys(Ue))y.push({class:"swatch-button",label:'<span style="background:'+Ue[b]+'"></span>',command:["applyStyle",{backgroundColor:b}]});return y}}function M0(a){return If[a]!==void 0}function fg(a){var y;return typeof a!="string"?a:(If[a]||(If[a]=(y=dg(a))!=null?y:[]),If[a])}function hg(a){return typeof a=="string"?a:Object.entries(a).map(([y,b])=>`${y}:${b} !important`).join(";")}function pg(a){return Object.keys(a).map(y=>`${y} {${hg(a[y])}}`).join("")}function Dd(a){if(!a)return"";const y=new La,b=new Gn({mode:"math",type:"root",body:Xo(a,{context:y,args:ee=>ee==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),E=gu(Cd(new Dr(b.render(y),{classes:"ML__base"}),y));return vu(E,{classes:"ML__latex"}).toMarkup()}function Pd(a){var y;if(Array.isArray(a))return a.map(E=>Pd(E)).flat();const b=typeof a=="string"?{markup:a}:a;return"rows"in b&&Array.isArray(b.rows)&&(b.rows=b.rows.map(E=>E.map(ee=>_0(ee)))),(y=b.id)!=null||(b.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[b]}function mg(){var a,y;let E=window.mathVirtualKeyboard.alphabeticLayout;if(E==="auto"){const fe=_d();fe&&(E=fe.virtualLayout),(!E||E==="auto")&&(E=(a={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[tt.locale.slice(0,2)])!=null?a:"qwerty")}const ee={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},re=(y=ee[E])!=null?y:ee.qwerty,ae=E==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const fe of re){const ge=[];for(const be of fe)/[a-z]/.test(be)?ge.push({label:be,class:"hide-shift",shift:{label:be.toUpperCase()},variants:M0(be)?be:void 0}):be==="~"?E!=="dvorak"?ge.push("[backspace]"):ge.push({label:"[backspace]",width:1}):be==="^"?ge.push("[shift]"):be===" "&&ge.push("[separator-5]");ae.push(ge)}return ae.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:Pd({rows:ae})}}function k0(a){if(a==="alphabetic")return mg();if(typeof a=="string")return console.assert(C0[a]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${a}"`),k0(C0[a]);let y;if("rows"in a&&Array.isArray(a.rows)){console.assert(!("layers"in a||"markup"in a),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const ee=a,{rows:re}=ee,ae=ot(ee,["rows"]);y=me(xe({},ae),{layers:Pd({rows:a.rows})})}else if("markup"in a&&typeof a.markup=="string"){const ee=a,{markup:re}=ee,ae=ot(ee,["markup"]);y=me(xe({},ae),{layers:Pd(a.markup)})}else y=xe({},a),"layers"in a?y.layers=Pd(a.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let b=!1,E=!1;for(const ee of y.layers)if(ee.rows)for(const re of ee.rows.flat()){Pu(re)&&(b=!0);const ae=re.command;typeof ae=="string"&&["undo","redo","cut","copy","paste"].includes(ae)&&(E=!0)}return(!("displayShiftedKeycaps"in a)||a.displayShiftedKeycaps===void 0)&&(y.displayShiftedKeycaps=b),(!("displayEditToolbar"in a)||a.displayEditToolbar===void 0)&&(y.displayEditToolbar=!E),y}function gg(a,y){var b,E;let ee='<div class="left">';if(a.normalizedLayouts.length>1)for(const[re,ae]of a.normalizedLayouts.entries()){const fe=ae,ge=[re===y?"selected":"layer-switch"];fe.tooltip&&ge.push("MLK__tooltip"),fe.labelClass&&ge.push(...fe.labelClass.split(" ")),ee+=`<div class="${ge.join(" ")}"`,fe.tooltip&&(ee+=" data-tooltip='"+((b=ct(fe.tooltip))!=null?b:fe.tooltip)+"' "),re!==y&&(ee+=`data-layer="${fe.layers[0].id}"`),ee+=`>${(E=fe.label)!=null?E:"untitled"}</div>`}return ee+="</div>",ee}function vg(a,y){let b="";if(a.editToolbar==="none")return"";const ee=[];y.selectionIsCollapsed?ee.push("undo","redo","pasteFromClipboard"):ee.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const re={undo:`<div class='action ${y.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${ct("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${y.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${ct("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${ct("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${ct("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${ct("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return b+=ee.map(ae=>re[ae]).join(""),b}function yg(a){for(const y of a)bg(y)}function bg(a){const y=fc.singleton;if(!y)return;const b={};if(!a.id){if(a.hasAttribute("data-label")&&(b.label=a.dataset.label),a.hasAttribute("data-latex")&&(b.latex=a.dataset.latex),a.hasAttribute("data-key")&&(b.key=a.dataset.key),a.hasAttribute("data-insert")&&(b.insert=a.dataset.insert),a.hasAttribute("data-variants")&&(b.variants=a.dataset.variants),a.hasAttribute("data-aside")&&(b.aside=a.dataset.aside),a.className&&(b.class=a.className),!b.label&&!b.latex&&!b.key&&!b.insert&&(b.latex=a.innerText,b.label=a.innerHTML),a.hasAttribute("data-command"))try{b.command=JSON.parse(a.dataset.command)}catch(E){}a.id=y.registerKeycap(b)}if(!a.innerHTML){const[E,ee]=Df(b);a.innerHTML=window.MathfieldElement.createHTML(E)}}function xg(){_s("virtual-keyboard"),_s("core"),Lf()}function wg(){x("core"),x("virtual-keyboard")}var Sg=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
|
|
|
|
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
|
|
|
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-shift" viewBox="0 0 384 512">
|
|
|
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-commit" viewBox="0 0 512 512">
|
|
|
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
|
|
|
</symbol>
|
|
|
|
|
|
|
|
|
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
|
|
|
|
|
|
<symbol id="svg-command" viewBox="0 0 640 512">
|
|
|
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-undo" viewBox="0 0 512 512">
|
|
|
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-redo" viewBox="0 0 512 512">
|
|
|
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
|
|
|
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
|
|
|
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-tab" viewBox="0 0 448 512">
|
|
|
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
|
|
|
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
|
|
|
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-trash" viewBox="0 0 448 512">
|
|
|
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
|
|
|
</svg>`;function Cg(a){a.resetKeycapRegistry(),xg();const y=document.createElement("div");y.className="ML__keyboard";const b=document.createElement("div");b.className="MLK__plate",b.innerHTML=window.MathfieldElement.createHTML(Sg+a.normalizedLayouts.map((ae,fe)=>Eg(a,ae,fe)).join(""));const E=document.createElement("div");E.className="MLK__backdrop",E.appendChild(b),y.appendChild(E),y.addEventListener("pointerdown",kg,{passive:!1});const ee=y.querySelectorAll(".ML__edit-toolbar");if(ee)for(const ae of ee)ae.addEventListener("click",fe=>{var ge,be;let Me=fe.target,Ne="";for(;Me&&!Ne;)Ne=(ge=Me==null?void 0:Me.getAttribute("data-command"))!=null?ge:"",Me=(be=Me==null?void 0:Me.parentElement)!=null?be:null;Ne&&a.executeCommand(JSON.parse(Ne))});yg(y.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const re=y.querySelectorAll(".MLK__layer");console.assert(re.length>0,"No virtual keyboards available");for(const ae of re)ae.addEventListener("pointerdown",fe=>fe.preventDefault());return a.currentLayer=a.latentLayer,y}function Eg(a,y,b){const E=[];if(!("layers"in y))return"";for(const ee of y.layers)E.push(`<div tabindex="-1" class="MLK__layer" id="${ee.id}">`),(a.normalizedLayouts.length>1||y.displayEditToolbar)&&(E.push("<div class='MLK__toolbar' role='toolbar'>"),E.push(gg(a,b)),y.displayEditToolbar&&E.push('<div class="ML__edit-toolbar right"></div>'),E.push("</div>")),E.push(Mg(a,ee)),E.push("</div>");return E.join("")}function Mg(a,y){if(typeof y=="string")return y;let b="";if(typeof y.style=="string"?b+=`<style>${y.style}</style>`:typeof y.style=="object"&&(b+=`<style>${pg(y.style)}</style>`),y.backdrop&&(b+=`<div class='${y.backdrop}'>`),y.container&&(b+=`<div class='${y.container}'>`),y.rows){b+="<div class=MLK__rows>";for(const E of y.rows){b+="<div dir='ltr' class=MLK__row>";for(const ee of E)if(ee){const re=a.registerKeycap(ee),[ae,fe]=Df(ee);/(^|\s)separator/.test(fe)?b+=`<div class="${fe}"`:b+=`<div tabindex="-1" id="${re}" class="${fe}"`,ee.tooltip&&(b+=` data-tooltip="${ee.tooltip}"`),b+=`>${ae}</div>`}b+="</div>"}b+="</div>"}else y.markup&&(b+=y.markup);return y.container&&(b+="</div>"),y.backdrop&&(b+="</div>"),b}function Df(a,y={shifted:!1}){var b,E,ee,re,ae,fe,ge;let be="",Me=(b=a.class)!=null?b:"";if(y.shifted&&Pu(a)&&(Me+=" is-active"),y.shifted&&"shift"in a)typeof a.shift=="string"?be=Dd(a.shift):typeof a.shift=="object"&&(be=a.shift.label?a.shift.label:(E=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?E:""),typeof a.shift=="object"&&(Me=(re=(ee=a.shift.class)!=null?ee:a.class)!=null?re:"");else{if(be=a.label?a.label:(ae=Dd(a.latex||a.insert||"")||a.key)!=null?ae:"",a.shift){let Ne;typeof a.shift=="string"?Ne=Dd(a.shift):a.shift.label?Ne=a.shift.label:Ne=(fe=Dd(a.shift.latex||a.shift.insert||"")||a.shift.key)!=null?fe:"",be+=`<span class="MLK__shift">${Ne}</span>`}a.aside&&(be+=`<aside>${a.aside}</aside>`)}return a.layer&&!/layer-switch/.test(Me)&&(Me+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(Me)||(Me+=" MLK__keycap"),!/\bw[0-9]+\b/.test(Me)&&a.width&&(Me+=(ge={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[a.width])!=null?ge:""),[be,Me||"MLK__keycap"]}var Fc={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function _0(a){var y;if(typeof a=="string"){if(a==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(a="[,]"),!Fc[a])return{latex:a};a={label:a}}let b;return"label"in a&&a.label&&Fc[a.label]&&(b=me(xe(xe({},Fc[a.label]),a),{label:Fc[a.label].label})),"key"in a&&a.key&&Fc[a.key]&&(b=me(xe(xe({},Fc[a.key]),a),{key:Fc[a.key].key})),b?(b.command==="insertDecimalSeparator"&&(b.label=(y=window.MathfieldElement.decimalSeparator)!=null?y:"."),a.label==="[action]"&&(b=xe(xe({},b),window.mathVirtualKeyboard.actionKeycap)),a.label==="[shift]"&&(b=xe(xe({},b),window.mathVirtualKeyboard.shiftKeycap)),a.label==="[backspace]"&&(b=xe(xe({},b),window.mathVirtualKeyboard.backspaceKeycap)),a.label==="[tab]"&&(b=xe(xe({},b),window.mathVirtualKeyboard.tabKeycap)),b):a}var Od;function kg(a){var y;if(a.button!==0)return;const b=fc.singleton;if(!b)return;let E=a.target;for(;E&&!E.getAttribute("data-layer");)E=E.parentElement;if(E){b.currentLayer=(y=E.getAttribute("data-layer"))!=null?y:"",a.preventDefault();return}const ee=Du(a.target);if(!(ee!=null&&ee.id))return;const re=b.getKeycap(ee.id);if(!re)return;console.assert(a.type==="pointerdown");const ae=new AbortController,fe=ae.signal;ee.classList.add("is-pressed"),ee.addEventListener("pointerenter",Pf(ae),{capture:!0,signal:fe}),ee.addEventListener("pointerleave",Pf(ae),{capture:!0,signal:fe}),ee.addEventListener("pointercancel",Pf(ae),{signal:fe}),ee.addEventListener("pointerup",Pf(ae),{signal:fe}),Pu(re)&&(ee.classList.add("is-active"),b.shiftPressCount++),re.variants&&(Od&&clearTimeout(Od),Od=setTimeout(()=>{ee.classList.contains("is-pressed")&&(ee.classList.remove("is-pressed"),ee.classList.add("is-active"),a.target&&"releasePointerCapture"in a.target&&a.target.releasePointerCapture(a.pointerId),E0(ee,()=>{ae.abort(),ee==null||ee.classList.remove("is-active")}))},300)),a.preventDefault()}function Pf(a){return y=>{const b=Du(y.target);if(!(b!=null&&b.id))return;const E=fc.singleton;if(!E)return;const ee=E.getKeycap(b.id);if(ee){if(y.type==="pointerenter"&&y.target===b&&y.isPrimary&&b.classList.add("is-pressed"),y.type==="pointercancel"){b.classList.remove("is-pressed"),Pu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted)),a.abort();return}if(y.type==="pointerleave"&&y.target===b){b.classList.remove("is-pressed"),Pu(ee)&&(E.shiftPressCount--,b.classList.toggle("is-active",E.isShifted));return}if(y.type==="pointerup"){Od&&clearTimeout(Od),Pu(ee)?b.classList.toggle("is-active",E.isShifted):b.classList.contains("is-pressed")&&(b.classList.remove("is-pressed"),E.isShifted&&ee.shift?typeof ee.shift=="string"?E.executeCommand(["insert",ee.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Eh(ee.shift):Eh(ee),E.shiftPressCount===1&&!y.shiftKey&&(E.shiftPressCount=0)),a.abort(),y.preventDefault();return}}}}function Eh(a){var y;let b=a.command;!b&&a.insert&&(b=["insert",a.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!b&&a.key&&(b=["typedText",a.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!b&&a.latex&&(b=["insert",a.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),b||(b=["typedText",a.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(y=fc.singleton)==null||y.executeCommand(b)}function _g(a){if(a.nodeType!==1)return!1;const y=a.classList;return y.contains("MLK__keycap")||y.contains("shift")||y.contains("action")||y.contains("fnbutton")||y.contains("bigfnbutton")}function Du(a){if(!a)return;let y=a;for(;y&&!_g(y);)y=y.parentElement;return y!=null?y:void 0}function Pu(a){return!!a.class&&/(^|\s)shift($|\s)/.test(a.class)}var fc=class tm{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var y,b,E;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(b=(y=window.document)==null?void 0:y.body)!=null?b:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(ee=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(E=window.top)==null||E.addEventListener("message",this)}catch(ee){window.addEventListener("message",this)}document.body.addEventListener("focusin",ee=>{const re=ee.target;re!=null&&re.isConnected&&setTimeout(()=>{const ae=L0();ae&&!ae.readOnly&&ae.mathVirtualKeyboardPolicy==="auto"&&it()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",ee=>{ee.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{L0()||this.hide()},300)})}get currentLayer(){var y,b,E;return(E=(b=(y=this._element)==null?void 0:y.querySelector(".MLK__layer.is-visible"))==null?void 0:b.id)!=null?E:""}set currentLayer(y){var b;if(!this._element){this.latentLayer=y;return}let E=y?this._element.querySelector(`#${y}.MLK__layer`):null;E||(E=this._element.querySelector(".MLK__layer")),E&&((b=this._element.querySelector(".MLK__layer.is-visible"))==null||b.classList.remove("is-visible"),E.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(y){var b;this._shiftPressCount=y>2||y<0?0:y,(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(y){const b="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[b]=y,b}getKeycap(y){return y?this.keycapRegistry[y]:void 0}getLayer(y){const b=this.normalizedLayouts;for(const E of b)for(const ee of E.layers)if(ee.id===y)return ee}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(y){this._alphabeticLayout=y,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(y){this._actionKeycap=typeof y=="string"?{label:y}:y}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(y){this._shiftKeycap=typeof y=="string"?{label:y}:y}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(y){this._backspaceKeycap=typeof y=="string"?{label:y}:y}get tabKeycap(){return this._tabKeycap}set tabKeycap(y){this._tabKeycap=typeof y=="string"?{label:y}:y}get layouts(){return this._layouts}set layouts(y){this.updateNormalizedLayouts(y),this.rebuild()}updateNormalizedLayouts(y){const b=Array.isArray(y)?[...y]:[y],E=b.findIndex(ee=>ee==="default");E>=0&&b.splice(E,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(b),this._normalizedLayouts=b.map(ee=>k0(ee))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(y){this._editToolbar=y,this.rebuild()}get container(){return this._container}set container(y){this._container=y,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new tm}catch(y){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(y,b,E){this.listeners[y]||(this.listeners[y]=new Set),this.listeners[y].has(b)||this.listeners[y].add(b)}dispatchEvent(y){return!this.listeners[y.type]||this.listeners[y.type].size===0?!0:(this.listeners[y.type].forEach(b=>{typeof b=="function"?b(y):b==null||b.handleEvent(y)}),!y.defaultPrevented)}removeEventListener(y,b,E){this.listeners[y]&&this.listeners[y].delete(b)}get element(){return this._element}set element(y){var b;this._element!==y&&((b=this._element)==null||b.remove(),this._element=y)}get visible(){return this._visible}set visible(y){y?this.show():this.hide()}get boundingRect(){var y;if(!this._visible)return new DOMRect;const b=(y=this._element)==null?void 0:y.getElementsByClassName("MLK__plate")[0];return b?b.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var y,b;const E=this.boundingRect.height;if(this.container===document.body){(y=this._element)==null||y.style.setProperty("--_keyboard-height",`calc(${E}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const ee=E-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${ee}px)`:`${ee}px`}else(b=this._element)==null||b.style.setProperty("--_keyboard-height",`${E}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const y=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=y,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const y=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(y&&(y.backdrop||y.container)));const b=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(b)for(const E of b){const ee=this.getKeycap(E.id);if(ee){const[re,ae]=Df(ee,{shifted:this.isShifted});E.innerHTML=window.MathfieldElement.createHTML(re),E.className=ae}}}show(y){var b;if(this._visible)return;const E=this.container;if(E&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const ee=this._element.getElementsByClassName("MLK__plate")[0];if(ee&&this.observer.observe(ee),E===window.document.body){const re=E.style.paddingBottom;this.originalContainerBottomPadding=re;const ae=ee.offsetHeight-1;E.style.paddingBottom=re?`calc(${re} + ${ae}px)`:`${ae}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(b=this._element)==null||b.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,y!=null&&y.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var ee;return(ee=this._element)==null?void 0:ee.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(y){var b;const E=this.container;if(E&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const ee=this._element.getElementsByClassName("MLK__plate")[0];ee&&this.observer.unobserve(ee),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),Id(),wg(),(b=this._element)==null||b.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(E.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var y,b;return(b=(y=this.element)==null?void 0:y.offsetHeight)!=null?b:0}buildAndAttachElement(){var y;console.assert(!this.element),this.element=Cg(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",b=>{b.shiftKey||((b.ctrlKey||b.button===2)&&E0(b.target),b.preventDefault(),b.stopPropagation())},{capture:!0}),(y=this.container)==null||y.appendChild(this.element)}handleEvent(y){if(Ch(y)){if(!yd(y.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${y.origin}) cannot be handled`,"SecurityError");y.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:y.data.action!=="update-setting"&&y.data.action!=="proxy-created"&&y.data.action!=="execute-command"&&(console.assert(y.source!==void 0),this.connectedMathfieldWindow=y.source),this.handleMessage(y.data,y.source)}if(this._element)switch(y.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":y.button!==2&&y.preventDefault();break;case"keydown":{y.key==="Shift"&&!y.repeat&&(this.shiftPressCount=1);break}case"keyup":{(y.key==="Shift"||!y.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(y,b){const{action:E}=y;if(E==="execute-command"){const{command:ee}=y,re=Iu(ee);if(window.top!==void 0&&re!=="virtual-keyboard")return;this.executeCommand(ee);return}if((E==="connect"||E==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b),E!=="disconnect"&&window===window.top){if(E==="show"){typeof y.animate!="undefined"?this.show({animate:y.animate}):this.show();return}if(E==="hide"){typeof y.animate!="undefined"?this.hide({animate:y.animate}):this.hide();return}if(E==="update-setting"){y.alphabeticLayout&&(this.alphabeticLayout=y.alphabeticLayout),y.layouts&&(this.layouts=y.layouts),y.editToolbar&&(this.editToolbar=y.editToolbar);return}if(E==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},b);return}}}sendMessage(y,b,E){if(E||(E=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||E===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:xe({type:Tf,action:y},b)}));return}if(E)E.postMessage(xe({type:Tf,action:y},b),{targetOrigin:this.targetOrigin});else if(b.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:b.command})),y==="execute-command"&&Array.isArray(b.command)&&b.command[0]==="insert"){const ee=b.command[1].split("");for(const re of ee)this.dispatchEvent(new KeyboardEvent("keydown",{key:re,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:re,bubbles:!0}))}}stateWillChange(y){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:y},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(y){const b=this._element;if(!b)return;b.classList.toggle("is-math-mode",y.mode==="math"),b.classList.toggle("is-text-mode",y.mode==="text"),b.classList.toggle("can-undo",y.canUndo),b.classList.toggle("can-redo",y.canRedo),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-copy",!y.selectionIsCollapsed),b.classList.toggle("can-paste",!0);const E=b.querySelectorAll(".ML__edit-toolbar");if(E)for(const ee of E)ee.innerHTML=vg(this,y)}update(y){this._style=y.style,this.updateToolbar(y)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(y){let b,E=[],ee=Iu(y);return Oe(y)?(b=y[0],b==="performWithFeedback"&&(y=y.slice(1),ee=Iu(y)),E=y.slice(1)):b=y,b=b.replace(/-\w/g,re=>re[1].toUpperCase()),ee==="virtual-keyboard"?Sl[b].fn(void 0,...E):(this.sendMessage("execute-command",{command:y}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function L0(){var a,y;let b=Cf(),E=null;for(;b;){if("host"in b&&((y=(a=b.host)==null?void 0:a.tagName)==null?void 0:y.toLowerCase())==="math-field"){E=b.host;break}b=b.parentNode}return E}if(ft()&&!("mathVirtualKeyboard"in window))if(window===window.top){const a=fc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>a})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>ug.singleton,configurable:!0});function Of(a){const y={};for(const b of Object.keys(a))switch(b){case"scriptDepth":const E=a.scriptDepth;if(Oe(E))y.scriptDepth=[E[0],E[1]];else if(typeof E=="number")y.scriptDepth=[E,E];else if(typeof E=="string"){const[re,ae]=E.split(",").map(fe=>parseInt(fe.trim()));y.scriptDepth=[re,ae]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let ee=a.mathVirtualKeyboardPolicy.toLowerCase();if(ee==="sandboxed"){if(window!==window.top){const re=fc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>re})}ee="manual"}y.mathVirtualKeyboardPolicy=ee;break;case"letterShapeStyle":a.letterShapeStyle==="auto"?tt.locale.startsWith("fr")?y.letterShapeStyle="french":y.letterShapeStyle="tex":y.letterShapeStyle=a.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(a.defaultMode)?y.defaultMode=a.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),y.defaultMode="math");break;case"macros":y.macros=at(a.macros);break;default:Oe(a[b])?y[b]=[...a[b]]:typeof a[b]=="object"&&!(a[b]instanceof Element)&&b!=="computeEngine"?y[b]=xe({},a[b]):y[b]=a[b]}return y}function zc(a,y){let b;typeof y=="string"?b=[y]:y===void 0?b=Object.keys(a):b=y;const E={};for(const ee of b)a[ee]===null?E[ee]=null:Oe(a[ee])?E[ee]=[...a[ee]]:typeof a[ee]=="object"&&!(a[ee]instanceof Element)&&ee!=="computeEngine"?E[ee]=xe({},a[ee]):E[ee]=a[ee];return typeof y=="string"?E[y]:E}function Rf(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:kt,backgroundColorMap:Xe,letterShapeStyle:tt.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:a=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(a),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:lh,inlineShortcuts:ff,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:sh,value:""}}function A0(a){return a.defaultMode==="inline-math"?"math":a.defaultMode}function hc(a,y){!a||!y||(Oe(a)?a.forEach(b=>hc(b,y)):typeof a=="object"&&!a.style.color&&!a.style.backgroundColor&&!a.style.fontFamily&&!a.style.fontShape&&!a.style.fontSeries&&!a.style.fontSize&&!a.style.variant&&!a.style.variantStyle&&(a.applyStyle(y),hc(a.body,y),hc(a.above,y),hc(a.below,y),hc(a.subscript,y),hc(a.superscript,y)))}function Mh(a,y,b,E){function ee(ae,fe){for(const ge of re)if(ge.style[ae]!==fe)return!1;return!0}if(y=a.normalizeRange(y),y[0]===y[1])return!1;const re=a.getAtoms(y,{includeChildren:!0});E.operation==="toggle"&&(b.color&&ee("color",b.color)&&(b.color="none",delete b.verbatimColor),b.backgroundColor&&ee("backgroundColor",b.backgroundColor)&&(b.backgroundColor="none",delete b.verbatimBackgroundColor),b.fontFamily&&ee("fontFamily",b.fontFamily)&&(b.fontFamily="none"),b.fontSeries&&ee("fontSeries",b.fontSeries)&&(b.fontSeries="auto"),b.fontShape&&ee("fontShape",b.fontShape)&&(b.fontShape="auto"),b.fontSize&&ee("fontSize",b.fontSize)&&(b.fontSize=dl),b.variant&&ee("variant",b.variant)&&(b.variant="normal"),b.variantStyle&&ee("variantStyle",b.variantStyle)&&(b.variantStyle=""));for(const ae of re)ae.applyStyle(b);return!0}function Lg(a,y){const b=a.at(a.position);if(b.type==="composition")b.value=y;else{const{caret:E}=b;b.caret=void 0;const ee=new Wl(y,{mode:b.mode});ee.caret=E,b.parent.addChildAfter(ee,b),a.position+=1}}function Ag(a){const y=a.at(a.position);y.type==="composition"&&(y.parent.removeChild(y),a.position-=1)}Hn(["math","displaymath"],Gs),Hn("center",Gs),Tt("displaylines","",{parse:a=>{const y=[];let b=[];a.beginContext({tabular:!0});do{if(a.end()||a.match("<}>"))break;a.matchColumnSeparator()||a.matchRowSeparator()?(y.push([b]),b=[]):b.push(...a.scan(E=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(E)))}while(!0);return a.endContext(),y.push([b]),y},createAtom:a=>new sa("lines",a.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Rn("array","{columns:colspec}",(a,y,b,E)=>new sa(a,kh(y),b,{columns:E[0],mathstyleName:"textstyle"})),Rn(["equation","equation*","subequations"],"",(a,y,b)=>new sa(a,kh(y),b,{columns:[{align:"c"}]})),Rn(["multline","multline*"],"",Gs),Rn(["align","align*","aligned","eqnarray"],"",Gs),Rn("split","",Gs),Rn(["gather","gathered"],"",Gs),Rn(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",Gs),Rn(["smallmatrix","smallmatrix*"],"[columns:colspec]",Gs),Rn(["cases","dcases","rcases"],"",Gs);function Tg(a){for(const y of a)for(const b of y)if(b.length>0)return!1;return!0}function kh(a,y=1){return Tg(a)?Array(y).fill([[new Gn({type:"first"}),new Ki]]):a.map(b=>b.length===0?[[new Gn({type:"first"})]]:b.map(E=>E.length===0?[new Gn({type:"first"})]:(E[0].type!=="first"&&E.unshift(new Gn({type:"first"})),E)))}function Gs(a,y=[[[]]],b=[],E=[]){switch(y=kh(y,["split","align","align*","aligned","eqnarray"].includes(a)?2:1),a){case"math":return new sa(a,y,b,{mathstyleName:"textstyle"});case"displaymath":return new sa(a,y,b,{mathstyleName:"textstyle"});case"center":return new sa(a,y,b,{columns:[{align:"c"}]});case"multline":case"multline*":return new sa(a,y,b,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new sa(a,y,b,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new sa(a,y,b,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Kc(E[0])});case"bmatrix":case"bmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Kc(E[0])});case"Bmatrix":case"Bmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Kc(E[0])});case"vmatrix":case"vmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Kc(E[0])});case"Vmatrix":case"Vmatrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Kc(E[0])});case"matrix":case"matrix*":return new sa(a,y,b,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Kc(E==null?void 0:E[0])});case"smallmatrix":case"smallmatrix*":return new sa(a,y,b,{mathstyleName:"scriptstyle",columns:Kc(E==null?void 0:E[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new sa(a,y,b,{mathstyleName:a==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new sa(a,y,b,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new sa(a,y,b,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let ee=0;for(const fe of y)ee=Math.max(ee,fe.length);const re=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let ae=2;for(;ae<ee;)re.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),ae+=2;return re.push({gap:0}),new sa(a,y,b,{arraycolsep:0,columns:re,minColumns:2})}}return new sa(a,y,b,{mathstyleName:"textstyle"})}function Kc(a){return a!=null?a:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Ig(a,y){let b=a.at(a.position);for(;b&&!(b.parent instanceof sa);)b=b.parent;if(b&&b.type==="array"&&b.environmentName,!b||!(b.parent instanceof sa)){const E=a.at(a.position);if(b=E,!b.parent.parent){let ee=a.extractAtoms([a.position,a.lastOffset]),re=a.extractAtoms([0,a.position]);re.length===0&&(re=Nf()),ee.length===0&&(ee=Nf());let ae;return y.endsWith("column")?(ae=Gs("split",[[re,ee]]),a.root=ae,Hc(ae,0,0)?Wc(a,ae,0,0):Hc(ae,0,1)?Wc(a,ae,0,1):a.position=a.offsetOf(E)):(ae=Gs("lines",[[re],[ee]]),a.root=ae,Hc(ae,0,0)?Wc(a,ae,0,0):Hc(ae,1,0)?Wc(a,ae,1,0):a.position=a.offsetOf(E)),[void 0,[0,0]]}if(b.parent instanceof Wa){const ee=b.parent;let re=a.extractAtoms([a.position,a.offsetOf(ee.lastChild)]),ae=a.extractAtoms([a.offsetOf(ee.firstChild),a.position]);ae.length===0&&(ae=Nf()),re.length===0&&(re=Nf());let fe="pmatrix";const ge=ee.leftDelim,be=ee.rightDelim;ge==="("&&(be===")"||be==="?")?fe="pmatrix":(ge==="["||ge==="\\lbrack")&&(be==="]"||be==="\\rbrack"||be==="?")?fe="bmatrix":ge==="\\vert"&&be==="\\vert"?fe="vmatrix":ge==="\\Vert"&&be==="\\Vert"?fe="Vmatrix":(ge==="{"||ge==="\\lbrace")&&(be==="."||be==="?")&&(fe="cases");const Me=Gs(fe,y.endsWith("column")?[[ae,re]]:[[ae],[re]]);return ee.parent.addChildBefore(Me,ee),ee.parent.removeChild(ee),Hc(Me,0,0)?Wc(a,Me,0,0):y.endsWith("column")?Hc(Me,0,1)?Wc(a,Me,0,1):a.position=a.offsetOf(b):Hc(Me,1,0)?Wc(a,Me,1,0):a.position=a.offsetOf(b),[void 0,[0,0]]}}return b&&b.parent instanceof sa?[b.parent,b.parentBranch]:[void 0,[0,0]]}function Hc(a,y,b){const E=a.getCell(y,b);return!E||E.length!==2?!1:E[1].type==="placeholder"}function Dg(a,y,b,E){const ee=y.getCell(b,E);return ee?[a.offsetOf(ee[0]),a.offsetOf(ee[ee.length-1])]:-1}function Wc(a,y,b,E){const ee=Dg(a,y,b,E);typeof ee!="number"&&a.setSelection(ee)}function Bf(a,y,b,E,ee){const re=y.getCell(b,E);re&&a.setPositionHandlingPlaceholder(a.offsetOf(re[ee==="start"?0:re.length-1]))}function $f(a,y){const[b,[E,ee]]=Ig(a,y);if(b)switch(y){case"after row":b.addRowAfter(E),Bf(a,b,E+1,0,"end");break;case"after column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnAfter(ee),Bf(a,b,E,ee+1,"end");break;case"before row":b.addRowBefore(E),Bf(a,b,E,0,"start");break;case"before column":if(b.maxColumns<=b.colCount){a.announce("plonk");return}b.addColumnBefore(ee),Bf(a,b,E,ee,"start");break}}function T0(a){return a.contentWillChange({inputType:"insertText"})?($f(a,"after row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Pg(a){return a.contentWillChange({inputType:"insertText"})?($f(a,"before row"),a.contentDidChange({inputType:"insertText"}),!0):!1}function I0(a){return a.contentWillChange({inputType:"insertText"})?($f(a,"after column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function Og(a){return a.contentWillChange({inputType:"insertText"})?($f(a,"before column"),a.contentDidChange({inputType:"insertText"}),!0):!1}function D0(a,y){if(!a.contentWillChange({}))return!1;a.mathfield.snapshot();let b=".",E=".";switch(y){case"pmatrix":case"pmatrix*":b="(",E=")";break;case"bmatrix":case"bmatrix*":b="[",E="]";break;case"Bmatrix":case"Bmatrix*":b="\\lbrace",E="\\rbrace";break;case"vmatrix":case"vmatrix*":b="\\vert",E="\\vert";break;case"Vmatrix":case"Vmatrix*":b="\\Vert",E="\\Vert";break;case"matrix":case"matrix*":b=".",E=".";break;case"cases":case"dcases":b="\\lbrace";break;case"rcases":E="\\rbrace";break}const ee=a.at(a.position),re=ee.type==="array"?ee:a.parentEnvironment;return re.environmentName=y,re.leftDelim=b,re.rightDelim=E,a.contentDidChange({}),!0}function P0(a,y){let b=a.at(a.position);for(;b&&!(Array.isArray(b.parentBranch)&&b.parent instanceof sa);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&(b==null?void 0:b.parent)instanceof sa){const E=b.parent,ee=b.parentBranch;let re;switch(y){case"row":if(E.rowCount>1){E.removeRow(ee[0]);const ae=E.getCell(Math.max(0,ee[0]-1),ee[1]);re=a.offsetOf(ae[ae.length-1])}break;case"column":if(E.colCount>E.minColumns){E.removeColumn(ee[1]);const ae=E.getCell(ee[0],Math.max(0,ee[1]-1));re=a.offsetOf(ae[ae.length-1])}break}re&&a.setPositionHandlingPlaceholder(re)}}function Rg(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"row"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}function Bg(a){return a.contentWillChange({inputType:"deleteContent"})?(P0(a,"column"),a.contentDidChange({inputType:"deleteContent"}),!0):!1}Ls({addRowAfter:T0,addColumnAfter:I0,addRowBefore:Pg,addColumnBefore:Og,removeRow:Rg,removeColumn:Bg,setEnvironment:D0},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Nf(){return[new Ki]}var O0=class nm{constructor(y){this.recording=!1,this.model=y,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(y){y&&this.index>=0&&(this.stack[this.index].selection=y),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(y){return this.recording?(y&&y===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>nm.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=y!=null?y:"",!0):!1}};O0.maximumDepth=1e3;var $g=O0;function _h(a,y,b){if(a.at(y).mode!=="text")return y;const E=b==="backward"?-1:1;let ee;if(he.test(a.at(y).value)){let re=y,ae;do ae=a.at(re).mode==="text"&&he.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}else if(/\s/.test(a.at(y).value)){let re=y;for(;a.at(re)&&a.at(re).mode==="text"&&/\s/.test(a.at(re).value);)re+=E;if(!a.at(re))ee=re-E;else{let ae=!0;do ae=a.at(re).mode==="text"&&!/\s/.test(a.at(re).value),re+=E;while(a.at(re)&&ae);ee=a.at(re)?re-2*E:re-E}}else{let re=y;for(;a.at(re)&&a.at(re).mode==="text"&&!/\s/.test(a.at(re).value);)re+=E;ee=a.at(re)?re:re-E;let ae=!0;for(;a.at(re)&&ae;)ae=a.at(re).mode==="text"&&/\s/.test(a.at(re).value),ae&&(ee=re),re+=E;ee=a.at(re)?re-2*E:re-E}return ee-(E>0?0:1)}function Ou(a,y,b){var E,ee,re,ae,fe,ge,be;const Me=a.position;(E=b==null?void 0:b.extend)!=null&&E||a.collapseSelection(y);let Ne=a.at(a.position);if(y==="forward"&&(Ne.type==="subsup"?(Ne=Ne.rightSibling,Ne||(Ne=a.at(a.position+1))):Ne=a.at(a.position+1)),!Ne)return a.announce("plonk"),!1;let et=a.offsetOf(Ne);if(Ne instanceof al)et=_h(a,et,y);else if(Ne instanceof ns)if(Ne.isSuggestion)for(console.assert(y==="forward");Ne&&Ne instanceof ns;)Ne.isSuggestion=!1,et=a.offsetOf(Ne),Ne=Ne.rightSibling;else if(y==="forward"){if(Ne=Ne.rightSibling,!Ne||!(Ne instanceof ns))return a.announce("plonk"),!1;for(;Ne&&Ne instanceof ns&&/[a-zA-Z\*]/.test(Ne.value);)et=a.offsetOf(Ne),Ne=Ne.rightSibling}else{if(Ne=Ne.leftSibling,!Ne||!(Ne instanceof ns))return a.announce("plonk"),!1;for(;Ne&&Ne instanceof ns&&/[a-zA-Z\*]/.test(Ne.value);)et=a.offsetOf(Ne),Ne=Ne.leftSibling}else if(y==="forward"&&Ne.type==="mopen"){let xt=0;do Ne.type==="mopen"?xt+=1:Ne.type==="mclose"&&(xt-=1),Ne=Ne.rightSibling;while(!Ne.isLastSibling&&xt!==0);et=a.offsetOf(Ne.leftSibling)}else if(y==="backward"&&Ne.type==="mclose"){let xt=0;do Ne.type==="mopen"?xt+=1:Ne.type==="mclose"&&(xt-=1),Ne=Ne.leftSibling;while(!Ne.isFirstSibling&&xt!==0);et=a.offsetOf(Ne)}else if(y==="backward")if(Ne.type==="first")for(;et>0&&Ne.type==="first";)et-=1,Ne=a.at(et);else{const xt=Ne.type;Ne.type==="subsup"&&(et=a.offsetOf(a.at(et).leftSibling)),et-=1;let It=(ee=a.at(et))==null?void 0:ee.type;for(;et>=0&&It===xt;)((re=a.at(et))==null?void 0:re.type)==="subsup"?et=a.offsetOf(a.at(et).leftSibling):et-=1,It=a.at(et).type}else{const{type:xt}=Ne;let It=(ae=a.at(et))==null?void 0:ae.type;const{lastOffset:In}=a;for(;et<=In&&(It===xt||It==="subsup");){for(;((fe=a.at(et).rightSibling)==null?void 0:fe.type)==="subsup";)et=a.offsetOf(a.at(et).rightSibling);et+=1,It=(ge=a.at(et))==null?void 0:ge.type}et-=1}if((be=b==null?void 0:b.extend)!=null&&be){if(!a.setSelection(a.anchor,et))return a.announce("plonk"),!1}else{if(et===a.position)return a.announce("plonk"),!1;a.position=et}return a.announce("move",Me),a.mathfield.stopCoalescingUndo(),!0}function Cl(a,y,b){var E,ee;if(b=b!=null?b:{extend:!1},a.mathfield.adoptStyle=y==="backward"?"right":"left",y!=="forward"){const[fe,ge]=g0(a);fe!==void 0&&ge!==void 0&&a.deleteAtoms([fe,ge])}if(y==="upward")return Fg(a,b);if(y==="downward")return zg(a,b);if(b.extend){let fe=Ff(a,a.position,y);fe<0&&(fe=0),fe>a.lastOffset&&(fe=a.lastOffset);const ge=a.setSelection(a.anchor,fe);return a.mathfield.stopCoalescingUndo(),ge}if(a.selectionIsPlaceholder){a.collapseSelection(y);const fe=Cl(a,y);return a.mathfield.stopCoalescingUndo(),fe}let re=a.position;const ae=re;if(a.collapseSelection(y)?(re=a.position,R0(a,re)||(re=Ff(a,re,y))):re=Ff(a,re,y),re<0||re>a.lastOffset){let fe=!0;return a.silenceNotifications||(fe=(ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0),fe&&a.announce("plonk"),fe}return a.setPositionHandlingPlaceholder(re),a.mathfield.stopCoalescingUndo(),a.announce("move",ae),!0}function Ff(a,y,b){return y=y+(b==="forward"?1:-1),y<0||y>a.lastOffset||R0(a,y)?y:Ff(a,y,b)}function R0(a,y){var b;const E=a.at(y);let ee=E.parent;for(;ee&&!ee.inCaptureSelection;)ee=ee.parent;return!(ee!=null&&ee.inCaptureSelection||(b=E.parent)!=null&&b.skipBoundary&&(!E.isFirstSibling&&E.isLastSibling||E.type==="first")||a.mathfield.hasEditablePrompts&&!E.parentPrompt)}function Ng(a,y,b){let E=1/0,ee=0;for(;ee<y.length;ee++){const re=Cu(a.getHTMLElement(y[ee])).right,ae=Math.abs(b-re);if(ae<=E)E=ae;else break}return y[ee-1]}function zf(a,y,b,E,ee){const re=a.mathfield.hasEditablePrompts,ae=re?b.filter(be=>be.type==="prompt"&&!be.captureSelection):b,fe=Cu(a.mathfield.getHTMLElement(y)).right,ge=a.offsetOf(Ng(a.mathfield,ae,fe))-(re?1:0);if(E){const[be,Me]=a.selection.ranges[0];let Ne;ge<(ee==="up"?be:Me)?Ne={ranges:[[ge,Me]],direction:"backward"}:Ne={ranges:[[be,ge]],direction:"forward"},a.setSelection(Ne)}else a.setPositionHandlingPlaceholder(ge);a.announce(`move ${ee}`)}function Fg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("backward");const re=()=>{var ge,be;let Me=!0;return a.silenceNotifications||(Me=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(Me?"plonk":"line"),Me},ae=a.at(a.position);let fe=ae;for(;fe&&fe.parentBranch!=="below"&&!(Array.isArray(fe.parentBranch)&&fe.parent instanceof sa);)fe=fe.parent;if(Array.isArray(fe==null?void 0:fe.parentBranch)&&fe.parent instanceof sa){const ge=fe.parent;if(fe.parentBranch[0]<1)return re();const be=fe.parentBranch[0]-1,Me=ge.array[be][fe.parentBranch[1]];if(!Me.some(et=>et.type==="prompt"&&!et.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,Me,ee,"up")}else if(fe){const ge=(E=fe.parent.branch("above"))!=null?E:fe.parent.createBranch("above");if(!ge.some(Me=>Me.type==="prompt"&&Me.placeholderId)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"up")}else return re();return a.mathfield.stopCoalescingUndo(),!0}function zg(a,y){var b,E;const ee=(b=y==null?void 0:y.extend)!=null?b:!1;ee||a.collapseSelection("forward");const re=()=>{var ge,be;let Me=!0;return a.silenceNotifications||(Me=(be=(ge=a.mathfield.host)==null?void 0:ge.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?be:!0),a.announce(Me?"plonk":"line"),Me},ae=a.at(a.position);let fe=ae;for(;fe&&fe.parentBranch!=="above"&&!(Array.isArray(fe.parentBranch)&&fe.parent instanceof sa);)fe=fe.parent;if(Array.isArray(fe==null?void 0:fe.parentBranch)&&fe.parent instanceof sa){const ge=fe.parent;if(fe.parentBranch[0]+1>ge.array.length-1)return re();const be=fe.parentBranch[0]+1,Me=ge.array[be][fe.parentBranch[1]];if(!Me.some(et=>et.type==="prompt"&&!et.captureSelection)&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,Me,ee,"down")}else if(fe){const ge=(E=fe.parent.branch("below"))!=null?E:fe.parent.createBranch("below");if(!ge.some(Me=>Me.type==="prompt")&&a.mathfield.hasEditablePrompts)return re();zf(a,ae,ge,ee,"down")}else return re();return!0}function B0(a){const y=a.position,b=a.at(y).parent;return b!=null&&b.parent?(a.position=a.offsetOf(b),a.mathfield.stopCoalescingUndo(),a.announce("move",y),!0):(a.announce("plonk"),!1)}function Kg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!1):E=!0,b=b.parent;return E?y:0}function Hg(a){let y=0,b=a.at(a.position),E=!1;for(;b;)(!b.hasEmptyBranch("superscript")||!b.hasEmptyBranch("subscript"))&&(y+=1),b.hasEmptyBranch("superscript")?b.hasEmptyBranch("subscript")||(E=!0):E=!1,b=b.parent;return E?y:0}function $0(a){var y;if(a.collapseSelection(),Kg(a)>=a.mathfield.options.scriptDepth[1])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=b.rightSibling)==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Zs({style:b.computedStyle}),b),b=b.rightSibling),b.createBranch("superscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.superscript[0]))),!0}function N0(a){var y;if(a.collapseSelection(),Hg(a)>=a.mathfield.options.scriptDepth[0])return a.announce("plonk"),!1;let b=a.at(a.position);return b.subsupPlacement===void 0&&(((y=a.at(a.position+1))==null?void 0:y.type)!=="subsup"&&b.parent.addChildAfter(new Zs({style:a.at(a.position).computedStyle}),b),b=a.at(a.position+1)),b.createBranch("subscript"),a.setSelection(a.getSiblingsRange(a.offsetOf(b.subscript[0]))),!0}function Wg(){function a(ge){const be=[],Me=[];return[...ge.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(y).forEach((et,xt)=>{const It=E(et);It===0?be.push(et):Me.push({documentOrder:xt,tabIndex:It,node:et})}),Me.sort((et,xt)=>et.tabIndex===xt.tabIndex?et.documentOrder-xt.documentOrder:et.tabIndex-xt.tabIndex).map(et=>et.node).concat(be)}function y(ge){return!(!b(ge)||ee(ge)||E(ge)<0)}function b(ge){return!(ge.disabled||ge.type==="hidden"&&ge.tagName.toUpperCase()==="INPUT"||fe(ge))}function E(ge){var be;const Me=Number.parseInt((be=ge.getAttribute("tabindex"))!=null?be:"NaN",10);return Number.isNaN(Me)?ge.contentEditable==="true"||(ge.nodeName==="AUDIO"||ge.nodeName==="VIDEO")&&ge.getAttribute("tabindex")===null?0:ge.tabIndex:Me}function ee(ge){return ge.tagName.toUpperCase()==="INPUT"&&ge.type==="radio"&&!ae(ge)}function re(ge,be){for(const Me of ge)if(Me.checked&&Me.form===be)return Me;return null}function ae(ge){var be;if(!ge.name)return!0;const Ne=((be=ge.form)!=null?be:ge.ownerDocument).querySelectorAll('input[type="radio"][name="'+ge.name+'"]'),et=re(Ne,ge.form);return!et||et===ge}function fe(ge){if(!ft()||ge===document.activeElement||ge.contains(document.activeElement))return!1;if(getComputedStyle(ge).visibility==="hidden")return!0;const be=ge.getBoundingClientRect();if(be.width===0||be.height===0)return!0;for(;ge;){if(getComputedStyle(ge).display==="none")return!0;ge=ge.parentElement}return!1}return ft()?a(document.body):[]}function bs(a,y,b="forward"){const E=a.position;if(Array.isArray(y)){const ee=a.offsetOf(y[0]),re=a.offsetOf(y[y.length-1]);return b==="forward"?a.setSelection(ee,re):a.setSelection(re,ee),a.announce("move",E),a.mathfield.stopCoalescingUndo(),!0}return b==="forward"?bs(a,[y.leftSibling,y]):bs(a,[y,y.leftSibling])}function ll(a,y){const b=a.position;if(typeof y=="number"&&(y=a.at(y)),y.type==="prompt")a.setSelection(a.offsetOf(y.firstChild),a.offsetOf(y.lastChild));else{const E=a.offsetOf(y);y.type==="placeholder"?a.setSelection(E-1,E):a.position=E}return a.announce("move",b),a.mathfield.stopCoalescingUndo(),!0}function Kf(a,y,b=!0){var E,ee;const re=y==="forward"?1:-1;a.at(a.anchor).type==="placeholder"&&Cl(a,y);let ae;const fe=a.at(a.anchor).parentPrompt;fe?y==="forward"?ae=a.offsetOf(fe)+1:ae=a.offsetOf(fe.leftSibling):ae=Math.max(a.position+re,0);const ge=Lh(a,ae,y);if(!ge||y==="forward"&&a.offsetOf(ge)<ae||y==="backward"&&a.offsetOf(ge)>ae){if(!b||!((ee=(E=a.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("move-out",{detail:{direction:y},cancelable:!0,bubbles:!0,composed:!0})))==null||ee))return a.announce("plonk"),!1;const Me=Wg();if(!document.activeElement||Me.length<=1)return a.announce("plonk"),!1;let Ne=Me.indexOf(document.activeElement)+re;return Ne<0&&(Ne=Me.length-1),Ne>=Me.length&&(Ne=0),Me[Ne].focus(),a.mathfield.stopCoalescingUndo(),!0}return ll(a,ge),!0}function Lh(a,y=0,b="forward"){return a.findAtom(E=>E.type==="placeholder"||E.type==="prompt"||!a.mathfield.readOnly&&E.treeDepth>2&&E.isFirstSibling&&E.isLastSibling,y,b)}Ls({moveToOpposite:a=>{const y={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},b=a.at(a.position),{parent:E}=b;if(!E)return a.announce("plonk"),!1;const ee=b.parentBranch;let re;if(typeof ee=="string"&&(re=y[ee]),!re){const fe=b.subsupPlacement?N0(a):$0(a);return a.mathfield.stopCoalescingUndo(),fe}E.branch(re)||E.createBranch(re);const ae=a.setSelection(a.getBranchRange(a.offsetOf(E),re));return a.mathfield.stopCoalescingUndo(),ae},moveBeforeParent:a=>{const{parent:y}=a.at(a.position);return y?(a.position=a.offsetOf(y),a.mathfield.stopCoalescingUndo(),!0):(a.announce("plonk"),!1)},moveAfterParent:a=>B0(a),moveToNextChar:a=>Cl(a,"forward"),moveToPreviousChar:a=>Cl(a,"backward"),moveUp:a=>Cl(a,"upward"),moveDown:a=>Cl(a,"downward"),moveToNextWord:a=>Ou(a,"forward"),moveToPreviousWord:a=>Ou(a,"backward"),moveToGroupStart:a=>{const y=a.offsetOf(a.at(a.position).firstSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:a=>{const y=a.offsetOf(a.at(a.position).lastSibling);return y===a.position?(a.announce("plonk"),!1):(a.position=y,a.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:a=>{var y,b,E,ee;if(a.position===a.lastOffset&&a.anchor===a.lastOffset)return Kf(a,"forward");const re=a.at(a.position);if(re.mode==="text"){if(a.selectionIsCollapsed){let et=re;for(;et&&et.mode==="text";)et=et.leftSibling;let xt=re;for(;((y=xt.rightSibling)==null?void 0:y.mode)==="text";)xt=xt.rightSibling;if(et&&xt)return bs(a,[et,xt])}if(re.rightSibling.mode==="text"){let et=re;for(;et&&et.mode==="text";)et=et.rightSibling;return et?(ll(a,(b=et.leftSibling)!=null?b:et),a.mathfield.switchMode("math"),!0):ll(a,a.lastOffset)}}const fe=a.at(a.anchor).parentPrompt,ge=fe?a.offsetOf(fe)+1:Math.max(a.position+1,0),be=Lh(a,ge,"forward");if(be)return ll(a,be);const Me=F0(a,re,et=>et.type==="leftright"||et.type==="text","forward");if(Me){if(Me.mode==="text"){let et=Me;for(;et&&et.mode==="text";)et=et.rightSibling;return bs(a,[(E=Me.leftSibling)!=null?E:Me,(ee=et.leftSibling)!=null?ee:et])}return bs(a,Me)}const Ne=re.parent;if(Ne){if(Ne.type==="leftright"||Ne.type==="surd")return bs(a,Ne);if(re.parentBranch==="superscript"&&Ne.subscript)return bs(a,Ne.subscript);if(re.parentBranch==="above"&&Ne.below)return bs(a,Ne.below);if(re.parentBranch==="superscript"||re.parentBranch==="subscript")return ll(a,Ne);if(re.parentBranch==="above"||re.parentBranch==="below")return bs(a,Ne)}return ll(a,a.lastOffset)},moveToPreviousGroup:a=>{var y;if(a.position===0&&a.anchor===0)return Kf(a,"backward");let b=a.at(a.position);const E=b.mode;if(E==="text"){if(a.selectionIsCollapsed){let fe=b;for(;fe&&fe.mode==="text";)fe=fe.leftSibling;let ge=b;for(;((y=ge.rightSibling)==null?void 0:y.mode)==="text";)ge=ge.rightSibling;if(fe&&ge)return bs(a,[fe,ge])}for(;b&&b.mode==="text";)b=b.leftSibling;return b?ll(a,b):ll(a,0)}const ee=a.at(a.anchor).parentPrompt,re=ee?a.offsetOf(ee.leftSibling):Math.max(a.position-1,0),ae=Lh(a,re,"backward");if(ae)return ll(a,ae);if(E==="math"){const fe=F0(a,b,be=>be.type==="leftright"||be.type==="text","backward");if(fe){if(fe.mode==="text"){let be=fe;for(;be&&be.mode==="text";)be=be.leftSibling;return bs(a,[fe,be])}return bs(a,fe)}const ge=b.parent;if(ge){if(ge.type==="leftright"||ge.type==="surd")return bs(a,ge);if(b.parentBranch==="subscript"&&ge.superscript)return bs(a,ge.superscript);if(b.parentBranch==="below"&&ge.above)return bs(a,ge.above);if(b.parentBranch==="superscript"||b.parentBranch==="subscript")return ll(a,ge);if(b.parentBranch==="above"||b.parentBranch==="below")return bs(a,ge)}return ll(a,0)}return!1},moveToMathfieldStart:a=>a.selectionIsCollapsed&&a.position===0?(a.announce("plonk"),!1):(a.position=0,a.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:a=>a.selectionIsCollapsed&&a.position===a.lastOffset?(a.announce("plonk"),!1):(a.position=a.lastOffset,a.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:$0,moveToSubscript:N0},{target:"model",changeSelection:!0}),Ls({moveToNextPlaceholder:a=>Kf(a,"forward"),moveToPreviousPlaceholder:a=>Kf(a,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function F0(a,y,b,E){if(E==="forward"){let re=y.rightSibling;for(;re&&!b(re);)re=re.rightSibling;return re}let ee=y.leftSibling;for(;ee&&!b(ee);)ee=ee.leftSibling;return ee}function Hf(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1,re="";for(;!ee;){const ae=a.at(E);ee=y===0||ae===void 0||ae.type==="first"||ae.mode!=="math"||!(ae.type&&/mord|mpunct|operator/.test(ae.type)||ae.type==="mop"&&/[a-zA-Z ]+/.test(ae.value))||!ae.hasEmptyBranch("superscript")||!ae.hasEmptyBranch("subscript")||typeof b=="function"&&!b(ae),ee||(ae.mode="text",ae.command=ae.value,ae.verbatimLatex=void 0,re+=ae.value),E-=1,y-=1}a.contentDidChange({data:re,inputType:"insertText"})}function Uc(a,y,b){typeof y=="function"&&(b=y,y=1/0),y===void 0&&(y=1/0);let E=a.position,ee=!1;const re=[];for(;!ee;){const ae=a.at(E);ee=y===0||!ae||ae.type==="first"||ae.isFirstSibling||ae.mode!=="text"||ae.value===" "||typeof b=="function"&&!b(ae),ee||(re.push(Gn.serialize([ae],{defaultMode:"math"})),ae.mode="math"),E-=1,y-=1}Ah(a),a.contentDidChange({data:ya(re),inputType:"insertText"})}function Ah(a){var y;let b=a.position-1;for(;b>=0&&((y=a.at(b))==null?void 0:y.mode)==="math";)b-=1;if(!(b<0)&&a.at(b).mode==="text"&&a.at(b).value===" "&&a.at(b-1).mode==="math"){a.at(b-1).parent.removeChild(a.at(b-1));const E=a.silenceNotifications;a.silenceNotifications=!0,a.position-=1,a.silenceNotifications=E,a.contentDidChange({inputType:"deleteContent"})}}function Ug(a){let y="",b=a.position,E=!1;for(;!E;){const ee=a.at(b);E=!(ee&&(ee.mode==="text"||ee.mode==="math"&&ee.type&&/mord|mpunct/.test(ee.type))),E||(y=ee.value+y),b-=1}return y}function jg(a,y,b){const{model:E}=a;if(E.mode==="latex"||!E.at(E.position).isLastSibling||!b||!Sf(b))return!1;const ee=Lu(b);if(!E.selectionIsCollapsed)return!!(a.model.mode==="text"&&/[/_^]/.test(ee));const re=Ug(E)+ee;if(a.model.mode==="text"){if(y==="Esc"||/[/\\]/.test(ee))return!0;if(/[\^_]/.test(ee))return/(^|\s)[a-zA-Z][^_]$/.test(re)&&Uc(E,1),!0;const ae={")":"(","}":"{","]":"["}[ee],{parent:fe}=E.at(E.position);if(ae&&fe instanceof Wa&&fe.leftDelim===ae)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(re))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(ee))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(re))return Uc(E,1),!1;if(/\D\.[^\d\s]$/.test(re)){Uc(E,1);const ge=E.at(E.position);return ge.value="\u22C5",ge.style.variant="normal",ge.command="\\cdot",ge.verbatimLatex=void 0,E.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(re)||/\.\d$/.test(re)||/\([\d+\-.]$/.test(re))return Uc(E,1),!0;if(/\([a-z][,;]$/.test(re))return Uc(E,2),!0;if(/[\d+\-=><*|]$/.test(ee))return Ah(E),!0}else{if(y==="[Space]")return Hf(E,void 0,ae=>/[a-z][:,;.]$/.test(ae.value)),!0;if(/[a-zA-Z]{3,}$/.test(re)&&!/(dxd|abc|xyz|uvw)$/.test(re))return Hf(E,void 0,ae=>/[a-zA-Z]/.test(ae.value)),!0;if(/(^|\W)(if)$/i.test(re))return Hf(E,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(re)&&!/(αβγ)$/.test(re))return Hf(E,void 0,ae=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(ae.value)),!0;if(ee==="?"||ee==="."&&!/[\d-+]\.$/.test(re))return!0}return!1}function Zg(a,y){if(!a.isSelectionEditable||!a.keystrokeCaptionVisible)return;const b=z0(),E=a.element.getBoundingClientRect();b.style.left=`${E.left}px`,b.style.top=`${E.top-64}px`,b.innerHTML=window.MathfieldElement.createHTML("<span>"+(vh(y)||y)+"</span>"+b.innerHTML),b.style.visibility="visible",setTimeout(()=>{b.childNodes.length>0&&b.childNodes[b.childNodes.length-1].remove(),b.childNodes.length===0&&(b.style.visibility="hidden")},3e3)}function Vg(a){if(a.keystrokeCaptionVisible=!a.keystrokeCaptionVisible,a.keystrokeCaptionVisible){const y=z0();y.innerHTML=""}else{const y=Mf("mathlive-keystroke-caption-panel");y.style.visibility="hidden"}return!1}function z0(){const a=document.getElementById("mathlive-keystroke-caption-panel");return a||(_s("keystroke-caption"),_s("core"),Mf("mathlive-keystroke-caption-panel"))}function Gg(){document.getElementById("mathlive-keystroke-caption-panel")&&(bh("mathlive-keystroke-caption-panel"),x("core"),x("keystroke-caption"))}function K0(a,y){var b,E,ee;const{model:re}=a,ae=p0(y);if(y.isTrusted){$m(y);const xt=_d();a.keyboardLayout!==xt.id&&(a.keyboardLayout=xt.id,a._keybindings=void 0)}if(clearTimeout(a.inlineShortcutBufferFlushTimer),a.inlineShortcutBufferFlushTimer=0,Zg(a,ae),y.isTrusted&&y.defaultPrevented)return a.flushInlineShortcutBuffer(),!1;let fe,ge="",be;const Me=a.inlineShortcutBuffer;if(a.isSelectionEditable){if(re.mode==="math")if(ae==="[Backspace]")Me.pop();else if(!Sf(y))a.flushInlineShortcutBuffer();else{const xt=Lu(y),It=[...(E=(b=Me[Me.length-1])==null?void 0:b.keystrokes)!=null?E:[],xt];Me.push({state:re.getState(),keystrokes:It,leftSiblings:Xg(a)});let In=0,_r="";for(;!fe&&In<It.length;)be=Me.length-(It.length-In),_r=It.slice(In).join(""),fe=dd(Me[be].leftSiblings,_r,a.options.inlineShortcuts),!fe&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(_r)&&(fe=a.options.onInlineShortcut(a,_r)),In+=1;a.flushInlineShortcutBuffer({defer:!0})}a.options.smartMode&&(fe?a.switchMode("math"):jg(a,ae,y)&&(a.switchMode({math:"text",text:"math"}[re.mode]),ge=""))}if(!fe){if(ge||(ge=Um(a.keybindings,re.mode,y)),!ge&&(ae==="[Enter]"||ae==="[Return]")){let xt=!1;return re.contentWillChange({inputType:"insertLineBreak"})&&(a.host&&(xt=!a.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),xt||y.preventDefault&&(y.preventDefault(),y.stopPropagation()),re.contentDidChange({inputType:"insertLineBreak"})),xt}if((!ge||ae==="[Space]")&&re.mode==="math"){if(ae==="[Space]"){if(a.adoptStyle="none",a.flushInlineShortcutBuffer(),a.options.mathModeSpace)return ia.insert(re,a.options.mathModeSpace,{format:"latex",mode:"math"}),a.snapshot("insert-space"),ge="",a.dirty=!0,a.scrollIntoView(),y.preventDefault&&(y.preventDefault(),y.stopPropagation()),!1;const xt=re.at(re.position+1),It=re.at(re.position-1);if((xt==null?void 0:xt.mode)==="text"||(It==null?void 0:It.mode)==="text")return ia.insert(re," ",{mode:"text"}),a.snapshot("insert-space"),a.dirty=!0,a.scrollIntoView(),!1}(ee=re.at(re.position))!=null&&ee.isDigit()&&window.MathfieldElement.decimalSeparator===","&&Lu(y)===","&&(ge="insertDecimalSeparator")}}if(!fe&&!ge){if(re.mathfield.smartFence){if(Ih(re,Lu(y),a.effectiveStyle))return a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}else{const{parent:xt}=re.at(re.position);if(xt instanceof Wa&&xt.rightDelim==="?"&&re.at(re.position).isLastSibling&&/^[)}\]|]$/.test(ae))return a.snapshot(),xt.isDirty=!0,xt.rightDelim=ae,re.position+=1,re.selectionDidChange(),re.contentDidChange({data:Lu(y),inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1;if(!re.selectionIsCollapsed){const It=Lu(y);if(It==="("||It==="{"||It==="["){const In={"(":"(","{":"\\lbrace","[":"\\lbrack"}[It],_r={"(":")","{":"\\rbrace","[":"\\rbrack"}[It],[Ln,sr]=Vo(re.selection);return a.snapshot(),re.position=sr,ia.insert(re,_r,{format:"latex"}),re.position=Ln,ia.insert(re,In,{format:"latex"}),re.setSelection(Ln+1,sr+1),re.contentDidChange({data:It,inputType:"insertText"}),a.snapshot("insert-fence"),a.dirty=!0,a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}}}return!0}const Ne=re.at(Math.max(re.position,re.anchor)),{parent:et}=Ne;if(ge==="moveAfterParent"&&(et==null?void 0:et.type)==="leftright"&&Ne.isLastSibling&&a.options.smartFence&&Ih(re,".",a.defaultStyle)&&(ge="",Eo(a)),a.keyboardDelegate.cancelComposition(),ge)a.executeCommand(ge);else if(fe){const xt=a.effectiveStyle;re.setState(Me[be].state);const It=Me[Me.length-1].keystrokes;for(const In of It)ia.insert(re,In,{silenceNotifications:!0,style:xt});a.snapshot("insert-shortcut"),re.setState(Me[be].state),re.deferNotifications({content:!0,selection:!0,data:fe,type:"insertText"},()=>(ia.insert(re,fe,{format:"latex",style:xt}),Ah(a.model),fe.endsWith(" ")&&(a.switchMode("text"),ia.insert(re," ",{style:xt,mode:"text"})),a.snapshot(),re.selectionIsCollapsed||a.flushInlineShortcutBuffer(),!0)),a.dirty=!0,re.announce("replacement")}return a.scrollIntoView(),y.preventDefault&&y.preventDefault(),!1}function Th(a,y,b){const{model:E}=a;if(!a.isSelectionEditable){E.announce("plonk");return}b!=null||(b={}),b.focus&&a.focus(),b.feedback&&window.MathfieldElement.playSound("keypress"),typeof b.mode=="string"&&(a.switchMode(b.mode),a.snapshot());let ee=rf(y);const re=window.mathVirtualKeyboard;if(re!=null&&re.isShifted&&(ee=typeof ee=="string"?ee.toUpperCase():ee.map(ge=>ge.toUpperCase())),b.simulateKeystroke){let ge=!0;for(const be of ee)K0(a,new KeyboardEvent("keypress",{key:be}))&&(ge=!1);if(ge)return}const ae=E.at(E.position),fe=xe(xe({},ae.computedStyle),a.defaultStyle);if(E.selectionIsCollapsed||(E.deleteAtoms(Vo(E.selection)),a.snapshot("delete")),E.mode==="latex")E.deferNotifications({content:!0,selection:!0,data:y,type:"insertText"},()=>{Ef(a);for(const ge of ee)ia.insert(E,ge);a.snapshot("insert-latex"),Ad(a)});else if(E.mode==="text"){for(const ge of ee)ia.insert(E,ge,{style:fe});a.snapshot("insert-text")}else if(E.mode==="math")for(const ge of ee)Yg(a,ge,fe,ae);a.dirty=!0,a.scrollIntoView()}function Xg(a){const y=a.model,b=[];let E=y.at(Math.min(y.position,y.anchor));for(;E.type!=="first";)b.push(E),E=E.leftSibling;return b}function Yg(a,y,b,E){const ee=a.model;let re={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[y];if(y===" "&&a.options.mathModeSpace&&(re=["insert",a.options.mathModeSpace]),re){a.executeCommand(re);return}if(/\d/.test(y)&&a.options.smartSuperscript&&E.parentBranch==="superscript"&&E.parent.type!=="mop"&&E.parent.type!=="operator"&&E.parent.type!=="extensible-symbol"&&E.hasNoSiblings){qg(ee),ia.insert(ee,y,{style:b}),a.snapshot(),B0(ee),a.snapshot();return}if(/[a-zA-Z0-9]/.test(y)&&a.adoptStyle!=="none"){const ae=a.adoptStyle==="left"?E:E.parent?E.rightSibling:null;(ae==null?void 0:ae.type)==="mord"&&/[a-zA-Z0-9]/.test(ae.value)&&(b=xe({},b),ae.style.variant&&(b.variant=ae.style.variant),ae.style.variantStyle&&(b.variantStyle=ae.style.variantStyle))}ia.insert(ee,y,{style:b}),a.snapshot(`insert-${ee.at(ee.position).type}`)}function qg(a){a.selectionIsCollapsed||(a.deleteAtoms(Vo(a.selection)),a.mathfield.snapshot("delete"))}function Ih(a,y,b){if(!y||a.mode!=="math")return!1;const E=a.at(a.position),{parent:ee}=E,re={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[y];if(!re)return!1;const ae=te[re],fe=ne[re];if(!a.selectionIsCollapsed){a.mathfield.snapshot();const[ge,be]=Vo(a.selection),Me=a.extractAtoms([ge,be]),Ne=ee.addChildrenAfter([new Wa("left...right",Me,{leftDelim:re,rightDelim:fe})],a.at(ge));return a.setSelection(a.offsetOf(Ne.firstChild),a.offsetOf(Ne.lastChild)),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(re==="|"){const ge=ee instanceof Wa?ee.leftDelim+ee.rightDelim:"";if(ge==="\\lbrace\\rbrace"||ge==="\\{\\}"||ge==="\\lbrace?")return a.mathfield.snapshot(),ia.insert(a,"\\,\\middle\\vert\\,",{format:"latex",style:b}),a.mathfield.snapshot("insert-fence"),a.contentDidChange({data:re,inputType:"insertText"}),!0}if(fe){if(ee instanceof Wa&&ee.firstChild===E&&(ee.leftDelim==="?"||ee.leftDelim==="."))return ee.leftDelim=re,ee.isDirty=!0,a.mathfield.snapshot(),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(!(ee instanceof Wa)){let Ne=E;for(;Ne&&!(Ne.type==="mclose"&&Ne.value===fe);)Ne=Ne.rightSibling;if(Ne){a.mathfield.snapshot();const et=a.extractAtoms([a.offsetOf(E),a.offsetOf(Ne)]);return et.pop(),ee.addChildrenAfter([new Wa("left...right",et,{leftDelim:re,rightDelim:fe})],E),a.position=a.offsetOf(ee.firstChild)+1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}}const ge=a.offsetOf(E.lastSibling);let be;for(be=a.position;be<=ge;be++){const Ne=a.at(be);if(Ne instanceof Wa&&(Ne.leftDelim==="?"||Ne.leftDelim===".")&&H0(re,Ne.rightDelim))break}const Me=a.at(be);if(be<=ge&&Me instanceof Wa){Me.leftDelim=re,a.mathfield.snapshot();let Ne=a.extractAtoms([a.position,be-1]);return Ne=Ne.filter(et=>et.type!=="first"),Me.addChildren(Ne,Me.parentBranch),a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(ee instanceof Wa&&(ee.leftDelim==="?"||ee.leftDelim===".")&&H0(re,ee.rightDelim)){ee.isDirty=!0,ee.leftDelim=re,a.mathfield.snapshot();const Ne=a.extractAtoms([a.offsetOf(E.firstSibling),a.position]);for(const et of Ne)ee.parent.addChildBefore(et,ee);return a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}if(!(ee instanceof Wa&&ee.leftDelim==="|")){if(a.mathfield.snapshot(),ia.insert(a,`\\left${re}\\right?`,{format:"latex",style:b}),E.lastSibling.type!=="first"){const Ne=a.offsetOf(E.lastSibling),et=a.extractAtoms([a.position,Ne]);a.at(a.position).body=et,a.position-=1}return a.mathfield.snapshot("insert-fence"),!0}}if(ae){let ge=E;for(;ge;){if(ge.type==="mopen"&&ge.value===ae){a.mathfield.snapshot();const xt=ge.leftSibling,It=a.extractAtoms([a.offsetOf(ge.leftSibling),a.offsetOf(E)]);It.shift();const In=new Wa("left...right",It,{leftDelim:ae,rightDelim:re});return ee.addChildrenAfter([In],xt),a.position=a.offsetOf(In),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0}ge=ge.leftSibling}if(ee instanceof Wa&&E.isLastSibling&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,a.position+=1,a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const be=a.offsetOf(E.firstSibling);let Me;for(Me=a.position;Me>=be;Me--){const xt=a.at(Me);if(xt instanceof Wa&&(xt.rightDelim==="?"||xt.rightDelim===".")&&Dh(xt.leftDelim,re))break}const Ne=a.at(Me);if(Me>=be&&Ne instanceof Wa)return a.mathfield.snapshot(),Ne.rightDelim=re,Ne.addChildren(a.extractAtoms([Me,a.position]),Ne.parentBranch),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;if(ee instanceof Wa&&(ee.rightDelim==="?"||ee.rightDelim===".")&&Dh(ee.leftDelim,re))return a.mathfield.snapshot(),ee.isDirty=!0,ee.rightDelim=re,ee.parent.addChildren(a.extractAtoms([a.position,a.offsetOf(E.lastSibling)]),ee.parentBranch),a.position=a.offsetOf(ee),a.contentDidChange({data:re,inputType:"insertText"}),a.mathfield.snapshot("insert-fence"),!0;const et=ee.parent;return et instanceof Wa&&(et.rightDelim==="?"||et.rightDelim===".")&&a.at(a.position).isLastSibling?(a.position=a.offsetOf(et),Ih(a,re,b)):!1}return!1}function Dh(a,y){return a?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y):ne[a]===y:!0}function H0(a,y){return y?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(y)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(a):te[y]===a:!0}Ls({undo:a=>(a.undo(),!0),redo:a=>(a.redo(),!0),scrollIntoView:a=>(a.scrollIntoView(),!0),scrollToStart:a=>(a.field.scroll(0,0),!0),scrollToEnd:a=>{const y=a.field.getBoundingClientRect();return a.field.scroll(y.left-window.scrollX,0),!0},toggleKeystrokeCaption:Vg,toggleContextMenu:a=>{const y=a.toggleContextMenu();return y||a.model.announce("plonk"),y},plonk:a=>(a.model.announce("plonk"),!0),switchMode:(a,y,b,E)=>(a.switchMode(y,b,E),!0),insert:(a,y,b)=>a.insert(y,b),typedText:(a,y,b)=>(Th(a,y,b),!0),insertDecimalSeparator:a=>{const y=a.model;return y.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&y.at(Math.max(y.position,y.anchor)).isDigit()?(a.insert("{,}",{format:"latex"}),a.snapshot("insert-mord"),!0):(a.insert("."),!0)},commit:a=>{var y;return a.model.contentWillChange({inputType:"insertLineBreak"})&&((y=a.host)==null||y.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(a,y,b)=>{const E=a.getPrompts();let ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re=0;for(;E.includes(ee)&&re<100;){if(re===99)return console.error("could not find a unique ID after 100 tries"),!1;ee="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),re++}return a.insert(`\\placeholder[${y!=null?y:ee}]{}`,b),!0}}),Ls({copyToClipboard:a=>(a.focus(),a.model.selectionIsCollapsed&&a.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),Ls({cutToClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):a.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:a=>(a.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(y=>{y&&a.model.contentWillChange({inputType:"insertFromPaste",data:y})?(a.stopCoalescingUndo(),a.stopRecording(),a.insert(y,{mode:a.model.mode})&&(Ad(a),a.startRecording(),a.snapshot("paste"),a.model.contentDidChange({inputType:"insertFromPaste"}),Eo(a))):a.model.announce("plonk"),a.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Jg(a,y){a.flushInlineShortcutBuffer(),a.stopCoalescingUndo();const b=Ph(a,y),{model:E}=a;return E.selectionIsCollapsed?(a.defaultStyle.fontSeries&&b.fontSeries===a.defaultStyle.fontSeries&&(b.fontSeries="auto"),b.fontShape&&b.fontShape===a.defaultStyle.fontShape&&(b.fontShape="auto"),b.color&&b.color===a.defaultStyle.color&&(b.color="none"),b.backgroundColor&&b.backgroundColor===a.defaultStyle.backgroundColor&&(b.backgroundColor="none"),b.fontSize&&b.fontSize===a.defaultStyle.fontSize&&(b.fontSize="auto"),a.defaultStyle=xe(xe({},a.defaultStyle),b)):a.model.deferNotifications({content:!0,type:"insertText"},()=>{E.selection.ranges.forEach(ee=>Mh(E,ee,b,{operation:"toggle"})),a.snapshot("style-change")}),!0}Ls({applyStyle:Jg},{target:"mathfield",canUndo:!0,changeContent:!0});function Ph(a,y){var b,E,ee,re,ae,fe,ge,be,Me,Ne;const et={};if(typeof y.color=="string"){const It=(E=a.colorMap((b=y.color)!=null?b:y.verbatimColor))!=null?E:"none";It!==y.color&&(et.verbatimColor=(ee=y.verbatimColor)!=null?ee:y.color),et.color=It}if(typeof y.backgroundColor=="string"){const It=(ae=a.backgroundColorMap((re=y.backgroundColor)!=null?re:y.verbatimBackgroundColor))!=null?ae:"none";It!==y.backgroundColor&&(et.verbatimBackgroundColor=(fe=y.verbatimBackgroundColor)!=null?fe:y.backgroundColor),et.backgroundColor=It}typeof y.fontFamily=="string"&&(et.fontFamily=y.fontFamily),typeof y.series=="string"&&(et.fontSeries=y.series),typeof y.fontSeries=="string"&&(et.fontSeries=y.fontSeries.toLowerCase()),et.fontSeries&&(et.fontSeries=(ge={bold:"b",medium:"m",normal:"m"}[et.fontSeries])!=null?ge:et.fontSeries),typeof y.shape=="string"&&(et.fontShape=y.shape),typeof y.fontShape=="string"&&(et.fontShape=y.fontShape.toLowerCase()),et.fontShape&&(et.fontShape=(be={italic:"it",up:"n",upright:"n",normal:"n"}[et.fontShape])!=null?be:et.fontShape),y.variant&&(et.variant=y.variant.toLowerCase()),y.variantStyle&&(et.variantStyle=y.variantStyle.toLowerCase());const xt=(Me=y.size)!=null?Me:y.fontSize;return typeof xt=="number"?et.fontSize=Math.max(1,Math.min(10,xt)):typeof xt=="string"&&(et.fontSize=(Ne={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[xt.toLowerCase()])!=null?Ne:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[xt]),et}function Oh(a){let[y,b]=Vo(a.selection);if(y=W0(a,y,"backward"),b=W0(a,b,"forward"),y===b){const E=a.at(y);if(E.type==="leftright")return a.setSelection(a.offsetOf(E.firstChild)-1,b);if(E.type==="first"&&(E.parent.type==="leftright"||E.parent.type==="surd"))return a.setSelection(y-1,a.offsetOf(E.parent.lastChild)+1);a.setSelection(y-1,b)}else a.setSelection(y,b);return!0}function W0(a,y,b){var E,ee,re;let ae=a.at(y);if(!ae)return y;const fe=b==="forward"?1:-1;if(ae.mode==="text"){for(;ae&&!(ae.mode!=="text"||!he.test(ae.value));)y+=fe,ae=a.at(y);return b==="backward"?y-1:y}if(ae.mode==="latex"){if(/[a-zA-Z\*]/.test(ae.value))if(b==="backward")for(;ae&&ae.mode==="latex"&&ae.value!=="\\"&&/[a-zA-Z]/.test(ae.value);)y+=fe,ae=a.at(y);else for(;ae&&ae.mode==="latex"&&/[a-zA-Z\*]/.test(ae.value);)y+=fe,ae=a.at(y);else if(ae.value==="{"){if(b==="forward"){for(;ae&&ae.mode==="latex"&&ae.value!=="}";)y+=fe,ae=a.at(y);return y}return y-1}else if(ae.value==="}"){if(b==="backward"){for(;ae&&ae.mode==="latex"&&ae.value!=="{";)y+=fe,ae=a.at(y);return y-1}return y}return y-1}if(ae.mode==="math"){if(ae.isDigit()){for(;(E=a.at(y+fe))!=null&&E.isDigit();)y+=fe;return b==="backward"?y-1:y}if(ae.style.variant||ae.style.variantStyle){let ge=(ee=a.at(y))==null?void 0:ee.style;for(;ge&&ge.variant===ae.style.variant&&ge.variantStyle===ae.style.variantStyle;)ge=(re=a.at(y+fe))==null?void 0:re.style,y+=fe;return b==="backward"?y-1:y}return y}return y}Ls({selectGroup:a=>{const y=Oh(a);return y||a.announce("plonk"),y},selectAll:a=>a.setSelection(0,a.lastOffset),extendSelectionForward:a=>Cl(a,"forward",{extend:!0}),extendSelectionBackward:a=>Cl(a,"backward",{extend:!0}),extendToNextWord:a=>Ou(a,"forward",{extend:!0}),extendToPreviousWord:a=>Ou(a,"backward",{extend:!0}),extendSelectionUpward:a=>Cl(a,"upward",{extend:!0}),extendSelectionDownward:a=>Cl(a,"downward",{extend:!0}),extendToNextBoundary:a=>Ou(a,"forward",{extend:!0}),extendToPreviousBoundary:a=>Ou(a,"backward",{extend:!0}),extendToGroupStart:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).firstSibling));return y||a.announce("plonk"),y},extendToGroupEnd:a=>{const y=a.setSelection(a.anchor,a.offsetOf(a.at(a.position).lastSibling));return y||a.announce("plonk"),y},extendToMathFieldStart:a=>{const y=a.setSelection(a.anchor,0);return y||a.announce("plonk"),y},extendToMathFieldEnd:a=>{const y=a.setSelection(a.anchor,a.lastOffset);return y||a.announce("plonk"),y}},{target:"model",changeSelection:!0});var jc=null,Rd=0,Wf=class Ys{static start(y,b,E,ee){var re;Ys.element=y,(re=Ys.controller)==null||re.abort(),Ys.controller=new AbortController;const ae={signal:Ys.controller.signal};"PointerEvent"in window?(y.addEventListener("pointermove",E,ae),y.addEventListener("pointerup",ee,ae),y.addEventListener("pointercancel",ee,ae),Rh(b)&&(Ys.pointerId=b.pointerId,y.setPointerCapture(b.pointerId))):(window.addEventListener("mousemove",E,ae),window.addEventListener("blur",ee,ae),window.addEventListener("mouseup",ee,ae))}static stop(){var y;(y=Ys.controller)==null||y.abort(),Ys.controller=void 0,typeof Ys.pointerId=="number"&&(Ys.element.releasePointerCapture(Ys.pointerId),Ys.pointerId=void 0)}};function Rh(a){return a!==null&&globalThis.PointerEvent!==void 0&&a instanceof PointerEvent}function U0(a,y){var b;if(y.buttons>1)return;a.atomBoundsCache=new Map;const E=a;let ee,re=!1,ae=!1,fe="none",ge=!1,be=!1;const Me=y.clientX,Ne=y.clientY,et=Date.now(),xt=E.field,It=setInterval(()=>{ge?xt.scroll({top:0,left:xt.scrollLeft-16}):be&&xt.scroll({top:0,left:xt.scrollLeft+16})},32);function In(){Wf.stop(),re=!1,clearInterval(It),a.element.classList.remove("tracking"),y&&y.preventDefault()}function _r(sr){if(!E.hasFocus()){In();return}const Pr=sr.clientX,mr=sr.clientY,di=Rh(sr)&&sr.pointerType==="touch"?20:5;if(Date.now()<et+500&&Math.abs(Me-Pr)<di&&Math.abs(Ne-mr)<di){sr.preventDefault(),sr.stopPropagation();return}const Pi=xt.getBoundingClientRect();be=Pr>Pi.right,ge=Pr<Pi.left;let bi=ee;Rh(sr)&&(sr.isPrimary||(bi=Bd(E,sr.clientX,sr.clientY,{bias:0})));const Pa=Bd(E,Pr,mr,{bias:Pr<=Me?Pr===Me?0:-1:1});bi>=0&&Pa>=0&&(E.model.extendSelectionTo(bi,Pa),Eo(a)),ae&&Oh(E.model)}jc&&Math.abs(jc.x-Me)<5&&Math.abs(jc.y-Ne)<5&&Date.now()<jc.time+500?(Rd+=1,jc.time=et):(jc={x:Me,y:Ne,time:et},Rd=1);const Ln=xt.getBoundingClientRect();if(Me>=Ln.left&&Me<=Ln.right&&Ne>=Ln.top&&Ne<=Ln.bottom){if(a.flushInlineShortcutBuffer(),a.adoptStyle="left",ee=Bd(a,Me,Ne,{bias:0}),ee>=0){if(a.element.classList.add("tracking"),y.shiftKey){const sr=a.model.selectionIsCollapsed;a.model.extendSelectionTo(a.model.anchor,ee),v0(a.model)||sr?fe="all":fe="selection"}else a.model.at(ee).type==="placeholder"?(a.model.setSelection(ee-1,ee),fe="selection"):((b=a.model.at(ee).rightSibling)==null?void 0:b.type)==="placeholder"?(a.model.setSelection(ee,ee+1),fe="selection"):(a.model.position=ee,v0(a.model)?fe="all":fe="selection");a.defaultStyle={},y.detail===3||Rd>2?(In(),(y.detail===3||Rd===3)&&(a.model.selection={ranges:[[0,a.model.lastOffset]]},fe="all")):re||(re=!0,Wf.start(xt,y,_r,In),(y.detail===2||Rd===2)&&(ae=!0,Oh(a.model),fe="all"))}a.hasFocus()||(fe="none",a.focus({preventScroll:!0}))}else jc=null;a.stopCoalescingUndo(),fe!=="none"&&(a.model.selectionIsCollapsed&&(fe="all"),Eo(a)),y.preventDefault()}function Qg(a,y,b){if(a>=b.left&&a<=b.right&&y>=b.top&&y<=b.bottom)return 0;const E=a-(b.left+b.right)/2,ee=y-(b.top+b.bottom)/2;return E*E+ee*ee}function j0(a,y,b,E,ee){if(!b.id)return[1/0,null];if(y.has(b.id))return y.get(b.id);const re=lc(a,b);if(!re)return[1/0,null];let ae=[1/0,null];if(b.hasChildren&&!b.captureSelection&&E>=re.left&&E<=re.right)for(const fe of b.children){const ge=j0(a,y,fe,E,ee);ge[0]<=ae[0]&&(ae=ge)}return ae[1]||(ae=[Qg(E,ee,re),b]),y.set(b.id,ae),ae}function ev(a,y,b){const[,E]=j0(a,new Map,a.model.root,y,b);return E}function Bd(a,y,b,E){var ee;const re=a.field.querySelector(".ML__latex").getBoundingClientRect();if(!re)return 0;if(y>re.right||b>re.bottom+8)return a.model.lastOffset;if(y<re.left||b<re.top-8)return 0;E=E!=null?E:{},E.bias=(ee=E.bias)!=null?ee:0;let ae=ev(a,y,b);const fe=[];let ge=ae;for(;ge;)fe.unshift(ge),ge=ge.parent;for(const Me of fe)if(Me.captureSelection){ae=Me;break}let be=a.model.offsetOf(ae);if(be<0)return-1;if(ae.leftSibling)if(E.bias===0&&ae.type!=="placeholder"){const Me=lc(a,ae);Me&&y<(Me.left+Me.right)/2&&(be=a.model.offsetOf(ae.leftSibling))}else E.bias<0&&(be=a.model.offsetOf(ae.leftSibling));return be}var tv=class extends ia{constructor(){super("math")}onPaste(a,y){if(!y||!a.model.contentWillChange({data:typeof y=="string"?y:null,dataTransfer:typeof y=="string"?null:y,inputType:"insertFromPaste"}))return!1;let b="",E="auto",ee=typeof y!="string"?y.getData("application/json+mathlive"):"";if(ee)try{const re=JSON.parse(ee);if(re&&Array.isArray(re)){a.snapshot();const ae=dc(re),{model:fe}=a;fe.selectionIsCollapsed||fe.deleteAtoms(Vo(fe.selection));const ge=fe.at(fe.position);if(ge.parent instanceof sa){console.assert(ge.parentBranch!==void 0);const be=[];let Me=[];ae[0].type==="first"&&ae.shift(),ae[ae.length-1].type==="first"&&ae.pop();for(const It of ae)It.type==="first"&&Me.length>0?(be.push(Me),Me=[It]):Me.push(It);Me.length>0&&be.push(Me);let Ne=Number(ge.parentBranch[0]),et=Number(ge.parentBranch[1]);const xt=ge.parent.maxColumns;for(;ge.parent.colCount-et<be.length&&ge.parent.colCount<xt;)ge.parent.addColumn();ge.parent.addChildrenAfter(be[0],ge);for(let It=1;It<be.length;It++)et++,et>=xt&&(et=0,ge.parent.addRowAfter(Ne),Ne++),ge.parent.setCell(Ne,et,be[It])}else ge.parent.addChildrenAfter(ae.filter(be=>be.type!=="first"),ge);return fe.position=fe.offsetOf(ae[ae.length-1]),fe.contentDidChange({inputType:"insertFromPaste"}),Eo(a),!0}}catch(re){}if(ee=typeof y!="string"?y.getData("application/json"):"",ee&&window.MathfieldElement.computeEngine)try{const re=JSON.parse(ee);if(typeof re=="object"&&"latex"in re&&re.latex&&(b=re.latex),!b){const ae=window.MathfieldElement.computeEngine.box(re);ae&&!ae.has("Error")&&(b=ae.latex)}b||(E="latex")}catch(re){}if(!b&&typeof y!="string"&&(b=y.getData("application/x-latex"),b&&(E="latex")),b||(b=typeof y=="string"?y:y.getData("text/plain")),b){let re;return[re,b]=yl(b),E==="auto"&&re&&(E="latex"),a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b,{format:E})&&(a.startRecording(),a.snapshot("paste"),Eo(a)),a.startRecording(),!0}return!1}insert(a,y,b){var E,ee;const re=typeof y=="string"?y:(ee=(E=window.MathfieldElement.computeEngine)==null?void 0:E.box(y).latex)!=null?ee:"";if(!b.silenceNotifications&&!a.contentWillChange({data:re,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:ae}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const fe=a.silenceNotifications;a.silenceNotifications=!0;const ge={"?":"\\placeholder{}","@":"\\placeholder{}"};ge[0]=b.insertionMode==="replaceAll"?"":a.getValue(a.selection,"latex-unstyled"),b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward"),!a.at(a.position).isLastSibling&&a.at(a.position+1).type==="placeholder"?a.deleteAtoms([a.position,a.position+1]):a.at(a.position).type==="placeholder"&&a.deleteAtoms([a.position-1,a.position]);let be=-1;ge[0]?ge["@"]=ge[0]:typeof y=="string"&&/(^|[^\\])#@/.test(y)&&(be=rv(a),be>=0&&(ge["@"]=a.getValue(be,a.position,"latex"))),ge[0]||(ge[0]=ge["?"]);let Me=!1;const Ne=Pr=>(Me=!0,ge[Pr]);let[et,xt]=Z0(a,y,Ne,b);if(!xt)return!1;const It=xt.length===1&&xt[0].type==="genfrac";It&&be>=0&&typeof a.mathfield.options.isImplicitFunction=="function"&&a.mathfield.options.isImplicitFunction(a.at(a.position).command)?(ge["@"]=ge["?"],Me=!1,[et,xt]=Z0(a,y,Ne,b)):be>=0&&a.deleteAtoms([be,a.position]);const{parent:In}=a.at(a.position),_r=In.hasEmptyBranch("body");if(It&&et!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&In instanceof Wa&&In.leftDelim==="("&&_r){const Pr=In.parent,mr=In.parentBranch;Pr.removeChild(In),Pr.setChildren(xt,mr)}const Ln=a.at(a.position);Ln.parent.addChildrenAfter(xt,Ln),et==="latex"&&typeof y=="string"&&(In==null?void 0:In.type)==="root"&&_r&&!Me&&(In.verbatimLatex=y),a.silenceNotifications=fe;const sr=xt[xt.length-1];if(b.selectionMode==="placeholder"){const Pr=xt.flatMap(mr=>[mr,...mr.children]).find(mr=>mr.type==="placeholder");if(Pr){const mr=a.offsetOf(Pr);a.setSelection(mr-1,mr),a.announce("move")}else sr&&(a.position=a.offsetOf(sr))}else b.selectionMode==="before"||(b.selectionMode==="after"?sr&&(a.position=a.offsetOf(sr)):b.selectionMode==="item"&&a.setSelection(a.anchor,a.offsetOf(sr)));return a.contentDidChange({data:re,inputType:"insertText"}),a.silenceNotifications=ae,!0}};function Z0(a,y,b,E){var ee;let re,ae=[];if(typeof y!="string"||E.format==="math-json"){const fe=window.MathfieldElement.computeEngine;if(!fe)return["math-json",[]];[re,y]=["latex",fe.box(y).latex],ae=Xo(y,{context:a.mathfield.context})}else typeof y=="string"&&E.format==="ascii-math"?([re,y]=Oc(y,{format:"ascii-math",inlineShortcuts:a.mathfield.options.inlineShortcuts}),ae=Xo(y,{context:a.mathfield.context}),re!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Uf(ae)):(E.format==="auto"||(ee=E.format)!=null&&ee.startsWith("latex"))&&(E.format==="auto"&&([re,y]=Oc(y,{format:"auto",inlineShortcuts:a.mathfield.options.inlineShortcuts})),E.format==="latex"&&([,y]=yl(y)),ae=Xo(y,{context:a.mathfield.context,args:b}),E.format!=="latex"&&a.mathfield.options.removeExtraneousParentheses&&Uf(ae));return hc(ae,E.style),[re!=null?re:"latex",ae]}function nv(a){if(!a||(console.assert(a[0].type==="first"),a.length>1))return null;const y=a[0];return y instanceof Wa&&y.leftDelim==="("&&y.rightDelim===")"?y.removeBranch("body"):null}function Uf(a){if(a){for(let y=0;a[y];y++){const b=a[y];if(b instanceof Wa&&b.leftDelim==="("){let E=0,ee=0,re=0;for(let ae=0;b.body[ae];ae++)b.body[ae].type==="genfrac"&&(E++,ee=ae),re++;re===0&&E===1&&(a[y]=b.body[ee])}}for(const y of a){for(const b of y.branches)if(!y.hasEmptyBranch(b)){Uf(y.branch(b));const E=nv(y.branch(b));E&&y.setChildren(E,b)}if(y instanceof sa)for(const b of y.cells)Uf(b)}}}function rv(a){let y=a.at(a.position);if(y.mode==="text"){for(;!y.isFirstSibling&&y.mode==="text";)y=y.leftSibling;return a.offsetOf(y)}const b=y;let E=!1;if(y.type==="mclose"){const ee=te[y.value];for(;!y.isFirstSibling&&!(y.type==="mopen"&&y.value===ee);)y=y.leftSibling;y.isFirstSibling||(y=y.leftSibling),E=!0}else y.type==="leftright"&&(y=y.leftSibling,E=!0);if(E)for(;!y.isFirstSibling&&(y.isFunction||V0(y));)y=y.leftSibling;else{const ee=[];for(;!y.isFirstSibling&&(V0(y)||ee.length>0);)y.type==="mclose"&&ee.unshift(y.value),y.type==="mopen"&&ee.length>0&&y.value===te[ee[0]]&&ee.shift(),y=y.leftSibling}return b===y?-1:a.offsetOf(y)}function V0(a){return a.isDigit()?!0:a.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(a.type)?!a.isExtensibleSymbol:!1}new tv;var iv=class extends ia{constructor(){super("text")}onPaste(a,y){if(!y)return!1;const b=typeof y=="string"?y:y.getData("text/plain");return b&&a.model.contentWillChange({inputType:"insertFromPaste",data:b})?(a.stopCoalescingUndo(),a.stopRecording(),this.insert(a.model,b)&&(a.model.contentDidChange({inputType:"insertFromPaste"}),a.startRecording(),a.snapshot("paste"),Eo(a)),a.startRecording(),!0):!1}insert(a,y,b={}){if(!a.contentWillChange({data:y,inputType:"insertText"}))return!1;b.insertionMode||(b.insertionMode="replaceSelection"),b.selectionMode||(b.selectionMode="placeholder"),b.format||(b.format="auto");const{silenceNotifications:E}=a;b.silenceNotifications&&(a.silenceNotifications=!0);const ee=a.silenceNotifications;a.silenceNotifications=!0,b.insertionMode==="replaceSelection"&&!a.selectionIsCollapsed?a.deleteAtoms(Vo(a.selection)):b.insertionMode==="replaceAll"?(a.root.setChildren([],"body"),a.position=0):b.insertionMode==="insertBefore"?a.collapseSelection("backward"):b.insertionMode==="insertAfter"&&a.collapseSelection("forward");const re=av(y,a.mathfield.context);if(hc(re,b.style),!re)return!1;const ae=a.at(a.position),fe=ae.parent.addChildrenAfter(re,ae);return a.silenceNotifications=ee,b.selectionMode==="before"||(b.selectionMode==="item"?a.setSelection(a.anchor,a.offsetOf(fe)):fe&&(a.position=a.offsetOf(fe))),a.contentDidChange({data:y,inputType:"insertText"}),a.silenceNotifications=E,!0}};function av(a,y){return a=a.replace(/\\/g,"\\textbackslash "),a=a.replace(/#/g,"\\#"),a=a.replace(/\$/g,"\\$"),a=a.replace(/%/g,"\\%"),a=a.replace(/&/g,"\\&"),a=a.replace(/_/g,"\\_"),a=a.replace(/{/g,"\\textbraceleft "),a=a.replace(/}/g,"\\textbraceright "),a=a.replace(/lbrace/g,"\\textbraceleft "),a=a.replace(/rbrace/g,"\\textbraceright "),a=a.replace(/\^/g,"\\textasciicircum "),a=a.replace(/~/g,"\\textasciitilde "),a=a.replace(/£/g,"\\textsterling "),Xo(a,{context:y,parseMode:"text"})}new iv;function El(a){return{value:a.model.getValue(),selectionIsCollapsed:a.model.selectionIsCollapsed,canUndo:a.canUndo(),canRedo:a.canRedo(),style:a.selectionStyle,mode:a.model.mode}}var fo=4,Cs=20,No=2*(Cs+fo),jf=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
|
|
|
</svg>`,G0=(a,y)=>`
|
|
|
<line x1="${a+Cs}" y1="${y+Cs}"
|
|
|
x2="${a>y?a+Cs:7*Cs+10*fo}"
|
|
|
y2="${a<y?y+Cs:7*Cs+10*fo}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
|
|
|
</svg>`,Zf=(a,y,b)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${a}" y="${y}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${b})" transform-origin="20 20">
|
|
|
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
|
|
|
</g>
|
|
|
</svg>`,ov=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*Cs+10*fo+5} ${8*Cs+10*fo+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${No+fo}"
|
|
|
height="${3*No}"
|
|
|
width="${No}"
|
|
|
rx="${No/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${No+fo}"
|
|
|
y="0"
|
|
|
height="${No}"
|
|
|
width="${3*No}"
|
|
|
rx="${No/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${Zf(2*(fo+No),2*fo+3*No,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${Zf(2*(fo+No),2*fo+No,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${Zf(2*fo+3*No,2*(fo+No),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${Zf(2*fo+No,2*(fo+No),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${jf(2*fo+No,fo)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${G0(2*fo+2*No,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${jf(2*fo+3*No,fo)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${jf(fo,2*fo+No)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${G0(fo,2*fo+2*No)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${jf(fo,2*fo+3*No)}
|
|
|
</g>
|
|
|
</svg>`,sv=a=>`
|
|
|
<svg id="matrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","matrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,lv=a=>`
|
|
|
<svg id="pmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","pmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
|
|
|
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,X0=a=>`
|
|
|
<svg id="Bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","Bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,cv=a=>`
|
|
|
<svg id="bmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4h-3v16h3"/>
|
|
|
<path class="cls-2" d="m22,4h3v16h-3"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,uv=a=>`
|
|
|
<svg id="vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
|
|
|
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
|
|
|
</svg>`,dv=a=>`
|
|
|
<svg id="Vmatrix" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
|
|
|
data-command='["setEnvironment","Vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
|
|
|
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
|
|
|
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
|
|
|
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
|
|
|
</svg>`,fv=a=>`
|
|
|
<svg id="cases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","cases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<circle cx="13" cy="8" r="1"/>
|
|
|
<circle cx="13" cy="16" r="1"/>
|
|
|
<circle cx="21" cy="8" r="1"/>
|
|
|
<circle cx="21" cy="16" r="1"/>
|
|
|
</svg>`,hv=a=>`
|
|
|
<svg id="rcases" class="${a}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","rcases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
|
|
|
<circle cx="15" cy="8" r="1"/>
|
|
|
<circle cx="15" cy="16" r="1"/>
|
|
|
<circle cx="7" cy="8" r="1"/>
|
|
|
<circle cx="7" cy="16" r="1"/>
|
|
|
</svg>`,Bh={matrix:sv,pmatrix:lv,bmatrix:cv,Bmatrix:X0,vmatrix:uv,Vmatrix:dv},$h={cases:fv,rcases:hv,Bmatrix:X0};function pv(a){var y,b;const E=(y=a.model.parentEnvironment)==null?void 0:y.array;if(!E)return;let ee=0;E.forEach(It=>{(!ee||It.length>ee)&&(ee=It.length)});let re=document.getElementById("mathlive-environment-popover");re||(re=Mf("mathlive-environment-popover"),_s("environment-popover"),_s("core"),re.setAttribute("aria-hidden","true"));let ae;const fe=re.querySelector(".MLEP__environment-controls");fe?ae=fe:(ae=document.createElement("div"),re.innerHTML="",re.appendChild(ae)),ae.className="MLEP__environment-controls",ae.style.display="flex",ae.style.width="100%",ae.style.height="100%",ae.style.boxSizing="border-box",ae.innerHTML=ov;let ge=[],be="";const Me=a.model.parentEnvironment.environmentName;if(us(Me)){const It=gv(Me);be=Bh[It]("active");const In=Bh,{[It]:_r}=In,Ln=ot(In,[Ie(It)]);ge=Object.values(Ln).map(sr=>sr("inactive"))}else if(ds(Me)){const It=vv(Me);be=$h[It]("active");const In=$h,{[It]:_r}=In,Ln=ot(In,[Ie(It)]);ge=Object.values(Ln).map(sr=>sr("inactive"))}else Do(Me)&&(be=Bh.matrix("active"),ge=Object.values($h).map(It=>It("inactive")));const Ne=document.createElement("div");Ne.className="MLEP__environment-delimiter-controls",Ne.style.display="flex",Ne.style.flexDirection="column",Ne.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${be}
|
|
|
${ge.join("")}
|
|
|
</div>`,be&&ae.appendChild(Ne),ae.querySelectorAll("[data-command]").forEach(It=>{const In=It.dataset.command;let _r=In;try{_r=JSON.parse(In)}catch(Ln){}It.addEventListener("mousedown",Ln=>Ln.preventDefault()),_r&&It.addEventListener("click",()=>a.executeCommand(_r))});const xt=(b=a.field)==null?void 0:b.getBoundingClientRect();xt&&(re.style.top=`${window.scrollY+(xt.top-re.clientHeight-15)}px`,re.style.left=`${xt.left+20}px`,re.classList.add("is-visible"))}function Nh(){const a=document.getElementById("mathlive-environment-popover");a==null||a.classList.remove("is-visible")}function mv(){document.getElementById("mathlive-environment-popover")&&(bh("mathlive-environment-popover"),x("environment-popover"),x("core"))}function Vf(a){if(!a.hasFocus())return;let y=!1;if(a.model.mode==="math"){const b=a.model.parentEnvironment;if(b!=null&&b.array&&bo(b.environmentName)){const E=a.options.environmentPopoverPolicy;y=E==="auto"||E==="on"}}y?pv(a):Nh()}function gv(a){return a.replace("*","")}function vv(a){return a==="dcases"?"cases":a}function Y0(a){const y=getComputedStyle(a).direction;return y==="ltr"||y==="rtl"?y:"ltr"}function q0(a,y,b){return y==="left"||y==="leading"&&b==="ltr"||y==="trailing"&&b==="rtl"?a.left:a.right}function Fh(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="rtl"||b==="end"&&E==="ltr"||b==="top"||b==="right"?Math.max(0,a-y):a}function yv(a,y,b,E){return b==="middle"?a-y/2:b==="start"&&E==="ltr"||b==="end"&&E==="rtl"||b==="top"||b==="right"?a:a-y}function bv(a,y){var b,E,ee;const re=(b=Y0(a))!=null?b:"ltr";a.style.position="fixed",a.style.left="",a.style.top="",a.style.right="",a.style.bottom="",a.style.height="",a.style.width="";const ae=a.getBoundingClientRect(),fe=Number.isFinite(y.maxHeight)?Math.min(y.maxHeight,window.innerHeight):window.innerHeight;let ge=Math.min(fe,(E=y.height)!=null?E:ae.height),be=Fh(y.location.y,ge,y.verticalPos,re);be+ge>window.innerHeight-8&&(y.alternateLocation?(be=Fh(y.alternateLocation.y,ge,y.verticalPos,re),be+ge>window.innerHeight-8&&(be=void 0)):be=void 0),Number.isFinite(be)||(be=Math.max(8,window.innerHeight-8-ge),8+ge>window.innerHeight-8&&(a.style.bottom="8px")),ge=Math.min(be+ge,window.innerHeight-8)-be;const Me=Number.isFinite(y.maxWidth)?Math.min(y.maxWidth,window.innerWidth):window.innerWidth;let Ne=Math.min(Me,(ee=y.width)!=null?ee:ae.width),et=Fh(y.location.x,Ne,y.horizontalPos,re);et+Ne>window.innerWidth-8&&(y.alternateLocation?(et=yv(y.alternateLocation.x,Ne,y.verticalPos,re),et+Ne>window.innerWidth-8&&(et=void 0)):et=void 0),Number.isFinite(et)||(et=Math.max(8,window.innerWidth-8-Ne),8+Ne>window.innerWidth-8&&(a.style.right="8px")),Ne=Math.min(et+Ne,window.innerWidth-8)-et,re==="rtl"?a.style.right=`${Math.ceil(window.innerWidth-et-Ne).toString()}px`:a.style.left=`${Math.ceil(et).toString()}px`,a.style.top=`${Math.ceil(be).toString()}px`,ge!==ae.height&&(a.style.height=`${Math.ceil(ge).toString()}px`),Ne!==ae.width&&(a.style.width=`${Math.ceil(Ne).toString()}px`)}function xv(a,y){return Math.hypot(y.x-a.x,y.y-a.y)}function Ru(a){return"submenu"in a}function Ml(a){return"type"in a&&a.type==="command"||"onMenuSelect"in a||"id"in a}function zh(a){return"type"in a&&a.type==="divider"}function Kh(a){return"type"in a&&a.type==="heading"}var J0={};function Hh(a){let y=J0[a];if(!y){let b;switch(a){case"checkmark":b=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
|
|
|
</span>`;break;case"trailing-chevron":b='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":b='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(b){const E=document.createElement("template");E.innerHTML=b,J0[a]=E,y=E}}if(y){if("content"in y)return y.content.cloneNode(!0);const b=document.createElement("svg");return b.innerHTML=y.innerHTML,b}}var Q0=80,ep=class{constructor(a,y){this._element=null;var b;this.parentMenu=y,this._declaration=a,Ru(a)?(this.type="submenu",this.submenu=new tp(a.submenu,{parentMenu:y,submenuClass:a.submenuClass,columnCount:a.columnCount})):this.type=(b=a.type)!=null?b:"command",this.hasCheck=Ml(a)&&a.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var a,y;(a=this._abortController)==null||a.abort(),this._abortController=void 0,(y=this._element)==null||y.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var a;return(a=this._label)!=null?a:""}set label(a){a===void 0&&(a=""),a!==this._label&&(this._label=a,this.dirty=!0)}get visible(){return this._visible}set visible(a){a!==this._visible&&(this._visible=a,this.dirty=!0)}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.element&&(a?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(a){this._checked=a,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(a){a!==this._tooltip&&(this._tooltip=a,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){a!==this._ariaLabel&&(this._ariaLabel=a,this.dirty=!0)}get active(){var a,y;return(y=(a=this.element)==null?void 0:a.classList.contains("active"))!=null?y:!1}set active(a){this.element&&this.element.classList.toggle("active",a)}updateState(a){var y,b,E;const ee=this._declaration;if(zh(ee)){this.enabled=!1,this.checked=!1;return}Kh(ee)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Ml(ee)&&(this.checked=Ml(ee)&&((y=Bu(ee.checked,a))!=null?y:!1)),(Ml(ee)||Ru(ee))&&(this.enabled=(b=Bu(ee.enabled,a))!=null?b:!0,this.visible=(E=Bu(ee.visible,a))!=null?E:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(a),this.submenu.visible||(this.visible=!1))),(Ml(ee)||Kh(ee)||Ru(ee))&&(this.label=Bu(ee.label,a),this.tooltip=Bu(ee.tooltip,a),this.ariaLabel=Bu(ee.ariaLabel,a)),this._element&&this.updateElement()}set dirty(a){console.assert(a===!0),a&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const a=this.element;a.textContent="",this.enabled?a.removeAttribute("aria-disabled"):a.setAttribute("aria-disabled","true"),this.checked===!0?(a.setAttribute("aria-checked","true"),a.append(Hh("checkmark"))):this.checked==="mixed"?(a.setAttribute("aria-checked","mixed"),a.append(Hh("mixedmark"))):a.removeAttribute("aria-checked"),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel);const y=document.createElement("span");if(y.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&y.classList.add("heading"),y.innerHTML=this.label,a.append(y),this._tooltip&&a.setAttribute("data-tooltip",this._tooltip),Ml(this._declaration)&&this._declaration.keyboardShortcut){const b=document.createElement("kbd");b.innerHTML=vh(this._declaration.keyboardShortcut),a.append(b)}this.type==="submenu"&&a.append(Hh("trailing-chevron"))}get element(){if(this._element)return this._element;if(zh(this._declaration)){const b=document.createElement("li");return b.setAttribute("part","menu-divider"),b.setAttribute("role","divider"),this._element=b,b}const a=document.createElement("li");this._element=a,(Ml(this._declaration)||Kh(this._declaration)||Ru(this._declaration))&&this._declaration.class&&(a.className=this._declaration.class),a.setAttribute("part","menu-item"),a.setAttribute("tabindex","-1"),this.hasCheck?a.setAttribute("role","menuitemcheckbox"):a.setAttribute("role","menuitem"),this.type==="submenu"&&(a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-expanded","false"));const y=this.abortController.signal;return a.addEventListener("pointerenter",this,{signal:y}),a.addEventListener("pointerleave",this,{signal:y}),a.addEventListener("pointerup",this,{signal:y}),a.addEventListener("click",this,{signal:y}),this._element}dispatchSelect(){if(!Ml(this._declaration))return;const a=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(a)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(a){var y;if(!(!this.visible||!this.enabled)){if(a.type==="click"){this.rootMenu.state==="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}if(a.type==="pointerenter"){const b=a;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((y=this.parentMenu.activeMenuItem)!=null&&y.movingTowardSubmenu(b))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(a.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(a.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),a.stopPropagation(),a.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},Q0)},Q0)}openSubmenu(a){var y;if(this.type!=="submenu"||!this.element)return;if((y=a==null?void 0:a.withDelay)!=null&&y){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const b=this.element.getBoundingClientRect(),E=Y0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:q0(b,"trailing",E),y:b.top-4},alternateLocation:{x:q0(b,"leading",E),y:b.top-4}})}movingTowardSubmenu(a){if(!this.element||this.type!=="submenu")return!1;const y=this.rootMenu.lastMoveEvent;if(!y)return!1;const b=a.timeStamp-y.timeStamp;if(b>500)return!1;const E=a.clientX-y.clientX;if(wv(E,y.clientY-a.clientY,b)<=.2)return!1;let re="right";if(this.submenu.element){const ae=this.submenu.element.getBoundingClientRect(),fe=this.element.getBoundingClientRect();ae.left<fe.left+fe.width/2&&(re="left")}return re==="right"?E>0:E<0}};function wv(a,y,b){return Math.hypot(a,y)/b}function Bu(a,y){return a===void 0||typeof a!="function"?a:(y!=null||(y={alt:!1,control:!1,shift:!1,meta:!1}),a(y))}var tp=class Uu{constructor(y,b){this._element=null,this._activeMenuItem=null,this._dirty=!0;var E,ee;this.parentMenu=(E=b==null?void 0:b.parentMenu)!=null?E:null,this._submenuClass=b==null?void 0:b.submenuClass,this.columnCount=(ee=b==null?void 0:b.columnCount)!=null?ee:1,this.isSubmenuOpen=!1,this.menuItems=y}get children(){return this._menuItems}set menuItems(y){const b=this.parentMenu;this.dispose(),this.parentMenu=b,y=[...y],this._menuItems=y.map(E=>E.onCreate?E.onCreate(E,this):new ep(E,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var y;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(y=this._menuItems)==null||y.forEach(b=>b.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(y){if(y.type==="wheel"&&this._element){const b=y;this._element.scrollBy(0,b.deltaY),y.stopPropagation()}}dispatchEvent(y){return this.rootMenu.dispatchEvent(y)}get rootMenu(){return this.parentMenu.rootMenu}updateState(y){var b,E,ee;this._menuItems.forEach(be=>be.updateState(y));const re=this.hasCheck;this.hasCheck=this._menuItems.some(be=>be.visible&&be.hasCheck),this.hasCheck!==re&&this._menuItems.forEach(be=>be.updateState(y));let ae,fe=0;for(const be of this._menuItems)be.type==="heading"?(ae&&fe===0&&(ae.visible=!1),ae=be,fe=0):be.type==="divider"&&ae?(ae.visible=fe>0,ae=void 0,fe=0):ae&&be.visible&&(fe+=1);ae&&(ae.visible=fe>0);let ge=!0;for(const be of this._menuItems)be.type==="divider"?(be.visible=!ge,ge=!0):be.visible&&(ge=!1);(b=this.activeMenuItem)!=null&&b.visible||(this.activeMenuItem=null),!((E=this.activeMenuItem)!=null&&E.enabled)&&((ee=this.activeMenuItem)==null?void 0:ee.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible&&y.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(y=>y.type!=="divider"&&y.visible)}set dirty(y){console.assert(y===!0),this._dirty!==y&&y&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var y;if(this._element){this._element.textContent="";for(const{element:b,visible:E}of this._menuItems)b&&E&&this._element.append(b);(y=this._element.querySelector("li:first-of-type"))==null||y.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const y=document.createElement("menu");y.setAttribute("role","menu"),y.setAttribute("tabindex","-1"),y.setAttribute("aria-orientation","vertical"),y.setAttribute("part","ui-menu-container"),this._submenuClass&&y.classList.add(this._submenuClass),y.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const b=this._abortController.signal;return y.addEventListener("focus",this,{signal:b}),y.addEventListener("wheel",this,{passive:!0,signal:b}),this._element=y,this.updateElement(),y}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(y){var b,E,ee,re;if(this.rootMenu.cancelDelayedOperation(),y!==this._activeMenuItem){if(this.activeMenuItem){const ae=this.activeMenuItem;ae.active=!1,(b=ae.submenu)==null||b.hide()}if(!((E=y==null?void 0:y.visible)==null||E)){this._activeMenuItem=null;return}this._activeMenuItem=y,y&&(y.active=!0)}y?(ee=y.element)==null||ee.focus({preventScroll:!0}):(re=this._element)==null||re.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let y=0,b=!1;const E=this._menuItems;for(;!b&&y<=E.length-1;){const ee=E[y];b=ee.type!=="divider"&&ee.visible&&ee.enabled,y+=1}return b?E[y-1]:null}get lastMenuItem(){this.updateIfDirty();const y=this._menuItems;let b=y.length-1,E=!1;for(;!E&&b>=0;){const ee=y[b];E=ee.type!=="divider"&&ee.visible&&ee.enabled,b-=1}return E?y[b+1]:null}nextMenuItem(y){if(y===0)return this._activeMenuItem;if(!this._activeMenuItem)return y>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const b=this._menuItems.indexOf(this.firstMenuItem),E=this._menuItems.indexOf(this.lastMenuItem);let ee=this._menuItems.indexOf(this._activeMenuItem),re=1;for(;ee>=b&&ee<=E;){ee+=y>0?1:-1;const ae=this._menuItems[ee];if(!ae)break;if(ae.visible&&ae.enabled){if(re===Math.abs(y))return this._menuItems[ee];re+=1}}return y>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(y){this.updateIfDirty();const E=this._menuItems.filter(ee=>ee.visible&&ee.enabled).indexOf(y);return E<0?-1:E%this.columnCount}static get collator(){return Uu._collator||(Uu._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Uu._collator}findMenuItem(y){var b;this.updateIfDirty();const E=this._menuItems.filter(fe=>fe.type!=="divider"&&fe.visible&&fe.enabled);if(E.length===0)return null;const ee=Math.max(...E.map(fe=>fe.label.length))-y.length;if(ee<0)return null;let re=null,ae=0;for(;ae<ee&&!re;)re=(b=E.find(fe=>Uu.collator.compare(y,fe.label.substring(ae,y.length))===0))!=null?b:null,ae++;return re}show(y){return!this.visible||!y.container?!1:(this.updateElement(),y.container.appendChild(this.element),qt()&&(this.element.popover="manual",this.element.showPopover()),y.location&&bv(this.element,{location:y.location,alternateLocation:y.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var y,b,E,ee,re;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),qt()&&((y=this._element)!=null&&y.popover)&&this.element.hidePopover(),(E=(b=this.parentMenu)==null?void 0:b.element)==null||E.focus(),(re=(ee=this._element)==null?void 0:ee.parentNode)==null||re.removeChild(this._element)}set openSubmenu(y){var b,E,ee,re;const ae=y!==null;((b=this.activeMenuItem)==null?void 0:b.type)==="submenu"&&((E=this.activeMenuItem.element)==null||E.setAttribute("aria-expanded",ae.toString())),(re=(ee=this.activeMenuItem)==null?void 0:ee.element)==null||re.classList.toggle("is-submenu-open",ae),this.isSubmenuOpen=ae}},np=class rm extends tp{constructor(y,b){var E;super(y),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(E=b==null?void 0:b.host)!=null?E:null,this.isDynamic=y.some(rp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(y){zm(this._modifiers,y)||(this._modifiers=y,this.dirty=!0)}get activeSubmenu(){let y=this;for(;y.isSubmenuOpen;)y=y.activeMenuItem.submenu;return y}set dirty(y){this._updating||(console.assert(y===!0),this._dirty!==y&&(this._dirty=!0,y&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(y){this._updating=!0,this.modifiers=y!=null?y:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(y){this.isDynamic&&(this.modifiers=$c(y)),y.stopImmediatePropagation()}handleKeydownEvent(y){var b,E,ee;if(y.key==="Tab"||y.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=$c(y));let re=!0;const ae=this.activeSubmenu,fe=ae.activeMenuItem;switch(y.key){case" ":case"Space":case"Return":case"Enter":fe==null||fe.select($c(y));break;case"ArrowRight":if((fe==null?void 0:fe.type)==="submenu")fe.select($c(y)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!fe)ae.activeMenuItem=ae.firstMenuItem;else{const ge=(b=ae.getMenuItemColumn(fe))!=null?b:-1;if(ge>=0&&ge<((E=ae.columnCount)!=null?E:1)-1){const be=ae.nextMenuItem(1);be&&(ae.activeMenuItem=be)}}break;case"ArrowLeft":if(ae===this.rootMenu)fe||(ae.activeMenuItem=ae.firstMenuItem);else if((fe&&(ee=ae.getMenuItemColumn(fe))!=null?ee:-1)<=0||!fe){ae.hide();const be=ae.parentMenu.activeMenuItem;if(be){const{element:Me}=be;Me==null||Me.focus(),Me==null||Me.classList.remove("is-submenu-open")}}else{const be=ae.nextMenuItem(-1);be&&(ae.activeMenuItem=be)}break;case"ArrowDown":ae.activeMenuItem=ae.nextMenuItem(ae.columnCount);break;case"ArrowUp":ae.activeMenuItem=ae.nextMenuItem(-ae.columnCount);break;case"Home":case"PageUp":ae.activeMenuItem=ae.firstMenuItem;break;case"End":case"PageDown":ae.activeMenuItem=ae.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Sf(y)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=y.key;const ge=ae.findMenuItem(this.typingBuffer);ge&&(ae.activeMenuItem=ge),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else re=!1}re&&(y.preventDefault(),y.stopPropagation())}handleEvent(y){if(y.type==="keydown")this.handleKeydownEvent(y);else if(y.type==="keyup")this.handleKeyupEvent(y);else if(y.type==="pointermove")this.lastMoveEvent=y;else if(y.type==="pointerup"&&y.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(y.type==="contextmenu"){y.preventDefault(),y.stopPropagation();return}super.handleEvent(y)}dispatchEvent(y){return this._host?this._host.dispatchEvent(y):!0}get scrim(){return wl.element}connectScrim(y){const b=this.scrim;b.addEventListener("pointerup",this),b.addEventListener("contextmenu",this),b.addEventListener("keydown",this),b.addEventListener("keyup",this),b.addEventListener("pointermove",this),wl.open({root:y,onDismiss:()=>this.hide()})}disconnectScrim(){const y=this.scrim;y.removeEventListener("pointerup",this),y.removeEventListener("contextmenu",this),y.removeEventListener("keydown",this),y.removeEventListener("keyup",this),y.removeEventListener("pointermove",this),wl.state==="open"&&wl.scrim.close()}get rootMenu(){return this}show(y){return this._onDismiss=y==null?void 0:y.onDismiss,y!=null&&y.modifiers&&(this.modifiers=y.modifiers),this.updateState(),this.connectScrim(y==null?void 0:y.target),super.show(me(xe({},y),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,wl.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(y){this.cancelDelayedOperation();const b=rm.SUBMENU_DELAY;if(b<=0){y();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,y()},b)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};np.SUBMENU_DELAY=120;var Sv=np;function rp(a){return zh(a)?!1:typeof a.label=="function"||typeof a.ariaLabel=="function"||typeof a.tooltip=="function"||(Ml(a)||Ru(a))&&(typeof a.enabled=="function"||typeof a.visible=="function")||Ml(a)&&typeof a.checked=="function"?!0:Ru(a)?a.submenu.some(rp):!1}var Gf=class{};Gf.DELAY=300,Gf.MAX_DISTANCE=10;function Cv(a){return new Promise((y,b)=>{const E=wf(a);E||y(!1);let ee=E;const re=setTimeout(()=>{ae.abort(),y(xv(ee,E)<Gf.MAX_DISTANCE)},Gf.DELAY),ae=new AbortController,fe=ae.signal;for(const ge of["pointermove","pointerup","pointercancel"])window.addEventListener(ge,be=>{if(be.type==="pointerup"||be.type==="pointercancel")clearTimeout(re),ae.abort(),y(!1);else if(be.type==="pointermove"){const Me=wf(be);Me&&(ee=Me)}},{passive:!0,signal:fe})})}function ip(a,y,b){return gc(this,null,function*(){if(a.type==="contextmenu"){const E=a;if(b.show({target:y,location:wf(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=y==null?void 0:y.getBoundingClientRect();if(ee&&b.show({target:y,location:{x:Math.ceil(ee.left+ee.width/2),y:Math.ceil(ee.top+ee.height/2)},modifiers:$c(E)}))return a.preventDefault(),a.stopPropagation(),!0}}if(a.type==="pointerdown"&&a.pointerType!=="mouse"&&a.button===0){let E=a.target;for(;E&&y!==E;)E=E.parentNode;if(!E||!b.visible)return!1;const ee=wf(a);if(yield Cv(a))return b.state!=="closed"?!1:(b.show({target:y,location:ee}),!0)}return!1})}var ap={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};Tt(Object.keys(ap),"{body:auto}",{createAtom:a=>new z(me(xe({},a),{body:rt(a.args[0]),accentChar:ap[a.command.slice(1)]}))}),Tt(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:a=>{const y=Xt(rt(a.args[0]));return new z(me(xe({},a),{body:rt(a.args[0]),svgAccent:a.command.slice(1)+(y.length>5?"4":["1","1","2","2","3","3"][y.length])}))}}),Tt(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:a=>new z(me(xe({},a),{body:rt(a.args[0]),svgAccent:"overarc"}))}),Tt(["underarc","underparen"],"{body:auto}",{createAtom:a=>new Vs(me(xe({},a),{body:rt(a.args[0]),svgBelow:"underarc"}))}),Tt("utilde","{body:auto}",{createAtom:a=>{const y=rt(a.args[0]),b=Xt(y),E="widetilde"+(b.length>5?"4":["1","1","2","2","3","3"][b.length]);return new Vs(me(xe({},a),{body:y,svgBelow:E,boxType:rc(y)}))}}),Tt("^","{:string}",{createAtom:a=>{var y;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[a.args[0]])!=null?y:"^"}))}}),Tt("`","{:string}",{createAtom:a=>{var y;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[a.args[0]])!=null?y:"`"}))}}),Tt("'","{:string}",{createAtom:a=>{var y;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[a.args[0]])!=null?y:"'"}))}}),Tt('"',"{:string}",{createAtom:a=>{var y,b;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[a.args[0]])!=null?b:'"'+a.args[0]:'"'}))}}),Tt(".","{:string}",{createAtom:a=>{var y,b;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[a.args[0]])!=null?b:"."+a.args[0]:"."}))}}),Tt("=","{:string}",{createAtom:a=>{var y,b;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:(y=a.args)!=null&&y[0]?(b={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[a.args[0]])!=null?b:"="+a.args[0]:"="}))}}),Tt("~","{:string}",{createAtom:a=>{var y;return new Gn(me(xe({type:"mord"},a),{isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[a.args[0]])!=null?y:"\xB4"}))}}),Tt("c","{:string}",{createAtom:a=>{var y;return new Gn(me(xe({},a),{type:"mord",isFunction:!1,limits:"adjacent",value:a.args[0]&&(y={c:"\xE7",C:"\xC7"}[a.args[0]])!=null?y:""}))}}),Tt("enclose","{notation:string}[style:string]{body:auto}",{createAtom:a=>{var y,b;const E=a.args,ee={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(y=a.style)!=null?y:{}};if(E[1]){const ae=E[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const fe of ae){const ge=fe.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(ge)ee.strokeWidth=ge[1],ee.strokeStyle=ge[2],ee.strokeColor=ge[3];else{const be=fe.match(/\s*([a-z]*)\s*=\s*"(.*)"/);be&&(be[1]==="mathbackground"?ee.backgroundcolor=be[2]:be[1]==="mathcolor"?ee.strokeColor=be[2]:be[1]==="padding"?ee.padding=be[2]:be[1]==="shadow"&&(ee.shadow=be[2]))}}ee.strokeStyle==="dashed"?ee.svgStrokeStyle="5,5":ee.strokeStyle==="dotted"&&(ee.svgStrokeStyle="1,5")}ee.borderStyle=`${ee.strokeWidth} ${ee.strokeStyle} ${ee.strokeColor}`;const re={};return((b=E[0])!=null?b:"").split(/[, ]/).filter(ae=>ae.length>0).forEach(ae=>{re[ae.toLowerCase()]=!0}),new bd(a.command,rt(E[2]),re,ee)}}),Tt("cancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,rt(a.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Tt("bcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,rt(a.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Tt("xcancel","{body:auto}",{createAtom:a=>{var y;return new bd(a.command,rt(a.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(y=a.style)!=null?y:{}})}}),Tt(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:a=>{var y;return new Vs(me(xe({},a),{body:rt((y=a.args)==null?void 0:y[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:a.command.slice(1)}))}}),Tt("overbrace","{:auto}",{createAtom:a=>new Vs(me(xe({},a),{body:rt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:a.command.slice(1)}))}),Tt(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:a=>new Vs(me(xe({},a),{body:rt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:a.command.slice(1)}))}),Tt(["underbrace"],"{:auto}",{createAtom:a=>new Vs(me(xe({},a),{body:rt(a.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:a.command.slice(1)}))}),Tt(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:a=>{var y,b,E,ee,re;return new Vs(me(xe({},a),{svgBody:a.command.slice(1),above:((b=rt((y=a.args)==null?void 0:y[1]))==null?void 0:b.length)===0?void 0:rt((E=a.args)==null?void 0:E[1]),below:(re=rt((ee=a.args)==null?void 0:ee[0]))!=null?re:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(a,y)=>a.command+(a.hasEmptyBranch("below")?"":`[${a.belowToLatex(y)}]`)+`{${a.aboveToLatex(y)}}${a.supsubToLatex(y)}`}),Tt(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:a=>new Bc(a.command.slice(1),me(xe({},a),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),Tt(["liminf","limsup"],"",{ifMode:"math",createAtom:a=>new Bc({"\\liminf":"lim inf","\\limsup":"lim sup"}[a.command],me(xe({},a),{limits:"over-under",variant:"main"}))}),Tt(["lim","mod"],"",{ifMode:"math",createAtom:a=>new Bc(a.command.slice(1),me(xe({},a),{limits:"over-under",variant:"main"}))}),Tt(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:a=>new Bc(a.command.slice(1),me(xe({},a),{limits:"over-under",isFunction:!0,variant:"main"}))}),Tt(["ang"],"{:math}",{ifMode:"math",createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),serialize:(a,y)=>`\\ang{${a.bodyToLatex(y)}}`,render:(a,y)=>{const b=a.createBox(y),E=b.caret;b.caret=void 0;const ee=new Dr("\xB0",{style:me(xe({},a.style),{variant:"normal",variantStyle:"up"})});return new Dr([b,ee],{type:"inner",isSelected:a.isSelected,caret:E})}}),Tt("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:a=>new o0(me(xe({},a),{body:rt(a.args[1]),index:a.args[0]?rt(a.args[0]):void 0}))}),Tt(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:a=>{const y=xe({},a),b=a.command,E=a.args;switch(b){case"\\dfrac":case"\\frac":case"\\tfrac":y.hasBarLine=!0;break;case"\\atopfrac":y.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":y.hasBarLine=!1,y.leftDelim="(",y.rightDelim=")";break;case"\\cfrac":y.hasBarLine=!0,y.continuousFraction=!0;break;default:}switch(b){case"\\dfrac":case"\\dbinom":y.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":y.mathstyleName="textstyle";break;default:}return new ku(E[0]?rt(E[0]):[new Ki],E[1]?rt(E[1]):[new Ki],y)},serialize:(a,y)=>{const b=a.aboveToLatex(y),E=a.belowToLatex(y);return/^[0-9]$/.test(b)&&/^[0-9]$/.test(E)?`${a.command}${b}${E}`:uo(a.command,b,E)}}),Tt(["brace","brack"],"",{infix:!0,createAtom:a=>new ku(rt(a.args[0]),rt(a.args[1]),me(xe({},a),{hasBarLine:!1,leftDelim:a.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:a.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(a,y)=>ya([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Tt(["over","atop","choose"],"",{infix:!0,createAtom:a=>{let y,b;const E=a.args;return a.command==="\\choose"&&(y="(",b=")"),new ku(rt(E[0]),rt(E[1]),me(xe({},a),{hasBarLine:a.command==="\\over",leftDelim:y,rightDelim:b}))},serialize:(a,y)=>ya([a.aboveToLatex(y),a.command,a.belowToLatex(y)])}),Tt(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:a=>{var y,b;const E=a.args;return new ku(rt(E[0]),rt(E[1]),me(xe({},a),{leftDelim:(y=E[2])!=null?y:".",rightDelim:(b=E[3])!=null?b:".",hasBarLine:!1}))},serialize:(a,y)=>`${a.aboveToLatex(y)} ${a.command}${a.leftDelim}${a.rightDelim}${a.belowToLatex(y)}`}),Tt("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:a=>new ku(rt(a.args[0]),rt(a.args[1]),me(xe({},a),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),Tt(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:a=>new fh({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[a.command.slice(1)],me(xe({},a),{limits:"auto",variant:"main"}))}),Tt("smallint","",{ifMode:"math",createAtom:a=>new Bc("\u222B",me(xe({},a),{limits:"adjacent",variant:"main"}))});var op={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};Tt(Object.keys(op),"",{ifMode:"math",createAtom:a=>{const y=a.command,b=op[y.slice(1)];return new fh(b,me(xe({},a),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[b]}))}}),Tt(["Re","Im"],"",{ifMode:"math",createAtom:a=>new Bc({"\\Re":"\u211C","\\Im":"\u2111"}[a.command],me(xe({},a),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),Tt("middle","{:delim}",{ifMode:"math",createAtom:a=>{var y;return new r0(me(xe({},a),{delim:(y=a.args[0])!=null?y:"|",size:1}))}}),Tt("the","{:value}",{createAtom:a=>new Gn(me(xe({},a),{captureSelection:!0,verbatimLatex:null})),render:(a,y)=>{var b;const E=new La({parent:y},a.style);let ee="";a.isSelected&&(ee+=" ML__selected");const re=E.evaluate(a.args[0]);return new Dr(((b=Io(re))!=null?b:"").split("").map(ae=>new Dr(ae,{type:"ord",classes:ee,mode:a.mode,isSelected:a.isSelected,style:xe({variant:"main"},a.style)})),{type:"lift",style:a.style,caret:a.caret,isSelected:a.isSelected,classes:ee}).wrap(E)},serialize:a=>{var y;return`\\the${(y=Io(a.args[0]))!=null?y:"\\relax"}`}}),Tt("mathtip","{:auto}{:math}",{createAtom:a=>new hh(me(xe({},a),{body:rt(a.args[0]),tooltip:rt(a.args[1]),content:"math"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Gn.serialize([a.tooltip],me(xe({},y),{defaultMode:"math"}))}}`}),Tt("texttip","{:auto}{:text}",{createAtom:a=>new hh(me(xe({},a),{body:rt(a.args[0]),tooltip:rt(a.args[1]),content:"text"})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\texttip{${a.bodyToLatex(y)}}{${Gn.serialize([a.tooltip],me(xe({},y),{defaultMode:"text"}))}}`}),Tt("error","{:math}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),serialize:(a,y)=>`\\error{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__error"})}),Tt("ensuremath","{:math}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(me(xe({},y),{defaultMode:"math"}))}}`}),Tt("color","{:value}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Tt("textcolor","{:value}{content:auto*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimColor:(E=Io(y[0]))!=null?E:void 0,color:b.toColor((ee=y[0])!=null?ee:{string:"red"})}}}),Tt("boxed","{content:math}",{createAtom:a=>new ko(me(xe({},a),{body:rt(a.args[0]),framecolor:{string:"black"}}))}),Tt("colorbox","{:value}{:text*}",{applyStyle:(a,y,b)=>{var E,ee;return{verbatimBackgroundColor:(E=Io(y[0]))!=null?E:void 0,backgroundColor:b.toBackgroundColor((ee=y[0])!=null?ee:{string:"yellow"})}}}),Tt("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:a=>{var y,b;return new ko(me(xe({},a),{body:rt(a.args[2]),framecolor:(y=a.args[0])!=null?y:{string:"blue"},backgroundcolor:(b=a.args[1])!=null?b:{string:"yellow"}}))},serialize:(a,y)=>{var b,E;return y.skipStyles?a.bodyToLatex(me(xe({},y),{defaultMode:"text"})):uo(a.command,(b=Io(a.framecolor))!=null?b:"",(E=Io(a.backgroundcolor))!=null?E:"",a.bodyToLatex(me(xe({},y),{defaultMode:"text"})))}}),Tt("bbox","[:bbox]{body:auto}",{createAtom:a=>{var y;const b=a.args[0],E=rt(a.args[1]);return b?new ko(me(xe({},a),{body:E,padding:b.padding,border:b.border,backgroundcolor:(y=b.backgroundcolor)!=null?y:void 0})):new ko(me(xe({},a),{body:E}))},serialize:(a,y)=>{var b,E;if(y.skipStyles)return a.bodyToLatex(y);let ee=a.command;if(Number.isFinite(a.padding)||a.border!==void 0||a.backgroundcolor!==void 0){const re=[];a.padding&&re.push((b=Io(a.padding))!=null?b:""),a.border&&re.push(`border: ${a.border}`),a.backgroundcolor&&re.push((E=Io(a.backgroundcolor))!=null?E:""),ee+=`[${re.join(",")}]`}return uo(ee,a.bodyToLatex(y))}}),Tt(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),render:(a,y)=>{const b=new La({parent:y,mathstyle:a.command.slice(1)},a.style),E=Gn.createBox(b,a.body,{type:"lift"});return a.caret&&(E.caret=a.caret),a.bind(y,E)},serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{${ya([a.command,a.bodyToLatex(y)])}}`}),Tt(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:a=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[a]})}),Tt("fontseries","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontSeries:(b=y[0])!=null?b:"auto"}}}),Tt("fontshape","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontShape:(b=y[0])!=null?b:"auto"}}}),Tt("fontfamily","{:string}",{ifMode:"text",applyStyle:(a,y)=>{var b;return{fontFamily:(b=y[0])!=null?b:"roman"}}}),Tt("selectfont","",{ifMode:"text",applyStyle:()=>({})}),Tt("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),Tt(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),serialize:(a,y)=>`${a.command}{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__boldsymbol"})}),Tt("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),Tt("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Tt("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Tt("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Tt("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Tt("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Tt("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),Tt("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),Tt("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),Tt("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),Tt("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),Tt("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),Tt("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),Tt("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),Tt("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),Tt("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),Tt("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),Tt("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),Tt("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),Tt("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),Tt("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),Tt("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),Tt("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),Tt("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),Tt("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),Tt("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),Tt("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),Tt(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),Tt(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),Tt("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),Tt("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),Tt("mbox","{:text}",{ifMode:"math",createAtom:a=>new Gn(me(xe({},a),{type:"mord",body:rt(a.args[0]),mode:"math"})),serialize:(a,y)=>uo("\\mbox",a.bodyToLatex(me(xe({},y),{defaultMode:"text"})))}),Tt("text","{:text}",{ifMode:"math",applyMode:"text"}),Tt(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[1])})),serialize:(a,y)=>!a.args[0]||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`,render:(a,y)=>{var b;return a.createBox(y,{classes:(b=a.args[0])!=null?b:""})}}),Tt(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.cssId=(b=a.args[0])!=null?b:"",E}}),Tt("htmlData","{data:string}{content:auto}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`\\htmlData{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlData=(b=a.args[0])!=null?b:"",E}}),Tt(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[1])})),serialize:(a,y)=>{var b;return!((b=a.args)!=null&&b[0])||y.skipStyles?a.bodyToLatex(y):`${a.command}{${a.args[0]}}{${a.bodyToLatex(y)}}`},render:(a,y)=>{var b;const E=a.createBox(y);return E.htmlStyle=(b=a.args[0])!=null?b:"",E}}),Tt("em","{:rest}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`{\\em ${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})}),Tt("emph","{:auto}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[1])})),serialize:(a,y)=>y.skipStyles?a.bodyToLatex(y):`\\emph{${a.bodyToLatex(y)}}`,render:(a,y)=>a.createBox(y,{classes:"ML__emph",boxType:"lift"})});var sp={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};Tt(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:a=>{var y;return new i0(me(xe({},a),{delim:(y=a.args[0])!=null?y:".",size:sp[a.command].size,delimType:sp[a.command].mclass}))}}),Tt(["hspace","hspace*"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(xe({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Tt(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:a=>{var y;return new Sd(me(xe({},a),{width:(y=a.args[0])!=null?y:{dimension:0}}))}}),Tt("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:a=>new Gn(a),render:(a,y)=>{let b=0;const E=y.mathstyle.id;(E===Ic||E===ml)&&(b=1),(E===zl||E===ss)&&(b=2),(E===ks||E===Zo)&&(b=3);const ee=rt(a.args[b]);return Gn.createBox(y,ee)},serialize:(a,y)=>`\\mathchoice{${Gn.serialize(a.args[0],y)}}{${Gn.serialize(a.args[1],y)}}{${Gn.serialize(a.args[2],y)}}{${Gn.serialize(a.args[3],y)}}`}),Tt("mathop","{:auto}",{createAtom:a=>new Gn(me(xe({},a),{type:"mop",body:rt(a.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(a,y)=>{var b;let E=Gn.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return new Dr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[uo(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ya(b)}}),Tt(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:a=>new Gn(me(xe({},a),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[a.command],body:rt(a.args[0])}))}),Tt(["operatorname","operatorname*"],"{operator:math}",{createAtom:a=>{const y=rt(a.args[0]).map(b=>{var E;return b.type!=="first"&&(b.type="mord",b.value=(E={"\u2217":"*","\u2212":"-"}[b.value])!=null?E:b.value,b.isFunction=!1,!b.style.variant&&!b.style.variantStyle&&(b.style.variant="main",b.style.variantStyle="up")),b});return new Gn(me(xe({},a),{type:"mop",body:y,isFunction:!0,limits:a.command==="\\operatorname"?"adjacent":"over-under"}))},render:(a,y)=>{var b;let E=Gn.createBox(y,a.body);if(a.superscript||a.subscript){const ee=(b=a.subsupPlacement)!=null?b:"auto";E=ee==="over-under"||ee==="auto"&&y.isDisplayStyle?a.attachLimits(y,{base:E}):a.attachSupsub(y,{base:E})}return a.caret&&(E.caret=a.caret),new Dr(a.bind(y,E),{type:"op",isSelected:a.isSelected,classes:"op-group"})},serialize:(a,y)=>{const b=[uo(a.command,a.bodyToLatex(y))];return a.explicitSubsupPlacement&&(a.subsupPlacement==="over-under"&&b.push("\\limits"),a.subsupPlacement==="adjacent"&&b.push("\\nolimits"),a.subsupPlacement==="auto"&&b.push("\\displaylimits")),b.push(a.supsubToLatex(y)),ya(b)}}),Tt(["char","unicode"],"{charcode:value}",{createAtom:a=>new Gn(me(xe({},a),{type:a.mode==="text"?"text":"mord"})),serialize:a=>{var y;return`${a.command}${Io((y=a.args[0])!=null?y:{number:10067,base:"hexadecimal"})}`},render:(a,y)=>{let b=y.evaluate(a.args[0]);return(!b||!("number"in b))&&(b={number:10067,base:"hexadecimal"}),a.value=String.fromCodePoint(b.number),a.createBox(y)}}),Tt("rule","[raise:value]{width:value}{thickness:value}",{createAtom:a=>new Gn(a),render:(a,y)=>{var b,E,ee;const re=new La({parent:y,mathstyle:"textstyle"},a.style),ae=re.toEm((b=a.args[0])!=null?b:{dimension:0}),fe=re.toEm((E=a.args[1])!=null?E:{dimension:10}),ge=re.toEm((ee=a.args[2])!=null?ee:{dimension:10}),be=new Dr(null,{classes:"rule",type:"ord"});return be.width=fe,be.height=ge+ae,be.depth=-ae,be.setStyle("border-right-width",fe,"em"),be.setStyle("border-top-width",ge,"em"),be.setStyle("border-color",a.style.color),be.setStyle("vertical-align",ae,"em"),a.isSelected&&be.setStyle("opacity","50%"),a.bind(re,be),a.caret&&(be.caret=a.caret),be.wrap(y)},serialize:a=>`\\rule${a.args[0]?`[${Io(a.args[0])}]`:""}{${Io(a.args[1])}}{${Io(a.args[2])}}`}),Tt(["overline","underline"],"{:auto}",{createAtom:a=>new Gn(me(xe({},a),{body:rt(a.args[0])})),render:(a,y)=>{const b=a.command.substring(1),E=new La({parent:y,mathstyle:"cramp"},a.style),ee=Gn.createBox(E,a.body);if(!ee)return null;const re=E.metrics.defaultRuleThickness/E.scalingFactor,ae=new Dr(null,{classes:b+"-line"});ae.height=re,ae.maxFontSize=re*1.125*E.scalingFactor;let fe;return b==="overline"?fe=new Qa({shift:0,children:[{box:ee},3*re,{box:ae},re]}):fe=new Qa({top:ee.height,children:[re,{box:ae},3*re,{box:ee}]}),a.caret&&(fe.caret=a.caret),new Dr(fe,{classes:b,type:"ignore"})}}),Tt("overset","{:auto}{base:auto}",{createAtom:a=>{const y=rt(a.args[1]);return new Vs(me(xe({},a),{above:rt(a.args[0]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>uo(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Tt("underset","{:auto}{base:auto}",{createAtom:a=>{const y=rt(a.args[1]);return new Vs(me(xe({},a),{below:rt(a.args[0]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>uo(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Tt("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:a=>{const y=rt(a.args[2]);return new Vs(me(xe({},a),{above:rt(a.args[0]),below:rt(a.args[1]),body:y,skipBoundary:!1,boxType:rc(y)}))},serialize:(a,y)=>uo(a.command,a.belowToLatex(y),a.bodyToLatex(y))}),Tt(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:a=>new Vs(me(xe({},a),{body:rt(a.args[2]),above:rt(a.args[1]),below:rt(a.args[0]),skipBoundary:!1,boxType:a.command==="\\stackrel"?"rel":"bin"})),serialize:(a,y)=>uo(a.command,a.aboveToLatex(y),a.bodyToLatex(y))}),Tt("smash","[:string]{:auto}",{createAtom:a=>{var y,b,E,ee;return new wd(me(xe({},a),{body:rt(a.args[1]),smashHeight:(b=(y=a.args[0])==null?void 0:y.includes("t"))!=null?b:!0,smashDepth:(ee=(E=a.args[0])==null?void 0:E.includes("b"))!=null?ee:!0}))}}),Tt(["vphantom"],"{:auto}",{createAtom:a=>new wd(me(xe({},a),{body:rt(a.args[0]),isInvisible:!0,smashWidth:!0}))}),Tt(["hphantom"],"{:auto}",{createAtom:a=>new wd(me(xe({},a),{body:rt(a.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),Tt(["phantom"],"{:auto}",{createAtom:a=>new wd(me(xe({},a),{body:rt(a.args[0]),isInvisible:!0}))}),Tt("not","{:math}",{createAtom:a=>{const y=rt(a.args[0]);return y.length===0?new Gn(me(xe({},a),{type:"mrel",value:"\uE020"})):new Gn(me(xe({},a),{body:[new Rc(me(xe({},a),{body:"\uE020",align:"right"})),...y],captureSelection:!0}))},serialize:(a,y)=>{const b=a.args[0],E=b&&typeof b=="object"&&"group"in b;return a.value!=="\uE020"?E?`\\not{${Gn.serialize(b.group,y)}}`:`\\not${Gn.serialize(b,y)}`:E?"\\not{}":"\\not"},render:(a,y)=>{if(a.value)return a.createBox(y);const E=a.args[0]&&typeof a.args[0]=="object"&&"group"in a.args[0]?"ord":rc(rt(a.args[0])),ee=Gn.createBox(y,a.body,{type:E});return a.caret&&(ee.caret=a.caret),a.bind(y,ee)}}),Tt(["ne","neq"],"",{createAtom:a=>new Gn(me(xe({},a),{type:"mrel",body:[new Rc(me(xe({},a),{body:"\uE020",align:"right",boxType:"rel"})),new Gn(me(xe({},a),{value:"="}))],captureSelection:!0})),serialize:a=>a.command}),Tt("rlap","{:auto}",{createAtom:a=>new Rc(me(xe({},a),{body:rt(a.args[0]),align:"right"}))}),Tt("llap","{:auto}",{createAtom:a=>new Rc(me(xe({},a),{body:rt(a.args[0]),align:"left"}))}),Tt("mathrlap","{:math}",{createAtom:a=>new Rc(me(xe({},a),{body:rt(a.args[0]),align:"left"}))}),Tt("mathllap","{:math}",{createAtom:a=>new Rc(me(xe({},a),{body:rt(a.args[0]),align:"left"}))}),Tt("raisebox","{:value}{:text}",{createAtom:a=>{var y;return new ko(me(xe({},a),{body:rt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return uo("\\raisebox",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Tt("raise","{:value}{:auto}",{createAtom:a=>{var y;return new ko(me(xe({},a),{body:rt(a.args[1]),padding:{dimension:0},offset:(y=a.args[0])!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b;return uo("\\raise",(b=Io(a.offset))!=null?b:"0pt",a.bodyToLatex(y))}}),Tt("lower","{:value}{:auto}",{createAtom:a=>{var y;return new ko(me(xe({},a),{body:rt(a.args[1]),padding:{dimension:0},offset:(y=js(a.args[0],-1))!=null?y:{dimension:0}}))},serialize:(a,y)=>{var b,E;return uo("\\lower",(E=Io(js((b=a.offset)!=null?b:{dimension:0},-1)))!=null?E:"0pt",a.bodyToLatex(y))}}),Te("0123456789/@.?!"),Ye(65,90),Ye(97,122),Te([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),Te([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),Te([["\\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]]),Te([["\\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"),Te([["\\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"]]),Te([["\\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"]]),Te([["\\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"),Te([["+",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"),Te([["\\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"),Te([["\\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]]),Te([["=",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"),Te([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),Te([["\\wp",8472],["\\aleph",8501]]),Te([["\\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"),Te([["\\ ",160],["~",160]],"space"),Tt(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:a=>new Sd(a)}),Tt("space","",{createAtom:a=>new Sd(a)}),Te([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),Te([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),Te([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var lp="<mo>⁡</mo>",Xf="<mo>⁢</mo>";function Yf(a){return a.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function no(a,y){return!a||!y.generateID?"":` extid="${a}"`}function Ev(a,y,b){var E,ee,re,ae,fe,ge,be,Me,Ne,et,xt;let It=!1;y=y!=null?y:a.atoms.length;let In="",_r="",Ln=a.atoms[a.index];const sr=(ee=(E=Ln.style)==null?void 0:E.variant)!=null?ee:"",Pr=(ae=(re=Ln.style)==null?void 0:re.variantStyle)!=null?ae:"";let mr="";if(sr||Pr){const Pi=Ut(Ln.value,(fe=Ln.style)==null?void 0:fe.variant,(ge=Ln.style)==null?void 0:ge.variantStyle);if(Pi!==Ln.value)return a.index+=1,In=`<mi${no(Ln.id,b)}>${Pi}</mi>`,jl(In,a,b)||(a.mathML+=In,a.lastType="mi"),!0;mr=(be={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[Pr+sr])!=null?be:"",mr=` mathvariant="${mr}"`}const di={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(Ln.command==="!")return a.index+=1,In="<mo>!</mo>",jl(In,a,b)||(a.mathML+=In,a.lastType="mo"),!0;if(di[Ln.command]){a.index+=1;let Pi=`<mi${no(Ln.id,b)}${mr}>${di[Ln.command]}</mi>`;return(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mtext"||a.lastType==="fence")&&(Pi=Xf+Pi),jl(Pi,a,b)||(a.mathML+=Pi,a.lastType="mi"),!0}if(Ln.command==="\\operatorname")_r=$u(Ln.body),a.index+=1;else if(sr||Pr)for(;a.index<y&&(Ln.type==="mord"||Ln.type==="macro")&&!Ln.isDigit()&&sr===((Ne=(Me=Ln.style)==null?void 0:Me.variant)!=null?Ne:"")&&Pr===((xt=(et=Ln.style)==null?void 0:et.variantStyle)!=null?xt:"");)_r+=$u([Ln]),a.index+=1,Ln=a.atoms[a.index];else(Ln.type==="mord"||Ln.type==="macro")&&!Ln.isDigit()&&(_r+=$u([Ln]),a.index+=1);if(_r.length>0){It=!0,In=`<mi${mr}>${_r}</mi>`;const Pi=a.lastType;In.endsWith(">f</mi>")||In.endsWith(">g</mi>")?(In+=lp,a.lastType="applyfunction"):a.lastType=/^<mo>(.*)<\/mo>$/.test(In)?"mo":"mi",jl(In,a,b)||((Pi==="mi"||Pi==="mn"||Pi==="mtext"||Pi==="fence")&&(In=Xf+In),a.mathML+=In)}return It}function Mv(a){return a.index<a.atoms.length&&a.atoms[a.index].superscript&&a.atoms[a.index].type==="subsup"}function kv(a){let y=-1,b=a.index,E=!1,ee=!1;for(;b<a.atoms.length&&!E&&!ee;){const re=a.atoms[b];E=!re.isDigit(),ee=!E&&re.superscript!==void 0,b++}return ee&&(y=b-1),y}function jl(a,y,b){var E;let ee=y.atoms[y.index-1];if(!ee)return!1;if(!ee.superscript&&!ee.subscript)if(((E=y.atoms[y.index])==null?void 0:E.type)==="subsup")ee=y.atoms[y.index],y.index+=1;else return!1;const re=y.lastType;y.lastType="";const ae=Ua(ee.superscript,b);y.lastType="";const fe=Ua(ee.subscript,b);if(y.lastType=re,!ae&&!fe)return!1;let ge="";return ae&&fe?ge=`<msubsup>${a}${fe}${ae}</msubsup>`:ae?ge=`<msup>${a}${ae}</msup>`:fe&&(ge=`<msub>${a}${fe}</msub>`),y.mathML+=ge,y.lastType="",!0}function _v(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="";for(;a.index<y&&a.atoms[a.index].mode==="text";)ee+=a.atoms[a.index].value?a.atoms[a.index].value:" ",a.index+=1;return ee.length>0?(a.mathML+=`<mtext ${no(a.atoms[E].id,b)}>${ee}</mtext>`,a.lastType="mtext",!0):!1}function Lv(a,y,b){y=y!=null?y:a.atoms.length;const E=a.index;let ee="",re=kv(a);for(re>=0&&re<y&&(y=re);a.index<y&&a.atoms[a.index].isDigit();)ee+=a.atoms[a.index].asDigit(),a.index+=1;return ee.length<=0?!1:(ee="<mn"+no(a.atoms[E].id,b)+">"+ee+"</mn>",re<0&&Mv(a)&&(re=a.index,a.index+=1),jl(ee,a,b)||(a.mathML+=ee,a.lastType="mn"),!0)}function Av(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";if(a.index<y&&a.atoms[a.index].type==="mopen"){let ae=!1,fe=0;const ge=a.index;let be=-1,Me=ge+1;for(;Me<y&&!ae;)a.atoms[Me].type==="mopen"?fe+=1:a.atoms[Me].type==="mclose"&&(fe-=1),fe===-1&&(ae=!0,be=Me),Me+=1;ae&&(ee="<mrow>",ee+=Zc(a.atoms[ge],b),ee+=Ua(a.atoms,b,ge+1,be),ee+=Zc(a.atoms[be],b),ee+="</mrow>",a.index=be+1,(a.lastType==="mi"||a.lastType==="mn"||a.lastType==="mfrac"||a.lastType==="fence")&&(a.mathML+=Xf),jl(ee,a,b)&&(E=!0,a.lastType="",ee=""),re="fence")}return ee.length>0&&(E=!0,a.mathML+=ee,a.lastType=re),E}function Tv(a,y,b){let E=!1;y=y!=null?y:a.atoms.length;let ee="",re="";const ae=a.atoms[a.index];if(!ae)return!1;const fe={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(fe[ae.command]){a.index+=1;const ge=`<mo${no(ae.id,b)}>${fe[ae.command]}</mo>`;return jl(ge,a,b)||(a.mathML+=ge,a.lastType="mo"),!0}if(a.index<y&&(ae.type==="mbin"||ae.type==="mrel"))ee+=Wh(a.atoms[a.index],b),a.index+=1,re="mo";else if(a.index<y&&(ae.type==="mop"||ae.type==="operator"||ae.type==="extensible-symbol")){if(ae.subsupPlacement==="over-under"&&(ae.superscript||ae.subscript)){const ge=Zc(ae,b);return ae.superscript&&ae.subscript?(ee+="<munderover>"+ge,ee+=Ua(ae.subscript,b),ee+=Ua(ae.superscript,b),ee+="</munderover>"):ae.superscript?(ee+="<mover>"+ge,ee+=Ua(ae.superscript,b),ee+="</mover>"):ae.subscript&&(ee+="<munder>"+ge,ee+=Ua(ae.subscript,b),ee+="</munder>"),a.mathML+=ee,a.lastType="mo",a.index+=1,!0}{const ge=a.atoms[a.index],be=ge.value==="\\operatorname",Me=be?'<mi class="MathML-Unit"'+no(ge.id,b)+">"+$u(ge.value)+"</mi>":Zc(ge,b);ee+=Me,!be&&!/^<mo>(.*)<\/mo>$/.test(Me)?(ee+=lp,re="applyfunction"):re=be?"mi":"mo"}(a.lastType==="mi"||a.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(ee)&&(ee=Xf+ee),a.index+=1}return ee.length>0&&(E=!0,jl(ee,a,b)||(a.mathML+=ee,a.lastType=re)),E}function Ua(a,y,b,E){y!=null||(y={});const ee={atoms:[],index:b!=null?b:0,mathML:"",lastType:""};if(typeof a=="number"||typeof a=="boolean")ee.mathML=a.toString();else if(typeof a=="string")ee.mathML=a;else if(a instanceof Gn)ee.mathML=Wh(a,y);else if(Array.isArray(a)){ee.atoms=a;let re=0;for(E=E||(a?a.length:0);ee.index<E;)if(_v(ee,E,y)||Lv(ee,E,y)||Ev(ee,E,y)||Tv(ee,E,y)||Av(ee,E,y))re+=1;else if(ee.index<E){let ae=Wh(ee.atoms[ee.index],y);ee.lastType==="mn"&&ae.length>0&&ee.atoms[ee.index].type==="genfrac"&&(ae="<mo>⁤</mo>"+ae),ee.atoms[ee.index].type==="genfrac"?ee.lastType="mfrac":ee.lastType="",ee.index+=1,jl(ae,ee,y)?re+=1:ae.length>0&&(ee.mathML+=ae,re+=1)}re>1&&(ee.mathML="<mrow>"+ee.mathML+"</mrow>")}return ee.mathML}function Zc(a,y){let b="";const E=$u(a.value);return E&&(b="<mo"+no(a.id,y)+">"+E+"</mo>"),b}function $u(a){if(!a)return"";if(typeof a=="string")return Yf(a);if(!Array.isArray(a)&&typeof a.body=="string")return Yf(a.body);let y="";for(const b of a)typeof b.value=="string"&&(y+=b.value);return Yf(y)}function Wh(a,y){var b,E,ee,re,ae,fe,ge,be,Me,Ne,et,xt,It,In,_r,Ln,sr,Pr,mr,di,Pi,bi;if(a.mode==="text")return`<mi${no(a.id,y)}>${a.value}</mi>`;const Pa={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},qa={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Kr="",Fs="",_l,Xs,qo,zs,Es,ro;const{command:Lo}=a;if(a.command==="\\error")return`<merror${no(a.id,y)}>${Ua(a.body,y)}</merror>`;const Jo={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Ll={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(a.type){case"first":break;case"group":case"root":Kr=Ua(a.body,y);break;case"array":if((a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(Kr+="<mrow>",a.leftDelim&&a.leftDelim!=="."&&(Kr+="<mo>"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>")),Kr+="<mtable",a.colFormat){for(Kr+=' columnalign="',qo=0;qo<a.colFormat.length;qo++)a.colFormat[qo].align&&(Kr+={l:"left",c:"center",r:"right"}[a.colFormat[qo].align]+" ");Kr+='"'}for(Kr+=">",Xs=0;Xs<a.array.length;Xs++){for(Kr+="<mtr>",_l=0;_l<a.array[Xs].length;_l++)Kr+="<mtd>"+Ua(a.array[Xs][_l],y)+"</mtd>";Kr+="</mtr>"}Kr+="</mtable>",(a.leftDelim&&a.leftDelim!=="."||a.rightDelim&&a.rightDelim!==".")&&(a.rightDelim&&a.rightDelim!=="."&&(Kr+="<mo>"+(Jo[a.leftDelim]||a.rightDelim)+"</mo>"),Kr+="</mrow>");break;case"genfrac":(a.leftDelim||a.rightDelim)&&(Kr+="<mrow>"),a.leftDelim&&a.leftDelim!=="."&&(Kr+="<mo"+no(a.id,y)+">"+(Jo[a.leftDelim]||a.leftDelim)+"</mo>"),a.hasBarLine?(Kr+="<mfrac>",Kr+=Ua(a.above,y)||"<mi> </mi>",Kr+=Ua(a.below,y)||"<mi> </mi>",Kr+="</mfrac>"):(Kr+="<mtable"+no(a.id,y)+">",Kr+="<mtr>"+Ua(a.above,y)+"</mtr>",Kr+="<mtr>"+Ua(a.below,y)+"</mtr>",Kr+="</mtable>"),a.rightDelim&&a.rightDelim!=="."&&(Kr+="<mo"+no(a.id,y)+">"+(Jo[a.rightDelim]||a.rightDelim)+"</mo>"),(a.leftDelim||a.rightDelim)&&(Kr+="</mrow>");break;case"surd":a.hasEmptyBranch("above")?(Kr+="<msqrt"+no(a.id,y)+">",Kr+=Ua(a.body,y),Kr+="</msqrt>"):(Kr+="<mroot"+no(a.id,y)+">",Kr+=Ua(a.body,y),Kr+=Ua(a.above,y),Kr+="</mroot>");break;case"leftright":const Al=a,Tl=Al.leftDelim;Kr="<mrow>",Tl&&Tl!=="."&&(Kr+=`<mo${no(a.id,y)}>${(b=Jo[Tl])!=null?b:Tl}</mo>`),a.body&&(Kr+=Ua(a.body,y));const Il=Al.matchingRightDelim();Il&&Il!=="."&&(Kr+=`<mo${no(a.id,y)}>${(E=Jo[Il])!=null?E:Il}</mo>`),Kr+="</mrow>";break;case"sizeddelim":case"delim":Kr+=`<mo${no(a.id,y)}>${Jo[a.value]||a.value}</mo>`;break;case"accent":Kr+='<mover accent="true"'+no(a.id,y)+">",Kr+=Ua(a.body,y),Kr+="<mo>"+(Ll[Lo]||a.accent)+"</mo>",Kr+="</mover>";break;case"line":case"overlap":break;case"overunder":Es=a.above,zs=a.below,(a.svgAbove||Es)&&(a.svgBelow||zs)?ro=a.body:Es&&Es.length>0?(ro=a.body,(re=(ee=a.body)==null?void 0:ee[0])!=null&&re.below?(zs=a.body[0].below,ro=a.body[0].body):((fe=(ae=a.body)==null?void 0:ae[0])==null?void 0:fe.type)==="first"&&((be=(ge=a.body)==null?void 0:ge[1])!=null&&be.below)&&(zs=a.body[1].below,ro=a.body[1].body)):zs&&zs.length>0&&(ro=a.body,(Ne=(Me=a.body)==null?void 0:Me[0])!=null&&Ne.above?(Es=a.body[0].above,ro=a.body[0].body):((xt=(et=a.body)==null?void 0:et[0])==null?void 0:xt.type)==="first"&&((In=(It=a.body)==null?void 0:It[1])!=null&&In.above)&&(Es=a.body[1].overscript,ro=a.body[1].body)),(a.svgAbove||Es)&&(a.svgBelow||zs)?(Kr+=`<munderover ${no(a.id,y)}>`,Kr+=(_r=Pa[a.svgBody])!=null?_r:Ua(ro,y),Kr+=(Ln=Pa[a.svgBelow])!=null?Ln:Ua(zs,y),Kr+=(sr=Pa[a.svgAbove])!=null?sr:Ua(Es,y),Kr+="</munderover>"):a.svgAbove||Es?(Kr+=`<mover ${no(a.id,y)}>`+((Pr=Pa[a.svgBody])!=null?Pr:Ua(ro,y)),Kr+=(mr=Pa[a.svgAbove])!=null?mr:Ua(Es,y),Kr+="</mover>"):(a.svgBelow||zs)&&(Kr+=`<munder ${no(a.id,y)}>`+((di=Pa[a.svgBody])!=null?di:Ua(ro,y)),Kr+=(Pi=Pa[a.svgBelow])!=null?Pi:Ua(zs,y),Kr+="</munder>");break;case"placeholder":Kr+="?";break;case"mord":{Kr=typeof a.value=="string"?a.value:Lo,Lo==="\\char"?Kr="&#x"+("000000"+a.args[0].number.toString(16)).slice(-4)+";":Kr.length>0&&Kr.startsWith("\\")&&(typeof a.value=="string"&&a.value.charCodeAt(0)>255?Kr="&#x"+("000000"+a.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof a.value=="string"?Kr=a.value.charAt(0):(console.error("Did not expect this"),Kr=""));const cl=/\d/.test(Kr)?"mn":"mi";Kr=`<${cl}${no(a.id,y)}>${Yf(Kr)}</${cl}>`;break}case"mbin":case"mrel":case"minner":Kr=Zc(a,y);break;case"mpunct":Kr='<mo separator="true"'+no(a.id,y)+">"+Lo+"</mo>";break;case"mop":case"operator":case"extensible-symbol":a.body!=="\u200B"&&(Kr="<mo"+no(a.id,y)+">",Kr+=Lo==="\\operatorname"?a.body:Lo||a.body,Kr+="</mo>");break;case"box":Kr='<menclose notation="box"',a.backgroundcolor&&(Kr+=' mathbackground="'+a.backgroundcolor+'"'),Kr+=no(a.id,y)+">"+Ua(a.body,y)+"</menclose>";break;case"spacing":Kr+='<mspace width="'+((bi=qa[Lo])!=null?bi:0)+'em"/>';break;case"enclose":Kr='<menclose notation="';for(const cl in a.notation)Object.prototype.hasOwnProperty.call(a.notation,cl)&&a.notation[cl]&&(Kr+=Fs+cl,Fs=" ");Kr+=no(a.id,y)+'">'+Ua(a.body,y)+"</menclose>";break;case"prompt":Kr='<menclose notation="roundexbox""">'+Ua(a.body,y)+"</menclose>";break;case"space":Kr+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Kr+=Zc(a,y);break;case"mclose":Kr+=Zc(a,y);break;case"macro":{const cl=a.command+$u(a.macroArgs);cl&&(Kr+=`<mo ${no(a.id,y)}>${cl}</mo>`)}break;case"latexgroup":Kr+=Ua(a.body,y);break;case"latex":Kr+="<mtext"+no(a.id,y)+">"+a.value+"</mtext>";break;case"tooltip":Kr+=Ua(a.body,y);break;case"text":Kr+=`<mtext ${no(a.id,y)}x>${a.value}</mtext>`;break;default:if(a.command==="\\displaystyle")return`<mrow ${no(a.id,y)} displaystyle="true">${Ua(a.body,y)}</mrow>`;if(a.command==="\\textstyle")return`<mrow ${no(a.id,y)} displaystyle="false">${Ua(a.body,y)}</mrow>`;console.info("Unexpected element in conversion to MathML:",a)}return Kr}var Nu={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Uh={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Iv(a){let y="";return a.startsWith("\\")&&(y=" "+a.replace("\\","")+" "),y}function $d(a){let y=0;if(Oe(a))for(const b of a)b.type!=="first"&&(y+=1);return y===1}function Dv(a){if(Oe(a)){for(const y of a)if(y.type!=="first"&&y.id)return y.id.toString()}return""}function cp(a){let y="";if(Oe(a))for(const b of a)b.type!=="first"&&typeof b.value=="string"&&(y+=b.value);return y}function Pv(a){return a?a.map(y=>y.value).join(""):""}function Ea(a,y){var b,E,ee,re,ae;function fe(Me){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(Me)?` <say-as interpret-as="character">${Me}</say-as>`:/[A-Z]/.test(Me)?`capital <say-as interpret-as="character">${Me.toLowerCase()}</say-as>`:Me:/[a-z]/.test(Me)?" '"+Me.toUpperCase()+"'":/[A-Z]/.test(Me)?" 'capital "+Me.toUpperCase()+"'":Me}function ge(Me){return"<emphasis>"+Me+"</emphasis>"}if(!y)return"";let be="";if(Oe(y)){let Me=!1,Ne=!1;for(let et=0;et<y.length;et++)y[et].type!=="first"&&(y[et].mode!=="text"&&(Ne=!1),et<y.length-2&&y[et].type==="mopen"&&y[et+2].type==="mclose"&&y[et+1].type==="mord"?(be+=" of ",be+=ge(Ea(a,y[et+1])),et+=2):y[et].mode==="text"?Ne?be+=(b=y[et].value)!=null?b:" ":(Ne=!0,be+=Ea("text",y[et])):y[et].isDigit()?Me?be+=y[et].asDigit():(Me=!0,be+=Ea(a,y[et])):(Me=!1,be+=Ea(a,y[et])))}else if(y.mode==="text")y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>'),be+=y.value;else{y.id&&a==="math"&&(be+='<mark name="'+y.id.toString()+'"/>');let Me="",Ne="",et="",xt=!1;const{command:It}=y;switch(It){case"\\vec":return"vector "+Ea(a,y.body);case"\\acute":return Ea(a,y.body)+" acute";case"\\grave":return Ea(a,y.body)+" grave";case"\\dot":return"dot over"+Ea(a,y.body);case"\\ddot":return"double dot over"+Ea(a,y.body);case"\\mathring":return"ring over"+Ea(a,y.body);case"\\tilde":case"\\widetilde":return"tilde over"+Ea(a,y.body);case"\\bar":return Ea(a,y.body)+" bar";case"\\breve":return Ea(a,y.body)+" breve";case"\\check":case"\\widecheck":return"check over "+Ea(a,y.body);case"\\hat":case"\\widehat":return"hat over"+Ea(a,y.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+Ea(a,y.body);case"\\underarc":case"\\underparen":return"arc under "+Ea(a,y.body)}switch(y.type){case"prompt":const In=y.body.length>1?'start input . <break time="500ms"/> '+Ea(a,y.body)+'. <break time="500ms"/> end input':"blank";be+=' <break time="300ms"/> '+In+'. <break time="700ms"/>'+((E=y.correctness)!=null?E:"")+' . <break time="700ms"/> ';break;case"array":const _r=y.array,Ln=y.environmentName;if(Object.keys(Uh).includes(Ln)){be+=` begin ${Uh[Ln]} `;for(let mr=0;mr<_r.length;mr++){mr>0&&(be+=","),be+=` row ${mr+1} `;for(let di=0;di<_r[mr].length;di++)di>0&&(be+=","),be+=` column ${di+1}: `,be+=Ea("math",_r[mr][di])}be+=` end ${Uh[Ln]} `}break;case"group":It==="\\ne"?be+=" not equal ":(It==="\\not"&&(be+=" not "),be+=Ea("math",y.body));break;case"root":be+=Ea("math",y.body);break;case"genfrac":if(Me=Ea("math",y.above),Ne=Ea("math",y.below),$d(y.above)&&$d(y.below)){const di={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[cp(y.above)+"/"+cp(y.below)];di?be=di:be+=Me+" over "+Ne}else be+=' the fraction <break time="150ms"/>'+Me+' over <break time="150ms"/>'+Ne+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(et=Ea("math",y.body),y.hasEmptyBranch("above"))be+=$d(y.body)?" the square root of "+et+" , ":' the square root of <break time="200ms"/>'+et+'. <break time="200ms"/> End square root';else{let mr=Ea("math",y.above);mr=mr.trim();const di=mr.replace(/<mark([^/]*)\/>/g,"");di==="3"?be+=' the cube root of <break time="200ms"/>'+et+'. <break time="200ms"/> End cube root':di==="n"?be+=' the nth root of <break time="200ms"/>'+et+'. <break time="200ms"/> End root':be+=' the root with index: <break time="200ms"/>'+mr+', of <break time="200ms"/>'+et+'. <break time="200ms"/> End root'}break;case"leftright":{const mr=y;be+=(ee=mr.leftDelim?Nu[mr.leftDelim]:void 0)!=null?ee:mr.leftDelim,be+=Ea("math",y.body),be+=(re=mr.rightDelim?Nu[mr.rightDelim]:void 0)!=null?re:mr.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const sr=It.replace(/^\\/g,""),Pr=cr()[sr];Pr&&(Pr!=null&&Pr.expand?be+=Ea("math",y.body):be+=`${sr} `);break;case"placeholder":be+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(It==="\\mathbin"||It==="\\mathrel"||It==="\\mathopen"||It==="\\mathclose"||It==="\\mathpunct"||It==="\\mathord"||It==="\\mathinner"){be=Ea(a,y.body);break}let mr=y.isDigit()?y.asDigit():y.value,di=y.command;if((y.type==="delim"||y.type==="sizeddelim")&&(di=y.value,mr=di),a==="text")be+=mr;else{if(y.type==="mbin"&&(be+='<break time="150ms"/>'),mr){const Pi=Nu[mr]||(di?Nu[di.trim()]:"");if(Pi)be+=" "+Pi;else{const bi=di?Iv(di.trim()):"";be+=bi||fe(mr)}}else be+=Ea("math",y.body);y.type==="mbin"&&(be+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(y.value!=="\u200B"){const mr=y.command;if(mr==="\\sum")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let di=Ea("math",y.superscript);di=di.trim();let Pi=Ea("math",y.subscript);Pi=Pi.trim(),be+=' the summation from <break time="200ms"/>'+Pi+'<break time="200ms"/> to <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the summation of";else{let di=Ea("math",y.subscript);di=di.trim(),be+=' the summation from <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(mr==="\\prod")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let di=Ea("math",y.superscript);di=di.trim();let Pi=Ea("math",y.subscript);Pi=Pi.trim(),be+=' the product from <break time="200ms"/>'+Pi+'<break time="200ms"/> to <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(y.hasEmptyBranch("subscript"))be+=" the product of ";else{let di=Ea("math",y.subscript);di=di.trim(),be+=' the product from <break time="200ms"/>'+di+'<break time="200ms"/> of <break time="150ms"/>',xt=!0}else if(mr==="\\int")if(!y.hasEmptyBranch("superscript")&&!y.hasEmptyBranch("subscript")){let di=Ea("math",y.superscript);di=di.trim();let Pi=Ea("math",y.subscript);Pi=Pi.trim(),be+=' the integral from <break time="200ms"/>'+ge(Pi)+'<break time="200ms"/> to <break time="200ms"/>'+ge(di)+' <break time="200ms"/> of ',xt=!0}else be+=' the integral of <break time="200ms"/> ';else if(typeof y.value=="string"){const di=(ae=Nu[y.value])!=null?ae:y.command?Nu[y.command]:void 0;be+=di||" "+y.value}else y.command&&(y.command==="\\mathop"?be+=Ea("math",y.body):y.command==="\\operatorname"?be+=Pv(y.body):be+=y.command.startsWith("\\")?" "+y.command.slice(1):" "+y.command)}break;case"enclose":et=Ea("math",y.body),be+=" crossed out "+et+". End crossed out.";break;case"space":case"spacing":break}if(!xt&&!y.hasEmptyBranch("superscript")){let In=Ea(a,y.superscript);In=In.trim();const _r=In.replace(/<[^>]*>/g,"");if($d(y.superscript)){if(a==="math"){const Ln=Dv(y.superscript);Ln&&(be+='<mark name="'+Ln+'"/>')}_r==="\u2032"?be+=" prime ":_r==="2"?be+=" squared ":_r==="3"?be+=" cubed ":Number.isNaN(Number.parseInt(_r))?be+=" to the "+In+"; ":be+=' to the <say-as interpret-as="ordinal">'+_r+"</say-as> power; "}else Number.isNaN(Number.parseInt(_r))?be+=" raised to the "+In+"; ":be+=' raised to the <say-as interpret-as="ordinal">'+_r+"</say-as> power; "}if(!xt&&!y.hasEmptyBranch("subscript")){let In=Ea("math",y.subscript);In=In.trim(),be+=$d(y.subscript)?" sub "+In:" subscript "+In+". End subscript. "}}return be}function Fu(a){var y,b;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const ee=Ua(a);if(ee){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(y=window.MathfieldElement.textToSpeechRulesOptions)!=null?y:{},window.MathfieldElement.textToSpeechRulesOptions=me(xe({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=me(xe({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=me(xe({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const re=(b=window.SRE)!=null?b:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&re.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let ae="";try{ae=re.toSpeech(ee)}catch(fe){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",fe)}return ae}return""}let E=Ea("math",a);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let ee="";window.MathfieldElement.speechEngineRate&&(ee='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),E='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+ee+"<p><s>"+E+"</s></p>"+(ee?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&Le()==="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 Nd={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},Fd={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Ov(a){let y="";for(const b of a){const E=y[y.length-1];E!==void 0&&/\d/.test(E)&&/^\d/.test(b)&&(y+=" "),y+=b}return y}function _o(a){var y,b,E,ee,re,ae,fe,ge,be,Me,Ne,et,xt;if(!a)return"";if(Oe(a)){if(a.length===0)return"";if(a[0].mode==="latex")return a.map(_o).join("");if(a[0].mode==="text"){let Pr=0,mr="";for(;((y=a[Pr])==null?void 0:y.mode)==="text";)mr+=a[Pr].body?_o(a[Pr].body):a[Pr].value,Pr++;return`"${mr}" ${_o(a.slice(Pr))}`}let Ln=0;const sr=[];for(;a[Ln]&&a[Ln].mode==="math";){let Pr="";for(;a[Ln]&&a[Ln].type==="mord"&&/\d/.test(a[Ln].value);)Pr+=a[Ln++].value;Pr?sr.push(Pr):sr.push(_o(a[Ln++]))}return sr.push(_o(a.slice(Ln))),Ov(sr)}if(a.mode==="text")return`"${a.value}"`;let It="";const{command:In}=a;let _r;if(In==="\\placeholder")return`(${_o(a.body)})`;switch(a.type){case"accent":const Ln={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[In];It=`${Ln!=null?Ln:""} ${_o(a.body)} `;break;case"first":return"";case"latexgroup":return a.body.map(bi=>bi.value).join("");case"group":case"root":It=(b=Nd[In])!=null?b:_o(a.body);break;case"genfrac":{const bi=a;(bi.leftDelim||bi.rightDelim)&&(It=bi.leftDelim==="."||!bi.leftDelim?"{:":bi.leftDelim),bi.hasBarLine?(It+="(",It+=_o(bi.above),It+=")/(",It+=_o(bi.below),It+=")"):(It+="("+_o(bi.above)+"),",It+="("+_o(bi.below)+")"),(bi.leftDelim||bi.rightDelim)&&(It+=bi.rightDelim==="."||!bi.rightDelim?"{:":bi.rightDelim)}break;case"surd":It+=a.hasEmptyBranch("above")?"sqrt("+_o(a.body)+")":"root("+_o(a.above)+")("+_o(a.body)+")";break;case"latex":It=a.value;break;case"leftright":{const bi=a,Pa=bi.leftDelim;It+=Pa==="."||!Pa?"{:":Pa,It+=_o(bi.body);const qa=bi.matchingRightDelim();It+=qa==="."||!qa?":}":qa}break;case"sizeddelim":case"delim":It=a.value;break;case"overlap":break;case"overunder":break;case"mord":It=(ee=(E=Nd[In])!=null?E:In)!=null?ee:typeof a.value=="string"?a.value:"",It.startsWith("\\")&&(It+=" "),_r=In?In.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,_r?It=String.fromCodePoint(Number.parseInt("0x"+_r[1])):It.length>0&&It.startsWith("\\")&&(It=typeof a.value=="string"?a.value.charAt(0):a.command),It=Rv(It,a.style);break;case"mbin":case"mrel":case"minner":It=(ae=(re=Nd[In])!=null?re:Fd[In])!=null?ae:a.value;break;case"mopen":case"mclose":It=a.value;break;case"mpunct":It=(fe=Fd[In])!=null?fe:In;break;case"mop":case"operator":case"extensible-symbol":a.value!=="\u200B"&&(Fd[In]?It=Fd[In]:It=In==="\\operatorname"?_o(a.body):(ge=a.value)!=null?ge:In,It+=" ");break;case"array":const sr=a.array,Pr=a.environmentName,mr=(be={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Pr])!=null?be:["(",")"],di=[];for(const bi of sr){const Pa=[];for(const qa of bi)Pa.push(mr[0]+_o(qa)+mr[1]);di.push(Pa.join(","))}const Pi=(Me={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Pr])!=null?Me:["(",")"];It=Pi[0]+di.join(",")+Pi[1];break;case"box":break;case"spacing":It=(Ne=Nd[In])!=null?Ne:" ";break;case"enclose":It="("+_o(a.body)+")";break;case"space":It=" ";break;case"subsup":It="";break;case"macro":It=(xt=(et=Nd[In])!=null?et:Fd[In])!=null?xt:_o(a.body);break}if(!a.hasEmptyBranch("subscript")){It+="_";const Ln=_o(a.subscript);It+=Ln.length!==1?`(${Ln})`:Ln}if(!a.hasEmptyBranch("superscript")){It+="^";const Ln=_o(a.superscript);It+=Ln.length!==1?`(${Ln})`:Ln}return It}function Rv(a,y){if(!y)return a;let b=a;return y.variant==="double-struck"&&(b=`bbb "${b}"`),y.variant==="script"&&(b=`cc "${b}"`),y.variant==="fraktur"&&(b=`fr "${b}"`),y.variant==="sans-serif"&&(b=`sf "${b}"`),y.variant==="monospace"&&(b=`tt "${b}"`),y.variantStyle==="bold"&&(b=`bb "${b}"`),y.color?`color({${y.color}})(${b})`:b}function Yo(a,y){var b,E;y!=null||(y={}),y.mathstyle=(b=y.mathstyle)!=null?b:"displaystyle";const ee=new La({from:me(xe({},bu()),{renderPlaceholder:()=>new Dr(160,{maxFontSize:1}),letterShapeStyle:(E=y==null?void 0:y.letterShapeStyle)!=null?E:"tex"}),mathstyle:y.mathstyle}),ae=new Gn({mode:"math",type:"root",body:Xo(a,{context:ee,parseMode:"math",mathstyle:y.mathstyle})}).render(ee);return ae?(gu(Cd(ae,ee)),vu(ae,{classes:"ML__latex"}).toMarkup()):""}function _1(a){return t0(a,{context:bu()})}function Bv(a,y={}){return Ua(Xo(a,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),y)}function $v(a){const y=Xo(a,{parseMode:"math",mathstyle:"displaystyle"});return Fu(y)}var qf;function Nv(a){var y,b;if(!qf){const E=(y=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.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(b=qf==null?void 0:qf.box(a).latex)!=null?b:""}function L1(a,y="math"){return _o(new Gn({type:"root",body:Xo(a,{parseMode:y})}))}function A1(a){return Oc(a,{format:"ascii-math"})[1]}function jh(a){if(typeof a=="string"){const y=Fv(a);if(!y)throw new Error(`Invalid color: ${a}`);return y}return"C"in a?Kv(a):"a"in a?up(a):a}function zu(a){return a<0?0:a>255?255:Math.round(a)}function Fv(a){if(!a||a[0]!=="#")return;a=a.slice(1);let y;return a.length<=4?(y={r:parseInt(a[0]+a[0],16),g:parseInt(a[1]+a[1],16),b:parseInt(a[2]+a[2],16)},a.length===4&&(y.a=parseInt(a[3]+a[3],16)/255)):(y={r:parseInt(a[0]+a[1],16),g:parseInt(a[2]+a[3],16),b:parseInt(a[4]+a[5],16)},a.length===8&&(y.a=parseInt(a[6]+a[7],16)/255)),y&&typeof y.a=="undefined"&&(y.a=1),y}function Zh(a){const[y,b,E]=[a.L,a.C,a.H],ee=E*Math.PI/180,re={L:y,a:b*Math.cos(ee),b:b*Math.sin(ee)};return a.alpha!==void 0&&(re.alpha=a.alpha),re}function zv(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.sqrt(b*b+E*E),ae=Math.atan2(E,b)*180/Math.PI,fe={L:y,C:ee,H:ae};return a.alpha!==void 0&&(fe.alpha=a.alpha),fe}function Vh(a){const[y,b,E]=[a.L,a.a,a.b],ee=Math.pow(.9999999984505198*y+.39633779217376786*b+.2158037580607588*E,3),re=Math.pow(1.00000000888176*y-.10556134232365635*b-.0638541747717059*E,3),ae=Math.pow(y*1.000000054672411-.0894841820949657*b-1.2914855378640917*E,3),fe=4.076741661347994*ee-3.307711590408193*re+.230969928729428*ae,ge=-1.2684380040921763*ee+2.6097574006633715*re-.3413193963102197*ae,be=-.004196086541837188*ee-.7034186144594493*re+1.7076147009309444*ae,Me=Ne=>{const et=Math.abs(Ne);return et<=.0031308?Ne*12.92:(Math.sign(Ne)||1)*(1.055*Math.pow(et,1/2.4)-.055)};return[Me(fe),Me(ge),Me(be)]}function Gh(a){const[y,b,E]=a;return y>=0&&y<=1&&b>=0&&b<=1&&E>=0&&E<=1}function Xh(a,y){let[b,E,ee]=a;return b=zu(b*255),E=zu(E*255),ee=zu(ee*255),y!==void 0?{r:b,g:E,b:ee,alpha:y}:{r:b,g:E,b:ee}}function up(a){let[y,b,E]=Vh(a);if(Gh([y,b,E]))return Xh([y,b,E],a.alpha);const ee=zv(a);if(ee.C=0,[y,b,E]=Vh(Zh(ee)),!Gh([y,b,E]))return Xh([y,b,E],a.alpha);let re=0,ae=a.L,fe=(re+ae)/2;ee.C=fe;const ge=.36/Math.pow(2,12);for(;ae-re>ge;)fe=(re+ae)/2,ee.C=fe,[y,b,E]=Vh(Zh(ee)),Gh([y,b,E])?re=fe:ae=fe;return Xh([y,b,E],a.alpha)}function Kv(a){return up(Zh(a))}function dp(a,y){const b=jh(a),E=jh(y),ee=.56,re=.57,ae=.62,fe=.65,ge=.022,be=1.414,Me=.1,Ne=5e-4,et=1.14,xt=.027,It=1.14,In=.027;function _r(bi){return bi>=ge?bi:bi+Dl(ge-bi,be)}function Ln(bi){return(bi<0?-1:1)*Math.pow(Math.abs(bi),2.4)}const sr=_r(Ln(E.r/255)*.2126729+Ln(E.g/255)*.7151522+Ln(E.b/255)*.072175),Pr=_r(Ln(b.r/255)*.2126729+Ln(b.g/255)*.7151522+Ln(b.b/255)*.072175);let mr,di,Pi;return Math.abs(Pr-sr)<Ne?di=0:Pr>sr?(mr=Dl(Pr,ee)-Dl(sr,re),di=mr*et):(mr=Dl(Pr,fe)-Dl(sr,ae),di=mr*It),Math.abs(di)<Me?Pi=0:di>0?Pi=di-In:Pi=di+xt,Pi*100}function fp(a,y,b){b!=null||(b="#fff"),y!=null||(y="#000");const E=dp(a,b),ee=dp(a,y);return Math.abs(E)>Math.abs(ee)?b:y}function Hv(a){const y=jh(a);let b=((1<<24)+(zu(y.r)<<16)+(zu(y.g)<<8)+zu(y.b)).toString(16).slice(1);return y.alpha!==void 0&&y.alpha<1&&(b+=("00"+Math.round(y.alpha*255).toString(16)).slice(-2)),b[0]===b[1]&&b[2]===b[3]&&b[4]===b[5]&&b[6]===b[7]&&(b=b[0]+b[2]+b[4]+(y.alpha!==void 0&&y.alpha<1?b[6]:"")),"#"+b}function mo(a){const y=hp(a);let b="";for(const E of y){if(typeof E.value!="string")return"";b+=E.value}return b}function hp(a){const b=a.model.selection.ranges;return b.length!==1?[]:a.model.getAtoms(b[0])}function Wv(a,y){const b=hp(a);if(b.length!==1)return!1;const E=ph[y];return E?!!E.test(b[0].value):!1}function Uv(a,y){return mo(a).length>0}function jv(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 Zv(a){return[{label:()=>Yo(`\\vec{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overrightarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overleftarrow{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\dot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\ddot{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\bar{${mo(a)}}`),visible:()=>mo(a).length===1,onMenuSelect:()=>a.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overgroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\overbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\underline{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\undergroup{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\underbrace{${mo(a)}}`),visible:()=>mo(a).length>0,onMenuSelect:()=>a.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function Vv(a){return[{label:()=>Yo(`\\boxed{${a.getValue(a.model.selection)}}}`),onMenuSelect:()=>a.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\bbox[5px, border: 2px solid red]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Yo(`\\bbox[5px, border: 2px dashed black]{${a.getValue(a.model.selection)}}`),onMenuSelect:()=>a.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function Gv(a){const y=[];for(const b of Object.keys(Ue))y.push({class:(Hv(fp(Ue[b]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ue[b]} "></span>`,ariaLabel:()=>{var E;return(E=ct(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({backgroundColor:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({backgroundColor:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}function Xv(a){const y=[];for(const b of Object.keys(je))y.push({class:(fp(je[b])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${je[b]} "></span>`,ariaLabel:()=>{var E;return(E=ct(b))!=null?E:b},checked:()=>{var E;return{some:"mixed",all:!0}[(E=a.queryStyle({color:b}))!=null?E:!1]},onMenuSelect:()=>{a.applyStyle({color:b},{operation:"toggle"}),a.adoptStyle="none"}});return y}var Yv=class extends ep{constructor(a,y,b,E){super(a,y),this.row=b,this.col=E}set active(a){const y=this.parentMenu.children;if(a)for(const b of y)b.element.classList.toggle("active",b.row<=this.row&&b.col<=this.col);else for(const b of y)b.element.classList.remove("active")}};function qv(a){const y=[];for(let b=1;b<=5;b++)for(let E=1;E<=5;E++)y.push({onCreate:(ee,re)=>new Yv(ee,re,b,E),label:"\u2610",tooltip:()=>ct("tooltip.row-by-col",b,E),data:{row:b,col:E},onMenuSelect:()=>{a.insert(`\\begin{pmatrix}${Array(b).fill(Array(E).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return y}function Jv(a){return[{label:()=>ct("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>a.executeCommand("addRowBefore"),visible:()=>Vc(a)},{label:()=>ct("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>a.executeCommand("addRowAfter"),visible:()=>Vc(a)},{label:()=>ct("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>a.executeCommand("addColumnBefore"),visible:()=>Vc(a),enabled:()=>{const y=a.model.parentEnvironment;if(!y)return!1;const[b,E]=e1(a);return b<y.maxColumns}},{label:()=>ct("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>a.executeCommand("addColumnAfter"),visible:()=>Vc(a)},{type:"divider"},{label:()=>ct("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>a.executeCommand("removeRow"),visible:()=>Vc(a)},{label:()=>ct("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>a.executeCommand("removeColumn"),visible:()=>Vc(a)},{type:"divider"},{label:()=>ct("menu.borders"),visible:()=>(Qv(a)||Vc(a))&&a.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>zd(a,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>zd(a,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>zd(a,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>zd(a,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>zd(a,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>ct("menu.insert matrix"),id:"insert-matrix",visible:()=>a.isSelectionEditable,submenu:qv(a),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>ct("menu.mode"),id:"mode",visible:()=>a.isSelectionEditable&&a.model.selectionIsCollapsed,submenu:[{label:()=>ct("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{Au(a,"accept-all"),a.executeCommand(["switchMode","math"])},checked:()=>a.model.mode==="math"},{label:()=>ct("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{Au(a,"accept-all"),a.executeCommand(["switchMode","text"])},checked:()=>a.model.mode==="text"},{label:()=>ct("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>a.executeCommand(["switchMode","latex"]),checked:()=>a.model.mode==="latex"}]},{type:"divider"},{label:()=>ct("menu.font-style"),id:"variant",visible:()=>a.isSelectionEditable,submenu:jv(a),submenuClass:"variant-submenu"},{label:()=>ct("menu.color"),id:"color",visible:()=>a.isSelectionEditable,submenu:Xv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ct("menu.background-color"),id:"background-color",visible:()=>a.isSelectionEditable,submenu:Gv(a),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>ct("menu.accent"),id:"accent",visible:()=>a.isSelectionEditable,submenu:Zv(a),submenuClass:"variant-submenu"},{label:()=>ct("menu.decoration"),id:"decoration",visible:()=>a.isSelectionEditable&&mo(a).length>0,submenu:Vv(a),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>ct("menu.evaluate"),id:"ce-evaluate",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const y=t1(a);if(!y){a.model.announce("plonk");return}a.model.selectionIsCollapsed?(a.model.position=a.model.lastOffset,a.insert(`=${y}`,{insertionMode:"insertAfter",selectionMode:"item"})):a.insert(y,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>ct("menu.simplify"),id:"ce-simplify",visible:()=>a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var y,b;if(a.model.selectionIsCollapsed){const E=(y=a.expression)==null?void 0:y.simplify();if(a.model.position=a.model.lastOffset,!E){a.model.announce("plonk");return}a.insert(`=${E.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection)).simplify();if(!E){a.model.announce("plonk");return}a.insert(E.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var y;if(window.MathfieldElement.computeEngine===null)return"";const b=(y=a.expression)==null?void 0:y.unknowns[0];return b?ct("menu.solve-for",Yo(b)):ct("menu.solve")},id:"ce-solve",visible:()=>{var y;return a.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((y=a.expression)==null?void 0:y.unknowns.length)===1&&a.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var y;const b=a.expression,E=b==null?void 0:b.unknowns[0],ee=(y=b.solve(E))==null?void 0:y.map(re=>{var ae;return(ae=re.simplify().latex)!=null?ae:""});if(!ee){a.model.announce("plonk");return}a.insert(`${E}=${ee.length===1?ee[0]:"\\left\\lbrace"+(ee==null?void 0:ee.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>ct("menu.cut"),onMenuSelect:()=>a.executeCommand("cutToClipboard"),visible:()=>!a.options.readOnly&&a.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>ct("menu.copy"),id:"copy",submenu:[{label:()=>ct("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>ia.copyToClipboard(a,"latex"),keyboardShortcut:"meta+C"},{label:()=>ct("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>ia.copyToClipboard(a,"ascii-math")},{label:()=>ct("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>ia.copyToClipboard(a,"math-ml")}]},{label:()=>ct("menu.paste"),id:"paste",onMenuSelect:()=>a.executeCommand("pasteFromClipboard"),visible:()=>a.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>ct("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>a.executeCommand("selectAll")}]}function Vc(a){var y;return!!((y=a.model.parentEnvironment)!=null&&y.array)}function Qv(a){return a.model.at(a.model.position).type==="array"}function e1(a){var y;const b=(y=a.model.parentEnvironment)==null?void 0:y.array;return b?[b.length,b.reduce((E,ee)=>Math.max(E,ee.length),0)]:[0,0]}function zd(a,y){Ef(a),a.flushInlineShortcutBuffer(),D0(a.model,y),Eo(a)}function t1(a){var y,b;let E;if(a.model.selectionIsCollapsed?E=(y=window.MathfieldElement.computeEngine)==null?void 0:y.parse(a.getValue(),{canonical:!1}):E=(b=window.MathfieldElement.computeEngine)==null?void 0:b.parse(a.getValue(a.model.selection),{canonical:!1}),!E)return"";let ee=E.evaluate();return ee.isSame(E)&&(ee=E.N()),ee.latex}function Yh(a,y,b,E){return{label:()=>Yo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=ct(E))!=null?ee:E},visible:()=>Wv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variant:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variant:y},{operation:"toggle"}),a.adoptStyle="none"}}}function qh(a,y,b,E){return{label:()=>Yo(`\\${b}{${mo(a)}}`),tooltip:()=>{var ee;return(ee=ct(E))!=null?ee:E},visible:()=>Uv(a,y),checked:()=>{var ee;return{some:"mixed",all:!0}[(ee=a.queryStyle({variantStyle:y}))!=null?ee:!1]},onMenuSelect:()=>{a.applyStyle({variantStyle:y},{operation:"toggle"}),a.adoptStyle="none"}}}function Ku(a,y){return a+Fu(y)}Ls({speak:(a,y,b)=>n1(a,y,b)},{target:"mathfield"});function n1(a,y,b){var E,ee;b=b!=null?b:{withHighlighting:!1};const{model:re}=a;function ae(Me){let Ne=null;switch(Me){case"all":Ne=re.root;break;case"selection":Ne=re.getAtoms(re.selection);break;case"left":{Ne=re.getAtoms(re.offsetOf(re.at(re.position).leftSibling),re.position);break}case"right":{Ne=re.getAtoms(re.position,re.offsetOf(re.at(re.position).rightSibling));break}case"group":Ne=re.getAtoms(re.getSiblingsRange(re.position));break;case"parent":{const{parent:et}=re.at(re.position);et!=null&&et.parent?Ne=et:Ne=re.root;break}default:Ne=re.root}return Ne}function fe(Me){let Ne="";switch(Me){case"all":console.log("Internal failure: speak all failed");break;case"selection":Ne="no selection";break;case"left":Ne="at start";break;case"right":Ne="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":Ne="no parent";break;default:console.log('unknown speak_ param value: "'+Me+'"');break}return Ne}const ge=ae(y);if(ge===null)return(ee=(E=window.MathfieldElement).speakHook)==null||ee.call(E,fe(y)),!1;(b.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const be=Fu(ge);return ft()&&b.withHighlighting?(mc().readAloudMathfield=a,Nc(a,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(a.field,be)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(be),!1}function r1(a){var y,b;if(!ft()){console.log("Speak:",a);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const E=new SpeechSynthesisUtterance(a);window.speechSynthesis.speak(E)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"mp3",VoiceId:(y=window.MathfieldElement.speechEngineVoice)!=null?y:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna")?"neural":"standard",Text:a,TextType:"ssml"};E.synthesizeSpeech(ee,(re,ae)=>{if(re)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);else if(ae!=null&&ae.AudioStream){const fe=new Uint8Array(ae.AudioStream),ge=new Blob([fe.buffer],{type:"audio/mpeg"}),be=URL.createObjectURL(ge);new Audio(be).play().catch(Ne=>console.log(Ne))}else console.log("polly.synthesizeSpeech():",ae)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function pp(a){var y;let b;if(a.parent.type==="prompt")a.parentBranch==="body"&&(b="prompt");else if(a.parentBranch==="body")b=a.type&&(y={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[a.type])!=null?y:"parent";else if(a.parent.type==="genfrac"){if(a.parentBranch==="above")return"numerator";if(a.parentBranch==="below")return"denominator"}else a.parent.type==="surd"?a.parentBranch==="above"&&(b="index"):a.parentBranch==="superscript"?b="superscript":a.parentBranch==="subscript"&&(b="subscript");return b||console.log("unknown relationship"),b!=null?b:"parent"}function i1(a,y,b,E){let ee="";if(y==="plonk")window.MathfieldElement.playSound("plonk"),a.flushInlineShortcutBuffer();else if(y==="delete")ee=Ku("deleted: ",E);else if(y==="focus"||y.includes("move"))ee=a1(a.model,b)+(a.model.selectionIsCollapsed?"":"selected: ")+o1(a.model);else if(y==="replacement")ee=Ku("",a.model.at(a.model.position));else if(y==="line"){const re=Ku("",a.model.root);a.keyboardDelegate.setAriaLabel(re)}else ee=E?Ku(y+" ",E):y;if(ee){const re=a.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";a.ariaLiveText.textContent=ee+re}}function a1(a,y){if(Number.isNaN(y))return"";const b=a.at(y);if(!b||b.treeDepth<=a.at(a.position).treeDepth)return"";let E="",ee=b.parent;const re=a.at(a.position).parent;for(;ee!==a.root&&ee!==re;)E+=`out of ${pp(ee)};`,ee=ee.parent;return E}function o1(a){if(!a.selectionIsCollapsed)return Ku("",a.getAtoms(a.selection));let y="";const b=a.at(a.position),E=pp(b);return b.isFirstSibling&&(y=(E?"start of "+E:"unknown")+": "),b.isLastSibling?b.isFirstSibling||(y+=E?"end of "+E:"unknown"):y+=Ku("",b),y}var s1=class{constructor(a,y,b){this.mathfield=a,this.mode=y,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=b}dispose(){this.mathfield=void 0}getState(){const a={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(a.direction=this.selection.direction),{content:this.root.toJson(),selection:a,mode:this.mode}}setState(a,y){var b;const E=this.silenceNotifications;this.silenceNotifications=(b=y==null?void 0:y.silenceNotifications)!=null?b:!0;let ee={};if((y==null?void 0:y.type)==="undo"&&(ee={inputType:"historyUndo"}),(y==null?void 0:y.type)==="redo"&&(ee={inputType:"historyRedo"}),this.contentWillChange(ee)){const re=this.silenceNotifications;this.silenceNotifications=!0,this.mode=a.mode,this.root=dc(a.content),this.selection=a.selection,this.silenceNotifications=re,this.contentDidChange(ee)}this.silenceNotifications=E}get atoms(){return this.root.children}get selection(){return this._selection}set selection(a){this.setSelection(a)}setSelection(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var b,E,ee;const re=this.normalizeSelection(a,y);if(re===void 0)throw new TypeError("Invalid selection");if(re.ranges.length===1&&re.ranges[0][0]===re.ranges[0][1]){const Me=re.ranges[0][0];if(!this.mathfield.dirty&&!((b=this.at(Me))!=null&&b.parentPrompt)&&this.mathfield.hasEditablePrompts){if((E=this.at(Me-1))!=null&&E.parentPrompt){this._anchor=this.normalizeOffset(Me-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((ee=this.at(Me+1))!=null&&ee.parentPrompt){this._anchor=this.normalizeOffset(Me+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=Me,this._position=Me,this._selection=re;return}const ae=Vo(re);re.direction==="backward"?[this._position,this._anchor]=ae:[this._anchor,this._position]=ae;const fe=this.at(ae[0]+1),ge=this.at(ae[1]),be=Gn.commonAncestor(fe,ge);(be==null?void 0:be.type)==="array"&&fe.parent===be&&ge.parent===be?this._selection={ranges:[ae],direction:re.direction}:this._selection={ranges:[ae],direction:re.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(a){var y;const b=this.at(a);(b==null?void 0:b.type)==="placeholder"?this.setSelection(a-1,a):((y=b==null?void 0:b.rightSibling)==null?void 0:y.type)==="placeholder"?this.setSelection(a,a+1):this.position=a,b instanceof ns&&b.isSuggestion&&(b.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(a){this.setSelection(a,a)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(a="forward"){return this._anchor===this._position?!1:(a==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(a){return this.atoms[a]}offsetOf(a){return this.atoms.indexOf(a)}getSiblingsRange(a){const y=this.at(a),{parent:b}=y;if(!b)return[0,this.lastOffset];const E=y.parent.branch(y.parentBranch);return[this.offsetOf(E[0]),this.offsetOf(E[E.length-1])]}getBranchRange(a,y){const b=this.at(a).branch(y);return[this.offsetOf(b[0]),this.offsetOf(b[b.length-1])]}getAtoms(a,y,b){let E=b!=null?b:{};if(wu(a)){if(E=y!=null?y:{},a.ranges.length>1)return a.ranges.reduce((be,Me)=>[...be,...this.getAtoms(Me,E)],[]);a=a.ranges[0]}let ee,re;if(gl(a)){if(ee=a,!gl(y))return[];re=y}else[ee,re]=a,E=y!=null?y:{};if(!Number.isFinite(ee))return[];E.includeChildren===void 0&&(E.includeChildren=!1),ee<0&&(ee=this.lastOffset-ee+1),re<0&&(re=this.lastOffset-re+1);const ae=Math.min(ee,re)+1,fe=Math.max(ee,re);if(!E.includeChildren&&ae===1&&fe===this.lastOffset)return[this.root];let ge=[];for(let be=ae;be<=fe;be++){const Me=this.atoms[be];mp(this,Me,ae,fe)&&ge.push(Me)}return E.includeChildren||(ge=ge.filter(be=>{let Me=!1,{parent:Ne}=be;for(;Ne&&!Me;)Me=mp(this,Ne,ae,fe),Ne=Ne.parent;return!Me})),ge}getAllAtoms(a=0){const y=[],b=this.lastOffset;for(let E=a;E<=b;E++)y.push(this.atoms[E]);for(let E=0;E<a;E++)y.push(this.atoms[E]);return y}findAtom(a,y=0,b="forward"){let E;const ee=this.lastOffset;if(b==="forward"){for(let re=y;re<=ee;re++)if(E=this.atoms[re],a(E))return E;for(let re=0;re<y;re++)if(E=this.atoms[re],a(E))return E;return}for(let re=y;re>=0;re--)if(E=this.atoms[re],a(E))return E;for(let re=ee;re>y;re--)if(E=this.atoms[re],a(E))return E}extractAtoms(a){let y=this.getAtoms(a);if(y.length===1&&!y[0].parent)if(y[0].type==="root")y=[...y[0].body],y.shift();else return y=this.root.cells.flat(),this.root=new Gn({type:"root",body:[]}),y;for(const b of y)b.parent.removeChild(b);return y}deleteAtoms(a){this.extractAtoms(a),this.position=a[0]}atomToString(a,y){const b=y!=null?y:"latex";if(b.startsWith("latex"))return Gn.serialize([a],{expandMacro:b==="latex-expanded",skipStyles:b==="latex-unstyled",skipPlaceholders:b==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(b==="math-ml")return Ua(a);if(b==="spoken")return Fu(a);if(b==="spoken-text"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const ee=Fu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}if(b==="spoken-ssml"||b==="spoken-ssml-with-highlighting"){const E=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const ee=Fu(a);return window.MathfieldElement.textToSpeechMarkup=E,ee}return b==="ascii-math"?_o(a):(console.error(`MathLive 0.98.5: Unexpected format "${b}`),"")}getValue(a,y,b){if(a===void 0)return this.atomToString(this.root,"latex");if(typeof a=="string"&&a!=="math-json")return this.atomToString(this.root,a);let E,ee;if(gl(a)&&gl(y)?(E=[this.normalizeRange([a,y])],ee=b):xu(a)?(E=[this.normalizeRange(a)],ee=y):wu(a)?(E=a.ranges,ee=y):(E=[this.normalizeRange([0,-1])],ee=a),ee!=null||(ee="latex"),ee==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
|
|
|
Load the library, for example with:
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const re=this.getValue({ranges:E},"latex-unstyled");try{const ae=window.MathfieldElement.computeEngine.parse(re);return JSON.stringify(ae.json)}catch(ae){return JSON.stringify(["Error",`'${ae.toString()}'`])}}if(ee.startsWith("latex")){const re={expandMacro:ee==="latex-expanded",skipStyles:ee==="latex-unstyled",skipPlaceholders:ee==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ya(E.map(ae=>Gn.serialize(this.getAtoms(ae),re)))}return E.map(re=>this.getAtoms(re).map(ae=>this.atomToString(ae,ee)).join("")).join("")}extendSelectionTo(a,y){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const b=this.normalizeRange([a,y]);let[E,ee]=b,{parent:re}=this.at(ee);if(re&&(re.type==="genfrac"||re.type==="subsup"))for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),re=re.parent;for(re=this.at(E).parent;re!==this.root&&Jh(this,re,[E,ee]);)E=this.offsetOf(re.leftSibling),re=re.parent;if(re=this.at(ee).parent,(re==null?void 0:re.type)==="genfrac")for(;re!==this.root&&Jh(this,re,[E,ee]);)ee=this.offsetOf(re),console.assert(ee>=0),re=re.parent;this._position=this.normalizeOffset(y),this._selection={ranges:[[E,ee]],direction:"none"}})}announce(a,y,b=[]){var E,ee;((ee=(E=this.mathfield.host)==null?void 0:E.dispatchEvent(new CustomEvent("announce",{detail:{command:a,previousPosition:y,atoms:b},cancelable:!0,bubbles:!0,composed:!0})))!=null?ee:!0)&&i1(this.mathfield,a,y,b)}deferNotifications(a,y){const b=this._selection,E=this._anchor,ee=this._position,re=this.silenceNotifications;this.silenceNotifications=!0;const ae=this.root.changeCounter;y();const fe=this.root.changeCounter!==ae,ge=E!==this._anchor||ee!==this._position||Pc(this._selection,b)==="different";return this.silenceNotifications=re,a.content&&fe&&this.contentDidChange({inputType:a.type}),a.selection&&ge&&this.selectionDidChange(),fe||ge}normalizeOffset(a){return a>0?a=Math.min(a,this.lastOffset):a<0&&(a=this.lastOffset+a+1),a}normalizeRange(a){let[y,b]=a;return y=this.normalizeOffset(y),b=this.normalizeOffset(b),y<b?[y,b]:[b,y]}normalizeSelection(a,y){var b;let E;if(gl(a)){const ee=this.normalizeOffset(a);if(gl(y)){const re=this.normalizeOffset(y);E=ee<=re?{ranges:[[ee,re]],direction:"none"}:{ranges:[[re,ee]],direction:"backward"}}else E={ranges:[[ee,ee]],direction:"none"}}else if(xu(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 wu(a)&&(E={ranges:a.ranges.map(ee=>this.normalizeRange(ee)),direction:(b=a.direction)!=null?b:"none"});return console.assert(E!==void 0),E}get parentEnvironment(){let a=this.at(this.position).parent;if(a){for(;a.parent&&a.type!=="array";)a=a.parent;if(a.type==="array")return a}}get cell(){var a;let y=this.at(this.position);if(y){for(;y&&((a=y.parent)==null?void 0:a.type)!=="array";)y=y.parent;if(!(!(y!=null&&y.parent)||y.parent.type!=="array"))return y.parentBranch}}contentWillChange(a={}){if(this.silenceNotifications||!this.mathfield)return!0;const y=this.silenceNotifications;this.silenceNotifications=!0;const b=this.mathfield.onContentWillChange(a);return this.silenceNotifications=y,b}contentDidChange(a){var y;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const b=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",me(xe({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",bubbles:!0,composed:!0}))),this.silenceNotifications=b}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this.mathfield)),this.silenceNotifications))return;const a=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=a}};function mp(a,y,b,E){const ee=a.offsetOf(y);if(ee<b||ee>E)return!1;if(!y.hasChildren)return!0;const re=a.offsetOf(y.firstChild);if(re>=b&&re<=E){const ae=a.offsetOf(y.lastChild);if(ae>=b&&ae<=E)return!0}return!1}function Jh(a,y,b){if(!(y!=null&&y.hasChildren))return!1;const[E,ee]=b,re=a.offsetOf(y.firstChild),ae=a.offsetOf(y.lastChild);return re>=E&&re<=ee&&ae>=re&&ae<=ee}function Kd(a,y,b,E){var ee,re,ae,fe,ge,be;const Me=b.parent;if(Me&&b instanceof Wa){const Ne=!E&&y==="forward"||E==="body"&&y==="backward";let et=Ne?a.offsetOf(b.firstChild):a.offsetOf(b.lastChild);return Ne?b.rightDelim!=="?"&&b.rightDelim!=="."?(b.leftDelim=".",b.isDirty=!0):(Me.addChildrenAfter(b.removeBranch("body"),b),Me.removeChild(b),et--):b.leftDelim!=="?"&&b.leftDelim!=="."?(b.rightDelim=".",b.isDirty=!0):(Me.addChildrenAfter(b.removeBranch("body"),b),Me.removeChild(b),et--),a.position=et,!0}if(Me&&b.type==="surd"){if(y==="forward"&&!E||y==="backward"&&E==="body"){const Ne=b.leftSibling;b.hasChildren&&Me.addChildrenAfter(b.removeBranch("body"),b),Me.removeChild(b),a.position=a.offsetOf(Ne)}else y==="forward"&&E==="body"?a.position=a.offsetOf(b):!E&&y==="backward"?b.hasChildren?a.position=a.offsetOf(b.lastChild):(a.position=Math.max(0,a.offsetOf(b)-1),Me.removeChild(b)):E==="above"&&(b.hasEmptyBranch("above")&&b.removeBranch("above"),y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b.body[0]));return!0}if(Me&&(b.type==="box"||b.type==="enclose")){const Ne=E&&y==="backward"||!E&&y==="forward"?b.leftSibling:b.lastChild;return Me.addChildrenAfter(b.removeBranch("body"),b),Me.removeChild(b),a.position=a.offsetOf(Ne),!0}if(b.type==="genfrac"||b.type==="overunder"){if(!E)return b.type==="overunder"&&b.hasEmptyBranch("body")||b.type==="genfrac"&&b.hasEmptyBranch("below")&&b.hasEmptyBranch("above")?!1:(a.position=a.offsetOf(y==="forward"?b.firstChild:b.lastChild),!0);const Ne=Hd.fractionNavigationOrder==="numerator-denominator"?"above":"below",et=Ne==="above"?"below":"above";if(Me&&(y==="forward"&&E===Ne||y==="backward"&&E===et)){const xt=b.removeBranch(Ne),It=b.removeBranch(et);return Me.addChildrenAfter([...xt,...It],b),Me.removeChild(b),a.position=a.offsetOf(xt.length>0?xt[xt.length-1]:It[0]),!0}return y==="backward"?a.position=a.offsetOf(b.leftSibling):a.position=a.offsetOf(b),!0}if(b.isExtensibleSymbol||b.type==="subsup"){if(!E&&y==="forward")return!1;if(!E){if(b.subscript||b.superscript){const Ne=y==="forward"?(ae=(ee=b.superscript)==null?void 0:ee[0])!=null?ae:(re=b.subscript)==null?void 0:re[0]:(be=(fe=b.subscript)==null?void 0:fe[0].lastSibling)!=null?be:(ge=b.superscript)==null?void 0:ge[0].lastSibling;return Ne&&(a.position=a.offsetOf(Ne)),!0}return!1}if(!b.hasChildren&&b.type==="subsup"){const Ne=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);return b.parent.removeChild(b),a.position=Ne,!0}if(E==="superscript")if(y==="backward"){const Ne=a.offsetOf(b.firstChild)-1;console.assert(Ne>=0),a.position=Ne}else b.subscript?a.position=a.offsetOf(b.subscript[0]):a.position=a.offsetOf(b);else E==="subscript"&&(y==="backward"&&b.superscript?a.position=a.offsetOf(b.superscript[0].lastSibling):y==="backward"?a.position=a.offsetOf(b.firstChild)-1:a.position=a.offsetOf(b));if(E&&b.hasEmptyBranch(E)&&(b.removeBranch(E),b.type==="subsup"&&!b.subscript&&!b.superscript)){const Ne=y==="forward"?a.offsetOf(b):Math.max(0,a.offsetOf(b)-1);b.parent.removeChild(b),a.position=Ne}return!0}if((Me==null?void 0:Me.type)==="genfrac"&&!E&&b.type!=="first"){let Ne=a.offsetOf(b.leftSibling);return Me.removeChild(b),Me.hasEmptyBranch("above")&&Me.hasEmptyBranch("below")?(Ne=a.offsetOf(Me.leftSibling),Me.parent.removeChild(Me),a.announce("delete",void 0,[Me]),a.position=Ne,!0):(a.announce("delete",void 0,[b]),a.position=Ne,!0)}if(y==="backward"&&((Me==null?void 0:Me.command)==="\\ln"||(Me==null?void 0:Me.command)==="\\log")&&b.parentBranch!=="body"){const Ne=a.offsetOf(Me.leftSibling);return Me.parent.removeChild(Me),a.announce("delete",void 0,[Me]),a.position=Ne,!0}return!1}function l1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentBackward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let y=a.at(a.position);if(!(y&&Kd(a,"backward",y))){if(y!=null&&y.isFirstSibling){if(Kd(a,"backward",y.parent,y.parentBranch))return;y=null}if(!y){a.announce("plonk");return}a.position=a.offsetOf(y.leftSibling),y.parent.removeChild(y),a.announce("delete",void 0,[y])}}):kl(a,Vo(a.selection),"deleteContentBackward")}function c1(a){return!a.mathfield.isSelectionEditable||!a.contentWillChange({inputType:"deleteContentForward"})?!1:a.selectionIsCollapsed?a.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var y,b;let E=a.at(a.position).rightSibling;if(E&&Kd(a,"forward",E))return;if(E){if(a.at(a.position).isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return}else{if(E=a.at(a.position),E.isLastSibling&&Kd(a,"forward",E.parent,E.parentBranch))return;E=void 0}if(a.position===a.lastOffset||!E){a.announce("plonk");return}E.parent.removeChild(E);let ee=(y=a.at(a.position))==null?void 0:y.rightSibling;for(;(ee==null?void 0:ee.type)==="subsup";)ee.parent.removeChild(ee),ee=(b=a.at(a.position))==null?void 0:b.rightSibling;a.announce("delete",void 0,[E])}):kl(a,Vo(a.selection),"deleteContentForward")}function kl(a,y,b){const E=a.getAtoms(y);if(E.length>0&&E[0].parent){let ee=E[0].parent.firstChild;ee.type==="first"&&(ee=ee.rightSibling);const re=E[E.length-1].parent.lastChild;let ae=E[0];ae.type==="first"&&(ae=ae.rightSibling);const fe=E[E.length-1];if(ae===ee&&fe===re){const ge=E[0].parent;ge.parent&&ge.type!=="prompt"&&(y=[a.offsetOf(ge.leftSibling),a.offsetOf(ge)])}if(E.length===1&&E[0].type==="placeholder"&&E[0].parent.type==="genfrac"){const ge=E[0].parent,be=E[0].parentBranch==="below"?"above":"below",Me=a.offsetOf(ge.leftSibling);return a.deferNotifications({content:!0,selection:!0,type:b},()=>{var Ne,et;const xt=ge.removeBranch(be);if(xt.length===1&&xt[0].type==="placeholder")(et=ge.parent)==null||et.removeChild(ge),a.position=Math.max(0,Me);else{const It=ge.parent.addChildrenAfter(xt,ge);(Ne=ge.parent)==null||Ne.removeChild(ge),a.position=a.offsetOf(It)}})}}return a.deferNotifications({content:!0,selection:!0,type:b},()=>a.deleteAtoms(y))}Ls({deleteAll:a=>a.contentWillChange({inputType:"deleteContent"})&&kl(a,[0,-1],"deleteContent"),deleteForward:a=>c1(a),deleteBackward:a=>l1(a),deleteNextWord:a=>a.contentWillChange({inputType:"deleteWordForward"})&&kl(a,[a.anchor,_h(a,a.position,"forward")],"deleteWordForward"),deletePreviousWord:a=>a.contentWillChange({inputType:"deleteWordBackward"})&&kl(a,[a.anchor,_h(a,a.position,"backward")],"deleteWordBackward"),deleteToGroupStart:a=>a.contentWillChange({inputType:"deleteSoftLineBackward"})&&kl(a,[a.anchor,a.offsetOf(a.at(a.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:a=>a.contentWillChange({inputType:"deleteSoftLineForward"})&&kl(a,[a.anchor,a.offsetOf(a.at(a.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:a=>a.contentWillChange({inputType:"deleteHardLineBackward"})&&kl(a,[a.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:a=>a.contentWillChange({inputType:"deleteHardLineForward"})&&kl(a,[a.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var u1=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${ct("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="${ct("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,f1=class{constructor(a,y){this.focusBlurInProgress=!1;var b,E,ee;this.options=xe(me(xe({},Rf()),{macros:cr(),registers:oc()}),Of(y)),this.eventController=new AbortController;const re=this.eventController.signal;y.eventSink&&(this.host=y.eventSink),this.element=a,a.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let ae=(E=(b=y.value)!=null?b:this.element.textContent)!=null?E:"";ae=ae.trim();const fe=A0(this.options),ge=new Gn({type:"root",mode:fe,body:Xo(ae,{context:this.context})});this.model=new s1(this,fe,ge),this.undoManager=new $g(this.model);const be=[];if(be.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),be.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),be.push("<span part=content class=ML__content>"),be.push(w0(this)),be.push("</span>"),window.mathVirtualKeyboard&&(be.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),be.push(u1),be.push("</div>")),be.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),be.push(d1),be.push("</div>"),be.push("</span>"),be.push("<span class=ML__sr-only>"),be.push("<span role=status aria-live=assertive aria-atomic=true></span>"),be.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(be.join("")),!this.element.children){console.error("%cMathLive 0.98.5: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=tt.subscribe(()=>tt.update(this.element)),tt.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",Ne=>Ne.stopImmediatePropagation(),{capture:!1,signal:re}),this.field.addEventListener("wheel",this,{passive:!1,signal:re}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:re}):this.field.addEventListener("mousedown",this,{signal:re}),(ee=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||ee.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(El(this)))},{signal:re}),this._menu=new Sv(Jv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:re});const Me=this.element.querySelector("[part=menu-toggle]");Me==null||Me.addEventListener("pointerdown",Ne=>{if(Ne.currentTarget!==Me||this._menu.state!=="closed")return;this.element.classList.add("tracking");const et=Me.getBoundingClientRect();this._menu.modifiers=$c(Ne),this._menu.show({target:Me,location:{x:et.left,y:et.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),Ne.preventDefault(),Ne.stopPropagation()},{signal:re}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(Me.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Hm(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:re}),document.addEventListener("scroll",this,{signal:re}),this.resizeObserver=new ResizeObserver(()=>Eo(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:re}),kd&&!tt.locale.startsWith(kd.locale)&&Nm(tt.locale),Ns!=="ready"&&document.fonts.ready.then(()=>Af(this)),a.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(a){this._defaultStyle=a}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const a=this.model.at(this.model.position),y=this.adoptStyle==="right"?a.rightSibling:a;if(!y)return this.defaultStyle;if(y.type==="group"){const b=y.branch("body");return!b||b.length<2?{}:this.adoptStyle==="right"?b[1].computedStyle:b[b.length-1].computedStyle}return y.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),Vf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Nh())}showMenu(a){var y,b;const E=(b=(y=a==null?void 0:a.location)!=null?y:bl(this.field))!=null?b:void 0,ee=a==null?void 0:a.modifiers,re=this.element.querySelector("[part=container]");return this._menu.show({target:re,location:E,modifiers:ee})}get colorMap(){return a=>{var y,b,E;return(E=(b=(y=this.options).colorMap)==null?void 0:b.call(y,a))!=null?E:kt(a)}}get backgroundColorMap(){return a=>{var y,b,E,ee,re,ae;return(ae=(re=(b=(y=this.options).backgroundColorMap)==null?void 0:b.call(y,a))!=null?re:(ee=(E=this.options).colorMap)==null?void 0:ee.call(E,a))!=null?ae:Xe(a)}}get smartFence(){var a;return(a=this.options.smartFence)!=null?a:!1}get readOnly(){var a;return(a=this.options.readOnly)!=null?a:!1}get disabled(){var a,y;return(y=(a=this.host)==null?void 0:a.disabled)!=null?y:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const a=getComputedStyle(this.host);return a.getPropertyValue("user-select")||a.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(a=>a.type==="prompt"&&!a.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const a=this.model.at(this.model.anchor),y=this.model.at(this.model.position),b=Gn.commonAncestor(a,y);return!!((b==null?void 0:b.type)==="prompt"||b!=null&&b.parentPrompt)}get letterShapeStyle(){var a;return(a=this.options.letterShapeStyle)!=null?a:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const a=this.model.getAtoms(this.model.selection);if(a.length===0)return{};const y=xe({},a[0].style);for(const b of a)for(const[E,ee]of Object.entries(b.style))y[E]!==ee&&delete y[E];return y}queryStyle(a){const y=Ph(this,a);"verbatimColor"in y&&delete y.verbatimColor,"verbatimBackgroundColor"in y&&delete y.verbatimBackgroundColor;const b=Object.keys(y).length;if(b===0)return"all";if(b>1){for(const ge of Object.keys(y)){const be=this.queryStyle({[ge]:y[ge]});if(be==="none")return"none";if(be==="some")return"some"}return"all"}const E=Object.keys(y)[0],ee=y[E];if(this.model.selectionIsCollapsed)return this.effectiveStyle[E]===ee?"all":"none";const re=this.model.getAtoms(this.model.selection,{includeChildren:!0});let ae=re.length;if(ae===0)return"none";let fe=0;for(const ge of re){if(ge.type==="first"){ae-=1;continue}ge.style[E]===ee&&(fe+=1)}return fe===0?"none":fe===ae?"all":"some"}get keybindings(){var a,y;if(this._keybindings)return this._keybindings;const[b,E]=Vm(this.options.keybindings,(a=_d())!=null?a:Fm());return((y=_d())==null?void 0:y.score)>0&&(this._keybindings=b,E.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",E)),b}get menu(){return this._menu}setOptions(a){var y;this.options=xe(xe({},this.options),Of(a)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let b=this.options.defaultMode;b==="inline-math"&&(b="math"),((y=this.model.root.firstChild)==null?void 0:y.mode)!==b&&(this.model.root.firstChild.mode=b),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const E=Gn.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in a||this.model.getValue()!==E)&&ia.insert(this.model,E,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in a||"macros"in a||"registers"in a||"colorMap"in a||"backgroundColorMap"in a||"letterShapeStyle"in a||"minFontScale"in a||"readOnly"in a||"placeholderSymbol"in a)&&Eo(this)}getOptions(a){return zc(this.options,a)}getOption(a){return zc(this.options,a)}handleEvent(a){return gc(this,null,function*(){var y;if(Rs(this)){if(Ch(a)){if(!yd(a.origin,(y=this.options.originValidator)!=null?y:"none"))throw new DOMException(`Message from unknown origin (${a.origin}) cannot be handled`,"SecurityError");const{action:b}=a.data;if(b==="execute-command"){const E=a.data.command;if(Iu(E)==="virtual-keyboard")return;this.executeCommand(E)}else b==="update-state"||(b==="focus"?this.focus({preventScroll:!0}):b==="blur"&&this.blur());return}switch(a.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&U0(this,a);break;case"pointerdown":this.userSelect!=="none"&&(U0(this,a),a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop());break;case"contextmenu":this.userSelect!=="none"&&a.shiftKey===!1&&(yield ip(a,this.element.querySelector("[part=container]"),this._menu))&&Wf.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Vf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rs(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>Rs(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(a);break;default:console.warn("Unexpected event type",a.type)}}})}dispose(){if(!Rs(this))return;tt.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const a=this.element;delete a.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,Gg(),Qm(),mv()}flushInlineShortcutBuffer(a){if(a!=null||(a={defer:!1}),!a.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(a){return Iu(a)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(a),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(El(this))),!1):og(this,a)}get errors(){return t0(this.model.getValue(),{context:this.context})}getValue(a,y,b){return this.model.getValue(a,y,b)}setValue(a,y){var b;y=y!=null?y:{mode:"math"},y.insertionMode===void 0&&(y.insertionMode="replaceAll"),(y.format===void 0||y.format==="auto")&&(y.format="latex"),(y.mode===void 0||y.mode==="auto")&&(y.mode=(b=ah(this.model,this.model.position))!=null?b:"math");const E=this.undoManager.canUndo();ia.insert(this.model,a,y)&&(Eo(this),E||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const a=window.MathfieldElement.computeEngine;return a?a.box(a.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var a;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const E=window.mathVirtualKeyboard.boundingRect,ee=this.host.getBoundingClientRect();ee.bottom>E.top&&((a=window.document.scrollingElement)==null||a.scrollBy(0,ee.bottom-E.top+8))}}this.dirty&&Nc(this,{interactive:!0});const y=this.field.getBoundingClientRect();let b=null;if(this.model.selectionIsCollapsed)b=bl(this.field);else{const E=vd(this);if(E.length>0){let ee=-1/0,re=-1/0;for(const ae of E)ae.right>ee&&(ee=ae.right),ae.top<re&&(re=ae.top);b={x:ee+y.left-this.field.scrollLeft,y:re+y.top-this.field.scrollTop,height:0}}}if(this.host&&b){const E=this.host.getBoundingClientRect(),ee=b.y;let re=this.host.scrollTop;ee<E.top?re=ee-E.top+this.host.scrollTop:ee>E.bottom&&(re=ee-E.bottom+this.host.scrollTop+b.height),this.host.scroll({top:re,left:0})}if(b){const E=b.x-window.scrollX;let ee=this.field.scrollLeft;E<y.left?ee=E-y.left+this.field.scrollLeft-20:E>y.right&&(ee=E-y.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:ee})}}insert(a,y){return typeof a!="string"||a.length===0&&((y==null?void 0:y.insertionMode)==="insertBefore"||(y==null?void 0:y.insertionMode)==="insertAfter")||a.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),y=y!=null?y:{mode:"math"},y.focus&&this.focus(),y.feedback&&(window.MathfieldElement.keypressVibration&&Je()&&navigator.vibrate(S0),window.MathfieldElement.playSound("keypress")),a==="\\\\"?T0(this.model):a==="&"?I0(this.model):this.model.selectionIsCollapsed?ia.insert(this.model,a,xe({style:this.model.at(this.model.position).computedStyle},y)):ia.insert(this.model,a,y),this.snapshot(`insert-${this.model.at(this.model.position).type}`),Eo(this),y.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(a,y="",b=""){var E;if(this.model.mode===a||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const ee=this.model.mode;if(this.model.mode=a,!((E=this.host)!=null&&E.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=ee;return}const re=this.model.mode,{model:ae}=this;ae.deferNotifications({content:!!b||!!y,selection:!0,type:"insertText"},()=>{let fe=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),y&&a!=="latex"){const ge=Xo(y,{context:this.context,parseMode:a});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),fe=!0}if(this.model.mode=a,a==="latex"){let ge=ae.selectionIsCollapsed;Au(this,"accept");let be,Me=ae.at(ae.position);if(ge)be="\\";else{const et=Vo(ae.selection);be=this.model.getValue(et,"latex");const xt=this.model.extractAtoms(et);xt.length===1&&xt[0].type==="placeholder"&&(be=y,ge=!0),Me=ae.at(et[0])}const Ne=new xd(be);Me.parent.addChildAfter(Ne,Me),ge?ae.position=ae.offsetOf(Ne.lastChild):ae.setSelection(ae.offsetOf(Ne.firstChild),ae.offsetOf(Ne.lastChild))}else Ld(ae).forEach(ge=>{ge.isError=!1});if(b){const ge=Xo(b,{context:this.context,parseMode:re});ae.collapseSelection("forward");const be=ae.at(ae.position);ae.position=ae.offsetOf(be.parent.addChildrenAfter(ge,be)),fe=!0}return Eo(this),this.undoManager.snapshot(a==="latex"?"insert-latex":"insert"),fe}),this.model.mode=a,window.mathVirtualKeyboard.update(El(this))}hasFocus(){return!this.blurred}focus(a){var y;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(y=a==null?void 0:a.preventScroll)!=null&&y||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(a,y={}){var b,E;const ee={operation:"set",silenceNotifications:!1};xu(y)?ee.range=y:(y.operation==="toggle"&&(ee.operation="toggle"),ee.range=y.range,ee.silenceNotifications=(b=y.silenceNotifications)!=null?b:!1);const re=Ph(this,a),ae=(E=ee.operation)!=null?E:"set";if(ee.range===void 0&&this.model.selectionIsCollapsed){if(ae==="set"){this.defaultStyle=xe(xe({},this.defaultStyle),re);return}const fe=xe({},this.defaultStyle);for(const ge of Object.keys(re))fe[ge]===re[ge]?(ge==="color"&&delete fe.verbatimColor,ge==="backgroundColor"&&delete fe.verbatimBackgroundColor,delete fe[ge]):fe[ge]=re[ge];this.defaultStyle=fe;return}this.model.deferNotifications({content:!ee.silenceNotifications,type:"insertText"},()=>{if(ee.range===void 0)for(const fe of this.model.selection.ranges)Mh(this.model,fe,re,{operation:ae});else Mh(this.model,ee.range,re,{operation:ae})}),Eo(this)}toggleContextMenu(){var a;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(a=this.getCaretPoint())!=null?a:void 0,onDismiss:()=>{var y;return(y=this.element)==null?void 0:y.focus()}}),!0):!1}getCaretPoint(){const a=bl(this.field);return a?{x:a.x,y:a.y}:null}setCaretPoint(a,y){const b=Bd(this,a,y,{bias:0});if(b<0)return!1;const E=this.model.position;return this.model.position=b,this.model.announce("move",E),Eo(this),!0}getPrompt(a){const y=this.model.findAtom(b=>b.type==="prompt"&&b.placeholderId===a);return console.assert(y!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),y}getPromptValue(a,y){const b=this.getPrompt(a);if(!b)return"";const E=this.model.offsetOf(b.firstChild),ee=this.model.offsetOf(b.lastChild);return this.model.getValue(E,ee,y)}getPrompts(a){return this.model.getAllAtoms().filter(y=>y.type!=="prompt"?!1:a?!(a.id&&y.placeholderId!==a.id||a.locked&&y.locked!==a.locked||a.correctness==="undefined"&&y.correctness||a.correctness&&y.correctness!==a.correctness):!0).map(y=>y.placeholderId)}setPromptValue(a,y,b){if(y!==void 0){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}const ee=this.model.getBranchRange(this.model.offsetOf(E),"body");this.model.setSelection(ee),this.insert(y,me(xe({},b),{insertionMode:"replaceSelection"}))}b!=null&&b.silenceNotifications&&(this.valueOnFocus=this.getValue()),Eo(this)}setPromptState(a,y,b){const E=this.getPrompt(a);if(!E){console.error(`MathLive 0.98.5: unknown prompt ${a}`);return}y==="undefined"?E.correctness=void 0:typeof y=="string"&&(E.correctness=y),typeof b=="boolean"&&(E.locked=b,E.captureSelection=b),Eo(this)}getPromptState(a){const y=this.getPrompt(a);return y?[y.correctness,y.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[void 0,!0])}getPromptRange(a){const y=this.getPrompt(a);return y?this.model.getBranchRange(this.model.offsetOf(y),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${a}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(a){var y;this.undoManager.snapshot(a)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(y=this.host)==null||y.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var a;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var a;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),(a=this.host)==null||a.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var a;(a=this.undoManager)==null||a.reset()}onSelectionDidChange(){var a,y;const b=this.model;this.keyboardDelegate.setValue(b.getValue(this.model.selection,"latex-expanded"));{const E=b.at(b.position),ee=(a=E.mode)!=null?a:A0(this.options);this.model.mode!==ee&&(this.model.mode==="latex"?(Au(this,"accept",{mode:ee}),b.position=b.offsetOf(E)):this.switchMode(ee))}(y=this.host)==null||y.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(El(this)),Vf(this)}onContentWillChange(a){var y,b,E;return(E=(b=this.host)==null?void 0:b.dispatchEvent(new InputEvent("beforeinput",me(xe({},a),{data:a.data?a.data:(y=a.inputType)!=null?y:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?E:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),Nc(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var a,y,b;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",Tu(this),this.model.getValue()!==this.valueOnFocus&&((a=this.host)==null||a.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(y=this.host)==null||y.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(b=this.host)==null||b.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),Eo(this),this.focusBlurInProgress=!1,Nh();const E=new AbortController,ee=E.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{Rs(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:ee})},{once:!0,signal:ee}),setTimeout(()=>E.abort(),100)}onInput(a){Th(this,a)}onKeystroke(a){return K0(this,a)}onCompositionStart(a){this.model.deleteAtoms(Vo(this.model.selection));const y=bl(this.field);y&&requestAnimationFrame(()=>{Nc(this),this.keyboardDelegate.moveTo(y.x,y.y-y.height)})}onCompositionUpdate(a){Lg(this.model,a),Eo(this)}onCompositionEnd(a){Ag(this.model),Th(this,a,{simulateKeystroke:!0})}onCut(a){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),ia.onCopy(this,a),kl(this.model,Vo(this.model.selection),"deleteByCut"),this.snapshot("cut"),Eo(this))}onCopy(a){ia.onCopy(this,a)}onPaste(a){let y=this.isSelectionEditable;return y&&(y=ia.onPaste(this.model.at(this.model.position).mode,this,a.clipboardData)),y||this.model.announce("plonk"),a.preventDefault(),a.stopPropagation(),y}onGeometryChange(){this._menu.hide(),kf(this),Vf(this)}onWheel(a){const y=5*a.deltaX;if(!Number.isFinite(y)||y===0)return;const b=this.field;y<0&&b.scrollLeft===0||y>0&&b.offsetWidth+b.scrollLeft>=b.scrollWidth||(b.scrollBy({top:0,left:y}),a.preventDefault(),a.stopPropagation())}getHTMLElement(a){let y=a;for(;!y.id&&y.hasChildren;)y=a.children[0];return this.field.querySelector(`[data-atom-id="${y.id}"]`)}get context(){var a,y;return{registers:(a=this.options.registers)!=null?a:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(y=this.options.placeholderSymbol)!=null?y:"\u25A2",colorMap:b=>this.colorMap(b),backgroundColorMap:b=>this.backgroundColorMap(b),getMacro:b=>Fn(b,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function gp(a){if(a&&(a.classList.remove("ML__highlight"),a.children))for(const y of a.children)gp(y)}function Qh(a,y){var b;a&&(!y||((b=a.dataset)==null?void 0:b.atomId)===y?(a.classList.add("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E)})):(a.classList.remove("ML__highlight"),a.children&&a.children.length>0&&[...a.children].forEach(E=>{E instanceof HTMLElement&&Qh(E,y)})))}function h1(a,y){var b;if(!ft())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(y);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const E=new window.AWS.Polly({apiVersion:"2016-06-10"}),ee={OutputFormat:"json",VoiceId:(b=window.MathfieldElement.speechEngineVoice)!=null?b:"Joanna",Engine:"standard",Text:y,TextType:"ssml",SpeechMarkTypes:["ssml"]};mc().readAloudElement=a,E.synthesizeSpeech(ee,(re,ae)=>{if(re){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${re}`);return}if(!(ae!=null&&ae.AudioStream)){console.log("polly.synthesizeSpeech():",ae);return}const fe=new TextDecoder("utf-8").decode(new Uint8Array(ae.AudioStream));mc().readAloudMarks=fe.split(`
|
|
|
`).map(ge=>ge?JSON.parse(ge):{}),mc().readAloudTokens=[];for(const ge of mc().readAloudMarks)ge.value&&mc().readAloudTokens.push(ge.value);mc().readAloudCurrentMark="",ee.OutputFormat="mp3",ee.SpeechMarkTypes=[],E.synthesizeSpeech(ee,(ge,be)=>{if(ge){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${y}") error:${ge}`);return}if(!(be!=null&&be.AudioStream))return;const Me=new Uint8Array(be.AudioStream),Ne=new Blob([Me.buffer],{type:"audio/mpeg"}),et=URL.createObjectURL(Ne),xt=mc();xt.readAloudAudio?xt.readAloudAudio.pause():(xt.readAloudAudio=new Audio,xt.readAloudAudio.addEventListener("ended",()=>{const It=xt.readAloudMathfield;xt.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),It?(Nc(It),xt.readAloudElement=null,xt.readAloudMathfield=null,xt.readAloudTokens=[],xt.readAloudMarks=[],xt.readAloudCurrentMark=""):gp(xt.readAloudElement)}),xt.readAloudAudio.addEventListener("timeupdate",()=>{let It="";const In=xt.readAloudAudio.currentTime*1e3+100;for(const _r of xt.readAloudMarks)_r.time<In&&(It=_r.value);xt.readAloudCurrentMark!==It&&(xt.readAloudCurrentToken=It,It&&It===xt.readAloudFinalToken?xt.readAloudAudio.pause():(xt.readAloudCurrentMark=It,Qh(xt.readAloudElement,xt.readAloudCurrentMark)))})),xt.readAloudAudio.src=et,xt.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),xt.readAloudAudio.play()})})}ft()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var Ba=new WeakMap,p1=.5,pc={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},rs=class Gc extends HTMLElement{static get formAssociated(){return Hu()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(y){y!==this._fontsDirectory&&(this._fontsDirectory=y,ng())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(y){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(y){this._soundsDirectory=y,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(y){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(y){var b,E,ee;this.audioBuffers={},y===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof y=="string"?this._keypressSound={spacebar:y,return:y,delete:y,default:y}:typeof y=="object"&&"default"in y&&(this._keypressSound={spacebar:(b=y.spacebar)!=null?b:y.default,return:(E=y.return)!=null?E:y.default,delete:(ee=y.delete)!=null?ee:y.default,default:y.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(y){this.audioBuffers={},this._plonkSound=y}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(y){this._speechEngine=y}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(y){this._speechEngineRate=y}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(y){this._speechEngineVoice=y}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(y){this._textToSpeechMarkup=y}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(y){this._textToSpeechRules=y}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(y){this._textToSpeechRulesOptions=y}static get locale(){return tt.locale}static set locale(y){y==="auto"&&(y=navigator.language.slice(0,5)),tt.locale=y}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(y){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return tt.strings}static set strings(y){tt.merge(y)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(y){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(y){this._decimalSeparator=y,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(y){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var y,b;if(this._computeEngine===void 0){const E=(y=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:y.ComputeEngine;if(!E)return null;this._computeEngine=new E,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(b=this._computeEngine)!=null?b:null}static set computeEngine(y){this._computeEngine=y}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(y){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(y){this._isFunction=y}static loadSound(y){return gc(this,null,function*(){delete this.audioBuffers[y];let b="";switch(y){case"keypress":b=this._keypressSound.default;break;case"return":b=this._keypressSound.return;break;case"spacebar":b=this._keypressSound.spacebar;break;case"delete":b=this._keypressSound.delete;break;case"plonk":b=this.plonkSound;break}if(typeof b!="string")return;b=b.trim();const E=this.soundsDirectory;if(!(E==null||E==="null"||b==="none"||b==="null"))try{const re=yield(yield fetch(yield x0(`${E}/${b}`))).arrayBuffer(),ae=yield this.audioContext.decodeAudioData(re);this.audioBuffers[y]=ae}catch(ee){}})}static playSound(y){return gc(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[y]||(yield this.loadSound(y)),!this.audioBuffers[y])return;const b=this.audioContext.createBufferSource();b.buffer=this.audioBuffers[y];const E=this.audioContext.createGain();E.gain.value=p1,b.connect(E).connect(this.audioContext.destination),b.start()})}constructor(y){if(super(),y){const b=[];for(const E of Object.keys(y))if(pc[E])if(pc[E].startsWith("mf."))if(pc[E].startsWith(`mf.${E}`))b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pc[E]}`);else{const ee=pc[E].match(/([a-zA-Z]+) =/);b.push(`Option \`${E}\` has been renamed \`${ee[1]}\``)}else b.push(`Option \`${E}\` cannot be used as a constructor option. Use ${pc[E]}`);if(b.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const E of b)console.warn(E);console.groupEnd()}}if(Hu()&&(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=[uc("core"),uc("mathfield"),uc("mathfield-element"),uc("ui"),uc("menu")],this.shadowRoot.appendChild(document.createElement("span"));const b=document.createElement("slot");b.style.display="none",this.shadowRoot.appendChild(b)}else this.shadowRoot.innerHTML="<style>"+Hl("core")+Hl("mathfield")+Hl("mathfield-element")+Hl("ui")+Hl("menu")+'</style><span></span><slot style="display:none"></slot>';y&&this._setOptions(y),this.shadowRoot.addEventListener("slotchange",()=>{var b;const E=this.shadowRoot.querySelector("slot:not([name])");this.value=(b=E==null?void 0:E.assignedNodes().map(ee=>ee.nodeType===3?ee.textContent:"").join("").trim())!=null?b:""})}showMenu(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.showMenu(y))!=null?E:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",y=>{var b;y.target===this&&!((b=this._mathfield)!=null&&b.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:y.altKey,button:y.button,buttons:y.buttons,clientX:y.clientX,clientY:y.clientY,ctrlKey:y.ctrlKey,metaKey:y.metaKey,movementX:y.movementX,movementY:y.movementY,relatedTarget:y.relatedTarget,screenX:y.screenX,screenY:y.screenY,shiftKey:y.shiftKey}))},{once:!0})}getPromptValue(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.getPromptValue(y,b))!=null?ee:""}setPromptValue(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptValue(y,b,E)}getPromptRange(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptRange(y))!=null?E:null}getPrompts(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPrompts(y))!=null?E:[]}get form(){var y;return(y=this._internals)==null?void 0:y.form}get name(){var y;return(y=this.getAttribute("name"))!=null?y:""}get type(){return this.localName}get mode(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.mode)!=null?b:this.defaultMode==="text"?"text":"math"}set mode(y){var b;(b=this._mathfield)==null||b.switchMode(y)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(y){var b,E;if(!this._mathfield)return;const ee=(E=(b=Gc.computeEngine)==null?void 0:b.box(y).latex)!=null?E:null;ee!==null&&this._mathfield.setValue(ee),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.errors)!=null?b:[]}_getOptions(y){return this._mathfield?zc(this._mathfield.options,y):Ba.has(this)?xe({},zc(xe(xe({},Rf()),Of(Ba.get(this).options)),y)):null}getOptions(y){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?zc(this._mathfield.options,y):Ba.has(this)?zc(xe(xe({},Rf()),Of(Ba.get(this).options)),y):null}reflectAttributes(){const y=Rf(),b=this._getOptions();Object.keys(Gc.optionsAttributes).forEach(E=>{const ee=Zl(E);Gc.optionsAttributes[E]==="on/off"?y[ee]!==b[ee]?this.setAttribute(E,b[ee]?"on":"off"):this.removeAttribute(E):y[ee]!==b[ee]&&(Gc.optionsAttributes[E]==="boolean"?b[ee]?this.setAttribute(E,""):this.removeAttribute(E):(typeof b[ee]=="string"||typeof b[ee]=="number")&&this.setAttribute(E,b[ee].toString()))})}getOption(y){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([y])[y]}_getOption(y){return this._getOptions([y])[y]}_setOptions(y){if(this._mathfield)this._mathfield.setOptions(y);else if(Ba.has(this)){const b=xe(xe({},Ba.get(this).options),y);Ba.set(this,me(xe({},Ba.get(this)),{selection:{ranges:b.readOnly?[[0,0]]:[[0,-1]]},options:b}))}else Ba.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:y,menuItems:void 0});this.reflectAttributes()}setOptions(y){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const b of Object.keys(y))pc[b]&&console.warn(`\`mf.setOptions({${b}:...})\` -> ${pc[b]}`);console.groupEnd(),this._setOptions(y)}executeCommand(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.executeCommand(y))!=null?E:!1}getValue(y,b,E){var ee,re;if(this._mathfield)return this._mathfield.model.getValue(y,b,E);if(Ba.has(this)){let ae,fe,ge;if(wu(y)?([ae,fe]=y.ranges[0],ge=b):xu(y)?([ae,fe]=y,ge=b):gl(y)&&gl(b)?(ae=y,fe=b,ge=E):(ae=0,fe=-1,ge=y),(ge===void 0||ge==="latex")&&ae===0&&fe===-1)return(re=(ee=Ba.get(this).value)!=null?ee:this.textContent)!=null?re:""}return""}setValue(y,b){if(this._mathfield&&y!==void 0){b!=null||(b={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(y,b);return}if(Ba.has(this)){const ee=Ba.get(this).options;Ba.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:ee,menuItems:void 0});return}const E=Wd(this);Ba.set(this,{value:y,selection:{ranges:[[-1,-1]],direction:"forward"},options:E,menuItems:void 0})}hasFocus(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.hasFocus())!=null?b:!1}focus(){var y;(y=this._mathfield)==null||y.focus()}blur(){var y;(y=this._mathfield)==null||y.blur()}select(){var y;(y=this._mathfield)==null||y.select()}insert(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.insert(y,b))!=null?ee:!1}applyStyle(y,b){var E;return(E=this._mathfield)==null?void 0:E.applyStyle(y,b)}queryStyle(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.queryStyle(y))!=null?E:"none"}get caretPoint(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.getCaretPoint())!=null?b:null}set caretPoint(y){var b;y&&((b=this._mathfield)==null||b.setCaretPoint(y.x,y.y))}setCaretPoint(y,b){var E,ee;return(ee=(E=this._mathfield)==null?void 0:E.setCaretPoint(y,b))!=null?ee:!1}offsetFromPoint(y,b,E){return this._mathfield?Bd(this._mathfield,y,b,E):-1}hitboxFromOffset(y){if(!this._mathfield)return null;const b=this._mathfield.model.at(y);if(!b)return null;const E=lc(this._mathfield,b);return E?new DOMRect(E.left,E.top,E.right-E.left,E.bottom-E.top):null}resetUndo(){var y;(y=this._mathfield)==null||y.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(y){var b,E,ee,re;wl.state==="closed"&&((E=(b=this._mathfield)==null?void 0:b.menu)==null?void 0:E.state)==="closed"&&(y.type==="pointerdown"&&this.onPointerDown(),y.type==="focus"&&((ee=this._mathfield)==null||ee.focus()),y.type==="blur"&&((re=this._mathfield)==null||re.blur()))}connectedCallback(){var y,b,E,ee;const re=window.getComputedStyle(this),ae=this.shadowRoot,fe=re.userSelect!=="none";if(fe)ae.host.addEventListener("pointerdown",this,!0);else{const Me=ae.querySelector("span");Me.style.pointerEvents="none"}ae.host.addEventListener("focus",this,!0),ae.host.addEventListener("blur",this,!0),Hu()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),fe&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const ge=ae.querySelector("slot:not([name])");if(ge)try{this._style=ge.assignedElements().filter(Me=>Me.tagName.toLowerCase()==="style").map(Me=>Me.textContent).join("")}catch(Me){console.error(Me)}if(this._style){const Me=document.createElement("style");Me.textContent=this._style,ae.appendChild(Me)}let be="";if(this.hasAttribute("value")?be=this.getAttribute("value"):be=(y=ge==null?void 0:ge.assignedNodes().map(Me=>Me.nodeType===3?Me.textContent:"").join("").trim())!=null?y:"",this._mathfield=new f1(ae.querySelector(":host > span"),me(xe({},(E=(b=Ba.get(this))==null?void 0:b.options)!=null?E:Wd(this)),{eventSink:this,value:be})),!Ba.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const Me of Object.keys(Gc.optionsAttributes))this.upgradeProperty(Zl(Me))}if(!((ee=this._mathfield)!=null&&ee.model)){this._mathfield=null;return}if(Ba.has(this)){const Me=this._mathfield,Ne=Ba.get(this),et=Ne.menuItems;Me.model.deferNotifications({content:!1,selection:!1},()=>{const xt=Ne.value;xt!==void 0&&Me.setValue(xt),Me.model.selection=Ne.selection,Ba.delete(this)}),et&&(this.menuItems=et)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Lf()}disconnectedCallback(){var y,b;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const E=zc(this._mathfield.options,Object.keys(Gc.optionsAttributes).map(ee=>Zl(ee)));Ba.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(b=(y=this._mathfield.menu)==null?void 0:y.menuItems)!=null?b:void 0,options:E}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(y){if(this.hasOwnProperty(y)){const b=this[y];delete this[y],(y==="readonly"||y==="read-only")&&(y="readOnly"),this[y]=b}}attributeChangedCallback(y,b,E){if(b===E)return;const ee=E!==null;switch(y){case"contenteditable":Eo(this._mathfield);break;case"disabled":this.disabled=ee;break;case"read-only":case"readonly":this.readOnly=ee;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(y){const b=!!y;b?(this.setAttribute("readonly",""),Hu()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Hu()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:b})}get disabled(){return this.hasAttribute("disabled")}set disabled(y){var b;const E=!!y;E?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Hu()?this._internals.ariaDisabled=E?"true":"false":this.setAttribute("aria-disabled",E?"true":"false"),E&&((b=this._mathfield)!=null&&b.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(y){this.setValue(y)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(y){this._setOptions({defaultMode:y})}get macros(){return this._getOption("macros")}set macros(y){this._setOptions({macros:y})}get registers(){const y=this;return new Proxy({},{get:(b,E)=>{if(typeof E=="string")return y._getOption("registers")[E]},set(b,E,ee){return typeof E!="string"?!1:(y._setOptions({registers:me(xe({},y._getOption("registers")),{[E]:ee})}),!0)}})}set registers(y){this._setOptions({registers:y})}get colorMap(){return this._getOption("colorMap")}set colorMap(y){this._setOptions({colorMap:y})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(y){this._setOptions({backgroundColorMap:y})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(y){this._setOptions({letterShapeStyle:y})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(y){this._setOptions({minFontScale:y})}get smartMode(){return this._getOption("smartMode")}set smartMode(y){this._setOptions({smartMode:y})}get smartFence(){return this._getOption("smartFence")}set smartFence(y){this._setOptions({smartFence:y})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(y){this._setOptions({smartSuperscript:y})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(y){this._setOptions({scriptDepth:y})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(y){this._setOptions({removeExtraneousParentheses:y})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(y){this._setOptions({mathModeSpace:y})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(y){this._setOptions({placeholderSymbol:y})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(y){this._setOptions({popoverPolicy:y})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(y){this._setOptions({environmentPopoverPolicy:y})}get menuItems(){var y,b,E;return this._mathfield?(y=this._mathfield.menu._menuItems.map(ee=>ee.menuItem))!=null?y:[]:(E=(b=Ba.get(this))==null?void 0:b.menuItems)!=null?E:[]}set menuItems(y){var b;if(this._mathfield){const E=(b=this._mathfield.element)==null?void 0:b.querySelector("[part=menu-toggle]");E&&(E.style.display=y.length===0?"none":""),this._mathfield.menu.menuItems=y}Ba.has(this)?Ba.set(this,me(xe({},Ba.get(this)),{menuItems:y})):Ba.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:Wd(this),menuItems:y})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(y){this._setOptions({mathVirtualKeyboardPolicy:y})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(y){this._setOptions({inlineShortcuts:y})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(y){this._setOptions({inlineShortcutTimeout:y})}get keybindings(){return this._getOption("keybindings")}set keybindings(y){this._setOptions({keybindings:y})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(y){this._setOptions({onInlineShortcut:y})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(y){this._setOptions({onScrollIntoView:y})}get onExport(){return this._getOption("onExport")}set onExport(y){this._setOptions({onExport:y})}get readOnly(){return this._getOption("readOnly")}set readOnly(y){this._setOptions({readOnly:y})}get isSelectionEditable(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.isSelectionEditable)!=null?b:!1}setPromptState(y,b,E){var ee;(ee=this._mathfield)==null||ee.setPromptState(y,b,E)}getPromptState(y){var b,E;return(E=(b=this._mathfield)==null?void 0:b.getPromptState(y))!=null?E:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(y){this._setOptions({virtualKeyboardTargetOrigin:y})}get selection(){return this._mathfield?this._mathfield.model.selection:Ba.has(this)?Ba.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(y){if(typeof y=="number"&&(y={ranges:[[y,y]]}),this._mathfield){this._mathfield.model.selection=y,Eo(this._mathfield);return}if(Ba.has(this)){Ba.set(this,me(xe({},Ba.get(this)),{selection:y}));return}Ba.set(this,{value:void 0,selection:y,options:Wd(this),menuItems:void 0})}get selectionIsCollapsed(){const y=this.selection;return y.ranges.length===1&&y.ranges[0][0]===y.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Ba.has(this)?Ba.get(this).selection.ranges[0][0]:0}set position(y){if(this._mathfield&&(this._mathfield.model.position=y,Eo(this._mathfield)),Ba.has(this)){Ba.set(this,me(xe({},Ba.get(this)),{selection:{ranges:[[y,y]]}}));return}Ba.set(this,{value:void 0,selection:{ranges:[[y,y]]},options:Wd(this),menuItems:void 0})}getOffsetDepth(y){var b,E;return this._mathfield?((E=(b=this._mathfield.model.at(y))==null?void 0:b.treeDepth)!=null?E:2)-2:0}get lastOffset(){var y,b;return(b=(y=this._mathfield)==null?void 0:y.model.lastOffset)!=null?b:-1}};rs.version="0.98.5",rs._fontsDirectory="./fonts",rs._soundsDirectory="./sounds",rs.keypressVibration=!0,rs._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},rs._plonkSound="plonk.wav",rs.audioBuffers={},rs.createHTML=a=>a,rs._speechEngineRate="100%",rs._speechEngineVoice="Joanna",rs._textToSpeechMarkup="",rs._textToSpeechRules="mathlive",rs._textToSpeechRulesOptions={},rs.speakHook=r1,rs.readAloudHook=h1,rs._decimalSeparator=".",rs.fractionNavigationOrder="numerator-denominator",rs._isFunction=a=>{var y,b;const E=window.MathfieldElement.computeEngine;return(b=(y=E==null?void 0:E.parse(a).domain)==null?void 0:y.isFunction)!=null?b:!1};var Hd=rs;function Zl(a){return a.replace(/[^a-zA-Z\d]+(.)/g,(y,b)=>b.toUpperCase())}function Wd(a){const y={readOnly:!1},b=Hd.optionsAttributes;return Object.keys(b).forEach(E=>{if(a.hasAttribute(E)){const ee=a.getAttribute(E);E==="placeholder"?y.contentPlaceholder=ee!=null?ee:"":b[E]==="boolean"?y[Zl(E)]=!0:b[E]==="on/off"?ee==="on"?y[Zl(E)]=!0:ee==="off"?y[Zl(E)]=!1:y[Zl(E)]=void 0:b[E]==="number"?y[Zl(E)]=Number.parseFloat(ee!=null?ee:"0"):y[Zl(E)]=ee}}),y}function Hu(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var vp=Hd,yp,bp,xp,wp;if(ft()&&!((yp=window.customElements)!=null&&yp.get("math-field"))){(xp=window[bp=Symbol.for("io.cortexjs.mathlive")])!=null||(window[bp]={});const a=window[Symbol.for("io.cortexjs.mathlive")];a.version="0.98.5",window.MathfieldElement=Hd,(wp=window.customElements)==null||wp.define("math-field",Hd)}function m1(a,y,b){let E=b,ee=0;const re=a.length;for(;E<y.length;){const ae=y[E];if(ee<=0&&y.slice(E,E+re)===a)return E;ae==="\\"?E++:ae==="{"?ee++:ae==="}"&&ee--,E++}return-1}function Jf(a,y,b,E,ee="latex"){const re=[];for(const ae of a)if(ae.type==="text"){const fe=ae.data;let ge=!0,be=0,Me;Me=fe.indexOf(y),Me!==-1&&(be=Me,be>0&&re.push({type:"text",data:fe.slice(0,be)}),ge=!1);let Ne=!1;for(;!Ne;){if(ge){if(Me=fe.indexOf(y,be),Me===-1){Ne=!0;break}be!==Me&&re.push({type:"text",data:fe.slice(be,Me)}),be=Me}else{if(Me=m1(b,fe,be+y.length),Me===-1){Ne=!0;break}let et=fe.slice(be+y.length,Me);ee==="ascii-math"&&([,et]=Oc(et,{format:"ascii-math"})),re.push({type:"math",data:et,rawData:fe.slice(be,Me+b.length),mathstyle:E}),be=Me+b.length}ge=!ge}be<fe.length&&re.push({type:"text",data:fe.slice(be)})}else re.push(ae);return re}function Sp(a,y,b){let E=[{type:"text",data:a}];return y!=null&&y.inline&&y.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle")}),y!=null&&y.display&&y.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle")}),b!=null&&b.inline&&b.inline.forEach(([ee,re])=>{E=Jf(E,ee,re,"textstyle","ascii-math")}),b!=null&&b.display&&b.display.forEach(([ee,re])=>{E=Jf(E,ee,re,"displaystyle","ascii-math")}),E}function g1(a,y){const b=document.createElement("span");b.setAttribute("translate","no");try{const E="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+y.renderToMathML(a)+"</math>";b.innerHTML=window.MathfieldElement.createHTML(E)}catch(E){console.error(`MathLive 0.98.5: Could not convert "${a}"' to MathML with ${E}`),b.textContent=a}return b.className="ML__sr-only",b}function v1(a,y,b,E){try{const ee=y.renderToMarkup(a,{mathstyle:b,format:"html"}),re=document.createElement("span");return re.dataset.latex=a,re.style.display=b==="displaystyle"?"flex":"inline-flex",re.setAttribute("aria-hidden","true"),re.setAttribute("translate","no"),re.innerHTML=window.MathfieldElement.createHTML(ee),re}catch(ee){if(console.error("Could not parse'"+a+"' with ",ee),E)return document.createTextNode(a)}return null}function Wu(a,y,b,E){var ee;const re=v1(a,b,y||"textstyle",E),ae=(ee=b.renderAccessibleContent)!=null?ee:"";if(re&&/\b(mathml|speakable-text)\b/i.test(ae)){const fe=document.createElement("span");if(/\bmathml\b/i.test(ae)&&b.renderToMathML&&fe.append(g1(a,b)),/\bspeakable-text\b/i.test(ae)&&b.renderToSpeakableText){const ge=document.createElement("span");ge.setAttribute("translate","no");const be=b.renderToSpeakableText(a);ge.innerHTML=window.MathfieldElement.createHTML(be),ge.className="ML__sr-only",fe.append(ge)}return fe.append(re),fe}return re}function y1(a,y){var b,E,ee;let re=null;if((b=y.TeX)!=null&&b.processEnvironments&&/^\s*\\begin/.test(a)){re=document.createDocumentFragment();const ae=Wu(a,"",y,!0);ae&&re.appendChild(ae)}else{if(!a.trim())return null;const ae=Sp(a,(E=y.TeX)==null?void 0:E.delimiters,(ee=y.asciiMath)==null?void 0:ee.delimiters);if(ae.length===1&&ae[0].type==="text")return null;re=document.createDocumentFragment();for(const fe of ae)if(fe.type==="text")re.appendChild(document.createTextNode(fe.data));else{const ge=Wu(fe.data,fe.mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);ge&&re.appendChild(ge)}}return re}function Cp(a,y){var b,E,ee,re,ae,fe,ge,be,Me,Ne,et,xt,It,In,_r,Ln;if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const sr=(b=a.childNodes[0].textContent)!=null?b:"";if((E=y.TeX)!=null&&E.processEnvironments&&/^\s*\\begin/.test(sr)){a.textContent="";const mr=Wu(sr,"",y,!0);mr&&a.append(mr);return}const Pr=Sp(sr,(ee=y.TeX)==null?void 0:ee.delimiters,(re=y.asciiMath)==null?void 0:re.delimiters);if(Pr.length===1&&Pr[0].type==="math"){a.textContent="";const mr=Wu(Pr[0].data,Pr[0].mathstyle==="textstyle"?"textstyle":"displaystyle",y,!0);mr&&a.append(mr);return}if(Pr.length===1&&Pr[0].type==="text")return}for(let sr=a.childNodes.length-1;sr>=0;sr--){const Pr=a.childNodes[sr];if(Pr.nodeType===3){const mr=y1((ae=Pr.textContent)!=null?ae:"",y);mr&&(sr+=mr.childNodes.length-1,Pr.replaceWith(mr))}else if(Pr.nodeType===1){const mr=Pr,di=Pr.nodeName.toLowerCase();if(di==="script"){const Pi=Pr;let bi;if((fe=y.processScriptTypePattern)!=null&&fe.test(Pi.type))bi=(ge=Pi.textContent)!=null?ge:"";else if((be=y.processMathJSONScriptTypePattern)!=null&&be.test(Pi.type))try{bi=(Ne=y.serializeToLatex)==null?void 0:Ne.call(y,JSON.parse((Me=Pi.textContent)!=null?Me:""))}catch(Pa){console.error(Pa)}if(bi){let Pa="textstyle";for(const Kr of Pi.type.split(";")){const[Fs,_l]=Kr.toLowerCase().split("=");Fs.trim()==="mode"&&(Pa=_l.trim()==="display"?"displaystyle":"textstyle")}const qa=Wu(bi,Pa,y,!0);qa&&Pi.parentNode.replaceChild(qa,Pi)}}else if(((xt=(et=y.processClassPattern)==null?void 0:et.test(mr.className))!=null?xt:!1)||!((In=(It=y.skipTags)==null?void 0:It.includes(di))!=null&&In||(Ln=(_r=y.ignoreClassPattern)==null?void 0:_r.test(mr.className))!=null&&Ln))if(a.childNodes.length===1&&a.childNodes[0].nodeType===3){const bi=a.textContent;a.textContent="";const Pa=Wu(bi!=null?bi:"","displaystyle",y,!0);Pa&&a.append(Pa)}else Cp(mr,y)}}}var b1={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function x1(a,y){var b,E,ee,re;try{const ae=xe(xe({},b1),y);ae.ignoreClassPattern=new RegExp((b=ae.ignoreClass)!=null?b:""),ae.processClassPattern=new RegExp((E=ae.processClass)!=null?E:""),ae.processScriptTypePattern=new RegExp((ee=ae.processScriptType)!=null?ee:""),ae.processMathJSONScriptTypePattern=new RegExp((re=ae.processMathJSONScriptType)!=null?re:""),Lf(),_s("core"),Cp(a,ae)}catch(ae){ae instanceof Error?console.error("renderMathInElement(): "+ae.message):console.error("renderMathInElement(): Could not render math for element",a)}}function w1(a,y){const b=fc.singleton;return b?(b.show(),Id(),b.currentLayer=y,b.render(),b.focus(),!0):!1}function S1(){const a=window.mathVirtualKeyboard;return a.visible?a.hide({animate:!0}):a.show({animate:!0}),!1}Ls({switchKeyboardLayer:w1,toggleVirtualKeyboard:S1,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function mc(){var a,y;return(y=globalThis[a=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[a]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function T1(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function I1(a){E1(document.body,a)}function C1(a){if(typeof a=="string"){const y=document.getElementById(a);if(y===null)throw new Error(`The element with ID "${a}" could not be found.`);return y}return typeof a=="string"?null:a}function E1(a,y){var b,E,ee,re;const ae=C1(a);if(!ae)return;const fe=y!=null?y:{};(b=fe.renderToMarkup)!=null||(fe.renderToMarkup=Yo),(E=fe.renderToMathML)!=null||(fe.renderToMathML=Bv),(ee=fe.renderToSpeakableText)!=null||(fe.renderToSpeakableText=$v),(re=fe.serializeToLatex)!=null||(fe.serializeToLatex=Nv),x1(ae,fe)}var D1={mathlive:"0.98.5"}},17423:function(En,Wt,se){"use strict";se.d(Wt,{Z:function(){return xe}});const de=me=>typeof me=="object"&&me!=null&&me.nodeType===1,He=(me,Ie)=>(!Ie||me!=="hidden")&&me!=="visible"&&me!=="clip",Be=(me,Ie)=>{if(me.clientHeight<me.scrollHeight||me.clientWidth<me.scrollWidth){const ot=getComputedStyle(me,null);return He(ot.overflowY,Ie)||He(ot.overflowX,Ie)||(Oe=>{const St=(ft=>{if(!ft.ownerDocument||!ft.ownerDocument.defaultView)return null;try{return ft.ownerDocument.defaultView.frameElement}catch(it){return null}})(Oe);return!!St&&(St.clientHeight<Oe.scrollHeight||St.clientWidth<Oe.scrollWidth)})(me)}return!1},Ve=(me,Ie,ot,Oe,St,ft,it,Je)=>ft<me&&it>Ie||ft>me&&it<Ie?0:ft<=me&&Je<=ot||it>=Ie&&Je>=ot?ft-me-Oe:it>Ie&&Je<ot||ft<me&&Je>ot?it-Ie+St:0,ve=me=>{const Ie=me.parentElement;return Ie==null?me.getRootNode().host||null:Ie},we=(me,Ie)=>{var ot,Oe,St,ft;if(typeof document=="undefined")return[];const{scrollMode:it,block:Je,inline:Le,boundary:gt,skipOverflowHiddenElements:qt}=Ie,tt=typeof gt=="function"?gt:Yt=>Yt!==gt;if(!de(me))throw new TypeError("Invalid target");const ct=document.scrollingElement||document.documentElement,ke=[];let Se=me;for(;de(Se)&&tt(Se);){if(Se=ve(Se),Se===ct){ke.push(Se);break}Se!=null&&Se===document.body&&Be(Se)&&!Be(document.documentElement)||Se!=null&&Be(Se,qt)&&ke.push(Se)}const Ue=(Oe=(ot=window.visualViewport)==null?void 0:ot.width)!=null?Oe:innerWidth,je=(ft=(St=window.visualViewport)==null?void 0:St.height)!=null?ft:innerHeight,{scrollX:_t,scrollY:vt}=window,{height:kt,width:Xe,top:Kt,right:Ot,bottom:bn,left:Nt}=me.getBoundingClientRect(),{top:sn,right:Cn,bottom:or,left:Qe}=(Yt=>{const Ge=window.getComputedStyle(Yt);return{top:parseFloat(Ge.scrollMarginTop)||0,right:parseFloat(Ge.scrollMarginRight)||0,bottom:parseFloat(Ge.scrollMarginBottom)||0,left:parseFloat(Ge.scrollMarginLeft)||0}})(me);let Ce=Je==="start"||Je==="nearest"?Kt-sn:Je==="end"?bn+or:Kt+kt/2-sn+or,ht=Le==="center"?Nt+Xe/2-Qe+Cn:Le==="end"?Ot+Cn:Nt-Qe;const Ut=[];for(let Yt=0;Yt<ke.length;Yt++){const Ge=ke[Yt],{height:rt,width:jt,top:_n,right:rn,bottom:$t,left:Zt}=Ge.getBoundingClientRect();if(it==="if-needed"&&Kt>=0&&Nt>=0&&bn<=je&&Ot<=Ue&&Kt>=_n&&bn<=$t&&Nt>=Zt&&Ot<=rn)return Ut;const yn=getComputedStyle(Ge),ln=parseInt(yn.borderLeftWidth,10),Ae=parseInt(yn.borderTopWidth,10),ue=parseInt(yn.borderRightWidth,10),le=parseInt(yn.borderBottomWidth,10);let pe=0,he=0;const oe="offsetWidth"in Ge?Ge.offsetWidth-Ge.clientWidth-ln-ue:0,Te="offsetHeight"in Ge?Ge.offsetHeight-Ge.clientHeight-Ae-le:0,Ye="offsetWidth"in Ge?Ge.offsetWidth===0?0:jt/Ge.offsetWidth:0,Lt="offsetHeight"in Ge?Ge.offsetHeight===0?0:rt/Ge.offsetHeight:0;if(ct===Ge)pe=Je==="start"?Ce:Je==="end"?Ce-je:Je==="nearest"?Ve(vt,vt+je,je,Ae,le,vt+Ce,vt+Ce+kt,kt):Ce-je/2,he=Le==="start"?ht:Le==="center"?ht-Ue/2:Le==="end"?ht-Ue:Ve(_t,_t+Ue,Ue,ln,ue,_t+ht,_t+ht+Xe,Xe),pe=Math.max(0,pe+vt),he=Math.max(0,he+_t);else{pe=Je==="start"?Ce-_n-Ae:Je==="end"?Ce-$t+le+Te:Je==="nearest"?Ve(_n,$t,rt,Ae,le+Te,Ce,Ce+kt,kt):Ce-(_n+rt/2)+Te/2,he=Le==="start"?ht-Zt-ln:Le==="center"?ht-(Zt+jt/2)+oe/2:Le==="end"?ht-rn+ue+oe:Ve(Zt,rn,jt,ln,ue+oe,ht,ht+Xe,Xe);const{scrollLeft:Rt,scrollTop:Ft}=Ge;pe=Lt===0?0:Math.max(0,Math.min(Ft+pe/Lt,Ge.scrollHeight-rt/Lt+Te)),he=Ye===0?0:Math.max(0,Math.min(Rt+he/Ye,Ge.scrollWidth-jt/Ye+oe)),Ce+=Ft-pe,ht+=Rt-he}Ut.push({el:Ge,top:pe,left:he})}return Ut},Ee=me=>me===!1?{block:"end",inline:"nearest"}:(Ie=>Ie===Object(Ie)&&Object.keys(Ie).length!==0)(me)?me:{block:"start",inline:"nearest"};function xe(me,Ie){if(!me.isConnected||!(St=>{let ft=St;for(;ft&&ft.parentNode;){if(ft.parentNode===document)return!0;ft=ft.parentNode instanceof ShadowRoot?ft.parentNode.host:ft.parentNode}return!1})(me))return;const ot=(St=>{const ft=window.getComputedStyle(St);return{top:parseFloat(ft.scrollMarginTop)||0,right:parseFloat(ft.scrollMarginRight)||0,bottom:parseFloat(ft.scrollMarginBottom)||0,left:parseFloat(ft.scrollMarginLeft)||0}})(me);if((St=>typeof St=="object"&&typeof St.behavior=="function")(Ie))return Ie.behavior(we(me,Ie));const Oe=typeof Ie=="boolean"||Ie==null?void 0:Ie.behavior;for(const{el:St,top:ft,left:it}of we(me,Ee(Ie))){const Je=ft-ot.top+ot.bottom,Le=it-ot.left+ot.right;St.scroll({top:Je,left:Le,behavior:Oe})}}}}]);
|
|
|
}()); |