You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1105 lines
682 KiB
1105 lines
682 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[3317],{2018:function(){"use strict"},40862:function(Zt,Ut){"use strict";Ut.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},75544: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 Zt={},Ut="5.0",fe={},oe=null,ht=!1,Me=!1,Xe=null,me=!1,je=null,He=null,Ke=0;Ke<arguments.length;Ke++){var Se=arguments[Ke];if(Se!==null)switch(typeof Se){case"number":Ut=Se.toFixed(1);break;case"string":Se.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ut=Se:Xe=Se;break;case"object":typeof Se.is3D!="undefined"?oe=Se:fe=Se;break;case"boolean":ht=Se,Me=!0;break}}oe===null&&(oe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},fe.material_id!==void 0&&!Me&&(ht=!0)),Xe!==null&&fe.id===void 0&&(fe.id=Xe);var de="",we="",ge=!1,lt=null,Re=null,Ie=null,We=!1,Ee=null,at=null,rt=null,ct=null,Ge=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var Ue=function(Ne){return parseFloat(Ne)>4?parseFloat(Ne):5};Zt.setHTML5Codebase=function(Ne,ot){He=Ne,mt(Ne,ot)},Zt.setJavaCodebase=Zt.setJavaCodebaseVersion=Zt.isCompiledInstalled=Zt.setPreCompiledScriptPath=Zt.setPreCompiledResourcePath=function(){},Zt.setHTML5CodebaseVersion=function(Ne,ot){var ft=parseFloat(Ne);if(ft!==NaN&&ft<5){console.log("The GeoGebra HTML5 codebase version "+ft+" is deprecated. Using version latest instead.");return}je=Ne,he(Ne,ot)},Zt.getHTML5CodebaseVersion=function(){return Re},Zt.getParameters=function(){return fe},Zt.setFontsCSSURL=function(Ne){ct=Ne},Zt.setGiacJSURL=function(Ne){},Zt.setJNLPFile=function(Ne){de=Ne},Zt.setJNLPBaseDir=function(Ne){},Zt.inject=function(){function Ne(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ot="auto",ft=fe.id,rn,kt=!1,_e=0;_e<arguments.length;_e++){var Ce=arguments[_e];typeof Ce=="string"?(Ce=Ce.toLowerCase(),Ce.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ot=Ce:ft=arguments[_e]):typeof Ce=="boolean"?kt=Ce:Ce instanceof HTMLElement&&(rn=Ce)}ze();function ze(){if(!me){setTimeout(ze,200);return}ot=Ht(ot);var st=rn||document.getElementById(ft);if(!st){console.log("possibly bug on ajax loading? ");return}if(Zt.removeExistingApplet(st,!1),fe.width===void 0&&st.clientWidth&&(fe.width=st.clientWidth),fe.height===void 0&&st.clientHeight&&(fe.height=st.clientHeight),!(fe.width&&fe.height)&&ot==="html5"&&(delete fe.width,delete fe.height),lt=ot,ot==="screenshot")Ae(st,fe);else{var Te=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?Te=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(Te=(!Je()||Ne())&&Ye()),Te?(lt="screenshot",Mt(st,fe,kt,ot)):et(st,fe,kt)}}};function Je(){try{return window.self!==window.top}catch(Ne){return!0}}function Ye(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Zt.getViews=function(){return oe},Zt.isJavaInstalled=function(){return!1};var Tt=function(Ne){var ot=function(_e){var Ce=JSON.parse(_e),ze=function(Ve){return Ve.type=="G"||Ve.type=="E"},st=Ce.elements?Ce.elements.filter(ze)[0]:Ce;if(!st||!st.url){ft();return}fe.fileName=st.url,Le(st.settings||{}),oe.is3D=!0;var Te="https://www.geogebra.org/images/";Zt.setPreviewImage(Ee||st.previewUrl,Te+"GeoGebra_loading.png",Te+"applet_play.png"),Ne()},ft=function(){fe.onError&&fe.onError(),Kt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},rn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",kt="/materials/"+fe.material_id+"?scope=basic";Ze("https://"+rn+"/api/proxy.php?path="+encodeURIComponent(kt),ot,ft)};function Le(Ne){var ot=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ft){Ne[ft]=!!Ne[ft]}),ot.forEach(function(ft){fe[ft]===void 0&&Ne[ft]!==void 0&&(fe[ft]=Ne[ft])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Ze(Ne,ot,ft){var rn=new XMLHttpRequest;rn.open("GET",Ne),rn.onload=function(){ot(rn.responseText)},rn.onerror=ft,rn.send()}Zt.isHTML5Installed=function(){return!0},Zt.getLoadedAppletType=function(){return lt},Zt.setPreviewImage=function(Ne,ot,ft){Ee=Ne,at=ot,rt=ft},Zt.removeExistingApplet=function(Ne,ot){var ft;typeof Ne=="string"&&(Ne=document.getElementById(Ne)),lt=null;var rn=null;for(ft=0;ft<Ne.childNodes.length;ft++){var kt=Ne.childNodes[ft],_e=kt.className;_e==="applet_screenshot"?ot?(kt.style.display="block",lt="screenshot"):kt.style.display="none":_e!=="applet_scaler prerender"&&(Ne.removeChild(kt),rn=_e&&_e.indexOf("appletParameters")!=-1?kt.id:null,ft--)}var Ce=fe.id!==void 0?fe.id:rn,ze=window[Ce];ze&&typeof ze.getBase64=="function"&&(ze.remove(),window[Ce]=null)},Zt.refreshHitPoints=function(){if(Ue(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ne=Zt.getAppletObject();return Ne&&typeof Ne.recalculateEnvironments=="function"?(Ne.recalculateEnvironments(),!0):!1},Zt.startAnimation=function(){var Ne=Zt.getAppletObject();return Ne&&typeof Ne.startAnimation=="function"?(Ne.startAnimation(),!0):!1},Zt.stopAnimation=function(){var Ne=Zt.getAppletObject();return Ne&&typeof Ne.stopAnimation=="function"?(Ne.stopAnimation(),!0):!1},Zt.getAppletObject=function(){var Ne=fe.id!==void 0?fe.id:"ggbApplet";return window[Ne]},Zt.resize=function(){};var Ct=function(Ne,ot,ft){var rn=document.createElement("param");rn.setAttribute("name",ot),rn.setAttribute("value",ft),Ne.appendChild(rn)},Fe=function(Ne){return Ne&&Ne!=="false"},et=function(Ne,ot,ft){Ue(Re)<=4.2&&(ft=!0);var rn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Re||ggbHTML5LoadedCodebaseIsWebSimple&&!We)&&(rn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var kt=document.createElement("div");kt.classList.add("appletParameters","notranslate");var _e=ot.width,Ce=ot.height;if(ot.disableAutoScale=ot.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ot.disableAutoScale,ot.width!==void 0)if(Ue(Re)<=4.4)Fe(ot.showToolBar)&&(ot.height-=7),Fe(ot.showAlgebraInput)&&(ot.height-=37),ot.width<605&&Fe(ot.showToolBar)&&(ot.width=605,_e=605);else{var ze=100;(Fe(ot.showToolBar)||Fe(ot.showMenuBar))&&(ot.hasOwnProperty("customToolBar")&&(ot.customToolbar=ot.customToolBar),ze=Fe(ot.showMenuBar)?245:155),_e<ze&&(ot.width=ze,_e=ze)}kt.style.border="none",kt.style.display="inline-block";for(var st in ot)ot.hasOwnProperty(st)&&st!=="appletOnLoad"&&kt.setAttribute("data-param-"+st,ot[st]);ct&&kt.setAttribute("data-param-fontscssurl",ct),Zt.resize=function(){GGBAppletUtils.responsiveResize(Ne,ot)},window.addEventListener("resize",function(ee){Zt.resize()});var Te=typeof ot.appletOnLoad=="function"?ot.appletOnLoad:function(){};if(!ft&&ot.width!==void 0){ot.hasOwnProperty("showSplash")||kt.setAttribute("data-param-showSplash","false");var Ve=Ne.querySelector(".applet_scaler.prerender"),$e=Ve!==null;if($e)var pt=Ve.querySelector(".ggb_preview");else{var pt=$t(_e,Ce,ot.borderColor,!1);Ve=document.createElement("div"),Ve.className="applet_scaler",Ve.style.position="relative",Ve.style.display="block",Ve.style.width=_e+"px",Ve.style.height=Ce+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ve,"66%"),Ue(Re)>=5?(ot.appletOnLoad=function(ee){var ie=Ne.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ve),window.GGBT_wsf_view&&$(window).trigger("resize"),Te(ee)},$e||Ve.appendChild(pt)):kt.appendChild(pt),Ve.appendChild(kt),$e||Ne.appendChild(Ve),setTimeout(function(){Zt.resize()},1)}else{var St=document.createElement("div");St.className="applet_scaler",St.style.position="relative",St.style.display="block",St.appendChild(kt),Ne.appendChild(St),ot.appletOnLoad=function(ee){Zt.resize(),Te(ee)}}function Et(ee,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,ie.appletOnLoad):renderGGBElement(ee),Kt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function Bt(ee,ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ee,params:ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ue){Et(ue.article,ue.params)}),html5AppletsToProcess=null)},Ue(Re)<5&&(ee.className+=" geogebraweb")):Et(ee,ie)}if(rn){scriptLoadStarted=!0;for(var Nt=0;Nt<kt.childNodes.length;Nt++){var cn=kt.childNodes[Nt].tagName;cn==="TABLE"&&(kt.removeChild(kt.childNodes[Nt]),Nt--)}if(ggbHTML5LoadedScript!==null){var Qt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Qt!=null&&Qt.parentNode.removeChild(Qt)}var le=document.createElement("script"),te=function(){Bt(kt,ot)};le.src=we+Ie,ggbHTML5LoadedCodebaseIsWebSimple=We,ggbHTML5LoadedCodebaseVersion=Re,ggbHTML5LoadedScript=le.src,Kt("GeoGebra HTML5 codebase loaded: '"+we+"'.",ot),!He&&(!je||je=="5.0")?(We?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),te()):we.requirejs?__webpack_require__.e(7989).then(function(){var ee=[__webpack_require__(87989)];te.apply(null,ee)}.bind(this)).catch(__webpack_require__.oe):(le.onload=te,Ne.appendChild(le))}else Bt(kt,ot);ot.height=Ce,ot.width=_e},Ae=function(Ne,ot,ft){var rn=$t(ot.width,ot.height,ot.borderColor,ft),kt=document.createElement("div");kt.style.position="relative",kt.style.display="block",kt.style.width=ot.width+"px",kt.style.height=ot.height+"px",kt.className="applet_screenshot applet_scaler"+(ft?" applet_screenshot_play":""),kt.appendChild(rn);var _e=GGBAppletUtils.getScale(ot,Ne,ft);ft?(Ne.appendChild(wt()),window.GGBT_wsf_view||(Ne.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(kt,"66%"),Ne.appendChild(kt),_e!==1&&!isNaN(_e)&&(GGBAppletUtils.scaleElement(kt,_e),kt.style.width=ot.width+"px",kt.style.height=ot.height+"px",kt.parentNode.style.width=ot.width*_e+"px",kt.parentNode.style.height=ot.height*_e+"px"),Zt.resize=function(){Qe(Ne,rn,kt,ft)},window.addEventListener("resize",function(Ce){Zt.resize()}),Zt.resize()};function Qe(Ne,ot,ft,rn){if(Ne.contains(ot)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ne.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ne)}var kt=GGBAppletUtils.getScale(fe,Ne,rn);ft.parentNode!==null&&(!isNaN(kt)&&kt!==1?(GGBAppletUtils.scaleElement(ft,kt),ft.parentNode.style.width=fe.width*kt+"px",ft.parentNode.style.height=fe.height*kt+"px"):(GGBAppletUtils.scaleElement(ft,1),ft.parentNode.style.width=fe.width+"px",ft.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ne),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Zt.onExitFullscreen=function(Ne,ot){ot.appendChild(Ne)};var Mt=function(Ne,ot,ft,rn){Ae(Ne,ot,!0);for(var kt=function(){var ze=[];for(Ce=0;Ce<Ne.childNodes.length;Ce++)ze.push(Ne.childNodes[Ce]);if(window.GGBT_wsf_view){var st=window.GGBT_wsf_view.renderFullScreen(Ne,ot.id),Te=document.getElementById("fullscreencontainer"),Ve=jQuery(Ne).find(".fullscreencontent");Ve.length>0?(st.remove(),Ve.attr("id","fullscreencontent").show(),jQuery(Te).append(Ve),window.dispatchEvent(new Event("resize"))):et(st,ot,!1),window.GGBT_wsf_view.launchFullScreen(Te)}else lt=rn,et(Ne,ot,!1);if(!window.GGBT_wsf_view)for(Ce=0;Ce<ze.length;Ce++)Ne.removeChild(ze[Ce])},_e=Ne.getElementsByClassName("ggb_preview_play"),Ce=0;Ce<_e.length;Ce++)_e[Ce].addEventListener("click",kt,!1),_e[Ce].addEventListener("ontouchstart",kt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ne),Ye()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},wt=function(){var Ne=document.createElement("div");if(Ne.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ot='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',ft=document.createElement("style");ft.styleSheet?ft.styleSheet.cssText=ot:ft.appendChild(document.createTextNode(ot)),document.getElementsByTagName("head")[0].appendChild(ft)}return Ne},$t=function(Ne,ot,ft,rn){var kt=document.createElement("div");kt.className="ggb_preview",kt.style.position="absolute",kt.style.zIndex="90",kt.style.width=Ne-2+"px",kt.style.height=ot-2+"px",kt.style.top="0px",kt.style.left="0px",kt.style.overflow="hidden",kt.style.backgroundColor="white";var _e="lightgrey";ft!==void 0&&(ft==="none"?_e="transparent":_e=ft),kt.style.border="1px solid "+_e;var Ce=document.createElement("img");if(Ce.style.position="relative",Ce.style.zIndex="1000",Ce.style.top="-1px",Ce.style.left="-1px",Ee!==null&&Ce.setAttribute("src",Ee),Ce.style.opacity=.7,at!==null){var ze,st,Te;if(!rn){ze=document.createElement("img"),ze.style.position="absolute",ze.style.zIndex="1001",ze.style.opacity=1,Ce.style.opacity=.3,st=360,st>Ne/4*3&&(st=Ne/4*3),Te=st/5.8,ze.setAttribute("src",at),ze.setAttribute("width",st),ze.setAttribute("height",Te);var Ve=(Ne-st)/2,$e=(ot-Te)/2;ze.style.left=Ve+"px",ze.style.top=$e+"px",kt.appendChild(ze)}}return kt.appendChild(Ce),kt},Ht=function(Ne){return Ne=Ne.toLowerCase(),Ne==="html5"||Ne==="screenshot"?Ne:"html5"},ve=["web","webSimple","web3d","tablet","tablet3d","phone"],he=function(Ne,ot){if(Re=Ne,ot){mt(Re,!0);return}var ft=!ht;if(ft){var rn=Ue(Re);!isNaN(rn)&&rn<4.4&&(ft=!1)}var kt,_e;window.location.protocol.substr(0,4)==="http"?kt=window.location.protocol:kt="http:";var Ce=Re.indexOf("//");Ce>0?_e=Re:Ce===0?_e=kt+Re:_e="https://www.geogebra.org/apps/5.2.814.0/";for(var ze in ve)if(Re.slice(ve[ze].length*-1)===ve[ze]||Re.slice((ve[ze].length+1)*-1)===ve[ze]+"/"){mt(_e,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ft&&!oe.is3D&&!oe.AV&&!oe.SV&&!oe.CV&&!oe.EV2&&!oe.CP&&!oe.PC&&!oe.DA&&!oe.FI&&!oe.PV&&!Fe(fe.showToolBar)&&!Fe(fe.showMenuBar)&&!Fe(fe.showAlgebraInput)&&!Fe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?_e+="webSimple/":_e+="web3d/",mt(_e,!1)},mt=function(Ne,ot){if(Ne.requirejs){we=Ne;return}Ne.slice(-1)!=="/"&&(Ne+="/"),we=Ne,ot===null&&(ot=Ne.indexOf("http")===-1),ge=ot,Ie="web.nocache.js",We=!1;var ft=we.split("/");ft.length>1&&(!ot&&ft[ft.length-2]==="webSimple"?(Ie="webSimple.nocache.js",We=!0):ve.indexOf(ft[ft.length-2])>=0&&(Ie=ft[ft.length-2]+".nocache.js")),ft=Ne.split("/"),Re=ft[ft.length-3],Re.substr(0,4)==="test"?Re=Re.substr(4,1)+"."+Re.substr(5,1):(Re.substr(0,3)==="war"||Re.substr(0,4)==="beta")&&(Re="5.0");var rn=parseFloat(Re);rn!==NaN&&rn<5&&Ne.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+rn+" is deprecated. Using version latest instead."),he("5.0",ot))},Kt=function(Ne,ot){window.console&&window.console.log&&(!ot||typeof ot.showLogging=="undefined"||ot.showLogging&&ot.showLogging!=="false")&&console.log(Ne)};fe.material_id!==void 0?Tt(Ft):Ft();function Ft(){var Ne=Ut;je!==null?Ne=je:parseFloat(Ne)<5&&(Ne="5.0"),he(Ne,!1),He!==null&&mt(He,ge),me=!0}return Zt},GGBAppletUtils=function(){"use strict";function Zt(){return window.GGBT_wsf_edit!==void 0}function Ut(me,je){je!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+je+","+je+")",me.style.webkitTransform="scale("+je+","+je+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function fe(me,je,He,Ke,Se,de){var we=null;if(de!=null&&de!="")for(var ge=me.parentNode;ge!=null;)if((" "+ge.className+" ").indexOf(" "+de+" ")>-1){we=ge;break}else ge=ge.parentNode;var lt=0,Re=0,Ie=0,We=0,Ee=0,at=0,rt=0;if(we)lt=we.offsetWidth,Re=Math.max(Ke?we.offsetWidth:0,we.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(lt=Math.min(window.innerWidth,document.documentElement.clientWidth),Re=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=lt):(lt=window.innerWidth,Re=window.innerHeight,Ie=window.innerWidth),me){var ct=me.getBoundingClientRect();ct.left>0&&ct.left<=lt&&(Se===void 0||!Se)&&(document.dir==="rtl"?(Ee=lt-ct.width-ct.left,at=Ie<=480?10:30):(at=ct.left,Ee=Ie<=480?10:30),We=at+Ee)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ge=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(We=40,rt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(We=0,rt=40)}}return me&&((He===void 0||!He)&&je>0&&je+We<lt?lt=je:lt-=We,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He===void 0||!He)&&(Re-=rt)),{width:lt,height:Re}}function oe(me,je,He,Ke,Se){if(me.isScreenshoGenerator)return 1;var de=Ke!==void 0&&Ke,we=me.noScaleMargin!=null&&me.noScaleMargin,ge=function(Ge){return Ge&&Ge!=="false"},lt=ge(me.autoHeight),Re=fe(je,me.width,He,lt,de&&window.GGBT_wsf_view||we,Se),Ie=parseInt(Re.width),We=me.width,Ee=me.height;if(We===void 0){var at=je.querySelector(".appletParameters");at&&(We=at.offsetWidth,Ee=at.offsetHeight)}var rt=Ie/We,ct=de?1:Re.height/Ee;return He!==void 0&&!He&&(rt=Math.min(1,rt),ct=Math.min(1,ct)),Math.min(rt,ct)}function ht(me,je,He){var Ke=1,Se,de=!1;if(me.hasOwnProperty("allowUpscale")&&(de=me.allowUpscale),me.hasOwnProperty("scale")&&(Ke=parseFloat(me.scale),(isNaN(Ke)||Ke===null||Ke===0)&&(Ke=1),Ke>1&&(de=!0)),je&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))Se=oe(me,je,de,He,me.scaleContainerClass);else return Ke;return de&&(!me.hasOwnProperty("scale")||Ke===1)?Se:Math.min(Ke,Se)}function Me(me){var je=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),Ke=me.getBoundingClientRect(),Se=(je-Ke.width)/2,de=(He-Ke.height)/2;de<0&&(de=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Se<40?me.style.left="40px":me.style.left=Se+"px",me.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?me.style.top="40px":me.style.top=de+"px",me.style.left=Se+"px")}function Xe(me,je){var He=me.querySelector(".appletParameters");if(He){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(je.id!==He.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(He.parentElement&&/fullscreen/.test(He.parentElement.className))return;var Ke=ht(je,me);Zt()&&He.setAttribute("data-param-scale",Ke);for(var Se=null,de=0;de<me.childNodes.length;de++)if(me.childNodes[de].className!==void 0&&me.childNodes[de].className.match(/^applet_scaler/)){Se=me.childNodes[de];break}if(Se!==null&&Se.querySelector(".noscale")!==null)return;var we=je.id!==void 0?je.id:"ggbApplet",ge=window[we];(ge==null||!ge.recalculateEnvironments)&&Se!==null&&!Se.className.match(/fullscreen/)&&(Se.parentNode.style.transform="",!isNaN(Ke)&&Ke!==1?(Se.parentNode.style.width=je.width*Ke+"px",Se.parentNode.style.height=je.height*Ke+"px",Ut(Se,Ke)):(Ut(Se,1),Se.parentNode.style.width=je.width+"px",Se.parentNode.style.height=je.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Me(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(He).parents(".content-added-content"))}}return{responsiveResize:Xe,isFlexibleWorksheetEditor:Zt,positionCenter:Me,getScale:ht,scaleElement:Ut}}();__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 Zt=n.location.search;return Zt.indexOf(J)!=-1||Zt.indexOf(K)!=-1}function q(Zt,Ut){}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(Zt){var Ut=s[L].bindings;s[L].bindings=function(){for(var fe=Ut?Ut():{},oe=Zt[webModule.__softPermutationId],ht=O;ht<oe.length;ht++){var Me=oe[ht];fe[Me[O]]=Me[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Zt=o.createElement(Q);if(Zt.id=L,Zt.style.cssText=R+S,Zt.tabIndex=-1,o.body.appendChild(Zt),t=Zt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ut=document.compatMode==U?V:W;t.write(Ut+X),t.close()}}}function w(Zt){function Ut(oe){function ht(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Me=ht();if(Me){oe();return}function Xe(){if(!Me){if(!ht())return;Me=!0,oe(),o.removeEventListener&&o.removeEventListener(Z,Xe,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,Xe,!1);var me=setInterval(function(){Xe()},$)}function fe(oe){var ht=u(),Me=ht.body,Xe=ht.createElement(_);Xe.language=ab,Xe.crossOrigin=W,Xe.src=oe,webModule.__errFn&&(Xe.onerror=function(){webModule.__errFn(L,new Error(bb+oe))}),Me.appendChild(Xe)}Ut(function(){fe(Zt)})}webModule.__startLoadingFragment=function(Zt){return C(Zt)},webModule.__installRunAsyncCode=function(Zt){var Ut=u(),fe=Ut.body,oe=Ut.createElement(_);oe.language=ab,oe.text=Zt,fe.appendChild(oe),fe.removeChild(oe)};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(Zt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Zt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Zt){var Ut=c[Zt];return Ut==null?null:Ut},r=d,webModule.__errFn=e}function B(){function Zt(me){var je=me.lastIndexOf(rb);je==-1&&(je=me.length);var He=me.indexOf(sb);He==-1&&(He=me.length);var Ke=me.lastIndexOf(tb,Math.min(He,je));return Ke>=O?me.substring(O,Ke+P):W}function Ut(me){if(!me.match(/^\w+:\/\//)){var je=o.createElement(ub);je.src=me+vb,me=Zt(je.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function oe(){for(var me=o.getElementsByTagName(_),je=O;je<me.length;++je)if(me[je].src.indexOf(xb)!=-1)return Zt(me[je].src);return W}function ht(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Me(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var Xe=fe();return Xe==W&&(Xe=oe()),Xe==W&&(Xe=ht()),Xe==W&&Me()&&(Xe=Zt(o.location.href)),Xe=Ut(Xe),Xe}function C(Zt){return Zt.match(/^\//)||Zt.match(/^[a-zA-Z]+:\/\//)?Zt:webModule.__moduleBase+Zt}function D(){var Zt=[],Ut=O,fe=[],oe=[];function ht(me){var je=oe[me](),He=fe[me];if(je in He)return je;var Ke=[];for(var Se in He)Ke[He[Se]]=Se;throw r&&r(me,Ke,je),null}if(__gwt_isKnownPropertyValue=function(me,je){return je in fe[me]},webModule.__getPropMap=function(){var me={};for(var je in fe)fe.hasOwnProperty(je)&&(me[je]=ht(je));return me},webModule.__computePropValue=ht,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Me;try{Me=Cb;var Xe=Me.indexOf(Db);Xe!=-1&&(Ut=parseInt(Me.substring(Xe+P),$),Me=Me.substring(O,Xe))}catch(me){}return webModule.__softPermutationId=Ut,C(Me+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/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})()},52882:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Ax:function(){return Xe},Ds:function(){return me},KI:function(){return He},SI:function(){return Me},f1:function(){return ht}});var oe=fe(26869);function ht(Ke){let Se=!0;if(Ke.length>0){for(let de=0;de<Ke.length;de++)if(Ke[de].compile_success==0||!Ke[de].compile_success){Se=!1;break}}else Se=!1;return Se}function Me(Ke,Se=""){let de=[];for(let we=0;we<Ke.length;we++){let ge=Ke[we],lt=Se?`${Se}/${ge.name}`:`${ge.name}`;de.push({title:ge.name,type:ge.type,isLeaf:ge.type!=="tree",key:lt})}return de}function Xe(Ke,Se,de){for(let we=0;we<Ke.length;we++){let ge=Ke[we];if(ge.key===Se){ge.children=de;break}ge.children&&Xe(ge.children,Se,de)}return Ke}function me(Ke,Se,de){let we;return function(){let ge=this,lt=arguments,Re=function(){we=null,de||Ke.apply(ge,lt)},Ie=de&&!we;clearTimeout(we),we=setTimeout(Re,Se),Ie&&Ke.apply(ge,lt)}}const je=!0,He=oe.Z.API_SERVER},1986:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return Qt}});var oe=fe(59301),ht={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Me=fe(92310),Xe=fe.n(Me),me=fe(29787);var je=function(le,te){return(je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ie){ee.__proto__=ie}||function(ee,ie){for(var ue in ie)Object.prototype.hasOwnProperty.call(ie,ue)&&(ee[ue]=ie[ue])})(le,te)};function He(le,te){function ee(){this.constructor=le}je(le,te),le.prototype=te===null?Object.create(te):(ee.prototype=te.prototype,new ee)}function Ke(le,te,ee,ie){return new(ee||(ee=Promise))(function(ue,ne){function be(Pe){try{ye(ie.next(Pe))}catch(pe){ne(pe)}}function gt(Pe){try{ye(ie.throw(Pe))}catch(pe){ne(pe)}}function ye(Pe){var pe;Pe.done?ue(Pe.value):(pe=Pe.value,pe instanceof ee?pe:new ee(function(ut){ut(pe)})).then(be,gt)}ye((ie=ie.apply(le,te||[])).next())})}function Se(le,te){var ee,ie,ue,ne,be={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ne={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function gt(ye){return function(Pe){return function(pe){if(ee)throw new TypeError("Generator is already executing.");for(;be;)try{if(ee=1,ie&&(ue=2&pe[0]?ie.return:pe[0]?ie.throw||((ue=ie.return)&&ue.call(ie),0):ie.next)&&!(ue=ue.call(ie,pe[1])).done)return ue;switch(ie=0,ue&&(pe=[2&pe[0],ue.value]),pe[0]){case 0:case 1:ue=pe;break;case 4:return be.label++,{value:pe[1],done:!1};case 5:be.label++,ie=pe[1],pe=[0];continue;case 7:pe=be.ops.pop(),be.trys.pop();continue;default:if(ue=be.trys,!((ue=ue.length>0&&ue[ue.length-1])||pe[0]!==6&&pe[0]!==2)){be=0;continue}if(pe[0]===3&&(!ue||pe[1]>ue[0]&&pe[1]<ue[3])){be.label=pe[1];break}if(pe[0]===6&&be.label<ue[1]){be.label=ue[1],ue=pe;break}if(ue&&be.label<ue[2]){be.label=ue[2],be.ops.push(pe);break}ue[2]&&be.ops.pop(),be.trys.pop();continue}pe=te.call(le,be)}catch(ut){pe=[6,ut],ie=0}finally{ee=ue=0}if(5&pe[0])throw pe[1];return{value:pe[0]?pe[1]:void 0,done:!0}}([ye,Pe])}}}function de(){for(var le=0,te=0,ee=arguments.length;te<ee;te++)le+=arguments[te].length;var ie=Array(le),ue=0;for(te=0;te<ee;te++)for(var ne=arguments[te],be=0,gt=ne.length;be<gt;be++,ue++)ie[ue]=ne[be];return ie}var we=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(te,ee){for(var ie=0,ue=ee;ie<ue.length;ie++){var ne=ue[ie],be=ne[0],gt=ne[1];te.setAttribute(be,gt)}},le.createRect=function(te,ee,ie){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",te.toString()),ue.setAttribute("height",ee.toString()),ie&&le.setAttributes(ue,ie),ue},le.createLine=function(te,ee,ie,ue,ne){var be=document.createElementNS("http://www.w3.org/2000/svg","line");return be.setAttribute("x1",te.toString()),be.setAttribute("y1",ee.toString()),be.setAttribute("x2",ie.toString()),be.setAttribute("y2",ue.toString()),ne&&le.setAttributes(be,ne),be},le.createPolygon=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",te),ee&&le.setAttributes(ie,ee),ie},le.createCircle=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(te/2).toString()),ie.setAttribute("cy",(te/2).toString()),ie.setAttribute("r",te.toString()),ee&&le.setAttributes(ie,ee),ie},le.createEllipse=function(te,ee,ie){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(te/2).toString()),ue.setAttribute("cy",(ee/2).toString()),ue.setAttribute("rx",(te/2).toString()),ue.setAttribute("ry",(ee/2).toString()),ie&&le.setAttributes(ue,ie),ue},le.createGroup=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&le.setAttributes(ee,te),ee},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(te,ee,ie,ue,ne,be,gt){var ye=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(ye,[["id",te],["orient",ee],["markerWidth",ie.toString()],["markerHeight",ue.toString()],["refX",ne.toString()],["refY",be.toString()]]),ye.appendChild(gt),ye},le.createText=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),te&&le.setAttributes(ee,te),ee},le.createTSpan=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=te,ee&&le.setAttributes(ie,ee),ie},le.createImage=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&le.setAttributes(ee,te),ee},le.createPoint=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=te,ie.y=ee,ie},le.createPath=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",te),ee&&le.setAttributes(ie,ee),ie},le}(),ge=function(){function le(){}return le.addKey=function(te){le.key=te},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),lt=function(){function le(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return le.prototype.rasterize=function(te,ee,ie){var ue=this;return new Promise(function(ne){var be=ie!==void 0?ie:document.createElement("canvas");te===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var gt=document.createElementNS("http://www.w3.org/2000/svg","svg");gt.setAttribute("xmlns","http://www.w3.org/2000/svg"),gt.setAttribute("width",ee.width.baseVal.valueAsString),gt.setAttribute("height",ee.height.baseVal.valueAsString),gt.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),gt.innerHTML=ee.innerHTML,ue.naturalSize===!0?(gt.width.baseVal.value=te.naturalWidth,gt.height.baseVal.value=te.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(gt.width.baseVal.value=ue.width,gt.height.baseVal.value=ue.height),be.width=gt.width.baseVal.value,be.height=gt.height.baseVal.value;var ye=gt.outerHTML,Pe=be.getContext("2d");ue.markersOnly!==!0&&Pe.drawImage(te,0,0,be.width,be.height);var pe=window.URL,ut=new Image(be.width,be.height);ut.setAttribute("crossOrigin","anonymous");var dt=new Blob([ye],{type:"image/svg+xml"}),vt=pe.createObjectURL(dt);ut.onload=function(){Pe.drawImage(ut,0,0),pe.revokeObjectURL(vt);var Dt=be.toDataURL(ue.imageType,ue.imageQuality);ne(Dt)},ut.src=vt})},le}(),Re=function(){},Ie=function(){function le(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},le.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new We("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new We("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new We("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Ee("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Ee("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},le.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),We=function(le,te){this.selector=le,this.style=te},Ee=function(le,te){this.localName=le,this.style=te},at=function(){function le(te,ee,ie,ue,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=ee,this.markerItems=ie,this.uiStyleSettings=ue,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return le.prototype.show=function(te){var ee=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ie,'<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(ne){var be=document.createElement("div");be.className=""+ee.toolbarButtonStyleClass.name,be.setAttribute("data-type-name",ne.typeName),be.innerHTML=ne.icon,be.addEventListener("click",function(){ee.markerToolbarButtonClicked(be,ne)}),ee.buttons.push(be),ee.markerButtons.push(be)}),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 ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'<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(ue,'<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()},le.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},le.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ee=0;ee<this.markerButtons.length;ee++)ee<te||ee===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},le.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")},le.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(ee){ee.className=ee.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},le.prototype.addActionButton=function(te,ee,ie){var ue=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=ee,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){ue.actionToolbarButtonClicked(ne,ie)}),ie){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ee("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 Ee("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ee("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ee("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 Ee("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ee("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
padding: `+te+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ee("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ee("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},le.prototype.markerToolbarButtonClicked=function(te,ee){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(te,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(te){var ee=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},le.prototype.setCurrentMarker=function(te){var ee=this;this.currentMarker=te,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){ee.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},le}(),rt=function(){function le(te,ee,ie,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=ee,this.uiStyleSettings=ie,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new Ee("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 Ee("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ee("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ee("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ee("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 Ee("toolbox-panel-row_colors",`
|
|
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ee("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
padding: `+ee+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ee("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ee("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new We("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new We("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},le.prototype.show=function(te){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(te){var ee,ie,ue=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var be;ne.uiStyleSettings=ue.uiStyleSettings;var gt=document.createElement("div");gt.className=ue.toolboxButtonStyleClass.name+" "+((be=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:ue.toolboxButtonStyleColorsClass.name),gt.innerHTML=ne.icon,gt.title=ne.title,gt.addEventListener("click",function(){ue.panelButtonClick(ne)}),ue.panelButtons.push(gt),ue.buttonRow.appendChild(gt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(te){var ee=this,ie=-1;if(te!==this.activePanel){ie=this.panels.indexOf(te),this.panelRow.innerHTML="";var ue=te.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),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=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,be){var gt,ye;ne.className=ee.toolboxButtonStyleClass.name+" "+(be===ie?""+((gt=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&>!==void 0?gt:ee.toolboxActiveButtonStyleColorsClass.name):""+((ye=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:ee.toolboxButtonStyleColorsClass.name))})},le}(),ct=function(le,te){this.title=le,this.icon=te},Ge=function(le){function te(ee,ie,ue,ne){var be=le.call(this,ee,ne||'<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 be.colors=[],be.addTransparent=!1,be.colorBoxes=[],be.colors=ie,be.currentColor=ue,be.setCurrentColor=be.setCurrentColor.bind(be),be.getColorBox=be.getColorBox.bind(be),be}return He(te,le),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ne=ee.getColorBox(ue);ie.appendChild(ne),ee.colorBoxes.push(ne)}),ie},te.prototype.getColorBox=function(ee){var ie=this,ue=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ue,be=document.createElement("div");be.style.display="inline-block",be.style.boxSizing="content-box",be.style.width=ne-2+"px",be.style.height=ne-2+"px",be.style.padding="1px",be.style.marginRight="2px",be.style.marginBottom="2px",be.style.borderWidth="2px",be.style.borderStyle="solid",be.style.borderRadius=(ne+2)/2+"px",be.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",be.addEventListener("click",function(){ie.setCurrentColor(ee,be)});var gt=document.createElement("div");return gt.style.display="inline-block",gt.style.width=ne-2+"px",gt.style.height=ne-2+"px",gt.style.backgroundColor=ee,gt.style.borderRadius=ne/2+"px",ee==="transparent"&&(gt.style.fill=this.uiStyleSettings.toolboxAccentColor,gt.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>`),be.appendChild(gt),be},te.prototype.setCurrentColor=function(ee,ie){var ue=this;this.currentColor=ee,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},te}(ct),Ue=function(){function le(te,ee,ie){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=ee,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(te){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(te,ee){},le.prototype.dblClick=function(te,ee){},le.prototype.manipulate=function(te){},le.prototype.pointerUp=function(te){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},le.prototype.scale=function(te,ee){},le.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},le.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),Je=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},le}(),Ye=function(){function le(){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 le.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},le}(),Tt=function(){function le(){}return le.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},le.toSVGMatrix=function(te,ee){return te.a=ee.a,te.b=ee.b,te.c=ee.c,te.d=ee.d,te.e=ee.e,te.f=ee.f,te},le}(),Le=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(we.createTransform()),ne.setupControlBox(),ne}return He(te,le),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(ee){this._visual=ee;var ie=we.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!le.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ue=this.unrotatePoint(ee);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(ee){var ie=this.state;le.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},te.prototype.manipulate=function(ee){var ie=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(ee)},te.prototype.resize=function(ee){var ie=this.manipulationStartLeft,ue=this.manipulationStartWidth,ne=this.manipulationStartTop,be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+ee.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+ee.y-this.manipulationStartY,be=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:be=this.manipulationStartHeight+ee.y-this.manipulationStartY}ue>=0?(this.left=ie,this.width=ue):(this.left=ie+ue,this.width=-ue),be>=0?(this.top=ne,this.height=be):(this.top=ne+be,this.height=-be),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var ie=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},te.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},te.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM(),ue=we.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.y}},te.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var ie=this.container.getCTM();ie=ie.inverse();var ue=we.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.y}},te.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=we.createGroup();var ee=we.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),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 Je,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,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()},te.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()},te.prototype.createGrip=function(){var ee=new Ye;return ee.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,ie=-ee/2,ue=ie,ne=(this.width+this.CB_DISTANCE)/2-ee/2,be=(this.height+this.CB_DISTANCE)/2-ee/2,gt=this.height+this.CB_DISTANCE-ee/2,ye=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,ue),this.positionGrip(this.controlGrips.topCenter.visual,ne,ue),this.positionGrip(this.controlGrips.topRight.visual,ye,ue),this.positionGrip(this.controlGrips.centerLeft.visual,ie,be),this.positionGrip(this.controlGrips.centerRight.visual,ye,be),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,gt),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,gt),this.positionGrip(this.controlGrips.bottomRight.visual,ye,gt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ue-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(ee,ie,ue){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,ue),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.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)},le.prototype.getState.call(this))},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var ie=ee;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Tt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Tt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie);var ue=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ue.x*ee,y:ue.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*ee,this.height=this.height*ie,this.adjustControlBox()},te}(Ue),Ze=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.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)},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){le.prototype.setSize.call(this),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.setSize()},te.title="Rectangle marker",te}(Le),Ct=function(le){function te(ee,ie,ue,ne){var be=le.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return be.widths=[],be.widthBoxes=[],be.widths=ie,be.currentWidth=ue,be.setCurrentWidth=be.setCurrentWidth.bind(be),be}return He(te,le),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ue===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentWidth(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.innerText=ue.toString(),be.style.marginRight="5px",ne.appendChild(be);var gt=document.createElement("div");gt.style.minHeight="20px",gt.style.flexGrow="2",gt.style.display="flex",gt.style.alignItems="center";var ye=document.createElement("hr");ye.style.minWidth="20px",ye.style.border="0px",ye.style.borderTop=ue+"px solid "+ee.uiStyleSettings.toolboxColor,ye.style.flexGrow="2",gt.appendChild(ye),ne.appendChild(gt),ee.widthBoxes.push(ne)}),ie},te.prototype.setCurrentWidth=function(ee,ie){var ue=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(ct),Fe=function(le){function te(ee,ie,ue,ne){var be=le.call(this,ee,ne||'<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 be.styles=[],be.styleBoxes=[],be.styles=ie,be.currentStyle=ue,be.setCurrentStyle=be.setCurrentStyle.bind(be),be}return He(te,le),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/ee.styles.length-5+"%",ne.style.borderColor=ue===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentStyle(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var gt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
|
|
</svg>`;be.innerHTML=gt,ne.appendChild(be),ee.styleBoxes.push(ne)}),ie},te.prototype.setCurrentStyle=function(ee,ie){var ue=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(ct),et=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Ge("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ct("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return He(te,le),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(Ze),Ae=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"},Qe=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!!le.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.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(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(ee){var ie=this.state;le.prototype.pointerUp.call(this,ee),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(ee),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},te.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=we.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var ee=new Ye;return ee.visual.transform.baseVal.appendItem(we.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},te.prototype.positionGrip=function(ee,ie,ue){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(ie,ue),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var ie=ee;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.x1=this.x1*ee,this.y1=this.y1*ie,this.x2=this.x2*ee,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},te}(Ue),Mt=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Ge("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ct("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.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)},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.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()]]))},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var ie=ee;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(Qe),wt=function(le){function te(ee,ie,ue,ne){var be=le.call(this,ee,ne||'<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 be.fonts=[],be.fontBoxes=[],be.fonts=ie,be.currentFont=ue,be.setCurrentFont=be.setCurrentFont.bind(be),be}return He(te,le),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(ue){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/ee.fonts.length-5+"%",ne.style.borderColor=ue===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentFont(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=ue,be.style.overflow="hidden";var gt=document.createElement("div");gt.style.whiteSpace="nowrap",gt.style.overflow="hidden",gt.style.textOverflow="ellipsis",gt.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild(gt),ne.appendChild(be),ee.fontBoxes.push(ne)}),ie},te.prototype.setCurrentFont=function(ee,ie){var ue=this;this.currentFont=ee,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(ct),$t=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=ue.defaultColor,ne.fontFamily=ue.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new Ge("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new wt("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return He(te,le),te.prototype.ownsTarget=function(ee){if(le.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(ue){ue===ee&&(ie=!0)}),ie},te.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()},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.renderText=function(){var ee=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(ie){ee.textElement.appendChild(we.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),ie=1;if(ee.width>0&&ee.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/ee.width,ne=(1*this.height-this.height*this.padding*2/100)/ee.height;ie=Math.min(ue,ne)}return ie},te.prototype.getTextPosition=function(ee){var ie=this.textElement.getBBox(),ue=0,ne=0;return ie.width>0&&ie.height>0&&(ue=(this.width-ie.width*ee)/2,ne=this.height/2-ie.height*ee/2),{x:ue,y:ne}},te.prototype.sizeText=function(){var ee=this.textElement.getBBox(),ie=this.getTextScale(),ue=this.getTextPosition(ie);ue.y-=ee.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){le.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()]]))},te.prototype.pointerUp=function(ee){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,ee),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var ee=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(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,ee.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var ue=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ue)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ee=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),ne={x:ue.width*ee,y:ue.height*ee};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*ee,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},te.prototype.dblClick=function(ee,ie){le.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&we.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},te.prototype.setFont=function(ee){this.textElement&&we.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.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>',te}(Le),Ht=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ue.defaultColor,ne.lineWidth=ue.defaultStrokeWidth,ne.pixelRatio=ue.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new Ge("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ct("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=we.createGroup(),this.drawingImage=we.createImage(),this.visual.appendChild(this.drawingImage);var ee=we.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){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(ee.x,ee.y),this.drawing=!0):le.prototype.pointerDown.call(this,ee,ie)},te.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),we.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),we.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,ee)},te.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)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var ee=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=ie[0],ne=ie[1],be=ie[2],gt=ie[3],ye=!1,Pe=0;Pe<this.canvasElement.height;Pe++)for(var pe=0;pe<this.canvasElement.width;pe++)ee.data[Pe*this.canvasElement.width*4+4*pe+3]>0&&(ye=!0,Pe<ne&&(ne=Pe),pe<ue&&(ue=pe),Pe>gt&&(gt=Pe),pe>be&&(be=pe));if(ye){this.left=ue/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(be-ue)/this.pixelRatio,this.height=(gt-ne)/this.pixelRatio;var ut=document.createElement("canvas");ut.width=be-ue,ut.height=gt-ne,ut.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ne,be-ue,gt-ne),0,0),this.drawingImgUrl=ut.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.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})},te.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},te.prototype.setLineWidth=function(ee){this.lineWidth=ee},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),le.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.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>',te}(Le),ve=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ue||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return He(te,le),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ue=function(gt){var ye="both";switch(gt){case 0:ye="both";break;case 1:ye="start";break;case 2:ye="end";break;case 3:ye="none"}var Pe=document.createElement("div");if(Pe.style.display="flex",Pe.style.flexGrow="2",Pe.style.alignItems="center",Pe.style.justifyContent="space-between",Pe.style.padding="5px",Pe.style.borderWidth="2px",Pe.style.borderStyle="solid",Pe.style.borderColor=ye===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Pe.addEventListener("click",function(){ee.setCurrentType(ye,Pe)}),ie.appendChild(Pe),ye==="both"||ye==="start"){var pe=document.createElement("div");pe.style.display="flex",pe.style.alignItems="center",pe.style.minHeight="20px",pe.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="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,pe.style.marginLeft="5px",Pe.appendChild(pe)}var ut=document.createElement("div");ut.style.display="flex",ut.style.alignItems="center",ut.style.minHeight="20px",ut.style.flexGrow="2";var dt=document.createElement("hr");if(dt.style.minWidth="20px",dt.style.border="0px",dt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),dt.style.flexGrow="2",ut.appendChild(dt),Pe.appendChild(ut),ye==="both"||ye==="end"){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.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="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,vt.style.marginRight="5px",Pe.appendChild(vt)}ne.typeBoxes.push(Pe)},ne=this,be=0;be<4;be++)ue(be);return ie},te.prototype.setCurrentType=function(ee,ie){var ue=this;this.currentType=ee,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(ct),he=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new ve("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},te.prototype.getArrowPoints=function(ee,ie){var ue=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return ee-ue/2+","+(ie+ne/2)+" "+ee+","+(ie-ne/2)+" "+(ee+ue/2)+","+(ie+ne/2)},te.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)},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(le.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 ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},te.prototype.setArrowType=function(ee){this.arrowType=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var ie=ee;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(Mt),mt=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.fillColor=ue.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Ge("Color",ue.defaultColorSet,ue.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return He(te,le),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(Ze),Kt=function(le){function te(ee,ie,ue,ne){var be=le.call(this,ee,ne||'<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 be.opacities=[],be.opacityBoxes=[],be.opacities=ie,be.currentOpacity=ue,be.setCurrentOpacity=be.setCurrentOpacity.bind(be),be}return He(te,le),te.prototype.getUi=function(){var ee=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(ue){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ue===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentOpacity(ue,ne)}),ie.appendChild(ne);var be=document.createElement("div");be.innerText=100*ue+"%",ne.appendChild(be),ee.opacityBoxes.push(ne)}),ie},te.prototype.setCurrentOpacity=function(ee,ie){var ue=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(ct),Ft=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ue.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ue.defaultHighlightOpacity,ne.fillPanel=new Ge("Color",ue.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Kt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return He(te,le),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="HighlightMarker",te.title="Highlight marker",te.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>',te}(mt),Ne='<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>',ot='<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>',ft=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=ue.defaultStrokeColor,ne.bgColor=ue.defaultFillColor,ne.fontFamily=ue.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new Ge("Text color",ue.defaultColorSet,ne.color,Ne),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Ge("Fill color",ue.defaultColorSet,ne.bgColor,ot),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new wt("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new Ye,ne.tipGrip.visual.transform.baseVal.appendItem(we.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return He(te,le),te.prototype.ownsTarget=function(ee){return le.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.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)},te.prototype.pointerDown=function(ee,ie){this.state==="new"&&le.prototype.pointerDown.call(this,ee,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,ee,ie)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,ee);else{var ie=this.state==="creating";le.prototype.pointerUp.call(this,ee),this.setTipPoints(ie),this.positionTip()}},te.prototype.manipulate=function(ee){if(this.tipMoving){var ie=this.unrotatePoint(ee);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(we.setAttributes(this.bgRectangle,[["fill",ee]]),we.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},te.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},te.prototype.setTipPoints=function(ee){ee===void 0&&(ee=!1);var ie=Math.min(this.height/2,15),ue=this.height/5;ee&&(this.tipPosition={x:ie+ue/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+ue,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ue,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ue,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-ue},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-ue})},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.positionTip()},te.prototype.positionTip=function(){we.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),le.prototype.select.call(this)},te.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,le.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.tipPosition={x:this.tipPosition.x*ee,y:this.tipPosition.y*ie},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.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>',te}($t),rn=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new Ge("Line color",de(ue.defaultColorSet,["transparent"]),ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ge("Fill color",de(ue.defaultColorSet,["transparent"]),ne.fillColor,ot),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ct("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Kt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.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)},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){le.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()]])},te.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&we.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&we.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&we.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&we.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&we.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.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>',te}(Le),kt=function(le){function te(ee,ie,ue){return le.call(this,ee,ie,ue)||this}return He(te,le),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},te.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)},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(le.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 ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.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>',te}(Mt),_e=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.strokePanel.colors=ue.defaultColorSet,ne.fillColor="transparent",ne}return He(te,le),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.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>',te}(rn),Ce=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),ze=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new Ge("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ct("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.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)},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.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()]]))},te.prototype.setupControlBox=function(){le.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)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){le.prototype.positionGrips.call(this);var ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/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()))},te.prototype.manipulate=function(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),le.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),le.prototype.resize.call(this,ee),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},te.prototype.scale=function(ee,ie){this.curveX=this.curveX*ee,this.curveY=this.curveY*ie,le.prototype.scale.call(this,ee,ie)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var ie=ee;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.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>',te}(Qe),st=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,ie,ue)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.fillColor=ue.defaultFillColor,ne.textColor=ue.defaultStrokeColor,ne.fontFamily=ue.defaultFontFamily,ne.fontSize=ue.defaultCaptionFontSize,ne.captionText=ue.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new Ge("Line color",de(ue.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ge("Fill color",de(ue.defaultColorSet,["transparent"]),ne.fillColor,ot),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ct("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Fe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new wt("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Ge("Text color",ue.defaultColorSet,ne.textColor,Ne),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return He(te,le),te.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.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()},te.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,ie){le.prototype.pointerDown.call(this,ee,ie),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},te.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.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')"]])},te.prototype.showTextEditor=function(){var ee=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(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.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"))},te.prototype.finishTextEditing=function(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(ee){this.captionElement&&we.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(ee){this.captionElement&&we.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){le.prototype.setSize.call(this),we.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(ee,ie){le.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&we.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&we.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&we.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&we.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=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},le.prototype.getState.call(this));return ee.typeName=this.typeName,ee},te.prototype.restoreState=function(ee){var ie=ee;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){le.prototype.scale.call(this,ee,ie),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.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>',te}(Le),Te=function(){function le(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),Ve=function(le){function te(ee,ie,ue){var ne=le.call(this,ee,!1)||this;return ne.dataUrl=ie,ne.state=ue,ne}return He(te,le),te}(Te),$e=function(le){function te(ee,ie,ue){ue===void 0&&(ue=!1);var ne=le.call(this,ee,ue)||this;return ne.marker=ie,ne}return He(te,le),te}(Te),pt=function(){function le(){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 le.prototype.addEventListener=function(te,ee){this[te].push(ee)},le.prototype.removeEventListener=function(te,ee){var ie=this[te].indexOf(ee);ie>-1&&this[te].splice(ie,1)},le}(),St=function(){function le(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ae,this._isOpen=!1,this.undoRedoManager=new Ce,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 pt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new Ie(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.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(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[et,Ht,he,$t,_e,rn,Ft,ft,kt,mt,Mt,ze,st]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[et,Ht,he,$t,rn,Ft,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[et,Ht,he,$t,Ft]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var ee=this;this._availableMarkerTypes.splice(0),te.forEach(function(ie){if(typeof ie=="string"){var ue=ee.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});ue!==void 0&&ee._availableMarkerTypes.push(ue)}else ee._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ge.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Re.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Re.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new Te(te))})},le.prototype.render=function(){return Ke(this,void 0,void 0,function(){var te;return Se(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(te=new lt).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ee.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},le.prototype.close=function(te){var ee=this;if(te===void 0&&(te=!1),this.isOpen){var ie=!1;te||this.eventListeners.beforeclose.forEach(function(ue){var ne=new Te(ee,!0);ue(ne),ne.defaultPrevented&&(ie=!0)}),ie||(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(ue){return ue(new Te(ee))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];(te=this._availableMarkerTypes).push.apply(te,ee)},le.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(ee){te(ee.dataUrl,ee.state)})},le.prototype.removeRenderEventListener=function(te){},le.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},le.prototype.removeCloseEventListener=function(te){},le.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},le.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,ee=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,ie=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(ee,ie)},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.prototype.resize=function(te,ee){this._isResizing=!0;var ie=te/this.imageWidth,ue=ee/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(ee),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(ie,ue),this._isResizing=!1},le.prototype.scaleMarkers=function(te,ee){var ie,ue=this;this._currentMarker&&this._currentMarker instanceof $t?this._currentMarker.scale(te,ee):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ue._currentMarker&&ne.scale(te,ee)}),ie!==void 0&&this.setCurrentMarker(ie)},le.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"},le.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=te.left-ee.left,this.top=te.top-ee.top},le.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)},le.prototype.addDefs=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];this.defs=we.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,ee)},le.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},le.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)},le.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},le.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},le.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)},le.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},le.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)},le.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 te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.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>',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.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")},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 te=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=te+"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 at(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 rt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},le.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},le.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())},le.prototype.toolbarButtonClicked=function(te,ee){if(te==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(te==="action")switch(ee){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()}},le.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ne=new $e(te,te._currentMarker,!0);ue(ne),ne.defaultPrevented&&(ee=!0)}),!ee){var ie=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(ue){return ue(new $e(te,ie))})}}},le.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(be){var gt=new $e(te,void 0,!0);be(gt),gt.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var ie=function(be){var gt=ue.markers[be];ue.setCurrentMarker(ue.markers[be]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(ye){return ye(new $e(te,gt))})},ue=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var te;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=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},le.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)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ee=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===ee.width&&ie.height===ee.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Te(te))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ne){return ne(new Te(te))})}},le.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},le.prototype.undoStep=function(){var te=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new Te(te))}))},le.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},le.prototype.redoStep=function(){var te=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new Te(te))}))},le.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},le.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},le.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var te,ee,ie=this;return Se(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return te=ue.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Ve(ie,te,ee))}),this.close(!0),[2]}})})},le.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return ee.markers.push(ie.getState())}),ee},le.prototype.restoreState=function(te){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(ie){var ue=ee._availableMarkerTypes.find(function(be){return be.typeName===ie.typeName});if(ue!==void 0){var ne=ee.addNewMarker(ue);ne.restoreState(ie),ee.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new Te(ee))})},le.prototype.addNewMarker=function(te){var ee=we.createGroup();return this.markerImage.appendChild(ee),new te(ee,this.overlayContainer,this.settings)},le.prototype.createNewMarker=function(te){var ee,ie=this;(ee=typeof te=="string"?this._availableMarkerTypes.find(function(ue){return ue.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),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(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ue){return ue(new $e(ie,ie._currentMarker))}))},le.prototype.markerCreated=function(te){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Ht&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ht):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new $e(ee,ee._currentMarker))})},le.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},le.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},le.prototype.markerStateChanged=function(te){var ee=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new $e(ee,te))})},le.prototype.setCurrentMarker=function(te){var ee=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new $e(ee,ee._currentMarker))})),this._currentMarker=te,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(ie){return ie(new $e(ee,ee._currentMarker))}))},le.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ee=this.markers.find(function(ie){return ie.ownsTarget(te.target)});ee!==void 0?(this.setCurrentMarker(ee),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},le.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var ee=this.markers.find(function(ie){return ie.ownsTarget(te.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},le.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&this.panTo({x:te.clientX,y:te.clientY}))},le.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(te,ee){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(ee-ie.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"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()},le.prototype.addLicenseKey=function(te){ge.addKey(te)},le.prototype.addEventListener=function(te,ee){this.eventListeners.addEventListener(te,ee)},le.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},le.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ee){return ee(new Te(te))}))},le.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ee){return ee(new Te(te))}))},le.instanceCounter=0,le}(),Et=fe(97013),Bt=fe(31735),Nt=(le,te,ee)=>new Promise((ie,ue)=>{var ne=ye=>{try{gt(ee.next(ye))}catch(Pe){ue(Pe)}},be=ye=>{try{gt(ee.throw(ye))}catch(Pe){ue(Pe)}},gt=ye=>ye.done?ie(ye.value):Promise.resolve(ye.value).then(ne,be);gt((ee=ee.apply(le,te)).next())}),Qt=({data:le,className:te,fullWidth:ee,style:ie={},onClose:ue,onOk:ne,showFullTools:be,noAssociationId:gt})=>{const ye=(0,oe.useRef)(null),Pe=(0,oe.useRef)(null),pe=(0,oe.useRef)(null),ut=(0,oe.useRef)(null),[dt,vt]=(0,oe.useState)(!1),[Dt,jt]=(0,oe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,oe.useEffect)(()=>(pe.current||(pe.current=document.createElement("style"),document.head.appendChild(pe.current)),le!=null&&le.visible?(document.body.setAttribute("data-custom","y-hidden"),pe.current.innerHTML=" html { overflow-y: hidden; }",le!=null&&le.src&&It()):(document.body.removeAttribute("data-custom"),pe.current&&(document.head.removeChild(pe.current),pe.current=null)),()=>{document.body.removeAttribute("data-custom"),pe.current&&(document.head.removeChild(pe.current),pe.current=null)}),[le==null?void 0:le.visible]);const It=()=>Nt(void 0,null,function*(){vt(!0),jt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ln=yield(0,Bt.ZJ)(le==null?void 0:le.src);ye.current.src="",ye.current.src=Ln,ye.current.onload=function(){Sn()},vt(!1),jt("")}),Xt=Ln=>Nt(void 0,null,function*(){vt(!0),jt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Tn=yield(0,Et.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:le.title,file:Ln.dataUrl}});Tn!=null&&Tn.id&&!gt?(yield(0,Et.ZP)(`/api/attachments/${le.id}/add_subitem.json`,{method:"post",body:{subitem_id:Tn==null?void 0:Tn.id,settings:JSON.stringify(Ln.state)}})).status===0&&ne():Tn!=null&&Tn.id&&ne(Tn),vt(!1),jt("")}),Fn=()=>{const Ln=document.querySelector('a[href="https://markerjs.com/"]');Ln&&Ln.parentNode&&(Ln.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(In=>{const Dn=document.querySelector(In.name);Dn&&Dn.setAttribute("title",In.title)})},Sn=()=>{Pe.current=new St(ye.current),Pe.current.targetRoot=ut.current,Pe.current.addEventListener("render",Xt),Pe.current.addEventListener("beforeclose",ue),be&&(Pe.current.availableMarkerTypes=Pe.current.ALL_MARKER_TYPES,Pe.current.uiStyleSettings.redoButtonVisible=!0,Pe.current.uiStyleSettings.notesButtonVisible=!0,Pe.current.uiStyleSettings.zoomButtonVisible=!0,Pe.current.uiStyleSettings.zoomOutButtonVisible=!0,Pe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Pe.current.uiStyleSettings,Pe.current.show(),le!=null&&le.snapshotData&&Pe.current.restoreState(le.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Fn()},300)};return oe.createElement(oe.Fragment,null,(le==null?void 0:le.visible)&&oe.createElement(me.Z,{spinning:dt,tip:Dt,style:{position:"absolute",width:"100vw"}},oe.createElement("div",{ref:ut,className:Xe()(ht.imageDimensions,te,ee?ht.fullWidth:""),style:ie},oe.createElement("img",{className:ht.img,ref:ye}))))}},50047:function(Zt,Ut,fe){"use strict";var oe=fe(59301),ht=fe(77019),Me=fe(5269),Xe=fe(20554),me=fe(7939),je=fe(59944),He=fe(40862),Ke=fe(48136),Se=fe(59301);const de=(0,oe.forwardRef)(({callback:we,showSaveButton:ge,value:lt=""},Re)=>{const Ie=(0,oe.useRef)(),We=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Ee=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],at=Ge=>{Ie.current.setValue(Ie.current.getValue()+" "+Ge.value+" ")},rt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Se.createElement(ht.Z,{className:He.Z.lists,gutter:[10,10]},We.map((Ge,Ue)=>Se.createElement(Me.Z,{flex:"110px",className:He.Z.item},Se.createElement("div",null,Se.createElement(je.Z,{value:`$$${Ge.value}$$`}),Ge.name),Se.createElement("div",{className:He.Z.children},Ge.children.map((Je,Ye)=>Se.createElement("div",{key:Ye},Se.createElement("h1",null,Je.name),Se.createElement(ht.Z,{gutter:[10,10]},Je.data.map((Tt,Le)=>Se.createElement(Me.Z,{key:Le,onClick:()=>at(Tt),className:He.Z.diamond},Se.createElement(je.Z,{value:"`$$"+Tt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Se.createElement(ht.Z,{className:He.Z.lists,gutter:[10,10]},Ee.map((Ge,Ue)=>Se.createElement(Me.Z,{flex:"110px",className:He.Z.item},Se.createElement("div",null,Se.createElement(je.Z,{value:"`$$"+Ge.value+"$$`"}),Ge.name),Se.createElement("div",{className:He.Z.children},Ge.children.map((Je,Ye)=>Se.createElement("div",{key:Ye},Je.name&&Se.createElement("h1",null,Je.name),Se.createElement(ht.Z,{gutter:[10,10]},Je.data.map((Tt,Le)=>Se.createElement(Me.Z,{key:Le,onClick:()=>at(Tt),className:He.Z.diamond},Se.createElement(je.Z,{value:"`$$"+Tt.value+"$$`"}))))))))))}],ct=()=>{var Ge=document.createElement("div");Ge.innerHTML=Ie.current.getValue();var Ue=Ge.innerText;return we&&we(Ue),Ue};return(0,oe.useImperativeHandle)(Re,()=>({getData:ct})),Se.createElement("div",{className:He.Z.mathWrap},Se.createElement(Xe.default,{defaultActiveKey:"1",items:rt}),Se.createElement("math-field",{locale:"zh_cn",className:He.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ie,style:{width:800,marginTop:30,fontSize:18}},lt||""),ge&&Se.createElement("div",{className:He.Z.button},Se.createElement(me.ZP,{size:"large",onClick:ct,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ut.Z=de},59243:function(Zt,Ut,fe){"use strict";var oe=fe(59301),ht=fe(93314),Me=fe(7939),Xe=Object.defineProperty,me=Object.defineProperties,je=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(Re,Ie,We)=>Ie in Re?Xe(Re,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):Re[Ie]=We,we=(Re,Ie)=>{for(var We in Ie||(Ie={}))Ke.call(Ie,We)&&de(Re,We,Ie[We]);if(He)for(var We of He(Ie))Se.call(Ie,We)&&de(Re,We,Ie[We]);return Re},ge=(Re,Ie)=>me(Re,je(Ie));const lt=({img:Re,buttonProps:Ie={},styles:We={},customText:Ee,ButtonText:at,ButtonClick:rt,Buttonclass:ct,ButtonTwo:Ge,imgStyles:Ue,loading:Je=!1,className:Ye=""})=>oe.createElement("section",{className:`tc animated fadeIn ${Ye}`,style:we({color:"#999",margin:"100px auto",visibility:Je?"hidden":"visible"},We)},oe.createElement("img",{src:Re||ht,style:ge(we({},Ue),{pointerEvents:"none",userSelect:"none"})}),oe.createElement("p",{className:"mt20 font14"},Ee||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&oe.createElement(Me.ZP,we({className:ct,onClick:rt},Ie),at),Ge&&Ge);Ut.Z=lt},47199:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return ct}});var oe=fe(59301),ht={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Me=fe(7939),Xe=fe(70557),me=fe(58478),je=fe(25399),He=fe(31735),Ke=fe(22167),Se=fe(59243),de=fe(26869),we=fe(38609),ge=fe(59301),lt=Object.defineProperty,Re=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ee=(Ge,Ue,Je)=>Ue in Ge?lt(Ge,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Ge[Ue]=Je,at=(Ge,Ue)=>{for(var Je in Ue||(Ue={}))Ie.call(Ue,Je)&&Ee(Ge,Je,Ue[Je]);if(Re)for(var Je of Re(Ue))We.call(Ue,Je)&&Ee(Ge,Je,Ue[Je]);return Ge},rt=(Ge,Ue,Je)=>new Promise((Ye,Tt)=>{var Le=Fe=>{try{Ct(Je.next(Fe))}catch(et){Tt(et)}},Ze=Fe=>{try{Ct(Je.throw(Fe))}catch(et){Tt(et)}},Ct=Fe=>Fe.done?Ye(Fe.value):Promise.resolve(Fe.value).then(Le,Ze);Ct((Je=Je.apply(Ge,Ue)).next())}),ct=({editOffice:Ge="view",data:Ue,issaver:Je,onSaver:Ye,theme:Tt,type:Le,filename:Ze,monacoEditor:Ct,className:Fe,style:et,close:Ae,onClose:Qe,hasMask:Mt,disabledDownload:wt,onImgDimensions:$t,showNodata:Ht,recordInfo:ve})=>{const[he,mt]=(0,oe.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Kt,Ft]=(0,oe.useState)(""),[Ne,ot]=(0,oe.useState)(),ft=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,_e=10*(1024*1024),Ce=(0,oe.useRef)();Ue!=null&&Ue.startsWith("/api")&&Le!=="txt"&&(Ue=de.Z.API_SERVER+Ue);const ze=pt=>pt.substring(pt.lastIndexOf("/")+1).split(".").pop();Ze&&Ct&&(Ct.filename=Ze),(0,oe.useEffect)(()=>{var pt,St;const Et=(St=(pt=document.cookie)==null?void 0:pt.replace(/\s/g,""))==null?void 0:St.split(";");Et==null||Et.map(Bt=>{let Nt=Bt.split("=");Nt[0]==="_educoder_session"&&Ft(Nt[1])})},[]),(0,oe.useEffect)(()=>{Le==="office"&&(Ue.indexOf("bigfilescdn.")>-1||Ue.indexOf("bigfiles1")>-1?ot({url:Ue,fileType:ze(Ue),model:Ue.indexOf("model=edit")?"edit":"view"}):Te())},[Le,Ue]);function st(pt){return rt(this,null,function*(){pt.data.type==="pdfdata"&&(Ye(pt.data.data),window.removeEventListener("message",st,!1)),console.log("mess---:",pt.data)})}const Te=()=>rt(void 0,null,function*(){console.log("data:",Ue);let pt=Ue;Ue.startsWith("http")||(pt=location.origin+pt);let St=new URL(pt).pathname.split("/").pop();const Et=yield(0,Ke.gJ)({attachment_id:St});Et.url=rn+Et.url,ot(Et)}),Ve=()=>{if(Ue.startsWith("http")||Ue.startsWith("blob:")){$e();return}(0,He.Sv)(Ze||"educoder",Ue,Ze)},$e=()=>{ve&&(0,we.fc)({id:ve==null?void 0:ve.id,watch_type:1,course_id:ve==null?void 0:ve.course_id}),(0,He.Nd)(Ze||"educoder",decodeURIComponent(Ue))};return ge.createElement("div",{style:at({},et||{}),className:`${Mt&&ht.bgBlack} ${Le?ht.wrp:"hide"}`},Ae&&ge.createElement("div",{className:ht.close,ref:Ce},!!$t&&ge.createElement(je.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ce.current},ge.createElement("span",{onClick:()=>{Qe(),$t()}},ge.createElement("i",{className:"icon-yulanpizhu"}))),!wt&&ge.createElement(je.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ce.current},ge.createElement("span",{onClick:$e},ge.createElement("i",{className:"icon-quxiaozhiding"}))),Je&&ge.createElement(je.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ce.current},ge.createElement("span",{className:"",onClick:()=>{const pt=document.getElementById("pdfiframe");window.addEventListener("message",st,!1),setTimeout(()=>{pt.contentWindow.postMessage("getData","*")},300)}},ge.createElement("i",{className:"icon-baocun"}))),ge.createElement(je.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ce.current},ge.createElement("span",{className:"",onClick:()=>{Qe()}},ge.createElement("i",{className:"icon-guanbi1"})))),ge.createElement("div",{className:`${ht[Fe]} ${Fe} ${ht.monaco} ${Le==="txt"?"show":"hide"}`},Le==="txt"&&ge.createElement(ge.Fragment,null,ge.createElement(me.ZP,at({},Ct)))),Le==="audio"&&ge.createElement("audio",{src:`${(Ue==null?void 0:Ue.indexOf("http://"))>-1||(Ue==null?void 0:Ue.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ue}`,autoPlay:!0}),Le==="video"&&ge.createElement(ge.Fragment,null,(Ue==null?void 0:Ue.indexOf("http"))>-1?ge.createElement("video",{controls:!0,src:`${Ue}`,autoPlay:!0}):ge.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ue}`,autoPlay:!0})),Le==="office"&&Ne&&ge.createElement("iframe",{src:`${ft}/office.html?key=${Ne.key}&url=${btoa(Ne.url)}&callbackUrl=${rn+(Ne.callbackUrl||"")}&fileType=${Ne.fileType}&title=${Ne.title||""}&model=${Ge}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!wt}`}),Le==="html"&&ge.createElement("iframe",{src:Ue+"&disposition=inline"}),Le==="pdf"&&Je&&ge.createElement("iframe",{id:"pdfiframe",src:`${ft}/js/pdfview/index.html?filename=${Ze||"educoder.pdf"}&url=${encodeURIComponent(Ue)}&disabledDownload=${!!wt}&model=${Ge}`}),Le==="pdf"&&!Je&&ge.createElement("embed",{className:ht.embed,src:Ue+"#toolbar=0&statusbar=0&navpanes=0&scrollbars=0"}),Le==="image"&&ge.createElement("img",{src:`${(Ue==null?void 0:Ue.indexOf("http://"))>-1||(Ue==null?void 0:Ue.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ue}`}),(Le==="other"||Le==="download")&&ge.createElement(ge.Fragment,null,Ht?ge.createElement(Se.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ge.createElement(Me.ZP,{icon:ge.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ve,disabled:wt},"\u4E0B\u8F7D")}):ge.createElement(Me.ZP,{type:"primary",size:"middle",onClick:Ve,disabled:wt},ge.createElement(Xe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Le==="flowChart"&&ge.createElement("div",{className:"embed"},ge.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${Ue||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},59944:function(Zt,Ut,fe){"use strict";fe.d(Ut,{z:function(){return Ct},Z:function(){return Fe}});var oe=fe(59301),ht=fe(54196),Me=fe(58489),Xe=fe(64018),me=fe(80360),je=fe(26869),He=fe(31735),Ke=fe(15342),Se=fe(44104),de=fe(7939),we=fe(1012),ge=fe(47199),lt=fe(59301),Ie=({html:et})=>{const Ae=(0,oe.useRef)(null),Qe=(0,oe.useRef)(null),Mt=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,oe.useEffect)(()=>{const wt=Ae.current.attachShadow({mode:"open"});Qe.current=document.createElement("div"),Qe.current.className="markdown-body",Qe.current.innerHTML=et,wt.appendChild(Qe.current);const $t=document.createElement("style");return $t.textContent=Mt,wt.appendChild($t),()=>{wt.innerHTML=""}},[]),(0,oe.useEffect)(()=>{Qe.current&&(Qe.current.innerHTML=et)},[et]),lt.createElement("div",{ref:Ae})};function We(et){const Ae=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Qe=new RegExp(`\\b(${Ae.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return et.replace(Qe,"").trim()}var Ee={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},at=Object.defineProperty,rt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ue=(et,Ae,Qe)=>Ae in et?at(et,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):et[Ae]=Qe,Je=(et,Ae)=>{for(var Qe in Ae||(Ae={}))ct.call(Ae,Qe)&&Ue(et,Qe,Ae[Qe]);if(rt)for(var Qe of rt(Ae))Ge.call(Ae,Qe)&&Ue(et,Qe,Ae[Qe]);return et};const Ye="@\u2581\u2581@",Tt="@\u2581@",Le=/<pre[^>]*>/g;function Ze(et){let Ae=document.createElement("div");return Ae.innerHTML=et,Ae.childNodes.length===0?"":Ae.childNodes[0].nodeValue}const Ct=(et,Ae)=>{et=et||"";const Qe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Mt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,wt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,$t=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ae?et.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Qe,(Ht,ve,he,mt,Kt,Ft,Ne)=>{const ot=ve||mt||Ft,ft=he||Kt||Ne||"?";return je.Z.API_SERVER+"/api/attachments/"+ot+ft+"&t="+(0,He.Jn)(ot,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(et=et.replace($t,(Ht,ve,he,mt,Kt,Ft,Ne)=>{const ot=ve||mt||Ft,ft=he||Kt||Ne||"?";return je.Z.API_SERVER+"/attachments/download/"+ot+ft+"&t="+(0,He.Jn)(ot,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(Qe,(Ht,ve,he,mt,Kt,Ft,Ne)=>{const ot=ve||mt||Ft,ft=he||Kt||Ne||"?";return je.Z.API_SERVER+"/api/attachments/"+ot+ft+"&t="+(0,He.Jn)(ot,Date.now())+(Ht.indexOf(")")>-1?")":"&")}).replace(Mt,(Ht,ve,he,mt,Kt)=>{const Ft=ve||mt,Ne=he||Kt||"";return'"'+je.Z.API_SERVER+"/api/attachments/"+Ft+Ne+Ft+Ne+"&t="+(0,He.Jn)(Ft,Date.now())}).replace(wt,(Ht,ve,he,mt,Kt)=>{const Ft=ve||mt,Ne=he||Kt||"";return"("+je.Z.API_SERVER+"/files/uploads/"+Ft+Ne+Ft+Ne+"&t="+(0,He.Jn)(Ft,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),et)};var Fe=({value:et="",edit:Ae=!1,className:Qe,showTextOnly:Mt,showLines:wt,style:$t={},stylesPrev:Ht={},highlightKeywords:ve,showProgramFill:he,isProgramFill:mt,disabledFill:Kt=!1,programFillValue:Ft,openEditor:Ne=()=>{},onFillChange:ot=kt=>{},onFillBlur:ft=()=>{},onFillFocus:rn=()=>{}})=>{let kt=We(String(et||""));const _e=(0,oe.useRef)(),Ce=(0,oe.useRef)(),[ze,st]=(0,oe.useState)(""),[Te,Ve]=(0,oe.useState)("office"),[$e,pt]=(0,oe.useState)([]),St=(0,oe.useRef)("a"+(0,we.Z)()),Et={},Bt=pe=>/<style[\s\S]*?>/i.test(pe||""),Nt=(pe,ut,dt)=>{const vt=document.createElement(pe===Tt?"input":"textarea");vt.style.width="100%",vt.style.height=pe===Tt?"40px":"151px",vt.rows=5,vt.spellcheck=!1,vt.name="edu-program-fill",vt.placeholder="\u8BF7\u8F93\u5165",vt.dataset.id=ut;const Dt=Object.keys(Et).length;return Et[Dt]=vt,`<span class="edu-program-fill-wrap ${pe===Tt?"":"show"}" style="width:${pe===Tt?"600px":"100%"}" title=${dt||""}><span>${vt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function cn(pe){return pe=pe.replace(/!\[.*?\]\(.*?\)/g,""),pe=pe.replace(/\[.*?\]\(.*?\)/g,""),pe=pe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),pe=pe.replace(/<embed.*?>/g,""),pe=pe.replace(/<img.*?>/g,""),pe=pe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),pe=pe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),pe=pe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),pe=pe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),pe}const Qt=pe=>!Mt&&Bt(kt)?pe:pe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ut,dt){let vt=dt.replace(/(\n|\r)/g,"").split("}"),Dt=[];return vt.map(jt=>{jt!=""&&Dt.push(`.${St.current} ${jt}`)}),`<style>${Dt.join("}")}</style>`}),le=(0,oe.useMemo)(()=>{try{const vt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Dt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,jt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,It=/\(\/attachments\/download\//g;kt=kt.replace(It,"("+je.Z.API_SERVER+"/attachments/download/").replace(vt,"("+je.Z.API_SERVER+"/api/attachments/").replace(Dt,'"'+je.Z.API_SERVER+"/api/attachments/").replace(jt,'"'+je.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),_e.current.style.display="none"}catch(vt){}if(he){let vt=-1;return kt=kt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Dt,jt,It){var Xt;return++vt,Nt(Dt,vt,(Xt=Ft==null?void 0:Ft[vt])==null?void 0:Xt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Qt(kt||"")}</pre>`}let pe=Qt(kt);pe=(0,Me.ZP)(pe);const ut=(0,Me.ez)();kt.match(/\[TOC\]/)&&(pe=pe.replace("<p>[TOC]</p>",(0,Me.Qv)()),(0,Me.Iy)()),pe=pe.replace(/(__special_katext_id_\d+__)/g,(vt,Dt)=>{const{type:jt,expression:It}=ut[Dt];return(0,Ke.renderToString)(Ze(It)||"",{displayMode:jt==="block",throwOnError:!1,output:"html"})}),pe=pe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Me.AL)();const dt=document.createElement("div");if(dt.innerHTML=pe,Mt)return dt.innerText;if(ve){const vt=ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ue(dt,vt),dt.innerHTML}return setTimeout(()=>gt(),500),dt.innerHTML},[kt,ve]);(0,oe.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(ut=>{ut.oninput=te,ut.onblur=ee,ut.onfocus=ie})},[$e]),(0,oe.useEffect)(()=>{var pe,ut,dt,vt,Dt;if(Ft!=null&&Ft.length)try{const jt=ne.current.querySelectorAll(".edu-program-fill-score"),It=ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[Xt,Fn]of It.entries())Fn.value=((pe=Ft==null?void 0:Ft[Xt])==null?void 0:pe.value)||"",((ut=Ft==null?void 0:Ft[Xt])==null?void 0:ut.type)==="warning"?Fn.className="program-fill-warning":((dt=Ft==null?void 0:Ft[Xt])==null?void 0:dt.type)==="success"?Fn.className="program-fill-success":Fn.className="";for(const[Xt,Fn]of jt.entries())Fn.innerHTML=(vt=Ft==null?void 0:Ft[Xt])!=null&&vt.score?`${(Dt=Ft==null?void 0:Ft[Xt])==null?void 0:Dt.score}\u5206`:"";pt(Ft)}catch(jt){console.log(jt,"error")}},[Ft]);const te=pe=>{$e[pe.target.dataset.id]=$e[pe.target.dataset.id]||{},$e[pe.target.dataset.id].value=pe.target.value,pt([...$e]),ot($e,pe.target.dataset.id)},ee=pe=>{$e[pe.target.dataset.id]=$e[pe.target.dataset.id]||{},$e[pe.target.dataset.id].value=pe.target.value,pt([...$e]),ft($e,pe.target.dataset.id)},ie=pe=>{$e[pe.target.dataset.id]=$e[pe.target.dataset.id]||{},$e[pe.target.dataset.id].value=pe.target.value,pt([...$e]),rn($e,pe.target.dataset.id)};function ue(pe,ut){return pe.childNodes.forEach(dt=>{var vt;if(dt.childNodes.length>0)ue(dt,ut);else if(dt.nodeName!=="IMG")if(dt.innerHTML)dt.innerHTML=(vt=dt.innerHTML)==null?void 0:vt.replace(new RegExp(ut,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Dt=document.createElement("span");Dt.innerHTML=dt.textContent.replace(new RegExp(ut,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),dt.replaceWith(Dt)}})}const ne=(0,oe.useRef)();Me.jb.WebkitLineClamp=wt,wt&&($t=Je(Je({},$t),Me.jb));function be(pe){let ut=pe.target;if(ut.tagName.toUpperCase()==="A"){let dt=ut.getAttribute("href");if(dt.indexOf("office")>-1)pe.preventDefault(),st(dt),Ve("office");else if(dt.indexOf("application/pdf")>-1)pe.preventDefault(),st(dt),Ve("pdf");else if(dt.indexOf("text/html")>-1)pe.preventDefault(),st(dt),Ve("html");else if(dt.startsWith("#")){pe.preventDefault();let vt=document.getElementById(dt.replace("#",""));vt&&vt.scrollIntoView(!0)}}}const gt=()=>{var pe;const ut=(pe=ne.current)==null?void 0:pe.querySelectorAll("video");ut==null||ut.forEach(dt=>{if(dt.oncontextmenu=()=>!1,dt.src.indexOf(".m3u8")>-1&&!dt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var vt=new me.ZP;vt.loadSource(dt.src),vt.attachMedia(dt)}}})};(0,oe.useEffect)(()=>{if(ne.current&&le&&le.match(Le)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",be),()=>{var pe;(pe=ne.current)==null||pe.removeEventListener("click",be),(0,Me.AL)(),(0,Me.Iy)()}},[le,ne.current,be]);const ye=pe=>{pe.target.nodeName==="IMG"&&pe.target.className.indexOf("draw-flowchart")>-1?(_e.current.style.zIndex=1,_e.current.style.display="flex",_e.current.style.width=pe.target.clientWidth+"px",_e.current.style.height=pe.target.clientHeight+"px",_e.current.style.top=pe.target.offsetTop+"px",_e.current.style.left=pe.target.offsetLeft+"px",pe.target.id&&(Ce.current=pe.target.id)):_e.current.style.display="none"},Pe=()=>{_e.current.style.display="none"};return(0,oe.useEffect)(()=>{var pe;const ut=dt=>{dt.preventDefault(),dt.clipboardData.setData("text",window.getSelection().toString())};return(pe=ne.current)==null||pe.addEventListener("copy",ut),()=>{var dt;(dt=ne.current)==null||dt.removeEventListener("copy",ut)}},[ne.current]),oe.createElement("div",{style:{position:"relative"},onMouseLeave:Pe},Mt&&oe.createElement("div",{ref:ne,className:`${Ee.mdBody} `},le),!Mt&&!Bt(le)&&oe.createElement("div",{ref:ne,style:Je({},$t),onMouseOver:ye,className:`${Qe||""} ${Kt?"disabled-fill":""} markdown-body ${Ee.mdBody} ${St.current}`,dangerouslySetInnerHTML:{__html:le}}),!Mt&&Bt(le)&&oe.createElement(Ie,{html:le}),oe.createElement("div",{ref:_e,className:`${Ee.button} ${Ae?"":Ee.previewFlowChart}`},oe.createElement(Se.Z,null,oe.createElement(de.ZP,{onClick:()=>{Ae?Ne(Ce.current):(st(Ce.current),Ve("flowChart"))}},Ae?"\u7F16\u8F91":"\u9884\u89C8"))),oe.createElement(ge.Z,{close:!0,data:ze,type:ze!=null&&ze.length?Te:"",style:Je({},Ht),onClose:()=>st("")}))}},52504:function(Zt,Ut,fe){"use strict";fe.d(Ut,{h:function(){return Ge},Z:function(){return ct}});var oe=fe(59301),ht=fe(82326),Me=fe(28284),Xe=fe(7939),me=fe(89780),je=fe.n(me),He=fe(2018),Ke=Object.defineProperty,Se=Object.defineProperties,de=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,Re=(Ue,Je,Ye)=>Je in Ue?Ke(Ue,Je,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Ue[Je]=Ye,Ie=(Ue,Je)=>{for(var Ye in Je||(Je={}))ge.call(Je,Ye)&&Re(Ue,Ye,Je[Ye]);if(we)for(var Ye of we(Je))lt.call(Je,Ye)&&Re(Ue,Ye,Je[Ye]);return Ue},We=(Ue,Je)=>Se(Ue,de(Je));const Ee=ht.default.Option,at={labelCol:{span:4},wrapperCol:{span:20}},rt={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"]};var ct=({callback:Ue,onCancel:Je})=>{const[Ye,Tt]=(0,oe.useState)("python");function Le(Ct){Tt(rt[Ct][1])}function Ze(Ct){Ue(Ct)}return oe.createElement(Me.default,We(Ie({},at),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),oe.createElement(Me.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},oe.createElement(ht.default,{getPopupContainer:Ct=>Ct.parentNode,onChange:Le},Object.keys(rt).map(Ct=>oe.createElement(Ee,{key:Ct,value:Ct},rt[Ct][0])))),oe.createElement(Me.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},oe.createElement(Ge,{mode:Ye})),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Xe.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))};function Ge({value:Ue,onChange:Je,mode:Ye,options:Tt={}}){const Le=(0,oe.useRef)(),[Ze,Ct]=(0,oe.useState)();return(0,oe.useEffect)(()=>{if(Ze){let Fe=function(et){const Ae=et.getValue();Je&&Je(Ae)};return Ze.on("change",Fe),()=>{Ze.off("change",Fe)}}},[Ze,Je]),(0,oe.useEffect)(()=>{Ze&&Ze.setOption("mode",Ye)},[Ze,Ye]),(0,oe.useEffect)(()=>{Ze&&(Ue!==Ze.getValue()||Ue==="")&&setTimeout(()=>{Ze.setValue(Ue||"")},300)},[Ze,Ue]),(0,oe.useEffect)(()=>{if(Le.current&&!Ze){const Fe=je().fromTextArea(Le.current,Ie({mode:Ye,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Tt));Ct(Fe)}},[Le.current,Ze]),oe.createElement("div",{className:"my-codemirror-container"},oe.createElement("textarea",{ref:Le}))}},77834:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return Wn}});var oe=fe(59301),ht=fe(58106),Me=fe(89780),Xe=fe.n(Me),me=fe(76374),je=fe(2018),He=fe(6313),Ke=fe(25717),Se=fe(99498),de=fe(25419),we=fe(67549),ge=fe(59944),lt=({value:Lt="",className:tn,showTextOnly:un,showLines:En,style:xn={}})=>{const Rn=(0,oe.useMemo)(()=>"",[Lt]);return oe.createElement(oe.Fragment,null,oe.createElement("div",{dangerouslySetInnerHTML:{__html:Rn}}))},Re=Object.defineProperty,Ie=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,ct=(Lt,tn,un)=>tn in Lt?Re(Lt,tn,{enumerable:!0,configurable:!0,writable:!0,value:un}):Lt[tn]=un,Ge=(Lt,tn)=>{for(var un in tn||(tn={}))at.call(tn,un)&&ct(Lt,un,tn[un]);if(Ee)for(var un of Ee(tn))rt.call(tn,un)&&ct(Lt,un,tn[un]);return Lt},Ue=(Lt,tn)=>Ie(Lt,We(tn));let Je=[{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\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",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 Ye({onActionCallback:Lt,title:tn,icon:un,actionName:En,className:xn="",children:Rn}){function Zn(){Lt(En)}return oe.createElement("a",{title:tn,className:xn,onClick:Zn},oe.createElement("i",{className:`${un}`}),Rn)}var Tt=({watch:Lt,showNullButton:tn,showNullProgramButton:un,onActionCallback:En,fullScreen:xn,insertTemp:Rn,hidetoolBar:Zn,extraUse:_n})=>{const Nn=[...Je,{title:`${Lt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Lt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return oe.createElement("ul",{className:"markdown-toolbar-container"},!Zn&&Nn.map((Jn,Rt)=>oe.createElement("li",{key:Rt},Jn.actionName?oe.createElement(Ye,Ue(Ge({},Jn),{onActionCallback:En})):oe.createElement("span",{className:"v-line"}))),tn?oe.createElement("li",null,oe.createElement(Ye,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:En},oe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,un?oe.createElement(oe.Fragment,null,oe.createElement("li",null,oe.createElement(Ye,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:En},oe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),oe.createElement("li",null,oe.createElement(Ye,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:En},oe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Rn&&oe.createElement("li",null,oe.createElement(Ye,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Rn}`,onActionCallback:En},oe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&oe.createElement("li",null,_n),oe.createElement("li",{className:"btn-full-screen"},oe.createElement(Ye,{icon:`${xn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:xn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:En})))},Le=fe(35990),Ze=fe(28284),Ct=fe(37568),Fe=fe(7939),et=Object.defineProperty,Ae=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Ht=(Lt,tn,un)=>tn in Lt?et(Lt,tn,{enumerable:!0,configurable:!0,writable:!0,value:un}):Lt[tn]=un,ve=(Lt,tn)=>{for(var un in tn||(tn={}))wt.call(tn,un)&&Ht(Lt,un,tn[un]);if(Mt)for(var un of Mt(tn))$t.call(tn,un)&&Ht(Lt,un,tn[un]);return Lt},he=(Lt,tn)=>Ae(Lt,Qe(tn));const mt={labelCol:{span:4},wrapperCol:{span:20}};var Kt=({callback:Lt,onCancel:tn})=>{function un(En){Lt(En)}return oe.createElement(Ze.default,he(ve({},mt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:un,style:{width:500}}),oe.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},oe.createElement(Ct.default,null)),oe.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},oe.createElement(Ct.default,null)),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Fe.ZP,{type:"ghost",onClick:tn},"\u53D6\u6D88")))},Ft=fe(52504),Ne=fe(82441),ot=fe(62957),ft=fe(77019),rn=fe(1986),kt=fe(59301),_e=({callback:Lt,onCancel:tn})=>{const un=document.createElement("canvas"),En=un.getContext("2d");un.width=1e3,un.height=800,En.fillStyle="#ffffff",En.fillRect(0,0,un.width,un.height);const xn=un.toDataURL("image/png");return kt.createElement(ot.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},kt.createElement(ft.Z,{style:{height:"100vh"}},kt.createElement(rn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:xn,visible:!0,title:String(Date.now())},onOk:Rn=>{Lt({src:Rn.url})},onClose:tn})))},Ce=fe(30641),ze=fe(5269),st=fe(6767),Te={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},Ve=fe(59301),pt=(0,oe.forwardRef)(({onCancel:Lt,editImgId:tn,callback:un},En)=>{let xn=(0,oe.useRef)(),Rn=(0,oe.useRef)(),Zn=(0,oe.useRef)(),_n=(0,oe.useRef)(!1);const Nn=(0,oe.useRef)(!1);console.log("ref:",En);const[Jn,Rt]=(0,oe.useState)(0),[it,Yt]=(0,oe.useState)("100vh");return(0,oe.useEffect)(()=>{Rt(1)},[]),(0,oe.useImperativeHandle)(En,()=>({setHeight:Yt})),Ve.createElement("div",{ref:Nn,className:"body-overflow-initial"},Ve.createElement(Ce.Z,{width:"100vw",height:it,footer:null,closable:!0,placement:"bottom",open:!!Jn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Te.drawerWrap}`,onClose:()=>{window.saveDrawData(hn=>{un({src:`/api/attachments/${hn}`,id:hn})})},title:Ve.createElement(ft.Z,{align:"middle"},Ve.createElement(ze.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ve.createElement(ze.Z,{onClick:()=>{Yt(it==="60px"?"100vh":"60px")}},Ve.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),Ve.createElement(ze.Z,{onClick:()=>{window.saveDrawData(hn=>{if(hn===null){st.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}st.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),un({src:`/api/attachments/${hn}`,id:hn,disabledClose:!0})})}},Ve.createElement(Fe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},Ve.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${tn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Rn})))}),St=fe(26869),Et=fe(47889),Bt=fe(71051);const Nt=Et.ZP.Group,cn={margin:"0 8px"};var Qt=({callback:Lt,onCancel:tn})=>{function un(En){Lt(En)}return oe.createElement(Ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:un},oe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},oe.createElement("span",{style:cn},"\u5355\u5143\u683C\u6570\uFF1A"),oe.createElement("span",{style:cn},"\u884C\u6570"),oe.createElement(Ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},oe.createElement(Bt.Z,null)),oe.createElement("span",{style:cn},"\u5217\u6570"),oe.createElement(Ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},oe.createElement(Bt.Z,null))),oe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},oe.createElement("span",{style:cn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),oe.createElement(Ze.default.Item,{name:"align"},oe.createElement(Nt,null,oe.createElement(Et.ZP,{value:"default"},oe.createElement("i",{className:"fa fa-align-justify"})),oe.createElement(Et.ZP,{value:"left"},oe.createElement("i",{className:"fa fa-align-left"})),oe.createElement(Et.ZP,{value:"center"},oe.createElement("i",{className:"fa fa-align-center"})),oe.createElement(Et.ZP,{value:"right"},oe.createElement("i",{className:"fa fa-align-right"}))))),oe.createElement("div",{className:"flex-container flex-end"},oe.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),oe.createElement(Fe.ZP,{type:"ghost",onClick:tn},"\u53D6\u6D88")))},le=fe(71411),te=fe(75544),ee=fe.n(te),ue=(0,oe.forwardRef)(({use3d:Lt,width:tn,height:un,callback:En,showSaveButton:xn},Rn)=>{const Zn=(0,oe.useRef)(),_n=(0,oe.useRef)(),[Nn,Jn]=(0,oe.useState)(!1),Rt=(0,oe.useRef)({id:Zn,appName:"graphing",width:tn||1e3,height:un||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,oe.useEffect)(()=>{_n.current=new(ee())(Rt.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const it=()=>{var Yt=window.ggbApplet.getPNGBase64(1,!0,72);return En&&En(Yt),Yt};return(0,oe.useEffect)(()=>{Rt.current.appName=Nn?"3D":"graphing",_n.current.inject("applet_container")},[Nn]),(0,oe.useEffect)(()=>{Jn(Lt)},[Lt]),(0,oe.useImperativeHandle)(Rn,()=>({getImgData:it})),oe.createElement(oe.Fragment,null,oe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Zn}),oe.createElement(ft.Z,{align:"middle"},oe.createElement(ze.Z,{flex:1},oe.createElement(le.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Nn,onChange:Yt=>Jn(Yt)})),oe.createElement(ze.Z,null,oe.createElement(Fe.ZP,{size:"large",onClick:it,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=fe(50047);const be="link",gt="upload-image",ye="add-flowchart",Pe="draw-image",pe="add-flowchart",ut="code-block",dt="add-table",vt="------------",Dt={default:vt,left:`:${vt}`,center:`:${vt}:`,right:`${vt}:`};var jt=fe(61904),It=fe(31735);function Xt(){}let Fn=0;const Sn=1e4,Ln="\u2581",Tn="@\u2581\u2581@",In="@\u2581@",Dn=`
|
|
**\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`,Cn=["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 Hn(Lt){return/^\d+$/.test(Lt)?`${Lt}px`:Lt}const yn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",On={[yn+"-B"]:"bold",[yn+"-I"]:"italic"},zn={[be]:"\u6DFB\u52A0\u94FE\u63A5",[ut]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[gt]:"\u6DFB\u52A0\u56FE\u7247",[Pe]:"\u6DFB\u52A0\u753B\u56FE",[ye]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[dt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Wn=({defaultValue:Lt="",onChange:tn,width:un="100%",height:En=400,miniToolbar:xn=!1,isFocus:Rn=!1,watch:Zn,insertTemp:_n,mode:Nn="markdown",id:Jn="markdown-editor-id",showResizeBar:Rt=!1,noStorage:it=!1,showNullButton:Yt=!1,showNullProgramButton:hn=!1,hidetoolBar:Vn=!1,fullScreen:ke=!1,onBlur:Be,onCMBeforeChange:Pt,onFullScreen:bt,className:Oe="",disablePaste:xt=!1,disabled:Gt=!1,disabledFill:an=!1,placeholder:fn="",values:Ot="",extraUse:qt,onAddBlank:yt})=>{const[tt,_t]=(0,oe.useState)(null),[ln,dn]=(0,oe.useState)(Lt),[An,jn]=(0,oe.useState)(Zn),[er,wn]=(0,oe.useState)(ke),[Jt,kn]=(0,oe.useState)(""),[sn,nr]=(0,oe.useState)(0),[yr,or]=(0,oe.useState)(En),[Fr,wr]=(0,oe.useState)(!1),[hr,cr]=(0,oe.useState)(0),[Mr,br]=(0,oe.useState)(0),dr=(0,oe.useRef)(),Sr=(0,oe.useRef)(),Lr=(0,oe.useRef)(),fr=(0,oe.useRef)(),lr=(0,oe.useRef)(),ar=(0,oe.useRef)(),Ir=(0,ht.useDispatch)();(0,oe.useEffect)(()=>{const nn=window.scrollY||window.pageYOffset;dn(Ot),tt==null||tt.setValue(Ot),window.scrollTo(0,nn)},[Ot]),(0,oe.useEffect)(()=>{bt==null||bt(er)},[er]),(0,oe.useEffect)(()=>{if(dr.current){let nn=function(pn,bn){var Xn;if(xt){bn.preventDefault();return}const mr=bn.clipboardData;if(mr){const sr=mr.types.toString(),Br=mr.items;if(sr==="Files"||mr.types.indexOf("Files")>-1){if(bn.preventDefault(),Nn=="stex")return;try{let Ar=Br[1];((Xn=Br[0])==null?void 0:Xn.kind)==="file"&&(Ar=Br[0]);const Tr=Ar.getAsFile(),Zr=Tr.name.split(".").pop();(0,Ne.I)(Tr,Rr=>{var zr,ti,Bi;Rr.id?((zr=Tr==null?void 0:Tr.type)==null?void 0:zr.indexOf("image"))>-1?Vt.replaceSelection(`<img width="100%" src="/api/attachments/${Rr.id}?type=${Rr.content_type})" alt="" />`):((ti=Tr==null?void 0:Tr.type)==null?void 0:ti.indexOf("video"))>-1?Vt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Rr.id}"></video>`):((Bi=Tr==null?void 0:Tr.type)==null?void 0:Bi.indexOf("pdf"))>-1?Vt.replaceSelection(`<a href="/api/attachments/${Rr.id}?type=${Tr.type}&disposition=inline" target="_blank">${Tr.name}</a>`):Cn.includes(Zr)?Vt.replaceSelection(`<a href="/api/attachments/${Rr.id}?type=office&disposition=inline" target="_blank">${Tr.name}</a>`):Vt.replaceSelection(`[${Tr.name}](/api/attachments/${Rr.id}?type=${Rr.content_type})`):(Rr==null?void 0:Rr.status)===401&&(document.location.href="/user/login")})}catch(Ar){st.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Vt=Xe().fromTextArea(dr.current,{mode:Nn,lineNumbers:!xn,lineWrapping:!0,value:Lt,autoCloseTags:!0,autoCloseBrackets:!0});return Vt.on("keyup",function(pn,bn){bn.keyCode===8&&(pn.getValue()==""?Vt.setOption("placeholder",fn):Vt.setOption("placeholder",null))}),Vt.on("keydown",function(pn,bn){if(bn.keyCode===8){var Xn=Kr(pn);Xn&&bn.preventDefault()}}),Rn&&Vt.focus(),Vt.on("paste",nn),Gt&&Vt.on("beforeChange",function(pn,bn){(bn.origin==="paste"||bn.origin==="+input")&&bn.cancel()}),_t(Vt),()=>{Vt.off("paste",nn)}}},[]);const Vr=(0,oe.useCallback)(()=>{if(Sr.current)try{}catch(nn){console.log(nn,"---- to set md editor body height")}},[yr,Sr,er]);(0,oe.useEffect)(()=>{function nn(){let Vt=new me.Z(pn=>{for(let bn of pn)(bn.target.offsetHeight>0||bn.target.offsetWidth>0)&&(Vr(),tt.setSize("100%","100%"),tt.refresh())});return Vt.observe(dr.current.parentElement),Vt}if(tt){const Vt=nn();return()=>{var pn,bn;(pn=dr.current)!=null&&pn.parentElement&&Vt.unobserve((bn=dr.current)==null?void 0:bn.parentElement)}}},[tt,Vr]),(0,oe.useEffect)(()=>{if(tt){let nn=[];for(const[Vt,pn]of Object.entries(On)){let bn={[Vt]:()=>{Dr(pn)}};nn.push(bn),tt.addKeyMap(bn)}return()=>{for(let Vt of nn)tt.removeKeyMap(Vt)}}},[tt]),(0,oe.useEffect)(()=>{ke!==er&&wn(ke)},[ke]),(0,jt.Z)(()=>{if(!it&&sn>0){let nn=new Date().getTime(),Vt=window.sessionStorage.getItem(Jn);nn>=sn+Sn&&(!Vt||Vt!==ln)&&(window.sessionStorage.setItem(Jn,ln),wr(!0))}},Sn),(0,oe.useEffect)(()=>{jn(Zn)},[tt,Zn]),(0,oe.useEffect)(()=>{tt&&Rn&&tt.focus()},[tt,Rn]),(0,oe.useEffect)(()=>{if(An&&tt){let nn=function(pn){let bn=pn.target;if(fr.current){let Xn=bn.scrollTop/bn.scrollHeight;fr.current.scrollTop=fr.current.scrollHeight*Xn}};const Vt=tt.getScrollerElement();return Vt.addEventListener("scroll",nn),()=>{Vt.removeEventListener("scroll",nn)}}},[tt,An]),(0,oe.useEffect)(()=>{if(tt&&Pt){let nn=function(Vt,pn){Pt(Vt,pn)};return tt.on("beforeChange",nn),()=>{tt.off("beforeChange",nn)}}},[tt,Pt]),(0,oe.useEffect)(()=>{if(tt&&Be){let nn=function(){Be(tt.getValue())};return tt.on("blur",nn),()=>{tt.off("blur",nn)}}},[tt,Be]);function Kr(nn,Vt){var pn=nn.getDoc(),bn=pn.getCursor(),Xn=pn.getLine(bn.line),mr=Xn.charAt(bn.ch-1),sr=Xn.lastIndexOf("@\u2581@",bn.ch),Br=Xn.lastIndexOf("@\u2581\u2581@",bn.ch),Ar=sr>Br?sr:Br,Tr=sr>Br?3:4;if(Tn.indexOf(mr)===-1)return null;if(console.log("change1:",Vt,nn,Xn,bn,Ar,sr,Br,mr),Ar>=0&&bn.ch-Ar<5){var Zr=Ar+Tr;return pn.replaceRange("",{line:bn.line,ch:Ar},{line:bn.line,ch:Zr}),{line:bn.line,ch:Zr}}return null}(0,oe.useEffect)(()=>{if(tt){let nn=function(Vt,pn){const bn=Vt.getValue();dn(bn),nr(new Date().getTime()),Vt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),tn&&(hn?tn(bn,en(bn)):tn(bn))};return tt.on("change",nn),()=>{tt.off("change",nn)}}},[tt,tn]),(0,oe.useEffect)(()=>{if(tt)if(Lt==null)tt.setValue(""),dn("");else{const nn=window.scrollY||window.pageYOffset;Lt!==tt.getValue()&&(tt.setValue(Lt),dn(Lt),tt.setCursor(Gt?1:tt.lineCount(),0),window.scrollTo(0,nn))}},[tt,Lt]);const Dr=(0,oe.useCallback)(nn=>{const Vt=tt.getCursor(),pn=tt.getSelection();let bn=pn.split(`
|
|
`);switch(nn){case"bold":return tt.replaceSelection("**"+pn+"**"),pn===""&&tt.setCursor(Vt.line,Vt.ch+2),tt.focus();case"italic":return tt.replaceSelection("*"+pn+"*"),pn===""&&tt.setCursor(Vt.line,Vt.ch+1),tt.focus();case"code":return tt.replaceSelection("`"+pn+"`"),pn===""&&tt.setCursor(Vt.line,Vt.ch+1),tt.focus();case"inline-latex":return(0,It.Ye)(Ir)?void 0:(kn("inline-latex"),tt.focus());case"latex":return tt.replaceSelection("```latex\n"+pn+"\n```"),tt.setCursor(Vt.line+1,pn.length+1),tt.focus();case"line-break":return tt.replaceSelection(`<br/>
|
|
`),tt.focus();case"list-ul":return pn===""?tt.replaceSelection("- "+pn):tt.replaceSelection(bn.map(Xn=>Xn===""?"":`- ${Xn}`).join(`
|
|
`)),tt.focus();case"list-ol":return pn===""?tt.replaceSelection("1. "+pn):tt.replaceSelection(bn.map((Xn,mr)=>Xn===""?"":`${mr+1}. ${Xn}`).join(`
|
|
`)),tt.focus();case"add-null-ch":yt==null||yt();return;case"add-signal":return pn===""&&tt.setCursor(Vt.line,Vt.ch),tt.replaceSelection(In),tt.focus();case"add-multiple":return pn===""&&tt.setCursor(Vt.line,Vt.ch),tt.replaceSelection(Tn),tt.focus();case"inster-template-1":return pn===""&&tt.setCursor(Vt.line,Vt.ch),tt.replaceSelection(Dn),tt.focus();case"eraser":return tt.setValue(""),tt.focus();case"trigger-watch":return jn(!An),tt.focus();case"trigger-full-screen":return wn(!er),tt.focus();case be:kn(be);return;case ut:kn(ut);return;case gt:kn(gt);return;case Pe:kn(Pe);return;case"maths-latex":if((0,It.Ye)(Ir))return;kn("maths-latex");return;case ye:lr.current="",sessionStorage.removeItem("file_id"),kn(ye);return;case dt:kn(dt);return;default:throw new Error}},[tt,An,er]),_r=(0,oe.useCallback)((nn,Vt)=>{var pn,bn,Xn,mr,sr,Br;nn!=null&&nn.disabledClose||kn("");const{src:Ar,alt:Tr,id:Zr}=nn||{};switch(Jt){case be:const{title:Oi,link:Ci}=nn;return tt.replaceSelection(`[${Oi}](${Ci})`),tt.focus();case ut:const{language:vi,content:Xi}=nn;return tt.replaceSelection(["```"+vi,Xi,"```"].join(`
|
|
`)),tt.focus();case"maths-latex":for(var Rr=atob(nn),zr=new Uint8Array(Rr.length),ti=0;ti<Rr.length;ti++)zr[ti]=Rr.charCodeAt(ti);var Bi=new Blob([zr],{type:"image/png"});(0,Ne.I)(Bi,mi=>{mi.id?tt.replaceSelection(``):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,It.Ye)(Ir))return;tt.replaceSelection("`$$"+nn+"$$`");break;case pe:if(!Zr)return;tt.getValue().indexOf(Ar)===-1?tt.replaceSelection(`<center><img id="${Zr}" width="80%" src="${Ar}" class="draw-flowchart" alt="${Tr||""}" /></center>`):document.getElementById(Zr).src=St.Z.API_SERVER+Ar+"?t="+Date.now();break;case gt:case Pe:const xr=Vt,ta=(Xn=(bn=(pn=xr==null?void 0:xr.name)==null?void 0:pn.split("."))==null?void 0:bn.pop)==null?void 0:Xn.call(bn);return((mr=xr==null?void 0:xr.type)==null?void 0:mr.indexOf("image"))>-1||!(xr!=null&&xr.type)?xr!=null&&xr.align||xr!=null&&xr.width?tt.replaceSelection(`<p style="text-align:${xr.align||"initial"}"><img width="${xr.width?xr.width+"%":"initial"}" src="${Ar}" alt="${Tr||""}" /></p>`):tt.replaceSelection(`<img width="100%" src="${Ar}" alt="${Tr||""}" />`):((sr=xr==null?void 0:xr.type)==null?void 0:sr.indexOf("video"))>-1?tt.replaceSelection(`<video width="100%" controls src="${Ar}"></video>`):((Br=xr==null?void 0:xr.type)==null?void 0:Br.indexOf("pdf"))>-1?tt.replaceSelection(`<a href="${Ar}?type=${xr.type}&disposition=inline" target="_blank">${xr.name}</a>`):Cn.includes(ta)?tt.replaceSelection(`<a href="${Ar}?type=office&disposition=inline" target="_blank">${xr.name}</a>`):tt.replaceSelection(`[${xr.name}](${Ar})`),tt.focus();case dt:const{row:ni,col:Pi,align:oa}=nn;let Ji=`
|
|
`;for(let mi=0;mi<ni;mi++){let Ii=[],Gr=[];for(let _i=0;_i<Pi;_i++)mi===1&&Gr.push(Dt[oa]),Ii.push(" ");mi===1&&(Ji+=`| ${Gr.join(" | ")} |
|
|
`),Ji+=`| ${Ii.join(Pi===1?"":" | ")} |
|
|
`}return tt.replaceSelection(Ji+`
|
|
`),tt.focus();default:throw new Error}},[tt,Jt]),Nr=(0,oe.useMemo)(()=>{switch(Jt){case be:return oe.createElement(Kt,{callback:_r,onCancel:pr});case ut:return oe.createElement(Ft.Z,{callback:_r,onCancel:pr});case gt:return oe.createElement(Ne.Z,{callback:_r,onCancel:pr});case ye:return oe.createElement(pt,{editImgId:lr.current,callback:_r,onCancel:pr});case dt:return oe.createElement(Qt,{callback:_r,onCancel:pr});case"maths-latex":return oe.createElement(ue,{showSaveButton:!0,callback:_r});case"inline-latex":return oe.createElement(ne.Z,{showSaveButton:!0,callback:_r});default:return null}},[Jt]);function pr(){kn("")}(0,oe.useEffect)(()=>{if(Lr.current){let nn=function(sr){Xn=!0,mr=sr.pageY},Vt=function(){Xn=!1},pn=function(sr){if(Xn){let Br=sr.pageY-mr;Br<0&&(Br=0),Br>300&&(Br=300);let Ar=En+Br+"px";or(Ar)}},bn=Lr.current,Xn=!1,mr=0;return bn.addEventListener("mousedown",nn),document.addEventListener("mousemove",pn),document.addEventListener("mouseup",Vt),()=>{bn.removeEventListener("mousedown",nn),document.removeEventListener("mousemove",pn),document.removeEventListener("mouseup",Vt)}}},[tt,Lr]),(0,oe.useEffect)(()=>{or(En)},[En]);const Er=Hn(un),Cr=Hn(yr),qn={width:Er,height:Cr},Wt=(0,oe.useMemo)(()=>{if(sn){let nn=new Date(sn),Vt=nn.getHours(),pn=nn.getMinutes(),bn=nn.getSeconds();return Vt=Vt<10?"0"+Vt:Vt,pn=pn<10?"0"+pn:pn,bn=bn<10?"0"+bn:bn,`${Vt}:${pn}:${bn}`}return 0},[sn]),en=nn=>{const Vt=[];if(hn){let pn=-1;nn=nn.replace(/(@▁▁@|@▁@)/g,function(bn,Xn,mr){Vt.push({multiLine:bn!==In})})}return Vt};function Mn(){window.sessionStorage.removeItem(Jn),wr(!1),nr(0)}function vn(){wr(!1),nr(0),tt.setValue(window.sessionStorage.getItem(Jn))}(0,oe.useEffect)(()=>{zn[Jt]&&Jt!==Pe&&Jt!==ye&&setTimeout(()=>{const nn=document.getElementsByClassName("markdown-popup-form")[0],Vt=window.innerWidth/2-nn.offsetWidth/2,pn=window.innerHeight/2-nn.offsetHeight/2;cr(Vt),br(pn)},0)},[Jt]);const Un=nn=>{nn.preventDefault();const Vt=nn.clientX-hr,pn=nn.clientY-Mr;document.body.onmousemove=bn=>{let Xn=bn.clientX-Vt,mr=bn.clientY-pn;const sr=document.getElementsByClassName("markdown-popup-form")[0],Br=window.innerWidth-sr.offsetWidth,Ar=window.innerHeight-sr.offsetHeight;Xn=Math.max(0,Math.min(Xn,Br)),mr=Math.max(0,Math.min(mr,Ar)),vr(bn.clientX,bn.clientY,Vt,pn)&&(cr(Xn),br(mr))},document.body.onmouseup=function(){document.body.onmousemove=null}},vr=(nn,Vt,pn,bn)=>{const Xn=document.body.clientHeight,mr=document.body.clientWidth;return nn<20&&pn>nn||nn>mr-20&&pn<nn||Vt<20&&bn>Vt||Vt>Xn-20&&bn<Vt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return oe.createElement(oe.Fragment,null,oe.createElement("div",{className:"markdown-editor-wrapper",ref:Sr},oe.createElement("div",{className:`markdown-editor-container ${Oe} ${An?"on-preview":""} ${xn?"mini":""} ${er?"full-screen":""}`,style:qn},oe.createElement(Tt,{insertTemp:_n,watch:An,fullScreen:er,showNullButton:Yt,showNullProgramButton:hn,onActionCallback:Dr,hidetoolBar:Vn,extraUse:qt}),oe.createElement("div",{className:"markdown-editor-body"},oe.createElement("div",{className:"codemirror-container"},oe.createElement("textarea",{ref:dr,placeholder:fn})),An?oe.createElement("div",{ref:fr,className:"preview-container"},Nn==="stex"&&oe.createElement(lt,{value:ln}),Nn!=="stex"&&oe.createElement(ge.Z,{edit:!0,disabledFill:an,showProgramFill:hn,value:ln,openEditor:nn=>{var Vt;lr.current=nn,(Vt=ar.current)==null||Vt.setHeight("100vh"),setTimeout(()=>{kn("add-flowchart")},150)}})):null))),Rt?oe.createElement("a",{ref:Lr,className:"editor-resize"}):null,Jt===Pe&&oe.createElement(_e,{callback:_r,onCancel:pr}),Jt===ye&&oe.createElement(pt,{ref:ar,editImgId:lr.current,callback:_r,onCancel:pr}),oe.createElement(Le.Z,null,zn[Jt]&&Jt!==Pe&&Jt!==ye?oe.createElement(ot.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:hr,top:Mr},title:oe.createElement("div",{style:{cursor:"move"},onMouseDown:Un},zn[Jt]),open:!0,onCancel:pr,footer:null,destroyOnClose:!0,width:Jt===ye?"1200px":null,height:Jt===ye?"80vh":null,className:"markdown-popup-form"},Nr):null))}},82441:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return Je},I:function(){return Tt}});var oe=fe(28284),ht=fe(6767),Me=fe(37568),Xe=fe(44104),me=fe(71051),je=fe(47889),He=fe(7939),Ke=fe(52882),Se=fe(59301),de=fe(59301),we=Object.defineProperty,ge=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ee=(Le,Ze,Ct)=>Ze in Le?we(Le,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Le[Ze]=Ct,at=(Le,Ze)=>{for(var Ct in Ze||(Ze={}))Ie.call(Ze,Ct)&&Ee(Le,Ct,Ze[Ct]);if(Re)for(var Ct of Re(Ze))We.call(Ze,Ct)&&Ee(Le,Ct,Ze[Ct]);return Le},rt=(Le,Ze)=>ge(Le,lt(Ze));const{useForm:ct}=oe.default,Ge={width:280,marginRight:10},Ue={labelCol:{span:5},wrapperCol:{span:19}};var Je=({callback:Le,onCancel:Ze})=>{const[Ct]=ct();let Fe=(0,Se.useRef)();function et(Mt){Fe.current.width=Ct.getFieldValue("width"),Fe.current.align=Ct.getFieldValue("align"),Le(Mt,Fe.current)}function Ae(Mt,wt){if(Mt.status===-1){ht.ZP.error(Mt.message);return}Ct.setFieldsValue({src:`/api/attachments/${Mt.id}`,type:wt.type})}function Qe(Mt){let wt=Mt.target.files[0];Fe.current=wt,Tt(wt,Ae)}return de.createElement(oe.default,rt(at({form:Ct},Ue),{className:"upload-image-panel",onFinish:et,style:{width:470,overflow:"hidden"}}),de.createElement(oe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(oe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(Me.default,{style:Ge})),de.createElement(Ye,{onFileChange:Qe}))),de.createElement(oe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(Me.default,{style:{width:264}})),de.createElement(oe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(Xe.Z,null,de.createElement(oe.default.Item,{name:"width",style:{margin:0}},de.createElement(me.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(oe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(je.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"}]})),de.createElement("aside",null,de.createElement(oe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(He.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function Ye({onFileChange:Le}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:Le}))}function Tt(Le,Ze){if(!Le)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ct=new FormData;Ct.append("editormd-image-file",Le),Ct.append("file_param_name","editormd-image-file"),Ct.append("byxhr","true");var Fe=new window.XMLHttpRequest;Fe.withCredentials=!0,Fe.addEventListener("load",function(et){Ze(JSON.parse(et.target.responseText),Le)},!1),Fe.addEventListener("error",function(et){console.error(et)},!1),Fe.open("POST",`${Ke.KI}/api/attachments.json`),Fe.send(Ct)}},35990:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return Me}});var oe=fe(59301),ht=fe(4676);class Me extends oe.Component{constructor(me){super(me);const je=window.document;this.node=je.createElement("div"),je.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,ht.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58478:function(Zt,Ut,fe){"use strict";fe.d(Ut,{SV:function(){return _e},ZP:function(){return kt}});var oe=fe(59301),ht=fe(76374);const Me={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Xe={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},me={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std",content:["using namespace std"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},je={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},He={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var Ke=fe(53184),Se=fe.n(Ke),de=(Ce,ze,st)=>new Promise((Te,Ve)=>{var $e=Et=>{try{St(st.next(Et))}catch(Bt){Ve(Bt)}},pt=Et=>{try{St(st.throw(Et))}catch(Bt){Ve(Bt)}},St=Et=>Et.done?Te(Et.value):Promise.resolve(Et.value).then($e,pt);St((st=st.apply(Ce,ze)).next())});const we={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ge=(Ce,ze,st,Te)=>{const Ve=ze.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:st.lineNumber,endColumn:st.column});return Array.from(new Set(Ve.match(/\b\w{2,}\b/g)||[])).map(pt=>({label:pt,kind:Ce.languages.CompletionItemKind.Text,insertText:pt,range:Te}))},lt=(Ce,ze,st,Te)=>{Ce.languages.registerCompletionItemProvider(ze,{provideCompletionItems(Ve,$e){const pt=Ve.getWordUntilPosition($e),St={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:pt.startColumn,endColumn:pt.endColumn},Et=Ve.getLineContent($e.lineNumber).substring(pt.startColumn-2,pt.endColumn);return{suggestions:[...ge(Ce,Ve,$e,St),...st.map(Nt=>({label:Nt,kind:Ce.languages.CompletionItemKind.Keyword,documentation:Nt,insertText:Nt,insertTextRules:Ce.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:St})),...Te.map(Nt=>({label:Nt.label,kind:Ce.languages.CompletionItemKind.Snippet,documentation:Nt.content,insertText:Et.startsWith("#")?Nt.content.replace(/#/,""):Nt.content,insertTextRules:Ce.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:St}))]}}})};var Re=Ce=>{we.languages.forEach(ze=>{Ce.languages.registerDocumentFormattingEditProvider(ze,{provideDocumentFormattingEdits(st){return de(this,null,function*(){const Te=Se()(st.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:st.getFullModelRange(),text:Te}]})}})}),lt(Ce,"java",Xe.keywords,Xe.quickKey),lt(Ce,"cpp",me.keywords,me.quickKey),lt(Ce,"c",Me.keywords,[]),lt(Ce,"python",je.keywords,je.quickKey),lt(Ce,"scala",He.keywords,He.quickKey)};const Ie="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var We=Object.defineProperty,Ee=(Ce,ze,st)=>ze in Ce?We(Ce,ze,{enumerable:!0,configurable:!0,writable:!0,value:st}):Ce[ze]=st,at=(Ce,ze,st)=>Ee(Ce,typeof ze!="symbol"?ze+"":ze,st);const rt=class _s{constructor(ze,st,Te){this.placeholder=ze,this.editor=st,this.monaco=Te,st.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return _s.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};at(rt,"ID","editor.widget.placeholderHint");var Ge=rt,Ue=fe(96236),Je=fe(6767),Ye=fe(25399),Tt=fe(89392),Le=fe(94276),Ze=fe(56102),Ct=Object.defineProperty,Fe=Object.defineProperties,et=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,wt=(Ce,ze,st)=>ze in Ce?Ct(Ce,ze,{enumerable:!0,configurable:!0,writable:!0,value:st}):Ce[ze]=st,$t=(Ce,ze)=>{for(var st in ze||(ze={}))Qe.call(ze,st)&&wt(Ce,st,ze[st]);if(Ae)for(var st of Ae(ze))Mt.call(ze,st)&&wt(Ce,st,ze[st]);return Ce},Ht=(Ce,ze)=>Fe(Ce,et(ze)),ve=(Ce,ze)=>{var st={};for(var Te in Ce)Qe.call(Ce,Te)&&ze.indexOf(Te)<0&&(st[Te]=Ce[Te]);if(Ce!=null&&Ae)for(var Te of Ae(Ce))ze.indexOf(Te)<0&&Mt.call(Ce,Te)&&(st[Te]=Ce[Te]);return st},he=(Ce,ze,st)=>new Promise((Te,Ve)=>{var $e=Et=>{try{St(st.next(Et))}catch(Bt){Ve(Bt)}},pt=Et=>{try{St(st.throw(Et))}catch(Bt){Ve(Bt)}},St=Et=>Et.done?Te(Et.value):Promise.resolve(Et.value).then($e,pt);St((st=st.apply(Ce,ze)).next())});function mt(Ce){return/^\d+$/.test(Ce)?`${Ce}px`:Ce}function Kt(){}let Ft=!1;const Ne={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function ot(Ce=[]){let ze=Ce;if(Array.isArray(Ce)){for(let st=0;st<Ce.length;st++){let Te=Ne[Ce[st]];if(Te)return Te}return ze[0]}return Ne[ze]||ze}let ft=null;const rn=()=>he(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ce){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ce)}});var kt=Ce=>{var ze=Ce,{width:st="100%",height:Te="100%",value:Ve,language:$e="javascript",style:pt={},options:St={},overrideServices:Et={},theme:Bt="vs-dark",onEditBlur:Nt,isCopy:cn=!1,onSave:Qt,autoHeight:le=!1,forbidCopy:te=!1,onChange:ee=Kt,editorDidMount:ie=Kt,onFocus:ue=Kt,onBreakPoint:ne=Kt,breakPointValue:be=[],filename:gt="educoder.txt",errorLine:ye,errorContent:Pe="",highlightLine:pe,openBreakPoint:ut=!1,placeholder:dt="",showMiniMap:vt=!0}=ze,Dt=ve(ze,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const jt=(0,oe.useRef)(),It=(0,oe.useRef)({}),Xt=(0,oe.useRef)(),Fn=(0,oe.useRef)(),Sn=(0,oe.useRef)([]),Ln=(0,oe.useRef)(!1),Tn=(0,oe.useRef)(),In=(0,oe.useRef)(),Dn=(0,oe.useRef)(!1),[Cn,Hn]=(0,oe.useState)(!1);function Yn(){let Rt;return jt.current&&(Rt=new ht.Z(it=>{for(let Yt of it)(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&It.current.instance.layout()}),Rt.observe(jt.current)),Rt}function yn(){Je.ZP.warning({content:decodeURIComponent(Ie),key:"monaco-editor-tip"})}const On=()=>{let Rt=It.current.instance;if(Ve!=null&&Rt&&Cn){const it=Rt.getModel();it&&Ve!==it.getValue()&&(Ft=!0,it.setValue(Ve),Rt.layout(),Ft=!1)}};(0,oe.useEffect)(()=>{const Rt=Le.Z.subscribe("formatDocument",it=>{var Yt;let hn=It.current.instance;(Yt=hn==null?void 0:hn.getAction)==null||Yt.call(hn,"editor.action.formatDocument").run()});return window.updateMonacoValue=it=>{ee(it)},Rt},[]),(0,oe.useEffect)(()=>{var Rt;let it=It.current.instance;Fn.current&&clearTimeout(Fn.current),Fn.current=setTimeout(()=>{On()},500),Ve&&(Ve!=null&&Ve.length)&&((Rt=it==null?void 0:it.updateOptions)==null||Rt.call(it,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ve.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ve,Cn,It.current]),(0,oe.useEffect)(()=>{if(ye&&It.current&&It.current.instance){let it=It.current.instance;it.changeViewZones(function(Yt){var hn=document.createElement("div");hn.style.padding="10px 20px",hn.style.width="calc(100% - 20px)",hn.className="my-error-line-wrp",hn.innerHTML=Pe,Yt.addZone({afterLineNumber:ye||11,heightInLines:3,domNode:hn})});var Rt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};it.addOverlayWidget(Rt),it.revealPositionInCenter({lineNumber:20,column:1})}},[ye,It.current,Cn]);const zn=(Rt="",it)=>{if(!Rt||Rt.trim()==="")return!0;const hn=It.current.instance.getModel().getLineTokens(it);let Vn=!1;for(let ke=0;ke<2;ke++)hn.getStandardTokenType(ke)===1&&(Vn=!0);return Vn};(0,oe.useEffect)(()=>{var Rt;const it=(Rt=It.current)==null?void 0:Rt.instance;if(it&&Cn&&te){const Yt=it.onDidBlurEditorWidget(()=>{Dn.current=!1}),hn=it.onDidFocusEditorText(()=>{Dn.current=!0});return()=>{Yt.dispose(),hn.dispose()}}},[It.current,Cn,te]),(0,oe.useEffect)(()=>{var Rt;if((Rt=It.current)!=null&&Rt.instance&&Cn&&ut){let it=It.current.instance,Yt=it.getModel();if(!Yt)return;(()=>{var Ot;let qt=[],yt=[];const tt=Yt.getAllDecorations();for(let ln of tt)ln.options.className==="highlighted-line"&&(qt.push((Ot=ln==null?void 0:ln.range)==null?void 0:Ot.startLineNumber),yt.push(ln==null?void 0:ln.id));if(pe===qt[0])return;Yt.deltaDecorations(yt,[]);const _t=Yt.getLineCount();pe&&pe<=_t&&(it.deltaDecorations([],[{range:new ft.Range(pe,1,pe,Yt.getLineMaxColumn(pe)),options:{isWholeLine:!0,className:"highlighted-line"}}]),it.revealLineInCenter(pe))})();const Vn=(Ot=!1)=>{var qt;let yt=[],tt=[];const _t=Yt.getAllDecorations();for(let ln of _t)ln.options.linesDecorationsClassName==="breakpoints-select"&&(yt.push((qt=ln==null?void 0:ln.range)==null?void 0:qt.startLineNumber),tt.push(ln==null?void 0:ln.id));if(Ot)return{lines:yt,ids:tt};ne(yt)},ke=Ot=>he(void 0,null,function*(){let qt={range:new ft.Range(Ot,1,Ot,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Yt.deltaDecorations([],[qt]),Vn()}),Be=Ot=>he(void 0,null,function*(){let qt=[];const yt=it.getLineDecorations(Ot);for(let tt of yt)tt.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(tt.id);yield Yt.deltaDecorations(qt,[]),Vn()}),Pt=Ot=>{let qt=it.getLineDecorations(Ot);for(let yt of qt)if(yt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Tt.isEqual)(be,Vn(!0).lines)){Yt.deltaDecorations(Vn(!0).ids,[]);const Ot=be.map(qt=>({range:new ft.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Yt.deltaDecorations([],Ot)}const bt=it.onDidChangeModelContent(Ot=>{let qt=it.getPosition();if(qt){let yt=qt.lineNumber;clearTimeout(In.current),In.current=setTimeout(()=>{zn(Yt.getLineContent(yt),yt)?Be(yt):Pt(yt)?(Be(yt),ke(yt)):Vn()},100)}}),Oe=it.onMouseDown(Ot=>{var qt,yt,tt;if(Ot.target.detail&&((tt=(yt=(qt=Ot.target)==null?void 0:qt.element)==null?void 0:yt.className)!=null&&tt.includes("line-numbers"))){let _t=Ot.target.position.lineNumber;if(zn(Yt.getLineContent(_t),_t))return;Pt(_t)?Be(_t):ke(_t)}}),xt=Ot=>{let qt={range:new ft.Range(Ot,1,Ot,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Sn.current=it.deltaDecorations(Sn.current,[qt])},Gt=()=>{Sn.current=it.deltaDecorations(Sn.current,[])},an=it.onMouseMove(Ot=>{var qt,yt,tt;if(Gt(),Ot.target.detail&&((tt=(yt=(qt=Ot.target)==null?void 0:qt.element)==null?void 0:yt.className)!=null&&tt.includes("line-numbers"))){let _t=Ot.target.position.lineNumber;if(zn(Yt.getLineContent(_t),_t))return;xt(_t)}}),fn=it.onMouseLeave(()=>{Gt()});return()=>{bt.dispose(),Oe.dispose(),an.dispose(),fn.dispose()}}},[It.current,Cn,be,pe,ut,$e]),(0,oe.useEffect)(()=>{var Rt;(Rt=It.current)!=null&&Rt.instance&&ut&&It.current.instance.setPosition({lineNumber:0,column:0})},[pe]);function Wn(){let Rt=It.current.instance;if(Rt){const it=Rt.getSelection(),Yt=It.current.pastePos||{},hn=new ft.Range(Yt.startLineNumber||it.endLineNumber,Yt.startColumn||it.endColumn,Yt.endLineNumber||it.endLineNumber,Yt.endColumn||it.endColumn);setTimeout(()=>{Rt.executeEdits("",[{range:hn,text:""}])},300)}}function Lt(Rt){(window.navigator.platform.match("Mac")?Rt.metaKey:Rt.ctrlKey)&&Rt.keyCode==83&&(Rt.preventDefault(),Qt())}const tn=()=>{if(le&&It.current.instance){const Rt=It.current.instance.getContentHeight();Nn(Rt<Te?Te:Rt)}else Nn(Te)};function un(Rt){var it=document.createEvent("MouseEvents");it.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Rt.dispatchEvent(it)}const En=Rt=>{if(!Dn.current)return;const{keyCode:it,ctrlKey:Yt,metaKey:hn,target:Vn,type:ke}=Rt;return(ke==="paste"||(it===67||it===86)&&(hn||Yt))&&Vn.nodeName==="TEXTAREA"&&(yn(),Rt.preventDefault()),!1};function xn(Rt,it){var Yt=window.URL||window.webkitURL||window,hn=new Blob([it]),Vn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Vn.href=Yt.createObjectURL(hn),Vn.download=Rt,un(Vn)}(0,oe.useEffect)(()=>{tn()},[tn]),(0,oe.useEffect)(()=>{jt.current&&!Cn&&Promise.all([fe.e(8909),fe.e(4474)]).then(fe.bind(fe,71448)).then(Rt=>{try{ft=Rt,It.current.instance=ft.editor.create(jt.current,{value:Ve,language:ot($e),theme:Bt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:vt||!1}},Et);const it=It.current.instance;let Vn=[...Ue.BH._menuItems].find(bt=>bt[0]._debugName=="EditorContext")[1],ke=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Be=(bt,Oe)=>{var xt,Gt;let an=bt._first;do Oe.includes((Gt=(xt=an.element)==null?void 0:xt.command)==null?void 0:Gt.id)&&bt._remove(an);while(an=an.next)};if(ie(it,ft),setTimeout(()=>{tn(),It.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{xn(gt||"educoder.txt",it.getValue())}})},500),It.current.subscription=it.onDidChangeModelContent(bt=>{Ln.current?clearTimeout(Tn.current):(tn(),ee(it.getValue(),bt)),Tn.current=setTimeout(()=>{Ln.current=!1},500)}),window.Monaco||Re(ft,ot($e)),te&&(Be(Vn,ke),jt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",En),window.removeEventListener("paste",En),window.addEventListener("keydown",En),window.addEventListener("paste",En)),window.Monaco=ft,Nt&&it.onDidBlurEditorWidget(()=>{Nt(it.getValue())}),ue&&it.onDidFocusEditorText(()=>{te&&rn(),ue(it.getValue())}),te){rn();try{it.onDidPaste(bt=>{const Oe=it.getSelection(),xt=It.current.pastePos||{},Gt=new ft.Range(xt.startLineNumber||Oe.endLineNumber,xt.startColumn||Oe.endColumn,xt.endLineNumber||Oe.endLineNumber,xt.endColumn||Oe.endColumn);it.executeEdits("",[{range:bt.range,text:""}])})}catch(bt){}}let Pt=Yn();return dt&&typeof dt=="string"&&new Ge(dt,it,ft),Hn(!0),()=>{const bt=It.current.instance;bt.dispose();const Oe=bt.getModel();Oe&&Oe.dispose(),It.current.subscription&&It.current.subscription.dispose(),Pt.unobserve(jt.current)}}catch(it){}})},[]),(0,oe.useEffect)(()=>{if(It.current.instance&&Cn)return document.addEventListener("keydown",Lt,!1),()=>{document.removeEventListener("keydown",Lt)}},[Qt,Cn]),(0,oe.useEffect)(()=>{let Rt=It.current.instance;if(Rt&&Cn){let it=ot($e);ft.editor.setModelLanguage(Rt.getModel(),it)}},[$e,Cn]),(0,oe.useEffect)(()=>{It.current.instance&&Cn&&ft.editor.setTheme(Bt)},[Bt,Cn]),(0,oe.useEffect)(()=>{let Rt=It.current.instance;Xt.current=St,Rt&&Cn&&(Rt.updateOptions($t({},St)),setTimeout(()=>{Rt.getModel().updateOptions($t({},St))},200))},[JSON.stringify(St),Cn]),(0,oe.useEffect)(()=>{let Rt=It.current.instance;Rt&&Cn&&Rt.layout()},[st,Te,Cn]);const[Rn,Zn]=(0,oe.useState)(mt(st)),[_n,Nn]=(0,oe.useState)(mt(Te)),Jn=Ht($t({},pt),{width:Rn,height:_n,position:"relative"});return oe.createElement("div",{className:"my-monaco-editor",ref:jt,style:Jn,onFocus:()=>{te&&rn()}},cn&&oe.createElement(Ze.CopyToClipboard,{text:Ve,onCopy:()=>Je.ZP.success("\u590D\u5236\u6210\u529F")},oe.createElement(Ye.Z,{title:"\u590D\u5236\u4EE3\u7801"},oe.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},oe.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function _e({width:Ce="100%",height:ze="100%",original:st,modified:Te,language:Ve,options:$e={}}){const pt=(0,oe.useRef)(),[St,Et]=(0,oe.useState)(null);function Bt(le){let te;return pt.current&&(te=new ht.Z(ee=>{for(let ie of ee)(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&le.layout()}),te.observe(pt.current)),te}(0,oe.useEffect)(()=>(pt.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(le=>{ft=le;const te=ft.editor.createDiffEditor(pt.current,Ht($t({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},$e),{wordWrap:!0}));Et(te);let ee=Bt(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),ee.unobserve(pt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,oe.useEffect)(()=>{St&&St.setModel({original:ft.editor.createModel(st,Ve),modified:ft.editor.createModel(Te,Ve)})},[st,Te,Ve,St]);const Nt=mt(Ce),cn=mt(ze),Qt={width:Nt,height:cn};return oe.createElement("div",{className:"my-diff-editor",ref:pt,style:Qt})}},61904:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return ht}});var oe=fe(59301);function ht(Me,Xe){const me=(0,oe.useRef)();(0,oe.useEffect)(()=>{me.current=Me}),(0,oe.useEffect)(()=>{function je(){me.current()}if(Xe!==null){let He=setInterval(je,Xe);return()=>clearInterval(He)}},[Xe])}},88267:function(Zt,Ut,fe){"use strict";fe.r(Ut),fe.d(Ut,{default:function(){return et}});var oe=fe(59301),ht=fe(77834),Me=fe(58106),Xe=fe(93041),me=fe(24404),je=fe(28284),He=fe(6767),Ke=fe(91882),Se=fe(77019),de=fe(5269),we=fe(82326),ge=fe(37568),lt=fe(37285),Re=fe(17149),Ie=fe(7939),We=fe(37172),Ee={flex_box_center:"flex_box_center___JefHi",flex_space_between:"flex_space_between___N1h0l",flex_box_vertical_center:"flex_box_vertical_center___Mtb4t",flex_box_center_end:"flex_box_center_end___F6G6K",flex_box_column:"flex_box_column___JldFX",bg:"bg___Hgook",title:"title____XaYs",titleLeft:"titleLeft___xe0PB",titleRight:"titleRight___wML5g",btns:"btns___l22_n"},at=Object.defineProperty,rt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Ue=(Ae,Qe,Mt)=>Qe in Ae?at(Ae,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Ae[Qe]=Mt,Je=(Ae,Qe)=>{for(var Mt in Qe||(Qe={}))ct.call(Qe,Mt)&&Ue(Ae,Mt,Qe[Mt]);if(rt)for(var Mt of rt(Qe))Ge.call(Qe,Mt)&&Ue(Ae,Mt,Qe[Mt]);return Ae},Ye=(Ae,Qe)=>{var Mt={};for(var wt in Ae)ct.call(Ae,wt)&&Qe.indexOf(wt)<0&&(Mt[wt]=Ae[wt]);if(Ae!=null&&rt)for(var wt of rt(Ae))Qe.indexOf(wt)<0&&Ge.call(Ae,wt)&&(Mt[wt]=Ae[wt]);return Mt},Tt=(Ae,Qe,Mt)=>new Promise((wt,$t)=>{var Ht=mt=>{try{he(Mt.next(mt))}catch(Kt){$t(Kt)}},ve=mt=>{try{he(Mt.throw(mt))}catch(Kt){$t(Kt)}},he=mt=>mt.done?wt(mt.value):Promise.resolve(mt.value).then(Ht,ve);he((Mt=Mt.apply(Ae,Qe)).next())});const{SubMenu:Le}=Xe.default,{Content:Ze,Sider:Ct}=me.default,Fe=Ae=>{var Qe=Ae,{graduation:Mt,globalSetting:wt,loading:$t,user:Ht,dispatch:ve}=Qe,he=Ye(Qe,["graduation","globalSetting","loading","user","dispatch"]),mt,Kt,Ft,Ne,ot,ft,rn;const kt=(0,Me.useParams)(),_e=(0,Me.useLocation)(),{userInfo:Ce}=Ht,[ze]=je.default.useForm(),{addTopicData:st}=Mt,Te=()=>Tt(void 0,null,function*(){const Ve=ze.getFieldsValue(),$e=Je({},Ve);$e.city&&($e.province=$e.city[0],$e.city=$e.city[1]);const pt=yield ve({type:"graduation/addTopic",payload:{coursesId:kt.coursesId,attachment_ids:[],graduation_topic:$e}});pt.status?He.ZP.error(pt.message):Me.history.push(`/classrooms/${kt.coursesId}/graduation_topics/${kt.categoryId}`)});return(0,oe.useEffect)(()=>{ve({type:"graduation/addTopicDefaultData",payload:Je({},kt)})},[kt.coursesId]),oe.createElement("section",{className:"edu-container"},oe.createElement("section",{className:"animated fadeIn"},oe.createElement("aside",{className:"mt10"},Ce&&oe.createElement(Ke.Z,{separator:">"},oe.createElement(Ke.Z.Item,null,oe.createElement(Me.Link,{to:`${Ce.first_category_url}`},(mt=Ce==null?void 0:Ce.course)==null?void 0:mt.course_name)),oe.createElement(Ke.Z.Item,null,oe.createElement(Me.Link,{to:`/classrooms/${kt.coursesId}/graduation_topics/${kt.categoryId}`},"\u6BD5\u8BBE\u9009\u9898")),oe.createElement(Ke.Z.Item,null,"\u65B0\u5EFA"))),oe.createElement("aside",{className:[Ee.title,"mt20"].join(" ")},oe.createElement(Se.Z,{style:{width:"100%"}},oe.createElement(de.Z,{flex:"1"},oe.createElement("strong",{className:"font20 ml5"},"\u65B0\u5EFA\u6BD5\u8BBE\u9009\u9898")),oe.createElement(de.Z,null,oe.createElement(Me.Link,{className:"font16 c-light-black",to:`/classrooms/${kt.coursesId}/exercise`},"\u8FD4\u56DE"))))),oe.createElement("section",{className:[Ee.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},oe.createElement(je.default,{layout:"vertical",form:ze,scrollToFirstError:!0,onFinish:Ve=>Tt(void 0,null,function*(){Te()})},oe.createElement(je.default.Item,{name:"tea_id",label:"\u6307\u5BFC\u8001\u5E08\uFF1A",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08"}]},oe.createElement(we.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u6307\u5BFC\u8001\u5E08",style:{width:200}},(Kt=st.teacher_list)==null?void 0:Kt.map(function(Ve,$e){return oe.createElement(we.default.Option,{value:Ve.id,key:$e},Ve.name)}))),oe.createElement(je.default.Item,{name:"name",label:"\u9009\u9898\u540D\u79F0\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},oe.createElement(ge.default,{maxLength:60,size:"middle",placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),oe.createElement(lt.Z,null),oe.createElement(je.default.Item,{label:"\u9009\u9898\u7B80\u4ECB",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},oe.createElement(ht.Z,{watch:!0,placeholder:"\u8BF7\u7B80\u8981\u8BF4\u660E\u9009\u9898\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u52365000\u4E2A\u5B57\u7B26"})),oe.createElement(Se.Z,{gutter:[20,0]},oe.createElement(de.Z,{flex:"1"},oe.createElement(je.default.Item,{name:"topic_type"},oe.createElement(we.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u7C7B\u578B"},(Ft=st.topic_type)==null?void 0:Ft.map(function(Ve,$e){return oe.createElement(we.default.Option,{value:Ve.id,key:$e},Ve.name)})))),oe.createElement(de.Z,{flex:"1"},oe.createElement(je.default.Item,{name:"topic_source"},oe.createElement(we.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6765\u6E90"},(Ne=st.topic_source)==null?void 0:Ne.map(function(Ve,$e){return oe.createElement(we.default.Option,{value:Ve.id,key:$e},Ve.name)})))),oe.createElement(de.Z,{flex:"1"},oe.createElement(je.default.Item,{name:"topic_property_first"},oe.createElement(we.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D281"},(ot=st.topic_property_first)==null?void 0:ot.map(function(Ve,$e){return oe.createElement(we.default.Option,{value:Ve.id,key:$e},Ve.name)})))),oe.createElement(de.Z,{flex:"1"},oe.createElement(je.default.Item,{name:"topic_property_second"},oe.createElement(we.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u9009\u9898\u6027\u8D282"},(ft=st.topic_property_second)==null?void 0:ft.map(function(Ve,$e){return oe.createElement(we.default.Option,{value:Ve.id,key:$e},Ve.name)})))),oe.createElement(de.Z,{flex:"150px"})),oe.createElement(lt.Z,null),oe.createElement(je.default.Item,{name:"source_unit",label:"\u9009\u9898\u6765\u6E90\u5355\u4F4D\uFF1A"},oe.createElement(ge.default,{width:"200",size:"middle",style:{width:200},placeholder:"\u8BF7\u586B\u5199\u6765\u6E90\u5355\u4F4D"})),oe.createElement(je.default.Item,{name:"topic_repeat",label:"\u9009\u9898\u91CD\u590D\u60C5\u51B5\uFF1A"},oe.createElement(we.default,{size:"middle",placeholder:"\u8BF7\u9009\u62E9\u91CD\u590D\u60C5\u51B5",style:{width:200}},(rn=st.topic_repeat)==null?void 0:rn.map(function(Ve,$e){return oe.createElement(we.default.Option,{value:Ve.id,key:$e},Ve.name)}))),oe.createElement(je.default.Item,{name:"city",label:"\u8C03\u7814\u6216\u5B9E\u4E60\u5730\u70B9\uFF1A"},oe.createElement(Re.Z,{size:"middle",style:{width:200},options:We.P,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730"})))),oe.createElement("aside",{className:Ee.btns},oe.createElement(Ie.ZP,{type:"primary",onClick:()=>{ze.submit()}},"\u4FDD\u5B58"),oe.createElement(Me.Link,{to:`/classrooms/${kt.coursesId}/graduation_topics/${kt.categoryId}`},"\u53D6\u6D88")))};var et=(0,Me.connect)(({graduation:Ae,loading:Qe,user:Mt,globalSetting:wt})=>({graduation:Ae,globalSetting:wt,user:Mt,loading:Qe.effects}))(Fe)},37172:function(Zt,Ut,fe){"use strict";fe.d(Ut,{P:function(){return oe}});const oe=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},58489:function(Zt,Ut,fe){"use strict";fe.d(Ut,{AL:function(){return Ge},Iy:function(){return we},Qv:function(){return Re},ez:function(){return ct},jb:function(){return ge}});var oe=fe(32834),ht=fe.n(oe),Me=fe(11690),Xe=fe.n(Me);let me=1;function je(Le,Ze){const Ct=Le.match(/^(\s+)(?:```)/);if(Ct===null)return Ze;const Fe=Ct[1];return Ze.split(`
|
|
`).map(et=>{const Ae=et.match(/^\s+/);if(Ae===null)return et;const[Qe]=Ae;return Qe.length>=Fe.length?et.slice(Fe.length):et}).join(`
|
|
`)}let He=[],Ke=["<ul>"];const Se=new(ht()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function we(){He.length=0,Ke=["<ul>"]}const ge={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function lt(Le,Ze,Ct,Fe){if(Ze>=Le.length||Le[Ze].level<=Ct)return Ze;var et=Le[Ze];Fe.push("<li><a href='#"+me+et.anchor+"'>"+et.text+"</a>"),Ze++;var Ae=[];return Ze=lt(Le,Ze,et.level,Ae),Ae.length>0&&(Fe.push("<ul>"),Ae.forEach(function(Qe){Fe.push(Qe)}),Fe.push("</ul>")),Fe.push("</li>"),Ze=lt(Le,Ze,Ct,Fe),Ze}function Re(){return lt(He,0,0,Ke),Ke.push("</ul>"),Ke.join("")}const Ie={heading(Le){const Ze=de.exec(Le);if(me+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(Le){const Ze=this.rules.block.fences.exec(Le);if(Ze){const Ct=Ze[0];let Fe=je(Ct,Ze[3]||"");const et=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(et)>=0){const Ae=at(),Qe=Fe;Fe=Ae,rt[Ae]={type:"block",expression:Qe}}return{type:"code",raw:Ct,lang:et,text:Fe}}}},We=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ee=0;const at=()=>`__special_katext_id_${Ee++}__`;let rt={};function ct(){return rt}function Ge(){Ee=0,rt={}}function Ue(Le){return Le=Le.replace(We,(Ze,Ct)=>{const Fe=at();return rt[Fe]={type:"inline",expression:Ct},Fe}),Le}const Je=Se.listitem;Se.listitem=function(Le){return Je(Ue(Le))};const Ye=Se.paragraph;Se.paragraph=function(Le){return Ye(Ue(Le))};const Tt=Se.tablecell;Se.tablecell=function(Le,Ze){return Tt(Ue(Le),Ze)},Se.code=function(Le,Ze,Ct){const Fe=(Ze||"").match(/\S*/)[0];return Fe?["latex","katex","math"].indexOf(Fe)>=0?`<p class='editormd-tex'>${Le}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${Ct?Le:(0,Me.escape)(Le,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Ct?Le:(0,Me.escape)(Le,!0))+"</code></pre>"},Se.heading=function(Le,Ze,Ct){let Fe=this.options.headerPrefix+Ct.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return He.push({anchor:Fe,level:Ze,text:Le}),"<h"+Ze+' id="'+me+Fe+'">'+Le+"</h"+Ze+">"},ht().setOptions({silent:!0,gfm:!0,pedantic:!1}),ht().use({tokenizer:Ie,renderer:Se}),Ut.ZP=ht()},99498:function(Zt,Ut,fe){(function(oe){oe(fe(89780))})(function(oe){oe.defineOption("placeholder","",function(Ke,Se,de){var we=de&&de!=oe.Init;if(Se&&!we)Ke.on("blur",me),Ke.on("change",je),Ke.on("swapDoc",je),oe.on(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose=function(){Xe(Ke)}),je(Ke);else if(!Se&&we){Ke.off("blur",me),Ke.off("change",je),Ke.off("swapDoc",je),oe.off(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose),ht(Ke);var ge=Ke.getWrapperElement();ge.className=ge.className.replace(" CodeMirror-empty","")}Se&&!Ke.hasFocus()&&me(Ke)});function ht(Ke){Ke.state.placeholder&&(Ke.state.placeholder.parentNode.removeChild(Ke.state.placeholder),Ke.state.placeholder=null)}function Me(Ke){ht(Ke);var Se=Ke.state.placeholder=document.createElement("pre");Se.style.cssText="height: 0; overflow: visible",Se.style.direction=Ke.getOption("direction"),Se.className="CodeMirror-placeholder CodeMirror-line-like";var de=Ke.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),Se.appendChild(de),Ke.display.lineSpace.insertBefore(Se,Ke.display.lineSpace.firstChild)}function Xe(Ke){setTimeout(function(){var Se=!1,de=Ke.getInputField();de.nodeName=="TEXTAREA"?Se=!de.value:Ke.lineCount()==1&&(Se=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),Se?Me(Ke):ht(Ke)},20)}function me(Ke){He(Ke)&&Me(Ke)}function je(Ke){var Se=Ke.getWrapperElement(),de=He(Ke);Se.className=Se.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Me(Ke):ht(Ke)}function He(Ke){return Ke.lineCount()===1&&Ke.getLine(0)===""}})},25717:function(Zt,Ut,fe){(function(oe){oe(fe(89780))})(function(oe){var ht={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Me=oe.Pos;oe.defineOption("autoCloseBrackets",!1,function(Ie,We,Ee){Ee&&Ee!=oe.Init&&(Ie.removeKeyMap(me),Ie.state.closeBrackets=null),We&&(je(Xe(We,"pairs")),Ie.state.closeBrackets=We,Ie.addKeyMap(me))});function Xe(Ie,We){return We=="pairs"&&typeof Ie=="string"?Ie:typeof Ie=="object"&&Ie[We]!=null?Ie[We]:ht[We]}var me={Backspace:Se,Enter:de};function je(Ie){for(var We=0;We<Ie.length;We++){var Ee=Ie.charAt(We),at="'"+Ee+"'";me[at]||(me[at]=He(Ee))}}je(ht.pairs+"`");function He(Ie){return function(We){return ge(We,Ie)}}function Ke(Ie){var We=Ie.state.closeBrackets;if(!We||We.override)return We;var Ee=Ie.getModeAt(Ie.getCursor());return Ee.closeBrackets||We}function Se(Ie){var We=Ke(Ie);if(!We||Ie.getOption("disableInput"))return oe.Pass;for(var Ee=Xe(We,"pairs"),at=Ie.listSelections(),rt=0;rt<at.length;rt++){if(!at[rt].empty())return oe.Pass;var ct=lt(Ie,at[rt].head);if(!ct||Ee.indexOf(ct)%2!=0)return oe.Pass}for(var rt=at.length-1;rt>=0;rt--){var Ge=at[rt].head;Ie.replaceRange("",Me(Ge.line,Ge.ch-1),Me(Ge.line,Ge.ch+1),"+delete")}}function de(Ie){var We=Ke(Ie),Ee=We&&Xe(We,"explode");if(!Ee||Ie.getOption("disableInput"))return oe.Pass;for(var at=Ie.listSelections(),rt=0;rt<at.length;rt++){if(!at[rt].empty())return oe.Pass;var ct=lt(Ie,at[rt].head);if(!ct||Ee.indexOf(ct)%2!=0)return oe.Pass}Ie.operation(function(){var Ge=Ie.lineSeparator()||`
|
|
`;Ie.replaceSelection(Ge+Ge,null),Ie.execCommand("goCharLeft"),at=Ie.listSelections();for(var Ue=0;Ue<at.length;Ue++){var Je=at[Ue].head.line;Ie.indentLine(Je,null,!0),Ie.indentLine(Je+1,null,!0)}})}function we(Ie){var We=oe.cmpPos(Ie.anchor,Ie.head)>0;return{anchor:new Me(Ie.anchor.line,Ie.anchor.ch+(We?-1:1)),head:new Me(Ie.head.line,Ie.head.ch+(We?1:-1))}}function ge(Ie,We){var Ee=Ke(Ie);if(!Ee||Ie.getOption("disableInput"))return oe.Pass;var at=Xe(Ee,"pairs"),rt=at.indexOf(We);if(rt==-1)return oe.Pass;for(var ct=Xe(Ee,"closeBefore"),Ge=Xe(Ee,"triples"),Ue=at.charAt(rt+1)==We,Je=Ie.listSelections(),Ye=rt%2==0,Tt,Le=0;Le<Je.length;Le++){var Ze=Je[Le],Ct=Ze.head,Fe,et=Ie.getRange(Ct,Me(Ct.line,Ct.ch+1));if(Ye&&!Ze.empty())Fe="surround";else if((Ue||!Ye)&&et==We)Ue&&Re(Ie,Ct)?Fe="both":Ge.indexOf(We)>=0&&Ie.getRange(Ct,Me(Ct.line,Ct.ch+3))==We+We+We?Fe="skipThree":Fe="skip";else if(Ue&&Ct.ch>1&&Ge.indexOf(We)>=0&&Ie.getRange(Me(Ct.line,Ct.ch-2),Ct)==We+We){if(Ct.ch>2&&/\bstring/.test(Ie.getTokenTypeAt(Me(Ct.line,Ct.ch-2))))return oe.Pass;Fe="addFour"}else if(Ue){var Ae=Ct.ch==0?" ":Ie.getRange(Me(Ct.line,Ct.ch-1),Ct);if(!oe.isWordChar(et)&&Ae!=We&&!oe.isWordChar(Ae))Fe="both";else return oe.Pass}else if(Ye&&(et.length===0||/\s/.test(et)||ct.indexOf(et)>-1))Fe="both";else return oe.Pass;if(!Tt)Tt=Fe;else if(Tt!=Fe)return oe.Pass}var Qe=rt%2?at.charAt(rt-1):We,Mt=rt%2?We:at.charAt(rt+1);Ie.operation(function(){if(Tt=="skip")Ie.execCommand("goCharRight");else if(Tt=="skipThree")for(var wt=0;wt<3;wt++)Ie.execCommand("goCharRight");else if(Tt=="surround"){for(var $t=Ie.getSelections(),wt=0;wt<$t.length;wt++)$t[wt]=Qe+$t[wt]+Mt;Ie.replaceSelections($t,"around"),$t=Ie.listSelections().slice();for(var wt=0;wt<$t.length;wt++)$t[wt]=we($t[wt]);Ie.setSelections($t)}else Tt=="both"?(Ie.replaceSelection(Qe+Mt,null),Ie.triggerElectric(Qe+Mt),Ie.execCommand("goCharLeft")):Tt=="addFour"&&(Ie.replaceSelection(Qe+Qe+Qe+Qe,"before"),Ie.execCommand("goCharRight"))})}function lt(Ie,We){var Ee=Ie.getRange(Me(We.line,We.ch-1),Me(We.line,We.ch+1));return Ee.length==2?Ee:null}function Re(Ie,We){var Ee=Ie.getTokenAt(Me(We.line,We.ch+1));return/\bstring/.test(Ee.type)&&Ee.start==We.ch&&(We.ch==0||!/\bstring/.test(Ie.getTokenTypeAt(We)))}})},6313:function(Zt,Ut,fe){(function(oe){oe(fe(89780),fe(32855))})(function(oe){oe.defineOption("autoCloseTags",!1,function(Se,de,we){if(we!=oe.Init&&we&&Se.removeKeyMap("autoCloseTags"),!!de){var ge={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(ge["'/'"]=function(lt){return je(lt)}),(typeof de!="object"||de.whenOpening!==!1)&&(ge["'>'"]=function(lt){return Xe(lt)}),Se.addKeyMap(ge)}});var ht=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Me=["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 Xe(Se){if(Se.getOption("disableInput"))return oe.Pass;for(var de=Se.listSelections(),we=[],ge=Se.getOption("autoCloseTags"),lt=0;lt<de.length;lt++){if(!de[lt].empty())return oe.Pass;var Re=de[lt].head,Ie=Se.getTokenAt(Re),We=oe.innerMode(Se.getMode(),Ie.state),Ee=We.state,at=We.mode.xmlCurrentTag&&We.mode.xmlCurrentTag(Ee),rt=at&&at.name;if(!rt)return oe.Pass;var ct=We.mode.configuration=="html",Ge=typeof ge=="object"&&ge.dontCloseTags||ct&&ht,Ue=typeof ge=="object"&&ge.indentTags||ct&&Me;Ie.end>Re.ch&&(rt=rt.slice(0,rt.length-Ie.end+Re.ch));var Je=rt.toLowerCase();if(!rt||Ie.type=="string"&&(Ie.end!=Re.ch||!/[\"\']/.test(Ie.string.charAt(Ie.string.length-1))||Ie.string.length==1)||Ie.type=="tag"&&at.close||Ie.string.indexOf("/")==Re.ch-Ie.start-1||Ge&&He(Ge,Je)>-1||Ke(Se,We.mode.xmlCurrentContext&&We.mode.xmlCurrentContext(Ee)||[],rt,Re,!0))return oe.Pass;var Ye=typeof ge=="object"&&ge.emptyTags;if(Ye&&He(Ye,rt)>-1){we[lt]={text:"/>",newPos:oe.Pos(Re.line,Re.ch+2)};continue}var Tt=Ue&&He(Ue,Je)>-1;we[lt]={indent:Tt,text:">"+(Tt?`
|
|
|
|
`:"")+"</"+rt+">",newPos:Tt?oe.Pos(Re.line+1,0):oe.Pos(Re.line,Re.ch+1)}}for(var Le=typeof ge=="object"&&ge.dontIndentOnAutoClose,lt=de.length-1;lt>=0;lt--){var Ze=we[lt];Se.replaceRange(Ze.text,de[lt].head,de[lt].anchor,"+insert");var Ct=Se.listSelections().slice(0);Ct[lt]={head:Ze.newPos,anchor:Ze.newPos},Se.setSelections(Ct),!Le&&Ze.indent&&(Se.indentLine(Ze.newPos.line,null,!0),Se.indentLine(Ze.newPos.line+1,null,!0))}}function me(Se,de){for(var we=Se.listSelections(),ge=[],lt=de?"/":"</",Re=Se.getOption("autoCloseTags"),Ie=typeof Re=="object"&&Re.dontIndentOnSlash,We=0;We<we.length;We++){if(!we[We].empty())return oe.Pass;var Ee=we[We].head,at=Se.getTokenAt(Ee),rt=oe.innerMode(Se.getMode(),at.state),ct=rt.state;if(de&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=Ee.ch-1))return oe.Pass;var Ge,Ue=rt.mode.name!="xml"&&Se.getMode().name=="htmlmixed";if(Ue&&rt.mode.name=="javascript")Ge=lt+"script";else if(Ue&&rt.mode.name=="css")Ge=lt+"style";else{var Je=rt.mode.xmlCurrentContext&&rt.mode.xmlCurrentContext(ct);if(!Je||Je.length&&Ke(Se,Je,Je[Je.length-1],Ee))return oe.Pass;Ge=lt+Je[Je.length-1]}Se.getLine(Ee.line).charAt(at.end)!=">"&&(Ge+=">"),ge[We]=Ge}if(Se.replaceSelections(ge),we=Se.listSelections(),!Ie)for(var We=0;We<we.length;We++)(We==we.length-1||we[We].head.line<we[We+1].head.line)&&Se.indentLine(we[We].head.line)}function je(Se){return Se.getOption("disableInput")?oe.Pass:me(Se,!0)}oe.commands.closeTag=function(Se){return me(Se)};function He(Se,de){if(Se.indexOf)return Se.indexOf(de);for(var we=0,ge=Se.length;we<ge;++we)if(Se[we]==de)return we;return-1}function Ke(Se,de,we,ge,lt){if(!oe.scanForClosingTag)return!1;var Re=Math.min(Se.lastLine()+1,ge.line+500),Ie=oe.scanForClosingTag(Se,ge,null,Re);if(!Ie||Ie.tag!=we)return!1;for(var We=lt?1:0,Ee=de.length-1;Ee>=0&&de[Ee]==we;Ee--)++We;ge=Ie.to;for(var Ee=1;Ee<We;Ee++){var at=oe.scanForClosingTag(Se,ge,null,Re);if(!at||at.tag!=we)return!1;ge=at.to}return!0}})},32855:function(Zt,Ut,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";var ht=oe.Pos;function Me(Ee,at){return Ee.line-at.line||Ee.ch-at.ch}var Xe="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",me=Xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",je=new RegExp("<(/?)(["+Xe+"]["+me+"]*)","g");function He(Ee,at,rt,ct){this.line=at,this.ch=rt,this.cm=Ee,this.text=Ee.getLine(at),this.min=ct?Math.max(ct.from,Ee.firstLine()):Ee.firstLine(),this.max=ct?Math.min(ct.to-1,Ee.lastLine()):Ee.lastLine()}function Ke(Ee,at){var rt=Ee.cm.getTokenTypeAt(ht(Ee.line,at));return rt&&/\btag\b/.test(rt)}function Se(Ee){if(!(Ee.line>=Ee.max))return Ee.ch=0,Ee.text=Ee.cm.getLine(++Ee.line),!0}function de(Ee){if(!(Ee.line<=Ee.min))return Ee.text=Ee.cm.getLine(--Ee.line),Ee.ch=Ee.text.length,!0}function we(Ee){for(;;){var at=Ee.text.indexOf(">",Ee.ch);if(at==-1){if(Se(Ee))continue;return}if(!Ke(Ee,at+1)){Ee.ch=at+1;continue}var rt=Ee.text.lastIndexOf("/",at),ct=rt>-1&&!/\S/.test(Ee.text.slice(rt+1,at));return Ee.ch=at+1,ct?"selfClose":"regular"}}function ge(Ee){for(;;){var at=Ee.ch?Ee.text.lastIndexOf("<",Ee.ch-1):-1;if(at==-1){if(de(Ee))continue;return}if(!Ke(Ee,at+1)){Ee.ch=at;continue}je.lastIndex=at,Ee.ch=at;var rt=je.exec(Ee.text);if(rt&&rt.index==at)return rt}}function lt(Ee){for(;;){je.lastIndex=Ee.ch;var at=je.exec(Ee.text);if(!at){if(Se(Ee))continue;return}if(!Ke(Ee,at.index+1)){Ee.ch=at.index+1;continue}return Ee.ch=at.index+at[0].length,at}}function Re(Ee){for(;;){var at=Ee.ch?Ee.text.lastIndexOf(">",Ee.ch-1):-1;if(at==-1){if(de(Ee))continue;return}if(!Ke(Ee,at+1)){Ee.ch=at;continue}var rt=Ee.text.lastIndexOf("/",at),ct=rt>-1&&!/\S/.test(Ee.text.slice(rt+1,at));return Ee.ch=at+1,ct?"selfClose":"regular"}}function Ie(Ee,at){for(var rt=[];;){var ct=lt(Ee),Ge,Ue=Ee.line,Je=Ee.ch-(ct?ct[0].length:0);if(!ct||!(Ge=we(Ee)))return;if(Ge!="selfClose")if(ct[1]){for(var Ye=rt.length-1;Ye>=0;--Ye)if(rt[Ye]==ct[2]){rt.length=Ye;break}if(Ye<0&&(!at||at==ct[2]))return{tag:ct[2],from:ht(Ue,Je),to:ht(Ee.line,Ee.ch)}}else rt.push(ct[2])}}function We(Ee,at){for(var rt=[];;){var ct=Re(Ee);if(!ct)return;if(ct=="selfClose"){ge(Ee);continue}var Ge=Ee.line,Ue=Ee.ch,Je=ge(Ee);if(!Je)return;if(Je[1])rt.push(Je[2]);else{for(var Ye=rt.length-1;Ye>=0;--Ye)if(rt[Ye]==Je[2]){rt.length=Ye;break}if(Ye<0&&(!at||at==Je[2]))return{tag:Je[2],from:ht(Ee.line,Ee.ch),to:ht(Ge,Ue)}}}}oe.registerHelper("fold","xml",function(Ee,at){for(var rt=new He(Ee,at.line,0);;){var ct=lt(rt);if(!ct||rt.line!=at.line)return;var Ge=we(rt);if(!Ge)return;if(!ct[1]&&Ge!="selfClose"){var Ue=ht(rt.line,rt.ch),Je=Ie(rt,ct[2]);return Je&&Me(Je.from,Ue)>0?{from:Ue,to:Je.from}:null}}}),oe.findMatchingTag=function(Ee,at,rt){var ct=new He(Ee,at.line,at.ch,rt);if(!(ct.text.indexOf(">")==-1&&ct.text.indexOf("<")==-1)){var Ge=we(ct),Ue=Ge&&ht(ct.line,ct.ch),Je=Ge&&ge(ct);if(!(!Ge||!Je||Me(ct,at)>0)){var Ye={from:ht(ct.line,ct.ch),to:Ue,tag:Je[2]};return Ge=="selfClose"?{open:Ye,close:null,at:"open"}:Je[1]?{open:We(ct,Je[2]),close:Ye,at:"close"}:(ct=new He(Ee,Ue.line,Ue.ch,rt),{open:Ye,close:Ie(ct,Je[2]),at:"open"})}}},oe.findEnclosingTag=function(Ee,at,rt,ct){for(var Ge=new He(Ee,at.line,at.ch,rt);;){var Ue=We(Ge,ct);if(!Ue)break;var Je=new He(Ee,at.line,at.ch,rt),Ye=Ie(Je,Ue.tag);if(Ye)return{open:Ue,close:Ye}}},oe.scanForClosingTag=function(Ee,at,rt,ct){var Ge=new He(Ee,at.line,at.ch,ct?{from:0,to:ct}:null);return Ie(Ge,rt)}})},89780:function(Zt){(function(Ut,fe){Zt.exports=fe()})(this,function(){"use strict";var Ut=navigator.userAgent,fe=navigator.platform,oe=/gecko\/\d/i.test(Ut),ht=/MSIE \d/.test(Ut),Me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ut),Xe=/Edge\/(\d+)/.exec(Ut),me=ht||Me||Xe,je=me&&(ht?document.documentMode||6:+(Xe||Me)[1]),He=!Xe&&/WebKit\//.test(Ut),Ke=He&&/Qt\/\d+\.\d+/.test(Ut),Se=!Xe&&/Chrome\//.test(Ut),de=/Opera\//.test(Ut),we=/Apple Computer/.test(navigator.vendor),ge=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ut),lt=/PhantomJS/.test(Ut),Re=!Xe&&/AppleWebKit/.test(Ut)&&/Mobile\/\w+/.test(Ut),Ie=/Android/.test(Ut),We=Re||Ie||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ut),Ee=Re||/Mac/.test(fe),at=/\bCrOS\b/.test(Ut),rt=/win/i.test(fe),ct=de&&Ut.match(/Version\/(\d*\.\d*)/);ct&&(ct=Number(ct[1])),ct&&ct>=15&&(de=!1,He=!0);var Ge=Ee&&(Ke||de&&(ct==null||ct<12.11)),Ue=oe||me&&je>=9;function Je(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var Ye=function(a,y){var x=a.className,b=Je(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function Tt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Le(a,y){return Tt(a).appendChild(y)}function Ze(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var z=0;z<y.length;++z)E.appendChild(y[z]);return E}function Ct(a,y,x,b){var E=Ze(a,y,x,b);return E.setAttribute("role","presentation"),E}var Fe;document.createRange?Fe=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Fe=function(a,y,x){var b=document.body.createTextRange();try{b.moveToElementText(a.parentNode)}catch(E){return b}return b.collapse(!0),b.moveEnd("character",x),b.moveStart("character",y),b};function et(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Ae(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function Qe(a,y){var x=a.className;Je(y).test(x)||(a.className+=(x?" ":"")+y)}function Mt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!Je(x[b]).test(y)&&(y+=" "+x[b]);return y}var wt=function(a){a.select()};Re?wt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(wt=function(a){try{a.select()}catch(y){}});function $t(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Ht(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function ve(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var z=b||0,re=E||0;;){var ae=a.indexOf(" ",z);if(ae<0||ae>=y)return re+(y-z);re+=ae-z,re+=x-re%x,z=ae+1}}var he=function(){this.id=null,this.f=null,this.time=0,this.handler=$t(this.onTimeout,this)};he.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},he.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function mt(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var Kt=50,Ft={toString:function(){return"CodeMirror.Pass"}},Ne={scroll:!1},ot={origin:"*mouse"},ft={origin:"+move"};function rn(a,y,x){for(var b=0,E=0;;){var z=a.indexOf(" ",b);z==-1&&(z=a.length);var re=z-b;if(z==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=z-b,E+=x-E%x,b=z+1,E>=y)return b}}var kt=[""];function _e(a){for(;kt.length<=a;)kt.push(Ce(kt)+" ");return kt[a]}function Ce(a){return a[a.length-1]}function ze(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function st(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function Te(){}function Ve(a,y){var x;return Object.create?x=Object.create(a):(Te.prototype=a,x=new Te),y&&Ht(y,x),x}var $e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function pt(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||$e.test(a))}function St(a,y){return y?y.source.indexOf("\\w")>-1&&pt(a)?!0:y.test(a):pt(a)}function Et(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var Bt=/[\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 Nt(a){return a.charCodeAt(0)>=768&&Bt.test(a)}function cn(a,y,x){for(;(x<0?y>0:y<a.length)&&Nt(a.charAt(y));)y+=x;return y}function Qt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,z=b<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:x;a(z)?x=z:y=z+b}}function le(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,z=0;z<a.length;++z){var re=a[z];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",z),E=!0)}E||b(y,x,"ltr")}var te=null;function ee(a,y,x){var b;te=null;for(var E=0;E<a.length;++E){var z=a[E];if(z.from<y&&z.to>y)return E;z.to==y&&(z.from!=z.to&&x=="before"?b=E:te=E),z.from==y&&(z.from!=z.to&&x!="before"?b=E:te=E)}return b!=null?b:te}var ie=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ce){return ce<=247?a.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?y.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,ae=/[1n]/;function se(ce,xe,De){this.level=ce,this.from=xe,this.to=De}return function(ce,xe){var De=xe=="ltr"?"L":"R";if(ce.length==0||xe=="ltr"&&!b.test(ce))return!1;for(var nt=ce.length,qe=[],At=0;At<nt;++At)qe.push(x(ce.charCodeAt(At)));for(var zt=0,on=De;zt<nt;++zt){var mn=qe[zt];mn=="m"?qe[zt]=on:on=mn}for(var Bn=0,gn=De;Bn<nt;++Bn){var Pn=qe[Bn];Pn=="1"&&gn=="r"?qe[Bn]="n":z.test(Pn)&&(gn=Pn,Pn=="r"&&(qe[Bn]="R"))}for(var Qn=1,Gn=qe[0];Qn<nt-1;++Qn){var ur=qe[Qn];ur=="+"&&Gn=="1"&&qe[Qn+1]=="1"?qe[Qn]="1":ur==","&&Gn==qe[Qn+1]&&(Gn=="1"||Gn=="n")&&(qe[Qn]=Gn),Gn=ur}for(var Wr=0;Wr<nt;++Wr){var li=qe[Wr];if(li==",")qe[Wr]="N";else if(li=="%"){var Ur=void 0;for(Ur=Wr+1;Ur<nt&&qe[Ur]=="%";++Ur);for(var Ti=Wr&&qe[Wr-1]=="!"||Ur<nt&&qe[Ur]=="1"?"1":"N",Ei=Wr;Ei<Ur;++Ei)qe[Ei]=Ti;Wr=Ur-1}}for(var $r=0,ki=De;$r<nt;++$r){var di=qe[$r];ki=="L"&&di=="1"?qe[$r]="L":z.test(di)&&(ki=di)}for(var ii=0;ii<nt;++ii)if(E.test(qe[ii])){var ei=void 0;for(ei=ii+1;ei<nt&&E.test(qe[ei]);++ei);for(var Yr=(ii?qe[ii-1]:De)=="L",Di=(ei<nt?qe[ei]:De)=="L",Va=Yr==Di?Yr?"L":"R":De,ya=ii;ya<ei;++ya)qe[ya]=Va;ii=ei-1}for(var pi=[],ea,si=0;si<nt;)if(re.test(qe[si])){var bl=si;for(++si;si<nt&&re.test(qe[si]);++si);pi.push(new se(0,bl,si))}else{var aa=si,Ba=pi.length,Aa=xe=="rtl"?1:0;for(++si;si<nt&&qe[si]!="L";++si);for(var bi=aa;bi<si;)if(ae.test(qe[bi])){aa<bi&&(pi.splice(Ba,0,new se(1,aa,bi)),Ba+=Aa);var ja=bi;for(++bi;bi<si&&ae.test(qe[bi]);++bi);pi.splice(Ba,0,new se(2,ja,bi)),Ba+=Aa,aa=bi}else++bi;aa<si&&pi.splice(Ba,0,new se(1,aa,si))}return xe=="ltr"&&(pi[0].level==1&&(ea=ce.match(/^\s+/))&&(pi[0].from=ea[0].length,pi.unshift(new se(0,0,ea[0].length))),Ce(pi).level==1&&(ea=ce.match(/\s+$/))&&(Ce(pi).to-=ea[0].length,pi.push(new se(0,nt-ea[0].length,nt)))),xe=="rtl"?pi.reverse():pi}}();function ue(a,y){var x=a.order;return x==null&&(x=a.order=ie(a.text,y)),x}var ne=[],be=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||ne).concat(x)}};function gt(a,y){return a._handlers&&a._handlers[y]||ne}function ye(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var z=mt(E,x);z>-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function Pe(a,y){var x=gt(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function pe(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Pe(a,x||y.type,a,y),It(y)||y.codemirrorIgnore}function ut(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var x=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),b=0;b<y.length;++b)mt(x,y[b])==-1&&x.push(y[b])}function dt(a,y){return gt(a,y).length>0}function vt(a){a.prototype.on=function(y,x){be(this,y,x)},a.prototype.off=function(y,x){ye(this,y,x)}}function Dt(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function jt(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function It(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Xt(a){Dt(a),jt(a)}function Fn(a){return a.target||a.srcElement}function Sn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ee&&a.ctrlKey&&y==1&&(y=3),y}var Ln=function(){if(me&&je<9)return!1;var a=Ze("div");return"draggable"in a||"dragDrop"in a}(),Tn;function In(a){if(Tn==null){var y=Ze("span","\u200B");Le(a,Ze("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Tn=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&je<8))}var x=Tn?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Dn;function Cn(a){if(Dn!=null)return Dn;var y=Le(a,document.createTextNode("A\u062EA")),x=Fe(y,0,1).getBoundingClientRect(),b=Fe(y,1,2).getBoundingClientRect();return Tt(a),!x||x.left==x.right?!1:Dn=b.right-x.right<3}var Hn=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
|
|
`,y);E==-1&&(E=a.length);var z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(x.push(z.slice(0,re)),y+=re+1):(x.push(z),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Yn=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},yn=function(){var a=Ze("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),On=null;function zn(a){if(On!=null)return On;var y=Le(a,Ze("span","x")),x=y.getBoundingClientRect(),b=Fe(y,0,1).getBoundingClientRect();return On=Math.abs(x.left-b.left)>1}var Wn={},Lt={};function tn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Wn[a]=y}function un(a,y){Lt[a]=y}function En(a){if(typeof a=="string"&&Lt.hasOwnProperty(a))a=Lt[a];else if(a&&typeof a.name=="string"&&Lt.hasOwnProperty(a.name)){var y=Lt[a.name];typeof y=="string"&&(y={name:y}),a=Ve(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return En("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return En("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function xn(a,y){y=En(y);var x=Wn[y.name];if(!x)return xn(a,"text/plain");var b=x(a,y);if(Rn.hasOwnProperty(y.name)){var E=Rn[y.name];for(var z in E)E.hasOwnProperty(z)&&(b.hasOwnProperty(z)&&(b["_"+z]=b[z]),b[z]=E[z])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var Rn={};function Zn(a,y){var x=Rn.hasOwnProperty(a)?Rn[a]:Rn[a]={};Ht(y,x)}function _n(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Nn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function Jn(a,y,x){return a.startState?a.startState(y,x):!0}var Rt=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};Rt.prototype.eol=function(){return this.pos>=this.string.length},Rt.prototype.sol=function(){return this.pos==this.lineStart},Rt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Rt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Rt.prototype.eat=function(a){var y=this.string.charAt(this.pos),x;if(typeof a=="string"?x=y==a:x=y&&(a.test?a.test(y):a(y)),x)return++this.pos,y},Rt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Rt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Rt.prototype.skipToEnd=function(){this.pos=this.string.length},Rt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Rt.prototype.backUp=function(a){this.pos-=a},Rt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},Rt.prototype.indentation=function(){return ve(this.string,null,this.tabSize)-(this.lineStart?ve(this.string,this.lineStart,this.tabSize):0)},Rt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var z=this.string.slice(this.pos).match(a);return z&&z.index>0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},Rt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Rt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Rt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Rt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function it(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],z=E.chunkSize();if(y<z){x=E;break}y-=z}return x.lines[y]}function Yt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(z){var re=z.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function hn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Vn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function ke(a){if(a.parent==null)return null;for(var y=a.parent,x=mt(y.lines,a),b=y.parent;b;y=b,b=b.parent)for(var E=0;b.children[E]!=y;++E)x+=b.children[E].chunkSize();return x+y.first}function Be(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],z=E.height;if(y<z){a=E;continue e}y-=z,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var ae=a.lines[re],se=ae.height;if(y<se)break;y-=se}return x+re}function Pt(a,y){return y>=a.first&&y<a.first+a.size}function bt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Oe(a,y,x){if(x===void 0&&(x=null),!(this instanceof Oe))return new Oe(a,y,x);this.line=a,this.ch=y,this.sticky=x}function xt(a,y){return a.line-y.line||a.ch-y.ch}function Gt(a,y){return a.sticky==y.sticky&&xt(a,y)==0}function an(a){return Oe(a.line,a.ch)}function fn(a,y){return xt(a,y)<0?y:a}function Ot(a,y){return xt(a,y)<0?a:y}function qt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function yt(a,y){if(y.line<a.first)return Oe(a.first,0);var x=a.first+a.size-1;return y.line>x?Oe(x,it(a,x).text.length):tt(y,it(a,y.line).text.length)}function tt(a,y){var x=a.ch;return x==null||x>y?Oe(a.line,y):x<0?Oe(a.line,0):a}function _t(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=yt(a,y[b]);return x}var ln=function(a,y){this.state=a,this.lookAhead=y},dn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};dn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},dn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},dn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dn.fromSaved=function(a,y,x){return y instanceof ln?new dn(a,_n(a.mode,y.state),x,y.lookAhead):new dn(a,_n(a.mode,y),x)},dn.prototype.save=function(a){var y=a!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ln(y,this.maxLookAhead):y};function An(a,y,x,b){var E=[a.state.modeGen],z={};or(a,y.text,a.doc.mode,x,function(ce,xe){return E.push(ce,xe)},z,b);for(var re=x.state,ae=function(ce){x.baseTokens=E;var xe=a.state.overlays[ce],De=1,nt=0;x.state=!0,or(a,y.text,xe.mode,x,function(qe,At){for(var zt=De;nt<qe;){var on=E[De];on>qe&&E.splice(De,1,qe,E[De+1],on),De+=2,nt=Math.min(qe,on)}if(At)if(xe.opaque)E.splice(zt,De-zt,qe,"overlay "+At),De=zt+2;else for(;zt<De;zt+=2){var mn=E[zt+1];E[zt+1]=(mn?mn+" ":"")+"overlay "+At}},z),x.state=re,x.baseTokens=null,x.baseTokenPos=1},se=0;se<a.state.overlays.length;++se)ae(se);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function jn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=er(a,ke(y)),E=y.text.length>a.options.maxHighlightLength&&_n(a.doc.mode,b.state),z=An(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function er(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new dn(b,!0,y);var z=Fr(a,y,x),re=z>b.first&&it(b,z-1).stateAfter,ae=re?dn.fromSaved(b,re,z):new dn(b,Jn(b.mode),z);return b.iter(z,y,function(se){wn(a,se.text,ae);var ce=ae.line;se.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function wn(a,y,x,b){var E=a.doc.mode,z=new Rt(y,a.options.tabSize,x);for(z.start=z.pos=b||0,y==""&&Jt(E,x.state);!z.eol();)kn(E,z,x.state),z.start=z.pos}function Jt(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Nn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function kn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Nn(a,x).mode);var z=a.token(y,x);if(y.pos>y.start)return z}throw new Error("Mode "+a.name+" failed to advance stream.")}var sn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function nr(a,y,x,b){var E=a.doc,z=E.mode,re;y=yt(E,y);var ae=it(E,y.line),se=er(a,y.line,x),ce=new Rt(ae.text,a.options.tabSize,se),xe;for(b&&(xe=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=kn(z,ce,se.state),b&&xe.push(new sn(ce,re,_n(E.mode,se.state)));return b?xe:new sn(ce,re,se.state)}function yr(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function or(a,y,x,b,E,z,re){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var se=0,ce=null,xe=new Rt(y,a.options.tabSize,b),De,nt=a.options.addModeClass&&[null];for(y==""&&yr(Jt(x,b.state),z);!xe.eol();){if(xe.pos>a.options.maxHighlightLength?(ae=!1,re&&wn(a,y,b,xe.pos),xe.pos=y.length,De=null):De=yr(kn(x,xe,b.state,nt),z),nt){var qe=nt[0].name;qe&&(De="m-"+(De?qe+" "+De:qe))}if(!ae||ce!=De){for(;se<xe.start;)se=Math.min(xe.start,se+5e3),E(se,ce);ce=De}xe.start=xe.pos}for(;se<xe.pos;){var At=Math.min(xe.pos,se+5e3);E(At,ce),se=At}}function Fr(a,y,x){for(var b,E,z=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>re;--ae){if(ae<=z.first)return z.first;var se=it(z,ae-1),ce=se.stateAfter;if(ce&&(!x||ae+(ce instanceof ln?ce.lookAhead:0)<=z.modeFrontier))return ae;var xe=ve(se.text,null,a.options.tabSize);(E==null||b>xe)&&(E=ae-1,b=xe)}return E}function wr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var x=a.first,b=y-1;b>x;b--){var E=it(a,b).stateAfter;if(E&&(!(E instanceof ln)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var hr=!1,cr=!1;function Mr(){hr=!0}function br(){cr=!0}function dr(a,y,x){this.marker=a,this.from=y,this.to=x}function Sr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Lr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function fr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function lr(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||!z.marker.insertLeft)){var se=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(b||(b=[])).push(new dr(re,z.from,se?null:z.to))}}return b}function ar(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var se=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(b||(b=[])).push(new dr(re,se?null:z.from-y,z.to==null?null:z.to-y))}}return b}function Ir(a,y){if(y.full)return null;var x=Pt(a,y.from.line)&&it(a,y.from.line).markedSpans,b=Pt(a,y.to.line)&&it(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,z=y.to.ch,re=xt(y.from,y.to)==0,ae=lr(x,E,re),se=ar(b,z,re),ce=y.text.length==1,xe=Ce(y.text).length+(ce?E:0);if(ae)for(var De=0;De<ae.length;++De){var nt=ae[De];if(nt.to==null){var qe=Sr(se,nt.marker);qe?ce&&(nt.to=qe.to==null?null:qe.to+xe):nt.to=E}}if(se)for(var At=0;At<se.length;++At){var zt=se[At];if(zt.to!=null&&(zt.to+=xe),zt.from==null){var on=Sr(ae,zt.marker);on||(zt.from=xe,ce&&(ae||(ae=[])).push(zt))}else zt.from+=xe,ce&&(ae||(ae=[])).push(zt)}ae&&(ae=Vr(ae)),se&&se!=ae&&(se=Vr(se));var mn=[ae];if(!ce){var Bn=y.text.length-2,gn;if(Bn>0&&ae)for(var Pn=0;Pn<ae.length;++Pn)ae[Pn].to==null&&(gn||(gn=[])).push(new dr(ae[Pn].marker,null,null));for(var Qn=0;Qn<Bn;++Qn)mn.push(gn);mn.push(se)}return mn}function Vr(a){for(var y=0;y<a.length;++y){var x=a[y];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Kr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(qe){if(qe.markedSpans)for(var At=0;At<qe.markedSpans.length;++At){var zt=qe.markedSpans[At].marker;zt.readOnly&&(!b||mt(b,zt)==-1)&&(b||(b=[])).push(zt)}}),!b)return null;for(var E=[{from:y,to:x}],z=0;z<b.length;++z)for(var re=b[z],ae=re.find(0),se=0;se<E.length;++se){var ce=E[se];if(!(xt(ce.to,ae.from)<0||xt(ce.from,ae.to)>0)){var xe=[se,1],De=xt(ce.from,ae.from),nt=xt(ce.to,ae.to);(De<0||!re.inclusiveLeft&&!De)&&xe.push({from:ce.from,to:ae.from}),(nt>0||!re.inclusiveRight&&!nt)&&xe.push({from:ae.to,to:ce.to}),E.splice.apply(E,xe),se+=xe.length-3}}return E}function Dr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function _r(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Nr(a){return a.inclusiveLeft?-1:0}function pr(a){return a.inclusiveRight?1:0}function Er(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),z=xt(b.from,E.from)||Nr(a)-Nr(y);if(z)return-z;var re=xt(b.to,E.to)||pr(a)-pr(y);return re||y.id-a.id}function Cr(a,y){var x=cr&&a.markedSpans,b;if(x)for(var E=void 0,z=0;z<x.length;++z)E=x[z],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||Er(b,E.marker)<0)&&(b=E.marker);return b}function qn(a){return Cr(a,!0)}function Wt(a){return Cr(a,!1)}function en(a,y){var x=cr&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var z=x[E];z.marker.collapsed&&(z.from==null||z.from<y)&&(z.to==null||z.to>y)&&(!b||Er(b,z.marker)<0)&&(b=z.marker)}return b}function Mn(a,y,x,b,E){var z=it(a,y),re=cr&&z.markedSpans;if(re)for(var ae=0;ae<re.length;++ae){var se=re[ae];if(se.marker.collapsed){var ce=se.marker.find(0),xe=xt(ce.from,x)||Nr(se.marker)-Nr(E),De=xt(ce.to,b)||pr(se.marker)-pr(E);if(!(xe>=0&&De<=0||xe<=0&&De>=0)&&(xe<=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?xt(ce.to,x)>=0:xt(ce.to,x)>0)||xe>=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?xt(ce.from,b)<=0:xt(ce.from,b)<0)))return!0}}}function vn(a){for(var y;y=qn(a);)a=y.find(-1,!0).line;return a}function Un(a){for(var y;y=Wt(a);)a=y.find(1,!0).line;return a}function vr(a){for(var y,x;y=Wt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function nn(a,y){var x=it(a,y),b=vn(x);return x==b?y:ke(b)}function Vt(a,y){if(y>a.lastLine())return y;var x=it(a,y),b;if(!pn(a,x))return y;for(;b=Wt(x);)x=b.find(1,!0).line;return ke(x)+1}function pn(a,y){var x=cr&&y.markedSpans;if(x){for(var b=void 0,E=0;E<x.length;++E)if(b=x[E],!!b.marker.collapsed){if(b.from==null)return!0;if(!b.marker.widgetNode&&b.from==0&&b.marker.inclusiveLeft&&bn(a,y,b))return!0}}}function bn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return bn(a,b.line,Sr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,z=0;z<y.markedSpans.length;++z)if(E=y.markedSpans[z],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&bn(a,y,E))return!0}function Xn(a){a=vn(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var z=x.parent;z;x=z,z=x.parent)for(var re=0;re<z.children.length;++re){var ae=z.children[re];if(ae==x)break;y+=ae.height}return y}function mr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=qn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Wt(b);){var z=x.find(0,!0);y-=b.text.length-z.from.ch,b=z.to.line,y+=b.text.length-z.to.ch}return y}function sr(a){var y=a.display,x=a.doc;y.maxLine=it(x,x.first),y.maxLineLength=mr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=mr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Br=function(a,y,x){this.text=a,_r(this,y),this.height=x?x(this):1};Br.prototype.lineNo=function(){return ke(this)},vt(Br);function Ar(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Dr(a),_r(a,x);var E=b?b(a):1;E!=a.height&&Vn(a,E)}function Tr(a){a.parent=null,Dr(a)}var Zr={},Rr={};function zr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Rr:Zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ti(a,y){var x=Ct("span",null,null,He?"padding-right: .1px":null),b={pre:Ct("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var z=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Oi,Cn(a.display.measure)&&(re=ue(z,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var ae=y!=a.display.externalMeasured&&ke(z);xr(z,b,jn(a,z,ae)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=Mt(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=Mt(z.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(In(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(He){var se=b.content.lastChild;(/\bcm-tab\b/.test(se.className)||se.querySelector&&se.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Pe(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Mt(b.pre.className,b.textClass||"")),b}function Bi(a){var y=Ze("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Oi(a,y,x,b,E,z,re){if(y){var ae=a.splitSpaces?Ci(y,a.trailingSpace):y,se=a.cm.state.specialChars,ce=!1,xe;if(!se.test(y))a.col+=y.length,xe=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,xe),me&&je<9&&(ce=!0),a.pos+=y.length;else{xe=document.createDocumentFragment();for(var De=0;;){se.lastIndex=De;var nt=se.exec(y),qe=nt?nt.index-De:y.length-De;if(qe){var At=document.createTextNode(ae.slice(De,De+qe));me&&je<9?xe.appendChild(Ze("span",[At])):xe.appendChild(At),a.map.push(a.pos,a.pos+qe,At),a.col+=qe,a.pos+=qe}if(!nt)break;De+=qe+1;var zt=void 0;if(nt[0]==" "){var on=a.cm.options.tabSize,mn=on-a.col%on;zt=xe.appendChild(Ze("span",_e(mn),"cm-tab")),zt.setAttribute("role","presentation"),zt.setAttribute("cm-text"," "),a.col+=mn}else nt[0]=="\r"||nt[0]==`
|
|
`?(zt=xe.appendChild(Ze("span",nt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),zt.setAttribute("cm-text",nt[0]),a.col+=1):(zt=a.cm.options.specialCharPlaceholder(nt[0]),zt.setAttribute("cm-text",nt[0]),me&&je<9?xe.appendChild(Ze("span",[zt])):xe.appendChild(zt),a.col+=1);a.map.push(a.pos,a.pos+1,zt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||ce||z||re){var Bn=x||"";b&&(Bn+=b),E&&(Bn+=E);var gn=Ze("span",[xe],Bn,z);if(re)for(var Pn in re)re.hasOwnProperty(Pn)&&Pn!="style"&&Pn!="class"&&gn.setAttribute(Pn,re[Pn]);return a.content.appendChild(gn)}a.content.appendChild(xe)}}function Ci(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var z=a.charAt(E);z==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(z="\xA0"),b+=z,x=z==" "}return b}function vi(a,y){return function(x,b,E,z,re,ae,se){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,xe=ce+b.length;;){for(var De=void 0,nt=0;nt<y.length&&(De=y[nt],!(De.to>ce&&De.from<=ce));nt++);if(De.to>=xe)return a(x,b,E,z,re,ae,se);a(x,b.slice(0,De.to-ce),E,z,null,ae,se),z=null,b=b.slice(De.to-ce),ce=De.to}}}function Xi(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function xr(a,y,x){var b=a.markedSpans,E=a.text,z=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(z,z=x[re]),zr(x[re+1],y.cm.options));return}for(var ae=E.length,se=0,ce=1,xe="",De,nt,qe=0,At,zt,on,mn,Bn;;){if(qe==se){At=zt=on=nt="",Bn=null,mn=null,qe=1/0;for(var gn=[],Pn=void 0,Qn=0;Qn<b.length;++Qn){var Gn=b[Qn],ur=Gn.marker;if(ur.type=="bookmark"&&Gn.from==se&&ur.widgetNode)gn.push(ur);else if(Gn.from<=se&&(Gn.to==null||Gn.to>se||ur.collapsed&&Gn.to==se&&Gn.from==se)){if(Gn.to!=null&&Gn.to!=se&&qe>Gn.to&&(qe=Gn.to,zt=""),ur.className&&(At+=" "+ur.className),ur.css&&(nt=(nt?nt+";":"")+ur.css),ur.startStyle&&Gn.from==se&&(on+=" "+ur.startStyle),ur.endStyle&&Gn.to==qe&&(Pn||(Pn=[])).push(ur.endStyle,Gn.to),ur.title&&((Bn||(Bn={})).title=ur.title),ur.attributes)for(var Wr in ur.attributes)(Bn||(Bn={}))[Wr]=ur.attributes[Wr];ur.collapsed&&(!mn||Er(mn.marker,ur)<0)&&(mn=Gn)}else Gn.from>se&&qe>Gn.from&&(qe=Gn.from)}if(Pn)for(var li=0;li<Pn.length;li+=2)Pn[li+1]==qe&&(zt+=" "+Pn[li]);if(!mn||mn.from==se)for(var Ur=0;Ur<gn.length;++Ur)Xi(y,0,gn[Ur]);if(mn&&(mn.from||0)==se){if(Xi(y,(mn.to==null?ae+1:mn.to)-se,mn.marker,mn.from==null),mn.to==null)return;mn.to==se&&(mn=!1)}}if(se>=ae)break;for(var Ti=Math.min(ae,qe);;){if(xe){var Ei=se+xe.length;if(!mn){var $r=Ei>Ti?xe.slice(0,Ti-se):xe;y.addToken(y,$r,De?De+At:At,on,se+$r.length==qe?zt:"",nt,Bn)}if(Ei>=Ti){xe=xe.slice(Ti-se),se=Ti;break}se=Ei,on=""}xe=E.slice(z,z=x[ce++]),De=zr(x[ce++],y.cm.options)}}}function ta(a,y,x){this.line=y,this.rest=vr(y),this.size=this.rest?ke(Ce(this.rest))-x+1:1,this.node=this.text=null,this.hidden=pn(a,y)}function ni(a,y,x){for(var b=[],E,z=y;z<x;z=E){var re=new ta(a.doc,it(a.doc,z),z);E=z+re.size,b.push(re)}return b}var Pi=null;function oa(a){Pi?Pi.ops.push(a):a.ownsGroup=Pi={ops:[a],delayedCallbacks:[]}}function Ji(a){var y=a.delayedCallbacks,x=0;do{for(;x<y.length;x++)y[x].call(null);for(var b=0;b<a.ops.length;b++){var E=a.ops[b];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(x<y.length)}function mi(a,y){var x=a.ownsGroup;if(x)try{Ji(x)}finally{Pi=null,y(x)}}var Ii=null;function Gr(a,y){var x=gt(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Pi?E=Pi.delayedCallbacks:Ii?E=Ii:(E=Ii=[],setTimeout(_i,0));for(var z=function(ae){E.push(function(){return x[ae].apply(null,b)})},re=0;re<x.length;++re)z(re)}}function _i(){var a=Ii;Ii=null;for(var y=0;y<a.length;++y)a[y]()}function la(a,y,x,b){for(var E=0;E<y.changes.length;E++){var z=y.changes[E];z=="text"?sa(a,y):z=="gutter"?rr(a,y,x,b):z=="class"?Kn(a,y):z=="widget"&&$n(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=Ze("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&je<8&&(a.node.style.zIndex=2)),a.node}function qr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=Zi(y);y.background=b.insertBefore(Ze("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function ba(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ti(a,y)}function sa(a,y){var x=y.text.className,b=ba(a,y);y.text==y.node&&(y.node=b.pre),y.text.parentNode.replaceChild(b.pre,y.text),y.text=b.pre,b.bgClass!=y.bgClass||b.textClass!=y.textClass?(y.bgClass=b.bgClass,y.textClass=b.textClass,Kn(a,y)):x&&(y.text.className=x)}function Kn(a,y){qr(a,y),y.line.wrapClass?Zi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function rr(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=Zi(y);y.gutterBackground=Ze("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var z=y.line.gutterMarkers;if(a.options.lineNumbers||z){var re=Zi(y),ae=y.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),re.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(Ze("div",bt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=a.display.gutterSpecs[se].className,xe=z.hasOwnProperty(ce)&&z[ce];xe&&ae.appendChild(Ze("div",[xe],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function $n(a,y,x){y.alignable&&(y.alignable=null);for(var b=Je("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);kr(a,y,x)}function tr(a,y,x,b){var E=ba(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Kn(a,y),rr(a,y,x,b),kr(a,y,b),y.node}function kr(a,y,x){if(Hr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Hr(a,y.rest[b],y,x,!1)}function Hr(a,y,x,b,E){if(y.widgets)for(var z=Zi(x),re=0,ae=y.widgets;re<ae.length;++re){var se=ae[re],ce=Ze("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),Gi(se,ce,x,b),a.display.input.setUneditable(ce),E&&se.above?z.insertBefore(ce,x.gutter||x.text):z.appendChild(ce),Gr(se,"redraw")}}function Gi(a,y,x,b){if(a.noHScroll){(x.alignable||(x.alignable=[])).push(y);var E=b.wrapperWidth;y.style.left=b.fixedPos+"px",a.coverGutter||(E-=b.gutterTotalWidth,y.style.paddingLeft=b.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-b.gutterTotalWidth+"px"))}function gi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!et(document.body,a.node)){var x="position: relative;";a.coverGutter&&(x+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(x+="width: "+y.display.wrapper.clientWidth+"px;"),Le(y.display.measure,Ze("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=Fn(y);x!=a.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==a.sizer&&x!=a.mover)return!0}function Xr(a){return a.lineSpace.offsetTop}function Hi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Le(a.measure,Ze("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Ai(a){return Kt-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Ai(a)-a.display.barWidth}function na(a){return a.display.scroller.clientHeight-Ai(a)-a.display.barHeight}function Vi(a,y,x){var b=a.options.lineWrapping,E=b&&qi(a);if(!y.measure.heights||b&&y.measure.width!=E){var z=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),ae=0;ae<re.length-1;ae++){var se=re[ae],ce=re[ae+1];Math.abs(se.bottom-ce.bottom)>2&&z.push((se.bottom+ce.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Fa(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(ke(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Vo(a,y){y=vn(y);var x=ke(y),b=a.display.externalMeasured=new ta(a.doc,y,x);b.lineN=x;var E=b.built=ti(a,b);return b.text=E.pre,Le(a.display.lineMeasure,E.pre),b}function yo(a,y,x,b){return Wi(a,ua(a,y),x,b)}function $i(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[wa(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function ua(a,y){var x=ke(y),b=$i(a,x);b&&!b.text?b=null:b&&b.changes&&(la(a,b,x,ca(a)),a.curOp.forceUpdate=!0),b||(b=Vo(a,y));var E=Fa(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Wi(a,y,x,b,E){y.before&&(x=-1);var z=x+(b||""),re;return y.cache.hasOwnProperty(z)?re=y.cache[z]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Vi(a,y.view,y.rect),y.hasHeights=!0),re=xo(a,y,x,b),re.bogus||(y.cache[z]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var bo={left:0,right:0,top:0,bottom:0};function Co(a,y,x){for(var b,E,z,re,ae,se,ce=0;ce<a.length;ce+=3)if(ae=a[ce],se=a[ce+1],y<ae?(E=0,z=1,re="left"):y<se?(E=y-ae,z=E+1):(ce==a.length-3||y==se&&a[ce+3]>y)&&(z=se-ae,E=z-1,y>=se&&(re="right")),E!=null){if(b=a[ce+2],ae==se&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;ce&&a[ce-2]==a[ce-3]&&a[ce-1].insertLeft;)b=a[(ce-=3)+2],re="left";if(x=="right"&&E==se-ae)for(;ce<a.length-3&&a[ce+3]==a[ce+4]&&!a[ce+5].insertLeft;)b=a[(ce+=3)+2],re="right";break}return{node:b,start:E,end:z,collapse:re,coverStart:ae,coverEnd:se}}function jo(a,y){var x=bo;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function xo(a,y,x,b){var E=Co(y.map,x,b),z=E.node,re=E.start,ae=E.end,se=E.collapse,ce;if(z.nodeType==3){for(var xe=0;xe<4;xe++){for(;re&&Nt(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+ae<E.coverEnd&&Nt(y.line.text.charAt(E.coverStart+ae));)++ae;if(me&&je<9&&re==0&&ae==E.coverEnd-E.coverStart?ce=z.parentNode.getBoundingClientRect():ce=jo(Fe(z,re,ae).getClientRects(),b),ce.left||ce.right||re==0)break;ae=re,re=re-1,se="right"}me&&je<11&&(ce=Uo(a.display.measure,ce))}else{re>0&&(se=b="right");var De;a.options.lineWrapping&&(De=z.getClientRects()).length>1?ce=De[b=="right"?De.length-1:0]:ce=z.getBoundingClientRect()}if(me&&je<9&&!re&&(!ce||!ce.left&&!ce.right)){var nt=z.parentNode.getClientRects()[0];nt?ce={left:nt.left,right:nt.left+Ui(a.display),top:nt.top,bottom:nt.bottom}:ce=bo}for(var qe=ce.top-y.rect.top,At=ce.bottom-y.rect.top,zt=(qe+At)/2,on=y.view.measure.heights,mn=0;mn<on.length-1&&!(zt<on[mn]);mn++);var Bn=mn?on[mn-1]:0,gn=on[mn],Pn={left:(se=="right"?ce.right:ce.left)-y.rect.left,right:(se=="left"?ce.left:ce.right)-y.rect.left,top:Bn,bottom:gn};return!ce.left&&!ce.right&&(Pn.bogus=!0),a.options.singleCursorHeightPerLine||(Pn.rtop=qe,Pn.rbottom=At),Pn}function Uo(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zn(a))return y;var x=screen.logicalXDPI/screen.deviceXDPI,b=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*x,right:y.right*x,top:y.top*b,bottom:y.bottom*b}}function Ua(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var y=0;y<a.rest.length;y++)a.measure.caches[y]={}}function Ka(a){a.display.externalMeasure=null,Tt(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ua(a.display.view[y])}function Ca(a){Ka(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Ya(){return Se&&Ie?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function wo(){return Se&&Ie?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xa(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=gi(a.widgets[x]));return y}function Ma(a,y,x,b,E){if(!E){var z=Xa(y);x.top+=z,x.bottom+=z}if(b=="line")return x;b||(b="local");var re=Xn(y);if(b=="local"?re+=Xr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var ae=a.display.lineSpace.getBoundingClientRect();re+=ae.top+(b=="window"?0:wo());var se=ae.left+(b=="window"?0:Ya());x.left+=se,x.right+=se}return x.top+=re,x.bottom+=re,x}function So(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Ya(),E-=wo();else if(x=="local"||!x){var z=a.display.sizer.getBoundingClientRect();b+=z.left,E+=z.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function La(a,y,x,b,E){return b||(b=it(a.doc,y.line)),Ma(a,b,yo(a,b,y.ch,E),x)}function xi(a,y,x,b,E,z){b=b||it(a.doc,y.line),E||(E=ua(a,b));function re(At,zt){var on=Wi(a,E,At,zt?"right":"left",z);return zt?on.left=on.right:on.right=on.left,Ma(a,b,on,x)}var ae=ue(b,a.doc.direction),se=y.ch,ce=y.sticky;if(se>=b.text.length?(se=b.text.length,ce="before"):se<=0&&(se=0,ce="after"),!ae)return re(ce=="before"?se-1:se,ce=="before");function xe(At,zt,on){var mn=ae[zt],Bn=mn.level==1;return re(on?At-1:At,Bn!=on)}var De=ee(ae,se,ce),nt=te,qe=xe(se,De,ce=="before");return nt!=null&&(qe.other=xe(se,nt,ce!="before")),qe}function gr(a,y){var x=0;y=yt(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=it(a.doc,y.line),E=Xn(b)+Xr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function ir(a,y,x,b,E){var z=Oe(a,y,x);return z.xRel=E,b&&(z.outside=b),z}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return ir(b.first,0,null,-1,-1);var E=Be(b,x),z=b.first+b.size-1;if(E>z)return ir(b.first+b.size-1,it(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=it(b,E);;){var ae=ji(a,re,E,y,x),se=en(re,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!se)return ae;var ce=se.find(1);if(ce.line==E)return ce;re=it(b,E=ce.line)}}function hi(a,y,x,b){b-=Xa(y);var E=y.text.length,z=Qt(function(re){return Wi(a,x,re-1).bottom<=b},E,0);return E=Qt(function(re){return Wi(a,x,re).top>b},z,E),{begin:z,end:E}}function Jr(a,y,x,b){x||(x=ua(a,y));var E=Ma(a,y,Wi(a,x,b),"line").top;return hi(a,y,x,E)}function ri(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function ji(a,y,x,b,E){E-=Xn(y);var z=ua(a,y),re=Xa(y),ae=0,se=y.text.length,ce=!0,xe=ue(y,a.doc.direction);if(xe){var De=(a.options.lineWrapping?ra:zi)(a,y,x,z,xe,b,E);ce=De.level!=1,ae=ce?De.from:De.to-1,se=ce?De.to:De.from-1}var nt=null,qe=null,At=Qt(function(Qn){var Gn=Wi(a,z,Qn);return Gn.top+=re,Gn.bottom+=re,ri(Gn,b,E,!1)?(Gn.top<=E&&Gn.left<=b&&(nt=Qn,qe=Gn),!0):!1},ae,se),zt,on,mn=!1;if(qe){var Bn=b-qe.left<qe.right-b,gn=Bn==ce;At=nt+(gn?0:1),on=gn?"after":"before",zt=Bn?qe.left:qe.right}else{!ce&&(At==se||At==ae)&&At++,on=At==0?"after":At==y.text.length?"before":Wi(a,z,At-(ce?1:0)).bottom+re<=E==ce?"after":"before";var Pn=xi(a,Oe(x,At,on),"line",y,z);zt=Pn.left,mn=E<Pn.top?-1:E>=Pn.bottom?1:0}return At=cn(y.text,At,1),ir(x,At,on,mn,b-zt)}function zi(a,y,x,b,E,z,re){var ae=Qt(function(De){var nt=E[De],qe=nt.level!=1;return ri(xi(a,Oe(x,qe?nt.to:nt.from,qe?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),se=E[ae];if(ae>0){var ce=se.level!=1,xe=xi(a,Oe(x,ce?se.from:se.to,ce?"after":"before"),"line",y,b);ri(xe,z,re,!0)&&xe.top>re&&(se=E[ae-1])}return se}function ra(a,y,x,b,E,z,re){var ae=hi(a,y,b,re),se=ae.begin,ce=ae.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var xe=null,De=null,nt=0;nt<E.length;nt++){var qe=E[nt];if(!(qe.from>=ce||qe.to<=se)){var At=qe.level!=1,zt=Wi(a,b,At?Math.min(ce,qe.to)-1:Math.max(se,qe.from)).right,on=zt<z?z-zt+1e9:zt-z;(!xe||De>on)&&(xe=qe,De=on)}}return xe||(xe=E[E.length-1]),xe.from<se&&(xe={from:se,to:xe.to,level:xe.level}),xe.to>ce&&(xe={from:xe.from,to:ce,level:xe.level}),xe}var Fi;function Mi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Fi==null){Fi=Ze("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Fi.appendChild(document.createTextNode("x")),Fi.appendChild(Ze("br"));Fi.appendChild(document.createTextNode("x"))}Le(a.measure,Fi);var x=Fi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Tt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ze("span","xxxxxxxxxx"),x=Ze("pre",[y],"CodeMirror-line-like");Le(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function ca(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var ae=a.display.gutterSpecs[re].className;x[ae]=z.offsetLeft+z.clientLeft+E,b[ae]=z.clientWidth}return{fixedPos:Ko(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ko(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function xl(a){var y=Mi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(pn(a.doc,E))return 0;var z=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(z+=E.widgets[re].height);return x?z+(Math.ceil(E.text.length/b)||1)*y:z+y}}function Yo(a){var y=a.doc,x=xl(a);y.iter(function(b){var E=x(b);E!=b.height&&Vn(b,E)})}function xa(a,y,x,b){var E=a.display;if(!x&&Fn(y).getAttribute("cm-not-content")=="true")return null;var z,re,ae=E.lineSpace.getBoundingClientRect();try{z=y.clientX-ae.left,re=y.clientY-ae.top}catch(De){return null}var se=ci(a,z,re),ce;if(b&&se.xRel>0&&(ce=it(a.doc,se.line).text).length==se.ch){var xe=ve(ce,ce.length,a.options.tabSize)-ce.length;se=Oe(se.line,Math.max(0,Math.round((z-Qi(a.display).left)/Ui(a.display))-xe))}return se}function wa(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function wi(a,y,x,b){y==null&&(y=a.doc.first),x==null&&(x=a.doc.first+a.doc.size),b||(b=0);var E=a.display;if(b&&x<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)cr&&nn(a.doc,y)<E.viewTo&&ha(a);else if(x<=E.viewFrom)cr&&Vt(a.doc,x+b)>E.viewFrom?ha(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ha(a);else if(y<=E.viewFrom){var z=Eo(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):ha(a)}else if(x>=E.viewTo){var re=Eo(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):ha(a)}else{var ae=Eo(a,y,y,-1),se=Eo(a,x,x+b,1);ae&&se?(E.view=E.view.slice(0,ae.index).concat(ni(a,ae.lineN,se.lineN)).concat(E.view.slice(se.index)),E.viewTo+=b):ha(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function da(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var z=b.view[wa(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);mt(re,x)==-1&&re.push(x)}}}function ha(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Eo(a,y,x,b){var E=wa(a,y),z,re=a.display.view;if(!cr||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,se=0;se<E;se++)ae+=re[se].size;if(ae!=y){if(b>0){if(E==re.length-1)return null;z=ae+re[E].size-y,E++}else z=ae-y;y+=z,x+=z}for(;nn(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=ni(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=ni(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(wa(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(ni(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,wa(a,x)))),b.viewTo=x}function wl(a){for(var y=a.display.view,x=0,b=0;b<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Ja(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Sl(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),z=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var ae=x.sel.ranges[re];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var se=ae.empty();(se||a.options.showCursorWhenSelecting)&&El(a,ae.head,E),se||Ws(a,ae,z)}}return b}function El(a,y,x){var b=xi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ze("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var z=x.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=b.other.left+"px",z.style.top=b.other.top+"px",z.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ko(a,y){return a.top-y.top||a.left-y.left}function Ws(a,y,x){var b=a.display,E=a.doc,z=document.createDocumentFragment(),re=Qi(a.display),ae=re.left,se=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function xe(gn,Pn,Qn,Gn){Pn<0&&(Pn=0),Pn=Math.round(Pn),Gn=Math.round(Gn),z.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+gn+`px;
|
|
top: `+Pn+"px; width: "+(Qn==null?se-gn:Qn)+`px;
|
|
height: `+(Gn-Pn)+"px"))}function De(gn,Pn,Qn){var Gn=it(E,gn),ur=Gn.text.length,Wr,li;function Ur($r,ki){return La(a,Oe(gn,$r),"div",Gn,ki)}function Ti($r,ki,di){var ii=Jr(a,Gn,null,$r),ei=ki=="ltr"==(di=="after")?"left":"right",Yr=di=="after"?ii.begin:ii.end-(/\s/.test(Gn.text.charAt(ii.end-1))?2:1);return Ur(Yr,ei)[ei]}var Ei=ue(Gn,E.direction);return le(Ei,Pn||0,Qn==null?ur:Qn,function($r,ki,di,ii){var ei=di=="ltr",Yr=Ur($r,ei?"left":"right"),Di=Ur(ki-1,ei?"right":"left"),Va=Pn==null&&$r==0,ya=Qn==null&&ki==ur,pi=ii==0,ea=!Ei||ii==Ei.length-1;if(Di.top-Yr.top<=3){var si=(ce?Va:ya)&&pi,bl=(ce?ya:Va)&&ea,aa=si?ae:(ei?Yr:Di).left,Ba=bl?se:(ei?Di:Yr).right;xe(aa,Yr.top,Ba-aa,Yr.bottom)}else{var Aa,bi,ja,Cl;ei?(Aa=ce&&Va&&pi?ae:Yr.left,bi=ce?se:Ti($r,di,"before"),ja=ce?ae:Ti(ki,di,"after"),Cl=ce&&ya&&ea?se:Di.right):(Aa=ce?Ti($r,di,"before"):ae,bi=!ce&&Va&&pi?se:Yr.right,ja=!ce&&ya&&ea?ae:Di.left,Cl=ce?Ti(ki,di,"after"):se),xe(Aa,Yr.top,bi-Aa,Yr.bottom),Yr.bottom<Di.top&&xe(ae,Yr.bottom,null,Di.top),xe(ja,Di.top,Cl-ja,Di.bottom)}(!Wr||ko(Yr,Wr)<0)&&(Wr=Yr),ko(Di,Wr)<0&&(Wr=Di),(!li||ko(Yr,li)<0)&&(li=Yr),ko(Di,li)<0&&(li=Di)}),{start:Wr,end:li}}var nt=y.from(),qe=y.to();if(nt.line==qe.line)De(nt.line,nt.ch,qe.ch);else{var At=it(E,nt.line),zt=it(E,qe.line),on=vn(At)==vn(zt),mn=De(nt.line,nt.ch,on?At.text.length+1:null).end,Bn=De(qe.line,on?0:null,qe.ch).start;on&&(mn.top<Bn.top-2?(xe(mn.right,mn.top,null,mn.bottom),xe(ae,Bn.top,Bn.left,Bn.bottom)):xe(mn.right,mn.top,Bn.left-mn.right,mn.bottom)),mn.bottom<Bn.top&&xe(ae,mn.bottom,null,Bn.top)}x.appendChild(z)}function Xo(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ta(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function kl(a){a.state.focused||(a.display.input.focus(),Jo(a))}function Dl(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ta(a))},100)}function Jo(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Pe(a,"focus",a,y),a.state.focused=!0,Qe(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),He&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xo(a))}function Ta(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Pe(a,"blur",a,y),a.state.focused=!1,Ye(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Do(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],z=a.options.lineWrapping,re=void 0,ae=0;if(!E.hidden){if(me&&je<8){var se=E.node.offsetTop+E.node.offsetHeight;re=se-x,x=se}else{var ce=E.node.getBoundingClientRect();re=ce.bottom-ce.top,!z&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var xe=E.line.height-re;if((xe>.005||xe<-.005)&&(Vn(E.line,re),Bl(E.line),E.rest))for(var De=0;De<E.rest.length;De++)Bl(E.rest[De]);if(ae>a.display.sizerWidth){var nt=Math.ceil(ae/Ui(a.display));nt>a.display.maxLineLength&&(a.display.maxLineLength=nt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Bl(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function Bo(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Xr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,z=Be(y,b),re=Be(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,se=x.ensure.to.line;ae<z?(z=ae,re=Be(y,Xn(it(y,ae))+a.wrapper.clientHeight)):Math.min(se,y.lastLine())>=re&&(z=Be(y,Xn(it(y,se))-a.wrapper.clientHeight),re=se)}return{from:z,to:Math.max(re,z+1)}}function zs(a,y){if(!pe(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!lt){var z=Ze("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-Xr(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Ai(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Oe(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Oe(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,ae=xi(a,y),se=!x||x==y?ae:xi(a,x);E={left:Math.min(ae.left,se.left),top:Math.min(ae.top,se.top)-b,right:Math.max(ae.left,se.left),bottom:Math.max(ae.bottom,se.bottom)+b};var ce=Qo(a,E),xe=a.doc.scrollTop,De=a.doc.scrollLeft;if(ce.scrollTop!=null&&(qa(a,ce.scrollTop),Math.abs(a.doc.scrollTop-xe)>1&&(re=!0)),ce.scrollLeft!=null&&(Sa(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-De)>1&&(re=!0)),!re)break}return E}function Gs(a,y){var x=Qo(a,y);x.scrollTop!=null&&qa(a,x.scrollTop),x.scrollLeft!=null&&Sa(a,x.scrollLeft)}function Qo(a,y){var x=a.display,b=Mi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=na(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var ae=a.doc.height+Hi(x),se=y.top<b,ce=y.bottom>ae-b;if(y.top<E)re.scrollTop=se?0:y.top;else if(y.bottom>E+z){var xe=Math.min(y.top,(ce?ae:y.bottom)-z);xe!=E&&(re.scrollTop=xe)}var De=a.options.fixedGutter?0:x.gutters.offsetWidth,nt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-De,qe=qi(a)-x.gutters.offsetWidth,At=y.right-y.left>qe;return At&&(y.right=y.left+qe),y.left<10?re.scrollLeft=0:y.left<nt?re.scrollLeft=Math.max(0,y.left+De-(At?0:10)):y.right>qe+nt-3&&(re.scrollLeft=y.right+(At?0:10)-qe),re}function qo(a,y){y!=null&&(Ao(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Pa(a){Ao(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Qa(a,y,x){(y!=null||x!=null)&&Ao(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Vs(a,y){Ao(a),a.curOp.scrollToPos=y}function Ao(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=gr(a,y.from),b=gr(a,y.to);Al(a,x,b,y.margin)}}function Al(a,y,x,b){var E=Qo(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});Qa(a,E.scrollLeft,E.scrollTop)}function qa(a,y){Math.abs(a.doc.scrollTop-y)<2||(oe||el(a,{top:y}),Fl(a,y,!0),oe&&el(a),to(a,100))}function Fl(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function Sa(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Il(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function $a(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Hi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Ai(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Ea=function(a,y,x){this.cm=x;var b=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),be(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),be(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&je<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ea.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var z=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},Ea.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ea.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ea.prototype.zeroWidthHack=function(){var a=Ee&&!ge?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new he,this.disableVert=new he},Ea.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),z=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},Ea.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var eo=function(){};eo.prototype.update=function(){return{bottom:0,right:0}},eo.prototype.setScrollLeft=function(){},eo.prototype.setScrollTop=function(){},eo.prototype.clear=function(){};function Ia(a,y){y||(y=$a(a));var x=a.display.barWidth,b=a.display.barHeight;Ml(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Do(a),Ml(a,$a(a)),x=a.display.barWidth,b=a.display.barHeight}function Ml(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ll={native:Ea,null:eo};function Tl(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Ye(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ll[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),be(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?Sa(a,y):qa(a,y)},a),a.display.scrollbars.addClass&&Qe(a.display.wrapper,a.display.scrollbars.addClass)}var js=0;function ka(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.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:++js},oa(a.curOp)}function Da(a){var y=a.curOp;y&&mi(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Us(x)})}function Us(a){for(var y=a.ops,x=0;x<y.length;x++)Ks(y[x]);for(var b=0;b<y.length;b++)Ys(y[b]);for(var E=0;E<y.length;E++)Xs(y[E]);for(var z=0;z<y.length;z++)Js(y[z]);for(var re=0;re<y.length;re++)Qs(y[re])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&sr(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<x.viewFrom||a.scrollToPos.to.line>=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Fo(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$o(a.cm,a.update)}function Xs(a){var y=a.cm,x=y.display;a.updatedDisplay&&Do(y),a.barMeasure=$a(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=yo(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Ai(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-qi(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Js(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Sa(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Ae();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Ia(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&Xo(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Qs(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Pl(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Fl(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Sa(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,yt(b,a.scrollToPos.from),yt(b,a.scrollToPos.to),a.scrollToPos.margin);zs(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var ae=0;ae<z.length;++ae)z[ae].lines.length||Pe(z[ae],"hide");if(re)for(var se=0;se<re.length;++se)re[se].lines.length&&Pe(re[se],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Pe(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Li(a,y){if(a.curOp)return y();ka(a);try{return y()}finally{Da(a)}}function ai(a,y){return function(){if(a.curOp)return y.apply(a,arguments);ka(a);try{return y.apply(a,arguments)}finally{Da(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);ka(this);try{return a.apply(this,arguments)}finally{Da(this)}}}function oi(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);ka(y);try{return a.apply(this,arguments)}finally{Da(y)}}}function to(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,$t(qs,a))}function qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=er(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(z){if(b.line>=a.display.viewFrom){var re=z.styles,ae=z.text.length>a.options.maxHighlightLength?_n(y.mode,b.state):null,se=An(a,z,b,!0);ae&&(b.state=ae),z.styles=se.styles;var ce=z.styleClasses,xe=se.classes;xe?z.styleClasses=xe:ce&&(z.styleClasses=null);for(var De=!re||re.length!=z.styles.length||ce!=xe&&(!ce||!xe||ce.bgClass!=xe.bgClass||ce.textClass!=xe.textClass),nt=0;!De&&nt<re.length;++nt)De=re[nt]!=z.styles[nt];De&&E.push(b.line),z.stateAfter=b.save(),b.nextLine()}else z.text.length<=a.options.maxHighlightLength&&wn(a,z.text,b),z.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return to(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Li(a,function(){for(var z=0;z<E.length;z++)da(a,E[z],"text")})}}var Fo=function(a,y,x){var b=a.display;this.viewport=y,this.visible=Bo(b,a.doc,y),this.editorIsHidden=!b.wrapper.offsetWidth,this.wrapperHeight=b.wrapper.clientHeight,this.wrapperWidth=b.wrapper.clientWidth,this.oldDisplayWidth=qi(a),this.force=x,this.dims=ca(a),this.events=[]};Fo.prototype.signal=function(a,y){dt(a,y)&&this.events.push(arguments)},Fo.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Pe.apply(null,this.events[a])};function $s(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Ai(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Ai(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ae();if(!y||!et(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&et(a.display.lineDiv,b.anchorNode)&&(x.anchorNode=b.anchorNode,x.anchorOffset=b.anchorOffset,x.focusNode=b.focusNode,x.focusOffset=b.focusOffset)}return x}function tu(a){if(!(!a||!a.activeElt||a.activeElt==Ae())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&et(document.body,a.anchorNode)&&et(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $o(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return ha(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&wl(a)==0)return!1;Nl(a)&&(ha(a),y.dims=ca(a));var E=b.first+b.size,z=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<z&&z-x.viewFrom<20&&(z=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),cr&&(z=nn(a.doc,z),re=Vt(a.doc,re));var ae=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hs(a,z,re),x.viewOffset=Xn(it(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var se=wl(a);if(!ae&&se==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return se>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),se>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),Tt(x.cursorDiv),Tt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ae&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,to(a,400)),x.updateLineNumbers=null,!0}function Pl(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==qi(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Hi(a.display)-na(a),x.top)}),y.visible=Bo(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Bo(a.display,a.doc,x));if(!$o(a,y))break;Do(a);var E=$a(a);Ja(a),Ia(a,E),nl(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function el(a,y){var x=new Fo(a,y);if($o(a,x)){Do(a),Pl(a,x);var b=$a(a);Ja(a),Ia(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function ae(At){var zt=At.nextSibling;return He&&Ee&&a.display.currentWheelTarget==At?At.style.display="none":At.parentNode.removeChild(At),zt}for(var se=b.view,ce=b.viewFrom,xe=0;xe<se.length;xe++){var De=se[xe];if(!De.hidden)if(!De.node||De.node.parentNode!=z){var nt=tr(a,De,ce,x);z.insertBefore(nt,re)}else{for(;re!=De.node;)re=ae(re);var qe=E&&y!=null&&y<=ce&&De.lineNumber;De.changes&&(mt(De.changes,"gutter")>-1&&(qe=!1),la(a,De,ce,x)),qe&&(Tt(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(bt(a.options,ce)))),re=De.node.nextSibling}ce+=De.size}for(;re;)re=ae(re)}function tl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function nl(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Ai(a)+"px"}function Il(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ko(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,z=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=z),x[re].gutterBackground&&(x[re].gutterBackground.style.left=z));var ae=x[re].alignable;if(ae)for(var se=0;se<ae.length;se++)ae[se].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Nl(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=bt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ze("div",[Ze("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=E.firstChild.offsetWidth,re=E.offsetWidth-z;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(z,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function rl(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var z=a[E],re=null;if(typeof z!="string"&&(re=z.style,z=z.className),z=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:z,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Rl(a){var y=a.gutters,x=a.gutterSpecs;Tt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],z=E.className,re=E.style,ae=y.appendChild(Ze("div",null,"CodeMirror-gutter "+z));re&&(ae.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function no(a){Rl(a.display),wi(a),Il(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=Ct("div",null,"CodeMirror-code"),E.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ze("div",null,"CodeMirror-cursors"),E.measure=Ze("div",null,"CodeMirror-measure"),E.lineMeasure=Ze("div",null,"CodeMirror-measure"),E.lineSpace=Ct("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=Ct("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ze("div",[z],null,"position: relative"),E.sizer=Ze("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ze("div",null,null,"position: absolute; height: "+Kt+"px; width: 1px;"),E.gutters=Ze("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ze("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ze("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&je<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!He&&!(oe&&We)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rl(b.gutters,b.lineNumbers),Rl(E),x.init(E)}var Mo=0,Ni=null;me?Ni=-.53:oe?Ni=15:Se?Ni=-.7:we&&(Ni=-1/3);function Ol(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Ol(a);return y.x*=Ni,y.y*=Ni,y}function _l(a,y){var x=Ol(y),b=x.x,E=x.y,z=a.display,re=z.scroller,ae=re.scrollWidth>re.clientWidth,se=re.scrollHeight>re.clientHeight;if(b&&ae||E&&se){if(E&&Ee&&He){e:for(var ce=y.target,xe=z.view;ce!=re;ce=ce.parentNode)for(var De=0;De<xe.length;De++)if(xe[De].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!oe&&!de&&Ni!=null){E&&se&&qa(a,Math.max(0,re.scrollTop+E*Ni)),Sa(a,Math.max(0,re.scrollLeft+b*Ni)),(!E||E&&se)&&Dt(y),z.wheelStartX=null;return}if(E&&Ni!=null){var nt=E*Ni,qe=a.doc.scrollTop,At=qe+z.wrapper.clientHeight;nt<0?qe=Math.max(0,qe+nt-50):At=Math.min(a.doc.height,At+nt+50),el(a,{top:qe,bottom:At})}Mo<20&&(z.wheelStartX==null?(z.wheelStartX=re.scrollLeft,z.wheelStartY=re.scrollTop,z.wheelDX=b,z.wheelDY=E,setTimeout(function(){if(z.wheelStartX!=null){var zt=re.scrollLeft-z.wheelStartX,on=re.scrollTop-z.wheelStartY,mn=on&&z.wheelDY&&on/z.wheelDY||zt&&z.wheelDX&&zt/z.wheelDX;z.wheelStartX=z.wheelStartY=null,mn&&(Ni=(Ni*Mo+mn)/(Mo+1),++Mo)}},200)):(z.wheelDX+=b,z.wheelDY+=E))}}var Ri=function(a,y){this.ranges=a,this.primIndex=y};Ri.prototype.primary=function(){return this.ranges[this.primIndex]},Ri.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var x=this.ranges[y],b=a.ranges[y];if(!Gt(x.anchor,b.anchor)||!Gt(x.head,b.head))return!1}return!0},Ri.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Pr(an(this.ranges[y].anchor),an(this.ranges[y].head));return new Ri(a,this.primIndex)},Ri.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ri.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(xt(y,b.from())>=0&&xt(a,b.to())<=0)return x}return-1};var Pr=function(a,y){this.anchor=a,this.head=y};Pr.prototype.from=function(){return Ot(this.anchor,this.head)},Pr.prototype.to=function(){return fn(this.anchor,this.head)},Pr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(nt,qe){return xt(nt.from(),qe.from())}),x=mt(y,E);for(var z=1;z<y.length;z++){var re=y[z],ae=y[z-1],se=xt(ae.to(),re.from());if(b&&!re.empty()?se>0:se>=0){var ce=Ot(ae.from(),re.from()),xe=fn(ae.to(),re.to()),De=ae.empty()?re.from()==re.head:ae.from()==ae.head;z<=x&&--x,y.splice(--z,2,new Pr(De?xe:ce,De?ce:xe))}}return new Ri(y,x)}function fa(a,y){return new Ri([new Pr(a,y||a)],0)}function pa(a){return a.text?Oe(a.from.line+a.text.length-1,Ce(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hl(a,y){if(xt(a,y.from)<0)return a;if(xt(a,y.to)<=0)return pa(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=pa(y).ch-y.to.ch),Oe(x,b)}function il(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Pr(Hl(E.anchor,y),Hl(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function Wl(a,y,x){return a.line==y.line?Oe(x.line,a.ch-y.ch+x.ch):Oe(x.line+(a.line-y.line),a.ch)}function au(a,y,x){for(var b=[],E=Oe(a.first,0),z=E,re=0;re<y.length;re++){var ae=y[re],se=Wl(ae.from,E,z),ce=Wl(pa(ae),E,z);if(E=ae.to,z=ce,x=="around"){var xe=a.sel.ranges[re],De=xt(xe.head,xe.anchor)<0;b[re]=new Pr(De?ce:se,De?se:ce)}else b[re]=new Pr(se,se)}return new Ri(b,a.sel.primIndex)}function al(a){a.doc.mode=xn(a.options,a.doc.modeOption),ro(a)}function ro(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,to(a,100),a.state.modeGen++,a.curOp&&wi(a)}function zl(a,y){return y.from.ch==0&&y.to.ch==0&&Ce(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function ol(a,y,x,b){function E(Bn){return x?x[Bn]:null}function z(Bn,gn,Pn){Ar(Bn,gn,Pn,b),Gr(Bn,"change",Bn,y)}function re(Bn,gn){for(var Pn=[],Qn=Bn;Qn<gn;++Qn)Pn.push(new Br(ce[Qn],E(Qn),b));return Pn}var ae=y.from,se=y.to,ce=y.text,xe=it(a,ae.line),De=it(a,se.line),nt=Ce(ce),qe=E(ce.length-1),At=se.line-ae.line;if(y.full)a.insert(0,re(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(zl(a,y)){var zt=re(0,ce.length-1);z(De,De.text,qe),At&&a.remove(ae.line,At),zt.length&&a.insert(ae.line,zt)}else if(xe==De)if(ce.length==1)z(xe,xe.text.slice(0,ae.ch)+nt+xe.text.slice(se.ch),qe);else{var on=re(1,ce.length-1);on.push(new Br(nt+xe.text.slice(se.ch),qe,b)),z(xe,xe.text.slice(0,ae.ch)+ce[0],E(0)),a.insert(ae.line+1,on)}else if(ce.length==1)z(xe,xe.text.slice(0,ae.ch)+ce[0]+De.text.slice(se.ch),E(0)),a.remove(ae.line+1,At);else{z(xe,xe.text.slice(0,ae.ch)+ce[0],E(0)),z(De,nt+De.text.slice(se.ch),qe);var mn=re(1,ce.length-1);At>1&&a.remove(ae.line+1,At-1),a.insert(ae.line+1,mn)}Gr(a,"change",a,y)}function va(a,y,x){function b(E,z,re){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var se=E.linked[ae];if(se.doc!=z){var ce=re&&se.sharedHist;x&&!ce||(y(se.doc,ce),b(se.doc,E,ce))}}}b(a,null,!0)}function Zl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Yo(a),al(a),Gl(a),a.options.lineWrapping||sr(a),a.options.mode=y.modeOption,wi(a)}function Gl(a){(a.doc.direction=="rtl"?Qe:Ye)(a.display.lineDiv,"CodeMirror-rtl")}function ou(a){Li(a,function(){Gl(a),wi(a)})}function Lo(a){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=a||1}function ll(a,y){var x={from:an(y.from),to:pa(y),text:Yt(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),va(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function Vl(a){for(;a.length;){var y=Ce(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return Vl(a.done),Ce(a.done);if(a.done.length&&!Ce(a.done).ranges)return Ce(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Ce(a.done)}function jl(a,y,x,b){var E=a.history;E.undone.length=0;var z=+new Date,re,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=lu(E,E.lastOp==b)))ae=Ce(re.changes),xt(y.from,y.to)==0&&xt(y.from,ae.to)==0?ae.to=pa(y):re.changes.push(ll(a,y));else{var se=Ce(E.done);for((!se||!se.ranges)&&To(a.sel,E.done),re={changes:[ll(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=z,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||Pe(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,z=b&&b.origin;x==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||su(a,z,Ce(E.done),y))?E.done[E.done.length-1]=y:To(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&Vl(E.undone)}function To(a,y){var x=Ce(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],z=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[z]=re.markedSpans),++z})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Kl(a,y){var x=du(a,y),b=Ir(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var z=x[E],re=b[E];if(z&&re)e:for(var ae=0;ae<re.length;++ae){for(var se=re[ae],ce=0;ce<z.length;++ce)if(z[ce].marker==se.marker)continue e;z.push(se)}else re&&(x[E]=re)}return x}function Na(a,y,x){for(var b=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){b.push(x?Ri.prototype.deepCopy.call(z):z);continue}var re=z.changes,ae=[];b.push({changes:ae});for(var se=0;se<re.length;++se){var ce=re[se],xe=void 0;if(ae.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var De in ce)(xe=De.match(/^spans_(\d+)$/))&&mt(y,Number(xe[1]))>-1&&(Ce(ae)[De]=ce[De],delete ce[De])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var z=xt(y,E)<0;z!=xt(x,E)<0?(E=y,y=x):z!=xt(y,x)<0&&(y=x)}return new Pr(E,y)}else return new Pr(x||y,y)}function Po(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),fi(a,new Ri([sl(a.sel.primary(),y,x,E)],0),b)}function Yl(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),z=0;z<a.sel.ranges.length;z++)b[z]=sl(a.sel.ranges[z],y[z],null,E);var re=Ki(a.cm,b,a.sel.primIndex);fi(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,fi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xl(a,y,x,b){fi(a,fa(y,x),b)}function hu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var z=0;z<E.length;z++)this.ranges[z]=new Pr(yt(a,E[z].anchor),yt(a,E[z].head))},origin:x&&x.origin};return Pe(a,"beforeSelectionChange",a,b),a.cm&&Pe(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Jl(a,y,x){var b=a.history.done,E=Ce(b);E&&E.ranges?(b[b.length-1]=y,Io(a,y,x)):fi(a,y,x)}function fi(a,y,x){Io(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Io(a,y,x){(dt(a,"beforeSelectionChange")||a.cm&&dt(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,x));var b=x&&x.bias||(xt(y.primary().head,a.sel.primary().head)<0?-1:1);Ql(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Pa(a.cm)}function Ql(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,ut(a.cm)),Gr(a,"cursorActivity",a))}function ql(a){Ql(a,$l(a,a.sel,null,!1))}function $l(a,y,x,b){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],se=No(a,re.anchor,ae&&ae.anchor,x,b),ce=No(a,re.head,ae&&ae.head,x,b);(E||se!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new Pr(se,ce))}return E?Ki(a.cm,E,y.primIndex):y}function Ra(a,y,x,b,E){var z=it(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var ae=z.markedSpans[re],se=ae.marker,ce="selectLeft"in se?!se.selectLeft:se.inclusiveLeft,xe="selectRight"in se?!se.selectRight:se.inclusiveRight;if((ae.from==null||(ce?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(xe?ae.to>=y.ch:ae.to>y.ch))){if(E&&(Pe(se,"beforeCursorEnter"),se.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!se.atomic)continue;if(x){var De=se.find(b<0?1:-1),nt=void 0;if((b<0?xe:ce)&&(De=es(a,De,-b,De&&De.line==y.line?z:null)),De&&De.line==y.line&&(nt=xt(De,x))&&(b<0?nt<0:nt>0))return Ra(a,De,y,b,E)}var qe=se.find(b<0?-1:1);return(b<0?ce:xe)&&(qe=es(a,qe,b,qe.line==y.line?z:null)),qe?Ra(a,qe,y,b,E):null}}return y}function No(a,y,x,b,E){var z=b||1,re=Ra(a,y,x,z,E)||!E&&Ra(a,y,x,z,!0)||Ra(a,y,x,-z,E)||!E&&Ra(a,y,x,-z,!0);return re||(a.cantEdit=!0,Oe(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?yt(a,Oe(y.line-1)):null:x>0&&y.ch==(b||it(a,y.line)).text.length?y.line<a.first+a.size-1?Oe(y.line+1,0):null:new Oe(y.line,y.ch+x)}function ts(a){a.setSelection(Oe(a.firstLine(),0),Oe(a.lastLine()),Ne)}function ns(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,z,re,ae){E&&(b.from=yt(a,E)),z&&(b.to=yt(a,z)),re&&(b.text=re),ae!==void 0&&(b.origin=ae)}),Pe(a,"beforeChange",a,b),a.cm&&Pe(a.cm,"beforeChange",a.cm,b),b.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:b.from,to:b.to,text:b.text,origin:b.origin}}function Oa(a,y,x){if(a.cm){if(!a.cm.curOp)return ai(a.cm,Oa)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((dt(a,"beforeChange")||a.cm&&dt(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=hr&&!x&&Kr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rs(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rs(a,y)}}function rs(a,y){if(!(y.text.length==1&&y.text[0]==""&&xt(y.from,y.to)==0)){var x=il(a,y);jl(a,y,x,a.cm?a.cm.curOp.id:NaN),io(a,y,x,Ir(a,y));var b=[];va(a,function(E,z){!z&&mt(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),io(E,y,null,Ir(E,y))})}}function Ro(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,z,re=a.sel,ae=y=="undo"?E.done:E.undone,se=y=="undo"?E.undone:E.done,ce=0;ce<ae.length&&(z=ae[ce],!(x?z.ranges&&!z.equals(a.sel):!z.ranges));ce++);if(ce!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=ae.pop(),z.ranges){if(To(z,se),x&&!z.equals(a.sel)){fi(a,z,{clearRedo:!1});return}re=z}else if(b){ae.push(z);return}else break;var xe=[];To(re,se),se.push({changes:xe,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var De=dt(a,"beforeChange")||a.cm&&dt(a.cm,"beforeChange"),nt=function(zt){var on=z.changes[zt];if(on.origin=y,De&&!ns(a,on,!1))return ae.length=0,{};xe.push(ll(a,on));var mn=zt?il(a,on):Ce(ae);io(a,on,mn,Kl(a,on)),!zt&&a.cm&&a.cm.scrollIntoView({from:on.from,to:pa(on)});var Bn=[];va(a,function(gn,Pn){!Pn&&mt(Bn,gn.history)==-1&&(ls(gn.history,on),Bn.push(gn.history)),io(gn,on,null,Kl(gn,on))})},qe=z.changes.length-1;qe>=0;--qe){var At=nt(qe);if(At)return At.v}}}}function is(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(ze(a.sel.ranges,function(E){return new Pr(Oe(E.anchor.line+y,E.anchor.ch),Oe(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){wi(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)da(a.cm,b,"gutter")}}function io(a,y,x,b){if(a.cm&&!a.cm.curOp)return ai(a.cm,io)(a,y,x,b);if(y.to.line<a.first){is(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);is(a,E),y={from:Oe(a.first,0),to:Oe(y.to.line+E,y.to.ch),text:[Ce(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:Oe(z,it(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Yt(a,y.from,y.to),x||(x=il(a,y)),a.cm?fu(a.cm,y,b):ol(a,y,b),Io(a,x,Ne),a.cantEdit&&No(a,Oe(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,ae=!1,se=z.line;a.options.lineWrapping||(se=ke(vn(it(b,z.line))),b.iter(se,re.line+1,function(qe){if(qe==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&ut(a),ol(b,y,x,xl(a)),a.options.lineWrapping||(b.iter(se,z.line+y.text.length,function(qe){var At=mr(qe);At>E.maxLineLength&&(E.maxLine=qe,E.maxLineLength=At,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),wr(b,z.line),to(a,400);var ce=y.text.length-(re.line-z.line)-1;y.full?wi(a):z.line==re.line&&y.text.length==1&&!zl(a.doc,y)?da(a,z.line,"text"):wi(a,z.line,re.line+1,ce);var xe=dt(a,"changes"),De=dt(a,"change");if(De||xe){var nt={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};De&&Gr(a,"change",a,nt),xe&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(nt)}a.display.selForContextMenu=null}function _a(a,y,x,b,E){var z;b||(b=x),xt(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),Oa(a,{from:x,to:b,text:y,origin:E})}function as(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function os(a,y,x,b){for(var E=0;E<a.length;++E){var z=a[E],re=!0;if(z.ranges){z.copied||(z=a[E]=z.deepCopy(),z.copied=!0);for(var ae=0;ae<z.ranges.length;ae++)as(z.ranges[ae].anchor,y,x,b),as(z.ranges[ae].head,y,x,b);continue}for(var se=0;se<z.changes.length;++se){var ce=z.changes[se];if(x<ce.from.line)ce.from=Oe(ce.from.line+b,ce.from.ch),ce.to=Oe(ce.to.line+b,ce.to.ch);else if(y<=ce.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;os(a.done,x,b,E),os(a.undone,x,b,E)}function ao(a,y,x,b){var E=y,z=y;return typeof y=="number"?z=it(a,qt(a,y)):E=ke(y),E==null?null:(b(z,E)&&a.cm&&da(a.cm,E,x),z)}function oo(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,Tr(E),Gr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function lo(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}lo.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var z=Math.min(y,E-a),re=b.height;if(b.removeInner(a,z),this.height-=re-b.height,E==z&&(this.children.splice(x--,1),b.parent=null),(y-=z)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var ae=[];this.collapse(ae),this.children=[new oo(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<=z){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,ae=re;ae<E.lines.length;){var se=new oo(E.lines.slice(ae,ae+=25));E.height-=se.height,this.children.splice(++b,0,se),se.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=z}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new lo(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=mt(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new lo(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<z){var re=Math.min(y,z-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=z}}};var so=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};so.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=ke(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var z=gi(this);Vn(x,Math.max(0,x.height-z)),a&&(Li(a,function(){ss(a,x,-z),da(a,b,"widget")}),Gr(a,"lineWidgetCleared",a,this,b))}},so.prototype.changed=function(){var a=this,y=this.height,x=this.doc.cm,b=this.line;this.height=null;var E=gi(this)-y;E&&(pn(this.doc,b)||Vn(b,b.height+E),x&&Li(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Gr(x,"lineWidgetChanged",x,a,ke(b))}))},vt(so);function ss(a,y,x){Xn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qo(a,x)}function pu(a,y,x,b){var E=new so(a,x,b),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),ao(a,y,"widget",function(re){var ae=re.widgets||(re.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!pn(a,re)){var se=Xn(re)<a.scrollTop;Vn(re,re.height+gi(E)),se&&qo(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Gr(z,"lineWidgetAdded",z,E,typeof y=="number"?y:ke(y)),E}var us=0,ma=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};ma.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&ka(a),dt(this,"clear")){var x=this.find();x&&Gr(this,"clear",x.from,x.to)}for(var b=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],ae=Sr(re.markedSpans,this);a&&!this.collapsed?da(a,ke(re),"text"):a&&(ae.to!=null&&(E=ke(re)),ae.from!=null&&(b=ke(re))),re.markedSpans=Lr(re.markedSpans,ae),ae.from==null&&this.collapsed&&!pn(this.doc,re)&&a&&Vn(re,Mi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var ce=vn(this.lines[se]),xe=mr(ce);xe>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=xe,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&wi(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&ql(a.doc)),a&&Gr(a,"markerCleared",a,this,b,E),y&&Da(a),this.parent&&this.parent.clear()}},ma.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var z=this.lines[E],re=Sr(z.markedSpans,this);if(re.from!=null&&(x=Oe(y?z:ke(z),re.from),a==-1))return x;if(re.to!=null&&(b=Oe(y?z:ke(z),re.to),a==1))return b}return x&&{from:x,to:b}},ma.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Li(b,function(){var E=y.line,z=ke(y.line),re=$i(b,z);if(re&&(Ua(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!pn(x.doc,E)&&x.height!=null){var ae=x.height;x.height=null;var se=gi(x)-ae;se&&Vn(E,E.height+se)}Gr(b,"markerChanged",b,a)})},ma.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||mt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ma.prototype.detachLine=function(a){if(this.lines.splice(mt(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},vt(ma);function Ha(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return ai(a.cm,Ha)(a,y,x,b,E);var z=new ma(a,E),re=xt(y,x);if(b&&Ht(b,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=Ct("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(Mn(a,y.line,y,x,z)||y.line!=x.line&&Mn(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");br()}z.addToHistory&&jl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,se=a.cm,ce;if(a.iter(ae,x.line+1,function(De){se&&z.collapsed&&!se.options.lineWrapping&&vn(De)==se.display.maxLine&&(ce=!0),z.collapsed&&ae!=y.line&&Vn(De,0),fr(De,new dr(z,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),z.collapsed&&a.iter(y.line,x.line+1,function(De){pn(a,De)&&Vn(De,0)}),z.clearOnEnter&&be(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(Mr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++us,z.atomic=!0),se){if(ce&&(se.curOp.updateMaxLine=!0),z.collapsed)wi(se,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var xe=y.line;xe<=x.line;xe++)da(se,xe,"text");z.atomic&&ql(se.doc),Gr(se,"markerAdded",se,z)}return z}var uo=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};uo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Gr(this,"clear")}},uo.prototype.find=function(a,y){return this.primary.find(a,y)},vt(uo);function vu(a,y,x,b,E){b=Ht(b),b.shared=!1;var z=[Ha(a,y,x,b,E)],re=z[0],ae=b.widgetNode;return va(a,function(se){ae&&(b.widgetNode=ae.cloneNode(!0)),z.push(Ha(se,yt(se,y),yt(se,x),b,E));for(var ce=0;ce<se.linked.length;++ce)if(se.linked[ce].isParent)return;re=Ce(z)}),new uo(z,re)}function cs(a){return a.findMarks(Oe(a.first,0),a.clipPos(Oe(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),z=a.clipPos(E.from),re=a.clipPos(E.to);if(xt(z,re)){var ae=Ha(a,z,re,b.primary,b.primary.type);b.markers.push(ae),ae.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],z=[E.primary.doc];va(E.primary.doc,function(se){return z.push(se)});for(var re=0;re<E.markers.length;re++){var ae=E.markers[re];mt(z,ae.doc)==-1&&(ae.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Si=function(a,y,x,b,E){if(!(this instanceof Si))return new Si(a,y,x,b,E);x==null&&(x=0),lo.call(this,[new oo([new Br("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var z=Oe(x,0);this.sel=fa(z),this.history=new Lo(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),ol(this,{from:z,to:z,text:a}),fi(this,fa(z),Ne)};Si.prototype=Ve(lo.prototype,{constructor:Si,iter:function(a,y,x){x?this.iterN(a-this.first,y-a,x):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var x=0,b=0;b<y.length;++b)x+=y[b].height;this.insertInner(a-this.first,y,x)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=hn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:oi(function(a){var y=Oe(this.first,0),x=this.first+this.size-1;Oa(this,{from:y,to:Oe(x,it(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qa(this.cm,0,0),fi(this,fa(y),Ne)}),replaceRange:function(a,y,x,b){y=yt(this,y),x=x?yt(this,x):y,_a(this,a,y,x,b)},getRange:function(a,y,x){var b=Yt(this,yt(this,a),yt(this,y));return x===!1?b:b.join(x||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(Pt(this,a))return it(this,a)},getLineNumber:function(a){return ke(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=it(this,a)),vn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return yt(this,a)},getCursor:function(a){var y=this.sel.primary(),x;return a==null||a=="head"?x=y.head:a=="anchor"?x=y.anchor:a=="end"||a=="to"||a===!1?x=y.to():x=y.from(),x},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:oi(function(a,y,x){Xl(this,yt(this,typeof a=="number"?Oe(a,y||0):a),null,x)}),setSelection:oi(function(a,y,x){Xl(this,yt(this,a),yt(this,y||a),x)}),extendSelection:oi(function(a,y,x){Po(this,yt(this,a),y&&yt(this,y),x)}),extendSelections:oi(function(a,y){Yl(this,_t(this,a),y)}),extendSelectionsBy:oi(function(a,y){var x=ze(this.sel.ranges,a);Yl(this,_t(this,x),y)}),setSelections:oi(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Pr(yt(this,a[E].anchor),yt(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),fi(this,Ki(this.cm,b,y),x)}}),addSelection:oi(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Pr(yt(this,a),yt(this,y||a))),fi(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Yt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=Yt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:oi(function(a,y,x){for(var b=[],E=this.sel,z=0;z<E.ranges.length;z++){var re=E.ranges[z];b[z]={from:re.from(),to:re.to(),text:this.splitLines(a[z]),origin:x}}for(var ae=y&&y!="end"&&au(this,b,y),se=b.length-1;se>=0;se--)Oa(this,b[se]);ae?Jl(this,ae):this.cm&&Pa(this.cm)}),undo:oi(function(){Ro(this,"undo")}),redo:oi(function(){Ro(this,"redo")}),undoSelection:oi(function(){Ro(this,"undo",!0)}),redoSelection:oi(function(){Ro(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Lo(this.history.maxGeneration),va(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Na(this.history.done),undone:Na(this.history.undone)}},setHistory:function(a){var y=this.history=new Lo(this.history.maxGeneration);y.done=Na(a.done.slice(0),null,!0),y.undone=Na(a.undone.slice(0),null,!0)},setGutterMarker:oi(function(a,y,x){return ao(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&Et(E)&&(b.gutterMarkers=null),!0})}),clearGutter:oi(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&ao(y,x,"gutter",function(){return x.gutterMarkers[a]=null,Et(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Pt(this,a)||(y=a,a=it(this,a),!a))return null}else if(y=ke(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:oi(function(a,y,x){return ao(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!b[E])b[E]=x;else{if(Je(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:oi(function(a,y,x){return ao(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",z=b[E];if(z)if(x==null)b[E]=null;else{var re=z.match(Je(x));if(!re)return!1;var ae=re.index+re[0].length;b[E]=z.slice(0,re.index)+(!re.index||ae==z.length?"":" ")+z.slice(ae)||null}else return!1;return!0})}),addLineWidget:oi(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ha(this,yt(this,a),yt(this,y),x,x&&x.type||"range")},setBookmark:function(a,y){var x={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=yt(this,a),Ha(this,a,a,x,"bookmark")},findMarksAt:function(a){a=yt(this,a);var y=[],x=it(this,a.line).markedSpans;if(x)for(var b=0;b<x.length;++b){var E=x[b];(E.from==null||E.from<=a.ch)&&(E.to==null||E.to>=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=yt(this,a),y=yt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var ae=0;ae<re.length;ae++){var se=re[ae];!(se.to!=null&&E==a.line&&a.ch>=se.to||se.from==null&&E!=a.line||se.from!=null&&E==y.line&&se.from>=y.ch)&&(!x||x(se.marker))&&b.push(se.marker.parent||se.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var z=E.text.length+b;if(z>a)return y=a,!0;a-=z,++x}),yt(this,Oe(x,y))},indexFromPos:function(a){a=yt(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var x=this.lineSeparator().length;return this.iter(this.first,a.line,function(b){y+=b.text.length+x}),y},copy:function(a){var y=new Si(hn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,x=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<x&&(x=a.to);var b=new Si(hn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cs(this)),b},unlinkDoc:function(a){if(a instanceof jr&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cs(this));break}}if(a.history==this.history){var b=[a.id];va(a,function(E){return b.push(E.id)},!0),a.history=new Lo(null),a.history.done=Na(this.history.done,b),a.history.undone=Na(this.history.undone,b)}},iterLinkedDocs:function(a){va(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):Hn(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:oi(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&ou(this.cm))})}),Si.prototype.eachLine=Si.prototype.iter;var ds=0;function bu(a){var y=this;if(hs(y),!(pe(y,a)||ui(y.display,a))){Dt(a),me&&(ds=+new Date);var x=xa(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,z=Array(E),re=0,ae=function(){++re==E&&ai(y,function(){x=yt(y.doc,x);var qe={from:x,to:x,text:y.doc.splitLines(z.filter(function(At){return At!=null}).join(y.doc.lineSeparator())),origin:"paste"};Oa(y.doc,qe),Jl(y.doc,fa(yt(y.doc,x),yt(y.doc,pa(qe))))})()},se=function(qe,At){if(y.options.allowDropFileTypes&&mt(y.options.allowDropFileTypes,qe.type)==-1){ae();return}var zt=new FileReader;zt.onerror=function(){return ae()},zt.onload=function(){var on=zt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(on)){ae();return}z[At]=on,ae()},zt.readAsText(qe)},ce=0;ce<b.length;ce++)se(b[ce],ce);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var xe=a.dataTransfer.getData("Text");if(xe){var De;if(y.state.draggingText&&!y.state.draggingText.copy&&(De=y.listSelections()),Io(y.doc,fa(x,x)),De)for(var nt=0;nt<De.length;++nt)_a(y.doc,"",De[nt].anchor,De[nt].head,"drag");y.replaceSelection(xe,"around","paste"),y.display.input.focus()}}catch(qe){}}}}function Cu(a,y){if(me&&(!a.state.draggingText||+new Date-ds<100)){Xt(y);return}if(!(pe(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!we)){var x=Ze("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",de&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),de&&x.parentNode.removeChild(x)}}function xu(a,y){var x=xa(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Le(a.display.dragCursor,b)}}function hs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var z=0;z<x.length;z++)a(x[z])})}}var ps=!1;function wu(){ps||(Su(),ps=!0)}function Su(){var a;be(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fs(Eu)},100))}),be(window,"blur",function(){return fs(Ta)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var ga={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"},co=0;co<10;co++)ga[co+48]=ga[co+96]=String(co);for(var Oo=65;Oo<=90;Oo++)ga[Oo]=String.fromCharCode(Oo);for(var ho=1;ho<=12;ho++)ga[ho+111]=ga[ho+63235]="F"+ho;var ia={};ia.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"},ia.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"},ia.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"},ia.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"]},ia.default=Ee?ia.macDefault:ia.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,z,re=0;re<y.length-1;re++){var ae=y[re];if(/^(cmd|meta|m)$/i.test(ae))z=!0;else if(/^a(lt)?$/i.test(ae))x=!0;else if(/^(c|ctrl|control)$/i.test(ae))b=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),z&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Du(a){var y={};for(var x in a)if(a.hasOwnProperty(x)){var b=a[x];if(/^(name|fallthrough|(de|at)tach)$/.test(x))continue;if(b=="..."){delete a[x];continue}for(var E=ze(x.split(" "),ku),z=0;z<E.length;z++){var re=void 0,ae=void 0;z==E.length-1?(ae=E.join(" "),re=b):(ae=E.slice(0,z+1).join(" "),re="...");var se=y[ae];if(!se)y[ae]=re;else if(se!=re)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Wa(a,y,x,b){y=_o(y);var E=y.call?y.call(a,b):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&x(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return Wa(a,y.fallthrough,x,b);for(var z=0;z<y.fallthrough.length;z++){var re=Wa(a,y.fallthrough[z],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:ga[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ms(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(Ge?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(Ge?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(de&&a.keyCode==34&&a.char)return!1;var x=ga[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function _o(a){return typeof a=="string"?ia[a]:a}function za(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var z=y(x[E]);b.length&&xt(z.from,Ce(b).to)<=0;){var re=b.pop();if(xt(re.from,z.from)<0){z.from=re.from;break}}b.push(z)}Li(a,function(){for(var ae=b.length-1;ae>=0;ae--)_a(a.doc,"",b[ae].from,b[ae].to,"+delete");Pa(a)})}function cl(a,y,x){var b=cn(a.text,y+x,x);return b<0||b>a.text.length?null:b}function dl(a,y,x){var b=cl(a,y.ch,x);return b==null?null:new Oe(y.line,b,x<0?"after":"before")}function hl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=ue(x,y.doc.direction);if(z){var re=E<0?Ce(z):z[0],ae=E<0==(re.level==1),se=ae?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var xe=ua(y,x);ce=E<0?x.text.length-1:0;var De=Wi(y,xe,ce).top;ce=Qt(function(nt){return Wi(y,xe,nt).top==De},E<0==(re.level==1)?re.from:re.to-1,ce),se=="before"&&(ce=cl(x,ce,1))}else ce=E<0?re.to:re.from;return new Oe(b,ce,se)}}return new Oe(b,E<0?x.text.length:0,E<0?"before":"after")}function Bu(a,y,x,b){var E=ue(y,a.doc.direction);if(!E)return dl(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var z=ee(E,x.ch,x.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return dl(y,x,b);var ae=function(mn,Bn){return cl(y,mn instanceof Oe?mn.ch:mn,Bn)},se,ce=function(mn){return a.options.lineWrapping?(se=se||ua(a,y),Jr(a,y,se,mn)):{begin:0,end:y.text.length}},xe=ce(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var De=re.level==1==b<0,nt=ae(x,De?1:-1);if(nt!=null&&(De?nt<=re.to&&nt<=xe.end:nt>=re.from&&nt>=xe.begin)){var qe=De?"before":"after";return new Oe(x.line,nt,qe)}}var At=function(mn,Bn,gn){for(var Pn=function(Wr,li){return li?new Oe(x.line,ae(Wr,1),"before"):new Oe(x.line,Wr,"after")};mn>=0&&mn<E.length;mn+=Bn){var Qn=E[mn],Gn=Bn>0==(Qn.level!=1),ur=Gn?gn.begin:ae(gn.end,-1);if(Qn.from<=ur&&ur<Qn.to||(ur=Gn?Qn.from:ae(Qn.to,-1),gn.begin<=ur&&ur<gn.end))return Pn(ur,Gn)}},zt=At(z+b,b,xe);if(zt)return zt;var on=b>0?xe.end:ae(xe.begin,-1);return on!=null&&!(b>0&&on==y.text.length)&&(zt=At(b>0?0:E.length-1,b,ce(on)),zt)?zt:null}var fo={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Ne)},killLine:function(a){return za(a,function(y){if(y.empty()){var x=it(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Oe(y.head.line+1,0)}:{from:y.head,to:Oe(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return za(a,function(y){return{from:Oe(y.from().line,0),to:yt(a.doc,Oe(y.to().line+1,0))}})},delLineLeft:function(a){return za(a,function(y){return{from:Oe(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return za(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return{from:b,to:y.from()}})},delWrappedLineRight:function(a){return za(a,function(y){var x=a.charCoords(y.head,"div").top+5,b=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div");return{from:y.from(),to:b}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(Oe(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Oe(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return ys(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bs(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Au(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},ft)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:x},"div")},ft)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bs(a,y.head):b},ft)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var z=x[E].from(),re=ve(a.getLine(z.line),z.ch,b);y.push(_e(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Li(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,z=it(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new Oe(E.line,E.ch-1)),E.ch>0)E=new Oe(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),Oe(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=it(a.doc,E.line-1).text;re&&(E=new Oe(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Oe(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Pr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Li(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;b<y.length;b++)a.indentLine(y[b].from().line,null,!0);Pa(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=it(a.doc,y),b=vn(x);return b!=x&&(y=ke(b)),hl(!0,a,b,y,1)}function Au(a,y){var x=it(a.doc,y),b=Un(x);return b!=x&&(y=ke(b)),hl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=it(a.doc,x.line),E=ue(b,a.doc.direction);if(!E||E[0].level==0){var z=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=z&&y.ch;return Oe(x.line,re?0:z,x.sticky)}return x}function Ho(a,y,x){if(typeof y=="string"&&(y=fo[y],!y))return!1;a.display.input.ensurePolled();var b=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),x&&(a.display.shift=!1),E=y(a)!=Ft}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Fu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Wa(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Wa(y,a.options.extraKeys,x,a)||Wa(y,a.options.keyMap,x,a)}var Mu=new he;function po(a,y,x,b){var E=a.state.keySeq;if(E){if(vs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Mu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),Cs(a,E+" "+y,x,b))return!0}return Cs(a,y,x,b)}function Cs(a,y,x,b){var E=Fu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Gr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(Dt(x),Xo(a)),!!E}function xs(a,y){var x=gs(y,!0);return x?y.shiftKey&&!a.state.keySeq?po(a,"Shift-"+x,y,function(b){return Ho(a,b,!0)})||po(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ho(a,b)}):po(a,x,y,function(b){return Ho(a,b)}):!1}function Lu(a,y,x){return po(a,"'"+x+"'",y,function(b){return Ho(a,b,!0)})}var fl=null;function ws(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ae(),!pe(y,a))){me&&je<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=xs(y,a);de&&(fl=b?x:null,!b&&x==88&&!yn&&(Ee?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),oe&&!Ee&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Tu(y)}}function Tu(a){var y=a.display.lineDiv;Qe(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(Ye(y,"CodeMirror-crosshair"),ye(document,"keyup",x),ye(document,"mouseover",x))}be(document,"keyup",x),be(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),pe(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||pe(y,a)||a.ctrlKey&&!a.altKey||Ee&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(de&&x==fl){fl=null,Dt(a);return}if(!(de&&(!a.which||a.which<10)&&xs(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Lu(y,a,E)||y.display.input.onKeyPress(a))}}}var Pu=400,pl=function(a,y,x){this.time=a,this.pos=y,this.button=x};pl.prototype.compare=function(a,y,x){return this.time+Pu>a&&xt(y,this.pos)==0&&x==this.button};var vo,mo;function Iu(a,y){var x=+new Date;return mo&&mo.compare(x,a,y)?(vo=mo=null,"triple"):vo&&vo.compare(x,a,y)?(mo=new pl(x,a,y),vo=null,"double"):(vo=new pl(x,a,y),mo=null,"single")}function ks(a){var y=this,x=y.display;if(!(pe(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){He||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=xa(y,a),E=Sn(a),z=b?Iu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Nu(y,E,b,z,a))&&(E==1?b?Ou(y,b,z,a):Fn(a)==x.scroller&&Dt(a):E==2?(b&&Po(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(Ue?y.display.input.onContextMenu(a):Dl(y)))}}}function Nu(a,y,x,b,E){var z="Click";return b=="double"?z="Double"+z:b=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,po(a,ms(z,E),E,function(re){if(typeof re=="string"&&(re=fo[re]),!re)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=re(a,x)!=Ft}finally{a.state.suppressEdits=!1}return ae})}function Ru(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var z=at?x.shiftKey&&x.metaKey:x.altKey;E.unit=z?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Ee?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ee?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout($t(kl,a),0):a.curOp.focus=Ae();var E=Ru(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&Ln&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(xt((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(xt(re.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Hu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,z=!1,re=ai(a,function(ce){He&&(E.scroller.draggable=!1),a.state.draggingText=!1,ye(E.wrapper.ownerDocument,"mouseup",re),ye(E.wrapper.ownerDocument,"mousemove",ae),ye(E.scroller,"dragstart",se),ye(E.scroller,"drop",re),z||(Dt(ce),b.addNew||Po(a.doc,x,null,null,b.extend),He&&!we||me&&je==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(ce){z=z||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},se=function(){return z=!0};He&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),be(E.wrapper.ownerDocument,"mouseup",re),be(E.wrapper.ownerDocument,"mousemove",ae),be(E.scroller,"dragstart",se),be(E.scroller,"drop",re),Dl(a),setTimeout(function(){return E.input.focus()},20)}function Ds(a,y,x){if(x=="char")return new Pr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Pr(Oe(y.line,0),yt(a.doc,Oe(y.line+1,0)));var b=x(a,y);return new Pr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,z=a.doc;Dt(y);var re,ae,se=z.sel,ce=se.ranges;if(b.addNew&&!b.extend?(ae=z.sel.contains(x),ae>-1?re=ce[ae]:re=new Pr(x,x)):(re=z.sel.primary(),ae=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Pr(x,x)),x=xa(a,y,!0,!0),ae=-1;else{var xe=Ds(a,x,b.unit);b.extend?re=sl(re,xe.anchor,xe.head,b.extend):re=xe}b.addNew?ae==-1?(ae=ce.length,fi(z,Ki(a,ce.concat([re]),ae),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[ae].empty()&&b.unit=="char"&&!b.extend?(fi(z,Ki(a,ce.slice(0,ae).concat(ce.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),se=z.sel):ul(z,ae,re,ot):(ae=0,fi(z,new Ri([re],0),ot),se=z.sel);var De=x;function nt(gn){if(xt(De,gn)!=0)if(De=gn,b.unit=="rectangle"){for(var Pn=[],Qn=a.options.tabSize,Gn=ve(it(z,x.line).text,x.ch,Qn),ur=ve(it(z,gn.line).text,gn.ch,Qn),Wr=Math.min(Gn,ur),li=Math.max(Gn,ur),Ur=Math.min(x.line,gn.line),Ti=Math.min(a.lastLine(),Math.max(x.line,gn.line));Ur<=Ti;Ur++){var Ei=it(z,Ur).text,$r=rn(Ei,Wr,Qn);Wr==li?Pn.push(new Pr(Oe(Ur,$r),Oe(Ur,$r))):Ei.length>$r&&Pn.push(new Pr(Oe(Ur,$r),Oe(Ur,rn(Ei,li,Qn))))}Pn.length||Pn.push(new Pr(x,x)),fi(z,Ki(a,se.ranges.slice(0,ae).concat(Pn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(gn)}else{var ki=re,di=Ds(a,gn,b.unit),ii=ki.anchor,ei;xt(di.anchor,ii)>0?(ei=di.head,ii=Ot(ki.from(),di.anchor)):(ei=di.anchor,ii=fn(ki.to(),di.head));var Yr=se.ranges.slice(0);Yr[ae]=Wu(a,new Pr(yt(z,ii),ei)),fi(z,Ki(a,Yr,ae),ot)}}var qe=E.wrapper.getBoundingClientRect(),At=0;function zt(gn){var Pn=++At,Qn=xa(a,gn,!0,b.unit=="rectangle");if(Qn)if(xt(Qn,De)!=0){a.curOp.focus=Ae(),nt(Qn);var Gn=Bo(E,z);(Qn.line>=Gn.to||Qn.line<Gn.from)&&setTimeout(ai(a,function(){At==Pn&&zt(gn)}),150)}else{var ur=gn.clientY<qe.top?-20:gn.clientY>qe.bottom?20:0;ur&&setTimeout(ai(a,function(){At==Pn&&(E.scroller.scrollTop+=ur,zt(gn))}),50)}}function on(gn){a.state.selectingText=!1,At=1/0,gn&&(Dt(gn),E.input.focus()),ye(E.wrapper.ownerDocument,"mousemove",mn),ye(E.wrapper.ownerDocument,"mouseup",Bn),z.history.lastSelOrigin=null}var mn=ai(a,function(gn){gn.buttons===0||!Sn(gn)?on(gn):zt(gn)}),Bn=ai(a,on);a.state.selectingText=Bn,be(E.wrapper.ownerDocument,"mousemove",mn),be(E.wrapper.ownerDocument,"mouseup",Bn)}function Wu(a,y){var x=y.anchor,b=y.head,E=it(a.doc,x.line);if(xt(x,b)==0&&x.sticky==b.sticky)return y;var z=ue(E);if(!z)return y;var re=ee(z,x.ch,x.sticky),ae=z[re];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var se=re+(ae.from==x.ch==(ae.level!=1)?0:1);if(se==0||se==z.length)return y;var ce;if(b.line!=x.line)ce=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var xe=ee(z,b.ch,b.sticky),De=xe-re||(b.ch-x.ch)*(ae.level==1?-1:1);xe==se-1||xe==se?ce=De<0:ce=De>0}var nt=z[se+(ce?-1:0)],qe=ce==(nt.level==1),At=qe?nt.from:nt.to,zt=qe?"after":"before";return x.ch==At&&x.sticky==zt?y:new Pr(new Oe(x.line,At,zt),b)}function Bs(a,y,x,b){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch(nt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&Dt(y);var re=a.display,ae=re.lineDiv.getBoundingClientRect();if(z>ae.bottom||!dt(a,x))return It(y);z-=ae.top-re.viewOffset;for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=re.gutters.childNodes[se];if(ce&&ce.getBoundingClientRect().right>=E){var xe=Be(a.doc,z),De=a.display.gutterSpecs[se];return Pe(a,x,a,xe,De.className,y),It(y)}}}function vl(a,y){return Bs(a,y,"gutterClick",!0)}function As(a,y){ui(a.display,y)||zu(a,y)||pe(a,y,"contextmenu")||Ue||a.display.input.onContextMenu(y)}function zu(a,y){return dt(a,"gutterContextMenu")?Bs(a,y,"gutterContextMenu",!1):!1}function Fs(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ca(a)}var Za={toString:function(){return"CodeMirror.Init"}},Ms={},Wo={};function Zu(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(ae,se,ce){ce!=Za&&z(ae,se,ce)}:z)}a.defineOption=x,a.Init=Za,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,al(b)},!0),x("indentUnit",2,al,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ro(b),Ca(b),wi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var z=[],re=b.doc.first;b.doc.iter(function(se){for(var ce=0;;){var xe=se.text.indexOf(E,ce);if(xe==-1)break;ce=xe+E.length,z.push(Oe(re,xe))}re++});for(var ae=z.length-1;ae>=0;ae--)_a(b.doc,E,z[ae],Oe(z[ae].line,z[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,z){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=Za&&b.refresh()}),x("specialCharPlaceholder",Bi,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",We?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!rt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Fs(b),no(b)},!0),x("keyMap","default",function(b,E,z){var re=_o(E),ae=z!=Za&&_o(z);ae&&ae.detach&&ae.detach(b,re),re.attach&&re.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Vu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rl(E,b.options.lineNumbers),no(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ko(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Ia(b)},!0),x("scrollbarStyle","native",function(b){Tl(b),Ia(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rl(b.options.gutters,E),no(b)},!0),x("firstLineNumber",1,no,!0),x("lineNumberFormatter",function(b){return b},no,!0),x("showCursorWhenSelecting",!1,Ja,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Ta(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Ja,!0),x("singleCursorHeightPerLine",!0,Ja,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ro,!0),x("addModeClass",!1,ro,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ro,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Za;if(!y!=!b){var E=a.display.dragFunctions,z=y?be:ye;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function Vu(a){a.options.lineWrapping?(Qe(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Ye(a.display.wrapper,"CodeMirror-wrap"),sr(a)),Yo(a),wi(a),Ca(a),setTimeout(function(){return Ia(a)},100)}function jr(a,y){var x=this;if(!(this instanceof jr))return new jr(a,y);this.options=y=y?Ht(y):{},Ht(Ms,y,!1);var b=y.value;typeof b=="string"?b=new Si(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new jr.inputStyles[y.inputStyle](this),z=this.display=new ru(a,b,E,y);z.wrapper.CodeMirror=this,Fs(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tl(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 he,keySeq:null,specialChars:null},y.autofocus&&!We&&z.input.focus(),me&&je<11&&setTimeout(function(){return x.display.input.reset(!0)},20),ju(this),wu(),ka(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!We||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Jo(x)},20):Ta(this);for(var re in Wo)Wo.hasOwnProperty(re)&&Wo[re](this,y[re],Za);Nl(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ml.length;++ae)ml[ae](this);Da(this),He&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}jr.defaults=Ms,jr.optionHandlers=Wo;function ju(a){var y=a.display;be(y.scroller,"mousedown",ai(a,ks)),me&&je<11?be(y.scroller,"dblclick",ai(a,function(se){if(!pe(a,se)){var ce=xa(a,se);if(!(!ce||vl(a,se)||ui(a.display,se))){Dt(se);var xe=a.findWordAt(ce);Po(a.doc,xe.anchor,xe.head)}}})):be(y.scroller,"dblclick",function(se){return pe(a,se)||Dt(se)}),be(y.scroller,"contextmenu",function(se){return As(a,se)}),be(y.input.getField(),"contextmenu",function(se){y.scroller.contains(se.target)||As(a,se)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function z(se){if(se.touches.length!=1)return!1;var ce=se.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function re(se,ce){if(ce.left==null)return!0;var xe=ce.left-se.left,De=ce.top-se.top;return xe*xe+De*De>20*20}be(y.scroller,"touchstart",function(se){if(!pe(a,se)&&!z(se)&&!vl(a,se)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},se.touches.length==1&&(y.activeTouch.left=se.touches[0].pageX,y.activeTouch.top=se.touches[0].pageY)}}),be(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),be(y.scroller,"touchend",function(se){var ce=y.activeTouch;if(ce&&!ui(y,se)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var xe=a.coordsChar(y.activeTouch,"page"),De;!ce.prev||re(ce,ce.prev)?De=new Pr(xe,xe):!ce.prev.prev||re(ce,ce.prev.prev)?De=a.findWordAt(xe):De=new Pr(Oe(xe.line,0),yt(a.doc,Oe(xe.line+1,0))),a.setSelection(De.anchor,De.head),a.focus(),Dt(se)}E()}),be(y.scroller,"touchcancel",E),be(y.scroller,"scroll",function(){y.scroller.clientHeight&&(qa(a,y.scroller.scrollTop),Sa(a,y.scroller.scrollLeft,!0),Pe(a,"scroll",a))}),be(y.scroller,"mousewheel",function(se){return _l(a,se)}),be(y.scroller,"DOMMouseScroll",function(se){return _l(a,se)}),be(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(se){pe(a,se)||Xt(se)},over:function(se){pe(a,se)||(xu(a,se),Xt(se))},start:function(se){return Cu(a,se)},drop:ai(a,bu),leave:function(se){pe(a,se)||hs(a)}};var ae=y.input.getField();be(ae,"keyup",function(se){return Ss.call(a,se)}),be(ae,"keydown",ai(a,ws)),be(ae,"keypress",ai(a,Es)),be(ae,"focus",function(se){return Jo(a,se)}),be(ae,"blur",function(se){return Ta(a,se)})}var ml=[];jr.defineInitHook=function(a){return ml.push(a)};function go(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=er(a,y).state:x="prev");var re=a.options.tabSize,ae=it(E,y),se=ve(ae.text,null,re);ae.stateAfter&&(ae.stateAfter=null);var ce=ae.text.match(/^\s*/)[0],xe;if(!b&&!/\S/.test(ae.text))xe=0,x="not";else if(x=="smart"&&(xe=E.mode.indent(z,ae.text.slice(ce.length),ae.text),xe==Ft||xe>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?xe=ve(it(E,y-1).text,null,re):xe=0:x=="add"?xe=se+a.options.indentUnit:x=="subtract"?xe=se-a.options.indentUnit:typeof x=="number"&&(xe=se+x),xe=Math.max(0,xe);var De="",nt=0;if(a.options.indentWithTabs)for(var qe=Math.floor(xe/re);qe;--qe)nt+=re,De+=" ";if(nt<xe&&(De+=_e(xe-nt)),De!=ce)return _a(E,De,Oe(y,0),Oe(y,ce.length),"+input"),ae.stateAfter=null,!0;for(var At=0;At<E.sel.ranges.length;At++){var zt=E.sel.ranges[At];if(zt.head.line==y&&zt.head.ch<ce.length){var on=Oe(y,ce.length);ul(E,At,new Pr(on,on));break}}}var Yi=null;function zo(a){Yi=a}function gl(a,y,x,b,E){var z=a.doc;a.display.shift=!1,b||(b=z.sel);var re=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>re,se=Hn(y),ce=null;if(ae&&b.ranges.length>1)if(Yi&&Yi.text.join(`
|
|
`)==y){if(b.ranges.length%Yi.text.length==0){ce=[];for(var xe=0;xe<Yi.text.length;xe++)ce.push(z.splitLines(Yi.text[xe]))}}else se.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=ze(se,function(mn){return[mn]}));for(var De=a.curOp.updateInput,nt=b.ranges.length-1;nt>=0;nt--){var qe=b.ranges[nt],At=qe.from(),zt=qe.to();qe.empty()&&(x&&x>0?At=Oe(At.line,At.ch-x):a.state.overwrite&&!ae?zt=Oe(zt.line,Math.min(it(z,zt.line).text.length,zt.ch+Ce(se).length)):ae&&Yi&&Yi.lineWise&&Yi.text.join(`
|
|
`)==se.join(`
|
|
`)&&(At=zt=Oe(At.line,0)));var on={from:At,to:zt,text:ce?ce[nt%ce.length]:se,origin:E||(ae?"paste":a.state.cutIncoming>re?"cut":"+input")};Oa(a.doc,on),Gr(a,"inputRead",a,on)}y&&!ae&&Ts(a,y),Pa(a),a.curOp.updateInput<2&&(a.curOp.updateInput=De),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ls(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Li(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ts(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var ae=0;ae<z.electricChars.length;ae++)if(y.indexOf(z.electricChars.charAt(ae))>-1){re=go(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(it(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=go(a,E.head.line,"smart"));re&&Gr(a,"electricInput",a,E.head.line)}}}function Ps(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,z={anchor:Oe(E,0),head:Oe(E+1,0)};x.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:x}}function Is(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Ns(){var a=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ze("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return He?a.style.width="1000px":a.setAttribute("wrap","off"),Re&&(a.style.border="1px solid black"),Is(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var z=this.options,re=z[b];z[b]==E&&b!="mode"||(z[b]=E,y.hasOwnProperty(b)&&ai(this,y[b])(this,E,re),Pe(this,"optionChange",this,b))},getOption:function(b){return this.options[b]},getDoc:function(){return this.doc},addKeyMap:function(b,E){this.state.keyMaps[E?"push":"unshift"](_o(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,z=0;z<E.length;++z)if(E[z]==b||E[z].name==b)return E.splice(z,1),!0},addOverlay:yi(function(b,E){var z=b.token?b:a.getMode(this.options,b);if(z.startState)throw new Error("Overlays may not be stateful.");st(this.state.overlays,{mode:z,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,wi(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,z=0;z<E.length;++z){var re=E[z].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(z,1),this.state.modeGen++,wi(this);return}}}),indentLine:yi(function(b,E,z){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Pt(this.doc,b)&&go(this,b,E,z)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var ae=E[re];if(ae.empty())ae.head.line>z&&(go(this,ae.head.line,b,!0),z=ae.head.line,re==this.doc.sel.primIndex&&Pa(this));else{var se=ae.from(),ce=ae.to(),xe=Math.max(z,se.line);z=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var De=xe;De<z;++De)go(this,De,b);var nt=this.doc.sel.ranges;se.ch==0&&E.length==nt.length&&nt[re].from().ch>0&&ul(this.doc,re,new Pr(se,nt[re].to()),Ne)}}}),getTokenAt:function(b,E){return nr(this,b,E)},getLineTokens:function(b,E){return nr(this,Oe(b),E,!0)},getTokenTypeAt:function(b){b=yt(this.doc,b);var E=jn(this,it(this.doc,b.line)),z=0,re=(E.length-1)/2,ae=b.ch,se;if(ae==0)se=E[2];else for(;;){var ce=z+re>>1;if((ce?E[ce*2-1]:0)>=ae)re=ce;else if(E[ce*2+1]<ae)z=ce+1;else{se=E[ce*2+2];break}}var xe=se?se.indexOf("overlay "):-1;return xe<0?se:xe==0?null:se.slice(0,xe-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var z=[];if(!x.hasOwnProperty(E))return z;var re=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")re[ae[E]]&&z.push(re[ae[E]]);else if(ae[E])for(var se=0;se<ae[E].length;se++){var ce=re[ae[E][se]];ce&&z.push(ce)}else ae.helperType&&re[ae.helperType]?z.push(re[ae.helperType]):re[ae.name]&&z.push(re[ae.name]);for(var xe=0;xe<re._global.length;xe++){var De=re._global[xe];De.pred(ae,this)&&mt(z,De.val)==-1&&z.push(De.val)}return z},getStateAfter:function(b,E){var z=this.doc;return b=qt(z,b==null?z.first+z.size-1:b),er(this,b+1,E).state},cursorCoords:function(b,E){var z,re=this.doc.sel.primary();return b==null?z=re.head:typeof b=="object"?z=yt(this.doc,b):z=b?re.from():re.to(),xi(this,z,E||"page")},charCoords:function(b,E){return La(this,yt(this.doc,b),E||"page")},coordsChar:function(b,E){return b=So(this,b,E||"page"),ci(this,b.left,b.top)},lineAtHeight:function(b,E){return b=So(this,{top:b,left:0},E||"page").top,Be(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,z){var re=!1,ae;if(typeof b=="number"){var se=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>se&&(b=se,re=!0),ae=it(this.doc,b)}else ae=b;return Ma(this,ae,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-Xn(ae):0)},defaultTextHeight:function(){return Mi(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,z,re,ae){var se=this.display;b=xi(this,yt(this.doc,b));var ce=b.bottom,xe=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),se.sizer.appendChild(E),re=="over")ce=b.top;else if(re=="above"||re=="near"){var De=Math.max(se.wrapper.clientHeight,this.doc.height),nt=Math.max(se.sizer.clientWidth,se.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>De)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=De&&(ce=b.bottom),xe+E.offsetWidth>nt&&(xe=nt-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",ae=="right"?(xe=se.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?xe=0:ae=="middle"&&(xe=(se.sizer.clientWidth-E.offsetWidth)/2),E.style.left=xe+"px"),z&&Gs(this,{left:xe,top:ce,right:xe+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:yi(ws),triggerOnKeyPress:yi(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:yi(ks),execCommand:function(b){if(fo.hasOwnProperty(b))return fo[b].call(null,this)},triggerElectric:yi(function(b){Ts(this,b)}),findPosH:function(b,E,z,re){var ae=1;E<0&&(ae=-1,E=-E);for(var se=yt(this.doc,b),ce=0;ce<E&&(se=yl(this.doc,se,ae,z,re),!se.hitSide);++ce);return se},moveH:yi(function(b,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?yl(z.doc,re.head,b,E,z.options.rtlMoveVisually):b<0?re.from():re.to()},ft)}),deleteH:yi(function(b,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):za(this,function(ae){var se=yl(re,ae.head,b,E,!1);return b<0?{from:se,to:ae.head}:{from:ae.head,to:se}})}),findPosV:function(b,E,z,re){var ae=1,se=re;E<0&&(ae=-1,E=-E);for(var ce=yt(this.doc,b),xe=0;xe<E;++xe){var De=xi(this,ce,"div");if(se==null?se=De.left:De.left=se,ce=Rs(this,De,ae,z),ce.hitSide)break}return ce},moveV:yi(function(b,E){var z=this,re=this.doc,ae=[],se=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(xe){if(se)return b<0?xe.from():xe.to();var De=xi(z,xe.head,"div");xe.goalColumn!=null&&(De.left=xe.goalColumn),ae.push(De.left);var nt=Rs(z,De,b,E);return E=="page"&&xe==re.sel.primary()&&qo(z,La(z,nt,"div").top-De.top),nt},ft),ae.length)for(var ce=0;ce<re.sel.ranges.length;ce++)re.sel.ranges[ce].goalColumn=ae[ce]}),findWordAt:function(b){var E=this.doc,z=it(E,b.line).text,re=b.ch,ae=b.ch;if(z){var se=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==z.length)&&re?--re:++ae;for(var ce=z.charAt(re),xe=St(ce,se)?function(De){return St(De,se)}:/\s/.test(ce)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!St(De)};re>0&&xe(z.charAt(re-1));)--re;for(;ae<z.length&&xe(z.charAt(ae));)++ae}return new Pr(Oe(b.line,re),Oe(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Qe(this.display.cursorDiv,"CodeMirror-overwrite"):Ye(this.display.cursorDiv,"CodeMirror-overwrite"),Pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ae()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){Qa(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Ai(this)-this.display.barHeight,width:b.scrollWidth-Ai(this)-this.display.barWidth,clientHeight:na(this),clientWidth:qi(this)}},scrollIntoView:yi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:Oe(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?Vs(this,b):Al(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var z=this,re=function(se){return typeof se=="number"||/^\d+$/.test(String(se))?se+"px":se};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Ka(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(se){if(se.widgets){for(var ce=0;ce<se.widgets.length;ce++)if(se.widgets[ce].noHScroll){da(z,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,Pe(this,"refresh",this)}),operation:function(b){return Li(this,b)},startOperation:function(){return ka(this)},endOperation:function(){return Da(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;wi(this),this.curOp.forceUpdate=!0,Ca(this),Qa(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Mi(this.display))>.5||this.options.lineWrapping)&&Yo(this),Pe(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),Ca(this),this.display.input.reset(),Qa(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Gr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},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}},vt(a),a.registerHelper=function(b,E,z){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=z},a.registerGlobalHelper=function(b,E,z,re){a.registerHelper(b,E,re),x[b]._global.push({pred:z,val:re})}}function yl(a,y,x,b,E){var z=y,re=x,ae=it(a,y.line),se=E&&a.direction=="rtl"?-x:x;function ce(){var Bn=y.line+se;return Bn<a.first||Bn>=a.first+a.size?!1:(y=new Oe(Bn,y.ch,y.sticky),ae=it(a,Bn))}function xe(Bn){var gn;if(b=="codepoint"){var Pn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(Pn)?gn=null:gn=new Oe(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(Pn>=55296&&Pn<56320?2:1))),-x)}else E?gn=Bu(a.cm,ae,y,x):gn=dl(ae,y,x);if(gn==null)if(!Bn&&ce())y=hl(E,a.cm,ae,y.line,se);else return!1;else y=gn;return!0}if(b=="char"||b=="codepoint")xe();else if(b=="column")xe(!0);else if(b=="word"||b=="group")for(var De=null,nt=b=="group",qe=a.cm&&a.cm.getHelper(y,"wordChars"),At=!0;!(x<0&&!xe(!At));At=!1){var zt=ae.text.charAt(y.ch)||`
|
|
`,on=St(zt,qe)?"w":nt&&zt==`
|
|
`?"n":!nt||/\s/.test(zt)?null:"p";if(nt&&!At&&!on&&(on="s"),De&&De!=on){x<0&&(x=1,xe(),y.sticky="after");break}if(on&&(De=on),x>0&&!xe(!At))break}var mn=No(a,y,z,re,!0);return Gt(z,mn)&&(mn.hitSide=!0),mn}function Rs(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),se=Math.max(ae-.5*Mi(a.display),3);re=(x>0?y.bottom:y.top)+x*se}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var ce;ce=ci(a,z,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Or=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new he,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Or.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Is(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(ae){for(var se=ae.target;se;se=se.parentNode){if(se==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(se.className))break}return!1}be(E,"paste",function(ae){!z(ae)||pe(b,ae)||Ls(ae,b)||je<=11&&setTimeout(ai(b,function(){return y.updateFromDOM()}),20)}),be(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),be(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),be(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),be(E,"touchstart",function(){return x.forceCompositionEnd()}),be(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(ae){if(!(!z(ae)||pe(b,ae))){if(b.somethingSelected())zo({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var se=Ps(b);zo({lineWise:!0,text:se.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(se.ranges,0,Ne),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var ce=Yi.text.join(`
|
|
`);if(ae.clipboardData.setData("Text",ce),ae.clipboardData.getData("Text")==ce){ae.preventDefault();return}}var xe=Ns(),De=xe.firstChild;b.display.lineSpace.insertBefore(xe,b.display.lineSpace.firstChild),De.value=Yi.text.join(`
|
|
`);var nt=document.activeElement;wt(De),setTimeout(function(){b.display.lineSpace.removeChild(xe),nt.focus(),nt==E&&x.showPrimarySelection()},50)}}be(E,"copy",re),be(E,"cut",re)},Or.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Or.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Or.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Or.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Or.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var z=Zo(y,a.anchorNode,a.anchorOffset),re=Zo(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&xt(Ot(z,re),b)==0&&xt(fn(z,re),E)==0)){var ae=y.display.view,se=b.line>=y.display.viewFrom&&Os(y,b)||{node:ae[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Os(y,E);if(!ce){var xe=ae[ae.length-1].measure,De=xe.maps?xe.maps[xe.maps.length-1]:xe.map;ce={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!se||!ce){a.removeAllRanges();return}var nt=a.rangeCount&&a.getRangeAt(0),qe;try{qe=Fe(se.node,se.offset,ce.offset,ce.node)}catch(At){}qe&&(!oe&&y.state.focused?(a.collapse(se.node,se.offset),qe.collapsed||(a.removeAllRanges(),a.addRange(qe))):(a.removeAllRanges(),a.addRange(qe)),nt&&a.anchorNode==null?a.addRange(nt):oe&&this.startGracePeriod()),this.rememberSelection()}},Or.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Or.prototype.showMultipleSelections=function(a){Le(this.cm.display.cursorDiv,a.cursors),Le(this.cm.display.selectionDiv,a.selection)},Or.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Or.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return et(this.div,y)},Or.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Or.prototype.blur=function(){this.div.blur()},Or.prototype.getField=function(){return this.div},Or.prototype.supportsTouch=function(){return!0},Or.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Li(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},Or.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Or.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ie&&Se&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Zo(y,a.anchorNode,a.anchorOffset),b=Zo(y,a.focusNode,a.focusOffset);x&&b&&Li(y,function(){fi(y.doc,fa(x,b),Ne),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Or.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=Oe(b.line-1,it(a.doc,b.line-1).length)),E.ch==it(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Oe(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,ae;b.line==y.viewFrom||(z=wa(a,b.line))==0?(re=ke(y.view[0].line),ae=y.view[0].node):(re=ke(y.view[z].line),ae=y.view[z-1].node.nextSibling);var se=wa(a,E.line),ce,xe;if(se==y.view.length-1?(ce=y.viewTo-1,xe=y.lineDiv.lastChild):(ce=ke(y.view[se+1].line)-1,xe=y.view[se+1].node.previousSibling),!ae)return!1;for(var De=a.doc.splitLines(Yu(a,ae,xe,re,ce)),nt=Yt(a.doc,Oe(re,0),Oe(ce,it(a.doc,ce).text.length));De.length>1&&nt.length>1;)if(Ce(De)==Ce(nt))De.pop(),nt.pop(),ce--;else if(De[0]==nt[0])De.shift(),nt.shift(),re++;else break;for(var qe=0,At=0,zt=De[0],on=nt[0],mn=Math.min(zt.length,on.length);qe<mn&&zt.charCodeAt(qe)==on.charCodeAt(qe);)++qe;for(var Bn=Ce(De),gn=Ce(nt),Pn=Math.min(Bn.length-(De.length==1?qe:0),gn.length-(nt.length==1?qe:0));At<Pn&&Bn.charCodeAt(Bn.length-At-1)==gn.charCodeAt(gn.length-At-1);)++At;if(De.length==1&&nt.length==1&&re==b.line)for(;qe&&qe>b.ch&&Bn.charCodeAt(Bn.length-At-1)==gn.charCodeAt(gn.length-At-1);)qe--,At++;De[De.length-1]=Bn.slice(0,Bn.length-At).replace(/^\u200b+/,""),De[0]=De[0].slice(qe).replace(/\u200b+$/,"");var Qn=Oe(re,qe),Gn=Oe(ce,nt.length?Ce(nt).length-At:0);if(De.length>1||De[0]||xt(Qn,Gn))return _a(a.doc,De,Qn,Gn,"+input"),!0},Or.prototype.ensurePolled=function(){this.forceCompositionEnd()},Or.prototype.reset=function(){this.forceCompositionEnd()},Or.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Or.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Or.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Li(this.cm,function(){return wi(a.cm)})},Or.prototype.setUneditable=function(a){a.contentEditable="false"},Or.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||ai(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Or.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Or.prototype.onContextMenu=function(){},Or.prototype.resetPosition=function(){},Or.prototype.needsContentAttribute=!0;function Os(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=it(a.doc,y.line),E=Fa(x,b,y.line),z=ue(b,a.doc.direction),re="left";if(z){var ae=ee(z,y.ch);re=ae%2?"right":"left"}var se=Co(E.map,y.ch,re);return se.offset=se.collapse=="right"?se.end:se.start,se}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Ga(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,ae=a.doc.lineSeparator(),se=!1;function ce(qe){return function(At){return At.id==qe}}function xe(){re&&(z+=ae,se&&(z+=ae),re=se=!1)}function De(qe){qe&&(xe(),z+=qe)}function nt(qe){if(qe.nodeType==1){var At=qe.getAttribute("cm-text");if(At){De(At);return}var zt=qe.getAttribute("cm-marker"),on;if(zt){var mn=a.findMarks(Oe(b,0),Oe(E+1,0),ce(+zt));mn.length&&(on=mn[0].find(0))&&De(Yt(a.doc,on.from,on.to).join(ae));return}if(qe.getAttribute("contenteditable")=="false")return;var Bn=/^(pre|div|p|li|table|br)$/i.test(qe.nodeName);if(!/^br$/i.test(qe.nodeName)&&qe.textContent.length==0)return;Bn&&xe();for(var gn=0;gn<qe.childNodes.length;gn++)nt(qe.childNodes[gn]);/^(pre|p)$/i.test(qe.nodeName)&&(se=!0),Bn&&(re=!0)}else qe.nodeType==3&&De(qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;nt(y),y!=x;)y=y.nextSibling,se=!1;return z}function Zo(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return Ga(a.clipPos(Oe(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var z=a.display.view[E];if(z.node==b)return Xu(z,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!et(b,y))return Ga(Oe(ke(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var z=a.rest?Ce(a.rest):a.line;return Ga(Oe(ke(z),z.text.length),E)}var re=y.nodeType==3?y:null,ae=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var se=a.measure,ce=se.maps;function xe(on,mn,Bn){for(var gn=-1;gn<(ce?ce.length:0);gn++)for(var Pn=gn<0?se.map:ce[gn],Qn=0;Qn<Pn.length;Qn+=3){var Gn=Pn[Qn+2];if(Gn==on||Gn==mn){var ur=ke(gn<0?a.line:a.rest[gn]),Wr=Pn[Qn]+Bn;return(Bn<0||Gn!=on)&&(Wr=Pn[Qn+(Bn?1:0)]),Oe(ur,Wr)}}}var De=xe(re,ae,x);if(De)return Ga(De,E);for(var nt=ae.nextSibling,qe=re?re.nodeValue.length-x:0;nt;nt=nt.nextSibling){if(De=xe(nt,nt.firstChild,0),De)return Ga(Oe(De.line,De.ch-qe),E);qe+=nt.textContent.length}for(var At=ae.previousSibling,zt=x;At;At=At.previousSibling){if(De=xe(At,At.firstChild,-1),De)return Ga(Oe(De.line,De.ch+zt),E);zt+=At.textContent.length}}var Qr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new he,this.hasSelection=!1,this.composing=null};Qr.prototype.init=function(a){var y=this,x=this,b=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),Re&&(E.style.width="0px"),be(E,"input",function(){me&&je>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),be(E,"paste",function(re){pe(b,re)||Ls(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!pe(b,re)){if(b.somethingSelected())zo({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Ps(b);zo({lineWise:!0,text:ae.text}),re.type=="cut"?b.setSelections(ae.ranges,null,Ne):(x.prevInput="",E.value=ae.text.join(`
|
|
`),wt(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}be(E,"cut",z),be(E,"copy",z),be(a.scroller,"paste",function(re){if(!(ui(a,re)||pe(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=re.clipboardData,E.dispatchEvent(ae)}}),be(a.lineSpace,"selectstart",function(re){ui(a,re)||Dt(re)}),be(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),be(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Qr.prototype.createField=function(a){this.wrapper=Ns(),this.textarea=this.wrapper.firstChild},Qr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Qr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=xi(a,x.sel.primary().head,"div"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return b},Qr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Le(x.cursorDiv,a.cursors),Le(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Qr.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&wt(this.textarea),me&&je>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&je>=9&&(this.hasSelection=null))}},Qr.prototype.getField=function(){return this.textarea},Qr.prototype.supportsTouch=function(){return!1},Qr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!We||Ae()!=this.textarea))try{this.textarea.focus()}catch(a){}},Qr.prototype.blur=function(){this.textarea.blur()},Qr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qr.prototype.receivedFocus=function(){this.slowPoll()},Qr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Qr.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},Qr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Yn(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&je>=9&&this.hasSelection===E||Ee&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!b&&(b="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,ae=Math.min(b.length,E.length);re<ae&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Li(y,function(){gl(y,E.slice(re),b.length-re,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
|
|
`)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Qr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qr.prototype.onKeyPress=function(){me&&je>=9&&(this.hasSelection=null),this.fastPoll()},Qr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=xa(x,a),re=b.scroller.scrollTop;if(!z||de)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(z)==-1&&ai(x,fi)(x.doc,fa(z),Ne);var se=E.style.cssText,ce=y.wrapper.style.cssText,xe=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-xe.top-5)+"px; left: "+(a.clientX-xe.left-5)+`px;
|
|
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;He&&(De=window.scrollY),b.input.focus(),He&&window.scrollTo(null,De),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=qe,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function nt(){if(E.selectionStart!=null){var zt=x.somethingSelected(),on="\u200B"+(zt?E.value:"");E.value="\u21DA",E.value=on,y.prevInput=zt?"":"\u200B",E.selectionStart=1,E.selectionEnd=on.length,b.selForContextMenu=x.doc.sel}}function qe(){if(y.contextMenuPending==qe&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=se,me&&je<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&je<9)&&nt();var zt=0,on=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?ai(x,ts)(x):zt++<10?b.detectingSelectAll=setTimeout(on,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(on,200)}}if(me&&je>=9&&nt(),Ue){Xt(a);var At=function(){ye(window,"mouseup",At),setTimeout(qe,20)};be(window,"mouseup",At)}else setTimeout(qe,50)},Qr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Qr.prototype.setUneditable=function(){},Qr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?Ht(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var x=Ae();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(be(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){b(),z.submit=E,z.submit(),z.submit=re}}catch(se){}}y.finishInit=function(se){se.save=b,se.getTextArea=function(){return a},se.toTextArea=function(){se.toTextArea=isNaN,b(),a.parentNode.removeChild(se.getWrapperElement()),a.style.display="",a.form&&(ye(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=jr(function(se){return a.parentNode.insertBefore(se,a.nextSibling)},y);return ae}function Qu(a){a.off=ye,a.on=be,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=Hn,a.countColumn=ve,a.findColumn=rn,a.isWordChar=pt,a.Pass=Ft,a.signal=Pe,a.Line=Br,a.changeEnd=pa,a.scrollbarModel=Ll,a.Pos=Oe,a.cmpPos=xt,a.modes=Wn,a.mimeModes=Lt,a.resolveMode=En,a.getMode=xn,a.modeExtensions=Rn,a.extendMode=Zn,a.copyState=_n,a.startState=Jn,a.innerMode=Nn,a.commands=fo,a.keyMap=ia,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wa,a.normalizeKeyMap=Du,a.StringStream=Rt,a.SharedTextMarker=uo,a.TextMarker=ma,a.LineWidget=so,a.e_preventDefault=Dt,a.e_stopPropagation=jt,a.e_stop=Xt,a.addClass=Qe,a.contains=et,a.rmClass=Ye,a.keyNames=ga}Zu(jr),Uu(jr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Go in Si.prototype)Si.prototype.hasOwnProperty(Go)&&mt(qu,Go)<0&&(jr.prototype[Go]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Go]));return vt(Si),jr.inputStyles={textarea:Qr,contenteditable:Or},jr.defineMode=function(a){!jr.defaults.mode&&a!="null"&&(jr.defaults.mode=a),tn.apply(this,arguments)},jr.defineMIME=un,jr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),jr.defineMIME("text/plain","null"),jr.defineExtension=function(a,y){jr.prototype[a]=y},jr.defineDocExtension=function(a,y){Si.prototype[a]=y},jr.fromTextArea=Ju,Qu(jr),jr.version="5.58.2",jr})},25419:function(Zt,Ut,fe){(function(oe){oe(fe(89780),fe(15525),fe(98101))})(function(oe){"use strict";oe.defineMode("markdown",function(ht,Me){var Xe=oe.getMode(ht,"text/html"),me=Xe.name=="null";function je(ve){if(oe.findModeByName){var he=oe.findModeByName(ve);he&&(ve=he.mime||he.mimes[0])}var mt=oe.getMode(ht,ve);return mt.name=="null"?null:mt}Me.highlightFormatting===void 0&&(Me.highlightFormatting=!1),Me.maxBlockquoteDepth===void 0&&(Me.maxBlockquoteDepth=0),Me.taskLists===void 0&&(Me.taskLists=!1),Me.strikethrough===void 0&&(Me.strikethrough=!1),Me.emoji===void 0&&(Me.emoji=!1),Me.fencedCodeBlockHighlighting===void 0&&(Me.fencedCodeBlockHighlighting=!0),Me.fencedCodeBlockDefaultMode===void 0&&(Me.fencedCodeBlockDefaultMode="text/plain"),Me.xml===void 0&&(Me.xml=!0),Me.tokenTypeOverrides===void 0&&(Me.tokenTypeOverrides={});var He={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 Ke in He)He.hasOwnProperty(Ke)&&Me.tokenTypeOverrides[Ke]&&(He[Ke]=Me.tokenTypeOverrides[Ke]);var Se=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,we=/^\[(x| )\](?=\s)/i,ge=Me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,lt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Re=/^[^#!\[\]*_\\<>` "'(~:]+/,Ie=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,We=/^\s*\[[^\]]+?\]:.*$/,Ee=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,at=" ";function rt(ve,he,mt){return he.f=he.inline=mt,mt(ve,he)}function ct(ve,he,mt){return he.f=he.block=mt,mt(ve,he)}function Ge(ve){return!ve||!/\S/.test(ve.string)}function Ue(ve){if(ve.linkTitle=!1,ve.linkHref=!1,ve.linkText=!1,ve.em=!1,ve.strong=!1,ve.strikethrough=!1,ve.quote=0,ve.indentedCode=!1,ve.f==Ye){var he=me;if(!he){var mt=oe.innerMode(Xe,ve.htmlState);he=mt.mode.name=="xml"&&mt.state.tagStart===null&&!mt.state.context&&mt.state.tokenize.isInText}he&&(ve.f=Ct,ve.block=Je,ve.htmlState=null)}return ve.trailingSpace=0,ve.trailingSpaceNewLine=!1,ve.prevLine=ve.thisLine,ve.thisLine={stream:null},null}function Je(ve,he){var mt=ve.column()===he.indentation,Kt=Ge(he.prevLine.stream),Ft=he.indentedCode,Ne=he.prevLine.hr,ot=he.list!==!1,ft=(he.listStack[he.listStack.length-1]||0)+3;he.indentedCode=!1;var rn=he.indentation;if(he.indentationDiff===null&&(he.indentationDiff=he.indentation,ot)){for(he.list=null;rn<he.listStack[he.listStack.length-1];)he.listStack.pop(),he.listStack.length?he.indentation=he.listStack[he.listStack.length-1]:he.list=!1;he.list!==!1&&(he.indentationDiff=rn-he.listStack[he.listStack.length-1])}var kt=!Kt&&!Ne&&!he.prevLine.header&&(!ot||!Ft)&&!he.prevLine.fencedCodeEnd,_e=(he.list===!1||Ne||Kt)&&he.indentation<=ft&&ve.match(Se),Ce=null;if(he.indentationDiff>=4&&(Ft||he.prevLine.fencedCodeEnd||he.prevLine.header||Kt))return ve.skipToEnd(),he.indentedCode=!0,He.code;if(ve.eatSpace())return null;if(mt&&he.indentation<=ft&&(Ce=ve.match(ge))&&Ce[1].length<=6)return he.quote=0,he.header=Ce[1].length,he.thisLine.header=!0,Me.highlightFormatting&&(he.formatting="header"),he.f=he.inline,Le(he);if(he.indentation<=ft&&ve.eat(">"))return he.quote=mt?1:he.quote+1,Me.highlightFormatting&&(he.formatting="quote"),ve.eatSpace(),Le(he);if(!_e&&!he.setext&&mt&&he.indentation<=ft&&(Ce=ve.match(de))){var ze=Ce[1]?"ol":"ul";return he.indentation=rn+ve.current().length,he.list=!0,he.quote=0,he.listStack.push(he.indentation),he.em=!1,he.strong=!1,he.code=!1,he.strikethrough=!1,Me.taskLists&&ve.match(we,!1)&&(he.taskList=!0),he.f=he.inline,Me.highlightFormatting&&(he.formatting=["list","list-"+ze]),Le(he)}else{if(mt&&he.indentation<=ft&&(Ce=ve.match(Ie,!0)))return he.quote=0,he.fencedEndRE=new RegExp(Ce[1]+"+ *$"),he.localMode=Me.fencedCodeBlockHighlighting&&je(Ce[2]||Me.fencedCodeBlockDefaultMode),he.localMode&&(he.localState=oe.startState(he.localMode)),he.f=he.block=Tt,Me.highlightFormatting&&(he.formatting="code-block"),he.code=-1,Le(he);if(he.setext||(!kt||!ot)&&!he.quote&&he.list===!1&&!he.code&&!_e&&!We.test(ve.string)&&(Ce=ve.lookAhead(1))&&(Ce=Ce.match(lt)))return he.setext?(he.header=he.setext,he.setext=0,ve.skipToEnd(),Me.highlightFormatting&&(he.formatting="header")):(he.header=Ce[0].charAt(0)=="="?1:2,he.setext=he.header),he.thisLine.header=!0,he.f=he.inline,Le(he);if(_e)return ve.skipToEnd(),he.hr=!0,he.thisLine.hr=!0,He.hr;if(ve.peek()==="[")return rt(ve,he,Mt)}return rt(ve,he,he.inline)}function Ye(ve,he){var mt=Xe.token(ve,he.htmlState);if(!me){var Kt=oe.innerMode(Xe,he.htmlState);(Kt.mode.name=="xml"&&Kt.state.tagStart===null&&!Kt.state.context&&Kt.state.tokenize.isInText||he.md_inside&&ve.current().indexOf(">")>-1)&&(he.f=Ct,he.block=Je,he.htmlState=null)}return mt}function Tt(ve,he){var mt=he.listStack[he.listStack.length-1]||0,Kt=he.indentation<mt,Ft=mt+3;if(he.fencedEndRE&&he.indentation<=Ft&&(Kt||ve.match(he.fencedEndRE))){Me.highlightFormatting&&(he.formatting="code-block");var Ne;return Kt||(Ne=Le(he)),he.localMode=he.localState=null,he.block=Je,he.f=Ct,he.fencedEndRE=null,he.code=0,he.thisLine.fencedCodeEnd=!0,Kt?ct(ve,he,he.block):Ne}else return he.localMode?he.localMode.token(ve,he.localState):(ve.skipToEnd(),He.code)}function Le(ve){var he=[];if(ve.formatting){he.push(He.formatting),typeof ve.formatting=="string"&&(ve.formatting=[ve.formatting]);for(var mt=0;mt<ve.formatting.length;mt++)he.push(He.formatting+"-"+ve.formatting[mt]),ve.formatting[mt]==="header"&&he.push(He.formatting+"-"+ve.formatting[mt]+"-"+ve.header),ve.formatting[mt]==="quote"&&(!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=ve.quote?he.push(He.formatting+"-"+ve.formatting[mt]+"-"+ve.quote):he.push("error"))}if(ve.taskOpen)return he.push("meta"),he.length?he.join(" "):null;if(ve.taskClosed)return he.push("property"),he.length?he.join(" "):null;if(ve.linkHref?he.push(He.linkHref,"url"):(ve.strong&&he.push(He.strong),ve.em&&he.push(He.em),ve.strikethrough&&he.push(He.strikethrough),ve.emoji&&he.push(He.emoji),ve.linkText&&he.push(He.linkText),ve.code&&he.push(He.code),ve.image&&he.push(He.image),ve.imageAltText&&he.push(He.imageAltText,"link"),ve.imageMarker&&he.push(He.imageMarker)),ve.header&&he.push(He.header,He.header+"-"+ve.header),ve.quote&&(he.push(He.quote),!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=ve.quote?he.push(He.quote+"-"+ve.quote):he.push(He.quote+"-"+Me.maxBlockquoteDepth)),ve.list!==!1){var Kt=(ve.listStack.length-1)%3;Kt?Kt===1?he.push(He.list2):he.push(He.list3):he.push(He.list1)}return ve.trailingSpaceNewLine?he.push("trailing-space-new-line"):ve.trailingSpace&&he.push("trailing-space-"+(ve.trailingSpace%2?"a":"b")),he.length?he.join(" "):null}function Ze(ve,he){if(ve.match(Re,!0))return Le(he)}function Ct(ve,he){var mt=he.text(ve,he);if(typeof mt!="undefined")return mt;if(he.list)return he.list=null,Le(he);if(he.taskList){var Kt=ve.match(we,!0)[1]===" ";return Kt?he.taskOpen=!0:he.taskClosed=!0,Me.highlightFormatting&&(he.formatting="task"),he.taskList=!1,Le(he)}if(he.taskOpen=!1,he.taskClosed=!1,he.header&&ve.match(/^#+$/,!0))return Me.highlightFormatting&&(he.formatting="header"),Le(he);var Ft=ve.next();if(he.linkTitle){he.linkTitle=!1;var Ne=Ft;Ft==="("&&(Ne=")"),Ne=(Ne+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ot="^\\s*(?:[^"+Ne+"\\\\]+|\\\\\\\\|\\\\.)"+Ne;if(ve.match(new RegExp(ot),!0))return He.linkHref}if(Ft==="`"){var ft=he.formatting;Me.highlightFormatting&&(he.formatting="code"),ve.eatWhile("`");var rn=ve.current().length;if(he.code==0&&(!he.quote||rn==1))return he.code=rn,Le(he);if(rn==he.code){var kt=Le(he);return he.code=0,kt}else return he.formatting=ft,Le(he)}else if(he.code)return Le(he);if(Ft==="\\"&&(ve.next(),Me.highlightFormatting)){var _e=Le(he),Ce=He.formatting+"-escape";return _e?_e+" "+Ce:Ce}if(Ft==="!"&&ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return he.imageMarker=!0,he.image=!0,Me.highlightFormatting&&(he.formatting="image"),Le(he);if(Ft==="["&&he.imageMarker&&ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return he.imageMarker=!1,he.imageAltText=!0,Me.highlightFormatting&&(he.formatting="image"),Le(he);if(Ft==="]"&&he.imageAltText){Me.highlightFormatting&&(he.formatting="image");var _e=Le(he);return he.imageAltText=!1,he.image=!1,he.inline=he.f=et,_e}if(Ft==="["&&!he.image)return he.linkText&&ve.match(/^.*?\]/)||(he.linkText=!0,Me.highlightFormatting&&(he.formatting="link")),Le(he);if(Ft==="]"&&he.linkText){Me.highlightFormatting&&(he.formatting="link");var _e=Le(he);return he.linkText=!1,he.inline=he.f=ve.match(/\(.*?\)| ?\[.*?\]/,!1)?et:Ct,_e}if(Ft==="<"&&ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Fe,Me.highlightFormatting&&(he.formatting="link");var _e=Le(he);return _e?_e+=" ":_e="",_e+He.linkInline}if(Ft==="<"&&ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){he.f=he.inline=Fe,Me.highlightFormatting&&(he.formatting="link");var _e=Le(he);return _e?_e+=" ":_e="",_e+He.linkEmail}if(Me.xml&&Ft==="<"&&ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ze=ve.string.indexOf(">",ve.pos);if(ze!=-1){var st=ve.string.substring(ve.start,ze);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(st)&&(he.md_inside=!0)}return ve.backUp(1),he.htmlState=oe.startState(Xe),ct(ve,he,Ye)}if(Me.xml&&Ft==="<"&&ve.match(/^\/\w*?>/))return he.md_inside=!1,"tag";if(Ft==="*"||Ft==="_"){for(var Te=1,Ve=ve.pos==1?" ":ve.string.charAt(ve.pos-2);Te<3&&ve.eat(Ft);)Te++;var $e=ve.peek()||" ",pt=!/\s/.test($e)&&(!Ee.test($e)||/\s/.test(Ve)||Ee.test(Ve)),St=!/\s/.test(Ve)&&(!Ee.test(Ve)||/\s/.test($e)||Ee.test($e)),Et=null,Bt=null;if(Te%2&&(!he.em&&pt&&(Ft==="*"||!St||Ee.test(Ve))?Et=!0:he.em==Ft&&St&&(Ft==="*"||!pt||Ee.test($e))&&(Et=!1)),Te>1&&(!he.strong&&pt&&(Ft==="*"||!St||Ee.test(Ve))?Bt=!0:he.strong==Ft&&St&&(Ft==="*"||!pt||Ee.test($e))&&(Bt=!1)),Bt!=null||Et!=null){Me.highlightFormatting&&(he.formatting=Et==null?"strong":Bt==null?"em":"strong em"),Et===!0&&(he.em=Ft),Bt===!0&&(he.strong=Ft);var kt=Le(he);return Et===!1&&(he.em=!1),Bt===!1&&(he.strong=!1),kt}}else if(Ft===" "&&(ve.eat("*")||ve.eat("_"))){if(ve.peek()===" ")return Le(he);ve.backUp(1)}if(Me.strikethrough){if(Ft==="~"&&ve.eatWhile(Ft)){if(he.strikethrough){Me.highlightFormatting&&(he.formatting="strikethrough");var kt=Le(he);return he.strikethrough=!1,kt}else if(ve.match(/^[^\s]/,!1))return he.strikethrough=!0,Me.highlightFormatting&&(he.formatting="strikethrough"),Le(he)}else if(Ft===" "&&ve.match(/^~~/,!0)){if(ve.peek()===" ")return Le(he);ve.backUp(2)}}if(Me.emoji&&Ft===":"&&ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){he.emoji=!0,Me.highlightFormatting&&(he.formatting="emoji");var Nt=Le(he);return he.emoji=!1,Nt}return Ft===" "&&(ve.match(/^ +$/,!1)?he.trailingSpace++:he.trailingSpace&&(he.trailingSpaceNewLine=!0)),Le(he)}function Fe(ve,he){var mt=ve.next();if(mt===">"){he.f=he.inline=Ct,Me.highlightFormatting&&(he.formatting="link");var Kt=Le(he);return Kt?Kt+=" ":Kt="",Kt+He.linkInline}return ve.match(/^[^>]+/,!0),He.linkInline}function et(ve,he){if(ve.eatSpace())return null;var mt=ve.next();return mt==="("||mt==="["?(he.f=he.inline=Qe(mt==="("?")":"]"),Me.highlightFormatting&&(he.formatting="link-string"),he.linkHref=!0,Le(he)):"error"}var Ae={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Qe(ve){return function(he,mt){var Kt=he.next();if(Kt===ve){mt.f=mt.inline=Ct,Me.highlightFormatting&&(mt.formatting="link-string");var Ft=Le(mt);return mt.linkHref=!1,Ft}return he.match(Ae[ve]),mt.linkHref=!0,Le(mt)}}function Mt(ve,he){return ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(he.f=wt,ve.next(),Me.highlightFormatting&&(he.formatting="link"),he.linkText=!0,Le(he)):rt(ve,he,Ct)}function wt(ve,he){if(ve.match(/^\]:/,!0)){he.f=he.inline=$t,Me.highlightFormatting&&(he.formatting="link");var mt=Le(he);return he.linkText=!1,mt}return ve.match(/^([^\]\\]|\\.)+/,!0),He.linkText}function $t(ve,he){return ve.eatSpace()?null:(ve.match(/^[^\s]+/,!0),ve.peek()===void 0?he.linkTitle=!0:ve.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),he.f=he.inline=Ct,He.linkHref+" url")}var Ht={startState:function(){return{f:Je,prevLine:{stream:null},thisLine:{stream:null},block:Je,htmlState:null,indentation:0,inline:Ct,text:Ze,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(ve){return{f:ve.f,prevLine:ve.prevLine,thisLine:ve.thisLine,block:ve.block,htmlState:ve.htmlState&&oe.copyState(Xe,ve.htmlState),indentation:ve.indentation,localMode:ve.localMode,localState:ve.localMode?oe.copyState(ve.localMode,ve.localState):null,inline:ve.inline,text:ve.text,formatting:!1,linkText:ve.linkText,linkTitle:ve.linkTitle,linkHref:ve.linkHref,code:ve.code,em:ve.em,strong:ve.strong,strikethrough:ve.strikethrough,emoji:ve.emoji,header:ve.header,setext:ve.setext,hr:ve.hr,taskList:ve.taskList,list:ve.list,listStack:ve.listStack.slice(0),quote:ve.quote,indentedCode:ve.indentedCode,trailingSpace:ve.trailingSpace,trailingSpaceNewLine:ve.trailingSpaceNewLine,md_inside:ve.md_inside,fencedEndRE:ve.fencedEndRE}},token:function(ve,he){if(he.formatting=!1,ve!=he.thisLine.stream){if(he.header=0,he.hr=!1,ve.match(/^\s*$/,!0))return Ue(he),null;if(he.prevLine=he.thisLine,he.thisLine={stream:ve},he.taskList=!1,he.trailingSpace=0,he.trailingSpaceNewLine=!1,!he.localState&&(he.f=he.block,he.f!=Ye)){var mt=ve.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(he.indentation=mt,he.indentationDiff=null,mt>0)return null}}return he.f(ve,he)},innerMode:function(ve){return ve.block==Ye?{state:ve.htmlState,mode:Xe}:ve.localState?{state:ve.localState,mode:ve.localMode}:{state:ve,mode:Ht}},indent:function(ve,he,mt){return ve.block==Ye&&Xe.indent?Xe.indent(ve.htmlState,he,mt):ve.localState&&ve.localMode.indent?ve.localMode.indent(ve.localState,he,mt):oe.Pass},blankLine:Ue,getType:Le,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ht},"xml"),oe.defineMIME("text/markdown","markdown"),oe.defineMIME("text/x-markdown","markdown")})},98101:function(Zt,Ut,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";oe.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 ht=0;ht<oe.modeInfo.length;ht++){var Me=oe.modeInfo[ht];Me.mimes&&(Me.mime=Me.mimes[0])}oe.findModeByMIME=function(Xe){Xe=Xe.toLowerCase();for(var me=0;me<oe.modeInfo.length;me++){var je=oe.modeInfo[me];if(je.mime==Xe)return je;if(je.mimes){for(var He=0;He<je.mimes.length;He++)if(je.mimes[He]==Xe)return je}}if(/\+xml$/.test(Xe))return oe.findModeByMIME("application/xml");if(/\+json$/.test(Xe))return oe.findModeByMIME("application/json")},oe.findModeByExtension=function(Xe){Xe=Xe.toLowerCase();for(var me=0;me<oe.modeInfo.length;me++){var je=oe.modeInfo[me];if(je.ext){for(var He=0;He<je.ext.length;He++)if(je.ext[He]==Xe)return je}}},oe.findModeByFileName=function(Xe){for(var me=0;me<oe.modeInfo.length;me++){var je=oe.modeInfo[me];if(je.file&&je.file.test(Xe))return je}var He=Xe.lastIndexOf("."),Ke=He>-1&&Xe.substring(He+1,Xe.length);if(Ke)return oe.findModeByExtension(Ke)},oe.findModeByName=function(Xe){Xe=Xe.toLowerCase();for(var me=0;me<oe.modeInfo.length;me++){var je=oe.modeInfo[me];if(je.name.toLowerCase()==Xe)return je;if(je.alias){for(var He=0;He<je.alias.length;He++)if(je.alias[He].toLowerCase()==Xe)return je}}}})},67549:function(Zt,Ut,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";oe.defineMode("stex",function(ht,Me){"use strict";function Xe(Re,Ie){Re.cmdState.push(Ie)}function me(Re){return Re.cmdState.length>0?Re.cmdState[Re.cmdState.length-1]:null}function je(Re){var Ie=Re.cmdState.pop();Ie&&Ie.closeBracket()}function He(Re){for(var Ie=Re.cmdState,We=Ie.length-1;We>=0;We--){var Ee=Ie[We];if(Ee.name!="DEFAULT")return Ee}return{styleIdentifier:function(){return null}}}function Ke(Re,Ie,We){return function(){this.name=Re,this.bracketNo=0,this.style=Ie,this.styles=We,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Se={};Se.importmodule=Ke("importmodule","tag",["string","builtin"]),Se.documentclass=Ke("documentclass","tag",["","atom"]),Se.usepackage=Ke("usepackage","tag",["atom"]),Se.begin=Ke("begin","tag",["atom"]),Se.end=Ke("end","tag",["atom"]),Se.label=Ke("label","tag",["atom"]),Se.ref=Ke("ref","tag",["atom"]),Se.eqref=Ke("eqref","tag",["atom"]),Se.cite=Ke("cite","tag",["atom"]),Se.bibitem=Ke("bibitem","tag",["atom"]),Se.Bibitem=Ke("Bibitem","tag",["atom"]),Se.RBibitem=Ke("RBibitem","tag",["atom"]),Se.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(Re,Ie){Re.f=Ie}function we(Re,Ie){var We;if(Re.match(/^\\[a-zA-Z@]+/)){var Ee=Re.current().slice(1);return We=Se.hasOwnProperty(Ee)?Se[Ee]:Se.DEFAULT,We=new We,Xe(Ie,We),de(Ie,lt),We.style}if(Re.match(/^\\[$&%#{}_]/)||Re.match(/^\\[,;!\/\\]/))return"tag";if(Re.match("\\["))return de(Ie,function(rt,ct){return ge(rt,ct,"\\]")}),"keyword";if(Re.match("\\("))return de(Ie,function(rt,ct){return ge(rt,ct,"\\)")}),"keyword";if(Re.match("$$"))return de(Ie,function(rt,ct){return ge(rt,ct,"$$")}),"keyword";if(Re.match("$"))return de(Ie,function(rt,ct){return ge(rt,ct,"$")}),"keyword";var at=Re.next();if(at=="%")return Re.skipToEnd(),"comment";if(at=="}"||at=="]"){if(We=me(Ie),We)We.closeBracket(at),de(Ie,lt);else return"error";return"bracket"}else return at=="{"||at=="["?(We=Se.DEFAULT,We=new We,Xe(Ie,We),"bracket"):/\d/.test(at)?(Re.eatWhile(/[\w.%]/),"atom"):(Re.eatWhile(/[\w\-_]/),We=He(Ie),We.name=="begin"&&(We.argument=Re.current()),We.styleIdentifier())}function ge(Re,Ie,We){if(Re.eatSpace())return null;if(We&&Re.match(We))return de(Ie,we),"keyword";if(Re.match(/^\\[a-zA-Z@]+/))return"tag";if(Re.match(/^[a-zA-Z]+/))return"variable-2";if(Re.match(/^\\[$&%#{}_]/)||Re.match(/^\\[,;!\/]/)||Re.match(/^[\^_&]/))return"tag";if(Re.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Re.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ee=Re.next();return Ee=="{"||Ee=="}"||Ee=="["||Ee=="]"||Ee=="("||Ee==")"?"bracket":Ee=="%"?(Re.skipToEnd(),"comment"):"error"}function lt(Re,Ie){var We=Re.peek(),Ee;return We=="{"||We=="["?(Ee=me(Ie),Ee.openBracket(We),Re.eat(We),de(Ie,we),"bracket"):/[ \t\r]/.test(We)?(Re.eat(We),null):(de(Ie,we),je(Ie),we(Re,Ie))}return{startState:function(){var Re=Me.inMathMode?function(Ie,We){return ge(Ie,We)}:we;return{cmdState:[],f:Re}},copyState:function(Re){return{cmdState:Re.cmdState.slice(),f:Re.f}},token:function(Re,Ie){return Ie.f(Re,Ie)},blankLine:function(Re){Re.f=we,Re.cmdState.length=0},lineComment:"%"}}),oe.defineMIME("text/x-stex","stex"),oe.defineMIME("text/x-latex","stex")})},15525:function(Zt,Ut,fe){(function(oe){oe(fe(89780))})(function(oe){"use strict";var ht={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},Me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};oe.defineMode("xml",function(Xe,me){var je=Xe.indentUnit,He={},Ke=me.htmlMode?ht:Me;for(var Se in Ke)He[Se]=Ke[Se];for(var Se in me)He[Se]=me[Se];var de,we;function ge(Fe,et){function Ae(wt){return et.tokenize=wt,wt(Fe,et)}var Qe=Fe.next();if(Qe=="<")return Fe.eat("!")?Fe.eat("[")?Fe.match("CDATA[")?Ae(Ie("atom","]]>")):null:Fe.match("--")?Ae(Ie("comment","-->")):Fe.match("DOCTYPE",!0,!0)?(Fe.eatWhile(/[\w\._\-]/),Ae(We(1))):null:Fe.eat("?")?(Fe.eatWhile(/[\w\._\-]/),et.tokenize=Ie("meta","?>"),"meta"):(de=Fe.eat("/")?"closeTag":"openTag",et.tokenize=lt,"tag bracket");if(Qe=="&"){var Mt;return Fe.eat("#")?Fe.eat("x")?Mt=Fe.eatWhile(/[a-fA-F\d]/)&&Fe.eat(";"):Mt=Fe.eatWhile(/[\d]/)&&Fe.eat(";"):Mt=Fe.eatWhile(/[\w\.\-:]/)&&Fe.eat(";"),Mt?"atom":"error"}else return Fe.eatWhile(/[^&<]/),null}ge.isInText=!0;function lt(Fe,et){var Ae=Fe.next();if(Ae==">"||Ae=="/"&&Fe.eat(">"))return et.tokenize=ge,de=Ae==">"?"endTag":"selfcloseTag","tag bracket";if(Ae=="=")return de="equals",null;if(Ae=="<"){et.tokenize=ge,et.state=ct,et.tagName=et.tagStart=null;var Qe=et.tokenize(Fe,et);return Qe?Qe+" tag error":"tag error"}else return/[\'\"]/.test(Ae)?(et.tokenize=Re(Ae),et.stringStartCol=Fe.column(),et.tokenize(Fe,et)):(Fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Re(Fe){var et=function(Ae,Qe){for(;!Ae.eol();)if(Ae.next()==Fe){Qe.tokenize=lt;break}return"string"};return et.isInAttribute=!0,et}function Ie(Fe,et){return function(Ae,Qe){for(;!Ae.eol();){if(Ae.match(et)){Qe.tokenize=ge;break}Ae.next()}return Fe}}function We(Fe){return function(et,Ae){for(var Qe;(Qe=et.next())!=null;){if(Qe=="<")return Ae.tokenize=We(Fe+1),Ae.tokenize(et,Ae);if(Qe==">")if(Fe==1){Ae.tokenize=ge;break}else return Ae.tokenize=We(Fe-1),Ae.tokenize(et,Ae)}return"meta"}}function Ee(Fe,et,Ae){this.prev=Fe.context,this.tagName=et,this.indent=Fe.indented,this.startOfLine=Ae,(He.doNotIndent.hasOwnProperty(et)||Fe.context&&Fe.context.noIndent)&&(this.noIndent=!0)}function at(Fe){Fe.context&&(Fe.context=Fe.context.prev)}function rt(Fe,et){for(var Ae;;){if(!Fe.context||(Ae=Fe.context.tagName,!He.contextGrabbers.hasOwnProperty(Ae)||!He.contextGrabbers[Ae].hasOwnProperty(et)))return;at(Fe)}}function ct(Fe,et,Ae){return Fe=="openTag"?(Ae.tagStart=et.column(),Ge):Fe=="closeTag"?Ue:ct}function Ge(Fe,et,Ae){return Fe=="word"?(Ae.tagName=et.current(),we="tag",Tt):He.allowMissingTagName&&Fe=="endTag"?(we="tag bracket",Tt(Fe,et,Ae)):(we="error",Ge)}function Ue(Fe,et,Ae){if(Fe=="word"){var Qe=et.current();return Ae.context&&Ae.context.tagName!=Qe&&He.implicitlyClosed.hasOwnProperty(Ae.context.tagName)&&at(Ae),Ae.context&&Ae.context.tagName==Qe||He.matchClosing===!1?(we="tag",Je):(we="tag error",Ye)}else return He.allowMissingTagName&&Fe=="endTag"?(we="tag bracket",Je(Fe,et,Ae)):(we="error",Ye)}function Je(Fe,et,Ae){return Fe!="endTag"?(we="error",Je):(at(Ae),ct)}function Ye(Fe,et,Ae){return we="error",Je(Fe,et,Ae)}function Tt(Fe,et,Ae){if(Fe=="word")return we="attribute",Le;if(Fe=="endTag"||Fe=="selfcloseTag"){var Qe=Ae.tagName,Mt=Ae.tagStart;return Ae.tagName=Ae.tagStart=null,Fe=="selfcloseTag"||He.autoSelfClosers.hasOwnProperty(Qe)?rt(Ae,Qe):(rt(Ae,Qe),Ae.context=new Ee(Ae,Qe,Mt==Ae.indented)),ct}return we="error",Tt}function Le(Fe,et,Ae){return Fe=="equals"?Ze:(He.allowMissing||(we="error"),Tt(Fe,et,Ae))}function Ze(Fe,et,Ae){return Fe=="string"?Ct:Fe=="word"&&He.allowUnquoted?(we="string",Tt):(we="error",Tt(Fe,et,Ae))}function Ct(Fe,et,Ae){return Fe=="string"?Ct:Tt(Fe,et,Ae)}return{startState:function(Fe){var et={tokenize:ge,state:ct,indented:Fe||0,tagName:null,tagStart:null,context:null};return Fe!=null&&(et.baseIndent=Fe),et},token:function(Fe,et){if(!et.tagName&&Fe.sol()&&(et.indented=Fe.indentation()),Fe.eatSpace())return null;de=null;var Ae=et.tokenize(Fe,et);return(Ae||de)&&Ae!="comment"&&(we=null,et.state=et.state(de||Ae,Fe,et),we&&(Ae=we=="error"?Ae+" error":we)),Ae},indent:function(Fe,et,Ae){var Qe=Fe.context;if(Fe.tokenize.isInAttribute)return Fe.tagStart==Fe.indented?Fe.stringStartCol+1:Fe.indented+je;if(Qe&&Qe.noIndent)return oe.Pass;if(Fe.tokenize!=lt&&Fe.tokenize!=ge)return Ae?Ae.match(/^(\s*)/)[0].length:0;if(Fe.tagName)return He.multilineTagIndentPastTag!==!1?Fe.tagStart+Fe.tagName.length+2:Fe.tagStart+je*(He.multilineTagIndentFactor||1);if(He.alignCDATA&&/<!\[CDATA\[/.test(et))return 0;var Mt=et&&/^<(\/)?([\w_:\.-]*)/.exec(et);if(Mt&&Mt[1])for(;Qe;)if(Qe.tagName==Mt[2]){Qe=Qe.prev;break}else if(He.implicitlyClosed.hasOwnProperty(Qe.tagName))Qe=Qe.prev;else break;else if(Mt)for(;Qe;){var wt=He.contextGrabbers[Qe.tagName];if(wt&&wt.hasOwnProperty(Mt[2]))Qe=Qe.prev;else break}for(;Qe&&Qe.prev&&!Qe.startOfLine;)Qe=Qe.prev;return Qe?Qe.indent+je:Fe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:He.htmlMode?"html":"xml",helperType:He.htmlMode?"html":"xml",skipAttribute:function(Fe){Fe.state==Ze&&(Fe.state=Tt)},xmlCurrentTag:function(Fe){return Fe.tagName?{name:Fe.tagName,close:Fe.type=="closeTag"}:null},xmlCurrentContext:function(Fe){for(var et=[],Ae=Fe.context;Ae;Ae=Ae.prev)Ae.tagName&&et.push(Ae.tagName);return et.reverse()}}}),oe.defineMIME("text/xml","xml"),oe.defineMIME("application/xml","xml"),oe.mimeModes.hasOwnProperty("text/html")||oe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},63727:function(Zt,Ut,fe){"use strict";fe.d(Ut,{s:function(){return le},default:function(){return gt}});var oe=fe(54476),ht=fe(33885),Me=fe(94480),Xe=fe(42978),me=fe(75931),je=fe(37463),He=fe(6551),Ke=fe(6089),Se=fe(18929),de=fe(59301),we=de.createContext({}),ge=we,lt=fe(76190),Re=fe(20068),Ie="__rc_cascader_search_mark__",We=function(Pe,pe,ut){var dt=ut.label,vt=dt===void 0?"":dt;return pe.some(function(Dt){return String(Dt[vt]).toLowerCase().includes(Pe.toLowerCase())})},Ee=function(Pe,pe,ut,dt){return pe.map(function(vt){return vt[dt.label]}).join(" / ")},at=function(Pe,pe,ut,dt,vt,Dt){var jt=vt.filter,It=jt===void 0?We:jt,Xt=vt.render,Fn=Xt===void 0?Ee:Xt,Sn=vt.limit,Ln=Sn===void 0?50:Sn,Tn=vt.sort;return de.useMemo(function(){var In=[];if(!Pe)return[];function Dn(Cn,Hn){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Cn.forEach(function(yn){if(!(!Tn&&Ln!==!1&&Ln>0&&In.length>=Ln)){var On=[].concat((0,Me.Z)(Hn),[yn]),zn=yn[ut.children],Wn=Yn||yn.disabled;if((!zn||zn.length===0||Dt)&&It(Pe,On,{label:ut.label})){var Lt;In.push((0,ht.Z)((0,ht.Z)({},yn),{},(Lt={disabled:Wn},(0,Re.Z)(Lt,ut.label,Fn(Pe,On,dt,ut)),(0,Re.Z)(Lt,Ie,On),(0,Re.Z)(Lt,ut.children,void 0),Lt)))}zn&&Dn(yn[ut.children],On,Wn)}})}return Dn(pe,[]),Tn&&In.sort(function(Cn,Hn){return Tn(Cn[Ie],Hn[Ie],Pe,ut)}),Ln!==!1&&Ln>0?In.slice(0,Ln):In},[Pe,pe,ut,dt,Fn,Dt,It,Tn,Ln])},rt=at,ct="__RC_CASCADER_SPLIT__",Ge="SHOW_PARENT",Ue="SHOW_CHILD";function Je(ye){return ye.join(ct)}function Ye(ye){return ye.map(Je)}function Tt(ye){return ye.split(ct)}function Le(ye){var Pe=ye||{},pe=Pe.label,ut=Pe.value,dt=Pe.children,vt=ut||"value";return{label:pe||"label",value:vt,key:vt,children:dt||"children"}}function Ze(ye,Pe){var pe,ut;return(pe=ye.isLeaf)!==null&&pe!==void 0?pe:!((ut=ye[Pe.children])!==null&&ut!==void 0&&ut.length)}function Ct(ye){var Pe=ye.parentElement;if(Pe){var pe=ye.offsetTop-Pe.offsetTop;pe-Pe.scrollTop<0?Pe.scrollTo({top:pe}):pe+ye.offsetHeight-Pe.scrollTop>Pe.offsetHeight&&Pe.scrollTo({top:pe+ye.offsetHeight-Pe.offsetHeight})}}function Fe(ye,Pe){return ye.map(function(pe){var ut;return(ut=pe[Ie])===null||ut===void 0?void 0:ut.map(function(dt){return dt[Pe.value]})})}function et(ye){return Array.isArray(ye)&&Array.isArray(ye[0])}function Ae(ye){return ye?et(ye)?ye:(ye.length===0?[]:[ye]).map(function(Pe){return Array.isArray(Pe)?Pe:[Pe]}):[]}function Qe(ye,Pe,pe){var ut=new Set(ye),dt=Pe();return ye.filter(function(vt){var Dt=dt[vt],jt=Dt?Dt.parent:null,It=Dt?Dt.children:null;return Dt&&Dt.node.disabled?!0:pe===Ue?!(It&&It.some(function(Xt){return Xt.key&&ut.has(Xt.key)})):!(jt&&!jt.node.disabled&&ut.has(jt.key))})}function Mt(ye,Pe,pe){for(var ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,dt=Pe,vt=[],Dt=function(){var Xt,Fn,Sn,Ln=ye[jt],Tn=(Xt=dt)===null||Xt===void 0?void 0:Xt.findIndex(function(Dn){var Cn=Dn[pe.value];return ut?String(Cn)===String(Ln):Cn===Ln}),In=Tn!==-1?(Fn=dt)===null||Fn===void 0?void 0:Fn[Tn]:null;vt.push({value:(Sn=In==null?void 0:In[pe.value])!==null&&Sn!==void 0?Sn:Ln,index:Tn,option:In}),dt=In==null?void 0:In[pe.children]},jt=0;jt<ye.length;jt+=1)Dt();return vt}var wt=function(ye,Pe,pe,ut,dt){return de.useMemo(function(){var vt=dt||function(Dt){var jt=ut?Dt.slice(-1):Dt,It=" / ";return jt.every(function(Xt){return["string","number"].includes((0,lt.Z)(Xt))})?jt.join(It):jt.reduce(function(Xt,Fn,Sn){var Ln=de.isValidElement(Fn)?de.cloneElement(Fn,{key:Sn}):Fn;return Sn===0?[Ln]:[].concat((0,Me.Z)(Xt),[It,Ln])},[])};return ye.map(function(Dt){var jt,It=Mt(Dt,Pe,pe),Xt=vt(It.map(function(Sn){var Ln,Tn=Sn.option,In=Sn.value;return(Ln=Tn==null?void 0:Tn[pe.label])!==null&&Ln!==void 0?Ln:In}),It.map(function(Sn){var Ln=Sn.option;return Ln})),Fn=Je(Dt);return{label:Xt,value:Fn,key:Fn,valueCells:Dt,disabled:(jt=It[It.length-1])===null||jt===void 0||(jt=jt.option)===null||jt===void 0?void 0:jt.disabled}})},[ye,Pe,pe,dt,ut])};function $t(ye,Pe){return de.useCallback(function(pe){var ut=[],dt=[];return pe.forEach(function(vt){var Dt=Mt(vt,ye,Pe);Dt.every(function(jt){return jt.option})?dt.push(vt):ut.push(vt)}),[dt,ut]},[ye,Pe])}var Ht=fe(34061),ve=function(ye,Pe){var pe=de.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),ut=de.useCallback(function(){return pe.current.options!==ye&&(pe.current.options=ye,pe.current.info=(0,Ht.I8)(ye,{fieldNames:Pe,initWrapper:function(vt){return(0,ht.Z)((0,ht.Z)({},vt),{},{pathKeyEntities:{}})},processEntity:function(vt,Dt){var jt=vt.nodes.map(function(It){return It[Pe.value]}).join(ct);Dt.pathKeyEntities[jt]=vt,vt.key=jt}})),pe.current.info.pathKeyEntities},[Pe,ye]);return ut};function he(ye,Pe){var pe=de.useMemo(function(){return Pe||[]},[Pe]),ut=ve(pe,ye),dt=de.useCallback(function(vt){var Dt=ut();return vt.map(function(jt){var It=Dt[jt].nodes;return It.map(function(Xt){return Xt[ye.value]})})},[ut,ye]);return[pe,ut,dt]}var mt=fe(48736);function Kt(ye){return de.useMemo(function(){if(!ye)return[!1,{}];var Pe={matchInputWidth:!0,limit:50};return ye&&(0,lt.Z)(ye)==="object"&&(Pe=(0,ht.Z)((0,ht.Z)({},Pe),ye)),Pe.limit<=0&&(Pe.limit=!1),[!0,Pe]},[ye])}var Ft=fe(34643);function Ne(ye,Pe,pe,ut,dt,vt,Dt,jt){return function(It){if(!ye)Pe(It);else{var Xt=Je(It),Fn=Ye(pe),Sn=Ye(ut),Ln=Fn.includes(Xt),Tn=dt.some(function(Wn){return Je(Wn)===Xt}),In=pe,Dn=dt;if(Tn&&!Ln)Dn=dt.filter(function(Wn){return Je(Wn)!==Xt});else{var Cn=Ln?Fn.filter(function(Wn){return Wn!==Xt}):[].concat((0,Me.Z)(Fn),[Xt]),Hn=vt(),Yn;if(Ln){var yn=(0,Ft.S)(Cn,{checked:!1,halfCheckedKeys:Sn},Hn);Yn=yn.checkedKeys}else{var On=(0,Ft.S)(Cn,!0,Hn);Yn=On.checkedKeys}var zn=Qe(Yn,vt,jt);In=Dt(zn)}Pe([].concat((0,Me.Z)(Dn),(0,Me.Z)(In)))}}}function ot(ye,Pe,pe,ut,dt){return de.useMemo(function(){var vt=dt(Pe),Dt=(0,Xe.Z)(vt,2),jt=Dt[0],It=Dt[1];if(!ye||!Pe.length)return[jt,[],It];var Xt=Ye(jt),Fn=pe(),Sn=(0,Ft.S)(Xt,!0,Fn),Ln=Sn.checkedKeys,Tn=Sn.halfCheckedKeys;return[ut(Ln),ut(Tn),It]},[ye,Pe,pe,ut,dt])}var ft=fe(92310),rn=fe.n(ft),kt=de.memo(function(ye){var Pe=ye.children;return Pe},function(ye,Pe){return!Pe.open}),_e=kt;function Ce(ye){var Pe,pe=ye.prefixCls,ut=ye.checked,dt=ye.halfChecked,vt=ye.disabled,Dt=ye.onClick,jt=ye.disableCheckbox,It=de.useContext(ge),Xt=It.checkable,Fn=typeof Xt!="boolean"?Xt:null;return de.createElement("span",{className:rn()("".concat(pe),(Pe={},(0,Re.Z)(Pe,"".concat(pe,"-checked"),ut),(0,Re.Z)(Pe,"".concat(pe,"-indeterminate"),!ut&&dt),(0,Re.Z)(Pe,"".concat(pe,"-disabled"),vt||jt),Pe)),onClick:Dt},Fn)}var ze="__cascader_fix_label__";function st(ye){var Pe=ye.prefixCls,pe=ye.multiple,ut=ye.options,dt=ye.activeValue,vt=ye.prevValuePath,Dt=ye.onToggleOpen,jt=ye.onSelect,It=ye.onActive,Xt=ye.checkedSet,Fn=ye.halfCheckedSet,Sn=ye.loadingKeys,Ln=ye.isSelectable,Tn=ye.disabled,In="".concat(Pe,"-menu"),Dn="".concat(Pe,"-menu-item"),Cn=de.useContext(ge),Hn=Cn.fieldNames,Yn=Cn.changeOnSelect,yn=Cn.expandTrigger,On=Cn.expandIcon,zn=Cn.loadingIcon,Wn=Cn.dropdownMenuColumnStyle,Lt=Cn.optionRender,tn=yn==="hover",un=function(Rn){return Tn||Rn},En=de.useMemo(function(){return ut.map(function(xn){var Rn,Zn=xn.disabled,_n=xn.disableCheckbox,Nn=xn[Ie],Jn=(Rn=xn[ze])!==null&&Rn!==void 0?Rn:xn[Hn.label],Rt=xn[Hn.value],it=Ze(xn,Hn),Yt=Nn?Nn.map(function(Pt){return Pt[Hn.value]}):[].concat((0,Me.Z)(vt),[Rt]),hn=Je(Yt),Vn=Sn.includes(hn),ke=Xt.has(hn),Be=Fn.has(hn);return{disabled:Zn,label:Jn,value:Rt,isLeaf:it,isLoading:Vn,checked:ke,halfChecked:Be,option:xn,disableCheckbox:_n,fullPath:Yt,fullPathKey:hn}})},[ut,Xt,Hn,Fn,Sn,vt]);return de.createElement("ul",{className:In,role:"menu"},En.map(function(xn){var Rn,Zn=xn.disabled,_n=xn.label,Nn=xn.value,Jn=xn.isLeaf,Rt=xn.isLoading,it=xn.checked,Yt=xn.halfChecked,hn=xn.option,Vn=xn.fullPath,ke=xn.fullPathKey,Be=xn.disableCheckbox,Pt=function(){if(!un(Zn)){var Gt=(0,Me.Z)(Vn);tn&&Jn&&Gt.pop(),It(Gt)}},bt=function(){Ln(hn)&&!un(Zn)&&jt(Vn,Jn)},Oe;return typeof hn.title=="string"?Oe=hn.title:typeof _n=="string"&&(Oe=_n),de.createElement("li",{key:ke,className:rn()(Dn,(Rn={},(0,Re.Z)(Rn,"".concat(Dn,"-expand"),!Jn),(0,Re.Z)(Rn,"".concat(Dn,"-active"),dt===Nn||dt===ke),(0,Re.Z)(Rn,"".concat(Dn,"-disabled"),un(Zn)),(0,Re.Z)(Rn,"".concat(Dn,"-loading"),Rt),Rn)),style:Wn,role:"menuitemcheckbox",title:Oe,"aria-checked":it,"data-path-key":ke,onClick:function(){Pt(),!Be&&(!pe||Jn)&&bt()},onDoubleClick:function(){Yn&&Dt(!1)},onMouseEnter:function(){tn&&Pt()},onMouseDown:function(Gt){Gt.preventDefault()}},pe&&de.createElement(Ce,{prefixCls:"".concat(Pe,"-checkbox"),checked:it,halfChecked:Yt,disabled:un(Zn)||Be,disableCheckbox:Be,onClick:function(Gt){Be||(Gt.stopPropagation(),bt())}}),de.createElement("div",{className:"".concat(Dn,"-content")},Lt?Lt(hn):_n),!Rt&&On&&!Jn&&de.createElement("div",{className:"".concat(Dn,"-expand-icon")},On),Rt&&zn&&de.createElement("div",{className:"".concat(Dn,"-loading-icon")},zn))}))}var Te=function(Pe,pe){var ut=de.useContext(ge),dt=ut.values,vt=dt[0],Dt=de.useState([]),jt=(0,Xe.Z)(Dt,2),It=jt[0],Xt=jt[1];return de.useEffect(function(){Pe||Xt(vt||[])},[pe,vt]),[It,Xt]},Ve=Te,$e=fe(10228),pt=function(ye,Pe,pe,ut,dt,vt,Dt){var jt=Dt.direction,It=Dt.searchValue,Xt=Dt.toggleOpen,Fn=Dt.open,Sn=jt==="rtl",Ln=de.useMemo(function(){for(var Wn=-1,Lt=Pe,tn=[],un=[],En=ut.length,xn=Fe(Pe,pe),Rn=function(Rt){var it=Lt.findIndex(function(Yt,hn){return(xn[hn]?Je(xn[hn]):Yt[pe.value])===ut[Rt]});if(it===-1)return 1;Wn=it,tn.push(Wn),un.push(ut[Rt]),Lt=Lt[Wn][pe.children]},Zn=0;Zn<En&&Lt&&!Rn(Zn);Zn+=1);for(var _n=Pe,Nn=0;Nn<tn.length-1;Nn+=1)_n=_n[tn[Nn]][pe.children];return[un,Wn,_n,xn]},[ut,pe,Pe]),Tn=(0,Xe.Z)(Ln,4),In=Tn[0],Dn=Tn[1],Cn=Tn[2],Hn=Tn[3],Yn=function(Lt){dt(Lt)},yn=function(Lt){var tn=Cn.length,un=Dn;un===-1&&Lt<0&&(un=tn);for(var En=0;En<tn;En+=1){un=(un+Lt+tn)%tn;var xn=Cn[un];if(xn&&!xn.disabled){var Rn=In.slice(0,-1).concat(Hn[un]?Je(Hn[un]):xn[pe.value]);Yn(Rn);return}}},On=function(){if(In.length>1){var Lt=In.slice(0,-1);Yn(Lt)}else Xt(!1)},zn=function(){var Lt,tn=((Lt=Cn[Dn])===null||Lt===void 0?void 0:Lt[pe.children])||[],un=tn.find(function(xn){return!xn.disabled});if(un){var En=[].concat((0,Me.Z)(In),[un[pe.value]]);Yn(En)}};de.useImperativeHandle(ye,function(){return{onKeyDown:function(Lt){var tn=Lt.which;switch(tn){case $e.Z.UP:case $e.Z.DOWN:{var un=0;tn===$e.Z.UP?un=-1:tn===$e.Z.DOWN&&(un=1),un!==0&&yn(un);break}case $e.Z.LEFT:{if(It)break;Sn?zn():On();break}case $e.Z.RIGHT:{if(It)break;Sn?On():zn();break}case $e.Z.BACKSPACE:{It||On();break}case $e.Z.ENTER:{if(In.length){var En=Cn[Dn],xn=(En==null?void 0:En[Ie])||[];xn.length?vt(xn.map(function(Rn){return Rn[pe.value]}),xn[xn.length-1]):vt(In,Cn[Dn])}break}case $e.Z.ESC:Xt(!1),Fn&&Lt.stopPropagation()}},onKeyUp:function(){}}})},St=de.forwardRef(function(ye,Pe){var pe,ut,dt,vt=ye.prefixCls,Dt=ye.multiple,jt=ye.searchValue,It=ye.toggleOpen,Xt=ye.notFoundContent,Fn=ye.direction,Sn=ye.open,Ln=ye.disabled,Tn=de.useRef(null),In=Fn==="rtl",Dn=de.useContext(ge),Cn=Dn.options,Hn=Dn.values,Yn=Dn.halfValues,yn=Dn.fieldNames,On=Dn.changeOnSelect,zn=Dn.onSelect,Wn=Dn.searchOptions,Lt=Dn.dropdownPrefixCls,tn=Dn.loadData,un=Dn.expandTrigger,En=Lt||vt,xn=de.useState([]),Rn=(0,Xe.Z)(xn,2),Zn=Rn[0],_n=Rn[1],Nn=function(tt){if(!(!tn||jt)){var _t=Mt(tt,Cn,yn),ln=_t.map(function(jn){var er=jn.option;return er}),dn=ln[ln.length-1];if(dn&&!Ze(dn,yn)){var An=Je(tt);_n(function(jn){return[].concat((0,Me.Z)(jn),[An])}),tn(ln)}}};de.useEffect(function(){Zn.length&&Zn.forEach(function(yt){var tt=Tt(yt),_t=Mt(tt,Cn,yn,!0).map(function(dn){var An=dn.option;return An}),ln=_t[_t.length-1];(!ln||ln[yn.children]||Ze(ln,yn))&&_n(function(dn){return dn.filter(function(An){return An!==yt})})})},[Cn,Zn,yn]);var Jn=de.useMemo(function(){return new Set(Ye(Hn))},[Hn]),Rt=de.useMemo(function(){return new Set(Ye(Yn))},[Yn]),it=Ve(Dt,Sn),Yt=(0,Xe.Z)(it,2),hn=Yt[0],Vn=Yt[1],ke=function(tt){Vn(tt),Nn(tt)},Be=function(tt){if(Ln)return!1;var _t=tt.disabled,ln=Ze(tt,yn);return!_t&&(ln||On||Dt)},Pt=function(tt,_t){var ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;zn(tt),!Dt&&(_t||On&&(un==="hover"||ln))&&It(!1)},bt=de.useMemo(function(){return jt?Wn:Cn},[jt,Wn,Cn]),Oe=de.useMemo(function(){for(var yt=[{options:bt}],tt=bt,_t=Fe(tt,yn),ln=function(){var jn=hn[dn],er=tt.find(function(Jt,kn){return(_t[kn]?Je(_t[kn]):Jt[yn.value])===jn}),wn=er==null?void 0:er[yn.children];if(!(wn!=null&&wn.length))return 1;tt=wn,yt.push({options:wn})},dn=0;dn<hn.length&&!ln();dn+=1);return yt},[bt,hn,yn]),xt=function(tt,_t){Be(_t)&&Pt(tt,Ze(_t,yn),!0)};pt(Pe,bt,yn,hn,ke,xt,{direction:Fn,searchValue:jt,toggleOpen:It,open:Sn}),de.useEffect(function(){if(!jt)for(var yt=0;yt<hn.length;yt+=1){var tt,_t=hn.slice(0,yt+1),ln=Je(_t),dn=(tt=Tn.current)===null||tt===void 0?void 0:tt.querySelector('li[data-path-key="'.concat(ln.replace(/\\{0,2}"/g,'\\"'),'"]'));dn&&Ct(dn)}},[hn,jt]);var Gt=!((pe=Oe[0])!==null&&pe!==void 0&&(pe=pe.options)!==null&&pe!==void 0&&pe.length),an=[(ut={},(0,Re.Z)(ut,yn.value,"__EMPTY__"),(0,Re.Z)(ut,ze,Xt),(0,Re.Z)(ut,"disabled",!0),ut)],fn=(0,ht.Z)((0,ht.Z)({},ye),{},{multiple:!Gt&&Dt,onSelect:Pt,onActive:ke,onToggleOpen:It,checkedSet:Jn,halfCheckedSet:Rt,loadingKeys:Zn,isSelectable:Be}),Ot=Gt?[{options:an}]:Oe,qt=Ot.map(function(yt,tt){var _t=hn.slice(0,tt),ln=hn[tt];return de.createElement(st,(0,oe.Z)({key:tt},fn,{prefixCls:En,options:yt.options,prevValuePath:_t,activeValue:ln}))});return de.createElement(_e,{open:Sn},de.createElement("div",{className:rn()("".concat(En,"-menus"),(dt={},(0,Re.Z)(dt,"".concat(En,"-menu-empty"),Gt),(0,Re.Z)(dt,"".concat(En,"-rtl"),In),dt)),ref:Tn},qt))}),Et=St,Bt=de.forwardRef(function(ye,Pe){var pe=(0,je.lk)();return de.createElement(Et,(0,oe.Z)({},ye,pe,{ref:Pe}))}),Nt=Bt,cn=fe(70425);function Qt(){}function le(ye){var Pe,pe=ye,ut=pe.prefixCls,dt=ut===void 0?"rc-cascader":ut,vt=pe.style,Dt=pe.className,jt=pe.options,It=pe.checkable,Xt=pe.defaultValue,Fn=pe.value,Sn=pe.fieldNames,Ln=pe.changeOnSelect,Tn=pe.onChange,In=pe.showCheckedStrategy,Dn=pe.loadData,Cn=pe.expandTrigger,Hn=pe.expandIcon,Yn=Hn===void 0?">":Hn,yn=pe.loadingIcon,On=pe.direction,zn=pe.notFoundContent,Wn=zn===void 0?"Not Found":zn,Lt=pe.disabled,tn=!!It,un=(0,cn.C8)(Xt,{value:Fn,postState:Ae}),En=(0,Xe.Z)(un,2),xn=En[0],Rn=En[1],Zn=de.useMemo(function(){return Le(Sn)},[JSON.stringify(Sn)]),_n=he(Zn,jt),Nn=(0,Xe.Z)(_n,3),Jn=Nn[0],Rt=Nn[1],it=Nn[2],Yt=$t(Jn,Zn),hn=ot(tn,xn,Rt,it,Yt),Vn=(0,Xe.Z)(hn,3),ke=Vn[0],Be=Vn[1],Pt=Vn[2],bt=(0,cn.zX)(function(Ot){if(Rn(Ot),Tn){var qt=Ae(Ot),yt=qt.map(function(ln){return Mt(ln,Jn,Zn).map(function(dn){return dn.option})}),tt=tn?qt:qt[0],_t=tn?yt:yt[0];Tn(tt,_t)}}),Oe=Ne(tn,bt,ke,Be,Pt,Rt,it,In),xt=(0,cn.zX)(function(Ot){Oe(Ot)}),Gt=de.useMemo(function(){return{options:Jn,fieldNames:Zn,values:ke,halfValues:Be,changeOnSelect:Ln,onSelect:xt,checkable:It,searchOptions:[],dropdownPrefixCls:void 0,loadData:Dn,expandTrigger:Cn,expandIcon:Yn,loadingIcon:yn,dropdownMenuColumnStyle:void 0}},[Jn,Zn,ke,Be,Ln,xt,It,Dn,Cn,Yn,yn]),an="".concat(dt,"-panel"),fn=!Jn.length;return de.createElement(ge.Provider,{value:Gt},de.createElement("div",{className:rn()(an,(Pe={},(0,Re.Z)(Pe,"".concat(an,"-rtl"),On==="rtl"),(0,Re.Z)(Pe,"".concat(an,"-empty"),fn),Pe),Dt),style:vt},fn?Wn:de.createElement(Et,{prefixCls:dt,searchValue:"",multiple:tn,toggleOpen:Qt,open:!0,direction:On,disabled:Lt})))}function te(ye){var Pe=ye.onPopupVisibleChange,pe=ye.popupVisible,ut=ye.popupClassName,dt=ye.popupPlacement;warning(!Pe,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(pe===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(ut===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(dt===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function ee(ye,Pe){if(ye){var pe=function ut(dt){for(var vt=0;vt<dt.length;vt++){var Dt=dt[vt];if(Dt[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Dt[Pe==null?void 0:Pe.children])&&ut(Dt[Pe==null?void 0:Pe.children]))return!0}};pe(ye)}}var ie=null,ue=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],ne=de.forwardRef(function(ye,Pe){var pe=ye.id,ut=ye.prefixCls,dt=ut===void 0?"rc-cascader":ut,vt=ye.fieldNames,Dt=ye.defaultValue,jt=ye.value,It=ye.changeOnSelect,Xt=ye.onChange,Fn=ye.displayRender,Sn=ye.checkable,Ln=ye.autoClearSearchValue,Tn=Ln===void 0?!0:Ln,In=ye.searchValue,Dn=ye.onSearch,Cn=ye.showSearch,Hn=ye.expandTrigger,Yn=ye.options,yn=ye.dropdownPrefixCls,On=ye.loadData,zn=ye.popupVisible,Wn=ye.open,Lt=ye.popupClassName,tn=ye.dropdownClassName,un=ye.dropdownMenuColumnStyle,En=ye.dropdownStyle,xn=ye.popupPlacement,Rn=ye.placement,Zn=ye.onDropdownVisibleChange,_n=ye.onPopupVisibleChange,Nn=ye.expandIcon,Jn=Nn===void 0?">":Nn,Rt=ye.loadingIcon,it=ye.children,Yt=ye.dropdownMatchSelectWidth,hn=Yt===void 0?!1:Yt,Vn=ye.showCheckedStrategy,ke=Vn===void 0?Ge:Vn,Be=ye.optionRender,Pt=(0,me.Z)(ye,ue),bt=(0,He.ZP)(pe),Oe=!!Sn,xt=(0,Se.Z)(Dt,{value:jt,postState:Ae}),Gt=(0,Xe.Z)(xt,2),an=Gt[0],fn=Gt[1],Ot=de.useMemo(function(){return Le(vt)},[JSON.stringify(vt)]),qt=he(Ot,Yn),yt=(0,Xe.Z)(qt,3),tt=yt[0],_t=yt[1],ln=yt[2],dn=(0,Se.Z)("",{value:In,postState:function(Er){return Er||""}}),An=(0,Xe.Z)(dn,2),jn=An[0],er=An[1],wn=function(Er,Cr){er(Er),Cr.source!=="blur"&&Dn&&Dn(Er)},Jt=Kt(Cn),kn=(0,Xe.Z)(Jt,2),sn=kn[0],nr=kn[1],yr=rt(jn,tt,Ot,yn||dt,nr,It||Oe),or=$t(tt,Ot),Fr=ot(Oe,an,_t,ln,or),wr=(0,Xe.Z)(Fr,3),hr=wr[0],cr=wr[1],Mr=wr[2],br=de.useMemo(function(){var pr=Ye(hr),Er=Qe(pr,_t,ke);return[].concat((0,Me.Z)(Mr),(0,Me.Z)(ln(Er)))},[hr,_t,ln,Mr,ke]),dr=wt(br,tt,Ot,Oe,Fn),Sr=(0,Ke.Z)(function(pr){if(fn(pr),Xt){var Er=Ae(pr),Cr=Er.map(function(en){return Mt(en,tt,Ot).map(function(Mn){return Mn.option})}),qn=Oe?Er:Er[0],Wt=Oe?Cr:Cr[0];Xt(qn,Wt)}}),Lr=Ne(Oe,Sr,hr,cr,Mr,_t,ln,ke),fr=(0,Ke.Z)(function(pr){(!Oe||Tn)&&er(""),Lr(pr)}),lr=function(Er,Cr){if(Cr.type==="clear"){Sr([]);return}var qn=Cr.values[0],Wt=qn.valueCells;fr(Wt)},ar=Wn!==void 0?Wn:zn,Ir=tn||Lt,Vr=Rn||xn,Kr=function(Er){Zn==null||Zn(Er),_n==null||_n(Er)},Dr=de.useMemo(function(){return{options:tt,fieldNames:Ot,values:hr,halfValues:cr,changeOnSelect:It,onSelect:fr,checkable:Sn,searchOptions:yr,dropdownPrefixCls:yn,loadData:On,expandTrigger:Hn,expandIcon:Jn,loadingIcon:Rt,dropdownMenuColumnStyle:un,optionRender:Be}},[tt,Ot,hr,cr,It,fr,Sn,yr,yn,On,Hn,Jn,Rt,un,Be]),_r=!(jn?yr:tt).length,Nr=jn&&nr.matchInputWidth||_r?{}:{minWidth:"auto"};return de.createElement(ge.Provider,{value:Dr},de.createElement(je.Ac,(0,oe.Z)({},Pt,{ref:Pe,id:bt,prefixCls:dt,autoClearSearchValue:Tn,dropdownMatchSelectWidth:hn,dropdownStyle:(0,ht.Z)((0,ht.Z)({},Nr),En),displayValues:dr,onDisplayValuesChange:lr,mode:Oe?"multiple":void 0,searchValue:jn,onSearch:wn,showSearch:sn,OptionList:Nt,emptyOptions:_r,open:ar,dropdownClassName:Ir,placement:Vr,onDropdownVisibleChange:Kr,getRawInputElement:function(){return it}})))});ne.SHOW_PARENT=Ge,ne.SHOW_CHILD=Ue,ne.Panel=le;var be=ne,gt=be},66042:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return et}});var oe=fe(33885),ht=fe(42978),Me=fe(43403),Xe=fe(34280),me=fe(59301),je=me.createContext(null),He=me.createContext({}),Ke=je,Se=fe(20068),de=fe(54476),we=fe(92310),ge=fe.n(we),lt=fe(77900),Re=fe(10228),Ie=fe(26112),We=fe(75931),Ee=fe(8654),at=["prefixCls","className","containerRef"],rt=function(Qe){var Mt=Qe.prefixCls,wt=Qe.className,$t=Qe.containerRef,Ht=(0,We.Z)(Qe,at),ve=me.useContext(He),he=ve.panel,mt=(0,Ee.x1)(he,$t);return me.createElement("div",(0,de.Z)({className:ge()("".concat(Mt,"-content"),wt),role:"dialog",ref:mt},(0,Ie.Z)(Qe,{aria:!0}),{"aria-modal":"true"},Ht))},ct=rt,Ge=fe(48736);function Ue(Ae){return typeof Ae=="string"&&String(Number(Ae))===Ae?((0,Ge.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ae)):Ae}function Je(Ae){warning(!("wrapperClassName"in Ae),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ae.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ye={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Tt(Ae,Qe){var Mt,wt,$t,Ht=Ae.prefixCls,ve=Ae.open,he=Ae.placement,mt=Ae.inline,Kt=Ae.push,Ft=Ae.forceRender,Ne=Ae.autoFocus,ot=Ae.keyboard,ft=Ae.classNames,rn=Ae.rootClassName,kt=Ae.rootStyle,_e=Ae.zIndex,Ce=Ae.className,ze=Ae.id,st=Ae.style,Te=Ae.motion,Ve=Ae.width,$e=Ae.height,pt=Ae.children,St=Ae.mask,Et=Ae.maskClosable,Bt=Ae.maskMotion,Nt=Ae.maskClassName,cn=Ae.maskStyle,Qt=Ae.afterOpenChange,le=Ae.onClose,te=Ae.onMouseEnter,ee=Ae.onMouseOver,ie=Ae.onMouseLeave,ue=Ae.onClick,ne=Ae.onKeyDown,be=Ae.onKeyUp,gt=Ae.styles,ye=Ae.drawerRender,Pe=me.useRef(),pe=me.useRef(),ut=me.useRef();me.useImperativeHandle(Qe,function(){return Pe.current});var dt=function(On){var zn=On.keyCode,Wn=On.shiftKey;switch(zn){case Re.Z.TAB:{if(zn===Re.Z.TAB){if(!Wn&&document.activeElement===ut.current){var Lt;(Lt=pe.current)===null||Lt===void 0||Lt.focus({preventScroll:!0})}else if(Wn&&document.activeElement===pe.current){var tn;(tn=ut.current)===null||tn===void 0||tn.focus({preventScroll:!0})}}break}case Re.Z.ESC:{le&&ot&&(On.stopPropagation(),le(On));break}}};me.useEffect(function(){if(ve&&Ne){var yn;(yn=Pe.current)===null||yn===void 0||yn.focus({preventScroll:!0})}},[ve]);var vt=me.useState(!1),Dt=(0,ht.Z)(vt,2),jt=Dt[0],It=Dt[1],Xt=me.useContext(Ke),Fn;typeof Kt=="boolean"?Fn=Kt?{}:{distance:0}:Fn=Kt||{};var Sn=(Mt=(wt=($t=Fn)===null||$t===void 0?void 0:$t.distance)!==null&&wt!==void 0?wt:Xt==null?void 0:Xt.pushDistance)!==null&&Mt!==void 0?Mt:180,Ln=me.useMemo(function(){return{pushDistance:Sn,push:function(){It(!0)},pull:function(){It(!1)}}},[Sn]);me.useEffect(function(){if(ve){var yn;Xt==null||(yn=Xt.push)===null||yn===void 0||yn.call(Xt)}else{var On;Xt==null||(On=Xt.pull)===null||On===void 0||On.call(Xt)}},[ve]),me.useEffect(function(){return function(){var yn;Xt==null||(yn=Xt.pull)===null||yn===void 0||yn.call(Xt)}},[]);var Tn=St&&me.createElement(lt.default,(0,de.Z)({key:"mask"},Bt,{visible:ve}),function(yn,On){var zn=yn.className,Wn=yn.style;return me.createElement("div",{className:ge()("".concat(Ht,"-mask"),zn,ft==null?void 0:ft.mask,Nt),style:(0,oe.Z)((0,oe.Z)((0,oe.Z)({},Wn),cn),gt==null?void 0:gt.mask),onClick:Et&&ve?le:void 0,ref:On})}),In=typeof Te=="function"?Te(he):Te,Dn={};if(jt&&Sn)switch(he){case"top":Dn.transform="translateY(".concat(Sn,"px)");break;case"bottom":Dn.transform="translateY(".concat(-Sn,"px)");break;case"left":Dn.transform="translateX(".concat(Sn,"px)");break;default:Dn.transform="translateX(".concat(-Sn,"px)");break}he==="left"||he==="right"?Dn.width=Ue(Ve):Dn.height=Ue($e);var Cn={onMouseEnter:te,onMouseOver:ee,onMouseLeave:ie,onClick:ue,onKeyDown:ne,onKeyUp:be},Hn=me.createElement(lt.default,(0,de.Z)({key:"panel"},In,{visible:ve,forceRender:Ft,onVisibleChanged:function(On){Qt==null||Qt(On)},removeOnLeave:!1,leavedClassName:"".concat(Ht,"-content-wrapper-hidden")}),function(yn,On){var zn=yn.className,Wn=yn.style,Lt=me.createElement(ct,(0,de.Z)({id:ze,containerRef:On,prefixCls:Ht,className:ge()(Ce,ft==null?void 0:ft.content),style:(0,oe.Z)((0,oe.Z)({},st),gt==null?void 0:gt.content)},(0,Ie.Z)(Ae,{aria:!0}),Cn),pt);return me.createElement("div",(0,de.Z)({className:ge()("".concat(Ht,"-content-wrapper"),ft==null?void 0:ft.wrapper,zn),style:(0,oe.Z)((0,oe.Z)((0,oe.Z)({},Dn),Wn),gt==null?void 0:gt.wrapper)},(0,Ie.Z)(Ae,{data:!0})),ye?ye(Lt):Lt)}),Yn=(0,oe.Z)({},kt);return _e&&(Yn.zIndex=_e),me.createElement(Ke.Provider,{value:Ln},me.createElement("div",{className:ge()(Ht,"".concat(Ht,"-").concat(he),rn,(0,Se.Z)((0,Se.Z)({},"".concat(Ht,"-open"),ve),"".concat(Ht,"-inline"),mt)),style:Yn,tabIndex:-1,ref:Pe,onKeyDown:dt},Tn,me.createElement("div",{tabIndex:0,ref:pe,style:Ye,"aria-hidden":"true","data-sentinel":"start"}),Hn,me.createElement("div",{tabIndex:0,ref:ut,style:Ye,"aria-hidden":"true","data-sentinel":"end"})))}var Le=me.forwardRef(Tt),Ze=Le,Ct=function(Qe){var Mt=Qe.open,wt=Mt===void 0?!1:Mt,$t=Qe.prefixCls,Ht=$t===void 0?"rc-drawer":$t,ve=Qe.placement,he=ve===void 0?"right":ve,mt=Qe.autoFocus,Kt=mt===void 0?!0:mt,Ft=Qe.keyboard,Ne=Ft===void 0?!0:Ft,ot=Qe.width,ft=ot===void 0?378:ot,rn=Qe.mask,kt=rn===void 0?!0:rn,_e=Qe.maskClosable,Ce=_e===void 0?!0:_e,ze=Qe.getContainer,st=Qe.forceRender,Te=Qe.afterOpenChange,Ve=Qe.destroyOnClose,$e=Qe.onMouseEnter,pt=Qe.onMouseOver,St=Qe.onMouseLeave,Et=Qe.onClick,Bt=Qe.onKeyDown,Nt=Qe.onKeyUp,cn=Qe.panelRef,Qt=me.useState(!1),le=(0,ht.Z)(Qt,2),te=le[0],ee=le[1],ie=me.useState(!1),ue=(0,ht.Z)(ie,2),ne=ue[0],be=ue[1];(0,Xe.Z)(function(){be(!0)},[]);var gt=ne?wt:!1,ye=me.useRef(),Pe=me.useRef();(0,Xe.Z)(function(){gt&&(Pe.current=document.activeElement)},[gt]);var pe=function(jt){var It;if(ee(jt),Te==null||Te(jt),!jt&&Pe.current&&!((It=ye.current)!==null&&It!==void 0&&It.contains(Pe.current))){var Xt;(Xt=Pe.current)===null||Xt===void 0||Xt.focus({preventScroll:!0})}},ut=me.useMemo(function(){return{panel:cn}},[cn]);if(!st&&!te&&!gt&&Ve)return null;var dt={onMouseEnter:$e,onMouseOver:pt,onMouseLeave:St,onClick:Et,onKeyDown:Bt,onKeyUp:Nt},vt=(0,oe.Z)((0,oe.Z)({},Qe),{},{open:gt,prefixCls:Ht,placement:he,autoFocus:Kt,keyboard:Ne,width:ft,mask:kt,maskClosable:Ce,inline:ze===!1,afterOpenChange:pe,ref:ye},dt);return me.createElement(He.Provider,{value:ut},me.createElement(Me.Z,{open:gt||st||te,autoDestroy:!1,getContainer:ze,autoLock:kt&&(gt||te)},me.createElement(Ze,vt)))},Fe=Ct,et=Fe},20922:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return kt}});var oe=fe(54476),ht=fe(20068),Me=fe(76190),Xe=fe(42978),me=fe(75931),je=fe(67732),He=fe(83652);function Ke(){return typeof BigInt=="function"}function Se(_e){return!_e&&_e!==0&&!Number.isNaN(_e)||!String(_e).trim()}function de(_e){var Ce=_e.trim(),ze=Ce.startsWith("-");ze&&(Ce=Ce.slice(1)),Ce=Ce.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Ce.startsWith(".")&&(Ce="0".concat(Ce));var st=Ce||"0",Te=st.split("."),Ve=Te[0]||"0",$e=Te[1]||"0";Ve==="0"&&$e==="0"&&(ze=!1);var pt=ze?"-":"";return{negative:ze,negativeStr:pt,trimStr:st,integerStr:Ve,decimalStr:$e,fullStr:"".concat(pt).concat(st)}}function we(_e){var Ce=String(_e);return!Number.isNaN(Number(Ce))&&Ce.includes("e")}function ge(_e){var Ce=String(_e);if(we(_e)){var ze=Number(Ce.slice(Ce.indexOf("e-")+2)),st=Ce.match(/\.(\d+)/);return st!=null&&st[1]&&(ze+=st[1].length),ze}return Ce.includes(".")&&Re(Ce)?Ce.length-Ce.indexOf(".")-1:0}function lt(_e){var Ce=String(_e);if(we(_e)){if(_e>Number.MAX_SAFE_INTEGER)return String(Ke()?BigInt(_e).toString():Number.MAX_SAFE_INTEGER);if(_e<Number.MIN_SAFE_INTEGER)return String(Ke()?BigInt(_e).toString():Number.MIN_SAFE_INTEGER);Ce=_e.toFixed(ge(Ce))}return de(Ce).fullStr}function Re(_e){return typeof _e=="number"?!Number.isNaN(_e):_e?/^\s*-?\d+(\.\d+)?\s*$/.test(_e)||/^\s*-?\d+\.\s*$/.test(_e)||/^\s*-?\.\d+\s*$/.test(_e):!1}var Ie=function(){function _e(Ce){if((0,je.Z)(this,_e),(0,ht.Z)(this,"origin",""),(0,ht.Z)(this,"negative",void 0),(0,ht.Z)(this,"integer",void 0),(0,ht.Z)(this,"decimal",void 0),(0,ht.Z)(this,"decimalLen",void 0),(0,ht.Z)(this,"empty",void 0),(0,ht.Z)(this,"nan",void 0),Se(Ce)){this.empty=!0;return}if(this.origin=String(Ce),Ce==="-"||Number.isNaN(Ce)){this.nan=!0;return}var ze=Ce;if(we(ze)&&(ze=Number(ze)),ze=typeof ze=="string"?ze:lt(ze),Re(ze)){var st=de(ze);this.negative=st.negative;var Te=st.trimStr.split(".");this.integer=BigInt(Te[0]);var Ve=Te[1]||"0";this.decimal=BigInt(Ve),this.decimalLen=Ve.length}else this.nan=!0}return(0,He.Z)(_e,[{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(ze){var st="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(ze,"0"));return BigInt(st)}},{key:"negate",value:function(){var ze=new _e(this.toString());return ze.negative=!ze.negative,ze}},{key:"cal",value:function(ze,st,Te){var Ve=Math.max(this.getDecimalStr().length,ze.getDecimalStr().length),$e=this.alignDecimal(Ve),pt=ze.alignDecimal(Ve),St=st($e,pt).toString(),Et=Te(Ve),Bt=de(St),Nt=Bt.negativeStr,cn=Bt.trimStr,Qt="".concat(Nt).concat(cn.padStart(Et+1,"0"));return new _e("".concat(Qt.slice(0,-Et),".").concat(Qt.slice(-Et)))}},{key:"add",value:function(ze){if(this.isInvalidate())return new _e(ze);var st=new _e(ze);return st.isInvalidate()?this:this.cal(st,function(Te,Ve){return Te+Ve},function(Te){return Te})}},{key:"multi",value:function(ze){var st=new _e(ze);return this.isInvalidate()||st.isInvalidate()?new _e(NaN):this.cal(st,function(Te,Ve){return Te*Ve},function(Te){return Te*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(ze){return this.toString()===(ze==null?void 0:ze.toString())}},{key:"lessEquals",value:function(ze){return this.add(ze.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ze?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),_e}(),We=function(){function _e(Ce){if((0,je.Z)(this,_e),(0,ht.Z)(this,"origin",""),(0,ht.Z)(this,"number",void 0),(0,ht.Z)(this,"empty",void 0),Se(Ce)){this.empty=!0;return}this.origin=String(Ce),this.number=Number(Ce)}return(0,He.Z)(_e,[{key:"negate",value:function(){return new _e(-this.toNumber())}},{key:"add",value:function(ze){if(this.isInvalidate())return new _e(ze);var st=Number(ze);if(Number.isNaN(st))return this;var Te=this.number+st;if(Te>Number.MAX_SAFE_INTEGER)return new _e(Number.MAX_SAFE_INTEGER);if(Te<Number.MIN_SAFE_INTEGER)return new _e(Number.MIN_SAFE_INTEGER);var Ve=Math.max(ge(this.number),ge(st));return new _e(Te.toFixed(Ve))}},{key:"multi",value:function(ze){var st=Number(ze);if(this.isInvalidate()||Number.isNaN(st))return new _e(NaN);var Te=this.number*st;if(Te>Number.MAX_SAFE_INTEGER)return new _e(Number.MAX_SAFE_INTEGER);if(Te<Number.MIN_SAFE_INTEGER)return new _e(Number.MIN_SAFE_INTEGER);var Ve=Math.max(ge(this.number),ge(st));return new _e(Te.toFixed(Ve))}},{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(ze){return this.toNumber()===(ze==null?void 0:ze.toNumber())}},{key:"lessEquals",value:function(ze){return this.add(ze.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return ze?this.isInvalidate()?"":lt(this.number):this.origin}}]),_e}();function Ee(_e){return Ke()?new Ie(_e):new We(_e)}function at(_e,Ce,ze){var st=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(_e==="")return"";var Te=de(_e),Ve=Te.negativeStr,$e=Te.integerStr,pt=Te.decimalStr,St="".concat(Ce).concat(pt),Et="".concat(Ve).concat($e);if(ze>=0){var Bt=Number(pt[ze]);if(Bt>=5&&!st){var Nt=Ee(_e).add("".concat(Ve,"0.").concat("0".repeat(ze)).concat(10-Bt));return at(Nt.toString(),Ce,ze,st)}return ze===0?Et:"".concat(Et).concat(Ce).concat(pt.padEnd(ze,"0").slice(0,ze))}return St===".0"?Et:"".concat(Et).concat(St)}var rt=Ee,ct=fe(92310),Ge=fe.n(ct),Ue=fe(36901),Je=fe(34280);function Ye(_e,Ce){return typeof Proxy!="undefined"&&_e?new Proxy(_e,{get:function(st,Te){if(Ce[Te])return Ce[Te];var Ve=st[Te];return typeof Ve=="function"?Ve.bind(st):Ve}}):_e}var Tt=fe(8654),Le=fe(59301),Ze=fe(48736);function Ct(_e,Ce){var ze=(0,Le.useRef)(null);function st(){try{var Ve=_e.selectionStart,$e=_e.selectionEnd,pt=_e.value,St=pt.substring(0,Ve),Et=pt.substring($e);ze.current={start:Ve,end:$e,value:pt,beforeTxt:St,afterTxt:Et}}catch(Bt){}}function Te(){if(_e&&ze.current&&Ce)try{var Ve=_e.value,$e=ze.current,pt=$e.beforeTxt,St=$e.afterTxt,Et=$e.start,Bt=Ve.length;if(Ve.startsWith(pt))Bt=pt.length;else if(Ve.endsWith(St))Bt=Ve.length-ze.current.afterTxt.length;else{var Nt=pt[Et-1],cn=Ve.indexOf(Nt,Et-1);cn!==-1&&(Bt=cn+1)}_e.setSelectionRange(Bt,Bt)}catch(Qt){(0,Ze.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Qt.message))}}return[st,Te]}var Fe=fe(49658),et=function(){var Ce=(0,Le.useState)(!1),ze=(0,Xe.Z)(Ce,2),st=ze[0],Te=ze[1];return(0,Je.Z)(function(){Te((0,Fe.Z)())},[]),st},Ae=et,Qe=fe(16089),Mt=200,wt=600;function $t(_e){var Ce=_e.prefixCls,ze=_e.upNode,st=_e.downNode,Te=_e.upDisabled,Ve=_e.downDisabled,$e=_e.onStep,pt=Le.useRef(),St=Le.useRef([]),Et=Le.useRef();Et.current=$e;var Bt=function(){clearTimeout(pt.current)},Nt=function(ne,be){ne.preventDefault(),Bt(),Et.current(be);function gt(){Et.current(be),pt.current=setTimeout(gt,Mt)}pt.current=setTimeout(gt,wt)};Le.useEffect(function(){return function(){Bt(),St.current.forEach(function(ue){return Qe.Z.cancel(ue)})}},[]);var cn=Ae();if(cn)return null;var Qt="".concat(Ce,"-handler"),le=Ge()(Qt,"".concat(Qt,"-up"),(0,ht.Z)({},"".concat(Qt,"-up-disabled"),Te)),te=Ge()(Qt,"".concat(Qt,"-down"),(0,ht.Z)({},"".concat(Qt,"-down-disabled"),Ve)),ee=function(){return St.current.push((0,Qe.Z)(Bt))},ie={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Le.createElement("div",{className:"".concat(Qt,"-wrap")},Le.createElement("span",(0,oe.Z)({},ie,{onMouseDown:function(ne){Nt(ne,!0)},"aria-label":"Increase Value","aria-disabled":Te,className:le}),ze||Le.createElement("span",{unselectable:"on",className:"".concat(Ce,"-handler-up-inner")})),Le.createElement("span",(0,oe.Z)({},ie,{onMouseDown:function(ne){Nt(ne,!1)},"aria-label":"Decrease Value","aria-disabled":Ve,className:te}),st||Le.createElement("span",{unselectable:"on",className:"".concat(Ce,"-handler-down-inner")})))}function Ht(_e){var Ce=typeof _e=="number"?lt(_e):de(_e).fullStr,ze=Ce.includes(".");return ze?de(Ce.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:_e+"0"}var ve=fe(30292),he=function(){var _e=(0,Le.useRef)(0),Ce=function(){Qe.Z.cancel(_e.current)};return(0,Le.useEffect)(function(){return Ce},[]),function(ze){Ce(),_e.current=(0,Qe.Z)(function(){ze()})}},mt=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Kt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Ft=function(Ce,ze){return Ce||ze.isEmpty()?ze.toString():ze.toNumber()},Ne=function(Ce){var ze=rt(Ce);return ze.isInvalidate()?null:ze},ot=Le.forwardRef(function(_e,Ce){var ze=_e.prefixCls,st=_e.className,Te=_e.style,Ve=_e.min,$e=_e.max,pt=_e.step,St=pt===void 0?1:pt,Et=_e.defaultValue,Bt=_e.value,Nt=_e.disabled,cn=_e.readOnly,Qt=_e.upHandler,le=_e.downHandler,te=_e.keyboard,ee=_e.changeOnWheel,ie=ee===void 0?!1:ee,ue=_e.controls,ne=ue===void 0?!0:ue,be=_e.classNames,gt=_e.stringMode,ye=_e.parser,Pe=_e.formatter,pe=_e.precision,ut=_e.decimalSeparator,dt=_e.onChange,vt=_e.onInput,Dt=_e.onPressEnter,jt=_e.onStep,It=_e.changeOnBlur,Xt=It===void 0?!0:It,Fn=_e.domRef,Sn=(0,me.Z)(_e,mt),Ln="".concat(ze,"-input"),Tn=Le.useRef(null),In=Le.useState(!1),Dn=(0,Xe.Z)(In,2),Cn=Dn[0],Hn=Dn[1],Yn=Le.useRef(!1),yn=Le.useRef(!1),On=Le.useRef(!1),zn=Le.useState(function(){return rt(Bt!=null?Bt:Et)}),Wn=(0,Xe.Z)(zn,2),Lt=Wn[0],tn=Wn[1];function un(wn){Bt===void 0&&tn(wn)}var En=Le.useCallback(function(wn,Jt){if(!Jt)return pe>=0?pe:Math.max(ge(wn),ge(St))},[pe,St]),xn=Le.useCallback(function(wn){var Jt=String(wn);if(ye)return ye(Jt);var kn=Jt;return ut&&(kn=kn.replace(ut,".")),kn.replace(/[^\w.-]+/g,"")},[ye,ut]),Rn=Le.useRef(""),Zn=Le.useCallback(function(wn,Jt){if(Pe)return Pe(wn,{userTyping:Jt,input:String(Rn.current)});var kn=typeof wn=="number"?lt(wn):wn;if(!Jt){var sn=En(kn,Jt);if(Re(kn)&&(ut||sn>=0)){var nr=ut||".";kn=at(kn,nr,sn)}}return kn},[Pe,En,ut]),_n=Le.useState(function(){var wn=Et!=null?Et:Bt;return Lt.isInvalidate()&&["string","number"].includes((0,Me.Z)(wn))?Number.isNaN(wn)?"":wn:Zn(Lt.toString(),!1)}),Nn=(0,Xe.Z)(_n,2),Jn=Nn[0],Rt=Nn[1];Rn.current=Jn;function it(wn,Jt){Rt(Zn(wn.isInvalidate()?wn.toString(!1):wn.toString(!Jt),Jt))}var Yt=Le.useMemo(function(){return Ne($e)},[$e,pe]),hn=Le.useMemo(function(){return Ne(Ve)},[Ve,pe]),Vn=Le.useMemo(function(){return!Yt||!Lt||Lt.isInvalidate()?!1:Yt.lessEquals(Lt)},[Yt,Lt]),ke=Le.useMemo(function(){return!hn||!Lt||Lt.isInvalidate()?!1:Lt.lessEquals(hn)},[hn,Lt]),Be=Ct(Tn.current,Cn),Pt=(0,Xe.Z)(Be,2),bt=Pt[0],Oe=Pt[1],xt=function(Jt){return Yt&&!Jt.lessEquals(Yt)?Yt:hn&&!hn.lessEquals(Jt)?hn:null},Gt=function(Jt){return!xt(Jt)},an=function(Jt,kn){var sn=Jt,nr=Gt(sn)||sn.isEmpty();if(!sn.isEmpty()&&!kn&&(sn=xt(sn)||sn,nr=!0),!cn&&!Nt&&nr){var yr=sn.toString(),or=En(yr,kn);return or>=0&&(sn=rt(at(yr,".",or)),Gt(sn)||(sn=rt(at(yr,".",or,!0)))),sn.equals(Lt)||(un(sn),dt==null||dt(sn.isEmpty()?null:Ft(gt,sn)),Bt===void 0&&it(sn,kn)),sn}return Lt},fn=he(),Ot=function wn(Jt){if(bt(),Rn.current=Jt,Rt(Jt),!yn.current){var kn=xn(Jt),sn=rt(kn);sn.isNaN()||an(sn,!0)}vt==null||vt(Jt),fn(function(){var nr=Jt;ye||(nr=Jt.replace(/。/g,".")),nr!==Jt&&wn(nr)})},qt=function(){yn.current=!0},yt=function(){yn.current=!1,Ot(Tn.current.value)},tt=function(Jt){Ot(Jt.target.value)},_t=function(Jt){var kn;if(!(Jt&&Vn||!Jt&&ke)){Yn.current=!1;var sn=rt(On.current?Ht(St):St);Jt||(sn=sn.negate());var nr=(Lt||rt(0)).add(sn.toString()),yr=an(nr,!1);jt==null||jt(Ft(gt,yr),{offset:On.current?Ht(St):St,type:Jt?"up":"down"}),(kn=Tn.current)===null||kn===void 0||kn.focus()}},ln=function(Jt){var kn=rt(xn(Jn)),sn;kn.isNaN()?sn=an(Lt,Jt):sn=an(kn,Jt),Bt!==void 0?it(Lt,!1):sn.isNaN()||it(sn,!1)},dn=function(){Yn.current=!0},An=function(Jt){var kn=Jt.key,sn=Jt.shiftKey;Yn.current=!0,On.current=sn,kn==="Enter"&&(yn.current||(Yn.current=!1),ln(!1),Dt==null||Dt(Jt)),te!==!1&&!yn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(kn)&&(_t(kn==="Up"||kn==="ArrowUp"),Jt.preventDefault())},jn=function(){Yn.current=!1,On.current=!1};Le.useEffect(function(){if(ie&&Cn){var wn=function(sn){_t(sn.deltaY<0),sn.preventDefault()},Jt=Tn.current;if(Jt)return Jt.addEventListener("wheel",wn,{passive:!1}),function(){return Jt.removeEventListener("wheel",wn)}}});var er=function(){Xt&&ln(!1),Hn(!1),Yn.current=!1};return(0,Je.o)(function(){Lt.isInvalidate()||it(Lt,!1)},[pe,Pe]),(0,Je.o)(function(){var wn=rt(Bt);tn(wn);var Jt=rt(xn(Jn));(!wn.equals(Jt)||!Yn.current||Pe)&&it(wn,Yn.current)},[Bt]),(0,Je.o)(function(){Pe&&Oe()},[Jn]),Le.createElement("div",{ref:Fn,className:Ge()(ze,st,(0,ht.Z)((0,ht.Z)((0,ht.Z)((0,ht.Z)((0,ht.Z)({},"".concat(ze,"-focused"),Cn),"".concat(ze,"-disabled"),Nt),"".concat(ze,"-readonly"),cn),"".concat(ze,"-not-a-number"),Lt.isNaN()),"".concat(ze,"-out-of-range"),!Lt.isInvalidate()&&!Gt(Lt))),style:Te,onFocus:function(){Hn(!0)},onBlur:er,onKeyDown:An,onKeyUp:jn,onCompositionStart:qt,onCompositionEnd:yt,onBeforeInput:dn},ne&&Le.createElement($t,{prefixCls:ze,upNode:Qt,downNode:le,upDisabled:Vn,downDisabled:ke,onStep:_t}),Le.createElement("div",{className:"".concat(Ln,"-wrap")},Le.createElement("input",(0,oe.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ve,"aria-valuemax":$e,"aria-valuenow":Lt.isInvalidate()?null:Lt.toString(),step:St},Sn,{ref:(0,Tt.sQ)(Tn,Ce),className:Ln,value:Jn,onChange:tt,disabled:Nt,readOnly:cn}))))}),ft=Le.forwardRef(function(_e,Ce){var ze=_e.disabled,st=_e.style,Te=_e.prefixCls,Ve=Te===void 0?"rc-input-number":Te,$e=_e.value,pt=_e.prefix,St=_e.suffix,Et=_e.addonBefore,Bt=_e.addonAfter,Nt=_e.className,cn=_e.classNames,Qt=(0,me.Z)(_e,Kt),le=Le.useRef(null),te=Le.useRef(null),ee=Le.useRef(null),ie=function(ne){ee.current&&(0,ve.nH)(ee.current,ne)};return Le.useImperativeHandle(Ce,function(){return Ye(ee.current,{focus:ie,nativeElement:le.current.nativeElement||te.current})}),Le.createElement(Ue.BaseInput,{className:Nt,triggerFocus:ie,prefixCls:Ve,value:$e,disabled:ze,style:st,prefix:pt,suffix:St,addonAfter:Bt,addonBefore:Et,classNames:cn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:le},Le.createElement(ot,(0,oe.Z)({prefixCls:Ve,disabled:ze,ref:ee,domRef:te,className:cn==null?void 0:cn.input},Qt)))}),rn=ft,kt=rn},6551:function(Zt,Ut,fe){"use strict";fe.d(Ut,{ZP:function(){return He}});var oe=fe(42978),ht=fe(59301),Me=fe(47273),Xe=0,me=(0,Me.Z)();function je(){var Ke;return me?(Ke=Xe,Xe+=1):Ke="TEST_OR_SSR",Ke}function He(Ke){var Se=ht.useState(),de=(0,oe.Z)(Se,2),we=de[0],ge=de[1];return ht.useEffect(function(){ge("rc_select_".concat(je()))},[]),Ke||we}},37463:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Ac:function(){return pe},Xo:function(){return dt},Wx:function(){return Dt},ZP:function(){return Vn},lk:function(){return ct}});var oe=fe(54476),ht=fe(94480),Me=fe(20068),Xe=fe(33885),me=fe(42978),je=fe(75931),He=fe(76190),Ke=fe(18929),Se=fe(48736),de=fe(59301),we=fe(92310),ge=fe.n(we),lt=fe(34280),Re=fe(49658),Ie=fe(8654),We=function(Be){var Pt=Be.className,bt=Be.customizeIcon,Oe=Be.customizeIconProps,xt=Be.children,Gt=Be.onMouseDown,an=Be.onClick,fn=typeof bt=="function"?bt(Oe):bt;return de.createElement("span",{className:Pt,onMouseDown:function(qt){qt.preventDefault(),Gt==null||Gt(qt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:an,"aria-hidden":!0},fn!==void 0?fn:de.createElement("span",{className:ge()(Pt.split(/\s+/).map(function(Ot){return"".concat(Ot,"-icon")}))},xt))},Ee=We,at=function(Be,Pt,bt,Oe,xt){var Gt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,an=arguments.length>6?arguments[6]:void 0,fn=arguments.length>7?arguments[7]:void 0,Ot=de.useMemo(function(){if((0,He.Z)(Oe)==="object")return Oe.clearIcon;if(xt)return xt},[Oe,xt]),qt=de.useMemo(function(){return!!(!Gt&&Oe&&(bt.length||an)&&!(fn==="combobox"&&an===""))},[Oe,Gt,bt.length,an,fn]);return{allowClear:qt,clearIcon:de.createElement(Ee,{className:"".concat(Be,"-clear"),onMouseDown:Pt,customizeIcon:Ot},"\xD7")}},rt=de.createContext(null);function ct(){return de.useContext(rt)}function Ge(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Be=de.useState(!1),Pt=(0,me.Z)(Be,2),bt=Pt[0],Oe=Pt[1],xt=de.useRef(null),Gt=function(){window.clearTimeout(xt.current)};de.useEffect(function(){return Gt},[]);var an=function(Ot,qt){Gt(),xt.current=window.setTimeout(function(){Oe(Ot),qt&&qt()},ke)};return[bt,an,Gt]}function Ue(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Be=de.useRef(null),Pt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Pt.current)}},[]);function bt(Oe){(Oe||Be.current===null)&&(Be.current=Oe),window.clearTimeout(Pt.current),Pt.current=window.setTimeout(function(){Be.current=null},ke)}return[function(){return Be.current},bt]}function Je(ke,Be,Pt,bt){var Oe=de.useRef(null);Oe.current={open:Be,triggerOpen:Pt,customizedTrigger:bt},de.useEffect(function(){function xt(Gt){var an;if(!((an=Oe.current)!==null&&an!==void 0&&an.customizedTrigger)){var fn=Gt.target;fn.shadowRoot&&Gt.composed&&(fn=Gt.composedPath()[0]||fn),Oe.current.open&&ke().filter(function(Ot){return Ot}).every(function(Ot){return!Ot.contains(fn)&&Ot!==fn})&&Oe.current.triggerOpen(!1)}}return window.addEventListener("mousedown",xt),function(){return window.removeEventListener("mousedown",xt)}},[])}var Ye=fe(10228);function Tt(ke){return ke&&![Ye.Z.ESC,Ye.Z.SHIFT,Ye.Z.BACKSPACE,Ye.Z.TAB,Ye.Z.WIN_KEY,Ye.Z.ALT,Ye.Z.META,Ye.Z.WIN_KEY_RIGHT,Ye.Z.CTRL,Ye.Z.SEMICOLON,Ye.Z.EQUALS,Ye.Z.CAPS_LOCK,Ye.Z.CONTEXT_MENU,Ye.Z.F1,Ye.Z.F2,Ye.Z.F3,Ye.Z.F4,Ye.Z.F5,Ye.Z.F6,Ye.Z.F7,Ye.Z.F8,Ye.Z.F9,Ye.Z.F10,Ye.Z.F11,Ye.Z.F12].includes(ke)}var Le=fe(26112),Ze=fe(11780);function Ct(ke,Be,Pt){var bt=(0,Xe.Z)((0,Xe.Z)({},ke),Pt?Be:{});return Object.keys(Be).forEach(function(Oe){var xt=Be[Oe];typeof xt=="function"&&(bt[Oe]=function(){for(var Gt,an=arguments.length,fn=new Array(an),Ot=0;Ot<an;Ot++)fn[Ot]=arguments[Ot];return xt.apply(void 0,fn),(Gt=ke[Oe])===null||Gt===void 0?void 0:Gt.call.apply(Gt,[ke].concat(fn))})}),bt}var Fe=Ct,et=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ae=function(Be,Pt){var bt=Be.prefixCls,Oe=Be.id,xt=Be.inputElement,Gt=Be.autoFocus,an=Be.autoComplete,fn=Be.editable,Ot=Be.activeDescendantId,qt=Be.value,yt=Be.open,tt=Be.attrs,_t=(0,je.Z)(Be,et),ln=xt||de.createElement("input",null),dn=ln,An=dn.ref,jn=dn.props;return(0,Se.Kp)(!("maxLength"in ln.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ln=de.cloneElement(ln,(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({type:"search"},Fe(_t,jn,!0)),{},{id:Oe,ref:(0,Ie.sQ)(Pt,An),autoComplete:an||"off",autoFocus:Gt,className:ge()("".concat(bt,"-selection-search-input"),jn==null?void 0:jn.className),role:"combobox","aria-expanded":yt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Oe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Oe,"_list"),"aria-activedescendant":yt?Ot:void 0},tt),{},{value:fn?qt:"",readOnly:!fn,unselectable:fn?null:"on",style:(0,Xe.Z)((0,Xe.Z)({},jn.style),{},{opacity:fn?null:0})})),ln},Qe=de.forwardRef(Ae),Mt=Qe;function wt(ke){return Array.isArray(ke)?ke:ke!==void 0?[ke]:[]}var $t=typeof window!="undefined"&&window.document&&window.document.documentElement,Ht=$t;function ve(ke){return ke!=null}function he(ke){return!ke&&ke!==0}function mt(ke){return["string","number"].includes((0,He.Z)(ke))}function Kt(ke){var Be=void 0;return ke&&(mt(ke.title)?Be=ke.title.toString():mt(ke.label)&&(Be=ke.label.toString())),Be}function Ft(ke,Be){Ht?de.useLayoutEffect(ke,Be):de.useEffect(ke,Be)}function Ne(ke){var Be;return(Be=ke.key)!==null&&Be!==void 0?Be:ke.value}var ot=function(Be){Be.preventDefault(),Be.stopPropagation()},ft=function(Be){var Pt=Be.id,bt=Be.prefixCls,Oe=Be.values,xt=Be.open,Gt=Be.searchValue,an=Be.autoClearSearchValue,fn=Be.inputRef,Ot=Be.placeholder,qt=Be.disabled,yt=Be.mode,tt=Be.showSearch,_t=Be.autoFocus,ln=Be.autoComplete,dn=Be.activeDescendantId,An=Be.tabIndex,jn=Be.removeIcon,er=Be.maxTagCount,wn=Be.maxTagTextLength,Jt=Be.maxTagPlaceholder,kn=Jt===void 0?function(Mn){return"+ ".concat(Mn.length," ...")}:Jt,sn=Be.tagRender,nr=Be.onToggleOpen,yr=Be.onRemove,or=Be.onInputChange,Fr=Be.onInputPaste,wr=Be.onInputKeyDown,hr=Be.onInputMouseDown,cr=Be.onInputCompositionStart,Mr=Be.onInputCompositionEnd,br=Be.onInputBlur,dr=de.useRef(null),Sr=(0,de.useState)(0),Lr=(0,me.Z)(Sr,2),fr=Lr[0],lr=Lr[1],ar=(0,de.useState)(!1),Ir=(0,me.Z)(ar,2),Vr=Ir[0],Kr=Ir[1],Dr="".concat(bt,"-selection"),_r=xt||yt==="multiple"&&an===!1||yt==="tags"?Gt:"",Nr=yt==="tags"||yt==="multiple"&&an===!1||tt&&(xt||Vr);Ft(function(){lr(dr.current.scrollWidth)},[_r]);var pr=function(vn,Un,vr,nn,Vt){return de.createElement("span",{title:Kt(vn),className:ge()("".concat(Dr,"-item"),(0,Me.Z)({},"".concat(Dr,"-item-disabled"),vr))},de.createElement("span",{className:"".concat(Dr,"-item-content")},Un),nn&&de.createElement(Ee,{className:"".concat(Dr,"-item-remove"),onMouseDown:ot,onClick:Vt,customizeIcon:jn},"\xD7"))},Er=function(vn,Un,vr,nn,Vt,pn){var bn=function(mr){ot(mr),nr(!xt)};return de.createElement("span",{onMouseDown:bn},sn({label:Un,value:vn,disabled:vr,closable:nn,onClose:Vt,isMaxTag:!!pn}))},Cr=function(vn){var Un=vn.disabled,vr=vn.label,nn=vn.value,Vt=!qt&&!Un,pn=vr;if(typeof wn=="number"&&(typeof vr=="string"||typeof vr=="number")){var bn=String(pn);bn.length>wn&&(pn="".concat(bn.slice(0,wn),"..."))}var Xn=function(sr){sr&&sr.stopPropagation(),yr(vn)};return typeof sn=="function"?Er(nn,pn,Un,Vt,Xn):pr(vn,pn,Un,Vt,Xn)},qn=function(vn){if(!Oe.length)return null;var Un=typeof kn=="function"?kn(vn):kn;return typeof sn=="function"?Er(void 0,Un,!1,!1,void 0,!0):pr({title:Un},Un,!1)},Wt=de.createElement("div",{className:"".concat(Dr,"-search"),style:{width:fr},onFocus:function(){Kr(!0)},onBlur:function(){Kr(!1)}},de.createElement(Mt,{ref:fn,open:xt,prefixCls:bt,id:Pt,inputElement:null,disabled:qt,autoFocus:_t,autoComplete:ln,editable:Nr,activeDescendantId:dn,value:_r,onKeyDown:wr,onMouseDown:hr,onChange:or,onPaste:Fr,onCompositionStart:cr,onCompositionEnd:Mr,onBlur:br,tabIndex:An,attrs:(0,Le.Z)(Be,!0)}),de.createElement("span",{ref:dr,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},_r,"\xA0")),en=de.createElement(Ze.Z,{prefixCls:"".concat(Dr,"-overflow"),data:Oe,renderItem:Cr,renderRest:qn,suffix:Wt,itemKey:Ne,maxCount:er});return de.createElement("span",{className:"".concat(Dr,"-wrap")},en,!Oe.length&&!_r&&de.createElement("span",{className:"".concat(Dr,"-placeholder")},Ot))},rn=ft,kt=function(Be){var Pt=Be.inputElement,bt=Be.prefixCls,Oe=Be.id,xt=Be.inputRef,Gt=Be.disabled,an=Be.autoFocus,fn=Be.autoComplete,Ot=Be.activeDescendantId,qt=Be.mode,yt=Be.open,tt=Be.values,_t=Be.placeholder,ln=Be.tabIndex,dn=Be.showSearch,An=Be.searchValue,jn=Be.activeValue,er=Be.maxLength,wn=Be.onInputKeyDown,Jt=Be.onInputMouseDown,kn=Be.onInputChange,sn=Be.onInputPaste,nr=Be.onInputCompositionStart,yr=Be.onInputCompositionEnd,or=Be.onInputBlur,Fr=Be.title,wr=de.useState(!1),hr=(0,me.Z)(wr,2),cr=hr[0],Mr=hr[1],br=qt==="combobox",dr=br||dn,Sr=tt[0],Lr=An||"";br&&jn&&!cr&&(Lr=jn),de.useEffect(function(){br&&Mr(!1)},[br,jn]);var fr=qt!=="combobox"&&!yt&&!dn?!1:!!Lr,lr=Fr===void 0?Kt(Sr):Fr,ar=de.useMemo(function(){return Sr?null:de.createElement("span",{className:"".concat(bt,"-selection-placeholder"),style:fr?{visibility:"hidden"}:void 0},_t)},[Sr,fr,_t,bt]);return de.createElement("span",{className:"".concat(bt,"-selection-wrap")},de.createElement("span",{className:"".concat(bt,"-selection-search")},de.createElement(Mt,{ref:xt,prefixCls:bt,id:Oe,open:yt,inputElement:Pt,disabled:Gt,autoFocus:an,autoComplete:fn,editable:dr,activeDescendantId:Ot,value:Lr,onKeyDown:wn,onMouseDown:Jt,onChange:function(Vr){Mr(!0),kn(Vr)},onPaste:sn,onCompositionStart:nr,onCompositionEnd:yr,onBlur:or,tabIndex:ln,attrs:(0,Le.Z)(Be,!0),maxLength:br?er:void 0})),!br&&Sr?de.createElement("span",{className:"".concat(bt,"-selection-item"),title:lr,style:fr?{visibility:"hidden"}:void 0},Sr.label):null,ar)},_e=kt,Ce=function(Be,Pt){var bt=(0,de.useRef)(null),Oe=(0,de.useRef)(!1),xt=Be.prefixCls,Gt=Be.open,an=Be.mode,fn=Be.showSearch,Ot=Be.tokenWithEnter,qt=Be.disabled,yt=Be.prefix,tt=Be.autoClearSearchValue,_t=Be.onSearch,ln=Be.onSearchSubmit,dn=Be.onToggleOpen,An=Be.onInputKeyDown,jn=Be.onInputBlur,er=Be.domRef;de.useImperativeHandle(Pt,function(){return{focus:function(lr){bt.current.focus(lr)},blur:function(){bt.current.blur()}}});var wn=Ue(0),Jt=(0,me.Z)(wn,2),kn=Jt[0],sn=Jt[1],nr=function(lr){var ar=lr.which,Ir=bt.current instanceof HTMLTextAreaElement;!Ir&&Gt&&(ar===Ye.Z.UP||ar===Ye.Z.DOWN)&&lr.preventDefault(),An&&An(lr),ar===Ye.Z.ENTER&&an==="tags"&&!Oe.current&&!Gt&&(ln==null||ln(lr.target.value)),!(Ir&&!Gt&&~[Ye.Z.UP,Ye.Z.DOWN,Ye.Z.LEFT,Ye.Z.RIGHT].indexOf(ar))&&Tt(ar)&&dn(!0)},yr=function(){sn(!0)},or=(0,de.useRef)(null),Fr=function(lr){_t(lr,!0,Oe.current)!==!1&&dn(!0)},wr=function(){Oe.current=!0},hr=function(lr){Oe.current=!1,an!=="combobox"&&Fr(lr.target.value)},cr=function(lr){var ar=lr.target.value;if(Ot&&or.current&&/[\r\n]/.test(or.current)){var Ir=or.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ar=ar.replace(Ir,or.current)}or.current=null,Fr(ar)},Mr=function(lr){var ar=lr.clipboardData,Ir=ar==null?void 0:ar.getData("text");or.current=Ir||""},br=function(lr){var ar=lr.target;if(ar!==bt.current){var Ir=document.body.style.msTouchAction!==void 0;Ir?setTimeout(function(){bt.current.focus()}):bt.current.focus()}},dr=function(lr){var ar=kn();lr.target!==bt.current&&!ar&&!(an==="combobox"&&qt)&&lr.preventDefault(),(an!=="combobox"&&(!fn||!ar)||!Gt)&&(Gt&&tt!==!1&&_t("",!0,!1),dn())},Sr={inputRef:bt,onInputKeyDown:nr,onInputMouseDown:yr,onInputChange:cr,onInputPaste:Mr,onInputCompositionStart:wr,onInputCompositionEnd:hr,onInputBlur:jn},Lr=an==="multiple"||an==="tags"?de.createElement(rn,(0,oe.Z)({},Be,Sr)):de.createElement(_e,(0,oe.Z)({},Be,Sr));return de.createElement("div",{ref:er,className:"".concat(xt,"-selector"),onClick:br,onMouseDown:dr},yt&&de.createElement("div",{className:"".concat(xt,"-prefix")},yt),Lr)},ze=de.forwardRef(Ce),st=ze,Te=fe(65030),Ve=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],$e=function(Be){var Pt=Be===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Pt,adjustY:1},htmlRegion:"scroll"}}},pt=function(Be,Pt){var bt=Be.prefixCls,Oe=Be.disabled,xt=Be.visible,Gt=Be.children,an=Be.popupElement,fn=Be.animation,Ot=Be.transitionName,qt=Be.dropdownStyle,yt=Be.dropdownClassName,tt=Be.direction,_t=tt===void 0?"ltr":tt,ln=Be.placement,dn=Be.builtinPlacements,An=Be.dropdownMatchSelectWidth,jn=Be.dropdownRender,er=Be.dropdownAlign,wn=Be.getPopupContainer,Jt=Be.empty,kn=Be.getTriggerDOMNode,sn=Be.onPopupVisibleChange,nr=Be.onPopupMouseEnter,yr=(0,je.Z)(Be,Ve),or="".concat(bt,"-dropdown"),Fr=an;jn&&(Fr=jn(an));var wr=de.useMemo(function(){return dn||$e(An)},[dn,An]),hr=fn?"".concat(or,"-").concat(fn):Ot,cr=typeof An=="number",Mr=de.useMemo(function(){return cr?null:An===!1?"minWidth":"width"},[An,cr]),br=qt;cr&&(br=(0,Xe.Z)((0,Xe.Z)({},br),{},{width:An}));var dr=de.useRef(null);return de.useImperativeHandle(Pt,function(){return{getPopupElement:function(){var Lr;return(Lr=dr.current)===null||Lr===void 0?void 0:Lr.popupElement}}}),de.createElement(Te.Z,(0,oe.Z)({},yr,{showAction:sn?["click"]:[],hideAction:sn?["click"]:[],popupPlacement:ln||(_t==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wr,prefixCls:or,popupTransitionName:hr,popup:de.createElement("div",{onMouseEnter:nr},Fr),ref:dr,stretch:Mr,popupAlign:er,popupVisible:xt,getPopupContainer:wn,popupClassName:ge()(yt,(0,Me.Z)({},"".concat(or,"-empty"),Jt)),popupStyle:br,getTriggerDOMNode:kn,onPopupVisibleChange:sn}),Gt)},St=de.forwardRef(pt),Et=St,Bt=fe(66712);function Nt(ke,Be){var Pt=ke.key,bt;return"value"in ke&&(bt=ke.value),Pt!=null?Pt:bt!==void 0?bt:"rc-index-key-".concat(Be)}function cn(ke){return typeof ke!="undefined"&&!Number.isNaN(ke)}function Qt(ke,Be){var Pt=ke||{},bt=Pt.label,Oe=Pt.value,xt=Pt.options,Gt=Pt.groupLabel,an=bt||(Be?"children":"label");return{label:an,value:Oe||"value",options:xt||"options",groupLabel:Gt||an}}function le(ke){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pt=Be.fieldNames,bt=Be.childrenAsData,Oe=[],xt=Qt(Pt,!1),Gt=xt.label,an=xt.value,fn=xt.options,Ot=xt.groupLabel;function qt(yt,tt){Array.isArray(yt)&&yt.forEach(function(_t){if(tt||!(fn in _t)){var ln=_t[an];Oe.push({key:Nt(_t,Oe.length),groupOption:tt,data:_t,label:_t[Gt],value:ln})}else{var dn=_t[Ot];dn===void 0&&bt&&(dn=_t.label),Oe.push({key:Nt(_t,Oe.length),group:!0,data:_t,label:dn}),qt(_t[fn],!0)}})}return qt(ke,!1),Oe}function te(ke){var Be=(0,Xe.Z)({},ke);return"props"in Be||Object.defineProperty(Be,"props",{get:function(){return(0,Se.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Be}}),Be}var ee=function(Be,Pt,bt){if(!Pt||!Pt.length)return null;var Oe=!1,xt=function an(fn,Ot){var qt=(0,Bt.Z)(Ot),yt=qt[0],tt=qt.slice(1);if(!yt)return[fn];var _t=fn.split(yt);return Oe=Oe||_t.length>1,_t.reduce(function(ln,dn){return[].concat((0,ht.Z)(ln),(0,ht.Z)(an(dn,tt)))},[]).filter(Boolean)},Gt=xt(Be,Pt);return Oe?typeof bt!="undefined"?Gt.slice(0,bt):Gt:null},ie=de.createContext(null),ue=ie;function ne(ke){var Be=ke.visible,Pt=ke.values;if(!Be)return null;var bt=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Pt.slice(0,bt).map(function(Oe){var xt=Oe.label,Gt=Oe.value;return["number","string"].includes((0,He.Z)(xt))?xt:Gt}).join(", ")),Pt.length>bt?", ...":null)}var be=["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","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],gt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ye=function(Be){return Be==="tags"||Be==="multiple"},Pe=de.forwardRef(function(ke,Be){var Pt,bt=ke.id,Oe=ke.prefixCls,xt=ke.className,Gt=ke.showSearch,an=ke.tagRender,fn=ke.direction,Ot=ke.omitDomProps,qt=ke.displayValues,yt=ke.onDisplayValuesChange,tt=ke.emptyOptions,_t=ke.notFoundContent,ln=_t===void 0?"Not Found":_t,dn=ke.onClear,An=ke.mode,jn=ke.disabled,er=ke.loading,wn=ke.getInputElement,Jt=ke.getRawInputElement,kn=ke.open,sn=ke.defaultOpen,nr=ke.onDropdownVisibleChange,yr=ke.activeValue,or=ke.onActiveValueChange,Fr=ke.activeDescendantId,wr=ke.searchValue,hr=ke.autoClearSearchValue,cr=ke.onSearch,Mr=ke.onSearchSplit,br=ke.tokenSeparators,dr=ke.allowClear,Sr=ke.prefix,Lr=ke.suffixIcon,fr=ke.clearIcon,lr=ke.OptionList,ar=ke.animation,Ir=ke.transitionName,Vr=ke.dropdownStyle,Kr=ke.dropdownClassName,Dr=ke.dropdownMatchSelectWidth,_r=ke.dropdownRender,Nr=ke.dropdownAlign,pr=ke.placement,Er=ke.builtinPlacements,Cr=ke.getPopupContainer,qn=ke.showAction,Wt=qn===void 0?[]:qn,en=ke.onFocus,Mn=ke.onBlur,vn=ke.onKeyUp,Un=ke.onKeyDown,vr=ke.onMouseDown,nn=(0,je.Z)(ke,be),Vt=ye(An),pn=(Gt!==void 0?Gt:Vt)||An==="combobox",bn=(0,Xe.Z)({},nn);gt.forEach(function(gr){delete bn[gr]}),Ot==null||Ot.forEach(function(gr){delete bn[gr]});var Xn=de.useState(!1),mr=(0,me.Z)(Xn,2),sr=mr[0],Br=mr[1];de.useEffect(function(){Br((0,Re.Z)())},[]);var Ar=de.useRef(null),Tr=de.useRef(null),Zr=de.useRef(null),Rr=de.useRef(null),zr=de.useRef(null),ti=de.useRef(!1),Bi=Ge(),Oi=(0,me.Z)(Bi,3),Ci=Oi[0],vi=Oi[1],Xi=Oi[2];de.useImperativeHandle(Be,function(){var gr,ir;return{focus:(gr=Rr.current)===null||gr===void 0?void 0:gr.focus,blur:(ir=Rr.current)===null||ir===void 0?void 0:ir.blur,scrollTo:function(hi){var Jr;return(Jr=zr.current)===null||Jr===void 0?void 0:Jr.scrollTo(hi)},nativeElement:Ar.current||Tr.current}});var xr=de.useMemo(function(){var gr;if(An!=="combobox")return wr;var ir=(gr=qt[0])===null||gr===void 0?void 0:gr.value;return typeof ir=="string"||typeof ir=="number"?String(ir):""},[wr,An,qt]),ta=An==="combobox"&&typeof wn=="function"&&wn()||null,ni=typeof Jt=="function"&&Jt(),Pi=(0,Ie.x1)(Tr,ni==null||(Pt=ni.props)===null||Pt===void 0?void 0:Pt.ref),oa=de.useState(!1),Ji=(0,me.Z)(oa,2),mi=Ji[0],Ii=Ji[1];(0,lt.Z)(function(){Ii(!0)},[]);var Gr=(0,Ke.Z)(!1,{defaultValue:sn,value:kn}),_i=(0,me.Z)(Gr,2),la=_i[0],Zi=_i[1],qr=mi?la:!1,ba=!ln&&tt;(jn||ba&&qr&&An==="combobox")&&(qr=!1);var sa=ba?!1:qr,Kn=de.useCallback(function(gr){var ir=gr!==void 0?gr:!qr;jn||(Zi(ir),qr!==ir&&(nr==null||nr(ir)))},[jn,qr,Zi,nr]),rr=de.useMemo(function(){return(br||[]).some(function(gr){return[`
|
|
`,`\r
|
|
`].includes(gr)})},[br]),$n=de.useContext(ue)||{},tr=$n.maxCount,kr=$n.rawValues,Hr=function(ir,ci,hi){if(!(Vt&&cn(tr)&&(kr==null?void 0:kr.size)>=tr)){var Jr=!0,ri=ir;or==null||or(null);var ji=ee(ir,br,cn(tr)?tr-kr.size:void 0),zi=hi?null:ji;return An!=="combobox"&&zi&&(ri="",Mr==null||Mr(zi),Kn(!1),Jr=!1),cr&&xr!==ri&&cr(ri,{source:ci?"typing":"effect"}),Jr}},Gi=function(ir){!ir||!ir.trim()||cr(ir,{source:"submit"})};de.useEffect(function(){!qr&&!Vt&&An!=="combobox"&&Hr("",!1,!1)},[qr]),de.useEffect(function(){la&&jn&&Zi(!1),jn&&!ti.current&&vi(!1)},[jn]);var gi=Ue(),ui=(0,me.Z)(gi,2),Xr=ui[0],Hi=ui[1],Qi=de.useRef(!1),Ai=function(ir){var ci=Xr(),hi=ir.key,Jr=hi==="Enter";if(Jr&&(An!=="combobox"&&ir.preventDefault(),qr||Kn(!0)),Hi(!!xr),hi==="Backspace"&&!ci&&Vt&&!xr&&qt.length){for(var ri=(0,ht.Z)(qt),ji=null,zi=ri.length-1;zi>=0;zi-=1){var ra=ri[zi];if(!ra.disabled){ri.splice(zi,1),ji=ra;break}}ji&&yt(ri,{type:"remove",values:[ji]})}for(var Fi=arguments.length,Mi=new Array(Fi>1?Fi-1:0),Ui=1;Ui<Fi;Ui++)Mi[Ui-1]=arguments[Ui];if(qr&&(!Jr||!Qi.current)){var ca;Jr&&(Qi.current=!0),(ca=zr.current)===null||ca===void 0||ca.onKeyDown.apply(ca,[ir].concat(Mi))}Un==null||Un.apply(void 0,[ir].concat(Mi))},qi=function(ir){for(var ci=arguments.length,hi=new Array(ci>1?ci-1:0),Jr=1;Jr<ci;Jr++)hi[Jr-1]=arguments[Jr];if(qr){var ri;(ri=zr.current)===null||ri===void 0||ri.onKeyUp.apply(ri,[ir].concat(hi))}ir.key==="Enter"&&(Qi.current=!1),vn==null||vn.apply(void 0,[ir].concat(hi))},na=function(ir){var ci=qt.filter(function(hi){return hi!==ir});yt(ci,{type:"remove",values:[ir]})},Vi=function(){Qi.current=!1},Fa=de.useRef(!1),Vo=function(){vi(!0),jn||(en&&!Fa.current&&en.apply(void 0,arguments),Wt.includes("focus")&&Kn(!0)),Fa.current=!0},yo=function(){ti.current=!0,vi(!1,function(){Fa.current=!1,ti.current=!1,Kn(!1)}),!jn&&(xr&&(An==="tags"?cr(xr,{source:"submit"}):An==="multiple"&&cr("",{source:"blur"})),Mn&&Mn.apply(void 0,arguments))},$i=[];de.useEffect(function(){return function(){$i.forEach(function(gr){return clearTimeout(gr)}),$i.splice(0,$i.length)}},[]);var ua=function(ir){var ci,hi=ir.target,Jr=(ci=Zr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Jr&&Jr.contains(hi)){var ri=setTimeout(function(){var Fi=$i.indexOf(ri);if(Fi!==-1&&$i.splice(Fi,1),Xi(),!sr&&!Jr.contains(document.activeElement)){var Mi;(Mi=Rr.current)===null||Mi===void 0||Mi.focus()}});$i.push(ri)}for(var ji=arguments.length,zi=new Array(ji>1?ji-1:0),ra=1;ra<ji;ra++)zi[ra-1]=arguments[ra];vr==null||vr.apply(void 0,[ir].concat(zi))},Wi=de.useState({}),bo=(0,me.Z)(Wi,2),Co=bo[1];function jo(){Co({})}var xo;ni&&(xo=function(ir){Kn(ir)}),Je(function(){var gr;return[Ar.current,(gr=Zr.current)===null||gr===void 0?void 0:gr.getPopupElement()]},sa,Kn,!!ni);var Uo=de.useMemo(function(){return(0,Xe.Z)((0,Xe.Z)({},ke),{},{notFoundContent:ln,open:qr,triggerOpen:sa,id:bt,showSearch:pn,multiple:Vt,toggleOpen:Kn})},[ke,ln,sa,qr,bt,pn,Vt,Kn]),Ua=!!Lr||er,Ka;Ua&&(Ka=de.createElement(Ee,{className:ge()("".concat(Oe,"-arrow"),(0,Me.Z)({},"".concat(Oe,"-arrow-loading"),er)),customizeIcon:Lr,customizeIconProps:{loading:er,searchValue:xr,open:qr,focused:Ci,showSearch:pn}}));var Ca=function(){var ir;dn==null||dn(),(ir=Rr.current)===null||ir===void 0||ir.focus(),yt([],{type:"clear",values:qt}),Hr("",!1,!1)},Ya=at(Oe,Ca,qt,dr,fr,jn,xr,An),wo=Ya.allowClear,Xa=Ya.clearIcon,Ma=de.createElement(lr,{ref:zr}),So=ge()(Oe,xt,(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(Oe,"-focused"),Ci),"".concat(Oe,"-multiple"),Vt),"".concat(Oe,"-single"),!Vt),"".concat(Oe,"-allow-clear"),dr),"".concat(Oe,"-show-arrow"),Ua),"".concat(Oe,"-disabled"),jn),"".concat(Oe,"-loading"),er),"".concat(Oe,"-open"),qr),"".concat(Oe,"-customize-input"),ta),"".concat(Oe,"-show-search"),pn)),La=de.createElement(Et,{ref:Zr,disabled:jn,prefixCls:Oe,visible:sa,popupElement:Ma,animation:ar,transitionName:Ir,dropdownStyle:Vr,dropdownClassName:Kr,direction:fn,dropdownMatchSelectWidth:Dr,dropdownRender:_r,dropdownAlign:Nr,placement:pr,builtinPlacements:Er,getPopupContainer:Cr,empty:tt,getTriggerDOMNode:function(ir){return Tr.current||ir},onPopupVisibleChange:xo,onPopupMouseEnter:jo},ni?de.cloneElement(ni,{ref:Pi}):de.createElement(st,(0,oe.Z)({},ke,{domRef:Tr,prefixCls:Oe,inputElement:ta,ref:Rr,id:bt,prefix:Sr,showSearch:pn,autoClearSearchValue:hr,mode:An,activeDescendantId:Fr,tagRender:an,values:qt,open:qr,onToggleOpen:Kn,activeValue:yr,searchValue:xr,onSearch:Hr,onSearchSubmit:Gi,onRemove:na,tokenWithEnter:rr,onInputBlur:Vi}))),xi;return ni?xi=La:xi=de.createElement("div",(0,oe.Z)({className:So},bn,{ref:Ar,onMouseDown:ua,onKeyDown:Ai,onKeyUp:qi,onFocus:Vo,onBlur:yo}),de.createElement(ne,{visible:Ci&&!qr,values:qt}),La,Ka,wo&&Xa),de.createElement(rt.Provider,{value:Uo},xi)}),pe=Pe,ut=function(){return null};ut.isSelectOptGroup=!0;var dt=ut,vt=function(){return null};vt.isSelectOption=!0;var Dt=vt,jt=fe(80547),It=fe(2738),Xt=fe(48911);function Fn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Sn=["disabled","title","children","style","className"];function Ln(ke){return typeof ke=="string"||typeof ke=="number"}var Tn=function(Be,Pt){var bt=ct(),Oe=bt.prefixCls,xt=bt.id,Gt=bt.open,an=bt.multiple,fn=bt.mode,Ot=bt.searchValue,qt=bt.toggleOpen,yt=bt.notFoundContent,tt=bt.onPopupScroll,_t=de.useContext(ue),ln=_t.maxCount,dn=_t.flattenOptions,An=_t.onActiveValue,jn=_t.defaultActiveFirstOption,er=_t.onSelect,wn=_t.menuItemSelectedIcon,Jt=_t.rawValues,kn=_t.fieldNames,sn=_t.virtual,nr=_t.direction,yr=_t.listHeight,or=_t.listItemHeight,Fr=_t.optionRender,wr="".concat(Oe,"-item"),hr=(0,jt.Z)(function(){return dn},[Gt,dn],function(qn,Wt){return Wt[0]&&qn[1]!==Wt[1]}),cr=de.useRef(null),Mr=de.useMemo(function(){return an&&cn(ln)&&(Jt==null?void 0:Jt.size)>=ln},[an,ln,Jt==null?void 0:Jt.size]),br=function(Wt){Wt.preventDefault()},dr=function(Wt){var en;(en=cr.current)===null||en===void 0||en.scrollTo(typeof Wt=="number"?{index:Wt}:Wt)},Sr=de.useCallback(function(qn){return fn==="combobox"?!1:Jt.has(qn)},[fn,(0,ht.Z)(Jt).toString(),Jt.size]),Lr=function(Wt){for(var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Mn=hr.length,vn=0;vn<Mn;vn+=1){var Un=(Wt+vn*en+Mn)%Mn,vr=hr[Un]||{},nn=vr.group,Vt=vr.data;if(!nn&&!(Vt!=null&&Vt.disabled)&&(Sr(Vt.value)||!Mr))return Un}return-1},fr=de.useState(function(){return Lr(0)}),lr=(0,me.Z)(fr,2),ar=lr[0],Ir=lr[1],Vr=function(Wt){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ir(Wt);var Mn={source:en?"keyboard":"mouse"},vn=hr[Wt];if(!vn){An(null,-1,Mn);return}An(vn.value,Wt,Mn)};(0,de.useEffect)(function(){Vr(jn!==!1?Lr(0):-1)},[hr.length,Ot]);var Kr=de.useCallback(function(qn){return fn==="combobox"?String(qn).toLowerCase()===Ot.toLowerCase():Jt.has(qn)},[fn,Ot,(0,ht.Z)(Jt).toString(),Jt.size]);(0,de.useEffect)(function(){var qn=setTimeout(function(){if(!an&&Gt&&Jt.size===1){var en=Array.from(Jt)[0],Mn=hr.findIndex(function(vn){var Un=vn.data;return Ot?String(Un.value).startsWith(Ot):Un.value===en});Mn!==-1&&(Vr(Mn),dr(Mn))}});if(Gt){var Wt;(Wt=cr.current)===null||Wt===void 0||Wt.scrollTo(void 0)}return function(){return clearTimeout(qn)}},[Gt,Ot]);var Dr=function(Wt){Wt!==void 0&&er(Wt,{selected:!Jt.has(Wt)}),an||qt(!1)};if(de.useImperativeHandle(Pt,function(){return{onKeyDown:function(Wt){var en=Wt.which,Mn=Wt.ctrlKey;switch(en){case Ye.Z.N:case Ye.Z.P:case Ye.Z.UP:case Ye.Z.DOWN:{var vn=0;if(en===Ye.Z.UP?vn=-1:en===Ye.Z.DOWN?vn=1:Fn()&&Mn&&(en===Ye.Z.N?vn=1:en===Ye.Z.P&&(vn=-1)),vn!==0){var Un=Lr(ar+vn,vn);dr(Un),Vr(Un,!0)}break}case Ye.Z.TAB:case Ye.Z.ENTER:{var vr,nn=hr[ar];nn&&!(nn!=null&&(vr=nn.data)!==null&&vr!==void 0&&vr.disabled)&&!Mr?Dr(nn.value):Dr(void 0),Gt&&Wt.preventDefault();break}case Ye.Z.ESC:qt(!1),Gt&&Wt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Wt){dr(Wt)}}}),hr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(xt,"_list"),className:"".concat(wr,"-empty"),onMouseDown:br},yt);var _r=Object.keys(kn).map(function(qn){return kn[qn]}),Nr=function(Wt){return Wt.label};function pr(qn,Wt){var en=qn.group;return{role:en?"presentation":"option",id:"".concat(xt,"_list_").concat(Wt)}}var Er=function(Wt){var en=hr[Wt];if(!en)return null;var Mn=en.data||{},vn=Mn.value,Un=en.group,vr=(0,Le.Z)(Mn,!0),nn=Nr(en);return en?de.createElement("div",(0,oe.Z)({"aria-label":typeof nn=="string"&&!Un?nn:null},vr,{key:Wt},pr(en,Wt),{"aria-selected":Kr(vn)}),vn):null},Cr={role:"listbox",id:"".concat(xt,"_list")};return de.createElement(de.Fragment,null,sn&&de.createElement("div",(0,oe.Z)({},Cr,{style:{height:0,width:0,overflow:"hidden"}}),Er(ar-1),Er(ar),Er(ar+1)),de.createElement(Xt.Z,{itemKey:"key",ref:cr,data:hr,height:yr,itemHeight:or,fullHeight:!1,onMouseDown:br,onScroll:tt,virtual:sn,direction:nr,innerProps:sn?null:Cr},function(qn,Wt){var en=qn.group,Mn=qn.groupOption,vn=qn.data,Un=qn.label,vr=qn.value,nn=vn.key;if(en){var Vt,pn=(Vt=vn.title)!==null&&Vt!==void 0?Vt:Ln(Un)?Un.toString():void 0;return de.createElement("div",{className:ge()(wr,"".concat(wr,"-group"),vn.className),title:pn},Un!==void 0?Un:nn)}var bn=vn.disabled,Xn=vn.title,mr=vn.children,sr=vn.style,Br=vn.className,Ar=(0,je.Z)(vn,Sn),Tr=(0,It.Z)(Ar,_r),Zr=Sr(vr),Rr=bn||!Zr&&Mr,zr="".concat(wr,"-option"),ti=ge()(wr,zr,Br,(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(zr,"-grouped"),Mn),"".concat(zr,"-active"),ar===Wt&&!Rr),"".concat(zr,"-disabled"),Rr),"".concat(zr,"-selected"),Zr)),Bi=Nr(qn),Oi=!wn||typeof wn=="function"||Zr,Ci=typeof Bi=="number"?Bi:Bi||vr,vi=Ln(Ci)?Ci.toString():void 0;return Xn!==void 0&&(vi=Xn),de.createElement("div",(0,oe.Z)({},(0,Le.Z)(Tr),sn?{}:pr(qn,Wt),{"aria-selected":Kr(vr),className:ti,title:vi,onMouseMove:function(){ar===Wt||Rr||Vr(Wt)},onClick:function(){Rr||Dr(vr)},style:sr}),de.createElement("div",{className:"".concat(zr,"-content")},typeof Fr=="function"?Fr(qn,{index:Wt}):Ci),de.isValidElement(wn)||Zr,Oi&&de.createElement(Ee,{className:"".concat(wr,"-option-state"),customizeIcon:wn,customizeIconProps:{value:vr,disabled:Rr,isSelected:Zr}},Zr?"\u2713":null))}))},In=de.forwardRef(Tn),Dn=In,Cn=function(ke,Be){var Pt=de.useRef({values:new Map,options:new Map}),bt=de.useMemo(function(){var xt=Pt.current,Gt=xt.values,an=xt.options,fn=ke.map(function(yt){if(yt.label===void 0){var tt;return(0,Xe.Z)((0,Xe.Z)({},yt),{},{label:(tt=Gt.get(yt.value))===null||tt===void 0?void 0:tt.label})}return yt}),Ot=new Map,qt=new Map;return fn.forEach(function(yt){Ot.set(yt.value,yt),qt.set(yt.value,Be.get(yt.value)||an.get(yt.value))}),Pt.current.values=Ot,Pt.current.options=qt,fn},[ke,Be]),Oe=de.useCallback(function(xt){return Be.get(xt)||Pt.current.options.get(xt)},[Be]);return[bt,Oe]};function Hn(ke,Be){return wt(ke).join("").toUpperCase().includes(Be)}var Yn=function(ke,Be,Pt,bt,Oe){return de.useMemo(function(){if(!Pt||bt===!1)return ke;var xt=Be.options,Gt=Be.label,an=Be.value,fn=[],Ot=typeof bt=="function",qt=Pt.toUpperCase(),yt=Ot?bt:function(_t,ln){return Oe?Hn(ln[Oe],qt):ln[xt]?Hn(ln[Gt!=="children"?Gt:"label"],qt):Hn(ln[an],qt)},tt=Ot?function(_t){return te(_t)}:function(_t){return _t};return ke.forEach(function(_t){if(_t[xt]){var ln=yt(Pt,tt(_t));if(ln)fn.push(_t);else{var dn=_t[xt].filter(function(An){return yt(Pt,tt(An))});dn.length&&fn.push((0,Xe.Z)((0,Xe.Z)({},_t),{},(0,Me.Z)({},xt,dn)))}return}yt(Pt,tt(_t))&&fn.push(_t)}),fn},[ke,bt,Oe,Pt,Be])},yn=fe(6551),On=fe(11592),zn=["children","value"],Wn=["children"];function Lt(ke){var Be=ke,Pt=Be.key,bt=Be.props,Oe=bt.children,xt=bt.value,Gt=(0,je.Z)(bt,zn);return(0,Xe.Z)({key:Pt,value:xt!==void 0?xt:Pt,children:Oe},Gt)}function tn(ke){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,On.Z)(ke).map(function(Pt,bt){if(!de.isValidElement(Pt)||!Pt.type)return null;var Oe=Pt,xt=Oe.type.isSelectOptGroup,Gt=Oe.key,an=Oe.props,fn=an.children,Ot=(0,je.Z)(an,Wn);return Be||!xt?Lt(Pt):(0,Xe.Z)((0,Xe.Z)({key:"__RC_SELECT_GRP__".concat(Gt===null?bt:Gt,"__"),label:Gt},Ot),{},{options:tn(fn)})}).filter(function(Pt){return Pt})}var un=function(Be,Pt,bt,Oe,xt){return de.useMemo(function(){var Gt=Be,an=!Be;an&&(Gt=tn(Pt));var fn=new Map,Ot=new Map,qt=function(_t,ln,dn){dn&&typeof dn=="string"&&_t.set(ln[dn],ln)},yt=function tt(_t){for(var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dn=0;dn<_t.length;dn+=1){var An=_t[dn];!An[bt.options]||ln?(fn.set(An[bt.value],An),qt(Ot,An,bt.label),qt(Ot,An,Oe),qt(Ot,An,xt)):tt(An[bt.options],!0)}};return yt(Gt),{options:Gt,valueOptions:fn,labelOptions:Ot}},[Be,Pt,bt,Oe,xt])},En=un;function xn(ke){var Be=de.useRef();Be.current=ke;var Pt=de.useCallback(function(){return Be.current.apply(Be,arguments)},[]);return Pt}function Rn(ke){var Be=ke.mode,Pt=ke.options,bt=ke.children,Oe=ke.backfill,xt=ke.allowClear,Gt=ke.placeholder,an=ke.getInputElement,fn=ke.showSearch,Ot=ke.onSearch,qt=ke.defaultOpen,yt=ke.autoFocus,tt=ke.labelInValue,_t=ke.value,ln=ke.inputValue,dn=ke.optionLabelProp,An=isMultiple(Be),jn=fn!==void 0?fn:An||Be==="combobox",er=Pt||convertChildrenToData(bt);if(warning(Be!=="tags"||er.every(function(sn){return!sn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Be==="tags"||Be==="combobox"){var wn=er.some(function(sn){return sn.options?sn.options.some(function(nr){return typeof("value"in nr?nr.value:nr.key)=="number"}):typeof("value"in sn?sn.value:sn.key)=="number"});warning(!wn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Be!=="combobox"||!dn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Be==="combobox"||!Oe,"`backfill` only works with `combobox` mode."),warning(Be==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(Be!=="combobox"||!an||!xt||!Gt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ot&&!jn&&Be!=="combobox"&&Be!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!qt||yt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),_t!=null){var Jt=toArray(_t);warning(!tt||Jt.every(function(sn){return _typeof(sn)==="object"&&("key"in sn||"value"in sn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!An||Array.isArray(_t),"`value` should be array when `mode` is `multiple` or `tags`")}if(bt){var kn=null;toNodeArray(bt).some(function(sn){if(!React.isValidElement(sn)||!sn.type)return!1;var nr=sn,yr=nr.type;if(yr.isSelectOption)return!1;if(yr.isSelectOptGroup){var or=toNodeArray(sn.props.children).every(function(Fr){return!React.isValidElement(Fr)||!sn.type||Fr.type.isSelectOption?!0:(kn=Fr.type,!1)});return!or}return kn=yr,!0}),kn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(kn.displayName||kn.name||kn,"`.")),warning(ln===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Zn(ke,Be){if(ke){var Pt=function bt(Oe){for(var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gt=0;Gt<Oe.length;Gt++){var an=Oe[Gt];if(an[Be==null?void 0:Be.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!xt&&Array.isArray(an[Be==null?void 0:Be.options])&&bt(an[Be==null?void 0:Be.options],!0))break}};Pt(ke)}}var _n=null,Nn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Jn=["inputValue"];function Rt(ke){return!ke||(0,He.Z)(ke)!=="object"}var it=de.forwardRef(function(ke,Be){var Pt=ke.id,bt=ke.mode,Oe=ke.prefixCls,xt=Oe===void 0?"rc-select":Oe,Gt=ke.backfill,an=ke.fieldNames,fn=ke.inputValue,Ot=ke.searchValue,qt=ke.onSearch,yt=ke.autoClearSearchValue,tt=yt===void 0?!0:yt,_t=ke.onSelect,ln=ke.onDeselect,dn=ke.dropdownMatchSelectWidth,An=dn===void 0?!0:dn,jn=ke.filterOption,er=ke.filterSort,wn=ke.optionFilterProp,Jt=ke.optionLabelProp,kn=ke.options,sn=ke.optionRender,nr=ke.children,yr=ke.defaultActiveFirstOption,or=ke.menuItemSelectedIcon,Fr=ke.virtual,wr=ke.direction,hr=ke.listHeight,cr=hr===void 0?200:hr,Mr=ke.listItemHeight,br=Mr===void 0?20:Mr,dr=ke.labelRender,Sr=ke.value,Lr=ke.defaultValue,fr=ke.labelInValue,lr=ke.onChange,ar=ke.maxCount,Ir=(0,je.Z)(ke,Nn),Vr=(0,yn.ZP)(Pt),Kr=ye(bt),Dr=!!(!kn&&nr),_r=de.useMemo(function(){return jn===void 0&&bt==="combobox"?!1:jn},[jn,bt]),Nr=de.useMemo(function(){return Qt(an,Dr)},[JSON.stringify(an),Dr]),pr=(0,Ke.Z)("",{value:Ot!==void 0?Ot:fn,postState:function(rr){return rr||""}}),Er=(0,me.Z)(pr,2),Cr=Er[0],qn=Er[1],Wt=En(kn,nr,Nr,wn,Jt),en=Wt.valueOptions,Mn=Wt.labelOptions,vn=Wt.options,Un=de.useCallback(function(Kn){var rr=wt(Kn);return rr.map(function($n){var tr,kr,Hr,Gi,gi;if(Rt($n))tr=$n;else{var ui;Hr=$n.key,kr=$n.label,tr=(ui=$n.value)!==null&&ui!==void 0?ui:Hr}var Xr=en.get(tr);if(Xr){var Hi;if(kr===void 0&&(kr=Xr==null?void 0:Xr[Jt||Nr.label]),Hr===void 0&&(Hr=(Hi=Xr==null?void 0:Xr.key)!==null&&Hi!==void 0?Hi:tr),Gi=Xr==null?void 0:Xr.disabled,gi=Xr==null?void 0:Xr.title,0)var Qi}return{label:kr,value:tr,key:Hr,disabled:Gi,title:gi}})},[Nr,Jt,en]),vr=(0,Ke.Z)(Lr,{value:Sr}),nn=(0,me.Z)(vr,2),Vt=nn[0],pn=nn[1],bn=de.useMemo(function(){var Kn,rr=Kr&&Vt===null?[]:Vt,$n=Un(rr);return bt==="combobox"&&he((Kn=$n[0])===null||Kn===void 0?void 0:Kn.value)?[]:$n},[Vt,Un,bt,Kr]),Xn=Cn(bn,en),mr=(0,me.Z)(Xn,2),sr=mr[0],Br=mr[1],Ar=de.useMemo(function(){if(!bt&&sr.length===1){var Kn=sr[0];if(Kn.value===null&&(Kn.label===null||Kn.label===void 0))return[]}return sr.map(function(rr){var $n;return(0,Xe.Z)((0,Xe.Z)({},rr),{},{label:($n=typeof dr=="function"?dr(rr):rr.label)!==null&&$n!==void 0?$n:rr.value})})},[bt,sr,dr]),Tr=de.useMemo(function(){return new Set(sr.map(function(Kn){return Kn.value}))},[sr]);de.useEffect(function(){if(bt==="combobox"){var Kn,rr=(Kn=sr[0])===null||Kn===void 0?void 0:Kn.value;qn(ve(rr)?String(rr):"")}},[sr]);var Zr=xn(function(Kn,rr){var $n=rr!=null?rr:Kn;return(0,Me.Z)((0,Me.Z)({},Nr.value,Kn),Nr.label,$n)}),Rr=de.useMemo(function(){if(bt!=="tags")return vn;var Kn=(0,ht.Z)(vn),rr=function(tr){return en.has(tr)};return(0,ht.Z)(sr).sort(function($n,tr){return $n.value<tr.value?-1:1}).forEach(function($n){var tr=$n.value;rr(tr)||Kn.push(Zr(tr,$n.label))}),Kn},[Zr,vn,en,sr,bt]),zr=Yn(Rr,Nr,Cr,_r,wn),ti=de.useMemo(function(){return bt!=="tags"||!Cr||zr.some(function(Kn){return Kn[wn||"value"]===Cr})||zr.some(function(Kn){return Kn[Nr.value]===Cr})?zr:[Zr(Cr)].concat((0,ht.Z)(zr))},[Zr,wn,bt,zr,Cr,Nr]),Bi=function Kn(rr){var $n=(0,ht.Z)(rr).sort(function(tr,kr){return er(tr,kr,{searchValue:Cr})});return $n.map(function(tr){return Array.isArray(tr.options)?(0,Xe.Z)((0,Xe.Z)({},tr),{},{options:tr.options.length>0?Kn(tr.options):tr.options}):tr})},Oi=de.useMemo(function(){return er?Bi(ti):ti},[ti,er,Cr]),Ci=de.useMemo(function(){return le(Oi,{fieldNames:Nr,childrenAsData:Dr})},[Oi,Nr,Dr]),vi=function(rr){var $n=Un(rr);if(pn($n),lr&&($n.length!==sr.length||$n.some(function(Hr,Gi){var gi;return((gi=sr[Gi])===null||gi===void 0?void 0:gi.value)!==(Hr==null?void 0:Hr.value)}))){var tr=fr?$n:$n.map(function(Hr){return Hr.value}),kr=$n.map(function(Hr){return te(Br(Hr.value))});lr(Kr?tr:tr[0],Kr?kr:kr[0])}},Xi=de.useState(null),xr=(0,me.Z)(Xi,2),ta=xr[0],ni=xr[1],Pi=de.useState(0),oa=(0,me.Z)(Pi,2),Ji=oa[0],mi=oa[1],Ii=yr!==void 0?yr:bt!=="combobox",Gr=de.useCallback(function(Kn,rr){var $n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tr=$n.source,kr=tr===void 0?"keyboard":tr;mi(rr),Gt&&bt==="combobox"&&Kn!==null&&kr==="keyboard"&&ni(String(Kn))},[Gt,bt]),_i=function(rr,$n,tr){var kr=function(){var na,Vi=Br(rr);return[fr?{label:Vi==null?void 0:Vi[Nr.label],value:rr,key:(na=Vi==null?void 0:Vi.key)!==null&&na!==void 0?na:rr}:rr,te(Vi)]};if($n&&_t){var Hr=kr(),Gi=(0,me.Z)(Hr,2),gi=Gi[0],ui=Gi[1];_t(gi,ui)}else if(!$n&&ln&&tr!=="clear"){var Xr=kr(),Hi=(0,me.Z)(Xr,2),Qi=Hi[0],Ai=Hi[1];ln(Qi,Ai)}},la=xn(function(Kn,rr){var $n,tr=Kr?rr.selected:!0;tr?$n=Kr?[].concat((0,ht.Z)(sr),[Kn]):[Kn]:$n=sr.filter(function(kr){return kr.value!==Kn}),vi($n),_i(Kn,tr),bt==="combobox"?ni(""):(!ye||tt)&&(qn(""),ni(""))}),Zi=function(rr,$n){vi(rr);var tr=$n.type,kr=$n.values;(tr==="remove"||tr==="clear")&&kr.forEach(function(Hr){_i(Hr.value,!1,tr)})},qr=function(rr,$n){if(qn(rr),ni(null),$n.source==="submit"){var tr=(rr||"").trim();if(tr){var kr=Array.from(new Set([].concat((0,ht.Z)(Tr),[tr])));vi(kr),_i(tr,!0),qn("")}return}$n.source!=="blur"&&(bt==="combobox"&&vi(rr),qt==null||qt(rr))},ba=function(rr){var $n=rr;bt!=="tags"&&($n=rr.map(function(kr){var Hr=Mn.get(kr);return Hr==null?void 0:Hr.value}).filter(function(kr){return kr!==void 0}));var tr=Array.from(new Set([].concat((0,ht.Z)(Tr),(0,ht.Z)($n))));vi(tr),tr.forEach(function(kr){_i(kr,!0)})},sa=de.useMemo(function(){var Kn=Fr!==!1&&An!==!1;return(0,Xe.Z)((0,Xe.Z)({},Wt),{},{flattenOptions:Ci,onActiveValue:Gr,defaultActiveFirstOption:Ii,onSelect:la,menuItemSelectedIcon:or,rawValues:Tr,fieldNames:Nr,virtual:Kn,direction:wr,listHeight:cr,listItemHeight:br,childrenAsData:Dr,maxCount:ar,optionRender:sn})},[ar,Wt,Ci,Gr,Ii,la,or,Tr,Nr,Fr,An,wr,cr,br,Dr,sn]);return de.createElement(ue.Provider,{value:sa},de.createElement(pe,(0,oe.Z)({},Ir,{id:Vr,prefixCls:xt,ref:Be,omitDomProps:Jn,mode:bt,displayValues:Ar,onDisplayValuesChange:Zi,direction:wr,searchValue:Cr,onSearch:qr,autoClearSearchValue:tt,onSearchSplit:ba,dropdownMatchSelectWidth:An,OptionList:Dn,emptyOptions:!Ci.length,activeValue:ta,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Yt=it;Yt.Option=Dt,Yt.OptGroup=dt;var hn=Yt,Vn=hn},63158:function(Zt,Ut,fe){"use strict";var oe=fe(54476),ht=fe(20068),Me=fe(42978),Xe=fe(75931),me=fe(59301),je=fe(92310),He=fe.n(je),Ke=fe(18929),Se=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],we=me.forwardRef(function(ge,lt){var Re,Ie=ge.prefixCls,We=Ie===void 0?"rc-switch":Ie,Ee=ge.className,at=ge.checked,rt=ge.defaultChecked,ct=ge.disabled,Ge=ge.loadingIcon,Ue=ge.checkedChildren,Je=ge.unCheckedChildren,Ye=ge.onClick,Tt=ge.onChange,Le=ge.onKeyDown,Ze=(0,Xe.Z)(ge,de),Ct=(0,Ke.Z)(!1,{value:at,defaultValue:rt}),Fe=(0,Me.Z)(Ct,2),et=Fe[0],Ae=Fe[1];function Qe(Ht,ve){var he=et;return ct||(he=Ht,Ae(he),Tt==null||Tt(he,ve)),he}function Mt(Ht){Ht.which===Se.Z.LEFT?Qe(!1,Ht):Ht.which===Se.Z.RIGHT&&Qe(!0,Ht),Le==null||Le(Ht)}function wt(Ht){var ve=Qe(!et,Ht);Ye==null||Ye(ve,Ht)}var $t=He()(We,Ee,(Re={},(0,ht.Z)(Re,"".concat(We,"-checked"),et),(0,ht.Z)(Re,"".concat(We,"-disabled"),ct),Re));return me.createElement("button",(0,oe.Z)({},Ze,{type:"button",role:"switch","aria-checked":et,disabled:ct,className:$t,ref:lt,onKeyDown:Mt,onClick:wt}),Ge,me.createElement("span",{className:"".concat(We,"-inner")},me.createElement("span",{className:"".concat(We,"-inner-checked")},Ue),me.createElement("span",{className:"".concat(We,"-inner-unchecked")},Je)))});we.displayName="Switch",Ut.Z=we},22711:function(Zt,Ut,fe){"use strict";fe.r(Ut),fe.d(Ut,{ResizableTextArea:function(){return Fe},default:function(){return Mt}});var oe=fe(54476),ht=fe(20068),Me=fe(33885),Xe=fe(94480),me=fe(42978),je=fe(75931),He=fe(92310),Ke=fe.n(He),Se=fe(36901),de=fe(66003),we=fe(30292),ge=fe(18929),lt=fe(59301),Re=fe(76190),Ie=fe(29301),We=fe(34280),Ee=fe(16089),at=`
|
|
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;
|
|
`,rt=["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"],ct={},Ge;function Ue(wt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=wt.getAttribute("id")||wt.getAttribute("data-reactid")||wt.getAttribute("name");if($t&&ct[Ht])return ct[Ht];var ve=window.getComputedStyle(wt),he=ve.getPropertyValue("box-sizing")||ve.getPropertyValue("-moz-box-sizing")||ve.getPropertyValue("-webkit-box-sizing"),mt=parseFloat(ve.getPropertyValue("padding-bottom"))+parseFloat(ve.getPropertyValue("padding-top")),Kt=parseFloat(ve.getPropertyValue("border-bottom-width"))+parseFloat(ve.getPropertyValue("border-top-width")),Ft=rt.map(function(ot){return"".concat(ot,":").concat(ve.getPropertyValue(ot))}).join(";"),Ne={sizingStyle:Ft,paddingSize:mt,borderSize:Kt,boxSizing:he};return $t&&Ht&&(ct[Ht]=Ne),Ne}function Je(wt){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ge||(Ge=document.createElement("textarea"),Ge.setAttribute("tab-index","-1"),Ge.setAttribute("aria-hidden","true"),Ge.setAttribute("name","hiddenTextarea"),document.body.appendChild(Ge)),wt.getAttribute("wrap")?Ge.setAttribute("wrap",wt.getAttribute("wrap")):Ge.removeAttribute("wrap");var he=Ue(wt,$t),mt=he.paddingSize,Kt=he.borderSize,Ft=he.boxSizing,Ne=he.sizingStyle;Ge.setAttribute("style","".concat(Ne,";").concat(at)),Ge.value=wt.value||wt.placeholder||"";var ot=void 0,ft=void 0,rn,kt=Ge.scrollHeight;if(Ft==="border-box"?kt+=Kt:Ft==="content-box"&&(kt-=mt),Ht!==null||ve!==null){Ge.value=" ";var _e=Ge.scrollHeight-mt;Ht!==null&&(ot=_e*Ht,Ft==="border-box"&&(ot=ot+mt+Kt),kt=Math.max(ot,kt)),ve!==null&&(ft=_e*ve,Ft==="border-box"&&(ft=ft+mt+Kt),rn=kt>ft?"":"hidden",kt=Math.min(ft,kt))}var Ce={height:kt,overflowY:rn,resize:"none"};return ot&&(Ce.minHeight=ot),ft&&(Ce.maxHeight=ft),Ce}var Ye=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Tt=0,Le=1,Ze=2,Ct=lt.forwardRef(function(wt,$t){var Ht=wt,ve=Ht.prefixCls,he=Ht.defaultValue,mt=Ht.value,Kt=Ht.autoSize,Ft=Ht.onResize,Ne=Ht.className,ot=Ht.style,ft=Ht.disabled,rn=Ht.onChange,kt=Ht.onInternalAutoSize,_e=(0,je.Z)(Ht,Ye),Ce=(0,ge.Z)(he,{value:mt,postState:function(Dt){return Dt!=null?Dt:""}}),ze=(0,me.Z)(Ce,2),st=ze[0],Te=ze[1],Ve=function(Dt){Te(Dt.target.value),rn==null||rn(Dt)},$e=lt.useRef();lt.useImperativeHandle($t,function(){return{textArea:$e.current}});var pt=lt.useMemo(function(){return Kt&&(0,Re.Z)(Kt)==="object"?[Kt.minRows,Kt.maxRows]:[]},[Kt]),St=(0,me.Z)(pt,2),Et=St[0],Bt=St[1],Nt=!!Kt,cn=function(){try{if(document.activeElement===$e.current){var Dt=$e.current,jt=Dt.selectionStart,It=Dt.selectionEnd,Xt=Dt.scrollTop;$e.current.setSelectionRange(jt,It),$e.current.scrollTop=Xt}}catch(Fn){}},Qt=lt.useState(Ze),le=(0,me.Z)(Qt,2),te=le[0],ee=le[1],ie=lt.useState(),ue=(0,me.Z)(ie,2),ne=ue[0],be=ue[1],gt=function(){ee(Tt)};(0,We.Z)(function(){Nt&>()},[mt,Et,Bt,Nt]),(0,We.Z)(function(){if(te===Tt)ee(Le);else if(te===Le){var vt=Je($e.current,!1,Et,Bt);ee(Ze),be(vt)}else cn()},[te]);var ye=lt.useRef(),Pe=function(){Ee.Z.cancel(ye.current)},pe=function(Dt){te===Ze&&(Ft==null||Ft(Dt),Kt&&(Pe(),ye.current=(0,Ee.Z)(function(){gt()})))};lt.useEffect(function(){return Pe},[]);var ut=Nt?ne:null,dt=(0,Me.Z)((0,Me.Z)({},ot),ut);return(te===Tt||te===Le)&&(dt.overflowY="hidden",dt.overflowX="hidden"),lt.createElement(Ie.Z,{onResize:pe,disabled:!(Kt||Ft)},lt.createElement("textarea",(0,oe.Z)({},_e,{ref:$e,style:dt,className:Ke()(ve,Ne,(0,ht.Z)({},"".concat(ve,"-disabled"),ft)),disabled:ft,value:st,onChange:Ve})))}),Fe=Ct,et=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ae=lt.forwardRef(function(wt,$t){var Ht,ve=wt.defaultValue,he=wt.value,mt=wt.onFocus,Kt=wt.onBlur,Ft=wt.onChange,Ne=wt.allowClear,ot=wt.maxLength,ft=wt.onCompositionStart,rn=wt.onCompositionEnd,kt=wt.suffix,_e=wt.prefixCls,Ce=_e===void 0?"rc-textarea":_e,ze=wt.showCount,st=wt.count,Te=wt.className,Ve=wt.style,$e=wt.disabled,pt=wt.hidden,St=wt.classNames,Et=wt.styles,Bt=wt.onResize,Nt=wt.onClear,cn=wt.onPressEnter,Qt=wt.readOnly,le=wt.autoSize,te=wt.onKeyDown,ee=(0,je.Z)(wt,et),ie=(0,ge.Z)(ve,{value:he,defaultValue:ve}),ue=(0,me.Z)(ie,2),ne=ue[0],be=ue[1],gt=ne==null?"":String(ne),ye=lt.useState(!1),Pe=(0,me.Z)(ye,2),pe=Pe[0],ut=Pe[1],dt=lt.useRef(!1),vt=lt.useState(null),Dt=(0,me.Z)(vt,2),jt=Dt[0],It=Dt[1],Xt=(0,lt.useRef)(null),Fn=(0,lt.useRef)(null),Sn=function(){var Yt;return(Yt=Fn.current)===null||Yt===void 0?void 0:Yt.textArea},Ln=function(){Sn().focus()};(0,lt.useImperativeHandle)($t,function(){var it;return{resizableTextArea:Fn.current,focus:Ln,blur:function(){Sn().blur()},nativeElement:((it=Xt.current)===null||it===void 0?void 0:it.nativeElement)||Sn()}}),(0,lt.useEffect)(function(){ut(function(it){return!$e&&it})},[$e]);var Tn=lt.useState(null),In=(0,me.Z)(Tn,2),Dn=In[0],Cn=In[1];lt.useEffect(function(){if(Dn){var it;(it=Sn()).setSelectionRange.apply(it,(0,Xe.Z)(Dn))}},[Dn]);var Hn=(0,de.Z)(st,ze),Yn=(Ht=Hn.max)!==null&&Ht!==void 0?Ht:ot,yn=Number(Yn)>0,On=Hn.strategy(gt),zn=!!Yn&&On>Yn,Wn=function(Yt,hn){var Vn=hn;!dt.current&&Hn.exceedFormatter&&Hn.max&&Hn.strategy(hn)>Hn.max&&(Vn=Hn.exceedFormatter(hn,{max:Hn.max}),hn!==Vn&&Cn([Sn().selectionStart||0,Sn().selectionEnd||0])),be(Vn),(0,we.rJ)(Yt.currentTarget,Yt,Ft,Vn)},Lt=function(Yt){dt.current=!0,ft==null||ft(Yt)},tn=function(Yt){dt.current=!1,Wn(Yt,Yt.currentTarget.value),rn==null||rn(Yt)},un=function(Yt){Wn(Yt,Yt.target.value)},En=function(Yt){Yt.key==="Enter"&&cn&&cn(Yt),te==null||te(Yt)},xn=function(Yt){ut(!0),mt==null||mt(Yt)},Rn=function(Yt){ut(!1),Kt==null||Kt(Yt)},Zn=function(Yt){be(""),Ln(),(0,we.rJ)(Sn(),Yt,Ft)},_n=kt,Nn;Hn.show&&(Hn.showFormatter?Nn=Hn.showFormatter({value:gt,count:On,maxLength:Yn}):Nn="".concat(On).concat(yn?" / ".concat(Yn):""),_n=lt.createElement(lt.Fragment,null,_n,lt.createElement("span",{className:Ke()("".concat(Ce,"-data-count"),St==null?void 0:St.count),style:Et==null?void 0:Et.count},Nn)));var Jn=function(Yt){var hn;Bt==null||Bt(Yt),(hn=Sn())!==null&&hn!==void 0&&hn.style.height&&It(!0)},Rt=!le&&!ze&&!Ne;return lt.createElement(Se.BaseInput,{ref:Xt,value:gt,allowClear:Ne,handleReset:Zn,suffix:_n,prefixCls:Ce,classNames:(0,Me.Z)((0,Me.Z)({},St),{},{affixWrapper:Ke()(St==null?void 0:St.affixWrapper,(0,ht.Z)((0,ht.Z)({},"".concat(Ce,"-show-count"),ze),"".concat(Ce,"-textarea-allow-clear"),Ne))}),disabled:$e,focused:pe,className:Ke()(Te,zn&&"".concat(Ce,"-out-of-range")),style:(0,Me.Z)((0,Me.Z)({},Ve),jt&&!Rt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nn=="string"?Nn:void 0}},hidden:pt,readOnly:Qt,onClear:Nt},lt.createElement(Fe,(0,oe.Z)({},ee,{autoSize:le,maxLength:ot,onKeyDown:En,onChange:un,onFocus:xn,onBlur:Rn,onCompositionStart:Lt,onCompositionEnd:tn,className:Ke()(St==null?void 0:St.textarea),style:(0,Me.Z)((0,Me.Z)({},Et==null?void 0:Et.textarea),{},{resize:Ve==null?void 0:Ve.resize}),disabled:$e,prefixCls:Ce,onResize:Jn,ref:Fn,readOnly:Qt})))}),Qe=Ae,Mt=Qe},34643:function(Zt,Ut,fe){"use strict";fe.d(Ut,{S:function(){return He}});var oe=fe(48736),ht=fe(65065);function Me(Ke,Se){var de=new Set;return Ke.forEach(function(we){Se.has(we)||de.add(we)}),de}function Xe(Ke){var Se=Ke||{},de=Se.disabled,we=Se.disableCheckbox,ge=Se.checkable;return!!(de||we)||ge===!1}function me(Ke,Se,de,we){for(var ge=new Set(Ke),lt=new Set,Re=0;Re<=de;Re+=1){var Ie=Se.get(Re)||new Set;Ie.forEach(function(rt){var ct=rt.key,Ge=rt.node,Ue=rt.children,Je=Ue===void 0?[]:Ue;ge.has(ct)&&!we(Ge)&&Je.filter(function(Ye){return!we(Ye.node)}).forEach(function(Ye){ge.add(Ye.key)})})}for(var We=new Set,Ee=de;Ee>=0;Ee-=1){var at=Se.get(Ee)||new Set;at.forEach(function(rt){var ct=rt.parent,Ge=rt.node;if(!(we(Ge)||!rt.parent||We.has(rt.parent.key))){if(we(rt.parent.node)){We.add(ct.key);return}var Ue=!0,Je=!1;(ct.children||[]).filter(function(Ye){return!we(Ye.node)}).forEach(function(Ye){var Tt=Ye.key,Le=ge.has(Tt);Ue&&!Le&&(Ue=!1),!Je&&(Le||lt.has(Tt))&&(Je=!0)}),Ue&&ge.add(ct.key),Je&<.add(ct.key),We.add(ct.key)}})}return{checkedKeys:Array.from(ge),halfCheckedKeys:Array.from(Me(lt,ge))}}function je(Ke,Se,de,we,ge){for(var lt=new Set(Ke),Re=new Set(Se),Ie=0;Ie<=we;Ie+=1){var We=de.get(Ie)||new Set;We.forEach(function(ct){var Ge=ct.key,Ue=ct.node,Je=ct.children,Ye=Je===void 0?[]:Je;!lt.has(Ge)&&!Re.has(Ge)&&!ge(Ue)&&Ye.filter(function(Tt){return!ge(Tt.node)}).forEach(function(Tt){lt.delete(Tt.key)})})}Re=new Set;for(var Ee=new Set,at=we;at>=0;at-=1){var rt=de.get(at)||new Set;rt.forEach(function(ct){var Ge=ct.parent,Ue=ct.node;if(!(ge(Ue)||!ct.parent||Ee.has(ct.parent.key))){if(ge(ct.parent.node)){Ee.add(Ge.key);return}var Je=!0,Ye=!1;(Ge.children||[]).filter(function(Tt){return!ge(Tt.node)}).forEach(function(Tt){var Le=Tt.key,Ze=lt.has(Le);Je&&!Ze&&(Je=!1),!Ye&&(Ze||Re.has(Le))&&(Ye=!0)}),Je||lt.delete(Ge.key),Ye&&Re.add(Ge.key),Ee.add(Ge.key)}})}return{checkedKeys:Array.from(lt),halfCheckedKeys:Array.from(Me(Re,lt))}}function He(Ke,Se,de,we){var ge=[],lt;we?lt=we:lt=Xe;var Re=new Set(Ke.filter(function(at){var rt=!!(0,ht.Z)(de,at);return rt||ge.push(at),rt})),Ie=new Map,We=0;Object.keys(de).forEach(function(at){var rt=de[at],ct=rt.level,Ge=Ie.get(ct);Ge||(Ge=new Set,Ie.set(ct,Ge)),Ge.add(rt),We=Math.max(We,ct)}),(0,oe.ZP)(!ge.length,"Tree missing follow keys: ".concat(ge.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var Ee;return Se===!0?Ee=me(Re,Ie,We,lt):Ee=je(Re,Se.halfCheckedKeys,Ie,We,lt),Ee}},65065:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return oe}});function oe(ht,Me){return ht[Me]}},34061:function(Zt,Ut,fe){"use strict";fe.d(Ut,{F:function(){return ct},H8:function(){return rt},I8:function(){return at},km:function(){return ge},oH:function(){return We},w$:function(){return lt},zn:function(){return Ie}});var oe=fe(76190),ht=fe(94480),Me=fe(33885),Xe=fe(75931),me=fe(11592),je=fe(2738),He=fe(48736),Ke=fe(65065),Se=["children"];function de(Ge,Ue){return"".concat(Ge,"-").concat(Ue)}function we(Ge){return Ge&&Ge.type&&Ge.type.isTreeNode}function ge(Ge,Ue){return Ge!=null?Ge:Ue}function lt(Ge){var Ue=Ge||{},Je=Ue.title,Ye=Ue._title,Tt=Ue.key,Le=Ue.children,Ze=Je||"title";return{title:Ze,_title:Ye||[Ze],key:Tt||"key",children:Le||"children"}}function Re(Ge,Ue){var Je=new Map;function Ye(Tt){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Tt||[]).forEach(function(Ze){var Ct=Ze[Ue.key],Fe=Ze[Ue.children];warning(Ct!=null,"Tree node must have a certain key: [".concat(Le).concat(Ct,"]"));var et=String(Ct);warning(!Je.has(et)||Ct===null||Ct===void 0,"Same 'key' exist in the Tree: ".concat(et)),Je.set(et,!0),Ye(Fe,"".concat(Le).concat(et," > "))})}Ye(Ge)}function Ie(Ge){function Ue(Je){var Ye=(0,me.Z)(Je);return Ye.map(function(Tt){if(!we(Tt))return(0,He.ZP)(!Tt,"Tree/TreeNode can only accept TreeNode as children."),null;var Le=Tt.key,Ze=Tt.props,Ct=Ze.children,Fe=(0,Xe.Z)(Ze,Se),et=(0,Me.Z)({key:Le},Fe),Ae=Ue(Ct);return Ae.length&&(et.children=Ae),et}).filter(function(Tt){return Tt})}return Ue(Ge)}function We(Ge,Ue,Je){var Ye=lt(Je),Tt=Ye._title,Le=Ye.key,Ze=Ye.children,Ct=new Set(Ue===!0?[]:Ue),Fe=[];function et(Ae){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ae.map(function(Mt,wt){for(var $t=de(Qe?Qe.pos:"0",wt),Ht=ge(Mt[Le],$t),ve,he=0;he<Tt.length;he+=1){var mt=Tt[he];if(Mt[mt]!==void 0){ve=Mt[mt];break}}var Kt=Object.assign((0,je.Z)(Mt,[].concat((0,ht.Z)(Tt),[Le,Ze])),{title:ve,key:Ht,parent:Qe,pos:$t,children:null,data:Mt,isStart:[].concat((0,ht.Z)(Qe?Qe.isStart:[]),[wt===0]),isEnd:[].concat((0,ht.Z)(Qe?Qe.isEnd:[]),[wt===Ae.length-1])});return Fe.push(Kt),Ue===!0||Ct.has(Ht)?Kt.children=et(Mt[Ze]||[],Kt):Kt.children=[],Kt})}return et(Ge),Fe}function Ee(Ge,Ue,Je){var Ye={};(0,oe.Z)(Je)==="object"?Ye=Je:Ye={externalGetKey:Je},Ye=Ye||{};var Tt=Ye,Le=Tt.childrenPropName,Ze=Tt.externalGetKey,Ct=Tt.fieldNames,Fe=lt(Ct),et=Fe.key,Ae=Fe.children,Qe=Le||Ae,Mt;Ze?typeof Ze=="string"?Mt=function(Ht){return Ht[Ze]}:typeof Ze=="function"&&(Mt=function(Ht){return Ze(Ht)}):Mt=function(Ht,ve){return ge(Ht[et],ve)};function wt($t,Ht,ve,he){var mt=$t?$t[Qe]:Ge,Kt=$t?de(ve.pos,Ht):"0",Ft=$t?[].concat((0,ht.Z)(he),[$t]):[];if($t){var Ne=Mt($t,Kt),ot={node:$t,index:Ht,pos:Kt,key:Ne,parentPos:ve.node?ve.pos:null,level:ve.level+1,nodes:Ft};Ue(ot)}mt&&mt.forEach(function(ft,rn){wt(ft,rn,{node:$t,pos:Kt,level:ve?ve.level+1:-1},Ft)})}wt(null)}function at(Ge){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Je=Ue.initWrapper,Ye=Ue.processEntity,Tt=Ue.onProcessFinished,Le=Ue.externalGetKey,Ze=Ue.childrenPropName,Ct=Ue.fieldNames,Fe=arguments.length>2?arguments[2]:void 0,et=Le||Fe,Ae={},Qe={},Mt={posEntities:Ae,keyEntities:Qe};return Je&&(Mt=Je(Mt)||Mt),Ee(Ge,function(wt){var $t=wt.node,Ht=wt.index,ve=wt.pos,he=wt.key,mt=wt.parentPos,Kt=wt.level,Ft=wt.nodes,Ne={node:$t,nodes:Ft,index:Ht,key:he,pos:ve,level:Kt},ot=ge(he,ve);Ae[ve]=Ne,Qe[ot]=Ne,Ne.parent=Ae[mt],Ne.parent&&(Ne.parent.children=Ne.parent.children||[],Ne.parent.children.push(Ne)),Ye&&Ye(Ne,Mt)},{externalGetKey:et,childrenPropName:Ze,fieldNames:Ct}),Tt&&Tt(Mt),Mt}function rt(Ge,Ue){var Je=Ue.expandedKeys,Ye=Ue.selectedKeys,Tt=Ue.loadedKeys,Le=Ue.loadingKeys,Ze=Ue.checkedKeys,Ct=Ue.halfCheckedKeys,Fe=Ue.dragOverNodeKey,et=Ue.dropPosition,Ae=Ue.keyEntities,Qe=(0,Ke.Z)(Ae,Ge),Mt={eventKey:Ge,expanded:Je.indexOf(Ge)!==-1,selected:Ye.indexOf(Ge)!==-1,loaded:Tt.indexOf(Ge)!==-1,loading:Le.indexOf(Ge)!==-1,checked:Ze.indexOf(Ge)!==-1,halfChecked:Ct.indexOf(Ge)!==-1,pos:String(Qe?Qe.pos:""),dragOver:Fe===Ge&&et===0,dragOverGapTop:Fe===Ge&&et===-1,dragOverGapBottom:Fe===Ge&&et===1};return Mt}function ct(Ge){var Ue=Ge.data,Je=Ge.expanded,Ye=Ge.selected,Tt=Ge.checked,Le=Ge.loaded,Ze=Ge.loading,Ct=Ge.halfChecked,Fe=Ge.dragOver,et=Ge.dragOverGapTop,Ae=Ge.dragOverGapBottom,Qe=Ge.pos,Mt=Ge.active,wt=Ge.eventKey,$t=(0,Me.Z)((0,Me.Z)({},Ue),{},{expanded:Je,selected:Ye,checked:Tt,loaded:Le,loading:Ze,halfChecked:Ct,dragOver:Fe,dragOverGapTop:et,dragOverGapBottom:Ae,pos:Qe,active:Mt,key:wt});return"props"in $t||Object.defineProperty($t,"props",{get:function(){return(0,He.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Ge}}),$t}},48911:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return st}});var oe=fe(54476),ht=fe(76190),Me=fe(33885),Xe=fe(20068),me=fe(42978),je=fe(75931),He=fe(92310),Ke=fe.n(He),Se=fe(29301),de=fe(70425),we=fe(34280),ge=fe(59301),lt=fe(4676),Re=ge.forwardRef(function(Te,Ve){var $e=Te.height,pt=Te.offsetY,St=Te.offsetX,Et=Te.children,Bt=Te.prefixCls,Nt=Te.onInnerResize,cn=Te.innerProps,Qt=Te.rtl,le=Te.extra,te={},ee={display:"flex",flexDirection:"column"};return pt!==void 0&&(te={height:$e,position:"relative",overflow:"hidden"},ee=(0,Me.Z)((0,Me.Z)({},ee),{},(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({transform:"translateY(".concat(pt,"px)")},Qt?"marginRight":"marginLeft",-St),"position","absolute"),"left",0),"right",0),"top",0))),ge.createElement("div",{style:te},ge.createElement(Se.Z,{onResize:function(ue){var ne=ue.offsetHeight;ne&&Nt&&Nt()}},ge.createElement("div",(0,oe.Z)({style:ee,className:Ke()((0,Xe.Z)({},"".concat(Bt,"-holder-inner"),Bt)),ref:Ve},cn),Et,le)))});Re.displayName="Filler";var Ie=Re;function We(Te){var Ve=Te.children,$e=Te.setRef,pt=ge.useCallback(function(St){$e(St)},[]);return ge.cloneElement(Ve,{ref:pt})}function Ee(Te,Ve,$e,pt,St,Et,Bt,Nt){var cn=Nt.getKey;return Te.slice(Ve,$e+1).map(function(Qt,le){var te=Ve+le,ee=Bt(Qt,te,{style:{width:pt},offsetX:St}),ie=cn(Qt);return ge.createElement(We,{key:ie,setRef:function(ne){return Et(Qt,ne)}},ee)})}function at(Te,Ve,$e,pt){var St=$e-Te,Et=Ve-$e,Bt=Math.min(St,Et)*2;if(pt<=Bt){var Nt=Math.floor(pt/2);return pt%2?$e+Nt+1:$e-Nt}return St>Et?$e-(pt-Et):$e+(pt-St)}function rt(Te,Ve,$e){var pt=Te.length,St=Ve.length,Et,Bt;if(pt===0&&St===0)return null;pt<St?(Et=Te,Bt=Ve):(Et=Ve,Bt=Te);var Nt={__EMPTY_ITEM__:!0};function cn(ue){return ue!==void 0?$e(ue):Nt}for(var Qt=null,le=Math.abs(pt-St)!==1,te=0;te<Bt.length;te+=1){var ee=cn(Et[te]),ie=cn(Bt[te]);if(ee!==ie){Qt=te,le=le||ee!==cn(Bt[te+1]);break}}return Qt===null?null:{index:Qt,multiple:le}}function ct(Te,Ve,$e){var pt=ge.useState(Te),St=(0,me.Z)(pt,2),Et=St[0],Bt=St[1],Nt=ge.useState(null),cn=(0,me.Z)(Nt,2),Qt=cn[0],le=cn[1];return ge.useEffect(function(){var te=rt(Et||[],Te||[],Ve);(te==null?void 0:te.index)!==void 0&&($e==null||$e(te.index),le(Te[te.index])),Bt(Te)},[Te]),[Qt]}var Ge=fe(16089),Ue=(typeof navigator=="undefined"?"undefined":(0,ht.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Je=Ue,Ye=function(Te,Ve,$e,pt){var St=(0,ge.useRef)(!1),Et=(0,ge.useRef)(null);function Bt(){clearTimeout(Et.current),St.current=!0,Et.current=setTimeout(function(){St.current=!1},50)}var Nt=(0,ge.useRef)({top:Te,bottom:Ve,left:$e,right:pt});return Nt.current.top=Te,Nt.current.bottom=Ve,Nt.current.left=$e,Nt.current.right=pt,function(cn,Qt){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=cn?Qt<0&&Nt.current.left||Qt>0&&Nt.current.right:Qt<0&&Nt.current.top||Qt>0&&Nt.current.bottom;return le&&te?(clearTimeout(Et.current),St.current=!1):(!te||St.current)&&Bt(),!St.current&&te}};function Tt(Te,Ve,$e,pt,St,Et,Bt){var Nt=(0,ge.useRef)(0),cn=(0,ge.useRef)(null),Qt=(0,ge.useRef)(null),le=(0,ge.useRef)(!1),te=Ye(Ve,$e,pt,St);function ee(ye,Pe){if(Ge.Z.cancel(cn.current),!te(!1,Pe)){var pe=ye;if(!pe._virtualHandled)pe._virtualHandled=!0;else return;Nt.current+=Pe,Qt.current=Pe,Je||pe.preventDefault(),cn.current=(0,Ge.Z)(function(){var ut=le.current?10:1;Bt(Nt.current*ut,!1),Nt.current=0})}}function ie(ye,Pe){Bt(Pe,!0),Je||ye.preventDefault()}var ue=(0,ge.useRef)(null),ne=(0,ge.useRef)(null);function be(ye){if(Te){Ge.Z.cancel(ne.current),ne.current=(0,Ge.Z)(function(){ue.current=null},2);var Pe=ye.deltaX,pe=ye.deltaY,ut=ye.shiftKey,dt=Pe,vt=pe;(ue.current==="sx"||!ue.current&&ut&&pe&&!Pe)&&(dt=pe,vt=0,ue.current="sx");var Dt=Math.abs(dt),jt=Math.abs(vt);ue.current===null&&(ue.current=Et&&Dt>jt?"x":"y"),ue.current==="y"?ee(ye,vt):ie(ye,dt)}}function gt(ye){Te&&(le.current=ye.detail===Qt.current)}return[be,gt]}function Le(Te,Ve,$e,pt){var St=ge.useMemo(function(){return[new Map,[]]},[Te,$e.id,pt]),Et=(0,me.Z)(St,2),Bt=Et[0],Nt=Et[1],cn=function(le){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le,ee=Bt.get(le),ie=Bt.get(te);if(ee===void 0||ie===void 0)for(var ue=Te.length,ne=Nt.length;ne<ue;ne+=1){var be,gt=Te[ne],ye=Ve(gt);Bt.set(ye,ne);var Pe=(be=$e.get(ye))!==null&&be!==void 0?be:pt;if(Nt[ne]=(Nt[ne-1]||0)+Pe,ye===le&&(ee=ne),ye===te&&(ie=ne),ee!==void 0&&ie!==void 0)break}return{top:Nt[ee-1]||0,bottom:Nt[ie]}};return cn}var Ze=fe(67732),Ct=fe(83652),Fe=function(){function Te(){(0,Ze.Z)(this,Te),(0,Xe.Z)(this,"maps",void 0),(0,Xe.Z)(this,"id",0),(0,Xe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ct.Z)(Te,[{key:"set",value:function($e,pt){this.diffRecords.set($e,this.maps[$e]),this.maps[$e]=pt,this.id+=1}},{key:"get",value:function($e){return this.maps[$e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Te}(),et=Fe;function Ae(Te){var Ve=parseFloat(Te);return isNaN(Ve)?0:Ve}function Qe(Te,Ve,$e){var pt=ge.useState(0),St=(0,me.Z)(pt,2),Et=St[0],Bt=St[1],Nt=(0,ge.useRef)(new Map),cn=(0,ge.useRef)(new et),Qt=(0,ge.useRef)(0);function le(){Qt.current+=1}function te(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le();var ue=function(){var gt=!1;Nt.current.forEach(function(ye,Pe){if(ye&&ye.offsetParent){var pe=ye.offsetHeight,ut=getComputedStyle(ye),dt=ut.marginTop,vt=ut.marginBottom,Dt=Ae(dt),jt=Ae(vt),It=pe+Dt+jt;cn.current.get(Pe)!==It&&(cn.current.set(Pe,It),gt=!0)}}),gt&&Bt(function(ye){return ye+1})};if(ie)ue();else{Qt.current+=1;var ne=Qt.current;Promise.resolve().then(function(){ne===Qt.current&&ue()})}}function ee(ie,ue){var ne=Te(ie),be=Nt.current.get(ne);ue?(Nt.current.set(ne,ue),te()):Nt.current.delete(ne),!be!=!ue&&(ue?Ve==null||Ve(ie):$e==null||$e(ie))}return(0,ge.useEffect)(function(){return le},[]),[ee,te,cn.current,Et]}var Mt=14/15;function wt(Te,Ve,$e){var pt=(0,ge.useRef)(!1),St=(0,ge.useRef)(0),Et=(0,ge.useRef)(0),Bt=(0,ge.useRef)(null),Nt=(0,ge.useRef)(null),cn,Qt=function(ie){if(pt.current){var ue=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),be=St.current-ue,gt=Et.current-ne,ye=Math.abs(be)>Math.abs(gt);ye?St.current=ue:Et.current=ne;var Pe=$e(ye,ye?be:gt,!1,ie);Pe&&ie.preventDefault(),clearInterval(Nt.current),Pe&&(Nt.current=setInterval(function(){ye?be*=Mt:gt*=Mt;var pe=Math.floor(ye?be:gt);(!$e(ye,pe,!0)||Math.abs(pe)<=.1)&&clearInterval(Nt.current)},16))}},le=function(){pt.current=!1,cn()},te=function(ie){cn(),ie.touches.length===1&&!pt.current&&(pt.current=!0,St.current=Math.ceil(ie.touches[0].pageX),Et.current=Math.ceil(ie.touches[0].pageY),Bt.current=ie.target,Bt.current.addEventListener("touchmove",Qt,{passive:!1}),Bt.current.addEventListener("touchend",le,{passive:!0}))};cn=function(){Bt.current&&(Bt.current.removeEventListener("touchmove",Qt),Bt.current.removeEventListener("touchend",le))},(0,we.Z)(function(){return Te&&Ve.current.addEventListener("touchstart",te,{passive:!0}),function(){var ee;(ee=Ve.current)===null||ee===void 0||ee.removeEventListener("touchstart",te),cn(),clearInterval(Nt.current)}},[Te])}function $t(Te){return Math.floor(Math.pow(Te,.5))}function Ht(Te,Ve){var $e="touches"in Te?Te.touches[0]:Te;return $e[Ve?"pageX":"pageY"]-window[Ve?"scrollX":"scrollY"]}function ve(Te,Ve,$e){ge.useEffect(function(){var pt=Ve.current;if(Te&&pt){var St=!1,Et,Bt,Nt=function(){Ge.Z.cancel(Et)},cn=function ee(){Nt(),Et=(0,Ge.Z)(function(){$e(Bt),ee()})},Qt=function(){St=!1,Nt()},le=function(ie){if(!(ie.target.draggable||ie.button!==0)){var ue=ie;ue._virtualHandled||(ue._virtualHandled=!0,St=!0)}},te=function(ie){if(St){var ue=Ht(ie,!1),ne=pt.getBoundingClientRect(),be=ne.top,gt=ne.bottom;if(ue<=be){var ye=be-ue;Bt=-$t(ye),cn()}else if(ue>=gt){var Pe=ue-gt;Bt=$t(Pe),cn()}else Nt()}};return pt.addEventListener("mousedown",le),pt.ownerDocument.addEventListener("mouseup",Qt),pt.ownerDocument.addEventListener("mousemove",te),pt.ownerDocument.addEventListener("dragend",Qt),function(){pt.removeEventListener("mousedown",le),pt.ownerDocument.removeEventListener("mouseup",Qt),pt.ownerDocument.removeEventListener("mousemove",te),pt.ownerDocument.removeEventListener("dragend",Qt),Nt()}}},[Te])}var he=10;function mt(Te,Ve,$e,pt,St,Et,Bt,Nt){var cn=ge.useRef(),Qt=ge.useState(null),le=(0,me.Z)(Qt,2),te=le[0],ee=le[1];return(0,we.Z)(function(){if(te&&te.times<he){if(!Te.current){ee(function(Hn){return(0,Me.Z)({},Hn)});return}Et();var ie=te.targetAlign,ue=te.originAlign,ne=te.index,be=te.offset,gt=Te.current.clientHeight,ye=!1,Pe=ie,pe=null;if(gt){for(var ut=ie||ue,dt=0,vt=0,Dt=0,jt=Math.min(Ve.length-1,ne),It=0;It<=jt;It+=1){var Xt=St(Ve[It]);vt=dt;var Fn=$e.get(Xt);Dt=vt+(Fn===void 0?pt:Fn),dt=Dt}for(var Sn=ut==="top"?be:gt-be,Ln=jt;Ln>=0;Ln-=1){var Tn=St(Ve[Ln]),In=$e.get(Tn);if(In===void 0){ye=!0;break}if(Sn-=In,Sn<=0)break}switch(ut){case"top":pe=vt-be;break;case"bottom":pe=Dt-gt+be;break;default:{var Dn=Te.current.scrollTop,Cn=Dn+gt;vt<Dn?Pe="top":Dt>Cn&&(Pe="bottom")}}pe!==null&&Bt(pe),pe!==te.lastTop&&(ye=!0)}ye&&ee((0,Me.Z)((0,Me.Z)({},te),{},{times:te.times+1,targetAlign:Pe,lastTop:pe}))}},[te,Te.current]),function(ie){if(ie==null){Nt();return}if(Ge.Z.cancel(cn.current),typeof ie=="number")Bt(ie);else if(ie&&(0,ht.Z)(ie)==="object"){var ue,ne=ie.align;"index"in ie?ue=ie.index:ue=Ve.findIndex(function(ye){return St(ye)===ie.key});var be=ie.offset,gt=be===void 0?0:be;ee({times:0,index:ue,offset:gt,originAlign:ne})}}}var Kt=ge.forwardRef(function(Te,Ve){var $e=Te.prefixCls,pt=Te.rtl,St=Te.scrollOffset,Et=Te.scrollRange,Bt=Te.onStartMove,Nt=Te.onStopMove,cn=Te.onScroll,Qt=Te.horizontal,le=Te.spinSize,te=Te.containerSize,ee=Te.style,ie=Te.thumbStyle,ue=Te.showScrollBar,ne=ge.useState(!1),be=(0,me.Z)(ne,2),gt=be[0],ye=be[1],Pe=ge.useState(null),pe=(0,me.Z)(Pe,2),ut=pe[0],dt=pe[1],vt=ge.useState(null),Dt=(0,me.Z)(vt,2),jt=Dt[0],It=Dt[1],Xt=!pt,Fn=ge.useRef(),Sn=ge.useRef(),Ln=ge.useState(ue),Tn=(0,me.Z)(Ln,2),In=Tn[0],Dn=Tn[1],Cn=ge.useRef(),Hn=function(){ue===!0||ue===!1||(clearTimeout(Cn.current),Dn(!0),Cn.current=setTimeout(function(){Dn(!1)},3e3))},Yn=Et-te||0,yn=te-le||0,On=ge.useMemo(function(){if(St===0||Yn===0)return 0;var Zn=St/Yn;return Zn*yn},[St,Yn,yn]),zn=function(_n){_n.stopPropagation(),_n.preventDefault()},Wn=ge.useRef({top:On,dragging:gt,pageY:ut,startTop:jt});Wn.current={top:On,dragging:gt,pageY:ut,startTop:jt};var Lt=function(_n){ye(!0),dt(Ht(_n,Qt)),It(Wn.current.top),Bt(),_n.stopPropagation(),_n.preventDefault()};ge.useEffect(function(){var Zn=function(Rt){Rt.preventDefault()},_n=Fn.current,Nn=Sn.current;return _n.addEventListener("touchstart",Zn,{passive:!1}),Nn.addEventListener("touchstart",Lt,{passive:!1}),function(){_n.removeEventListener("touchstart",Zn),Nn.removeEventListener("touchstart",Lt)}},[]);var tn=ge.useRef();tn.current=Yn;var un=ge.useRef();un.current=yn,ge.useEffect(function(){if(gt){var Zn,_n=function(Rt){var it=Wn.current,Yt=it.dragging,hn=it.pageY,Vn=it.startTop;Ge.Z.cancel(Zn);var ke=Fn.current.getBoundingClientRect(),Be=te/(Qt?ke.width:ke.height);if(Yt){var Pt=(Ht(Rt,Qt)-hn)*Be,bt=Vn;!Xt&&Qt?bt-=Pt:bt+=Pt;var Oe=tn.current,xt=un.current,Gt=xt?bt/xt:0,an=Math.ceil(Gt*Oe);an=Math.max(an,0),an=Math.min(an,Oe),Zn=(0,Ge.Z)(function(){cn(an,Qt)})}},Nn=function(){ye(!1),Nt()};return window.addEventListener("mousemove",_n,{passive:!0}),window.addEventListener("touchmove",_n,{passive:!0}),window.addEventListener("mouseup",Nn,{passive:!0}),window.addEventListener("touchend",Nn,{passive:!0}),function(){window.removeEventListener("mousemove",_n),window.removeEventListener("touchmove",_n),window.removeEventListener("mouseup",Nn),window.removeEventListener("touchend",Nn),Ge.Z.cancel(Zn)}}},[gt]),ge.useEffect(function(){return Hn(),function(){clearTimeout(Cn.current)}},[St]),ge.useImperativeHandle(Ve,function(){return{delayHidden:Hn}});var En="".concat($e,"-scrollbar"),xn={position:"absolute",visibility:In?null:"hidden"},Rn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Qt?(Object.assign(xn,{height:8,left:0,right:0,bottom:0}),Object.assign(Rn,(0,Xe.Z)({height:"100%",width:le},Xt?"left":"right",On))):(Object.assign(xn,(0,Xe.Z)({width:8,top:0,bottom:0},Xt?"right":"left",0)),Object.assign(Rn,{width:"100%",height:le,top:On})),ge.createElement("div",{ref:Fn,className:Ke()(En,(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},"".concat(En,"-horizontal"),Qt),"".concat(En,"-vertical"),!Qt),"".concat(En,"-visible"),In)),style:(0,Me.Z)((0,Me.Z)({},xn),ee),onMouseDown:zn,onMouseMove:Hn},ge.createElement("div",{ref:Sn,className:Ke()("".concat(En,"-thumb"),(0,Xe.Z)({},"".concat(En,"-thumb-moving"),gt)),style:(0,Me.Z)((0,Me.Z)({},Rn),ie),onMouseDown:Lt}))}),Ft=Kt,Ne=20;function ot(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$e=Te/Ve*Te;return isNaN($e)&&($e=0),$e=Math.max($e,Ne),Math.floor($e)}var ft=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],rn=[],kt={overflowY:"auto",overflowAnchor:"none"};function _e(Te,Ve){var $e=Te.prefixCls,pt=$e===void 0?"rc-virtual-list":$e,St=Te.className,Et=Te.height,Bt=Te.itemHeight,Nt=Te.fullHeight,cn=Nt===void 0?!0:Nt,Qt=Te.style,le=Te.data,te=Te.children,ee=Te.itemKey,ie=Te.virtual,ue=Te.direction,ne=Te.scrollWidth,be=Te.component,gt=be===void 0?"div":be,ye=Te.onScroll,Pe=Te.onVirtualScroll,pe=Te.onVisibleChange,ut=Te.innerProps,dt=Te.extraRender,vt=Te.styles,Dt=Te.showScrollBar,jt=Dt===void 0?"optional":Dt,It=(0,je.Z)(Te,ft),Xt=ge.useCallback(function(Wt){return typeof ee=="function"?ee(Wt):Wt==null?void 0:Wt[ee]},[ee]),Fn=Qe(Xt,null,null),Sn=(0,me.Z)(Fn,4),Ln=Sn[0],Tn=Sn[1],In=Sn[2],Dn=Sn[3],Cn=!!(ie!==!1&&Et&&Bt),Hn=ge.useMemo(function(){return Object.values(In.maps).reduce(function(Wt,en){return Wt+en},0)},[In.id,In.maps]),Yn=Cn&&le&&(Math.max(Bt*le.length,Hn)>Et||!!ne),yn=ue==="rtl",On=Ke()(pt,(0,Xe.Z)({},"".concat(pt,"-rtl"),yn),St),zn=le||rn,Wn=(0,ge.useRef)(),Lt=(0,ge.useRef)(),tn=(0,ge.useRef)(),un=(0,ge.useState)(0),En=(0,me.Z)(un,2),xn=En[0],Rn=En[1],Zn=(0,ge.useState)(0),_n=(0,me.Z)(Zn,2),Nn=_n[0],Jn=_n[1],Rt=(0,ge.useState)(!1),it=(0,me.Z)(Rt,2),Yt=it[0],hn=it[1],Vn=function(){hn(!0)},ke=function(){hn(!1)},Be={getKey:Xt};function Pt(Wt){Rn(function(en){var Mn;typeof Wt=="function"?Mn=Wt(en):Mn=Wt;var vn=yr(Mn);return Wn.current.scrollTop=vn,vn})}var bt=(0,ge.useRef)({start:0,end:zn.length}),Oe=(0,ge.useRef)(),xt=ct(zn,Xt),Gt=(0,me.Z)(xt,1),an=Gt[0];Oe.current=an;var fn=ge.useMemo(function(){if(!Cn)return{scrollHeight:void 0,start:0,end:zn.length-1,offset:void 0};if(!Yn){var Wt;return{scrollHeight:((Wt=Lt.current)===null||Wt===void 0?void 0:Wt.offsetHeight)||0,start:0,end:zn.length-1,offset:void 0}}for(var en=0,Mn,vn,Un,vr=zn.length,nn=0;nn<vr;nn+=1){var Vt=zn[nn],pn=Xt(Vt),bn=In.get(pn),Xn=en+(bn===void 0?Bt:bn);Xn>=xn&&Mn===void 0&&(Mn=nn,vn=en),Xn>xn+Et&&Un===void 0&&(Un=nn),en=Xn}return Mn===void 0&&(Mn=0,vn=0,Un=Math.ceil(Et/Bt)),Un===void 0&&(Un=zn.length-1),Un=Math.min(Un+1,zn.length-1),{scrollHeight:en,start:Mn,end:Un,offset:vn}},[Yn,Cn,xn,zn,Dn,Et]),Ot=fn.scrollHeight,qt=fn.start,yt=fn.end,tt=fn.offset;bt.current.start=qt,bt.current.end=yt,ge.useLayoutEffect(function(){var Wt=In.getRecord();if(Wt.size===1){var en=Array.from(Wt.keys())[0],Mn=Wt.get(en),vn=zn[qt];if(vn&&Mn===void 0){var Un=Xt(vn);if(Un===en){var vr=In.get(en),nn=vr-Bt;Pt(function(Vt){return Vt+nn})}}}In.resetRecord()},[Ot]);var _t=ge.useState({width:0,height:Et}),ln=(0,me.Z)(_t,2),dn=ln[0],An=ln[1],jn=function(en){An({width:en.offsetWidth,height:en.offsetHeight})},er=(0,ge.useRef)(),wn=(0,ge.useRef)(),Jt=ge.useMemo(function(){return ot(dn.width,ne)},[dn.width,ne]),kn=ge.useMemo(function(){return ot(dn.height,Ot)},[dn.height,Ot]),sn=Ot-Et,nr=(0,ge.useRef)(sn);nr.current=sn;function yr(Wt){var en=Wt;return Number.isNaN(nr.current)||(en=Math.min(en,nr.current)),en=Math.max(en,0),en}var or=xn<=0,Fr=xn>=sn,wr=Nn<=0,hr=Nn>=ne,cr=Ye(or,Fr,wr,hr),Mr=function(){return{x:yn?-Nn:Nn,y:xn}},br=(0,ge.useRef)(Mr()),dr=(0,de.zX)(function(Wt){if(Pe){var en=(0,Me.Z)((0,Me.Z)({},Mr()),Wt);(br.current.x!==en.x||br.current.y!==en.y)&&(Pe(en),br.current=en)}});function Sr(Wt,en){var Mn=Wt;en?((0,lt.flushSync)(function(){Jn(Mn)}),dr()):Pt(Mn)}function Lr(Wt){var en=Wt.currentTarget.scrollTop;en!==xn&&Pt(en),ye==null||ye(Wt),dr()}var fr=function(en){var Mn=en,vn=ne?ne-dn.width:0;return Mn=Math.max(Mn,0),Mn=Math.min(Mn,vn),Mn},lr=(0,de.zX)(function(Wt,en){en?((0,lt.flushSync)(function(){Jn(function(Mn){var vn=Mn+(yn?-Wt:Wt);return fr(vn)})}),dr()):Pt(function(Mn){var vn=Mn+Wt;return vn})}),ar=Tt(Cn,or,Fr,wr,hr,!!ne,lr),Ir=(0,me.Z)(ar,2),Vr=Ir[0],Kr=Ir[1];wt(Cn,Wn,function(Wt,en,Mn,vn){var Un=vn;return cr(Wt,en,Mn)?!1:!Un||!Un._virtualHandled?(Un&&(Un._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Wt?en:0,deltaY:Wt?0:en}),!0):!1}),ve(Yn,Wn,function(Wt){Pt(function(en){return en+Wt})}),(0,we.Z)(function(){function Wt(Mn){var vn=or&&Mn.detail<0,Un=Fr&&Mn.detail>0;Cn&&!vn&&!Un&&Mn.preventDefault()}var en=Wn.current;return en.addEventListener("wheel",Vr,{passive:!1}),en.addEventListener("DOMMouseScroll",Kr,{passive:!0}),en.addEventListener("MozMousePixelScroll",Wt,{passive:!1}),function(){en.removeEventListener("wheel",Vr),en.removeEventListener("DOMMouseScroll",Kr),en.removeEventListener("MozMousePixelScroll",Wt)}},[Cn,or,Fr]),(0,we.Z)(function(){if(ne){var Wt=fr(Nn);Jn(Wt),dr({x:Wt})}},[dn.width,ne]);var Dr=function(){var en,Mn;(en=er.current)===null||en===void 0||en.delayHidden(),(Mn=wn.current)===null||Mn===void 0||Mn.delayHidden()},_r=mt(Wn,zn,In,Bt,Xt,function(){return Tn(!0)},Pt,Dr);ge.useImperativeHandle(Ve,function(){return{nativeElement:tn.current,getScrollInfo:Mr,scrollTo:function(en){function Mn(vn){return vn&&(0,ht.Z)(vn)==="object"&&("left"in vn||"top"in vn)}Mn(en)?(en.left!==void 0&&Jn(fr(en.left)),_r(en.top)):_r(en)}}}),(0,we.Z)(function(){if(pe){var Wt=zn.slice(qt,yt+1);pe(Wt,zn)}},[qt,yt,zn]);var Nr=Le(zn,Xt,In,Bt),pr=dt==null?void 0:dt({start:qt,end:yt,virtual:Yn,offsetX:Nn,offsetY:tt,rtl:yn,getSize:Nr}),Er=Ee(zn,qt,yt,ne,Nn,Ln,te,Be),Cr=null;Et&&(Cr=(0,Me.Z)((0,Xe.Z)({},cn?"height":"maxHeight",Et),kt),Cn&&(Cr.overflowY="hidden",ne&&(Cr.overflowX="hidden"),Yt&&(Cr.pointerEvents="none")));var qn={};return yn&&(qn.dir="rtl"),ge.createElement("div",(0,oe.Z)({ref:tn,style:(0,Me.Z)((0,Me.Z)({},Qt),{},{position:"relative"}),className:On},qn,It),ge.createElement(Se.Z,{onResize:jn},ge.createElement(gt,{className:"".concat(pt,"-holder"),style:Cr,ref:Wn,onScroll:Lr,onMouseEnter:Dr},ge.createElement(Ie,{prefixCls:pt,height:Ot,offsetX:Nn,offsetY:tt,scrollWidth:ne,onInnerResize:Tn,ref:Lt,innerProps:ut,rtl:yn,extra:pr},Er))),Yn&&Ot>Et&&ge.createElement(Ft,{ref:er,prefixCls:pt,scrollOffset:xn,scrollRange:Ot,rtl:yn,onScroll:Sr,onStartMove:Vn,onStopMove:ke,spinSize:kn,containerSize:dn.height,style:vt==null?void 0:vt.verticalScrollBar,thumbStyle:vt==null?void 0:vt.verticalScrollBarThumb,showScrollBar:jt}),Yn&&ne>dn.width&&ge.createElement(Ft,{ref:wn,prefixCls:pt,scrollOffset:Nn,scrollRange:ne,rtl:yn,onScroll:Sr,onStartMove:Vn,onStopMove:ke,spinSize:Jt,containerSize:dn.width,horizontal:!0,style:vt==null?void 0:vt.horizontalScrollBar,thumbStyle:vt==null?void 0:vt.horizontalScrollBarThumb,showScrollBar:jt}))}var Ce=ge.forwardRef(_e);Ce.displayName="List";var ze=Ce,st=ze},93314:function(Zt){"use strict";Zt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(Zt,Ut,fe){"use strict";fe.d(Ut,{Z:function(){return Ke}});const oe=Se=>typeof Se=="object"&&Se!=null&&Se.nodeType===1,ht=(Se,de)=>(!de||Se!=="hidden")&&Se!=="visible"&&Se!=="clip",Me=(Se,de)=>{if(Se.clientHeight<Se.scrollHeight||Se.clientWidth<Se.scrollWidth){const we=getComputedStyle(Se,null);return ht(we.overflowY,de)||ht(we.overflowX,de)||(ge=>{const lt=(Re=>{if(!Re.ownerDocument||!Re.ownerDocument.defaultView)return null;try{return Re.ownerDocument.defaultView.frameElement}catch(Ie){return null}})(ge);return!!lt&&(lt.clientHeight<ge.scrollHeight||lt.clientWidth<ge.scrollWidth)})(Se)}return!1},Xe=(Se,de,we,ge,lt,Re,Ie,We)=>Re<Se&&Ie>de||Re>Se&&Ie<de?0:Re<=Se&&We<=we||Ie>=de&&We>=we?Re-Se-ge:Ie>de&&We<we||Re<Se&&We>we?Ie-de+lt:0,me=Se=>{const de=Se.parentElement;return de==null?Se.getRootNode().host||null:de},je=(Se,de)=>{var we,ge,lt,Re;if(typeof document=="undefined")return[];const{scrollMode:Ie,block:We,inline:Ee,boundary:at,skipOverflowHiddenElements:rt}=de,ct=typeof at=="function"?at:Ft=>Ft!==at;if(!oe(Se))throw new TypeError("Invalid target");const Ge=document.scrollingElement||document.documentElement,Ue=[];let Je=Se;for(;oe(Je)&&ct(Je);){if(Je=me(Je),Je===Ge){Ue.push(Je);break}Je!=null&&Je===document.body&&Me(Je)&&!Me(document.documentElement)||Je!=null&&Me(Je,rt)&&Ue.push(Je)}const Ye=(ge=(we=window.visualViewport)==null?void 0:we.width)!=null?ge:innerWidth,Tt=(Re=(lt=window.visualViewport)==null?void 0:lt.height)!=null?Re:innerHeight,{scrollX:Le,scrollY:Ze}=window,{height:Ct,width:Fe,top:et,right:Ae,bottom:Qe,left:Mt}=Se.getBoundingClientRect(),{top:wt,right:$t,bottom:Ht,left:ve}=(Ft=>{const Ne=window.getComputedStyle(Ft);return{top:parseFloat(Ne.scrollMarginTop)||0,right:parseFloat(Ne.scrollMarginRight)||0,bottom:parseFloat(Ne.scrollMarginBottom)||0,left:parseFloat(Ne.scrollMarginLeft)||0}})(Se);let he=We==="start"||We==="nearest"?et-wt:We==="end"?Qe+Ht:et+Ct/2-wt+Ht,mt=Ee==="center"?Mt+Fe/2-ve+$t:Ee==="end"?Ae+$t:Mt-ve;const Kt=[];for(let Ft=0;Ft<Ue.length;Ft++){const Ne=Ue[Ft],{height:ot,width:ft,top:rn,right:kt,bottom:_e,left:Ce}=Ne.getBoundingClientRect();if(Ie==="if-needed"&&et>=0&&Mt>=0&&Qe<=Tt&&Ae<=Ye&&(Ne===Ge&&!Me(Ne)||et>=rn&&Qe<=_e&&Mt>=Ce&&Ae<=kt))return Kt;const ze=getComputedStyle(Ne),st=parseInt(ze.borderLeftWidth,10),Te=parseInt(ze.borderTopWidth,10),Ve=parseInt(ze.borderRightWidth,10),$e=parseInt(ze.borderBottomWidth,10);let pt=0,St=0;const Et="offsetWidth"in Ne?Ne.offsetWidth-Ne.clientWidth-st-Ve:0,Bt="offsetHeight"in Ne?Ne.offsetHeight-Ne.clientHeight-Te-$e:0,Nt="offsetWidth"in Ne?Ne.offsetWidth===0?0:ft/Ne.offsetWidth:0,cn="offsetHeight"in Ne?Ne.offsetHeight===0?0:ot/Ne.offsetHeight:0;if(Ge===Ne)pt=We==="start"?he:We==="end"?he-Tt:We==="nearest"?Xe(Ze,Ze+Tt,Tt,Te,$e,Ze+he,Ze+he+Ct,Ct):he-Tt/2,St=Ee==="start"?mt:Ee==="center"?mt-Ye/2:Ee==="end"?mt-Ye:Xe(Le,Le+Ye,Ye,st,Ve,Le+mt,Le+mt+Fe,Fe),pt=Math.max(0,pt+Ze),St=Math.max(0,St+Le);else{pt=We==="start"?he-rn-Te:We==="end"?he-_e+$e+Bt:We==="nearest"?Xe(rn,_e,ot,Te,$e+Bt,he,he+Ct,Ct):he-(rn+ot/2)+Bt/2,St=Ee==="start"?mt-Ce-st:Ee==="center"?mt-(Ce+ft/2)+Et/2:Ee==="end"?mt-kt+Ve+Et:Xe(Ce,kt,ft,st,Ve+Et,mt,mt+Fe,Fe);const{scrollLeft:Qt,scrollTop:le}=Ne;pt=cn===0?0:Math.max(0,Math.min(le+pt/cn,Ne.scrollHeight-ot/cn+Bt)),St=Nt===0?0:Math.max(0,Math.min(Qt+St/Nt,Ne.scrollWidth-ft/Nt+Et)),he+=le-pt,mt+=Qt-St}Kt.push({el:Ne,top:pt,left:St})}return Kt},He=Se=>Se===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(Se)?Se:{block:"start",inline:"nearest"};function Ke(Se,de){if(!Se.isConnected||!(lt=>{let Re=lt;for(;Re&&Re.parentNode;){if(Re.parentNode===document)return!0;Re=Re.parentNode instanceof ShadowRoot?Re.parentNode.host:Re.parentNode}return!1})(Se))return;const we=(lt=>{const Re=window.getComputedStyle(lt);return{top:parseFloat(Re.scrollMarginTop)||0,right:parseFloat(Re.scrollMarginRight)||0,bottom:parseFloat(Re.scrollMarginBottom)||0,left:parseFloat(Re.scrollMarginLeft)||0}})(Se);if((lt=>typeof lt=="object"&&typeof lt.behavior=="function")(de))return de.behavior(je(Se,de));const ge=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:lt,top:Re,left:Ie}of je(Se,He(de))){const We=Re-we.top+we.bottom,Ee=Ie-we.left+we.right;lt.scroll({top:We,left:Ee,behavior:ge})}}}}]);
|