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

1106 lines
647 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[4496],{45559:function(){"use strict"},96408:function(Ot,zt){"use strict";zt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},93510: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 Ot={},zt="5.0",fe={},se=null,gt=!1,Ie=!1,_e=null,me=!1,Ye=null,Be=null,qe=0;qe<arguments.length;qe++){var ke=arguments[qe];if(ke!==null)switch(typeof ke){case"number":zt=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?zt=ke:_e=ke;break;case"object":typeof ke.is3D!="undefined"?se=ke:fe=ke;break;case"boolean":gt=ke,Ie=!0;break}}se===null&&(se={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&&!Ie&&(gt=!0)),_e!==null&&fe.id===void 0&&(fe.id=_e);var de="",Te="",ye=!1,ft=null,Ue=null,Fe=null,Oe=!1,Le=null,st=null,ut=null,Et=null,yt=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var vt=function(we){return parseFloat(we)>4?parseFloat(we):5};Ot.setHTML5Codebase=function(we,Xe){Be=we,Ve(we,Xe)},Ot.setJavaCodebase=Ot.setJavaCodebaseVersion=Ot.isCompiledInstalled=Ot.setPreCompiledScriptPath=Ot.setPreCompiledResourcePath=function(){},Ot.setHTML5CodebaseVersion=function(we,Xe){var Ze=parseFloat(we);if(Ze!==NaN&&Ze<5){console.log("The GeoGebra HTML5 codebase version "+Ze+" is deprecated. Using version latest instead.");return}Ye=we,ce(we,Xe)},Ot.getHTML5CodebaseVersion=function(){return Ue},Ot.getParameters=function(){return fe},Ot.setFontsCSSURL=function(we){Et=we},Ot.setGiacJSURL=function(we){},Ot.setJNLPFile=function(we){de=we},Ot.setJNLPBaseDir=function(we){},Ot.inject=function(){function we(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Xe="auto",Ze=fe.id,Mt,it=!1,Ce=0;Ce<arguments.length;Ce++){var ve=arguments[Ce];typeof ve=="string"?(ve=ve.toLowerCase(),ve.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Xe=ve:Ze=arguments[Ce]):typeof ve=="boolean"?it=ve:ve instanceof HTMLElement&&(Mt=ve)}Me();function Me(){if(!me){setTimeout(Me,200);return}Xe=dt(Xe);var $e=Mt||document.getElementById(Ze);if(!$e){console.log("possibly bug on ajax loading? ");return}if(Ot.removeExistingApplet($e,!1),fe.width===void 0&&$e.clientWidth&&(fe.width=$e.clientWidth),fe.height===void 0&&$e.clientHeight&&(fe.height=$e.clientHeight),!(fe.width&&fe.height)&&Xe==="html5"&&(delete fe.width,delete fe.height),ft=Xe,Xe==="screenshot")Ee($e,fe);else{var xe=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?xe=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(xe=(!mt()||we())&&ht()),xe?(ft="screenshot",Pt($e,fe,it,Xe)):je($e,fe,it)}}};function mt(){try{return window.self!==window.top}catch(we){return!0}}function ht(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Ot.getViews=function(){return se},Ot.isJavaInstalled=function(){return!1};var $t=function(we){var Xe=function(Ce){var ve=JSON.parse(Ce),Me=function(He){return He.type=="G"||He.type=="E"},$e=ve.elements?ve.elements.filter(Me)[0]:ve;if(!$e||!$e.url){Ze();return}fe.fileName=$e.url,Se($e.settings||{}),se.is3D=!0;var xe="https://www.geogebra.org/images/";Ot.setPreviewImage(Le||$e.previewUrl,xe+"GeoGebra_loading.png",xe+"applet_play.png"),we()},Ze=function(){fe.onError&&fe.onError(),wt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},Mt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",it="/materials/"+fe.material_id+"?scope=basic";Ge("https://"+Mt+"/api/proxy.php?path="+encodeURIComponent(it),Xe,Ze)};function Se(we){var Xe=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ze){we[Ze]=!!we[Ze]}),Xe.forEach(function(Ze){fe[Ze]===void 0&&we[Ze]!==void 0&&(fe[Ze]=we[Ze])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Ge(we,Xe,Ze){var Mt=new XMLHttpRequest;Mt.open("GET",we),Mt.onload=function(){Xe(Mt.responseText)},Mt.onerror=Ze,Mt.send()}Ot.isHTML5Installed=function(){return!0},Ot.getLoadedAppletType=function(){return ft},Ot.setPreviewImage=function(we,Xe,Ze){Le=we,st=Xe,ut=Ze},Ot.removeExistingApplet=function(we,Xe){var Ze;typeof we=="string"&&(we=document.getElementById(we)),ft=null;var Mt=null;for(Ze=0;Ze<we.childNodes.length;Ze++){var it=we.childNodes[Ze],Ce=it.className;Ce==="applet_screenshot"?Xe?(it.style.display="block",ft="screenshot"):it.style.display="none":Ce!=="applet_scaler prerender"&&(we.removeChild(it),Mt=Ce&&Ce.indexOf("appletParameters")!=-1?it.id:null,Ze--)}var ve=fe.id!==void 0?fe.id:Mt,Me=window[ve];Me&&typeof Me.getBase64=="function"&&(Me.remove(),window[ve]=null)},Ot.refreshHitPoints=function(){if(vt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var we=Ot.getAppletObject();return we&&typeof we.recalculateEnvironments=="function"?(we.recalculateEnvironments(),!0):!1},Ot.startAnimation=function(){var we=Ot.getAppletObject();return we&&typeof we.startAnimation=="function"?(we.startAnimation(),!0):!1},Ot.stopAnimation=function(){var we=Ot.getAppletObject();return we&&typeof we.stopAnimation=="function"?(we.stopAnimation(),!0):!1},Ot.getAppletObject=function(){var we=fe.id!==void 0?fe.id:"ggbApplet";return window[we]},Ot.resize=function(){};var rt=function(we,Xe,Ze){var Mt=document.createElement("param");Mt.setAttribute("name",Xe),Mt.setAttribute("value",Ze),we.appendChild(Mt)},Pe=function(we){return we&&we!=="false"},je=function(we,Xe,Ze){vt(Ue)<=4.2&&(Ze=!0);var Mt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ue||ggbHTML5LoadedCodebaseIsWebSimple&&!Oe)&&(Mt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var it=document.createElement("div");it.classList.add("appletParameters","notranslate");var Ce=Xe.width,ve=Xe.height;if(Xe.disableAutoScale=Xe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Xe.disableAutoScale,Xe.width!==void 0)if(vt(Ue)<=4.4)Pe(Xe.showToolBar)&&(Xe.height-=7),Pe(Xe.showAlgebraInput)&&(Xe.height-=37),Xe.width<605&&Pe(Xe.showToolBar)&&(Xe.width=605,Ce=605);else{var Me=100;(Pe(Xe.showToolBar)||Pe(Xe.showMenuBar))&&(Xe.hasOwnProperty("customToolBar")&&(Xe.customToolbar=Xe.customToolBar),Me=Pe(Xe.showMenuBar)?245:155),Ce<Me&&(Xe.width=Me,Ce=Me)}it.style.border="none",it.style.display="inline-block";for(var $e in Xe)Xe.hasOwnProperty($e)&&$e!=="appletOnLoad"&&it.setAttribute("data-param-"+$e,Xe[$e]);Et&&it.setAttribute("data-param-fontscssurl",Et),Ot.resize=function(){GGBAppletUtils.responsiveResize(we,Xe)},window.addEventListener("resize",function(ee){Ot.resize()});var xe=typeof Xe.appletOnLoad=="function"?Xe.appletOnLoad:function(){};if(!Ze&&Xe.width!==void 0){Xe.hasOwnProperty("showSplash")||it.setAttribute("data-param-showSplash","false");var He=we.querySelector(".applet_scaler.prerender"),Je=He!==null;if(Je)var et=He.querySelector(".ggb_preview");else{var et=St(Ce,ve,Xe.borderColor,!1);He=document.createElement("div"),He.className="applet_scaler",He.style.position="relative",He.style.display="block",He.style.width=Ce+"px",He.style.height=ve+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(He,"66%"),vt(Ue)>=5?(Xe.appletOnLoad=function(ee){var ie=we.querySelector(".ggb_preview");ie&&ie.parentNode.removeChild(ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(He),window.GGBT_wsf_view&&$(window).trigger("resize"),xe(ee)},Je||He.appendChild(et)):it.appendChild(et),He.appendChild(it),Je||we.appendChild(He),setTimeout(function(){Ot.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(it),we.appendChild(nt),Xe.appletOnLoad=function(ee){Ot.resize(),xe(ee)}}function Ke(ee,ie){ie&&typeof ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,ie.appletOnLoad):renderGGBElement(ee),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ie)}function xt(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){Ke(ue.article,ue.params)}),html5AppletsToProcess=null)},vt(Ue)<5&&(ee.className+=" geogebraweb")):Ke(ee,ie)}if(Mt){scriptLoadStarted=!0;for(var kt=0;kt<it.childNodes.length;kt++){var Yt=it.childNodes[kt].tagName;Yt==="TABLE"&&(it.removeChild(it.childNodes[kt]),kt--)}if(ggbHTML5LoadedScript!==null){var Wt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Wt!=null&&Wt.parentNode.removeChild(Wt)}var ae=document.createElement("script"),te=function(){xt(it,Xe)};ae.src=Te+Fe,ggbHTML5LoadedCodebaseIsWebSimple=Oe,ggbHTML5LoadedCodebaseVersion=Ue,ggbHTML5LoadedScript=ae.src,wt("GeoGebra HTML5 codebase loaded: '"+Te+"'.",Xe),!Be&&(!Ye||Ye=="5.0")?(Oe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),te()):Te.requirejs?__webpack_require__.e(3861).then(function(){var ee=[__webpack_require__(40341)];te.apply(null,ee)}.bind(this)).catch(__webpack_require__.oe):(ae.onload=te,we.appendChild(ae))}else xt(it,Xe);Xe.height=ve,Xe.width=Ce},Ee=function(we,Xe,Ze){var Mt=St(Xe.width,Xe.height,Xe.borderColor,Ze),it=document.createElement("div");it.style.position="relative",it.style.display="block",it.style.width=Xe.width+"px",it.style.height=Xe.height+"px",it.className="applet_screenshot applet_scaler"+(Ze?" applet_screenshot_play":""),it.appendChild(Mt);var Ce=GGBAppletUtils.getScale(Xe,we,Ze);Ze?(we.appendChild(ot()),window.GGBT_wsf_view||(we.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(it,"66%"),we.appendChild(it),Ce!==1&&!isNaN(Ce)&&(GGBAppletUtils.scaleElement(it,Ce),it.style.width=Xe.width+"px",it.style.height=Xe.height+"px",it.parentNode.style.width=Xe.width*Ce+"px",it.parentNode.style.height=Xe.height*Ce+"px"),Ot.resize=function(){ze(we,Mt,it,Ze)},window.addEventListener("resize",function(ve){Ot.resize()}),Ot.resize()};function ze(we,Xe,Ze,Mt){if(we.contains(Xe)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(we)}var it=GGBAppletUtils.getScale(fe,we,Mt);Ze.parentNode!==null&&(!isNaN(it)&&it!==1?(GGBAppletUtils.scaleElement(Ze,it),Ze.parentNode.style.width=fe.width*it+"px",Ze.parentNode.style.height=fe.height*it+"px"):(GGBAppletUtils.scaleElement(Ze,1),Ze.parentNode.style.width=fe.width+"px",Ze.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(we),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Ot.onExitFullscreen=function(we,Xe){Xe.appendChild(we)};var Pt=function(we,Xe,Ze,Mt){Ee(we,Xe,!0);for(var it=function(){var Me=[];for(ve=0;ve<we.childNodes.length;ve++)Me.push(we.childNodes[ve]);if(window.GGBT_wsf_view){var $e=window.GGBT_wsf_view.renderFullScreen(we,Xe.id),xe=document.getElementById("fullscreencontainer"),He=jQuery(we).find(".fullscreencontent");He.length>0?($e.remove(),He.attr("id","fullscreencontent").show(),jQuery(xe).append(He),window.dispatchEvent(new Event("resize"))):je($e,Xe,!1),window.GGBT_wsf_view.launchFullScreen(xe)}else ft=Mt,je(we,Xe,!1);if(!window.GGBT_wsf_view)for(ve=0;ve<Me.length;ve++)we.removeChild(Me[ve])},Ce=we.getElementsByClassName("ggb_preview_play"),ve=0;ve<Ce.length;ve++)Ce[ve].addEventListener("click",it,!1),Ce[ve].addEventListener("ontouchstart",it,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(we),ht()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ot=function(){var we=document.createElement("div");if(we.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Xe='.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");}',Ze=document.createElement("style");Ze.styleSheet?Ze.styleSheet.cssText=Xe:Ze.appendChild(document.createTextNode(Xe)),document.getElementsByTagName("head")[0].appendChild(Ze)}return we},St=function(we,Xe,Ze,Mt){var it=document.createElement("div");it.className="ggb_preview",it.style.position="absolute",it.style.zIndex="90",it.style.width=we-2+"px",it.style.height=Xe-2+"px",it.style.top="0px",it.style.left="0px",it.style.overflow="hidden",it.style.backgroundColor="white";var Ce="lightgrey";Ze!==void 0&&(Ze==="none"?Ce="transparent":Ce=Ze),it.style.border="1px solid "+Ce;var ve=document.createElement("img");if(ve.style.position="relative",ve.style.zIndex="1000",ve.style.top="-1px",ve.style.left="-1px",Le!==null&&ve.setAttribute("src",Le),ve.style.opacity=.7,st!==null){var Me,$e,xe;if(!Mt){Me=document.createElement("img"),Me.style.position="absolute",Me.style.zIndex="1001",Me.style.opacity=1,ve.style.opacity=.3,$e=360,$e>we/4*3&&($e=we/4*3),xe=$e/5.8,Me.setAttribute("src",st),Me.setAttribute("width",$e),Me.setAttribute("height",xe);var He=(we-$e)/2,Je=(Xe-xe)/2;Me.style.left=He+"px",Me.style.top=Je+"px",it.appendChild(Me)}}return it.appendChild(ve),it},dt=function(we){return we=we.toLowerCase(),we==="html5"||we==="screenshot"?we:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ce=function(we,Xe){if(Ue=we,Xe){Ve(Ue,!0);return}var Ze=!gt;if(Ze){var Mt=vt(Ue);!isNaN(Mt)&&Mt<4.4&&(Ze=!1)}var it,Ce;window.location.protocol.substr(0,4)==="http"?it=window.location.protocol:it="http:";var ve=Ue.indexOf("//");ve>0?Ce=Ue:ve===0?Ce=it+Ue:Ce="https://www.geogebra.org/apps/5.2.814.0/";for(var Me in pe)if(Ue.slice(pe[Me].length*-1)===pe[Me]||Ue.slice((pe[Me].length+1)*-1)===pe[Me]+"/"){Ve(Ce,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ze&&!se.is3D&&!se.AV&&!se.SV&&!se.CV&&!se.EV2&&!se.CP&&!se.PC&&!se.DA&&!se.FI&&!se.PV&&!Pe(fe.showToolBar)&&!Pe(fe.showMenuBar)&&!Pe(fe.showAlgebraInput)&&!Pe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Ce+="webSimple/":Ce+="web3d/",Ve(Ce,!1)},Ve=function(we,Xe){if(we.requirejs){Te=we;return}we.slice(-1)!=="/"&&(we+="/"),Te=we,Xe===null&&(Xe=we.indexOf("http")===-1),ye=Xe,Fe="web.nocache.js",Oe=!1;var Ze=Te.split("/");Ze.length>1&&(!Xe&&Ze[Ze.length-2]==="webSimple"?(Fe="webSimple.nocache.js",Oe=!0):pe.indexOf(Ze[Ze.length-2])>=0&&(Fe=Ze[Ze.length-2]+".nocache.js")),Ze=we.split("/"),Ue=Ze[Ze.length-3],Ue.substr(0,4)==="test"?Ue=Ue.substr(4,1)+"."+Ue.substr(5,1):(Ue.substr(0,3)==="war"||Ue.substr(0,4)==="beta")&&(Ue="5.0");var Mt=parseFloat(Ue);Mt!==NaN&&Mt<5&&we.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Mt+" is deprecated. Using version latest instead."),ce("5.0",Xe))},wt=function(we,Xe){window.console&&window.console.log&&(!Xe||typeof Xe.showLogging=="undefined"||Xe.showLogging&&Xe.showLogging!=="false")&&console.log(we)};fe.material_id!==void 0?$t(lt):lt();function lt(){var we=zt;Ye!==null?we=Ye:parseFloat(we)<5&&(we="5.0"),ce(we,!1),Be!==null&&Ve(Be,ye),me=!0}return Ot},GGBAppletUtils=function(){"use strict";function Ot(){return window.GGBT_wsf_edit!==void 0}function zt(me,Ye){Ye!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+Ye+","+Ye+")",me.style.webkitTransform="scale("+Ye+","+Ye+")",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,Ye,Be,qe,ke,de){var Te=null;if(de!=null&&de!="")for(var ye=me.parentNode;ye!=null;)if((" "+ye.className+" ").indexOf(" "+de+" ")>-1){Te=ye;break}else ye=ye.parentNode;var ft=0,Ue=0,Fe=0,Oe=0,Le=0,st=0,ut=0;if(Te)ft=Te.offsetWidth,Ue=Math.max(qe?Te.offsetWidth:0,Te.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ft=Math.min(window.innerWidth,document.documentElement.clientWidth),Ue=Math.min(window.innerHeight,document.documentElement.clientHeight),Fe=ft):(ft=window.innerWidth,Ue=window.innerHeight,Fe=window.innerWidth),me){var Et=me.getBoundingClientRect();Et.left>0&&Et.left<=ft&&(ke===void 0||!ke)&&(document.dir==="rtl"?(Le=ft-Et.width-Et.left,st=Fe<=480?10:30):(st=Et.left,Le=Fe<=480?10:30),Oe=st+Le)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var yt=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Oe=40,ut=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Oe=0,ut=40)}}return me&&((Be===void 0||!Be)&&Ye>0&&Ye+Oe<ft?ft=Ye:ft-=Oe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Be===void 0||!Be)&&(Ue-=ut)),{width:ft,height:Ue}}function se(me,Ye,Be,qe,ke){if(me.isScreenshoGenerator)return 1;var de=qe!==void 0&&qe,Te=me.noScaleMargin!=null&&me.noScaleMargin,ye=function(yt){return yt&&yt!=="false"},ft=ye(me.autoHeight),Ue=fe(Ye,me.width,Be,ft,de&&window.GGBT_wsf_view||Te,ke),Fe=parseInt(Ue.width),Oe=me.width,Le=me.height;if(Oe===void 0){var st=Ye.querySelector(".appletParameters");st&&(Oe=st.offsetWidth,Le=st.offsetHeight)}var ut=Fe/Oe,Et=de?1:Ue.height/Le;return Be!==void 0&&!Be&&(ut=Math.min(1,ut),Et=Math.min(1,Et)),Math.min(ut,Et)}function gt(me,Ye,Be){var qe=1,ke,de=!1;if(me.hasOwnProperty("allowUpscale")&&(de=me.allowUpscale),me.hasOwnProperty("scale")&&(qe=parseFloat(me.scale),(isNaN(qe)||qe===null||qe===0)&&(qe=1),qe>1&&(de=!0)),Ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))ke=se(me,Ye,de,Be,me.scaleContainerClass);else return qe;return de&&(!me.hasOwnProperty("scale")||qe===1)?ke:Math.min(qe,ke)}function Ie(me){var Ye=Math.min(window.innerWidth,document.documentElement.clientWidth),Be=Math.min(window.innerHeight,document.documentElement.clientHeight),qe=me.getBoundingClientRect(),ke=(Ye-qe.width)/2,de=(Be-qe.height)/2;de<0&&(de=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?me.style.left="40px":me.style.left=ke+"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=ke+"px")}function _e(me,Ye){var Be=me.querySelector(".appletParameters");if(Be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ye.id!==Be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Be.parentElement&&/fullscreen/.test(Be.parentElement.className))return;var qe=gt(Ye,me);Ot()&&Be.setAttribute("data-param-scale",qe);for(var ke=null,de=0;de<me.childNodes.length;de++)if(me.childNodes[de].className!==void 0&&me.childNodes[de].className.match(/^applet_scaler/)){ke=me.childNodes[de];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var Te=Ye.id!==void 0?Ye.id:"ggbApplet",ye=window[Te];(ye==null||!ye.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(qe)&&qe!==1?(ke.parentNode.style.width=Ye.width*qe+"px",ke.parentNode.style.height=Ye.height*qe+"px",zt(ke,qe)):(zt(ke,1),ke.parentNode.style.width=Ye.width+"px",ke.parentNode.style.height=Ye.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ie(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Be).parents(".content-added-content"))}}return{responsiveResize:_e,isFlexibleWorksheetEditor:Ot,positionCenter:Ie,getScale:gt,scaleElement:zt}}();__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 Ot=n.location.search;return Ot.indexOf(J)!=-1||Ot.indexOf(K)!=-1}function q(Ot,zt){}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(Ot){var zt=s[L].bindings;s[L].bindings=function(){for(var fe=zt?zt():{},se=Ot[webModule.__softPermutationId],gt=O;gt<se.length;gt++){var Ie=se[gt];fe[Ie[O]]=Ie[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Ot=o.createElement(Q);if(Ot.id=L,Ot.style.cssText=R+S,Ot.tabIndex=-1,o.body.appendChild(Ot),t=Ot.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var zt=document.compatMode==U?V:W;t.write(zt+X),t.close()}}}function w(Ot){function zt(se){function gt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ie=gt();if(Ie){se();return}function _e(){if(!Ie){if(!gt())return;Ie=!0,se(),o.removeEventListener&&o.removeEventListener(Z,_e,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,_e,!1);var me=setInterval(function(){_e()},$)}function fe(se){var gt=u(),Ie=gt.body,_e=gt.createElement(_);_e.language=ab,_e.crossOrigin=W,_e.src=se,webModule.__errFn&&(_e.onerror=function(){webModule.__errFn(L,new Error(bb+se))}),Ie.appendChild(_e)}zt(function(){fe(Ot)})}webModule.__startLoadingFragment=function(Ot){return C(Ot)},webModule.__installRunAsyncCode=function(Ot){var zt=u(),fe=zt.body,se=zt.createElement(_);se.language=ab,se.text=Ot,fe.appendChild(se),fe.removeChild(se)};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(Ot){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ot){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ot){var zt=c[Ot];return zt==null?null:zt},r=d,webModule.__errFn=e}function B(){function Ot(me){var Ye=me.lastIndexOf(rb);Ye==-1&&(Ye=me.length);var Be=me.indexOf(sb);Be==-1&&(Be=me.length);var qe=me.lastIndexOf(tb,Math.min(Be,Ye));return qe>=O?me.substring(O,qe+P):W}function zt(me){if(!me.match(/^\w+:\/\//)){var Ye=o.createElement(ub);Ye.src=me+vb,me=Ot(Ye.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function se(){for(var me=o.getElementsByTagName(_),Ye=O;Ye<me.length;++Ye)if(me[Ye].src.indexOf(xb)!=-1)return Ot(me[Ye].src);return W}function gt(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Ie(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var _e=fe();return _e==W&&(_e=se()),_e==W&&(_e=gt()),_e==W&&Ie()&&(_e=Ot(o.location.href)),_e=zt(_e),_e}function C(Ot){return Ot.match(/^\//)||Ot.match(/^[a-zA-Z]+:\/\//)?Ot:webModule.__moduleBase+Ot}function D(){var Ot=[],zt=O,fe=[],se=[];function gt(me){var Ye=se[me](),Be=fe[me];if(Ye in Be)return Ye;var qe=[];for(var ke in Be)qe[Be[ke]]=ke;throw r&&r(me,qe,Ye),null}if(__gwt_isKnownPropertyValue=function(me,Ye){return Ye in fe[me]},webModule.__getPropMap=function(){var me={};for(var Ye in fe)fe.hasOwnProperty(Ye)&&(me[Ye]=gt(Ye));return me},webModule.__computePropValue=gt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ie;try{Ie=Cb;var _e=Ie.indexOf(Db);_e!=-1&&(zt=parseInt(Ie.substring(_e+P),$),Ie=Ie.substring(O,_e))}catch(me){}return webModule.__softPermutationId=zt,C(Ie+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})()},28735:function(Ot,zt,fe){"use strict";fe.d(zt,{Ax:function(){return _e},Ds:function(){return me},KI:function(){return Be},SI:function(){return Ie},f1:function(){return gt}});var se=fe(74128);function gt(qe){let ke=!0;if(qe.length>0){for(let de=0;de<qe.length;de++)if(qe[de].compile_success==0||!qe[de].compile_success){ke=!1;break}}else ke=!1;return ke}function Ie(qe,ke=""){let de=[];for(let Te=0;Te<qe.length;Te++){let ye=qe[Te],ft=ke?`${ke}/${ye.name}`:`${ye.name}`;de.push({title:ye.name,type:ye.type,isLeaf:ye.type!=="tree",key:ft})}return de}function _e(qe,ke,de){for(let Te=0;Te<qe.length;Te++){let ye=qe[Te];if(ye.key===ke){ye.children=de;break}ye.children&&_e(ye.children,ke,de)}return qe}function me(qe,ke,de){let Te;return function(){let ye=this,ft=arguments,Ue=function(){Te=null,de||qe.apply(ye,ft)},Fe=de&&!Te;clearTimeout(Te),Te=setTimeout(Ue,ke),Fe&&qe.apply(ye,ft)}}const Ye=!0,Be=se.Z.API_SERVER},53464:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return Wt}});var se=fe(59301),gt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ie=fe(92310),_e=fe.n(Ie),me=fe(29787);var Ye=function(ae,te){return(Ye=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])})(ae,te)};function Be(ae,te){function ee(){this.constructor=ae}Ye(ae,te),ae.prototype=te===null?Object.create(te):(ee.prototype=te.prototype,new ee)}function qe(ae,te,ee,ie){return new(ee||(ee=Promise))(function(ue,ne){function ge(Ct){try{pt(ie.next(Ct))}catch(Re){ne(Re)}}function ct(Ct){try{pt(ie.throw(Ct))}catch(Re){ne(Re)}}function pt(Ct){var Re;Ct.done?ue(Ct.value):(Re=Ct.value,Re instanceof ee?Re:new ee(function(Zt){Zt(Re)})).then(ge,ct)}pt((ie=ie.apply(ae,te||[])).next())})}function ke(ae,te){var ee,ie,ue,ne,ge={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ne={next:ct(0),throw:ct(1),return:ct(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function ct(pt){return function(Ct){return function(Re){if(ee)throw new TypeError("Generator is already executing.");for(;ge;)try{if(ee=1,ie&&(ue=2&Re[0]?ie.return:Re[0]?ie.throw||((ue=ie.return)&&ue.call(ie),0):ie.next)&&!(ue=ue.call(ie,Re[1])).done)return ue;switch(ie=0,ue&&(Re=[2&Re[0],ue.value]),Re[0]){case 0:case 1:ue=Re;break;case 4:return ge.label++,{value:Re[1],done:!1};case 5:ge.label++,ie=Re[1],Re=[0];continue;case 7:Re=ge.ops.pop(),ge.trys.pop();continue;default:if(ue=ge.trys,!((ue=ue.length>0&&ue[ue.length-1])||Re[0]!==6&&Re[0]!==2)){ge=0;continue}if(Re[0]===3&&(!ue||Re[1]>ue[0]&&Re[1]<ue[3])){ge.label=Re[1];break}if(Re[0]===6&&ge.label<ue[1]){ge.label=ue[1],ue=Re;break}if(ue&&ge.label<ue[2]){ge.label=ue[2],ge.ops.push(Re);break}ue[2]&&ge.ops.pop(),ge.trys.pop();continue}Re=te.call(ae,ge)}catch(Zt){Re=[6,Zt],ie=0}finally{ee=ue=0}if(5&Re[0])throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}([pt,Ct])}}}function de(){for(var ae=0,te=0,ee=arguments.length;te<ee;te++)ae+=arguments[te].length;var ie=Array(ae),ue=0;for(te=0;te<ee;te++)for(var ne=arguments[te],ge=0,ct=ne.length;ge<ct;ge++,ue++)ie[ue]=ne[ge];return ie}var Te=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(te,ee){for(var ie=0,ue=ee;ie<ue.length;ie++){var ne=ue[ie],ge=ne[0],ct=ne[1];te.setAttribute(ge,ct)}},ae.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&&ae.setAttributes(ue,ie),ue},ae.createLine=function(te,ee,ie,ue,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",te.toString()),ge.setAttribute("y1",ee.toString()),ge.setAttribute("x2",ie.toString()),ge.setAttribute("y2",ue.toString()),ne&&ae.setAttributes(ge,ne),ge},ae.createPolygon=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",te),ee&&ae.setAttributes(ie,ee),ie},ae.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&&ae.setAttributes(ie,ee),ie},ae.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&&ae.setAttributes(ue,ie),ue},ae.createGroup=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&ae.setAttributes(ee,te),ee},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(te,ee,ie,ue,ne,ge,ct){var pt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(pt,[["id",te],["orient",ee],["markerWidth",ie.toString()],["markerHeight",ue.toString()],["refX",ne.toString()],["refY",ge.toString()]]),pt.appendChild(ct),pt},ae.createText=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),te&&ae.setAttributes(ee,te),ee},ae.createTSpan=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=te,ee&&ae.setAttributes(ie,ee),ie},ae.createImage=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&ae.setAttributes(ee,te),ee},ae.createPoint=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=te,ie.y=ee,ie},ae.createPath=function(te,ee){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",te),ee&&ae.setAttributes(ie,ee),ie},ae}(),ye=function(){function ae(){}return ae.addKey=function(te){ae.key=te},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),ft=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,ee,ie){var ue=this;return new Promise(function(ne){var ge=ie!==void 0?ie:document.createElement("canvas");te===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var ct=document.createElementNS("http://www.w3.org/2000/svg","svg");ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),ct.setAttribute("width",ee.width.baseVal.valueAsString),ct.setAttribute("height",ee.height.baseVal.valueAsString),ct.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),ct.innerHTML=ee.innerHTML,ue.naturalSize===!0?(ct.width.baseVal.value=te.naturalWidth,ct.height.baseVal.value=te.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(ct.width.baseVal.value=ue.width,ct.height.baseVal.value=ue.height),ge.width=ct.width.baseVal.value,ge.height=ct.height.baseVal.value;var pt=ct.outerHTML,Ct=ge.getContext("2d");ue.markersOnly!==!0&&Ct.drawImage(te,0,0,ge.width,ge.height);var Re=window.URL,Zt=new Image(ge.width,ge.height);Zt.setAttribute("crossOrigin","anonymous");var Rt=new Blob([pt],{type:"image/svg+xml"}),It=Re.createObjectURL(Rt);Zt.onload=function(){Ct.drawImage(Zt,0,0),Re.revokeObjectURL(It);var un=ge.toDataURL(ue.imageType,ue.imageQuality);ne(un)},Zt.src=It})},ae}(),Ue=function(){},Fe=function(){function ae(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(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},ae.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)},ae.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 Oe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Oe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Oe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Le("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Le("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},ae.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),Oe=function(ae,te){this.selector=ae,this.style=te},Le=function(ae,te){this.localName=ae,this.style=te},st=function(){function ae(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 ae.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 ge=document.createElement("div");ge.className=""+ee.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){ee.markerToolbarButtonClicked(ge,ne)}),ee.buttons.push(ge),ee.markerButtons.push(ge)}),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()},ae.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ae.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.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]))}},ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ae.prototype.resetButtonStyles=function(){var 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)})},ae.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)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Le("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 Le("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Le("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Le("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 Le("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Le("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 Le("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Le("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Oe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Oe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},ae.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"},ae.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])},ae.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)},ae.prototype.setActiveMarkerButton=function(te){var ee=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},ae.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")})},ae}(),ut=function(){function ae(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 ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new Le("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 Le("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Le("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Le("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Le("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 Le("toolbox-panel-row_colors",`
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Le("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 Le("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Le("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ae.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)},ae.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 ge;ne.uiStyleSettings=ue.uiStyleSettings;var ct=document.createElement("div");ct.className=ue.toolboxButtonStyleClass.name+" "+((ge=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ue.toolboxButtonStyleColorsClass.name),ct.innerHTML=ne.icon,ct.title=ne.title,ct.addEventListener("click",function(){ue.panelButtonClick(ne)}),ue.panelButtons.push(ct),ue.buttonRow.appendChild(ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.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,ge){var ct,pt;ne.className=ee.toolboxButtonStyleClass.name+" "+(ge===ie?""+((ct=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ct!==void 0?ct:ee.toolboxActiveButtonStyleColorsClass.name):""+((pt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&pt!==void 0?pt:ee.toolboxButtonStyleColorsClass.name))})},ae}(),Et=function(ae,te){this.title=ae,this.icon=te},yt=function(ae){function te(ee,ie,ue,ne){var ge=ae.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 ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=ie,ge.currentColor=ue,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return Be(te,ae),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,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=ne-2+"px",ge.style.height=ne-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(ne+2)/2+"px",ge.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){ie.setCurrentColor(ee,ge)});var ct=document.createElement("div");return ct.style.display="inline-block",ct.style.width=ne-2+"px",ct.style.height=ne-2+"px",ct.style.backgroundColor=ee,ct.style.borderRadius=ne/2+"px",ee==="transparent"&&(ct.style.fill=this.uiStyleSettings.toolboxAccentColor,ct.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>`),ge.appendChild(ct),ge},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}(Et),vt=function(){function ae(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(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(te,ee){},ae.prototype.dblClick=function(te,ee){},ae.prototype.manipulate=function(te){},ae.prototype.pointerUp=function(te){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ae.prototype.scale=function(te,ee){},ae.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ae.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ae.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)}},ae.typeName="MarkerBase",ae}(),mt=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.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},ae}(),ht=function(){function ae(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ae}(),$t=function(){function ae(){}return ae.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ae.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},ae}(),Se=function(ae){function te(ee,ie,ue){var ne=ae.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(Te.createTransform()),ne.setupControlBox(),ne}return Be(te,ae),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=Te.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!ae.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){ae.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 ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(ee){var ie=this.state;ae.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,ge=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,ge=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+ee.y-this.manipulationStartY}ue>=0?(this.left=ie,this.width=ue):(this.left=ie+ue,this.width=-ue),ge>=0?(this.top=ne,this.height=ge):(this.top=ne+ge,this.height=-ge),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=Te.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=Te.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(ie)).x,y:ue.y}},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var ee=Te.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=Te.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=Te.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new mt,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 ht;return ee.visual.transform.baseVal.appendItem(Te.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,ge=(this.height+this.CB_DISTANCE)/2-ee/2,ct=this.height+this.CB_DISTANCE-ee/2,pt=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,pt,ue),this.positionGrip(this.controlGrips.centerLeft.visual,ie,ge),this.positionGrip(this.controlGrips.centerRight.visual,pt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,ct),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,ct),this.positionGrip(this.controlGrips.bottomRight.visual,pt,ct),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:$t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:$t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},te.prototype.restoreState=function(ee){ae.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($t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix($t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},te.prototype.scale=function(ee,ie){ae.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}(vt),Ge=function(ae){function te(ee,ie,ue){var ne=ae.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 Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Te.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){ae.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Te.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},ae.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(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.prototype.scale.call(this,ee,ie),this.setSize()},te.title="Rectangle marker",te}(Se),rt=function(ae){function te(ee,ie,ue,ne){var ge=ae.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=ie,ge.currentWidth=ue,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return Be(te,ae),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 ge=document.createElement("div");ge.innerText=ue.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.display="flex",ct.style.alignItems="center";var pt=document.createElement("hr");pt.style.minWidth="20px",pt.style.border="0px",pt.style.borderTop=ue+"px solid "+ee.uiStyleSettings.toolboxColor,pt.style.flexGrow="2",ct.appendChild(pt),ne.appendChild(ct),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}(Et),Pe=function(ae){function te(ee,ie,ue,ne){var ge=ae.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 ge.styles=[],ge.styleBoxes=[],ge.styles=ie,ge.currentStyle=ue,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return Be(te,ae),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 ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var ct=`<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>`;ge.innerHTML=ct,ne.appendChild(ge),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}(Et),je=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.strokeColor=ue.defaultColor,ne.strokeWidth=ue.defaultStrokeWidth,ne.strokeDasharray=ue.defaultStrokeDasharray,ne.strokePanel=new yt("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Be(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.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}(Ge),Ee=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"},ze=function(ae){function te(ee,ie,ue){var ne=ae.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 Be(te,ae),te.prototype.ownsTarget=function(ee){return!!ae.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,ie){ae.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;ae.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(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=Te.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 ht;return ee.visual.transform.baseVal.appendItem(Te.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},ae.prototype.getState.call(this))},te.prototype.restoreState=function(ee){ae.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){ae.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}(vt),Pt=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){ae.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()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},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},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.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}(ze),ot=function(ae){function te(ee,ie,ue,ne){var ge=ae.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 ge.fonts=[],ge.fontBoxes=[],ge.fonts=ie,ge.currentFont=ue,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return Be(te,ae),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 ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=ue,ge.style.overflow="hidden";var ct=document.createElement("div");ct.style.whiteSpace="nowrap",ct.style.overflow="hidden",ct.style.textOverflow="ellipsis",ct.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(ct),ne.appendChild(ge),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}(Et),St=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){if(ae.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=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(ee,ie){ae.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(Te.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){ae.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){ae.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(ee){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.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(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},te.prototype.dblClick=function(ee,ie){ae.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&Te.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&&Te.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},ae.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(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.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}(Se),dt=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Color",ue.defaultColorSet,ue.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var ee=Te.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):ae.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()):ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.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()):ae.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(),ae.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.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],ge=ie[2],ct=ie[3],pt=!1,Ct=0;Ct<this.canvasElement.height;Ct++)for(var Re=0;Re<this.canvasElement.width;Re++)ee.data[Ct*this.canvasElement.width*4+4*Re+3]>0&&(pt=!0,Ct<ne&&(ne=Ct),Re<ue&&(ue=Re),Ct>ct&&(ct=Ct),Re>ge&&(ge=Re));if(pt){this.left=ue/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ue)/this.pixelRatio,this.height=(ct-ne)/this.pixelRatio;var Zt=document.createElement("canvas");Zt.width=ge-ue,Zt.height=ct-ne,Zt.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ne,ge-ue,ct-ne),0,0),this.drawingImgUrl=Zt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},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},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),ae.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,ie){ae.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}(Se),pe=function(ae){function te(ee,ie,ue){var ne=ae.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 Be(te,ae),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(ct){var pt="both";switch(ct){case 0:pt="both";break;case 1:pt="start";break;case 2:pt="end";break;case 3:pt="none"}var Ct=document.createElement("div");if(Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=pt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){ee.setCurrentType(pt,Ct)}),ie.appendChild(Ct),pt==="both"||pt==="start"){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.minHeight="20px",Re.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>`,Re.style.marginLeft="5px",Ct.appendChild(Re)}var Zt=document.createElement("div");Zt.style.display="flex",Zt.style.alignItems="center",Zt.style.minHeight="20px",Zt.style.flexGrow="2";var Rt=document.createElement("hr");if(Rt.style.minWidth="20px",Rt.style.border="0px",Rt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Rt.style.flexGrow="2",Zt.appendChild(Rt),Ct.appendChild(Zt),pt==="both"||pt==="end"){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.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>`,It.style.marginRight="5px",Ct.appendChild(It)}ne.typeBoxes.push(Ct)},ne=this,ge=0;ge<4;ge++)ue(ge);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}(Et),ce=function(ae){function te(ee,ie,ue){var ne=ae.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 pe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.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=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var 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},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.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}(Pt),Ve=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.fillColor=ue.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new yt("Color",ue.defaultColorSet,ue.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Be(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.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}(Ge),wt=function(ae){function te(ee,ie,ue,ne){var ge=ae.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 ge.opacities=[],ge.opacityBoxes=[],ge.opacities=ie,ge.currentOpacity=ue,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return Be(te,ae),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 ge=document.createElement("div");ge.innerText=100*ue+"%",ne.appendChild(ge),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}(Et),lt=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Color",ue.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new wt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Be(te,ae),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Te.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=ae.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}(Ve),we='<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>',Xe='<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>',Ze=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Text color",ue.defaultColorSet,ne.color,we),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new yt("Fill color",ue.defaultColorSet,ne.bgColor,Xe),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new ht,ne.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return ae.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(ee,ie){this.state==="new"&&ae.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):ae.prototype.pointerDown.call(this,ee,ie)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,ee);else{var ie=this.state==="creating";ae.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 ae.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",ee]]),Te.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){ae.prototype.resize.call(this,ee),this.positionTip()},te.prototype.positionTip=function(){Te.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(),ae.prototype.select.call(this)},te.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.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,ae.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},te.prototype.scale=function(ee,ie){ae.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}(St),Mt=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Line color",de(ue.defaultColorSet,["transparent"]),ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new yt("Fill color",de(ue.defaultColorSet,["transparent"]),ne.fillColor,Xe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new wt("Opacity",ue.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=Te.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){ae.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),Te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(ee){ae.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Te.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},ae.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(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.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}(Se),it=function(ae){function te(ee,ie,ue){return ae.call(this,ee,ie,ue)||this}return Be(te,ae),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},te.prototype.createTips=function(){this.tip1=Te.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Te.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(ee,ie){ae.prototype.pointerDown.call(this,ee,ie),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Te.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var 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=ae.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.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}(Pt),Ce=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,ie,ue)||this;return ne.strokePanel.colors=ue.defaultColorSet,ne.fillColor="transparent",ne}return Be(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=ae.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}(Mt),ve=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(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))},ae.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),Me=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Line color",ue.defaultColorSet,ue.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.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=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,ie){ae.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()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ae.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),ae.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),ae.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,ae.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},ae.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){ae.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}(ze),$e=function(ae){function te(ee,ie,ue){var ne=ae.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 yt("Line color",de(ue.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new yt("Fill color",de(ue.defaultColorSet,["transparent"]),ne.fillColor,Xe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new rt("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Pe("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new ot("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new yt("Text color",ue.defaultColorSet,ne.textColor,we),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Be(te,ae),te.prototype.ownsTarget=function(ee){return!(!ae.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.prototype.createVisual=function(){this.visual=Te.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Te.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Te.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Te.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,ie){ae.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){ae.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){ae.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),Te.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Te.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},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&&Te.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&&Te.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),Te.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){ae.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){ae.prototype.dblClick.call(this,ee,ie),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&Te.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&Te.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&Te.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&Te.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},ae.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(),ae.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,ie){ae.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}(Se),xe=function(){function ae(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),He=function(ae){function te(ee,ie,ue){var ne=ae.call(this,ee,!1)||this;return ne.dataUrl=ie,ne.state=ue,ne}return Be(te,ae),te}(xe),Je=function(ae){function te(ee,ie,ue){ue===void 0&&(ue=!1);var ne=ae.call(this,ee,ue)||this;return ne.marker=ie,ne}return Be(te,ae),te}(xe),et=function(){function ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ae.prototype.addEventListener=function(te,ee){this[te].push(ee)},ae.prototype.removeEventListener=function(te,ee){var ie=this[te].indexOf(ee);ie>-1&&this[te].splice(ie,1)},ae}(),nt=function(){function ae(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 Ee,this._isOpen=!1,this.undoRedoManager=new ve,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 et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new Fe(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(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,dt,ce,St,Ce,Mt,lt,Ze,it,Ve,Pt,Me,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,dt,ce,St,Mt,lt,Ze]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,dt,ce,St,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.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(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(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(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ye.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Ue.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ue.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new xe(te))})},ae.prototype.render=function(){return qe(this,void 0,void 0,function(){var te;return ke(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(te=new ft).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()]}})})},ae.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 xe(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 xe(ee))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];(te=this._availableMarkerTypes).push.apply(te,ee)},ae.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(ee){te(ee.dataUrl,ee.state)})},ae.prototype.removeRenderEventListener=function(te){},ae.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},ae.prototype.removeCloseEventListener=function(te){},ae.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))},ae.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)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.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},ae.prototype.scaleMarkers=function(te,ee){var ie,ue=this;this._currentMarker&&this._currentMarker instanceof St?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)},ae.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ae.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=te.left-ee.left,this.top=te.top-ee.top},ae.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ae.prototype.addDefs=function(){for(var te,ee=[],ie=0;ie<arguments.length;ie++)ee[ie]=arguments[ie];this.defs=Te.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,ee)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var 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()},ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var 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 st(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new ut(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ae.prototype.toolbarButtonClicked=function(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()}},ae.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ne=new Je(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 Je(te,ie))})}}},ae.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var ct=new Je(te,void 0,!0);ge(ct),ct.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var ie=function(ge){var ct=ue.markers[ge];ue.setCurrentMarker(ue.markers[ge]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(pt){return pt(new Je(te,ct))})},ue=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.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))},ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var 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 xe(te))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ne){return ne(new xe(te))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.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 xe(te))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.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 xe(te))}))},ae.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},ae.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},ae.prototype.startRenderAndClose=function(){return qe(this,void 0,void 0,function(){var te,ee,ie=this;return ke(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 He(ie,te,ee))}),this.close(!0),[2]}})})},ae.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},ae.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(ge){return ge.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 xe(ee))})},ae.prototype.addNewMarker=function(te){var ee=Te.createGroup();return this.markerImage.appendChild(ee),new te(ee,this.overlayContainer,this.settings)},ae.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 Je(ie,ie._currentMarker))}))},ae.prototype.markerCreated=function(te){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof dt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(dt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new Je(ee,ee._currentMarker))})},ae.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},ae.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},ae.prototype.markerStateChanged=function(te){var ee=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new Je(ee,te))})},ae.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 Je(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 Je(ee,ee._currentMarker))}))},ae.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))},ae.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()}},ae.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}))},ae.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()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(te,ee){var ie=this.markerImage.getBoundingClientRect();return{x:(te-ie.left)/this.zoomLevel,y:(ee-ie.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.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()},ae.prototype.addLicenseKey=function(te){ye.addKey(te)},ae.prototype.addEventListener=function(te,ee){this.eventListeners.addEventListener(te,ee)},ae.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},ae.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(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.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 xe(te))}))},ae.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 xe(te))}))},ae.instanceCounter=0,ae}(),Ke=fe(38147),xt=fe(65862),kt=(ae,te,ee)=>new Promise((ie,ue)=>{var ne=pt=>{try{ct(ee.next(pt))}catch(Ct){ue(Ct)}},ge=pt=>{try{ct(ee.throw(pt))}catch(Ct){ue(Ct)}},ct=pt=>pt.done?ie(pt.value):Promise.resolve(pt.value).then(ne,ge);ct((ee=ee.apply(ae,te)).next())}),Wt=({data:ae,className:te,fullWidth:ee,style:ie={},onClose:ue,onOk:ne,showFullTools:ge,noAssociationId:ct})=>{const pt=(0,se.useRef)(null),Ct=(0,se.useRef)(null),Re=(0,se.useRef)(null),Zt=(0,se.useRef)(null),[Rt,It]=(0,se.useState)(!1),[un,kn]=(0,se.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,se.useEffect)(()=>(Re.current||(Re.current=document.createElement("style"),document.head.appendChild(Re.current)),ae!=null&&ae.visible?(document.body.setAttribute("data-custom","y-hidden"),Re.current.innerHTML=" html { overflow-y: hidden; }",ae!=null&&ae.src&&cn()):(document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null)),()=>{document.body.removeAttribute("data-custom"),Re.current&&(document.head.removeChild(Re.current),Re.current=null)}),[ae==null?void 0:ae.visible]);const cn=()=>kt(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const mr=yield(0,xt.ZJ)(ae==null?void 0:ae.src);pt.current.src="",pt.current.src=mr,pt.current.onload=function(){Zn()},It(!1),kn("")}),wn=mr=>kt(void 0,null,function*(){It(!0),kn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const er=yield(0,Ke.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ae.title,file:mr.dataUrl}});er!=null&&er.id&&!ct?(yield(0,Ke.ZP)(`/api/attachments/${ae.id}/add_subitem.json`,{method:"post",body:{subitem_id:er==null?void 0:er.id,settings:JSON.stringify(mr.state)}})).status===0&&ne():er!=null&&er.id&&ne(er),It(!1),kn("")}),$n=()=>{const mr=document.querySelector('a[href="https://markerjs.com/"]');mr&&mr.parentNode&&(mr.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(ur=>{const nr=document.querySelector(ur.name);nr&&nr.setAttribute("title",ur.title)})},Zn=()=>{Ct.current=new nt(pt.current),Ct.current.targetRoot=Zt.current,Ct.current.addEventListener("render",wn),Ct.current.addEventListener("beforeclose",ue),ge&&(Ct.current.availableMarkerTypes=Ct.current.ALL_MARKER_TYPES,Ct.current.uiStyleSettings.redoButtonVisible=!0,Ct.current.uiStyleSettings.notesButtonVisible=!0,Ct.current.uiStyleSettings.zoomButtonVisible=!0,Ct.current.uiStyleSettings.zoomOutButtonVisible=!0,Ct.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ct.current.uiStyleSettings,Ct.current.show(),ae!=null&&ae.snapshotData&&Ct.current.restoreState(ae.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$n()},300)};return se.createElement(se.Fragment,null,(ae==null?void 0:ae.visible)&&se.createElement(me.Z,{spinning:Rt,tip:un,style:{position:"absolute",width:"100vw"}},se.createElement("div",{ref:Zt,className:_e()(gt.imageDimensions,te,ee?gt.fullWidth:""),style:ie},se.createElement("img",{className:gt.img,ref:pt}))))}},99298:function(Ot,zt,fe){"use strict";var se=fe(59301),gt=fe(77019),Ie=fe(5269),_e=fe(20554),me=fe(7939),Ye=fe(95097),Be=fe(96408),qe=fe(48136),ke=fe(59301);const de=(0,se.forwardRef)(({callback:Te,showSaveButton:ye,value:ft=""},Ue)=>{const Fe=(0,se.useRef)(),Oe=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Le=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],st=yt=>{Fe.current.setValue(Fe.current.getValue()+" "+yt.value+" ")},ut=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(gt.Z,{className:Be.Z.lists,gutter:[10,10]},Oe.map((yt,vt)=>ke.createElement(Ie.Z,{flex:"110px",className:Be.Z.item},ke.createElement("div",null,ke.createElement(Ye.Z,{value:`$$${yt.value}$$`}),yt.name),ke.createElement("div",{className:Be.Z.children},yt.children.map((mt,ht)=>ke.createElement("div",{key:ht},ke.createElement("h1",null,mt.name),ke.createElement(gt.Z,{gutter:[10,10]},mt.data.map(($t,Se)=>ke.createElement(Ie.Z,{key:Se,onClick:()=>st($t),className:Be.Z.diamond},ke.createElement(Ye.Z,{value:"`$$"+$t.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(gt.Z,{className:Be.Z.lists,gutter:[10,10]},Le.map((yt,vt)=>ke.createElement(Ie.Z,{flex:"110px",className:Be.Z.item},ke.createElement("div",null,ke.createElement(Ye.Z,{value:"`$$"+yt.value+"$$`"}),yt.name),ke.createElement("div",{className:Be.Z.children},yt.children.map((mt,ht)=>ke.createElement("div",{key:ht},mt.name&&ke.createElement("h1",null,mt.name),ke.createElement(gt.Z,{gutter:[10,10]},mt.data.map(($t,Se)=>ke.createElement(Ie.Z,{key:Se,onClick:()=>st($t),className:Be.Z.diamond},ke.createElement(Ye.Z,{value:"`$$"+$t.value+"$$`"}))))))))))}],Et=()=>{var yt=document.createElement("div");yt.innerHTML=Fe.current.getValue();var vt=yt.innerText;return Te&&Te(vt),vt};return(0,se.useImperativeHandle)(Ue,()=>({getData:Et})),ke.createElement("div",{className:Be.Z.mathWrap},ke.createElement(_e.default,{defaultActiveKey:"1",items:ut}),ke.createElement("math-field",{locale:"zh_cn",className:Be.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Fe,style:{width:800,marginTop:30,fontSize:18}},ft||""),ye&&ke.createElement("div",{className:Be.Z.button},ke.createElement(me.ZP,{size:"large",onClick:Et,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});zt.Z=de},2524:function(Ot,zt,fe){"use strict";var se=fe(59301),gt=fe(93314),Ie=fe(7939),_e=Object.defineProperty,me=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,de=(Ue,Fe,Oe)=>Fe in Ue?_e(Ue,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Ue[Fe]=Oe,Te=(Ue,Fe)=>{for(var Oe in Fe||(Fe={}))qe.call(Fe,Oe)&&de(Ue,Oe,Fe[Oe]);if(Be)for(var Oe of Be(Fe))ke.call(Fe,Oe)&&de(Ue,Oe,Fe[Oe]);return Ue},ye=(Ue,Fe)=>me(Ue,Ye(Fe));const ft=({img:Ue,buttonProps:Fe={},styles:Oe={},customText:Le,ButtonText:st,ButtonClick:ut,Buttonclass:Et,ButtonTwo:yt,imgStyles:vt,loading:mt=!1,className:ht=""})=>se.createElement("section",{className:`tc animated fadeIn ${ht}`,style:Te({color:"#999",margin:"100px auto",visibility:mt?"hidden":"visible"},Oe)},se.createElement("img",{src:Ue||gt,style:ye(Te({},vt),{pointerEvents:"none",userSelect:"none"})}),se.createElement("p",{className:"mt20 font14"},Le||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),st&&se.createElement(Ie.ZP,Te({className:Et,onClick:ut},Fe),st),yt&&yt);zt.Z=ft},52918:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return Et}});var se=fe(59301),gt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ie=fe(7939),_e=fe(70557),me=fe(50258),Ye=fe(25399),Be=fe(65862),qe=fe(87513),ke=fe(2524),de=fe(74128),Te=fe(7310),ye=fe(59301),ft=Object.defineProperty,Ue=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Le=(yt,vt,mt)=>vt in yt?ft(yt,vt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):yt[vt]=mt,st=(yt,vt)=>{for(var mt in vt||(vt={}))Fe.call(vt,mt)&&Le(yt,mt,vt[mt]);if(Ue)for(var mt of Ue(vt))Oe.call(vt,mt)&&Le(yt,mt,vt[mt]);return yt},ut=(yt,vt,mt)=>new Promise((ht,$t)=>{var Se=Pe=>{try{rt(mt.next(Pe))}catch(je){$t(je)}},Ge=Pe=>{try{rt(mt.throw(Pe))}catch(je){$t(je)}},rt=Pe=>Pe.done?ht(Pe.value):Promise.resolve(Pe.value).then(Se,Ge);rt((mt=mt.apply(yt,vt)).next())}),Et=({editOffice:yt="view",data:vt,issaver:mt,onSaver:ht,theme:$t,type:Se,filename:Ge,monacoEditor:rt,className:Pe,style:je,close:Ee,onClose:ze,hasMask:Pt,disabledDownload:ot,onImgDimensions:St,showNodata:dt,recordInfo:pe})=>{const[ce,Ve]=(0,se.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wt,lt]=(0,se.useState)(""),[we,Xe]=(0,se.useState)(),Ze=window.ENV==="build"?"/react/build":"",Mt=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Ce=10*(1024*1024),ve=(0,se.useRef)();vt!=null&&vt.startsWith("/api")&&Se!=="txt"&&(vt=de.Z.API_SERVER+vt);const Me=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();Ge&&rt&&(rt.filename=Ge),(0,se.useEffect)(()=>{var et,nt;const Ke=(nt=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:nt.split(";");Ke==null||Ke.map(xt=>{let kt=xt.split("=");kt[0]==="_educoder_session"&&lt(kt[1])})},[]),(0,se.useEffect)(()=>{Se==="office"&&(vt.indexOf("bigfilescdn.")>-1||vt.indexOf("bigfiles1")>-1?Xe({url:vt,fileType:Me(vt),model:vt.indexOf("model=edit")?"edit":"view"}):xe())},[Se,vt]);function $e(et){return ut(this,null,function*(){et.data.type==="pdfdata"&&(ht(et.data.data),window.removeEventListener("message",$e,!1)),console.log("mess---:",et.data)})}const xe=()=>ut(void 0,null,function*(){console.log("data:",vt);let et=vt;vt.startsWith("http")||(et=location.origin+et);let nt=new URL(et).pathname.split("/").pop();const Ke=yield(0,qe.gJ)({attachment_id:nt});Ke.url=Mt+Ke.url,Xe(Ke)}),He=()=>{if(vt.startsWith("http")||vt.startsWith("blob:")){Je();return}(0,Be.Sv)(Ge||"educoder",vt,Ge)},Je=()=>{pe&&(0,Te.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Be.Nd)(Ge||"educoder",decodeURIComponent(vt))};return ye.createElement("div",{style:st({},je||{}),className:`${Pt&&gt.bgBlack} ${Se?gt.wrp:"hide"}`},Ee&&ye.createElement("div",{className:gt.close,ref:ve},!!St&&ye.createElement(Ye.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:()=>{ze(),St()}},ye.createElement("i",{className:"icon-yulanpizhu"}))),!ot&&ye.createElement(Ye.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},ye.createElement("span",{onClick:Je},ye.createElement("i",{className:"icon-quxiaozhiding"}))),mt&&ye.createElement(Ye.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",$e,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},ye.createElement("i",{className:"icon-baocun"}))),ye.createElement(Ye.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},ye.createElement("span",{className:"",onClick:()=>{ze()}},ye.createElement("i",{className:"icon-guanbi1"})))),ye.createElement("div",{className:`${gt[Pe]} ${Pe} ${gt.monaco} ${Se==="txt"?"show":"hide"}`},Se==="txt"&&ye.createElement(ye.Fragment,null,ye.createElement(me.ZP,st({},rt)))),Se==="audio"&&ye.createElement("audio",{src:`${(vt==null?void 0:vt.indexOf("http://"))>-1||(vt==null?void 0:vt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${vt}`,autoPlay:!0}),Se==="video"&&ye.createElement(ye.Fragment,null,(vt==null?void 0:vt.indexOf("http"))>-1?ye.createElement("video",{controls:!0,src:`${vt}`,autoPlay:!0}):ye.createElement("video",{controls:!0,src:`data:video/mp4;base64,${vt}`,autoPlay:!0})),Se==="office"&&we&&ye.createElement("iframe",{src:`${Ze}/office.html?key=${we.key}&url=${btoa(we.url)}&callbackUrl=${Mt+(we.callbackUrl||"")}&fileType=${we.fileType}&title=${we.title||""}&model=${yt}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!ot}`}),Se==="html"&&ye.createElement("iframe",{src:vt+"&disposition=inline"}),Se==="pdf"&&ye.createElement("iframe",{id:"pdfiframe",src:`${Ze}/js/pdf/index.html?filename=${Ge||"educoder.pdf"}&url=${encodeURIComponent(vt)}&disabledDownload=${!!ot}&model=${yt}`}),Se==="image"&&ye.createElement("img",{src:`${(vt==null?void 0:vt.indexOf("http://"))>-1||(vt==null?void 0:vt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${vt}`}),(Se==="other"||Se==="download")&&ye.createElement(ye.Fragment,null,dt?ye.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ye.createElement(Ie.ZP,{icon:ye.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:He,disabled:ot},"\u4E0B\u8F7D")}):ye.createElement(Ie.ZP,{type:"primary",size:"middle",onClick:He,disabled:ot},ye.createElement(_e.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Se==="flowChart"&&ye.createElement("div",{className:"embed"},ye.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${vt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},95097:function(Ot,zt,fe){"use strict";fe.d(zt,{z:function(){return rt},Z:function(){return Pe}});var se=fe(59301),gt=fe(48850),Ie=fe(49142),_e=fe(64018),me=fe(80360),Ye=fe(74128),Be=fe(65862),qe=fe(15342),ke=fe(44104),de=fe(7939),Te=fe(1012),ye=fe(52918),ft=fe(59301),Fe=({html:je})=>{const Ee=(0,se.useRef)(null),ze=(0,se.useRef)(null),Pt=`.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,se.useEffect)(()=>{const ot=Ee.current.attachShadow({mode:"open"});ze.current=document.createElement("div"),ze.current.className="markdown-body",ze.current.innerHTML=je,ot.appendChild(ze.current);const St=document.createElement("style");return St.textContent=Pt,ot.appendChild(St),()=>{ot.innerHTML=""}},[]),(0,se.useEffect)(()=>{ze.current&&(ze.current.innerHTML=je)},[je]),ft.createElement("div",{ref:Ee})};function Oe(je){const Ee=["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"],ze=new RegExp(`\\b(${Ee.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return je.replace(ze,"").trim()}var Le={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},st=Object.defineProperty,ut=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,vt=(je,Ee,ze)=>Ee in je?st(je,Ee,{enumerable:!0,configurable:!0,writable:!0,value:ze}):je[Ee]=ze,mt=(je,Ee)=>{for(var ze in Ee||(Ee={}))Et.call(Ee,ze)&&vt(je,ze,Ee[ze]);if(ut)for(var ze of ut(Ee))yt.call(Ee,ze)&&vt(je,ze,Ee[ze]);return je};const ht="@\u2581\u2581@",$t="@\u2581@",Se=/<pre[^>]*>/g;function Ge(je){let Ee=document.createElement("div");return Ee.innerHTML=je,Ee.childNodes.length===0?"":Ee.childNodes[0].nodeValue}const rt=(je,Ee)=>{je=je||"";const ze=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Pt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ot=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,St=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ee?je.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ze,(dt,pe,ce,Ve,wt,lt,we)=>{const Xe=pe||Ve||lt,Ze=ce||wt||we||"?";return Ye.Z.API_SERVER+"/api/attachments/"+Xe+Ze+"&t="+(0,Be.Jn)(Xe,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(je=je.replace(St,(dt,pe,ce,Ve,wt,lt,we)=>{const Xe=pe||Ve||lt,Ze=ce||wt||we||"?";return Ye.Z.API_SERVER+"/attachments/download/"+Xe+Ze+"&t="+(0,Be.Jn)(Xe,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(ze,(dt,pe,ce,Ve,wt,lt,we)=>{const Xe=pe||Ve||lt,Ze=ce||wt||we||"?";return Ye.Z.API_SERVER+"/api/attachments/"+Xe+Ze+"&t="+(0,Be.Jn)(Xe,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Pt,(dt,pe,ce,Ve,wt)=>{const lt=pe||Ve,we=ce||wt||"";return'"'+Ye.Z.API_SERVER+"/api/attachments/"+lt+we+lt+we+"&t="+(0,Be.Jn)(lt,Date.now())}).replace(ot,(dt,pe,ce,Ve,wt)=>{const lt=pe||Ve,we=ce||wt||"";return"("+Ye.Z.API_SERVER+"/files/uploads/"+lt+we+lt+we+"&t="+(0,Be.Jn)(lt,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,`
`),je)};var Pe=({value:je="",edit:Ee=!1,className:ze,showTextOnly:Pt,showLines:ot,style:St={},stylesPrev:dt={},highlightKeywords:pe,showProgramFill:ce,isProgramFill:Ve,disabledFill:wt=!1,programFillValue:lt,openEditor:we=()=>{},onFillChange:Xe=it=>{},onFillBlur:Ze=()=>{},onFillFocus:Mt=()=>{}})=>{let it=Oe(String(je||""));const Ce=(0,se.useRef)(),ve=(0,se.useRef)(),[Me,$e]=(0,se.useState)(""),[xe,He]=(0,se.useState)("office"),[Je,et]=(0,se.useState)([]),nt=(0,se.useRef)("a"+(0,Te.Z)()),Ke={},xt=Re=>/<style[\s\S]*?>/i.test(Re||""),kt=(Re,Zt,Rt)=>{const It=document.createElement(Re===$t?"input":"textarea");It.style.width="100%",It.style.height=Re===$t?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=Zt;const un=Object.keys(Ke).length;return Ke[un]=It,`<span class="edu-program-fill-wrap ${Re===$t?"":"show"}" style="width:${Re===$t?"600px":"100%"}" title=${Rt||""}><span>${It.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Yt(Re){return Re=Re.replace(/!\[.*?\]\(.*?\)/g,""),Re=Re.replace(/\[.*?\]\(.*?\)/g,""),Re=Re.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Re=Re.replace(/<embed.*?>/g,""),Re=Re.replace(/<img.*?>/g,""),Re=Re.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Re=Re.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Re=Re.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Re=Re.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Re}const Wt=Re=>!Pt&&xt(it)?Re:Re.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Zt,Rt){let It=Rt.replace(/(\n|\r)/g,"").split("}"),un=[];return It.map(kn=>{kn!=""&&un.push(`.${nt.current} ${kn}`)}),`<style>${un.join("}")}</style>`}),ae=(0,se.useMemo)(()=>{try{const It=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;it=it.replace(cn,"("+Ye.Z.API_SERVER+"/attachments/download/").replace(It,"("+Ye.Z.API_SERVER+"/api/attachments/").replace(un,'"'+Ye.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Ye.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,`
`),Ce.current.style.display="none"}catch(It){}if(ce){let It=-1;return it=it.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(un,kn,cn){var wn;return++It,kt(un,It,(wn=lt==null?void 0:lt[It])==null?void 0:wn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Wt(it||"")}</pre>`}let Re=Wt(it);Re=(0,Ie.ZP)(Re);const Zt=(0,Ie.ez)();it.match(/\[TOC\]/)&&(Re=Re.replace("<p>[TOC]</p>",(0,Ie.Qv)()),(0,Ie.Iy)()),Re=Re.replace(/(__special_katext_id_\d+__)/g,(It,un)=>{const{type:kn,expression:cn}=Zt[un];return(0,qe.renderToString)(Ge(cn)||"",{displayMode:kn==="block",throwOnError:!1,output:"html"})}),Re=Re.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ie.AL)();const Rt=document.createElement("div");if(Rt.innerHTML=Re,Pt)return Rt.innerText;if(pe){const It=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ue(Rt,It),Rt.innerHTML}return setTimeout(()=>ct(),500),Rt.innerHTML},[it,pe]);(0,se.useEffect)(()=>{ne.current&&ne.current.querySelectorAll(["input","textarea"]).forEach(Zt=>{Zt.oninput=te,Zt.onblur=ee,Zt.onfocus=ie})},[Je]),(0,se.useEffect)(()=>{var Re,Zt,Rt,It,un;if(lt!=null&&lt.length)try{const kn=ne.current.querySelectorAll(".edu-program-fill-score"),cn=ne.current.querySelectorAll('[name="edu-program-fill"]');for(const[wn,$n]of cn.entries())$n.value=((Re=lt==null?void 0:lt[wn])==null?void 0:Re.value)||"",((Zt=lt==null?void 0:lt[wn])==null?void 0:Zt.type)==="warning"?$n.className="program-fill-warning":((Rt=lt==null?void 0:lt[wn])==null?void 0:Rt.type)==="success"?$n.className="program-fill-success":$n.className="";for(const[wn,$n]of kn.entries())$n.innerHTML=(It=lt==null?void 0:lt[wn])!=null&&It.score?`${(un=lt==null?void 0:lt[wn])==null?void 0:un.score}\u5206`:"";et(lt)}catch(kn){console.log(kn,"error")}},[lt]);const te=Re=>{Je[Re.target.dataset.id]=Je[Re.target.dataset.id]||{},Je[Re.target.dataset.id].value=Re.target.value,et([...Je]),Xe(Je,Re.target.dataset.id)},ee=Re=>{Je[Re.target.dataset.id]=Je[Re.target.dataset.id]||{},Je[Re.target.dataset.id].value=Re.target.value,et([...Je]),Ze(Je,Re.target.dataset.id)},ie=Re=>{Je[Re.target.dataset.id]=Je[Re.target.dataset.id]||{},Je[Re.target.dataset.id].value=Re.target.value,et([...Je]),Mt(Je,Re.target.dataset.id)};function ue(Re,Zt){return Re.childNodes.forEach(Rt=>{var It;if(Rt.childNodes.length>0)ue(Rt,Zt);else if(Rt.nodeName!=="IMG")if(Rt.innerHTML)Rt.innerHTML=(It=Rt.innerHTML)==null?void 0:It.replace(new RegExp(Zt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=Rt.textContent.replace(new RegExp(Zt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Rt.replaceWith(un)}})}const ne=(0,se.useRef)();Ie.jb.WebkitLineClamp=ot,ot&&(St=mt(mt({},St),Ie.jb));function ge(Re){let Zt=Re.target;if(Zt.tagName.toUpperCase()==="A"){let Rt=Zt.getAttribute("href");if(Rt.indexOf("office")>-1)Re.preventDefault(),$e(Rt),He("office");else if(Rt.indexOf("application/pdf")>-1)Re.preventDefault(),$e(Rt),He("pdf");else if(Rt.indexOf("text/html")>-1)Re.preventDefault(),$e(Rt),He("html");else if(Rt.startsWith("#")){Re.preventDefault();let It=document.getElementById(Rt.replace("#",""));It&&It.scrollIntoView(!0)}}}const ct=()=>{var Re;const Zt=(Re=ne.current)==null?void 0:Re.querySelectorAll("video");Zt==null||Zt.forEach(Rt=>{if(Rt.oncontextmenu=()=>!1,Rt.src.indexOf(".m3u8")>-1&&!Rt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var It=new me.ZP;It.loadSource(Rt.src),It.attachMedia(Rt)}}})};(0,se.useEffect)(()=>{if(ne.current&&ae&&ae.match(Se)&&window.PR.prettyPrint(),ne.current)return ne.current.addEventListener("click",ge),()=>{var Re;(Re=ne.current)==null||Re.removeEventListener("click",ge),(0,Ie.AL)(),(0,Ie.Iy)()}},[ae,ne.current,ge]);const pt=Re=>{Re.target.nodeName==="IMG"&&Re.target.className.indexOf("draw-flowchart")>-1?(Ce.current.style.zIndex=1,Ce.current.style.display="flex",Ce.current.style.width=Re.target.clientWidth+"px",Ce.current.style.height=Re.target.clientHeight+"px",Ce.current.style.top=Re.target.offsetTop+"px",Ce.current.style.left=Re.target.offsetLeft+"px",Re.target.id&&(ve.current=Re.target.id)):Ce.current.style.display="none"},Ct=()=>{Ce.current.style.display="none"};return(0,se.useEffect)(()=>{var Re;const Zt=Rt=>{Rt.preventDefault(),Rt.clipboardData.setData("text",window.getSelection().toString())};return(Re=ne.current)==null||Re.addEventListener("copy",Zt),()=>{var Rt;(Rt=ne.current)==null||Rt.removeEventListener("copy",Zt)}},[ne.current]),se.createElement("div",{style:{position:"relative"},onMouseLeave:Ct},Pt&&se.createElement("div",{ref:ne,className:`${Le.mdBody} `},ae),!Pt&&!xt(ae)&&se.createElement("div",{ref:ne,style:mt({},St),onMouseOver:pt,className:`${ze||""} ${wt?"disabled-fill":""} markdown-body ${Le.mdBody} ${nt.current}`,dangerouslySetInnerHTML:{__html:ae}}),!Pt&&xt(ae)&&se.createElement(Fe,{html:ae}),se.createElement("div",{ref:Ce,className:`${Le.button} ${Ee?"":Le.previewFlowChart}`},se.createElement(ke.Z,null,se.createElement(de.ZP,{onClick:()=>{Ee?we(ve.current):($e(ve.current),He("flowChart"))}},Ee?"\u7F16\u8F91":"\u9884\u89C8"))),se.createElement(ye.Z,{close:!0,data:Me,type:Me!=null&&Me.length?xe:"",style:mt({},dt),onClose:()=>$e("")}))}},60537:function(Ot,zt,fe){"use strict";fe.d(zt,{h:function(){return yt},Z:function(){return Et}});var se=fe(59301),gt=fe(82326),Ie=fe(28284),_e=fe(7939),me=fe(89780),Ye=fe.n(me),Be=fe(45559),qe=Object.defineProperty,ke=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Ue=(vt,mt,ht)=>mt in vt?qe(vt,mt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):vt[mt]=ht,Fe=(vt,mt)=>{for(var ht in mt||(mt={}))ye.call(mt,ht)&&Ue(vt,ht,mt[ht]);if(Te)for(var ht of Te(mt))ft.call(mt,ht)&&Ue(vt,ht,mt[ht]);return vt},Oe=(vt,mt)=>ke(vt,de(mt));const Le=gt.default.Option,st={labelCol:{span:4},wrapperCol:{span:20}},ut={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 Et=({callback:vt,onCancel:mt})=>{const[ht,$t]=(0,se.useState)("python");function Se(rt){$t(ut[rt][1])}function Ge(rt){vt(rt)}return se.createElement(Ie.default,Oe(Fe({},st),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ge,style:{width:500}}),se.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},se.createElement(gt.default,{getPopupContainer:rt=>rt.parentNode,onChange:Se},Object.keys(ut).map(rt=>se.createElement(Le,{key:rt,value:rt},ut[rt][0])))),se.createElement(Ie.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},se.createElement(yt,{mode:ht})),se.createElement("div",{className:"flex-container flex-end"},se.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(_e.ZP,{type:"ghost",onClick:mt},"\u53D6\u6D88")))};function yt({value:vt,onChange:mt,mode:ht,options:$t={}}){const Se=(0,se.useRef)(),[Ge,rt]=(0,se.useState)();return(0,se.useEffect)(()=>{if(Ge){let Pe=function(je){const Ee=je.getValue();mt&&mt(Ee)};return Ge.on("change",Pe),()=>{Ge.off("change",Pe)}}},[Ge,mt]),(0,se.useEffect)(()=>{Ge&&Ge.setOption("mode",ht)},[Ge,ht]),(0,se.useEffect)(()=>{Ge&&(vt!==Ge.getValue()||vt==="")&&setTimeout(()=>{Ge.setValue(vt||"")},300)},[Ge,vt]),(0,se.useEffect)(()=>{if(Se.current&&!Ge){const Pe=Ye().fromTextArea(Se.current,Fe({mode:ht,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},$t));rt(Pe)}},[Se.current,Ge]),se.createElement("div",{className:"my-codemirror-container"},se.createElement("textarea",{ref:Se}))}},25374:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return xr}});var se=fe(59301),gt=fe(65582),Ie=fe(89780),_e=fe.n(Ie),me=fe(76374),Ye=fe(45559),Be=fe(6313),qe=fe(25717),ke=fe(99498),de=fe(25419),Te=fe(67549),ye=fe(95097),ft=({value:Ut="",className:pn,showTextOnly:En,showLines:Tn,style:Jn={}})=>{const tr=(0,se.useMemo)(()=>"",[Ut]);return se.createElement(se.Fragment,null,se.createElement("div",{dangerouslySetInnerHTML:{__html:tr}}))},Ue=Object.defineProperty,Fe=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Et=(Ut,pn,En)=>pn in Ut?Ue(Ut,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Ut[pn]=En,yt=(Ut,pn)=>{for(var En in pn||(pn={}))st.call(pn,En)&&Et(Ut,En,pn[En]);if(Le)for(var En of Le(pn))ut.call(pn,En)&&Et(Ut,En,pn[En]);return Ut},vt=(Ut,pn)=>Fe(Ut,Oe(pn));let mt=[{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 ht({onActionCallback:Ut,title:pn,icon:En,actionName:Tn,className:Jn="",children:tr}){function dr(){Ut(Tn)}return se.createElement("a",{title:pn,className:Jn,onClick:dr},se.createElement("i",{className:`${En}`}),tr)}var $t=({watch:Ut,showNullButton:pn,showNullProgramButton:En,onActionCallback:Tn,fullScreen:Jn,insertTemp:tr,hidetoolBar:dr,extraUse:_n})=>{const Fn=[...mt,{title:`${Ut?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ut?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return se.createElement("ul",{className:"markdown-toolbar-container"},!dr&&Fn.map((hr,jt)=>se.createElement("li",{key:jt},hr.actionName?se.createElement(ht,vt(yt({},hr),{onActionCallback:Tn})):se.createElement("span",{className:"v-line"}))),pn?se.createElement("li",null,se.createElement(ht,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,En?se.createElement(se.Fragment,null,se.createElement("li",null,se.createElement(ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),se.createElement("li",null,se.createElement(ht,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,tr&&se.createElement("li",null,se.createElement(ht,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${tr}`,onActionCallback:Tn},se.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&se.createElement("li",null,_n),se.createElement("li",{className:"btn-full-screen"},se.createElement(ht,{icon:`${Jn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Jn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Tn})))},Se=fe(57261),Ge=fe(28284),rt=fe(37568),Pe=fe(7939),je=Object.defineProperty,Ee=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,Pt=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,dt=(Ut,pn,En)=>pn in Ut?je(Ut,pn,{enumerable:!0,configurable:!0,writable:!0,value:En}):Ut[pn]=En,pe=(Ut,pn)=>{for(var En in pn||(pn={}))ot.call(pn,En)&&dt(Ut,En,pn[En]);if(Pt)for(var En of Pt(pn))St.call(pn,En)&&dt(Ut,En,pn[En]);return Ut},ce=(Ut,pn)=>Ee(Ut,ze(pn));const Ve={labelCol:{span:4},wrapperCol:{span:20}};var wt=({callback:Ut,onCancel:pn})=>{function En(Tn){Ut(Tn)}return se.createElement(Ge.default,ce(pe({},Ve),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:En,style:{width:500}}),se.createElement(Ge.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},se.createElement(rt.default,null)),se.createElement(Ge.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},se.createElement(rt.default,null)),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Pe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},lt=fe(60537),we=fe(45053),Xe=fe(62957),Ze=fe(77019),Mt=fe(53464),it=fe(59301),Ce=({callback:Ut,onCancel:pn})=>{const En=document.createElement("canvas"),Tn=En.getContext("2d");En.width=1e3,En.height=800,Tn.fillStyle="#ffffff",Tn.fillRect(0,0,En.width,En.height);const Jn=En.toDataURL("image/png");return it.createElement(Xe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},it.createElement(Ze.Z,{style:{height:"100vh"}},it.createElement(Mt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Jn,visible:!0,title:String(Date.now())},onOk:tr=>{Ut({src:tr.url})},onClose:pn})))},ve=fe(30641),Me=fe(5269),$e=fe(6767),xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},He=fe(59301),et=(0,se.forwardRef)(({onCancel:Ut,editImgId:pn,callback:En},Tn)=>{let Jn=(0,se.useRef)(),tr=(0,se.useRef)(),dr=(0,se.useRef)(),_n=(0,se.useRef)(!1);const Fn=(0,se.useRef)(!1);console.log("ref:",Tn);const[hr,jt]=(0,se.useState)(0),[at,Qt]=(0,se.useState)("100vh");return(0,se.useEffect)(()=>{jt(1)},[]),(0,se.useImperativeHandle)(Tn,()=>({setHeight:Qt})),He.createElement("div",{ref:Fn,className:"body-overflow-initial"},He.createElement(ve.Z,{width:"100vw",height:at,footer:null,closable:!0,placement:"bottom",open:!!hr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${xe.drawerWrap}`,onClose:()=>{window.saveDrawData(Cn=>{En({src:`/api/attachments/${Cn}`,id:Cn})})},title:He.createElement(Ze.Z,{align:"middle"},He.createElement(Me.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),He.createElement(Me.Z,{onClick:()=>{Qt(at==="60px"?"100vh":"60px")}},He.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),He.createElement(Me.Z,{onClick:()=>{window.saveDrawData(Cn=>{if(Cn===null){$e.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}$e.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),En({src:`/api/attachments/${Cn}`,id:Cn,disabledClose:!0})})}},He.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},He.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${pn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:tr})))}),nt=fe(74128),Ke=fe(47889),xt=fe(71051);const kt=Ke.ZP.Group,Yt={margin:"0 8px"};var Wt=({callback:Ut,onCancel:pn})=>{function En(Tn){Ut(Tn)}return se.createElement(Ge.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:En},se.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},se.createElement("span",{style:Yt},"\u5355\u5143\u683C\u6570\uFF1A"),se.createElement("span",{style:Yt},"\u884C\u6570"),se.createElement(Ge.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},se.createElement(xt.Z,null)),se.createElement("span",{style:Yt},"\u5217\u6570"),se.createElement(Ge.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},se.createElement(xt.Z,null))),se.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},se.createElement("span",{style:Yt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),se.createElement(Ge.default.Item,{name:"align"},se.createElement(kt,null,se.createElement(Ke.ZP,{value:"default"},se.createElement("i",{className:"fa fa-align-justify"})),se.createElement(Ke.ZP,{value:"left"},se.createElement("i",{className:"fa fa-align-left"})),se.createElement(Ke.ZP,{value:"center"},se.createElement("i",{className:"fa fa-align-center"})),se.createElement(Ke.ZP,{value:"right"},se.createElement("i",{className:"fa fa-align-right"}))))),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Pe.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},ae=fe(71411),te=fe(93510),ee=fe.n(te),ue=(0,se.forwardRef)(({use3d:Ut,width:pn,height:En,callback:Tn,showSaveButton:Jn},tr)=>{const dr=(0,se.useRef)(),_n=(0,se.useRef)(),[Fn,hr]=(0,se.useState)(!1),jt=(0,se.useRef)({id:dr,appName:"graphing",width:pn||1e3,height:En||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,se.useEffect)(()=>{_n.current=new(ee())(jt.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const at=()=>{var Qt=window.ggbApplet.getPNGBase64(1,!0,72);return Tn&&Tn(Qt),Qt};return(0,se.useEffect)(()=>{jt.current.appName=Fn?"3D":"graphing",_n.current.inject("applet_container")},[Fn]),(0,se.useEffect)(()=>{hr(Ut)},[Ut]),(0,se.useImperativeHandle)(tr,()=>({getImgData:at})),se.createElement(se.Fragment,null,se.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:dr}),se.createElement(Ze.Z,{align:"middle"},se.createElement(Me.Z,{flex:1},se.createElement(ae.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Fn,onChange:Qt=>hr(Qt)})),se.createElement(Me.Z,null,se.createElement(Pe.ZP,{size:"large",onClick:at,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ne=fe(99298);const ge="link",ct="upload-image",pt="add-flowchart",Ct="draw-image",Re="add-flowchart",Zt="code-block",Rt="add-table",It="------------",un={default:It,left:`:${It}`,center:`:${It}:`,right:`${It}:`};var kn=fe(31103),cn=fe(65862);function wn(){}let $n=0;const Zn=1e4,mr="\u2581",er="@\u2581\u2581@",ur="@\u2581@",nr=`
**\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`,In=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function rr(Ut){return/^\d+$/.test(Ut)?`${Ut}px`:Ut}const Bn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xn={[Bn+"-B"]:"bold",[Bn+"-I"]:"italic"},Kn={[ge]:"\u6DFB\u52A0\u94FE\u63A5",[Zt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ct]:"\u6DFB\u52A0\u56FE\u7247",[Ct]:"\u6DFB\u52A0\u753B\u56FE",[pt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Rt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var xr=({defaultValue:Ut="",onChange:pn,width:En="100%",height:Tn=400,miniToolbar:Jn=!1,isFocus:tr=!1,watch:dr,insertTemp:_n,mode:Fn="markdown",id:hr="markdown-editor-id",showResizeBar:jt=!1,noStorage:at=!1,showNullButton:Qt=!1,showNullProgramButton:Cn=!1,hidetoolBar:Gn=!1,fullScreen:Ae=!1,onBlur:Ne,onCMBeforeChange:Bt,onFullScreen:Dt,className:We="",disablePaste:Lt=!1,disabled:Xt=!1,disabledFill:tn=!1,placeholder:hn="",values:_t="",extraUse:qt,onAddBlank:At})=>{const[bt,en]=(0,se.useState)(null),[vn,mn]=(0,se.useState)(Ut),[xn,Hn]=(0,se.useState)(dr),[Yn,dn]=(0,se.useState)(Ae),[Gt,gn]=(0,se.useState)(""),[nn,Wn]=(0,se.useState)(0),[wr,Qn]=(0,se.useState)(Tn),[Lr,Mr]=(0,se.useState)(!1),[Cr,ir]=(0,se.useState)(0),[Rr,gr]=(0,se.useState)(0),or=(0,se.useRef)(),Er=(0,se.useRef)(),Tr=(0,se.useRef)(),pr=(0,se.useRef)(),qn=(0,se.useRef)(),jn=(0,se.useRef)(),Br=(0,gt.useDispatch)();(0,se.useEffect)(()=>{const Vt=window.scrollY||window.pageYOffset;mn(_t),bt==null||bt.setValue(_t),window.scrollTo(0,Vt)},[_t]),(0,se.useEffect)(()=>{Dt==null||Dt(Yn)},[Yn]),(0,se.useEffect)(()=>{if(or.current){let Vt=function(rn,ln){var Mn;if(Lt){ln.preventDefault();return}const sr=ln.clipboardData;if(sr){const Vn=sr.types.toString(),yr=sr.items;if(Vn==="Files"||sr.types.indexOf("Files")>-1){if(ln.preventDefault(),Fn=="stex")return;try{let br=yr[1];((Mn=yr[0])==null?void 0:Mn.kind)==="file"&&(br=yr[0]);const Sr=br.getAsFile(),zr=Sr.name.split(".").pop();(0,we.I)(Sr,Ar=>{var Hr,ei,Li;Ar.id?((Hr=Sr==null?void 0:Sr.type)==null?void 0:Hr.indexOf("image"))>-1?Ft.replaceSelection(`<img width="100%" src="/api/attachments/${Ar.id}?type=${Ar.content_type})" alt="" />`):((ei=Sr==null?void 0:Sr.type)==null?void 0:ei.indexOf("video"))>-1?Ft.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ar.id}"></video>`):((Li=Sr==null?void 0:Sr.type)==null?void 0:Li.indexOf("pdf"))>-1?Ft.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=${Sr.type}&disposition=inline" target="_blank">${Sr.name}</a>`):In.includes(zr)?Ft.replaceSelection(`<a href="/api/attachments/${Ar.id}?type=office&disposition=inline" target="_blank">${Sr.name}</a>`):Ft.replaceSelection(`[${Sr.name}](/api/attachments/${Ar.id}?type=${Ar.content_type})`):(Ar==null?void 0:Ar.status)===401&&(document.location.href="/user/login")})}catch(br){$e.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ft=_e().fromTextArea(or.current,{mode:Fn,lineNumbers:!Jn,lineWrapping:!0,value:Ut,autoCloseTags:!0,autoCloseBrackets:!0});return Ft.on("keyup",function(rn,ln){ln.keyCode===8&&(rn.getValue()==""?Ft.setOption("placeholder",hn):Ft.setOption("placeholder",null))}),Ft.on("keydown",function(rn,ln){if(ln.keyCode===8){var Mn=Jr(rn);Mn&&ln.preventDefault()}}),tr&&Ft.focus(),Ft.on("paste",Vt),Xt&&Ft.on("beforeChange",function(rn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),en(Ft),()=>{Ft.off("paste",Vt)}}},[]);const Vr=(0,se.useCallback)(()=>{if(Er.current)try{}catch(Vt){console.log(Vt,"---- to set md editor body height")}},[wr,Er,Yn]);(0,se.useEffect)(()=>{function Vt(){let Ft=new me.Z(rn=>{for(let ln of rn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Vr(),bt.setSize("100%","100%"),bt.refresh())});return Ft.observe(or.current.parentElement),Ft}if(bt){const Ft=Vt();return()=>{var rn,ln;(rn=or.current)!=null&&rn.parentElement&&Ft.unobserve((ln=or.current)==null?void 0:ln.parentElement)}}},[bt,Vr]),(0,se.useEffect)(()=>{if(bt){let Vt=[];for(const[Ft,rn]of Object.entries(Xn)){let ln={[Ft]:()=>{Dr(rn)}};Vt.push(ln),bt.addKeyMap(ln)}return()=>{for(let Ft of Vt)bt.removeKeyMap(Ft)}}},[bt]),(0,se.useEffect)(()=>{Ae!==Yn&&dn(Ae)},[Ae]),(0,kn.Z)(()=>{if(!at&&nn>0){let Vt=new Date().getTime(),Ft=window.sessionStorage.getItem(hr);Vt>=nn+Zn&&(!Ft||Ft!==vn)&&(window.sessionStorage.setItem(hr,vn),Mr(!0))}},Zn),(0,se.useEffect)(()=>{Hn(dr)},[bt,dr]),(0,se.useEffect)(()=>{bt&&tr&&bt.focus()},[bt,tr]),(0,se.useEffect)(()=>{if(xn&&bt){let Vt=function(rn){let ln=rn.target;if(pr.current){let Mn=ln.scrollTop/ln.scrollHeight;pr.current.scrollTop=pr.current.scrollHeight*Mn}};const Ft=bt.getScrollerElement();return Ft.addEventListener("scroll",Vt),()=>{Ft.removeEventListener("scroll",Vt)}}},[bt,xn]),(0,se.useEffect)(()=>{if(bt&&Bt){let Vt=function(Ft,rn){Bt(Ft,rn)};return bt.on("beforeChange",Vt),()=>{bt.off("beforeChange",Vt)}}},[bt,Bt]),(0,se.useEffect)(()=>{if(bt&&Ne){let Vt=function(){Ne(bt.getValue())};return bt.on("blur",Vt),()=>{bt.off("blur",Vt)}}},[bt,Ne]);function Jr(Vt,Ft){var rn=Vt.getDoc(),ln=rn.getCursor(),Mn=rn.getLine(ln.line),sr=Mn.charAt(ln.ch-1),Vn=Mn.lastIndexOf("@\u2581@",ln.ch),yr=Mn.lastIndexOf("@\u2581\u2581@",ln.ch),br=Vn>yr?Vn:yr,Sr=Vn>yr?3:4;if(er.indexOf(sr)===-1)return null;if(console.log("change1:",Ft,Vt,Mn,ln,br,Vn,yr,sr),br>=0&&ln.ch-br<5){var zr=br+Sr;return rn.replaceRange("",{line:ln.line,ch:br},{line:ln.line,ch:zr}),{line:ln.line,ch:zr}}return null}(0,se.useEffect)(()=>{if(bt){let Vt=function(Ft,rn){const ln=Ft.getValue();mn(ln),Wn(new Date().getTime()),Ft.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pn&&(Cn?pn(ln,Kt(ln)):pn(ln))};return bt.on("change",Vt),()=>{bt.off("change",Vt)}}},[bt,pn]),(0,se.useEffect)(()=>{if(bt)if(Ut==null)bt.setValue(""),mn("");else{const Vt=window.scrollY||window.pageYOffset;Ut!==bt.getValue()&&(bt.setValue(Ut),mn(Ut),bt.setCursor(Xt?1:bt.lineCount(),0),window.scrollTo(0,Vt))}},[bt,Ut]);const Dr=(0,se.useCallback)(Vt=>{const Ft=bt.getCursor(),rn=bt.getSelection();let ln=rn.split(`
`);switch(Vt){case"bold":return bt.replaceSelection("**"+rn+"**"),rn===""&&bt.setCursor(Ft.line,Ft.ch+2),bt.focus();case"italic":return bt.replaceSelection("*"+rn+"*"),rn===""&&bt.setCursor(Ft.line,Ft.ch+1),bt.focus();case"code":return bt.replaceSelection("`"+rn+"`"),rn===""&&bt.setCursor(Ft.line,Ft.ch+1),bt.focus();case"inline-latex":return(0,cn.Ye)(Br)?void 0:(gn("inline-latex"),bt.focus());case"latex":return bt.replaceSelection("```latex\n"+rn+"\n```"),bt.setCursor(Ft.line+1,rn.length+1),bt.focus();case"line-break":return bt.replaceSelection(`<br/>
`),bt.focus();case"list-ul":return rn===""?bt.replaceSelection("- "+rn):bt.replaceSelection(ln.map(Mn=>Mn===""?"":`- ${Mn}`).join(`
`)),bt.focus();case"list-ol":return rn===""?bt.replaceSelection("1. "+rn):bt.replaceSelection(ln.map((Mn,sr)=>Mn===""?"":`${sr+1}. ${Mn}`).join(`
`)),bt.focus();case"add-null-ch":At==null||At();return;case"add-signal":return rn===""&&bt.setCursor(Ft.line,Ft.ch),bt.replaceSelection(ur),bt.focus();case"add-multiple":return rn===""&&bt.setCursor(Ft.line,Ft.ch),bt.replaceSelection(er),bt.focus();case"inster-template-1":return rn===""&&bt.setCursor(Ft.line,Ft.ch),bt.replaceSelection(nr),bt.focus();case"eraser":return bt.setValue(""),bt.focus();case"trigger-watch":return Hn(!xn),bt.focus();case"trigger-full-screen":return dn(!Yn),bt.focus();case ge:gn(ge);return;case Zt:gn(Zt);return;case ct:gn(ct);return;case Ct:gn(Ct);return;case"maths-latex":if((0,cn.Ye)(Br))return;gn("maths-latex");return;case pt:qn.current="",sessionStorage.removeItem("file_id"),gn(pt);return;case Rt:gn(Rt);return;default:throw new Error}},[bt,xn,Yn]),Wr=(0,se.useCallback)((Vt,Ft)=>{var rn,ln,Mn,sr,Vn,yr;Vt!=null&&Vt.disabledClose||gn("");const{src:br,alt:Sr,id:zr}=Vt||{};switch(Gt){case ge:const{title:Oi,link:xi}=Vt;return bt.replaceSelection(`[${Oi}](${xi})`),bt.focus();case Zt:const{language:vi,content:Xi}=Vt;return bt.replaceSelection(["```"+vi,Xi,"```"].join(`
`)),bt.focus();case"maths-latex":for(var Ar=atob(Vt),Hr=new Uint8Array(Ar.length),ei=0;ei<Ar.length;ei++)Hr[ei]=Ar.charCodeAt(ei);var Li=new Blob([Hr],{type:"image/png"});(0,we.I)(Li,mi=>{mi.id?bt.replaceSelection(`![,](/api/attachments/${mi.id}?type=${mi.content_type})`):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,cn.Ye)(Br))return;bt.replaceSelection("`$$"+Vt+"$$`");break;case Re:if(!zr)return;bt.getValue().indexOf(br)===-1?bt.replaceSelection(`<center><img id="${zr}" width="80%" src="${br}" class="draw-flowchart" alt="${Sr||""}" /></center>`):document.getElementById(zr).src=nt.Z.API_SERVER+br+"?t="+Date.now();break;case ct:case Ct:const fr=Ft,to=(Mn=(ln=(rn=fr==null?void 0:fr.name)==null?void 0:rn.split("."))==null?void 0:ln.pop)==null?void 0:Mn.call(ln);return((sr=fr==null?void 0:fr.type)==null?void 0:sr.indexOf("image"))>-1||!(fr!=null&&fr.type)?fr!=null&&fr.align||fr!=null&&fr.width?bt.replaceSelection(`<p style="text-align:${fr.align||"initial"}"><img width="${fr.width?fr.width+"%":"initial"}" src="${br}" alt="${Sr||""}" /></p>`):bt.replaceSelection(`<img width="100%" src="${br}" alt="${Sr||""}" />`):((Vn=fr==null?void 0:fr.type)==null?void 0:Vn.indexOf("video"))>-1?bt.replaceSelection(`<video width="100%" controls src="${br}"></video>`):((yr=fr==null?void 0:fr.type)==null?void 0:yr.indexOf("pdf"))>-1?bt.replaceSelection(`<a href="${br}?type=${fr.type}&disposition=inline" target="_blank">${fr.name}</a>`):In.includes(to)?bt.replaceSelection(`<a href="${br}?type=office&disposition=inline" target="_blank">${fr.name}</a>`):bt.replaceSelection(`[${fr.name}](${br})`),bt.focus();case Rt:const{row:ti,col:Ni,align:ao}=Vt;let Ji=`
`;for(let mi=0;mi<ti;mi++){let Ri=[],Zr=[];for(let Hi=0;Hi<Ni;Hi++)mi===1&&Zr.push(un[ao]),Ri.push(" ");mi===1&&(Ji+=`| ${Zr.join(" | ")} |
`),Ji+=`| ${Ri.join(Ni===1?"":" | ")} |
`}return bt.replaceSelection(Ji+`
`),bt.focus();default:throw new Error}},[bt,Gt]),Nr=(0,se.useMemo)(()=>{switch(Gt){case ge:return se.createElement(wt,{callback:Wr,onCancel:_r});case Zt:return se.createElement(lt.Z,{callback:Wr,onCancel:_r});case ct:return se.createElement(we.Z,{callback:Wr,onCancel:_r});case pt:return se.createElement(et,{editImgId:qn.current,callback:Wr,onCancel:_r});case Rt:return se.createElement(Wt,{callback:Wr,onCancel:_r});case"maths-latex":return se.createElement(ue,{showSaveButton:!0,callback:Wr});case"inline-latex":return se.createElement(ne.Z,{showSaveButton:!0,callback:Wr});default:return null}},[Gt]);function _r(){gn("")}(0,se.useEffect)(()=>{if(Tr.current){let Vt=function(Vn){Mn=!0,sr=Vn.pageY},Ft=function(){Mn=!1},rn=function(Vn){if(Mn){let yr=Vn.pageY-sr;yr<0&&(yr=0),yr>300&&(yr=300);let br=Tn+yr+"px";Qn(br)}},ln=Tr.current,Mn=!1,sr=0;return ln.addEventListener("mousedown",Vt),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",Ft),()=>{ln.removeEventListener("mousedown",Vt),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",Ft)}}},[bt,Tr]),(0,se.useEffect)(()=>{Qn(Tn)},[Tn]);const ii=rr(En),Or=rr(wr),Rn={width:ii,height:Or},Ht=(0,se.useMemo)(()=>{if(nn){let Vt=new Date(nn),Ft=Vt.getHours(),rn=Vt.getMinutes(),ln=Vt.getSeconds();return Ft=Ft<10?"0"+Ft:Ft,rn=rn<10?"0"+rn:rn,ln=ln<10?"0"+ln:ln,`${Ft}:${rn}:${ln}`}return 0},[nn]),Kt=Vt=>{const Ft=[];if(Cn){let rn=-1;Vt=Vt.replace(/(@▁▁@|@▁@)/g,function(ln,Mn,sr){Ft.push({multiLine:ln!==ur})})}return Ft};function yn(){window.sessionStorage.removeItem(hr),Mr(!1),Wn(0)}function on(){Mr(!1),Wn(0),bt.setValue(window.sessionStorage.getItem(hr))}(0,se.useEffect)(()=>{Kn[Gt]&&Gt!==Ct&&Gt!==pt&&setTimeout(()=>{const Vt=document.getElementsByClassName("markdown-popup-form")[0],Ft=window.innerWidth/2-Vt.offsetWidth/2,rn=window.innerHeight/2-Vt.offsetHeight/2;ir(Ft),gr(rn)},0)},[Gt]);const Dn=Vt=>{Vt.preventDefault();const Ft=Vt.clientX-Cr,rn=Vt.clientY-Rr;document.body.onmousemove=ln=>{let Mn=ln.clientX-Ft,sr=ln.clientY-rn;const Vn=document.getElementsByClassName("markdown-popup-form")[0],yr=window.innerWidth-Vn.offsetWidth,br=window.innerHeight-Vn.offsetHeight;Mn=Math.max(0,Math.min(Mn,yr)),sr=Math.max(0,Math.min(sr,br)),ar(ln.clientX,ln.clientY,Ft,rn)&&(ir(Mn),gr(sr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ar=(Vt,Ft,rn,ln)=>{const Mn=document.body.clientHeight,sr=document.body.clientWidth;return Vt<20&&rn>Vt||Vt>sr-20&&rn<Vt||Ft<20&&ln>Ft||Ft>Mn-20&&ln<Ft?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return se.createElement(se.Fragment,null,se.createElement("div",{className:"markdown-editor-wrapper",ref:Er},se.createElement("div",{className:`markdown-editor-container ${We} ${xn?"on-preview":""} ${Jn?"mini":""} ${Yn?"full-screen":""}`,style:Rn},se.createElement($t,{insertTemp:_n,watch:xn,fullScreen:Yn,showNullButton:Qt,showNullProgramButton:Cn,onActionCallback:Dr,hidetoolBar:Gn,extraUse:qt}),se.createElement("div",{className:"markdown-editor-body"},se.createElement("div",{className:"codemirror-container"},se.createElement("textarea",{ref:or,placeholder:hn})),xn?se.createElement("div",{ref:pr,className:"preview-container"},Fn==="stex"&&se.createElement(ft,{value:vn}),Fn!=="stex"&&se.createElement(ye.Z,{edit:!0,disabledFill:tn,showProgramFill:Cn,value:vn,openEditor:Vt=>{var Ft;qn.current=Vt,(Ft=jn.current)==null||Ft.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),jt?se.createElement("a",{ref:Tr,className:"editor-resize"}):null,Gt===Ct&&se.createElement(Ce,{callback:Wr,onCancel:_r}),Gt===pt&&se.createElement(et,{ref:jn,editImgId:qn.current,callback:Wr,onCancel:_r}),se.createElement(Se.Z,null,Kn[Gt]&&Gt!==Ct&&Gt!==pt?se.createElement(Xe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Cr,top:Rr},title:se.createElement("div",{style:{cursor:"move"},onMouseDown:Dn},Kn[Gt]),open:!0,onCancel:_r,footer:null,destroyOnClose:!0,width:Gt===pt?"1200px":null,height:Gt===pt?"80vh":null,className:"markdown-popup-form"},Nr):null))}},45053:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return mt},I:function(){return $t}});var se=fe(28284),gt=fe(6767),Ie=fe(37568),_e=fe(44104),me=fe(71051),Ye=fe(47889),Be=fe(7939),qe=fe(28735),ke=fe(59301),de=fe(59301),Te=Object.defineProperty,ye=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Le=(Se,Ge,rt)=>Ge in Se?Te(Se,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Se[Ge]=rt,st=(Se,Ge)=>{for(var rt in Ge||(Ge={}))Fe.call(Ge,rt)&&Le(Se,rt,Ge[rt]);if(Ue)for(var rt of Ue(Ge))Oe.call(Ge,rt)&&Le(Se,rt,Ge[rt]);return Se},ut=(Se,Ge)=>ye(Se,ft(Ge));const{useForm:Et}=se.default,yt={width:280,marginRight:10},vt={labelCol:{span:5},wrapperCol:{span:19}};var mt=({callback:Se,onCancel:Ge})=>{const[rt]=Et();let Pe=(0,ke.useRef)();function je(Pt){Pe.current.width=rt.getFieldValue("width"),Pe.current.align=rt.getFieldValue("align"),Se(Pt,Pe.current)}function Ee(Pt,ot){if(Pt.status===-1){gt.ZP.error(Pt.message);return}rt.setFieldsValue({src:`/api/attachments/${Pt.id}`,type:ot.type})}function ze(Pt){let ot=Pt.target.files[0];Pe.current=ot,$t(ot,Ee)}return de.createElement(se.default,ut(st({form:rt},vt),{className:"upload-image-panel",onFinish:je,style:{width:470,overflow:"hidden"}}),de.createElement(se.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(se.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(Ie.default,{style:yt})),de.createElement(ht,{onFileChange:ze}))),de.createElement(se.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(Ie.default,{style:{width:264}})),de.createElement(se.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(_e.Z,null,de.createElement(se.default.Item,{name:"width",style:{margin:0}},de.createElement(me.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(se.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(Ye.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(se.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Be.ZP,{type:"default",onClick:Ge},"\u53D6\u6D88"))))};function ht({onFileChange:Se}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:Se}))}function $t(Se,Ge){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");let rt=new FormData;rt.append("editormd-image-file",Se),rt.append("file_param_name","editormd-image-file"),rt.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(je){Ge(JSON.parse(je.target.responseText),Se)},!1),Pe.addEventListener("error",function(je){console.error(je)},!1),Pe.open("POST",`${qe.KI}/api/attachments.json`),Pe.send(rt)}},57261:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return Ie}});var se=fe(59301),gt=fe(4676);class Ie extends se.Component{constructor(me){super(me);const Ye=window.document;this.node=Ye.createElement("div"),Ye.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,gt.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},50258:function(Ot,zt,fe){"use strict";fe.d(zt,{SV:function(){return Ce},ZP:function(){return it}});var se=fe(59301),gt=fe(76374);const Ie={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"]},_e={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(`
`)}]},Ye={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(`
`)}]},Be={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 qe=fe(53184),ke=fe.n(qe),de=(ve,Me,$e)=>new Promise((xe,He)=>{var Je=Ke=>{try{nt($e.next(Ke))}catch(xt){He(xt)}},et=Ke=>{try{nt($e.throw(Ke))}catch(xt){He(xt)}},nt=Ke=>Ke.done?xe(Ke.value):Promise.resolve(Ke.value).then(Je,et);nt(($e=$e.apply(ve,Me)).next())});const Te={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"]}},ye=(ve,Me,$e,xe)=>{const He=Me.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:$e.lineNumber,endColumn:$e.column});return Array.from(new Set(He.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:ve.languages.CompletionItemKind.Text,insertText:et,range:xe}))},ft=(ve,Me,$e,xe)=>{ve.languages.registerCompletionItemProvider(Me,{provideCompletionItems(He,Je){const et=He.getWordUntilPosition(Je),nt={startLineNumber:Je.lineNumber,endLineNumber:Je.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},Ke=He.getLineContent(Je.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...ye(ve,He,Je,nt),...$e.map(kt=>({label:kt,kind:ve.languages.CompletionItemKind.Keyword,documentation:kt,insertText:kt,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...xe.map(kt=>({label:kt.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:kt.content,insertText:Ke.startsWith("#")?kt.content.replace(/#/,""):kt.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}})};var Ue=ve=>{Te.languages.forEach(Me=>{ve.languages.registerDocumentFormattingEditProvider(Me,{provideDocumentFormattingEdits($e){return de(this,null,function*(){const xe=ke()($e.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:$e.getFullModelRange(),text:xe}]})}})}),ft(ve,"java",_e.keywords,_e.quickKey),ft(ve,"cpp",me.keywords,me.quickKey),ft(ve,"c",Ie.keywords,[]),ft(ve,"python",Ye.keywords,Ye.quickKey),ft(ve,"scala",Be.keywords,Be.quickKey)};const Fe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Oe=Object.defineProperty,Le=(ve,Me,$e)=>Me in ve?Oe(ve,Me,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ve[Me]=$e,st=(ve,Me,$e)=>Le(ve,typeof Me!="symbol"?Me+"":Me,$e);const ut=class Hl{constructor(Me,$e,xe){this.placeholder=Me,this.editor=$e,this.monaco=xe,$e.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Hl.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)}};st(ut,"ID","editor.widget.placeholderHint");var yt=ut,vt=fe(96236),mt=fe(6767),ht=fe(25399),$t=fe(89392),Se=fe(77254),Ge=fe(56102),rt=Object.defineProperty,Pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,ot=(ve,Me,$e)=>Me in ve?rt(ve,Me,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ve[Me]=$e,St=(ve,Me)=>{for(var $e in Me||(Me={}))ze.call(Me,$e)&&ot(ve,$e,Me[$e]);if(Ee)for(var $e of Ee(Me))Pt.call(Me,$e)&&ot(ve,$e,Me[$e]);return ve},dt=(ve,Me)=>Pe(ve,je(Me)),pe=(ve,Me)=>{var $e={};for(var xe in ve)ze.call(ve,xe)&&Me.indexOf(xe)<0&&($e[xe]=ve[xe]);if(ve!=null&&Ee)for(var xe of Ee(ve))Me.indexOf(xe)<0&&Pt.call(ve,xe)&&($e[xe]=ve[xe]);return $e},ce=(ve,Me,$e)=>new Promise((xe,He)=>{var Je=Ke=>{try{nt($e.next(Ke))}catch(xt){He(xt)}},et=Ke=>{try{nt($e.throw(Ke))}catch(xt){He(xt)}},nt=Ke=>Ke.done?xe(Ke.value):Promise.resolve(Ke.value).then(Je,et);nt(($e=$e.apply(ve,Me)).next())});function Ve(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function wt(){}let lt=!1;const we={"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 Xe(ve=[]){let Me=ve;if(Array.isArray(ve)){for(let $e=0;$e<ve.length;$e++){let xe=we[ve[$e]];if(xe)return xe}return Me[0]}return we[Me]||Me}let Ze=null;const Mt=()=>ce(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ve){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ve)}});var it=ve=>{var Me=ve,{width:$e="100%",height:xe="100%",value:He,language:Je="javascript",style:et={},options:nt={},overrideServices:Ke={},theme:xt="vs-dark",onEditBlur:kt,isCopy:Yt=!1,onSave:Wt,autoHeight:ae=!1,forbidCopy:te=!1,onChange:ee=wt,editorDidMount:ie=wt,onFocus:ue=wt,onBreakPoint:ne=wt,breakPointValue:ge=[],filename:ct="educoder.txt",errorLine:pt,errorContent:Ct="",highlightLine:Re,openBreakPoint:Zt=!1,placeholder:Rt="",showMiniMap:It=!0}=Me,un=pe(Me,["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 kn=(0,se.useRef)(),cn=(0,se.useRef)({}),wn=(0,se.useRef)(),$n=(0,se.useRef)(),Zn=(0,se.useRef)([]),mr=(0,se.useRef)(!1),er=(0,se.useRef)(),ur=(0,se.useRef)(),nr=(0,se.useRef)(!1),[In,rr]=(0,se.useState)(!1);function cr(){let jt;return kn.current&&(jt=new gt.Z(at=>{for(let Qt of at)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&cn.current.instance.layout()}),jt.observe(kn.current)),jt}function Bn(){mt.ZP.warning({content:decodeURIComponent(Fe),key:"monaco-editor-tip"})}const Xn=()=>{let jt=cn.current.instance;if(He!=null&&jt&&In){const at=jt.getModel();at&&He!==at.getValue()&&(lt=!0,at.setValue(He),jt.layout(),lt=!1)}};(0,se.useEffect)(()=>{const jt=Se.Z.subscribe("formatDocument",at=>{var Qt;let Cn=cn.current.instance;(Qt=Cn==null?void 0:Cn.getAction)==null||Qt.call(Cn,"editor.action.formatDocument").run()});return window.updateMonacoValue=at=>{ee(at)},jt},[]),(0,se.useEffect)(()=>{var jt;let at=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{Xn()},500),He&&(He!=null&&He.length)&&((jt=at==null?void 0:at.updateOptions)==null||jt.call(at,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(He.split(/\r\n|\r|\n/g).length))+3,5)}))},[He,In,cn.current]),(0,se.useEffect)(()=>{if(pt&&cn.current&&cn.current.instance){let at=cn.current.instance;at.changeViewZones(function(Qt){var Cn=document.createElement("div");Cn.style.padding="10px 20px",Cn.style.width="calc(100% - 20px)",Cn.className="my-error-line-wrp",Cn.innerHTML=Ct,Qt.addZone({afterLineNumber:pt||11,heightInLines:3,domNode:Cn})});var jt={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}};at.addOverlayWidget(jt),at.revealPositionInCenter({lineNumber:20,column:1})}},[pt,cn.current,In]);const Kn=(jt="",at)=>{if(!jt||jt.trim()==="")return!0;const Cn=cn.current.instance.getModel().getLineTokens(at);let Gn=!1;for(let Ae=0;Ae<2;Ae++)Cn.getStandardTokenType(Ae)===1&&(Gn=!0);return Gn};(0,se.useEffect)(()=>{var jt;const at=(jt=cn.current)==null?void 0:jt.instance;if(at&&In&&te){const Qt=at.onDidBlurEditorWidget(()=>{nr.current=!1}),Cn=at.onDidFocusEditorText(()=>{nr.current=!0});return()=>{Qt.dispose(),Cn.dispose()}}},[cn.current,In,te]),(0,se.useEffect)(()=>{var jt;if((jt=cn.current)!=null&&jt.instance&&In&&Zt){let at=cn.current.instance,Qt=at.getModel();if(!Qt)return;(()=>{var _t;let qt=[],At=[];const bt=Qt.getAllDecorations();for(let vn of bt)vn.options.className==="highlighted-line"&&(qt.push((_t=vn==null?void 0:vn.range)==null?void 0:_t.startLineNumber),At.push(vn==null?void 0:vn.id));if(Re===qt[0])return;Qt.deltaDecorations(At,[]);const en=Qt.getLineCount();Re&&Re<=en&&(at.deltaDecorations([],[{range:new Ze.Range(Re,1,Re,Qt.getLineMaxColumn(Re)),options:{isWholeLine:!0,className:"highlighted-line"}}]),at.revealLineInCenter(Re))})();const Gn=(_t=!1)=>{var qt;let At=[],bt=[];const en=Qt.getAllDecorations();for(let vn of en)vn.options.linesDecorationsClassName==="breakpoints-select"&&(At.push((qt=vn==null?void 0:vn.range)==null?void 0:qt.startLineNumber),bt.push(vn==null?void 0:vn.id));if(_t)return{lines:At,ids:bt};ne(At)},Ae=_t=>ce(void 0,null,function*(){let qt={range:new Ze.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[qt]),Gn()}),Ne=_t=>ce(void 0,null,function*(){let qt=[];const At=at.getLineDecorations(_t);for(let bt of At)bt.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(bt.id);yield Qt.deltaDecorations(qt,[]),Gn()}),Bt=_t=>{let qt=at.getLineDecorations(_t);for(let At of qt)if(At.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,$t.isEqual)(ge,Gn(!0).lines)){Qt.deltaDecorations(Gn(!0).ids,[]);const _t=ge.map(qt=>({range:new Ze.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],_t)}const Dt=at.onDidChangeModelContent(_t=>{let qt=at.getPosition();if(qt){let At=qt.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Kn(Qt.getLineContent(At),At)?Ne(At):Bt(At)?(Ne(At),Ae(At)):Gn()},100)}}),We=at.onMouseDown(_t=>{var qt,At,bt;if(_t.target.detail&&((bt=(At=(qt=_t.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&bt.includes("line-numbers"))){let en=_t.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Bt(en)?Ne(en):Ae(en)}}),Lt=_t=>{let qt={range:new Ze.Range(_t,1,_t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Zn.current=at.deltaDecorations(Zn.current,[qt])},Xt=()=>{Zn.current=at.deltaDecorations(Zn.current,[])},tn=at.onMouseMove(_t=>{var qt,At,bt;if(Xt(),_t.target.detail&&((bt=(At=(qt=_t.target)==null?void 0:qt.element)==null?void 0:At.className)!=null&&bt.includes("line-numbers"))){let en=_t.target.position.lineNumber;if(Kn(Qt.getLineContent(en),en))return;Lt(en)}}),hn=at.onMouseLeave(()=>{Xt()});return()=>{Dt.dispose(),We.dispose(),tn.dispose(),hn.dispose()}}},[cn.current,In,ge,Re,Zt,Je]),(0,se.useEffect)(()=>{var jt;(jt=cn.current)!=null&&jt.instance&&Zt&&cn.current.instance.setPosition({lineNumber:0,column:0})},[Re]);function xr(){let jt=cn.current.instance;if(jt){const at=jt.getSelection(),Qt=cn.current.pastePos||{},Cn=new Ze.Range(Qt.startLineNumber||at.endLineNumber,Qt.startColumn||at.endColumn,Qt.endLineNumber||at.endLineNumber,Qt.endColumn||at.endColumn);setTimeout(()=>{jt.executeEdits("",[{range:Cn,text:""}])},300)}}function Ut(jt){(window.navigator.platform.match("Mac")?jt.metaKey:jt.ctrlKey)&&jt.keyCode==83&&(jt.preventDefault(),Wt())}const pn=()=>{if(ae&&cn.current.instance){const jt=cn.current.instance.getContentHeight();Fn(jt<xe?xe:jt)}else Fn(xe)};function En(jt){var at=document.createEvent("MouseEvents");at.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),jt.dispatchEvent(at)}const Tn=jt=>{if(!nr.current)return;const{keyCode:at,ctrlKey:Qt,metaKey:Cn,target:Gn,type:Ae}=jt;return(Ae==="paste"||(at===67||at===86)&&(Cn||Qt))&&Gn.nodeName==="TEXTAREA"&&(Bn(),jt.preventDefault()),!1};function Jn(jt,at){var Qt=window.URL||window.webkitURL||window,Cn=new Blob([at]),Gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gn.href=Qt.createObjectURL(Cn),Gn.download=jt,En(Gn)}(0,se.useEffect)(()=>{pn()},[pn]),(0,se.useEffect)(()=>{kn.current&&!In&&Promise.all([fe.e(8909),fe.e(2460)]).then(fe.bind(fe,71448)).then(jt=>{try{Ze=jt,cn.current.instance=Ze.editor.create(kn.current,{value:He,language:Xe(Je),theme:xt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:It||!1}},Ke);const at=cn.current.instance;let Gn=[...vt.BH._menuItems].find(Dt=>Dt[0]._debugName=="EditorContext")[1],Ae=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ne=(Dt,We)=>{var Lt,Xt;let tn=Dt._first;do We.includes((Xt=(Lt=tn.element)==null?void 0:Lt.command)==null?void 0:Xt.id)&&Dt._remove(tn);while(tn=tn.next)};if(ie(at,Ze),setTimeout(()=>{pn(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(ct||"educoder.txt",at.getValue())}})},500),cn.current.subscription=at.onDidChangeModelContent(Dt=>{mr.current?clearTimeout(er.current):(pn(),ee(at.getValue(),Dt)),er.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||Ue(Ze,Xe(Je)),te&&(Ne(Gn,Ae),kn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Tn),window.removeEventListener("paste",Tn),window.addEventListener("keydown",Tn),window.addEventListener("paste",Tn)),window.Monaco=Ze,kt&&at.onDidBlurEditorWidget(()=>{kt(at.getValue())}),ue&&at.onDidFocusEditorText(()=>{te&&Mt(),ue(at.getValue())}),te){Mt();try{at.onDidPaste(Dt=>{const We=at.getSelection(),Lt=cn.current.pastePos||{},Xt=new Ze.Range(Lt.startLineNumber||We.endLineNumber,Lt.startColumn||We.endColumn,Lt.endLineNumber||We.endLineNumber,Lt.endColumn||We.endColumn);at.executeEdits("",[{range:Dt.range,text:""}])})}catch(Dt){}}let Bt=cr();return Rt&&typeof Rt=="string"&&new yt(Rt,at,Ze),rr(!0),()=>{const Dt=cn.current.instance;Dt.dispose();const We=Dt.getModel();We&&We.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Bt.unobserve(kn.current)}}catch(at){}})},[]),(0,se.useEffect)(()=>{if(cn.current.instance&&In)return document.addEventListener("keydown",Ut,!1),()=>{document.removeEventListener("keydown",Ut)}},[Wt,In]),(0,se.useEffect)(()=>{let jt=cn.current.instance;if(jt&&In){let at=Xe(Je);Ze.editor.setModelLanguage(jt.getModel(),at)}},[Je,In]),(0,se.useEffect)(()=>{cn.current.instance&&In&&Ze.editor.setTheme(xt)},[xt,In]),(0,se.useEffect)(()=>{let jt=cn.current.instance;wn.current=nt,jt&&In&&(jt.updateOptions(St({},nt)),setTimeout(()=>{jt.getModel().updateOptions(St({},nt))},200))},[JSON.stringify(nt),In]),(0,se.useEffect)(()=>{let jt=cn.current.instance;jt&&In&&jt.layout()},[$e,xe,In]);const[tr,dr]=(0,se.useState)(Ve($e)),[_n,Fn]=(0,se.useState)(Ve(xe)),hr=dt(St({},et),{width:tr,height:_n,position:"relative"});return se.createElement("div",{className:"my-monaco-editor",ref:kn,style:hr,onFocus:()=>{te&&Mt()}},Yt&&se.createElement(Ge.CopyToClipboard,{text:He,onCopy:()=>mt.ZP.success("\u590D\u5236\u6210\u529F")},se.createElement(ht.Z,{title:"\u590D\u5236\u4EE3\u7801"},se.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},se.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ce({width:ve="100%",height:Me="100%",original:$e,modified:xe,language:He,options:Je={}}){const et=(0,se.useRef)(),[nt,Ke]=(0,se.useState)(null);function xt(ae){let te;return et.current&&(te=new gt.Z(ee=>{for(let ie of ee)(ie.target.offsetHeight>0||ie.target.offsetWidth>0)&&ae.layout()}),te.observe(et.current)),te}(0,se.useEffect)(()=>(et.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(ae=>{Ze=ae;const te=Ze.editor.createDiffEditor(et.current,dt(St({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},Je),{wordWrap:!0}));Ke(te);let ee=xt(te);return()=>{te.dispose();const ie=te.getModel();ie&&ie.dispose(),ee.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,se.useEffect)(()=>{nt&&nt.setModel({original:Ze.editor.createModel($e,He),modified:Ze.editor.createModel(xe,He)})},[$e,xe,He,nt]);const kt=Ve(ve),Yt=Ve(Me),Wt={width:kt,height:Yt};return se.createElement("div",{className:"my-diff-editor",ref:et,style:Wt})}},31103:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return gt}});var se=fe(59301);function gt(Ie,_e){const me=(0,se.useRef)();(0,se.useEffect)(()=>{me.current=Ie}),(0,se.useEffect)(()=>{function Ye(){me.current()}if(_e!==null){let Be=setInterval(Ye,_e);return()=>clearInterval(Be)}},[_e])}},19730:function(Ot,zt,fe){"use strict";fe.r(zt),fe.d(zt,{default:function(){return $t}});var se=fe(59301),gt=fe(25374),Ie=fe(6767),_e=fe(37568),me=fe(7939),Ye=fe(38147),Be=(Se,Ge,rt)=>new Promise((Pe,je)=>{var Ee=ot=>{try{Pt(rt.next(ot))}catch(St){je(St)}},ze=ot=>{try{Pt(rt.throw(ot))}catch(St){je(St)}},Pt=ot=>ot.done?Pe(ot.value):Promise.resolve(ot.value).then(Ee,ze);Pt((rt=rt.apply(Se,Ge)).next())});function qe({setIscreate:Se,init:Ge,UpdateItem:rt}){const[Pe,je]=(0,se.useState)(""),[Ee,ze]=(0,se.useState)("");(0,se.useEffect)(()=>{rt&&(je(rt&&rt.name),ze(rt&&rt.description))},[rt]);function Pt(){return Be(this,null,function*(){if(!Pe){Ie.ZP.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}if(!Ee){Ie.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}if(rt){ot();return}(yield(0,Ye.ZP)("/api/hpc_courses.json",{method:"post",body:{name:Pe,description:Ee,container_type:window.location.pathname.split("/")[1]}}))&&(Ie.ZP.info("\u521B\u5EFA\u6210\u529F"),Se(!1),Ge("add"))})}function ot(){return Be(this,null,function*(){(yield(0,Ye.ZP)(`/api/hpc_courses/${rt.id}.json`,{method:"put",body:{name:Pe,description:Ee,container_type:window.location.pathname.split("/")[1]}}))&&(Ie.ZP.info("\u7F16\u8F91\u6210\u529F"),Se(!1),Ge(""))})}return se.createElement("div",null,se.createElement(_e.default,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:Pe,maxLength:60,addonAfter:String(Pe.length)+"/60",onChange:St=>je(St.target.value)}),se.createElement(gt.Z,{id:"courseContentMD",defaultValue:Ee,onChange:St=>ze(St)}),se.createElement("div",{className:"clearfix mt30 mb30"},se.createElement(me.ZP,{type:"primary",onClick:()=>Pt(),className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),se.createElement("a",{className:"defalutCancelbtn fl",onClick:()=>Se(!1)},"\u53D6\u6D88")))}var ke=qe,de=fe(95097),Te=(Se,Ge,rt)=>new Promise((Pe,je)=>{var Ee=ot=>{try{Pt(rt.next(ot))}catch(St){je(St)}},ze=ot=>{try{Pt(rt.throw(ot))}catch(St){je(St)}},Pt=ot=>ot.done?Pe(ot.value):Promise.resolve(ot.value).then(Ee,ze);Pt((rt=rt.apply(Se,Ge)).next())});function ye({CourseItem:Se,userId:Ge,init:rt,ItemUpdate:Pe,setSee:je,UserInfo:Ee}){function ze(){return Te(this,null,function*(){(yield(0,Ye.ZP)(`/api/hpc_courses/${Se.id}.json`,{method:"delete"}))&&(Ie.ZP.info("\u5220\u9664\u6210\u529F"),rt("delete"),je(!1))})}function Pt(){Pe(Se)}return se.createElement("div",null,Ge===299635||Ge===301458||Ee!=null&&Ee.admin||Ee!=null&&Ee.business?se.createElement("div",{style:{textAlign:"right"}},se.createElement(me.ZP,{onClick:()=>Pt()},"\u7F16\u8F91"),se.createElement(me.ZP,{onClick:()=>ze(),style:{marginLeft:"30px"}},"\u5220\u9664")):null,se.createElement("h1",null,Se==null?void 0:Se.name),se.createElement(de.Z,{value:Se==null?void 0:Se.description}))}var ft=ye,Ue=fe(14566),Fe=fe(74128),Oe=fe(65582),Le=Object.defineProperty,st=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,yt=(Se,Ge,rt)=>Ge in Se?Le(Se,Ge,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Se[Ge]=rt,vt=(Se,Ge)=>{for(var rt in Ge||(Ge={}))ut.call(Ge,rt)&&yt(Se,rt,Ge[rt]);if(st)for(var rt of st(Ge))Et.call(Ge,rt)&&yt(Se,rt,Ge[rt]);return Se},mt=(Se,Ge,rt)=>new Promise((Pe,je)=>{var Ee=ot=>{try{Pt(rt.next(ot))}catch(St){je(St)}},ze=ot=>{try{Pt(rt.throw(ot))}catch(St){je(St)}},Pt=ot=>ot.done?Pe(ot.value):Promise.resolve(ot.value).then(Ee,ze);Pt((rt=rt.apply(Se,Ge)).next())});function ht({user:Se,dispatch:Ge}){var rt,Pe,je,Ee,ze,Pt,ot,St,dt;const[pe,ce]=(0,se.useState)(1),[Ve,wt]=(0,se.useState)(100),[lt,we]=(0,se.useState)([]),[Xe,Ze]=(0,se.useState)(!1),[Mt,it]=(0,se.useState)(!1),[Ce,ve]=(0,se.useState)(""),[Me,$e]=(0,se.useState)(""),[xe,He]=(0,se.useState)("");let{itemname:Je}=(0,Oe.useParams)();const[et,nt]=(0,se.useState)("");(0,se.useEffect)(()=>{Ge({type:"globalSetting/headerToggle",payload:!1}),pe&&Ke("")},[pe]);function Ke(ae){return mt(this,null,function*(){var te,ee;const ie=yield(0,Ye.ZP)("/api/hpc_courses.json",{method:"get",params:{page:pe,per_page:Ve,container_type:window.location.pathname.split("/")[1]}});if(ie){let ue=ie.data.hpc_courses.length;if(we(ie.data.hpc_courses),He(ie.data.file_url),$e(""),!ue)return;if(et)if(ae==="delete"){if(ue===0){it(!1);return}ve(ie.data.hpc_courses[0]),it(!0),nt(ie.data.hpc_courses[0].id)}else ae==="add"?(ve(ie.data.hpc_courses[ue-1]),it(!0),nt(ie.data.hpc_courses[ue-1].id)):(ve(ie.data.hpc_courses.filter(ne=>ne.id===et)[0]),it(!0),nt(et));else if(Je){let ne=0;(ee=(te=ie==null?void 0:ie.data)==null?void 0:te.hpc_courses)==null||ee.map((ge,ct)=>{var pt;(Je==null?void 0:Je.toLocaleLowerCase())===((pt=ge==null?void 0:ge.name)==null?void 0:pt.toLocaleLowerCase())&&(ne=ct)}),ve(ie.data.hpc_courses[ne]),it(!0),nt(ie.data.hpc_courses[ne].id),(Je==null?void 0:Je.toLocaleLowerCase())==="resources"&&(ve(ie.data.hpc_courses.filter(ge=>ge.id===15)[0]),it(!0),nt(15))}else ve(ie.data.hpc_courses[0]),it(!0),nt(ie.data.hpc_courses[0].id)}})}function xt(ae){Ze(!1),it(!0),ve(ae),nt(ae.id)}function kt(ae){$e(ae),Ze(!0),it(!1)}function Yt(){$e(""),Ze(!0),it(!1)}const Wt={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange(ae){const{status:te}=ae.file;te==="done"?(Ie.ZP.success(`${ae.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`),Ke("")):te==="error"&&Ie.ZP.error(`${ae.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:ae=>{const te=ae.size/1024/1024<150;return te||Ie.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),te}};return se.createElement("div",{style:{marginBottom:"40px"}},se.createElement("div",{className:"bannterdiv",style:{background:`url(${Fe.Z.IMG_SERVER+`/${xe}`})`}}),se.createElement("img",{style:{width:"100%"},src:Fe.Z.IMG_SERVER+`/${xe}`}),se.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},se.createElement("div",{style:{flex:"1",marginTop:"17px"}},lt&&lt.map((ae,te)=>se.createElement("p",{key:te,onClick:()=>xt(ae),className:et===ae.id?"menuitemselect":"menuitem task-hide"},ae.name)),((rt=Se==null?void 0:Se.userInfo)==null?void 0:rt.user_id)===299635||((Pe=Se==null?void 0:Se.userInfo)==null?void 0:Pe.user_id)===301458||(je=Se==null?void 0:Se.userInfo)!=null&&je.admin||(Ee=Se==null?void 0:Se.userInfo)!=null&&Ee.business?se.createElement("p",{onClick:()=>Yt(),className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},se.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),se.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},Xe?se.createElement(ke,{UpdateItem:Me,setIscreate:Ze,init:Ke}):null,Mt?se.createElement(ft,{UserInfo:Se==null?void 0:Se.userInfo,setSee:it,userId:(ze=Se==null?void 0:Se.userInfo)==null?void 0:ze.user_id,ItemUpdate:kt,CourseItem:Ce,init:Ke}):null)),((Pt=Se==null?void 0:Se.userInfo)==null?void 0:Pt.user_id)===299635||((ot=Se==null?void 0:Se.userInfo)==null?void 0:ot.user_id)===301458||(St=Se==null?void 0:Se.userInfo)!=null&&St.admin||(dt=Se==null?void 0:Se.userInfo)!=null&&dt.business?se.createElement(Ue.default,vt({},Wt),se.createElement(me.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var $t=(0,Oe.connect)(({user:Se})=>({user:Se}))(ht)},49142:function(Ot,zt,fe){"use strict";fe.d(zt,{AL:function(){return yt},Iy:function(){return Te},Qv:function(){return Ue},ez:function(){return Et},jb:function(){return ye}});var se=fe(32834),gt=fe.n(se),Ie=fe(11690),_e=fe.n(Ie);let me=1;function Ye(Se,Ge){const rt=Se.match(/^(\s+)(?:```)/);if(rt===null)return Ge;const Pe=rt[1];return Ge.split(`
`).map(je=>{const Ee=je.match(/^\s+/);if(Ee===null)return je;const[ze]=Ee;return ze.length>=Pe.length?je.slice(Pe.length):je}).join(`
`)}let Be=[],qe=["<ul>"];const ke=new(gt()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Te(){Be.length=0,qe=["<ul>"]}const ye={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ft(Se,Ge,rt,Pe){if(Ge>=Se.length||Se[Ge].level<=rt)return Ge;var je=Se[Ge];Pe.push("<li><a href='#"+me+je.anchor+"'>"+je.text+"</a>"),Ge++;var Ee=[];return Ge=ft(Se,Ge,je.level,Ee),Ee.length>0&&(Pe.push("<ul>"),Ee.forEach(function(ze){Pe.push(ze)}),Pe.push("</ul>")),Pe.push("</li>"),Ge=ft(Se,Ge,rt,Pe),Ge}function Ue(){return ft(Be,0,0,qe),qe.push("</ul>"),qe.join("")}const Fe={heading(Se){const Ge=de.exec(Se);if(me+=1,Ge)return{type:"heading",raw:Ge[0],depth:Ge[1].length,text:Ge[2]}},fences(Se){const Ge=this.rules.block.fences.exec(Se);if(Ge){const rt=Ge[0];let Pe=Ye(rt,Ge[3]||"");const je=Ge[2]?Ge[2].trim():Ge[2];if(["latex","katex","math"].indexOf(je)>=0){const Ee=st(),ze=Pe;Pe=Ee,ut[Ee]={type:"block",expression:ze}}return{type:"code",raw:rt,lang:je,text:Pe}}}},Oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Le=0;const st=()=>`__special_katext_id_${Le++}__`;let ut={};function Et(){return ut}function yt(){Le=0,ut={}}function vt(Se){return Se=Se.replace(Oe,(Ge,rt)=>{const Pe=st();return ut[Pe]={type:"inline",expression:rt},Pe}),Se}const mt=ke.listitem;ke.listitem=function(Se){return mt(vt(Se))};const ht=ke.paragraph;ke.paragraph=function(Se){return ht(vt(Se))};const $t=ke.tablecell;ke.tablecell=function(Se,Ge){return $t(vt(Se),Ge)},ke.code=function(Se,Ge,rt){const Pe=(Ge||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${Se}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ge}">${rt?Se:(0,Ie.escape)(Se,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(rt?Se:(0,Ie.escape)(Se,!0))+"</code></pre>"},ke.heading=function(Se,Ge,rt){let Pe=this.options.headerPrefix+rt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Be.push({anchor:Pe,level:Ge,text:Se}),"<h"+Ge+' id="'+me+Pe+'">'+Se+"</h"+Ge+">"},gt().setOptions({silent:!0,gfm:!0,pedantic:!1}),gt().use({tokenizer:Fe,renderer:ke}),zt.ZP=gt()},99498:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){se.defineOption("placeholder","",function(qe,ke,de){var Te=de&&de!=se.Init;if(ke&&!Te)qe.on("blur",me),qe.on("change",Ye),qe.on("swapDoc",Ye),se.on(qe.getInputField(),"compositionupdate",qe.state.placeholderCompose=function(){_e(qe)}),Ye(qe);else if(!ke&&Te){qe.off("blur",me),qe.off("change",Ye),qe.off("swapDoc",Ye),se.off(qe.getInputField(),"compositionupdate",qe.state.placeholderCompose),gt(qe);var ye=qe.getWrapperElement();ye.className=ye.className.replace(" CodeMirror-empty","")}ke&&!qe.hasFocus()&&me(qe)});function gt(qe){qe.state.placeholder&&(qe.state.placeholder.parentNode.removeChild(qe.state.placeholder),qe.state.placeholder=null)}function Ie(qe){gt(qe);var ke=qe.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=qe.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var de=qe.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),ke.appendChild(de),qe.display.lineSpace.insertBefore(ke,qe.display.lineSpace.firstChild)}function _e(qe){setTimeout(function(){var ke=!1,de=qe.getInputField();de.nodeName=="TEXTAREA"?ke=!de.value:qe.lineCount()==1&&(ke=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),ke?Ie(qe):gt(qe)},20)}function me(qe){Be(qe)&&Ie(qe)}function Ye(qe){var ke=qe.getWrapperElement(),de=Be(qe);ke.className=ke.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Ie(qe):gt(qe)}function Be(qe){return qe.lineCount()===1&&qe.getLine(0)===""}})},25717:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){var gt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ie=se.Pos;se.defineOption("autoCloseBrackets",!1,function(Fe,Oe,Le){Le&&Le!=se.Init&&(Fe.removeKeyMap(me),Fe.state.closeBrackets=null),Oe&&(Ye(_e(Oe,"pairs")),Fe.state.closeBrackets=Oe,Fe.addKeyMap(me))});function _e(Fe,Oe){return Oe=="pairs"&&typeof Fe=="string"?Fe:typeof Fe=="object"&&Fe[Oe]!=null?Fe[Oe]:gt[Oe]}var me={Backspace:ke,Enter:de};function Ye(Fe){for(var Oe=0;Oe<Fe.length;Oe++){var Le=Fe.charAt(Oe),st="'"+Le+"'";me[st]||(me[st]=Be(Le))}}Ye(gt.pairs+"`");function Be(Fe){return function(Oe){return ye(Oe,Fe)}}function qe(Fe){var Oe=Fe.state.closeBrackets;if(!Oe||Oe.override)return Oe;var Le=Fe.getModeAt(Fe.getCursor());return Le.closeBrackets||Oe}function ke(Fe){var Oe=qe(Fe);if(!Oe||Fe.getOption("disableInput"))return se.Pass;for(var Le=_e(Oe,"pairs"),st=Fe.listSelections(),ut=0;ut<st.length;ut++){if(!st[ut].empty())return se.Pass;var Et=ft(Fe,st[ut].head);if(!Et||Le.indexOf(Et)%2!=0)return se.Pass}for(var ut=st.length-1;ut>=0;ut--){var yt=st[ut].head;Fe.replaceRange("",Ie(yt.line,yt.ch-1),Ie(yt.line,yt.ch+1),"+delete")}}function de(Fe){var Oe=qe(Fe),Le=Oe&&_e(Oe,"explode");if(!Le||Fe.getOption("disableInput"))return se.Pass;for(var st=Fe.listSelections(),ut=0;ut<st.length;ut++){if(!st[ut].empty())return se.Pass;var Et=ft(Fe,st[ut].head);if(!Et||Le.indexOf(Et)%2!=0)return se.Pass}Fe.operation(function(){var yt=Fe.lineSeparator()||`
`;Fe.replaceSelection(yt+yt,null),Fe.execCommand("goCharLeft"),st=Fe.listSelections();for(var vt=0;vt<st.length;vt++){var mt=st[vt].head.line;Fe.indentLine(mt,null,!0),Fe.indentLine(mt+1,null,!0)}})}function Te(Fe){var Oe=se.cmpPos(Fe.anchor,Fe.head)>0;return{anchor:new Ie(Fe.anchor.line,Fe.anchor.ch+(Oe?-1:1)),head:new Ie(Fe.head.line,Fe.head.ch+(Oe?1:-1))}}function ye(Fe,Oe){var Le=qe(Fe);if(!Le||Fe.getOption("disableInput"))return se.Pass;var st=_e(Le,"pairs"),ut=st.indexOf(Oe);if(ut==-1)return se.Pass;for(var Et=_e(Le,"closeBefore"),yt=_e(Le,"triples"),vt=st.charAt(ut+1)==Oe,mt=Fe.listSelections(),ht=ut%2==0,$t,Se=0;Se<mt.length;Se++){var Ge=mt[Se],rt=Ge.head,Pe,je=Fe.getRange(rt,Ie(rt.line,rt.ch+1));if(ht&&!Ge.empty())Pe="surround";else if((vt||!ht)&&je==Oe)vt&&Ue(Fe,rt)?Pe="both":yt.indexOf(Oe)>=0&&Fe.getRange(rt,Ie(rt.line,rt.ch+3))==Oe+Oe+Oe?Pe="skipThree":Pe="skip";else if(vt&&rt.ch>1&&yt.indexOf(Oe)>=0&&Fe.getRange(Ie(rt.line,rt.ch-2),rt)==Oe+Oe){if(rt.ch>2&&/\bstring/.test(Fe.getTokenTypeAt(Ie(rt.line,rt.ch-2))))return se.Pass;Pe="addFour"}else if(vt){var Ee=rt.ch==0?" ":Fe.getRange(Ie(rt.line,rt.ch-1),rt);if(!se.isWordChar(je)&&Ee!=Oe&&!se.isWordChar(Ee))Pe="both";else return se.Pass}else if(ht&&(je.length===0||/\s/.test(je)||Et.indexOf(je)>-1))Pe="both";else return se.Pass;if(!$t)$t=Pe;else if($t!=Pe)return se.Pass}var ze=ut%2?st.charAt(ut-1):Oe,Pt=ut%2?Oe:st.charAt(ut+1);Fe.operation(function(){if($t=="skip")Fe.execCommand("goCharRight");else if($t=="skipThree")for(var ot=0;ot<3;ot++)Fe.execCommand("goCharRight");else if($t=="surround"){for(var St=Fe.getSelections(),ot=0;ot<St.length;ot++)St[ot]=ze+St[ot]+Pt;Fe.replaceSelections(St,"around"),St=Fe.listSelections().slice();for(var ot=0;ot<St.length;ot++)St[ot]=Te(St[ot]);Fe.setSelections(St)}else $t=="both"?(Fe.replaceSelection(ze+Pt,null),Fe.triggerElectric(ze+Pt),Fe.execCommand("goCharLeft")):$t=="addFour"&&(Fe.replaceSelection(ze+ze+ze+ze,"before"),Fe.execCommand("goCharRight"))})}function ft(Fe,Oe){var Le=Fe.getRange(Ie(Oe.line,Oe.ch-1),Ie(Oe.line,Oe.ch+1));return Le.length==2?Le:null}function Ue(Fe,Oe){var Le=Fe.getTokenAt(Ie(Oe.line,Oe.ch+1));return/\bstring/.test(Le.type)&&Le.start==Oe.ch&&(Oe.ch==0||!/\bstring/.test(Fe.getTokenTypeAt(Oe)))}})},6313:function(Ot,zt,fe){(function(se){se(fe(89780),fe(32855))})(function(se){se.defineOption("autoCloseTags",!1,function(ke,de,Te){if(Te!=se.Init&&Te&&ke.removeKeyMap("autoCloseTags"),!!de){var ye={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(ye["'/'"]=function(ft){return Ye(ft)}),(typeof de!="object"||de.whenOpening!==!1)&&(ye["'>'"]=function(ft){return _e(ft)}),ke.addKeyMap(ye)}});var gt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ie=["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 _e(ke){if(ke.getOption("disableInput"))return se.Pass;for(var de=ke.listSelections(),Te=[],ye=ke.getOption("autoCloseTags"),ft=0;ft<de.length;ft++){if(!de[ft].empty())return se.Pass;var Ue=de[ft].head,Fe=ke.getTokenAt(Ue),Oe=se.innerMode(ke.getMode(),Fe.state),Le=Oe.state,st=Oe.mode.xmlCurrentTag&&Oe.mode.xmlCurrentTag(Le),ut=st&&st.name;if(!ut)return se.Pass;var Et=Oe.mode.configuration=="html",yt=typeof ye=="object"&&ye.dontCloseTags||Et&&gt,vt=typeof ye=="object"&&ye.indentTags||Et&&Ie;Fe.end>Ue.ch&&(ut=ut.slice(0,ut.length-Fe.end+Ue.ch));var mt=ut.toLowerCase();if(!ut||Fe.type=="string"&&(Fe.end!=Ue.ch||!/[\"\']/.test(Fe.string.charAt(Fe.string.length-1))||Fe.string.length==1)||Fe.type=="tag"&&st.close||Fe.string.indexOf("/")==Ue.ch-Fe.start-1||yt&&Be(yt,mt)>-1||qe(ke,Oe.mode.xmlCurrentContext&&Oe.mode.xmlCurrentContext(Le)||[],ut,Ue,!0))return se.Pass;var ht=typeof ye=="object"&&ye.emptyTags;if(ht&&Be(ht,ut)>-1){Te[ft]={text:"/>",newPos:se.Pos(Ue.line,Ue.ch+2)};continue}var $t=vt&&Be(vt,mt)>-1;Te[ft]={indent:$t,text:">"+($t?`
`:"")+"</"+ut+">",newPos:$t?se.Pos(Ue.line+1,0):se.Pos(Ue.line,Ue.ch+1)}}for(var Se=typeof ye=="object"&&ye.dontIndentOnAutoClose,ft=de.length-1;ft>=0;ft--){var Ge=Te[ft];ke.replaceRange(Ge.text,de[ft].head,de[ft].anchor,"+insert");var rt=ke.listSelections().slice(0);rt[ft]={head:Ge.newPos,anchor:Ge.newPos},ke.setSelections(rt),!Se&&Ge.indent&&(ke.indentLine(Ge.newPos.line,null,!0),ke.indentLine(Ge.newPos.line+1,null,!0))}}function me(ke,de){for(var Te=ke.listSelections(),ye=[],ft=de?"/":"</",Ue=ke.getOption("autoCloseTags"),Fe=typeof Ue=="object"&&Ue.dontIndentOnSlash,Oe=0;Oe<Te.length;Oe++){if(!Te[Oe].empty())return se.Pass;var Le=Te[Oe].head,st=ke.getTokenAt(Le),ut=se.innerMode(ke.getMode(),st.state),Et=ut.state;if(de&&(st.type=="string"||st.string.charAt(0)!="<"||st.start!=Le.ch-1))return se.Pass;var yt,vt=ut.mode.name!="xml"&&ke.getMode().name=="htmlmixed";if(vt&&ut.mode.name=="javascript")yt=ft+"script";else if(vt&&ut.mode.name=="css")yt=ft+"style";else{var mt=ut.mode.xmlCurrentContext&&ut.mode.xmlCurrentContext(Et);if(!mt||mt.length&&qe(ke,mt,mt[mt.length-1],Le))return se.Pass;yt=ft+mt[mt.length-1]}ke.getLine(Le.line).charAt(st.end)!=">"&&(yt+=">"),ye[Oe]=yt}if(ke.replaceSelections(ye),Te=ke.listSelections(),!Fe)for(var Oe=0;Oe<Te.length;Oe++)(Oe==Te.length-1||Te[Oe].head.line<Te[Oe+1].head.line)&&ke.indentLine(Te[Oe].head.line)}function Ye(ke){return ke.getOption("disableInput")?se.Pass:me(ke,!0)}se.commands.closeTag=function(ke){return me(ke)};function Be(ke,de){if(ke.indexOf)return ke.indexOf(de);for(var Te=0,ye=ke.length;Te<ye;++Te)if(ke[Te]==de)return Te;return-1}function qe(ke,de,Te,ye,ft){if(!se.scanForClosingTag)return!1;var Ue=Math.min(ke.lastLine()+1,ye.line+500),Fe=se.scanForClosingTag(ke,ye,null,Ue);if(!Fe||Fe.tag!=Te)return!1;for(var Oe=ft?1:0,Le=de.length-1;Le>=0&&de[Le]==Te;Le--)++Oe;ye=Fe.to;for(var Le=1;Le<Oe;Le++){var st=se.scanForClosingTag(ke,ye,null,Ue);if(!st||st.tag!=Te)return!1;ye=st.to}return!0}})},32855:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){"use strict";var gt=se.Pos;function Ie(Le,st){return Le.line-st.line||Le.ch-st.ch}var _e="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=_e+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ye=new RegExp("<(/?)(["+_e+"]["+me+"]*)","g");function Be(Le,st,ut,Et){this.line=st,this.ch=ut,this.cm=Le,this.text=Le.getLine(st),this.min=Et?Math.max(Et.from,Le.firstLine()):Le.firstLine(),this.max=Et?Math.min(Et.to-1,Le.lastLine()):Le.lastLine()}function qe(Le,st){var ut=Le.cm.getTokenTypeAt(gt(Le.line,st));return ut&&/\btag\b/.test(ut)}function ke(Le){if(!(Le.line>=Le.max))return Le.ch=0,Le.text=Le.cm.getLine(++Le.line),!0}function de(Le){if(!(Le.line<=Le.min))return Le.text=Le.cm.getLine(--Le.line),Le.ch=Le.text.length,!0}function Te(Le){for(;;){var st=Le.text.indexOf(">",Le.ch);if(st==-1){if(ke(Le))continue;return}if(!qe(Le,st+1)){Le.ch=st+1;continue}var ut=Le.text.lastIndexOf("/",st),Et=ut>-1&&!/\S/.test(Le.text.slice(ut+1,st));return Le.ch=st+1,Et?"selfClose":"regular"}}function ye(Le){for(;;){var st=Le.ch?Le.text.lastIndexOf("<",Le.ch-1):-1;if(st==-1){if(de(Le))continue;return}if(!qe(Le,st+1)){Le.ch=st;continue}Ye.lastIndex=st,Le.ch=st;var ut=Ye.exec(Le.text);if(ut&&ut.index==st)return ut}}function ft(Le){for(;;){Ye.lastIndex=Le.ch;var st=Ye.exec(Le.text);if(!st){if(ke(Le))continue;return}if(!qe(Le,st.index+1)){Le.ch=st.index+1;continue}return Le.ch=st.index+st[0].length,st}}function Ue(Le){for(;;){var st=Le.ch?Le.text.lastIndexOf(">",Le.ch-1):-1;if(st==-1){if(de(Le))continue;return}if(!qe(Le,st+1)){Le.ch=st;continue}var ut=Le.text.lastIndexOf("/",st),Et=ut>-1&&!/\S/.test(Le.text.slice(ut+1,st));return Le.ch=st+1,Et?"selfClose":"regular"}}function Fe(Le,st){for(var ut=[];;){var Et=ft(Le),yt,vt=Le.line,mt=Le.ch-(Et?Et[0].length:0);if(!Et||!(yt=Te(Le)))return;if(yt!="selfClose")if(Et[1]){for(var ht=ut.length-1;ht>=0;--ht)if(ut[ht]==Et[2]){ut.length=ht;break}if(ht<0&&(!st||st==Et[2]))return{tag:Et[2],from:gt(vt,mt),to:gt(Le.line,Le.ch)}}else ut.push(Et[2])}}function Oe(Le,st){for(var ut=[];;){var Et=Ue(Le);if(!Et)return;if(Et=="selfClose"){ye(Le);continue}var yt=Le.line,vt=Le.ch,mt=ye(Le);if(!mt)return;if(mt[1])ut.push(mt[2]);else{for(var ht=ut.length-1;ht>=0;--ht)if(ut[ht]==mt[2]){ut.length=ht;break}if(ht<0&&(!st||st==mt[2]))return{tag:mt[2],from:gt(Le.line,Le.ch),to:gt(yt,vt)}}}}se.registerHelper("fold","xml",function(Le,st){for(var ut=new Be(Le,st.line,0);;){var Et=ft(ut);if(!Et||ut.line!=st.line)return;var yt=Te(ut);if(!yt)return;if(!Et[1]&&yt!="selfClose"){var vt=gt(ut.line,ut.ch),mt=Fe(ut,Et[2]);return mt&&Ie(mt.from,vt)>0?{from:vt,to:mt.from}:null}}}),se.findMatchingTag=function(Le,st,ut){var Et=new Be(Le,st.line,st.ch,ut);if(!(Et.text.indexOf(">")==-1&&Et.text.indexOf("<")==-1)){var yt=Te(Et),vt=yt&&gt(Et.line,Et.ch),mt=yt&&ye(Et);if(!(!yt||!mt||Ie(Et,st)>0)){var ht={from:gt(Et.line,Et.ch),to:vt,tag:mt[2]};return yt=="selfClose"?{open:ht,close:null,at:"open"}:mt[1]?{open:Oe(Et,mt[2]),close:ht,at:"close"}:(Et=new Be(Le,vt.line,vt.ch,ut),{open:ht,close:Fe(Et,mt[2]),at:"open"})}}},se.findEnclosingTag=function(Le,st,ut,Et){for(var yt=new Be(Le,st.line,st.ch,ut);;){var vt=Oe(yt,Et);if(!vt)break;var mt=new Be(Le,st.line,st.ch,ut),ht=Fe(mt,vt.tag);if(ht)return{open:vt,close:ht}}},se.scanForClosingTag=function(Le,st,ut,Et){var yt=new Be(Le,st.line,st.ch,Et?{from:0,to:Et}:null);return Fe(yt,ut)}})},89780:function(Ot){(function(zt,fe){Ot.exports=fe()})(this,function(){"use strict";var zt=navigator.userAgent,fe=navigator.platform,se=/gecko\/\d/i.test(zt),gt=/MSIE \d/.test(zt),Ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zt),_e=/Edge\/(\d+)/.exec(zt),me=gt||Ie||_e,Ye=me&&(gt?document.documentMode||6:+(_e||Ie)[1]),Be=!_e&&/WebKit\//.test(zt),qe=Be&&/Qt\/\d+\.\d+/.test(zt),ke=!_e&&/Chrome\//.test(zt),de=/Opera\//.test(zt),Te=/Apple Computer/.test(navigator.vendor),ye=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(zt),ft=/PhantomJS/.test(zt),Ue=!_e&&/AppleWebKit/.test(zt)&&/Mobile\/\w+/.test(zt),Fe=/Android/.test(zt),Oe=Ue||Fe||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(zt),Le=Ue||/Mac/.test(fe),st=/\bCrOS\b/.test(zt),ut=/win/i.test(fe),Et=de&&zt.match(/Version\/(\d*\.\d*)/);Et&&(Et=Number(Et[1])),Et&&Et>=15&&(de=!1,Be=!0);var yt=Le&&(qe||de&&(Et==null||Et<12.11)),vt=se||me&&Ye>=9;function mt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ht=function(a,y){var x=a.className,b=mt(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 $t(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Se(a,y){return $t(a).appendChild(y)}function Ge(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 rt(a,y,x,b){var E=Ge(a,y,x,b);return E.setAttribute("role","presentation"),E}var Pe;document.createRange?Pe=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Pe=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 je(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 Ee(){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 ze(a,y){var x=a.className;mt(y).test(x)||(a.className+=(x?" ":"")+y)}function Pt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!mt(x[b]).test(y)&&(y+=" "+x[b]);return y}var ot=function(a){a.select()};Ue?ot=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(ot=function(a){try{a.select()}catch(y){}});function St(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function dt(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 pe(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 oe=a.indexOf(" ",z);if(oe<0||oe>=y)return re+(y-z);re+=oe-z,re+=x-re%x,z=oe+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=St(this.onTimeout,this)};ce.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ce.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 Ve(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var wt=50,lt={toString:function(){return"CodeMirror.Pass"}},we={scroll:!1},Xe={origin:"*mouse"},Ze={origin:"+move"};function Mt(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 it=[""];function Ce(a){for(;it.length<=a;)it.push(ve(it)+" ");return it[a]}function ve(a){return a[a.length-1]}function Me(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function $e(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function xe(){}function He(a,y){var x;return Object.create?x=Object.create(a):(xe.prototype=a,x=new xe),y&&dt(y,x),x}var Je=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Je.test(a))}function nt(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function Ke(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var xt=/[\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 kt(a){return a.charCodeAt(0)>=768&&xt.test(a)}function Yt(a,y,x){for(;(x<0?y>0:y<a.length)&&kt(a.charAt(y));)y+=x;return y}function Wt(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 ae(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(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function le(he,be,De){this.level=he,this.from=be,this.to=De}return function(he,be){var De=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var tt=he.length,Qe=[],Tt=0;Tt<tt;++Tt)Qe.push(x(he.charCodeAt(Tt)));for(var Nt=0,Jt=De;Nt<tt;++Nt){var an=Qe[Nt];an=="m"?Qe[Nt]=Jt:Jt=an}for(var fn=0,sn=De;fn<tt;++fn){var bn=Qe[fn];bn=="1"&&sn=="r"?Qe[fn]="n":z.test(bn)&&(sn=bn,bn=="r"&&(Qe[fn]="R"))}for(var An=1,Sn=Qe[0];An<tt-1;++An){var Un=Qe[An];Un=="+"&&Sn=="1"&&Qe[An+1]=="1"?Qe[An]="1":Un==","&&Sn==Qe[An+1]&&(Sn=="1"||Sn=="n")&&(Qe[An]=Sn),Sn=Un}for(var Fr=0;Fr<tt;++Fr){var si=Qe[Fr];if(si==",")Qe[Fr]="N";else if(si=="%"){var jr=void 0;for(jr=Fr+1;jr<tt&&Qe[jr]=="%";++jr);for(var Bi=Fr&&Qe[Fr-1]=="!"||jr<tt&&Qe[jr]=="1"?"1":"N",ki=Fr;ki<jr;++ki)Qe[ki]=Bi;Fr=jr-1}}for(var qr=0,Ei=De;qr<tt;++qr){var hi=Qe[qr];Ei=="L"&&hi=="1"?Qe[qr]="L":z.test(hi)&&(Ei=hi)}for(var ri=0;ri<tt;++ri)if(E.test(Qe[ri])){var $r=void 0;for($r=ri+1;$r<tt&&E.test(Qe[$r]);++$r);for(var Ur=(ri?Qe[ri-1]:De)=="L",Di=($r<tt?Qe[$r]:De)=="L",Vo=Ur==Di?Ur?"L":"R":De,bo=ri;bo<$r;++bo)Qe[bo]=Vo;ri=$r-1}for(var pi=[],eo,li=0;li<tt;)if(re.test(Qe[li])){var bs=li;for(++li;li<tt&&re.test(Qe[li]);++li);pi.push(new le(0,bs,li))}else{var oo=li,Mo=pi.length,To=be=="rtl"?1:0;for(++li;li<tt&&Qe[li]!="L";++li);for(var bi=oo;bi<li;)if(oe.test(Qe[bi])){oo<bi&&(pi.splice(Mo,0,new le(1,oo,bi)),Mo+=To);var Uo=bi;for(++bi;bi<li&&oe.test(Qe[bi]);++bi);pi.splice(Mo,0,new le(2,Uo,bi)),Mo+=To,oo=bi}else++bi;oo<li&&pi.splice(Mo,0,new le(1,oo,li))}return be=="ltr"&&(pi[0].level==1&&(eo=he.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new le(0,0,eo[0].length))),ve(pi).level==1&&(eo=he.match(/\s+$/))&&(ve(pi).to-=eo[0].length,pi.push(new le(0,tt-eo[0].length,tt)))),be=="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=[],ge=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 ct(a,y){return a._handlers&&a._handlers[y]||ne}function pt(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=Ve(E,x);z>-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function Ct(a,y){var x=ct(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 Re(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Ct(a,x||y.type,a,y),cn(y)||y.codemirrorIgnore}function Zt(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)Ve(x,y[b])==-1&&x.push(y[b])}function Rt(a,y){return ct(a,y).length>0}function It(a){a.prototype.on=function(y,x){ge(this,y,x)},a.prototype.off=function(y,x){pt(this,y,x)}}function un(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function kn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function wn(a){un(a),kn(a)}function $n(a){return a.target||a.srcElement}function Zn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Le&&a.ctrlKey&&y==1&&(y=3),y}var mr=function(){if(me&&Ye<9)return!1;var a=Ge("div");return"draggable"in a||"dragDrop"in a}(),er;function ur(a){if(er==null){var y=Ge("span","\u200B");Se(a,Ge("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(er=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&Ye<8))}var x=er?Ge("span","\u200B"):Ge("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var nr;function In(a){if(nr!=null)return nr;var y=Se(a,document.createTextNode("A\u062EA")),x=Pe(y,0,1).getBoundingClientRect(),b=Pe(y,1,2).getBoundingClientRect();return $t(a),!x||x.left==x.right?!1:nr=b.right-x.right<3}var rr=`
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/)},cr=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},Bn=function(){var a=Ge("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),Xn=null;function Kn(a){if(Xn!=null)return Xn;var y=Se(a,Ge("span","x")),x=y.getBoundingClientRect(),b=Pe(y,0,1).getBoundingClientRect();return Xn=Math.abs(x.left-b.left)>1}var xr={},Ut={};function pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),xr[a]=y}function En(a,y){Ut[a]=y}function Tn(a){if(typeof a=="string"&&Ut.hasOwnProperty(a))a=Ut[a];else if(a&&typeof a.name=="string"&&Ut.hasOwnProperty(a.name)){var y=Ut[a.name];typeof y=="string"&&(y={name:y}),a=He(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Tn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Tn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Jn(a,y){y=Tn(y);var x=xr[y.name];if(!x)return Jn(a,"text/plain");var b=x(a,y);if(tr.hasOwnProperty(y.name)){var E=tr[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 tr={};function dr(a,y){var x=tr.hasOwnProperty(a)?tr[a]:tr[a]={};dt(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 Fn(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 hr(a,y,x){return a.startState?a.startState(y,x):!0}var jt=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};jt.prototype.eol=function(){return this.pos>=this.string.length},jt.prototype.sol=function(){return this.pos==this.lineStart},jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},jt.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},jt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},jt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},jt.prototype.skipToEnd=function(){this.pos=this.string.length},jt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},jt.prototype.backUp=function(a){this.pos-=a},jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},jt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},jt.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)}},jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},jt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},jt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},jt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function at(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 Qt(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 Cn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Gn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ae(a){if(a.parent==null)return null;for(var y=a.parent,x=Ve(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 Ne(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 oe=a.lines[re],le=oe.height;if(y<le)break;y-=le}return x+re}function Bt(a,y){return y>=a.first&&y<a.first+a.size}function Dt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function We(a,y,x){if(x===void 0&&(x=null),!(this instanceof We))return new We(a,y,x);this.line=a,this.ch=y,this.sticky=x}function Lt(a,y){return a.line-y.line||a.ch-y.ch}function Xt(a,y){return a.sticky==y.sticky&&Lt(a,y)==0}function tn(a){return We(a.line,a.ch)}function hn(a,y){return Lt(a,y)<0?y:a}function _t(a,y){return Lt(a,y)<0?a:y}function qt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function At(a,y){if(y.line<a.first)return We(a.first,0);var x=a.first+a.size-1;return y.line>x?We(x,at(a,x).text.length):bt(y,at(a,y.line).text.length)}function bt(a,y){var x=a.ch;return x==null||x>y?We(a.line,y):x<0?We(a.line,0):a}function en(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=At(a,y[b]);return x}var vn=function(a,y){this.state=a,this.lookAhead=y},mn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};mn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},mn.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}},mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mn.fromSaved=function(a,y,x){return y instanceof vn?new mn(a,_n(a.mode,y.state),x,y.lookAhead):new mn(a,_n(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?_n(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vn(y,this.maxLookAhead):y};function xn(a,y,x,b){var E=[a.state.modeGen],z={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},z,b);for(var re=x.state,oe=function(he){x.baseTokens=E;var be=a.state.overlays[he],De=1,tt=0;x.state=!0,Qn(a,y.text,be.mode,x,function(Qe,Tt){for(var Nt=De;tt<Qe;){var Jt=E[De];Jt>Qe&&E.splice(De,1,Qe,E[De+1],Jt),De+=2,tt=Math.min(Qe,Jt)}if(Tt)if(be.opaque)E.splice(Nt,De-Nt,Qe,"overlay "+Tt),De=Nt+2;else for(;Nt<De;Nt+=2){var an=E[Nt+1];E[Nt+1]=(an?an+" ":"")+"overlay "+Tt}},z),x.state=re,x.baseTokens=null,x.baseTokenPos=1},le=0;le<a.state.overlays.length;++le)oe(le);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function Hn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Yn(a,Ae(y)),E=y.text.length>a.options.maxHighlightLength&&_n(a.doc.mode,b.state),z=xn(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 Yn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new mn(b,!0,y);var z=Lr(a,y,x),re=z>b.first&&at(b,z-1).stateAfter,oe=re?mn.fromSaved(b,re,z):new mn(b,hr(b.mode),z);return b.iter(z,y,function(le){dn(a,le.text,oe);var he=oe.line;le.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?oe.save():null,oe.nextLine()}),x&&(b.modeFrontier=oe.line),oe}function dn(a,y,x,b){var E=a.doc.mode,z=new jt(y,a.options.tabSize,x);for(z.start=z.pos=b||0,y==""&&Gt(E,x.state);!z.eol();)gn(E,z,x.state),z.start=z.pos}function Gt(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=Fn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function gn(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=Fn(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 nn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Wn(a,y,x,b){var E=a.doc,z=E.mode,re;y=At(E,y);var oe=at(E,y.line),le=Yn(a,y.line,x),he=new jt(oe.text,a.options.tabSize,le),be;for(b&&(be=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,re=gn(z,he,le.state),b&&be.push(new nn(he,re,_n(E.mode,le.state)));return b?be:new nn(he,re,le.state)}function wr(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 Qn(a,y,x,b,E,z,re){var oe=x.flattenSpans;oe==null&&(oe=a.options.flattenSpans);var le=0,he=null,be=new jt(y,a.options.tabSize,b),De,tt=a.options.addModeClass&&[null];for(y==""&&wr(Gt(x,b.state),z);!be.eol();){if(be.pos>a.options.maxHighlightLength?(oe=!1,re&&dn(a,y,b,be.pos),be.pos=y.length,De=null):De=wr(gn(x,be,b.state,tt),z),tt){var Qe=tt[0].name;Qe&&(De="m-"+(De?Qe+" "+De:Qe))}if(!oe||he!=De){for(;le<be.start;)le=Math.min(be.start,le+5e3),E(le,he);he=De}be.start=be.pos}for(;le<be.pos;){var Tt=Math.min(be.pos,le+5e3);E(Tt,he),le=Tt}}function Lr(a,y,x){for(var b,E,z=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),oe=y;oe>re;--oe){if(oe<=z.first)return z.first;var le=at(z,oe-1),he=le.stateAfter;if(he&&(!x||oe+(he instanceof vn?he.lookAhead:0)<=z.modeFrontier))return oe;var be=pe(le.text,null,a.options.tabSize);(E==null||b>be)&&(E=oe-1,b=be)}return E}function Mr(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=at(a,b).stateAfter;if(E&&(!(E instanceof vn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var Cr=!1,ir=!1;function Rr(){Cr=!0}function gr(){ir=!0}function or(a,y,x){this.marker=a,this.from=y,this.to=x}function Er(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Tr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function pr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,oe=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(oe||z.from==y&&re.type=="bookmark"&&(!x||!z.marker.insertLeft)){var le=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(b||(b=[])).push(new or(re,z.from,le?null:z.to))}}return b}function jn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,oe=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(oe||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var le=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(b||(b=[])).push(new or(re,le?null:z.from-y,z.to==null?null:z.to-y))}}return b}function Br(a,y){if(y.full)return null;var x=Bt(a,y.from.line)&&at(a,y.from.line).markedSpans,b=Bt(a,y.to.line)&&at(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,z=y.to.ch,re=Lt(y.from,y.to)==0,oe=qn(x,E,re),le=jn(b,z,re),he=y.text.length==1,be=ve(y.text).length+(he?E:0);if(oe)for(var De=0;De<oe.length;++De){var tt=oe[De];if(tt.to==null){var Qe=Er(le,tt.marker);Qe?he&&(tt.to=Qe.to==null?null:Qe.to+be):tt.to=E}}if(le)for(var Tt=0;Tt<le.length;++Tt){var Nt=le[Tt];if(Nt.to!=null&&(Nt.to+=be),Nt.from==null){var Jt=Er(oe,Nt.marker);Jt||(Nt.from=be,he&&(oe||(oe=[])).push(Nt))}else Nt.from+=be,he&&(oe||(oe=[])).push(Nt)}oe&&(oe=Vr(oe)),le&&le!=oe&&(le=Vr(le));var an=[oe];if(!he){var fn=y.text.length-2,sn;if(fn>0&&oe)for(var bn=0;bn<oe.length;++bn)oe[bn].to==null&&(sn||(sn=[])).push(new or(oe[bn].marker,null,null));for(var An=0;An<fn;++An)an.push(sn);an.push(le)}return an}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 Jr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Qe){if(Qe.markedSpans)for(var Tt=0;Tt<Qe.markedSpans.length;++Tt){var Nt=Qe.markedSpans[Tt].marker;Nt.readOnly&&(!b||Ve(b,Nt)==-1)&&(b||(b=[])).push(Nt)}}),!b)return null;for(var E=[{from:y,to:x}],z=0;z<b.length;++z)for(var re=b[z],oe=re.find(0),le=0;le<E.length;++le){var he=E[le];if(!(Lt(he.to,oe.from)<0||Lt(he.from,oe.to)>0)){var be=[le,1],De=Lt(he.from,oe.from),tt=Lt(he.to,oe.to);(De<0||!re.inclusiveLeft&&!De)&&be.push({from:he.from,to:oe.from}),(tt>0||!re.inclusiveRight&&!tt)&&be.push({from:oe.to,to:he.to}),E.splice.apply(E,be),le+=be.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 Wr(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 _r(a){return a.inclusiveRight?1:0}function ii(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),z=Lt(b.from,E.from)||Nr(a)-Nr(y);if(z)return-z;var re=Lt(b.to,E.to)||_r(a)-_r(y);return re||y.id-a.id}function Or(a,y){var x=ir&&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||ii(b,E.marker)<0)&&(b=E.marker);return b}function Rn(a){return Or(a,!0)}function Ht(a){return Or(a,!1)}function Kt(a,y){var x=ir&&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||ii(b,z.marker)<0)&&(b=z.marker)}return b}function yn(a,y,x,b,E){var z=at(a,y),re=ir&&z.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var le=re[oe];if(le.marker.collapsed){var he=le.marker.find(0),be=Lt(he.from,x)||Nr(le.marker)-Nr(E),De=Lt(he.to,b)||_r(le.marker)-_r(E);if(!(be>=0&&De<=0||be<=0&&De>=0)&&(be<=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Lt(he.to,x)>=0:Lt(he.to,x)>0)||be>=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?Lt(he.from,b)<=0:Lt(he.from,b)<0)))return!0}}}function on(a){for(var y;y=Rn(a);)a=y.find(-1,!0).line;return a}function Dn(a){for(var y;y=Ht(a);)a=y.find(1,!0).line;return a}function ar(a){for(var y,x;y=Ht(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Vt(a,y){var x=at(a,y),b=on(x);return x==b?y:Ae(b)}function Ft(a,y){if(y>a.lastLine())return y;var x=at(a,y),b;if(!rn(a,x))return y;for(;b=Ht(x);)x=b.find(1,!0).line;return Ae(x)+1}function rn(a,y){var x=ir&&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&&ln(a,y,b))return!0}}}function ln(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return ln(a,b.line,Er(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)&&ln(a,y,E))return!0}function Mn(a){a=on(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 oe=z.children[re];if(oe==x)break;y+=oe.height}return y}function sr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=Rn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Ht(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 Vn(a){var y=a.display,x=a.doc;y.maxLine=at(x,x.first),y.maxLineLength=sr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=sr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var yr=function(a,y,x){this.text=a,Wr(this,y),this.height=x?x(this):1};yr.prototype.lineNo=function(){return Ae(this)},It(yr);function br(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),Wr(a,x);var E=b?b(a):1;E!=a.height&&Gn(a,E)}function Sr(a){a.parent=null,Dr(a)}var zr={},Ar={};function Hr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Ar:zr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=rt("span",null,null,Be?"padding-right: .1px":null),b={pre:rt("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,In(a.display.measure)&&(re=ue(z,a.doc.direction))&&(b.addToken=vi(b.addToken,re)),b.map=[];var oe=y!=a.display.externalMeasured&&Ae(z);fr(z,b,Hn(a,z,oe)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=Pt(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=Pt(z.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(ur(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(Be){var le=b.content.lastChild;(/\bcm-tab\b/.test(le.className)||le.querySelector&&le.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return Ct(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Pt(b.pre.className,b.textClass||"")),b}function Li(a){var y=Ge("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 oe=a.splitSpaces?xi(y,a.trailingSpace):y,le=a.cm.state.specialChars,he=!1,be;if(!le.test(y))a.col+=y.length,be=document.createTextNode(oe),a.map.push(a.pos,a.pos+y.length,be),me&&Ye<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var De=0;;){le.lastIndex=De;var tt=le.exec(y),Qe=tt?tt.index-De:y.length-De;if(Qe){var Tt=document.createTextNode(oe.slice(De,De+Qe));me&&Ye<9?be.appendChild(Ge("span",[Tt])):be.appendChild(Tt),a.map.push(a.pos,a.pos+Qe,Tt),a.col+=Qe,a.pos+=Qe}if(!tt)break;De+=Qe+1;var Nt=void 0;if(tt[0]==" "){var Jt=a.cm.options.tabSize,an=Jt-a.col%Jt;Nt=be.appendChild(Ge("span",Ce(an),"cm-tab")),Nt.setAttribute("role","presentation"),Nt.setAttribute("cm-text"," "),a.col+=an}else tt[0]=="\r"||tt[0]==`
`?(Nt=be.appendChild(Ge("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Nt.setAttribute("cm-text",tt[0]),a.col+=1):(Nt=a.cm.options.specialCharPlaceholder(tt[0]),Nt.setAttribute("cm-text",tt[0]),me&&Ye<9?be.appendChild(Ge("span",[Nt])):be.appendChild(Nt),a.col+=1);a.map.push(a.pos,a.pos+1,Nt),a.pos++}}if(a.trailingSpace=oe.charCodeAt(y.length-1)==32,x||b||E||he||z||re){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var sn=Ge("span",[be],fn,z);if(re)for(var bn in re)re.hasOwnProperty(bn)&&bn!="style"&&bn!="class"&&sn.setAttribute(bn,re[bn]);return a.content.appendChild(sn)}a.content.appendChild(be)}}function xi(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,oe,le){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,be=he+b.length;;){for(var De=void 0,tt=0;tt<y.length&&(De=y[tt],!(De.to>he&&De.from<=he));tt++);if(De.to>=be)return a(x,b,E,z,re,oe,le);a(x,b.slice(0,De.to-he),E,z,null,oe,le),z=null,b=b.slice(De.to-he),he=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 fr(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]),Hr(x[re+1],y.cm.options));return}for(var oe=E.length,le=0,he=1,be="",De,tt,Qe=0,Tt,Nt,Jt,an,fn;;){if(Qe==le){Tt=Nt=Jt=tt="",fn=null,an=null,Qe=1/0;for(var sn=[],bn=void 0,An=0;An<b.length;++An){var Sn=b[An],Un=Sn.marker;if(Un.type=="bookmark"&&Sn.from==le&&Un.widgetNode)sn.push(Un);else if(Sn.from<=le&&(Sn.to==null||Sn.to>le||Un.collapsed&&Sn.to==le&&Sn.from==le)){if(Sn.to!=null&&Sn.to!=le&&Qe>Sn.to&&(Qe=Sn.to,Nt=""),Un.className&&(Tt+=" "+Un.className),Un.css&&(tt=(tt?tt+";":"")+Un.css),Un.startStyle&&Sn.from==le&&(Jt+=" "+Un.startStyle),Un.endStyle&&Sn.to==Qe&&(bn||(bn=[])).push(Un.endStyle,Sn.to),Un.title&&((fn||(fn={})).title=Un.title),Un.attributes)for(var Fr in Un.attributes)(fn||(fn={}))[Fr]=Un.attributes[Fr];Un.collapsed&&(!an||ii(an.marker,Un)<0)&&(an=Sn)}else Sn.from>le&&Qe>Sn.from&&(Qe=Sn.from)}if(bn)for(var si=0;si<bn.length;si+=2)bn[si+1]==Qe&&(Nt+=" "+bn[si]);if(!an||an.from==le)for(var jr=0;jr<sn.length;++jr)Xi(y,0,sn[jr]);if(an&&(an.from||0)==le){if(Xi(y,(an.to==null?oe+1:an.to)-le,an.marker,an.from==null),an.to==null)return;an.to==le&&(an=!1)}}if(le>=oe)break;for(var Bi=Math.min(oe,Qe);;){if(be){var ki=le+be.length;if(!an){var qr=ki>Bi?be.slice(0,Bi-le):be;y.addToken(y,qr,De?De+Tt:Tt,Jt,le+qr.length==Qe?Nt:"",tt,fn)}if(ki>=Bi){be=be.slice(Bi-le),le=Bi;break}le=ki,Jt=""}be=E.slice(z,z=x[he++]),De=Hr(x[he++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=ar(y),this.size=this.rest?Ae(ve(this.rest))-x+1:1,this.node=this.text=null,this.hidden=rn(a,y)}function ti(a,y,x){for(var b=[],E,z=y;z<x;z=E){var re=new to(a.doc,at(a.doc,z),z);E=z+re.size,b.push(re)}return b}var Ni=null;function ao(a){Ni?Ni.ops.push(a):a.ownsGroup=Ni={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{Ni=null,y(x)}}var Ri=null;function Zr(a,y){var x=ct(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ni?E=Ni.delayedCallbacks:Ri?E=Ri:(E=Ri=[],setTimeout(Hi,0));for(var z=function(oe){E.push(function(){return x[oe].apply(null,b)})},re=0;re<x.length;++re)z(re)}}function Hi(){var a=Ri;Ri=null;for(var y=0;y<a.length;++y)a[y]()}function so(a,y,x,b){for(var E=0;E<y.changes.length;E++){var z=y.changes[E];z=="text"?lo(a,y):z=="gutter"?On(a,y,x,b):z=="class"?Ln(a,y):z=="widget"&&Pn(a,y,b)}y.changes=null}function _i(a){return a.node==a.text&&(a.node=Ge("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&Ye<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=_i(y);y.background=b.insertBefore(Ge("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function xo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):ei(a,y)}function lo(a,y){var x=y.text.className,b=xo(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,Ln(a,y)):x&&(y.text.className=x)}function Ln(a,y){Qr(a,y),y.line.wrapClass?_i(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 On(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=_i(y);y.gutterBackground=Ge("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=_i(y),oe=y.gutter=Ge("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(oe),re.insertBefore(oe,y.text),y.line.gutterClass&&(oe.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=oe.appendChild(Ge("div",Dt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var le=0;le<a.display.gutterSpecs.length;++le){var he=a.display.gutterSpecs[le].className,be=z.hasOwnProperty(he)&&z[he];be&&oe.appendChild(Ge("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function Pn(a,y,x){y.alignable&&(y.alignable=null);for(var b=mt("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);vr(a,y,x)}function Nn(a,y,x,b){var E=xo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Ln(a,y),On(a,y,x,b),vr(a,y,b),y.node}function vr(a,y,x){if(Ir(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Ir(a,y.rest[b],y,x,!1)}function Ir(a,y,x,b,E){if(y.widgets)for(var z=_i(x),re=0,oe=y.widgets;re<oe.length;++re){var le=oe[re],he=Ge("div",[le.node],"CodeMirror-linewidget"+(le.className?" "+le.className:""));le.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Gi(le,he,x,b),a.display.input.setUneditable(he),E&&le.above?z.insertBefore(he,x.gutter||x.text):z.appendChild(he),Zr(le,"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(!je(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;"),Se(y.display.measure,Ge("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=$n(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 Kr(a){return a.lineSpace.offsetTop}function Wi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Se(a.measure,Ge("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 Mi(a){return wt-a.display.nativeBarWidth}function qi(a){return a.display.scroller.clientWidth-Mi(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Mi(a)-a.display.barHeight}function ji(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(),oe=0;oe<re.length-1;oe++){var le=re[oe],he=re[oe+1];Math.abs(le.bottom-he.bottom)>2&&z.push((le.bottom+he.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Ao(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(Ae(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=on(y);var x=Ae(y),b=a.display.externalMeasured=new to(a.doc,y,x);b.lineN=x;var E=b.built=ei(a,b);return b.text=E.pre,Se(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return zi(a,uo(a,y),x,b)}function $i(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[So(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function uo(a,y){var x=Ae(y),b=$i(a,x);b&&!b.text?b=null:b&&b.changes&&(so(a,b,x,co(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=Ao(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function zi(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||(ji(a,y.view,y.rect),y.hasHeights=!0),re=wa(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 ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,z,re,oe,le,he=0;he<a.length;he+=3)if(oe=a[he],le=a[he+1],y<oe?(E=0,z=1,re="left"):y<le?(E=y-oe,z=E+1):(he==a.length-3||y==le&&a[he+3]>y)&&(z=le-oe,E=z-1,y>=le&&(re="right")),E!=null){if(b=a[he+2],oe==le&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],re="left";if(x=="right"&&E==le-oe)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],re="right";break}return{node:b,start:E,end:z,collapse:re,coverStart:oe,coverEnd:le}}function Va(a,y){var x=ba;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 wa(a,y,x,b){var E=xa(y.map,x,b),z=E.node,re=E.start,oe=E.end,le=E.collapse,he;if(z.nodeType==3){for(var be=0;be<4;be++){for(;re&&kt(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+oe<E.coverEnd&&kt(y.line.text.charAt(E.coverStart+oe));)++oe;if(me&&Ye<9&&re==0&&oe==E.coverEnd-E.coverStart?he=z.parentNode.getBoundingClientRect():he=Va(Pe(z,re,oe).getClientRects(),b),he.left||he.right||re==0)break;oe=re,re=re-1,le="right"}me&&Ye<11&&(he=Ua(a.display.measure,he))}else{re>0&&(le=b="right");var De;a.options.lineWrapping&&(De=z.getClientRects()).length>1?he=De[b=="right"?De.length-1:0]:he=z.getBoundingClientRect()}if(me&&Ye<9&&!re&&(!he||!he.left&&!he.right)){var tt=z.parentNode.getClientRects()[0];tt?he={left:tt.left,right:tt.left+Ui(a.display),top:tt.top,bottom:tt.bottom}:he=ba}for(var Qe=he.top-y.rect.top,Tt=he.bottom-y.rect.top,Nt=(Qe+Tt)/2,Jt=y.view.measure.heights,an=0;an<Jt.length-1&&!(Nt<Jt[an]);an++);var fn=an?Jt[an-1]:0,sn=Jt[an],bn={left:(le=="right"?he.right:he.left)-y.rect.left,right:(le=="left"?he.left:he.right)-y.rect.left,top:fn,bottom:sn};return!he.left&&!he.right&&(bn.bogus=!0),a.options.singleCursorHeightPerLine||(bn.rtop=Qe,bn.rbottom=Tt),bn}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Kn(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 Ko(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 Yo(a){a.display.externalMeasure=null,$t(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function wo(a){Yo(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Xo(){return ke&&Fe?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return ke&&Fe?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Jo(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 Po(a,y,x,b,E){if(!E){var z=Jo(y);x.top+=z,x.bottom+=z}if(b=="line")return x;b||(b="local");var re=Mn(y);if(b=="local"?re+=Kr(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var oe=a.display.lineSpace.getBoundingClientRect();re+=oe.top+(b=="window"?0:Ca());var le=oe.left+(b=="window"?0:Xo());x.left+=le,x.right+=le}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();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 Bo(a,y,x,b,E){return b||(b=at(a.doc,y.line)),Po(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,z){b=b||at(a.doc,y.line),E||(E=uo(a,b));function re(Tt,Nt){var Jt=zi(a,E,Tt,Nt?"right":"left",z);return Nt?Jt.left=Jt.right:Jt.right=Jt.left,Po(a,b,Jt,x)}var oe=ue(b,a.doc.direction),le=y.ch,he=y.sticky;if(le>=b.text.length?(le=b.text.length,he="before"):le<=0&&(le=0,he="after"),!oe)return re(he=="before"?le-1:le,he=="before");function be(Tt,Nt,Jt){var an=oe[Nt],fn=an.level==1;return re(Jt?Tt-1:Tt,fn!=Jt)}var De=ee(oe,le,he),tt=te,Qe=be(le,De,he=="before");return tt!=null&&(Qe.other=be(le,tt,he!="before")),Qe}function lr(a,y){var x=0;y=At(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=at(a.doc,y.line),E=Mn(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function zn(a,y,x,b,E){var z=We(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 zn(b.first,0,null,-1,-1);var E=Ne(b,x),z=b.first+b.size-1;if(E>z)return zn(b.first+b.size-1,at(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=at(b,E);;){var oe=Vi(a,re,E,y,x),le=Kt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!le)return oe;var he=le.find(1);if(he.line==E)return he;re=at(b,E=he.line)}}function fi(a,y,x,b){b-=Jo(y);var E=y.text.length,z=Wt(function(re){return zi(a,x,re-1).bottom<=b},E,0);return E=Wt(function(re){return zi(a,x,re).top>b},z,E),{begin:z,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,zi(a,x,b),"line").top;return fi(a,y,x,E)}function ni(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Vi(a,y,x,b,E){E-=Mn(y);var z=uo(a,y),re=Jo(y),oe=0,le=y.text.length,he=!0,be=ue(y,a.doc.direction);if(be){var De=(a.options.lineWrapping?ro:Zi)(a,y,x,z,be,b,E);he=De.level!=1,oe=he?De.from:De.to-1,le=he?De.to:De.from-1}var tt=null,Qe=null,Tt=Wt(function(An){var Sn=zi(a,z,An);return Sn.top+=re,Sn.bottom+=re,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(tt=An,Qe=Sn),!0):!1},oe,le),Nt,Jt,an=!1;if(Qe){var fn=b-Qe.left<Qe.right-b,sn=fn==he;Tt=tt+(sn?0:1),Jt=sn?"after":"before",Nt=fn?Qe.left:Qe.right}else{!he&&(Tt==le||Tt==oe)&&Tt++,Jt=Tt==0?"after":Tt==y.text.length?"before":zi(a,z,Tt-(he?1:0)).bottom+re<=E==he?"after":"before";var bn=wi(a,We(x,Tt,Jt),"line",y,z);Nt=bn.left,an=E<bn.top?-1:E>=bn.bottom?1:0}return Tt=Yt(y.text,Tt,1),zn(x,Tt,Jt,an,b-Nt)}function Zi(a,y,x,b,E,z,re){var oe=Wt(function(De){var tt=E[De],Qe=tt.level!=1;return ni(wi(a,We(x,Qe?tt.to:tt.from,Qe?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),le=E[oe];if(oe>0){var he=le.level!=1,be=wi(a,We(x,he?le.from:le.to,he?"after":"before"),"line",y,b);ni(be,z,re,!0)&&be.top>re&&(le=E[oe-1])}return le}function ro(a,y,x,b,E,z,re){var oe=fi(a,y,b,re),le=oe.begin,he=oe.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,De=null,tt=0;tt<E.length;tt++){var Qe=E[tt];if(!(Qe.from>=he||Qe.to<=le)){var Tt=Qe.level!=1,Nt=zi(a,b,Tt?Math.min(he,Qe.to)-1:Math.max(le,Qe.from)).right,Jt=Nt<z?z-Nt+1e9:Nt-z;(!be||De>Jt)&&(be=Qe,De=Jt)}}return be||(be=E[E.length-1]),be.from<le&&(be={from:le,to:be.to,level:be.level}),be.to>he&&(be={from:be.from,to:he,level:be.level}),be}var Ti;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=Ge("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild(Ge("br"));Ti.appendChild(document.createTextNode("x"))}Se(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),$t(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ge("span","xxxxxxxxxx"),x=Ge("pre",[y],"CodeMirror-line-like");Se(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function co(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var oe=a.display.gutterSpecs[re].className;x[oe]=z.offsetLeft+z.clientLeft+E,b[oe]=z.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ai(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(rn(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 Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&Gn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&$n(y).getAttribute("cm-not-content")=="true")return null;var z,re,oe=E.lineSpace.getBoundingClientRect();try{z=y.clientX-oe.left,re=y.clientY-oe.top}catch(De){return null}var le=ci(a,z,re),he;if(b&&le.xRel>0&&(he=at(a.doc,le.line).text).length==le.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;le=We(le.line,Math.max(0,Math.round((z-Qi(a.display).left)/Ui(a.display))-be))}return le}function So(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 Ci(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)ir&&Vt(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)ir&&Ft(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var z=ka(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var re=ka(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):fo(a)}else{var oe=ka(a,y,y,-1),le=ka(a,x,x+b,1);oe&&le?(E.view=E.view.slice(0,oe.index).concat(ti(a,oe.lineN,le.lineN)).concat(E.view.slice(le.index)),E.viewTo+=b):fo(a)}var he=E.externalMeasured;he&&(x<he.lineN?he.lineN+=b:y<he.lineN+he.size&&(E.externalMeasured=null))}function ho(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[So(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);Ve(re,x)==-1&&re.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=So(a,y),z,re=a.display.view;if(!ir||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var oe=a.display.viewFrom,le=0;le<E;le++)oe+=re[le].size;if(oe!=y){if(b>0){if(E==re.length-1)return null;z=oe+re[E].size-y,E++}else z=oe-y;y+=z,x+=z}for(;Vt(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 Wl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=ti(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=ti(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(So(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(ti(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function Cs(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 Qo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ss(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 oe=x.sel.ranges[re];if(!(oe.from().line>=a.display.viewTo||oe.to().line<a.display.viewFrom)){var le=oe.empty();(le||a.options.showCursorWhenSelecting)&&ks(a,oe.head,E),le||zl(a,oe,z)}}return b}function ks(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ge("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(Ge("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 Ea(a,y){return a.top-y.top||a.left-y.left}function zl(a,y,x){var b=a.display,E=a.doc,z=document.createDocumentFragment(),re=Qi(a.display),oe=re.left,le=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-re.right,he=E.direction=="ltr";function be(sn,bn,An,Sn){bn<0&&(bn=0),bn=Math.round(bn),Sn=Math.round(Sn),z.appendChild(Ge("div",null,"CodeMirror-selected","position: absolute; left: "+sn+`px;
top: `+bn+"px; width: "+(An==null?le-sn:An)+`px;
height: `+(Sn-bn)+"px"))}function De(sn,bn,An){var Sn=at(E,sn),Un=Sn.text.length,Fr,si;function jr(qr,Ei){return Bo(a,We(sn,qr),"div",Sn,Ei)}function Bi(qr,Ei,hi){var ri=Yr(a,Sn,null,qr),$r=Ei=="ltr"==(hi=="after")?"left":"right",Ur=hi=="after"?ri.begin:ri.end-(/\s/.test(Sn.text.charAt(ri.end-1))?2:1);return jr(Ur,$r)[$r]}var ki=ue(Sn,E.direction);return ae(ki,bn||0,An==null?Un:An,function(qr,Ei,hi,ri){var $r=hi=="ltr",Ur=jr(qr,$r?"left":"right"),Di=jr(Ei-1,$r?"right":"left"),Vo=bn==null&&qr==0,bo=An==null&&Ei==Un,pi=ri==0,eo=!ki||ri==ki.length-1;if(Di.top-Ur.top<=3){var li=(he?Vo:bo)&&pi,bs=(he?bo:Vo)&&eo,oo=li?oe:($r?Ur:Di).left,Mo=bs?le:($r?Di:Ur).right;be(oo,Ur.top,Mo-oo,Ur.bottom)}else{var To,bi,Uo,xs;$r?(To=he&&Vo&&pi?oe:Ur.left,bi=he?le:Bi(qr,hi,"before"),Uo=he?oe:Bi(Ei,hi,"after"),xs=he&&bo&&eo?le:Di.right):(To=he?Bi(qr,hi,"before"):oe,bi=!he&&Vo&&pi?le:Ur.right,Uo=!he&&bo&&eo?oe:Di.left,xs=he?Bi(Ei,hi,"after"):le),be(To,Ur.top,bi-To,Ur.bottom),Ur.bottom<Di.top&&be(oe,Ur.bottom,null,Di.top),be(Uo,Di.top,xs-Uo,Di.bottom)}(!Fr||Ea(Ur,Fr)<0)&&(Fr=Ur),Ea(Di,Fr)<0&&(Fr=Di),(!si||Ea(Ur,si)<0)&&(si=Ur),Ea(Di,si)<0&&(si=Di)}),{start:Fr,end:si}}var tt=y.from(),Qe=y.to();if(tt.line==Qe.line)De(tt.line,tt.ch,Qe.ch);else{var Tt=at(E,tt.line),Nt=at(E,Qe.line),Jt=on(Tt)==on(Nt),an=De(tt.line,tt.ch,Jt?Tt.text.length+1:null).end,fn=De(Qe.line,Jt?0:null,Qe.ch).start;Jt&&(an.top<fn.top-2?(be(an.right,an.top,null,an.bottom),be(oe,fn.top,fn.left,fn.bottom)):be(an.right,an.top,fn.left-an.right,an.bottom)),an.bottom<fn.top&&be(oe,an.bottom,null,fn.top)}x.appendChild(z)}function Xa(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()||No(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Ds(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,No(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ct(a,"focus",a,y),a.state.focused=!0,ze(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Be&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function No(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ct(a,"blur",a,y),a.state.focused=!1,ht(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Da(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,oe=0;if(!E.hidden){if(me&&Ye<8){var le=E.node.offsetTop+E.node.offsetHeight;re=le-x,x=le}else{var he=E.node.getBoundingClientRect();re=he.bottom-he.top,!z&&E.text.firstChild&&(oe=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var be=E.line.height-re;if((be>.005||be<-.005)&&(Gn(E.line,re),Ls(E.line),E.rest))for(var De=0;De<E.rest.length;De++)Ls(E.rest[De]);if(oe>a.display.sizerWidth){var tt=Math.ceil(oe/Ui(a.display));tt>a.display.maxLineLength&&(a.display.maxLineLength=tt,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ls(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 La(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Kr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,z=Ne(y,b),re=Ne(y,E);if(x&&x.ensure){var oe=x.ensure.from.line,le=x.ensure.to.line;oe<z?(z=oe,re=Ne(y,Mn(at(y,oe))+a.wrapper.clientHeight)):Math.min(le,y.lastLine())>=re&&(z=Ne(y,Mn(at(y,le))-a.wrapper.clientHeight),re=le)}return{from:z,to:Math.max(re,z+1)}}function Zl(a,y){if(!Re(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&&!ft){var z=Ge("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Kr(a.display))+`px;
height: `+(y.bottom-y.top+Mi(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 _l(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?We(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?We(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,oe=wi(a,y),le=!x||x==y?oe:wi(a,x);E={left:Math.min(oe.left,le.left),top:Math.min(oe.top,le.top)-b,right:Math.max(oe.left,le.left),bottom:Math.max(oe.bottom,le.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,De=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(re=!0)),he.scrollLeft!=null&&(ko(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-De)>1&&(re=!0)),!re)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&ko(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ai(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=no(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var oe=a.doc.height+Wi(x),le=y.top<b,he=y.bottom>oe-b;if(y.top<E)re.scrollTop=le?0:y.top;else if(y.bottom>E+z){var be=Math.min(y.top,(he?oe:y.bottom)-z);be!=E&&(re.scrollTop=be)}var De=a.options.fixedGutter?0:x.gutters.offsetWidth,tt=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-De,Qe=qi(a)-x.gutters.offsetWidth,Tt=y.right-y.left>Qe;return Tt&&(y.right=y.left+Qe),y.left<10?re.scrollLeft=0:y.left<tt?re.scrollLeft=Math.max(0,y.left+De-(Tt?0:10)):y.right>Qe+tt-3&&(re.scrollLeft=y.right+(Tt?0:10)-Qe),re}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Ro(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function jl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=lr(a,y.from),b=lr(a,y.to);Ms(a,x,b,y.margin)}}function Ms(a,y,x,b){var E=Qa(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});qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(se||es(a,{top:y}),Ts(a,y,!0),se&&es(a),na(a,100))}function Ts(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 ko(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,Rs(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Wi(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+Mi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=Ge("div",[Ge("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ge("div",[Ge("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),ge(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),ge(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&Ye<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.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}},Eo.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Eo.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Eo.prototype.zeroWidthHack=function(){var a=Le&&!ye?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ce,this.disableVert=new ce},Eo.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)},Eo.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function Io(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;As(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Da(a),As(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function As(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 Ps={native:Eo,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ht(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ps[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),ge(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"?ko(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&ze(a.display.wrapper,a.display.scrollbars.addClass)}var Vl=0;function Do(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:++Vl},ao(a.curOp)}function Lo(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;Ul(x)})}function Ul(a){for(var y=a.ops,x=0;x<y.length;x++)Kl(y[x]);for(var b=0;b<y.length;b++)Yl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var z=0;z<y.length;z++)Jl(y[z]);for(var re=0;re<y.length;re++)Ql(y[re])}function Kl(a){var y=a.cm,x=y.display;$l(y),a.updateMaxLine&&Vn(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 Ta(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&Da(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(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+Mi(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 Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ko(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Ee();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Io(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&Es(a.cm)}function Ql(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Ns(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ts(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ko(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=_l(y,At(b,a.scrollToPos.from),At(b,a.scrollToPos.to),a.scrollToPos.margin);Zl(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var oe=0;oe<z.length;++oe)z[oe].lines.length||Ct(z[oe],"hide");if(re)for(var le=0;le<re.length;++le)re[le].lines.length&&Ct(re[le],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Ct(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Pi(a,y){if(a.curOp)return y();Do(a);try{return y()}finally{Lo(a)}}function oi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Do(a);try{return y.apply(a,arguments)}finally{Lo(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Do(this);try{return a.apply(this,arguments)}finally{Lo(this)}}}function ai(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Do(y);try{return a.apply(this,arguments)}finally{Lo(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,St(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Yn(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,oe=z.text.length>a.options.maxHighlightLength?_n(y.mode,b.state):null,le=xn(a,z,b,!0);oe&&(b.state=oe),z.styles=le.styles;var he=z.styleClasses,be=le.classes;be?z.styleClasses=be:he&&(z.styleClasses=null);for(var De=!re||re.length!=z.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),tt=0;!De&&tt<re.length;++tt)De=re[tt]!=z.styles[tt];De&&E.push(b.line),z.stateAfter=b.save(),b.nextLine()}else z.text.length<=a.options.maxHighlightLength&&dn(a,z.text,b),z.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Pi(a,function(){for(var z=0;z<E.length;z++)ho(a,E[z],"text")})}}var Ta=function(a,y,x){var b=a.display;this.viewport=y,this.visible=La(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=co(a),this.events=[]};Ta.prototype.signal=function(a,y){Rt(a,y)&&this.events.push(arguments)},Ta.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ct.apply(null,this.events[a])};function $l(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Mi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Mi(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ee();if(!y||!je(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&je(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==Ee())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&je(document.body,a.anchorNode)&&je(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 $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(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&&Cs(a)==0)return!1;Is(a)&&(fo(a),y.dims=co(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)),ir&&(z=Vt(a.doc,z),re=Ft(a.doc,re));var oe=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Wl(a,z,re),x.viewOffset=Mn(at(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var le=Cs(a);if(!oe&&le==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return le>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),le>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),$t(x.cursorDiv),$t(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,oe&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Ns(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+Wi(a.display)-no(a),x.top)}),y.visible=La(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=La(a.display,a.doc,x));if(!$a(a,y))break;Da(a);var E=ea(a);Qo(a),Io(a,E),ns(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 es(a,y){var x=new Ta(a,y);if($a(a,x)){Da(a),Ns(a,x);var b=ea(a);Qo(a),Io(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function oe(Tt){var Nt=Tt.nextSibling;return Be&&Le&&a.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),Nt}for(var le=b.view,he=b.viewFrom,be=0;be<le.length;be++){var De=le[be];if(!De.hidden)if(!De.node||De.node.parentNode!=z){var tt=Nn(a,De,he,x);z.insertBefore(tt,re)}else{for(;re!=De.node;)re=oe(re);var Qe=E&&y!=null&&y<=he&&De.lineNumber;De.changes&&(Ve(De.changes,"gutter")>-1&&(Qe=!1),so(a,De,he,x)),Qe&&($t(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(Dt(a.options,he)))),re=De.node.nextSibling}he+=De.size}for(;re;)re=oe(re)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(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+Mi(a)+"px"}function Rs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(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 oe=x[re].alignable;if(oe)for(var le=0;le<oe.length;le++)oe[le].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Is(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Dt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ge("div",[Ge("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",ts(a.display),!0}return!1}function rs(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 Fs(a){var y=a.gutters,x=a.gutterSpecs;$t(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],z=E.className,re=E.style,oe=y.appendChild(Ge("div",null,"CodeMirror-gutter "+z));re&&(oe.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=oe,oe.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Fs(a.display),Ci(a),Rs(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ge("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ge("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=rt("div",null,"CodeMirror-code"),E.selectionDiv=Ge("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ge("div",null,"CodeMirror-cursors"),E.measure=Ge("div",null,"CodeMirror-measure"),E.lineMeasure=Ge("div",null,"CodeMirror-measure"),E.lineSpace=rt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=rt("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ge("div",[z],null,"position: relative"),E.sizer=Ge("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ge("div",null,null,"position: absolute; height: "+wt+"px; width: 1px;"),E.gutters=Ge("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ge("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ge("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&Ye<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Be&&!(se&&Oe)&&(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=rs(b.gutters,b.lineNumbers),Fs(E),x.init(E)}var Aa=0,Ii=null;me?Ii=-.53:se?Ii=15:ke?Ii=-.7:Te&&(Ii=-1/3);function Os(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=Os(a);return y.x*=Ii,y.y*=Ii,y}function Hs(a,y){var x=Os(y),b=x.x,E=x.y,z=a.display,re=z.scroller,oe=re.scrollWidth>re.clientWidth,le=re.scrollHeight>re.clientHeight;if(b&&oe||E&&le){if(E&&Le&&Be){e:for(var he=y.target,be=z.view;he!=re;he=he.parentNode)for(var De=0;De<be.length;De++)if(be[De].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!se&&!de&&Ii!=null){E&&le&&$o(a,Math.max(0,re.scrollTop+E*Ii)),ko(a,Math.max(0,re.scrollLeft+b*Ii)),(!E||E&&le)&&un(y),z.wheelStartX=null;return}if(E&&Ii!=null){var tt=E*Ii,Qe=a.doc.scrollTop,Tt=Qe+z.wrapper.clientHeight;tt<0?Qe=Math.max(0,Qe+tt-50):Tt=Math.min(a.doc.height,Tt+tt+50),es(a,{top:Qe,bottom:Tt})}Aa<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 Nt=re.scrollLeft-z.wheelStartX,Jt=re.scrollTop-z.wheelStartY,an=Jt&&z.wheelDY&&Jt/z.wheelDY||Nt&&z.wheelDX&&Nt/z.wheelDX;z.wheelStartX=z.wheelStartY=null,an&&(Ii=(Ii*Aa+an)/(Aa+1),++Aa)}},200)):(z.wheelDX+=b,z.wheelDY+=E))}}var Fi=function(a,y){this.ranges=a,this.primIndex=y};Fi.prototype.primary=function(){return this.ranges[this.primIndex]},Fi.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(!Xt(x.anchor,b.anchor)||!Xt(x.head,b.head))return!1}return!0},Fi.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new kr(tn(this.ranges[y].anchor),tn(this.ranges[y].head));return new Fi(a,this.primIndex)},Fi.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Fi.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(Lt(y,b.from())>=0&&Lt(a,b.to())<=0)return x}return-1};var kr=function(a,y){this.anchor=a,this.head=y};kr.prototype.from=function(){return _t(this.anchor,this.head)},kr.prototype.to=function(){return hn(this.anchor,this.head)},kr.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(tt,Qe){return Lt(tt.from(),Qe.from())}),x=Ve(y,E);for(var z=1;z<y.length;z++){var re=y[z],oe=y[z-1],le=Lt(oe.to(),re.from());if(b&&!re.empty()?le>0:le>=0){var he=_t(oe.from(),re.from()),be=hn(oe.to(),re.to()),De=oe.empty()?re.from()==re.head:oe.from()==oe.head;z<=x&&--x,y.splice(--z,2,new kr(De?be:he,De?he:be))}}return new Fi(y,x)}function po(a,y){return new Fi([new kr(a,y||a)],0)}function vo(a){return a.text?We(a.from.line+a.text.length-1,ve(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Ws(a,y){if(Lt(a,y.from)<0)return a;if(Lt(a,y.to)<=0)return vo(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+=vo(y).ch-y.to.ch),We(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new kr(Ws(E.anchor,y),Ws(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function zs(a,y,x){return a.line==y.line?We(x.line,a.ch-y.ch+x.ch):We(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=We(a.first,0),z=E,re=0;re<y.length;re++){var oe=y[re],le=zs(oe.from,E,z),he=zs(vo(oe),E,z);if(E=oe.to,z=he,x=="around"){var be=a.sel.ranges[re],De=Lt(be.head,be.anchor)<0;b[re]=new kr(De?he:le,De?le:he)}else b[re]=new kr(le,le)}return new Fi(b,a.sel.primIndex)}function os(a){a.doc.mode=Jn(a.options,a.doc.modeOption),ia(a)}function ia(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,na(a,100),a.state.modeGen++,a.curOp&&Ci(a)}function Zs(a,y){return y.from.ch==0&&y.to.ch==0&&ve(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(fn){return x?x[fn]:null}function z(fn,sn,bn){br(fn,sn,bn,b),Zr(fn,"change",fn,y)}function re(fn,sn){for(var bn=[],An=fn;An<sn;++An)bn.push(new yr(he[An],E(An),b));return bn}var oe=y.from,le=y.to,he=y.text,be=at(a,oe.line),De=at(a,le.line),tt=ve(he),Qe=E(he.length-1),Tt=le.line-oe.line;if(y.full)a.insert(0,re(0,he.length)),a.remove(he.length,a.size-he.length);else if(Zs(a,y)){var Nt=re(0,he.length-1);z(De,De.text,Qe),Tt&&a.remove(oe.line,Tt),Nt.length&&a.insert(oe.line,Nt)}else if(be==De)if(he.length==1)z(be,be.text.slice(0,oe.ch)+tt+be.text.slice(le.ch),Qe);else{var Jt=re(1,he.length-1);Jt.push(new yr(tt+be.text.slice(le.ch),Qe,b)),z(be,be.text.slice(0,oe.ch)+he[0],E(0)),a.insert(oe.line+1,Jt)}else if(he.length==1)z(be,be.text.slice(0,oe.ch)+he[0]+De.text.slice(le.ch),E(0)),a.remove(oe.line+1,Tt);else{z(be,be.text.slice(0,oe.ch)+he[0],E(0)),z(De,tt+De.text.slice(le.ch),Qe);var an=re(1,he.length-1);Tt>1&&a.remove(oe.line+1,Tt-1),a.insert(oe.line+1,an)}Zr(a,"change",a,y)}function mo(a,y,x){function b(E,z,re){if(E.linked)for(var oe=0;oe<E.linked.length;++oe){var le=E.linked[oe];if(le.doc!=z){var he=re&&le.sharedHist;x&&!he||(y(le.doc,he),b(le.doc,E,he))}}}b(a,null,!0)}function _s(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),os(a),Gs(a),a.options.lineWrapping||Vn(a),a.options.mode=y.modeOption,Ci(a)}function Gs(a){(a.doc.direction=="rtl"?ze:ht)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Pi(a,function(){Gs(a),Ci(a)})}function Pa(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 ss(a,y){var x={from:tn(y.from),to:vo(y),text:Qt(a,y.from,y.to)};return Us(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Us(b,x,y.from.line,y.to.line+1)},!0),x}function js(a){for(;a.length;){var y=ve(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return js(a.done),ve(a.done);if(a.done.length&&!ve(a.done).ranges)return ve(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ve(a.done)}function Vs(a,y,x,b){var E=a.history;E.undone.length=0;var z=+new Date,re,oe;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=su(E,E.lastOp==b)))oe=ve(re.changes),Lt(y.from,y.to)==0&&Lt(y.from,oe.to)==0?oe.to=vo(y):re.changes.push(ss(a,y));else{var le=ve(E.done);for((!le||!le.ranges)&&Ba(a.sel,E.done),re={changes:[ss(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,oe||Ct(a,"historyAdded")}function lu(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||lu(a,z,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=ve(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Us(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 hu(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 Ks(a,y){var x=hu(a,y),b=Br(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 oe=0;oe<re.length;++oe){for(var le=re[oe],he=0;he<z.length;++he)if(z[he].marker==le.marker)continue e;z.push(le)}else re&&(x[E]=re)}return x}function Fo(a,y,x){for(var b=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){b.push(x?Fi.prototype.deepCopy.call(z):z);continue}var re=z.changes,oe=[];b.push({changes:oe});for(var le=0;le<re.length;++le){var he=re[le],be=void 0;if(oe.push({from:he.from,to:he.to,text:he.text}),y)for(var De in he)(be=De.match(/^spans_(\d+)$/))&&Ve(y,Number(be[1]))>-1&&(ve(oe)[De]=he[De],delete he[De])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var z=Lt(y,E)<0;z!=Lt(x,E)<0?(E=y,y=x):z!=Lt(y,x)<0&&(y=x)}return new kr(E,y)}else return new kr(x||y,y)}function Na(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(a,new Fi([ls(a.sel.primary(),y,x,E)],0),b)}function Ys(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]=ls(a.sel.ranges[z],y[z],null,E);var re=Ki(a.cm,b,a.sel.primIndex);di(a,re,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,di(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){di(a,po(y,x),b)}function fu(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 kr(At(a,E[z].anchor),At(a,E[z].head))},origin:x&&x.origin};return Ct(a,"beforeSelectionChange",a,b),a.cm&&Ct(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Ki(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=ve(b);E&&E.ranges?(b[b.length-1]=y,Ra(a,y,x)):di(a,y,x)}function di(a,y,x){Ra(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Ra(a,y,x){(Rt(a,"beforeSelectionChange")||a.cm&&Rt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(Lt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Ro(a.cm)}function Qs(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Zt(a.cm)),Zr(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],oe=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],le=Ia(a,re.anchor,oe&&oe.anchor,x,b),he=Ia(a,re.head,oe&&oe.head,x,b);(E||le!=re.anchor||he!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new kr(le,he))}return E?Ki(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var z=at(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var oe=z.markedSpans[re],le=oe.marker,he="selectLeft"in le?!le.selectLeft:le.inclusiveLeft,be="selectRight"in le?!le.selectRight:le.inclusiveRight;if((oe.from==null||(he?oe.from<=y.ch:oe.from<y.ch))&&(oe.to==null||(be?oe.to>=y.ch:oe.to>y.ch))){if(E&&(Ct(le,"beforeCursorEnter"),le.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!le.atomic)continue;if(x){var De=le.find(b<0?1:-1),tt=void 0;if((b<0?be:he)&&(De=el(a,De,-b,De&&De.line==y.line?z:null)),De&&De.line==y.line&&(tt=Lt(De,x))&&(b<0?tt<0:tt>0))return Oo(a,De,y,b,E)}var Qe=le.find(b<0?-1:1);return(b<0?he:be)&&(Qe=el(a,Qe,b,Qe.line==y.line?z:null)),Qe?Oo(a,Qe,y,b,E):null}}return y}function Ia(a,y,x,b,E){var z=b||1,re=Oo(a,y,x,z,E)||!E&&Oo(a,y,x,z,!0)||Oo(a,y,x,-z,E)||!E&&Oo(a,y,x,-z,!0);return re||(a.cantEdit=!0,We(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?At(a,We(y.line-1)):null:x>0&&y.ch==(b||at(a,y.line)).text.length?y.line<a.first+a.size-1?We(y.line+1,0):null:new We(y.line,y.ch+x)}function tl(a){a.setSelection(We(a.firstLine(),0),We(a.lastLine()),we)}function nl(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,oe){E&&(b.from=At(a,E)),z&&(b.to=At(a,z)),re&&(b.text=re),oe!==void 0&&(b.origin=oe)}),Ct(a,"beforeChange",a,b),a.cm&&Ct(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 Ho(a,y,x){if(a.cm){if(!a.cm.curOp)return oi(a.cm,Ho)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=Cr&&!x&&Jr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Lt(y.from,y.to)==0)){var x=is(a,y);Vs(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Br(a,y));var b=[];mo(a,function(E,z){!z&&Ve(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Br(E,y))})}}function Fa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,z,re=a.sel,oe=y=="undo"?E.done:E.undone,le=y=="undo"?E.undone:E.done,he=0;he<oe.length&&(z=oe[he],!(x?z.ranges&&!z.equals(a.sel):!z.ranges));he++);if(he!=oe.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=oe.pop(),z.ranges){if(Ba(z,le),x&&!z.equals(a.sel)){di(a,z,{clearRedo:!1});return}re=z}else if(b){oe.push(z);return}else break;var be=[];Ba(re,le),le.push({changes:be,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var De=Rt(a,"beforeChange")||a.cm&&Rt(a.cm,"beforeChange"),tt=function(Nt){var Jt=z.changes[Nt];if(Jt.origin=y,De&&!nl(a,Jt,!1))return oe.length=0,{};be.push(ss(a,Jt));var an=Nt?is(a,Jt):ve(oe);oa(a,Jt,an,Ks(a,Jt)),!Nt&&a.cm&&a.cm.scrollIntoView({from:Jt.from,to:vo(Jt)});var fn=[];mo(a,function(sn,bn){!bn&&Ve(fn,sn.history)==-1&&(sl(sn.history,Jt),fn.push(sn.history)),oa(sn,Jt,null,Ks(sn,Jt))})},Qe=z.changes.length-1;Qe>=0;--Qe){var Tt=tt(Qe);if(Tt)return Tt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Fi(Me(a.sel.ranges,function(E){return new kr(We(E.anchor.line+y,E.anchor.ch),We(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Ci(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)ho(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return oi(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(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);il(a,E),y={from:We(a.first,0),to:We(y.to.line+E,y.to.ch),text:[ve(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:We(z,at(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Qt(a,y.from,y.to),x||(x=is(a,y)),a.cm?du(a.cm,y,b):as(a,y,b),Ra(a,x,we),a.cantEdit&&Ia(a,We(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,oe=!1,le=z.line;a.options.lineWrapping||(le=Ae(on(at(b,z.line))),b.iter(le,re.line+1,function(Qe){if(Qe==E.maxLine)return oe=!0,!0})),b.sel.contains(y.from,y.to)>-1&&Zt(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(le,z.line+y.text.length,function(Qe){var Tt=sr(Qe);Tt>E.maxLineLength&&(E.maxLine=Qe,E.maxLineLength=Tt,E.maxLineChanged=!0,oe=!1)}),oe&&(a.curOp.updateMaxLine=!0)),Mr(b,z.line),na(a,400);var he=y.text.length-(re.line-z.line)-1;y.full?Ci(a):z.line==re.line&&y.text.length==1&&!Zs(a.doc,y)?ho(a,z.line,"text"):Ci(a,z.line,re.line+1,he);var be=Rt(a,"changes"),De=Rt(a,"change");if(De||be){var tt={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};De&&Zr(a,"change",a,tt),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(tt)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var z;b||(b=x),Lt(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),Ho(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(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 oe=0;oe<z.ranges.length;oe++)ol(z.ranges[oe].anchor,y,x,b),ol(z.ranges[oe].head,y,x,b);continue}for(var le=0;le<z.changes.length;++le){var he=z.changes[le];if(x<he.from.line)he.from=We(he.from.line+b,he.from.ch),he.to=We(he.to.line+b,he.to.ch);else if(y<=he.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,z=y;return typeof y=="number"?z=at(a,qt(a,y)):E=Ae(y),E==null?null:(b(z,E)&&a.cm&&ho(a.cm,E,x),z)}function sa(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}sa.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,Sr(E),Zr(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 la(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}la.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 sa))){var oe=[];this.collapse(oe),this.children=[new sa(oe)],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,oe=re;oe<E.lines.length;){var le=new sa(E.lines.slice(oe,oe+=25));E.height-=le.height,this.children.splice(++b,0,le),le.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 la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=Ve(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(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 ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Ae(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);Gn(x,Math.max(0,x.height-z)),a&&(Pi(a,function(){ll(a,x,-z),ho(a,b,"widget")}),Zr(a,"lineWidgetCleared",a,this,b))}},ua.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&&(rn(this.doc,b)||Gn(b,b.height+E),x&&Pi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Zr(x,"lineWidgetChanged",x,a,Ae(b))}))},It(ua);function ll(a,y,x){Mn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),aa(a,y,"widget",function(re){var oe=re.widgets||(re.widgets=[]);if(E.insertAt==null?oe.push(E):oe.splice(Math.min(oe.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!rn(a,re)){var le=Mn(re)<a.scrollTop;Gn(re,re.height+gi(E)),le&&qa(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Zr(z,"lineWidgetAdded",z,E,typeof y=="number"?y:Ae(y)),E}var ul=0,go=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};go.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Do(a),Rt(this,"clear")){var x=this.find();x&&Zr(this,"clear",x.from,x.to)}for(var b=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],oe=Er(re.markedSpans,this);a&&!this.collapsed?ho(a,Ae(re),"text"):a&&(oe.to!=null&&(E=Ae(re)),oe.from!=null&&(b=Ae(re))),re.markedSpans=Tr(re.markedSpans,oe),oe.from==null&&this.collapsed&&!rn(this.doc,re)&&a&&Gn(re,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var le=0;le<this.lines.length;++le){var he=on(this.lines[le]),be=sr(he);be>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Ci(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&Zr(a,"markerCleared",a,this,b,E),y&&Lo(a),this.parent&&this.parent.clear()}},go.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=Er(z.markedSpans,this);if(re.from!=null&&(x=We(y?z:Ae(z),re.from),a==-1))return x;if(re.to!=null&&(b=We(y?z:Ae(z),re.to),a==1))return b}return x&&{from:x,to:b}},go.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Pi(b,function(){var E=y.line,z=Ae(y.line),re=$i(b,z);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!rn(x.doc,E)&&x.height!=null){var oe=x.height;x.height=null;var le=gi(x)-oe;le&&Gn(E,E.height+le)}Zr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Ve(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(Ve(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},It(go);function zo(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return oi(a.cm,zo)(a,y,x,b,E);var z=new go(a,E),re=Lt(y,x);if(b&&dt(b,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=rt("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(yn(a,y.line,y,x,z)||y.line!=x.line&&yn(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");gr()}z.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var oe=y.line,le=a.cm,he;if(a.iter(oe,x.line+1,function(De){le&&z.collapsed&&!le.options.lineWrapping&&on(De)==le.display.maxLine&&(he=!0),z.collapsed&&oe!=y.line&&Gn(De,0),pr(De,new or(z,oe==y.line?y.ch:null,oe==x.line?x.ch:null)),++oe}),z.collapsed&&a.iter(y.line,x.line+1,function(De){rn(a,De)&&Gn(De,0)}),z.clearOnEnter&&ge(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(Rr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++ul,z.atomic=!0),le){if(he&&(le.curOp.updateMaxLine=!0),z.collapsed)Ci(le,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var be=y.line;be<=x.line;be++)ho(le,be,"text");z.atomic&&qs(le.doc),Zr(le,"markerAdded",le,z)}return z}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Zr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},It(ca);function vu(a,y,x,b,E){b=dt(b),b.shared=!1;var z=[zo(a,y,x,b,E)],re=z[0],oe=b.widgetNode;return mo(a,function(le){oe&&(b.widgetNode=oe.cloneNode(!0)),z.push(zo(le,At(le,y),At(le,x),b,E));for(var he=0;he<le.linked.length;++he)if(le.linked[he].isParent)return;re=ve(z)}),new ca(z,re)}function cl(a){return a.findMarks(We(a.first,0),a.clipPos(We(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(Lt(z,re)){var oe=zo(a,z,re,b.primary,b.primary.type);b.markers.push(oe),oe.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],z=[E.primary.doc];mo(E.primary.doc,function(le){return z.push(le)});for(var re=0;re<E.markers.length;re++){var oe=E.markers[re];Ve(z,oe.doc)==-1&&(oe.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),la.call(this,[new sa([new yr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var z=We(x,0);this.sel=po(z),this.history=new Pa(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)),as(this,{from:z,to:z,text:a}),di(this,po(z),we)};Si.prototype=He(la.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=Cn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ai(function(a){var y=We(this.first,0),x=this.first+this.size-1;Ho(this,{from:y,to:We(x,at(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),di(this,po(y),we)}),replaceRange:function(a,y,x,b){y=At(this,y),x=x?At(this,x):y,Wo(this,a,y,x,b)},getRange:function(a,y,x){var b=Qt(this,At(this,a),At(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(Bt(this,a))return at(this,a)},getLineNumber:function(a){return Ae(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=at(this,a)),on(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return At(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:ai(function(a,y,x){Xs(this,At(this,typeof a=="number"?We(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xs(this,At(this,a),At(this,y||a),x)}),extendSelection:ai(function(a,y,x){Na(this,At(this,a),y&&At(this,y),x)}),extendSelections:ai(function(a,y){Ys(this,en(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Me(this.sel.ranges,a);Ys(this,en(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new kr(At(this,a[E].anchor),At(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),di(this,Ki(this.cm,b,y),x)}}),addSelection:ai(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new kr(At(this,a),At(this,y||a))),di(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=Qt(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=Qt(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:ai(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 oe=y&&y!="end"&&ou(this,b,y),le=b.length-1;le>=0;le--)Ho(this,b[le]);oe?Js(this,oe):this.cm&&Ro(this.cm)}),undo:ai(function(){Fa(this,"undo")}),redo:ai(function(){Fa(this,"redo")}),undoSelection:ai(function(){Fa(this,"undo",!0)}),redoSelection:ai(function(){Fa(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 Pa(this.history.maxGeneration),mo(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:Fo(this.history.done),undone:Fo(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=Fo(a.done.slice(0),null,!0),y.undone=Fo(a.undone.slice(0),null,!0)},setGutterMarker:ai(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&Ke(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ai(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,Ke(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Bt(this,a)||(y=a,a=at(this,a),!a))return null}else if(y=Ae(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:ai(function(a,y,x){return aa(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(mt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ai(function(a,y,x){return aa(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(mt(x));if(!re)return!1;var oe=re.index+re[0].length;b[E]=z.slice(0,re.index)+(!re.index||oe==z.length?"":" ")+z.slice(oe)||null}else return!1;return!0})}),addLineWidget:ai(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return zo(this,At(this,a),At(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=At(this,a),zo(this,a,a,x,"bookmark")},findMarksAt:function(a){a=At(this,a);var y=[],x=at(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=At(this,a),y=At(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 oe=0;oe<re.length;oe++){var le=re[oe];!(le.to!=null&&E==a.line&&a.ch>=le.to||le.from==null&&E!=a.line||le.from!=null&&E==y.line&&le.from>=y.ch)&&(!x||x(le.marker))&&b.push(le.marker.parent||le.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}),At(this,We(x,y))},indexFromPos:function(a){a=At(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(Cn(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(Cn(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,cl(this)),b},unlinkDoc:function(a){if(a instanceof Gr&&(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(cl(this));break}}if(a.history==this.history){var b=[a.id];mo(a,function(E){return b.push(E.id)},!0),a.history=new Pa(null),a.history.done=Fo(this.history.done,b),a.history.undone=Fo(this.history.undone,b)}},iterLinkedDocs:function(a){mo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):rr(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ai(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&au(this.cm))})}),Si.prototype.eachLine=Si.prototype.iter;var hl=0;function bu(a){var y=this;if(fl(y),!(Re(y,a)||ui(y.display,a))){un(a),me&&(hl=+new Date);var x=Co(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,oe=function(){++re==E&&oi(y,function(){x=At(y.doc,x);var Qe={from:x,to:x,text:y.doc.splitLines(z.filter(function(Tt){return Tt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Ho(y.doc,Qe),Js(y.doc,po(At(y.doc,x),At(y.doc,vo(Qe))))})()},le=function(Qe,Tt){if(y.options.allowDropFileTypes&&Ve(y.options.allowDropFileTypes,Qe.type)==-1){oe();return}var Nt=new FileReader;Nt.onerror=function(){return oe()},Nt.onload=function(){var Jt=Nt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Jt)){oe();return}z[Tt]=Jt,oe()},Nt.readAsText(Qe)},he=0;he<b.length;he++)le(b[he],he);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 be=a.dataTransfer.getData("Text");if(be){var De;if(y.state.draggingText&&!y.state.draggingText.copy&&(De=y.listSelections()),Ra(y.doc,po(x,x)),De)for(var tt=0;tt<De.length;++tt)Wo(y.doc,"",De[tt].anchor,De[tt].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(Qe){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-hl<100)){wn(y);return}if(!(Re(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Te)){var x=Ge("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 wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();ks(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ge("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Se(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function dl(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 pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;ge(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,dl(ku)},100))}),ge(window,"blur",function(){return dl(No)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var yo={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"},ha=0;ha<10;ha++)yo[ha+48]=yo[ha+96]=String(ha);for(var Oa=65;Oa<=90;Oa++)yo[Oa]=String.fromCharCode(Oa);for(var fa=1;fa<=12;fa++)yo[fa+111]=yo[fa+63235]="F"+fa;var io={};io.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"},io.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"},io.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"},io.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"]},io.default=Le?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,z,re=0;re<y.length-1;re++){var oe=y[re];if(/^(cmd|meta|m)$/i.test(oe))z=!0;else if(/^a(lt)?$/i.test(oe))x=!0;else if(/^(c|ctrl|control)$/i.test(oe))b=!0;else if(/^s(hift)?$/i.test(oe))E=!0;else throw new Error("Unrecognized modifier name: "+oe)}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=Me(x.split(" "),Eu),z=0;z<E.length;z++){var re=void 0,oe=void 0;z==E.length-1?(oe=E.join(" "),re=b):(oe=E.slice(0,z+1).join(" "),re="...");var le=y[oe];if(!le)y[oe]=re;else if(le!=re)throw new Error("Inconsistent bindings for "+oe)}delete a[x]}for(var he in y)a[he]=y[he];return a}function Zo(a,y,x,b){y=Ha(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 Zo(a,y.fallthrough,x,b);for(var z=0;z<y.fallthrough.length;z++){var re=Zo(a,y.fallthrough[z],x,b);if(re)return re}}}function vl(a){var y=typeof a=="string"?a:yo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ml(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(yt?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(yt?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(de&&a.keyCode==34&&a.char)return!1;var x=yo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ml(x,a,y))}function Ha(a){return typeof a=="string"?io[a]:a}function _o(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var z=y(x[E]);b.length&&Lt(z.from,ve(b).to)<=0;){var re=b.pop();if(Lt(re.from,z.from)<0){z.from=re.from;break}}b.push(z)}Pi(a,function(){for(var oe=b.length-1;oe>=0;oe--)Wo(a.doc,"",b[oe].from,b[oe].to,"+delete");Ro(a)})}function cs(a,y,x){var b=Yt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function hs(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new We(y.line,b,x<0?"after":"before")}function fs(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?ve(z):z[0],oe=E<0==(re.level==1),le=oe?"after":"before",he;if(re.level>0||y.doc.direction=="rtl"){var be=uo(y,x);he=E<0?x.text.length-1:0;var De=zi(y,be,he).top;he=Wt(function(tt){return zi(y,be,tt).top==De},E<0==(re.level==1)?re.from:re.to-1,he),le=="before"&&(he=cs(x,he,1))}else he=E<0?re.to:re.from;return new We(b,he,le)}}return new We(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=ue(y,a.doc.direction);if(!E)return hs(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 hs(y,x,b);var oe=function(an,fn){return cs(y,an instanceof We?an.ch:an,fn)},le,he=function(an){return a.options.lineWrapping?(le=le||uo(a,y),Yr(a,y,le,an)):{begin:0,end:y.text.length}},be=he(x.sticky=="before"?oe(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var De=re.level==1==b<0,tt=oe(x,De?1:-1);if(tt!=null&&(De?tt<=re.to&&tt<=be.end:tt>=re.from&&tt>=be.begin)){var Qe=De?"before":"after";return new We(x.line,tt,Qe)}}var Tt=function(an,fn,sn){for(var bn=function(Fr,si){return si?new We(x.line,oe(Fr,1),"before"):new We(x.line,Fr,"after")};an>=0&&an<E.length;an+=fn){var An=E[an],Sn=fn>0==(An.level!=1),Un=Sn?sn.begin:oe(sn.end,-1);if(An.from<=Un&&Un<An.to||(Un=Sn?An.from:oe(An.to,-1),sn.begin<=Un&&Un<sn.end))return bn(Un,Sn)}},Nt=Tt(z+b,b,be);if(Nt)return Nt;var Jt=b>0?be.end:oe(be.begin,-1);return Jt!=null&&!(b>0&&Jt==y.text.length)&&(Nt=Tt(b>0?0:E.length-1,b,he(Jt)),Nt)?Nt:null}var da={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),we)},killLine:function(a){return _o(a,function(y){if(y.empty()){var x=at(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:We(y.head.line+1,0)}:{from:y.head,to:We(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return _o(a,function(y){return{from:We(y.from().line,0),to:At(a.doc,We(y.to().line+1,0))}})},delLineLeft:function(a){return _o(a,function(y){return{from:We(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return _o(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 _o(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(We(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(We(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Mu(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")},Ze)},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")},Ze)},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/)?bl(a,y.head):b},Ze)},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=pe(a.getLine(z.line),z.ch,b);y.push(Ce(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Pi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,z=at(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new We(E.line,E.ch-1)),E.ch>0)E=new We(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),We(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=at(a.doc,E.line-1).text;re&&(E=new We(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),We(E.line-1,re.length-1),E,"+transpose"))}}x.push(new kr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Pi(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);Ro(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=at(a.doc,y),b=on(x);return b!=x&&(y=Ae(b)),fs(!0,a,b,y,1)}function Mu(a,y){var x=at(a.doc,y),b=Dn(x);return b!=x&&(y=Ae(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=at(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 We(x.line,re?0:z,x.sticky)}return x}function Wa(a,y,x){if(typeof y=="string"&&(y=da[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)!=lt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Tu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Zo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Zo(y,a.options.extraKeys,x,a)||Zo(y,a.options.keyMap,x,a)}var Au=new ce;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Au.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Tu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Zr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(un(x),Xa(a)),!!E}function wl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Wa(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Wa(a,b)}):pa(a,x,y,function(b){return Wa(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Wa(a,b,!0)})}var ds=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ee(),!Re(y,a))){me&&Ye<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);de&&(ds=b?x:null,!b&&x==88&&!Bn&&(Le?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),se&&!Le&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Bu(y)}}function Bu(a){var y=a.display.lineDiv;ze(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(ht(y,"CodeMirror-crosshair"),pt(document,"keyup",x),pt(document,"mouseover",x))}ge(document,"keyup",x),ge(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),Re(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||Re(y,a)||a.ctrlKey&&!a.altKey||Le&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(de&&x==ds){ds=null,un(a);return}if(!(de&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Nu=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Nu>a&&Lt(y,this.pos)==0&&x==this.button};var va,ma;function Ru(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new ps(x,a,y),va=null,"double"):(va=new ps(x,a,y),ma=null,"single")}function El(a){var y=this,x=y.display;if(!(Re(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Be||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Zn(a),z=b?Ru(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,z,a))&&(E==1?b?Ou(y,b,z,a):$n(a)==x.scroller&&un(a):E==2?(b&&Na(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(vt?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(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,pa(a,ml(z,E),E,function(re){if(typeof re=="string"&&(re=da[re]),!re)return!1;var oe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),oe=re(a,x)!=lt}finally{a.state.suppressEdits=!1}return oe})}function Fu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var z=st?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=Le?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Le?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout(St(Es,a),0):a.curOp.focus=Ee();var E=Fu(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&mr&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(Lt((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(Lt(re.to(),y)>0||y.xRel<0)?Hu(a,b,y,E):Wu(a,b,y,E)}function Hu(a,y,x,b){var E=a.display,z=!1,re=oi(a,function(he){Be&&(E.scroller.draggable=!1),a.state.draggingText=!1,pt(E.wrapper.ownerDocument,"mouseup",re),pt(E.wrapper.ownerDocument,"mousemove",oe),pt(E.scroller,"dragstart",le),pt(E.scroller,"drop",re),z||(un(he),b.addNew||Na(a.doc,x,null,null,b.extend),Be&&!Te||me&&Ye==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),oe=function(he){z=z||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},le=function(){return z=!0};Be&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),ge(E.wrapper.ownerDocument,"mouseup",re),ge(E.wrapper.ownerDocument,"mousemove",oe),ge(E.scroller,"dragstart",le),ge(E.scroller,"drop",re),Ds(a),setTimeout(function(){return E.input.focus()},20)}function Dl(a,y,x){if(x=="char")return new kr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new kr(We(y.line,0),At(a.doc,We(y.line+1,0)));var b=x(a,y);return new kr(b.from,b.to)}function Wu(a,y,x,b){var E=a.display,z=a.doc;un(y);var re,oe,le=z.sel,he=le.ranges;if(b.addNew&&!b.extend?(oe=z.sel.contains(x),oe>-1?re=he[oe]:re=new kr(x,x)):(re=z.sel.primary(),oe=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new kr(x,x)),x=Co(a,y,!0,!0),oe=-1;else{var be=Dl(a,x,b.unit);b.extend?re=ls(re,be.anchor,be.head,b.extend):re=be}b.addNew?oe==-1?(oe=he.length,di(z,Ki(a,he.concat([re]),oe),{scroll:!1,origin:"*mouse"})):he.length>1&&he[oe].empty()&&b.unit=="char"&&!b.extend?(di(z,Ki(a,he.slice(0,oe).concat(he.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),le=z.sel):us(z,oe,re,Xe):(oe=0,di(z,new Fi([re],0),Xe),le=z.sel);var De=x;function tt(sn){if(Lt(De,sn)!=0)if(De=sn,b.unit=="rectangle"){for(var bn=[],An=a.options.tabSize,Sn=pe(at(z,x.line).text,x.ch,An),Un=pe(at(z,sn.line).text,sn.ch,An),Fr=Math.min(Sn,Un),si=Math.max(Sn,Un),jr=Math.min(x.line,sn.line),Bi=Math.min(a.lastLine(),Math.max(x.line,sn.line));jr<=Bi;jr++){var ki=at(z,jr).text,qr=Mt(ki,Fr,An);Fr==si?bn.push(new kr(We(jr,qr),We(jr,qr))):ki.length>qr&&bn.push(new kr(We(jr,qr),We(jr,Mt(ki,si,An))))}bn.length||bn.push(new kr(x,x)),di(z,Ki(a,le.ranges.slice(0,oe).concat(bn),oe),{origin:"*mouse",scroll:!1}),a.scrollIntoView(sn)}else{var Ei=re,hi=Dl(a,sn,b.unit),ri=Ei.anchor,$r;Lt(hi.anchor,ri)>0?($r=hi.head,ri=_t(Ei.from(),hi.anchor)):($r=hi.anchor,ri=hn(Ei.to(),hi.head));var Ur=le.ranges.slice(0);Ur[oe]=zu(a,new kr(At(z,ri),$r)),di(z,Ki(a,Ur,oe),Xe)}}var Qe=E.wrapper.getBoundingClientRect(),Tt=0;function Nt(sn){var bn=++Tt,An=Co(a,sn,!0,b.unit=="rectangle");if(An)if(Lt(An,De)!=0){a.curOp.focus=Ee(),tt(An);var Sn=La(E,z);(An.line>=Sn.to||An.line<Sn.from)&&setTimeout(oi(a,function(){Tt==bn&&Nt(sn)}),150)}else{var Un=sn.clientY<Qe.top?-20:sn.clientY>Qe.bottom?20:0;Un&&setTimeout(oi(a,function(){Tt==bn&&(E.scroller.scrollTop+=Un,Nt(sn))}),50)}}function Jt(sn){a.state.selectingText=!1,Tt=1/0,sn&&(un(sn),E.input.focus()),pt(E.wrapper.ownerDocument,"mousemove",an),pt(E.wrapper.ownerDocument,"mouseup",fn),z.history.lastSelOrigin=null}var an=oi(a,function(sn){sn.buttons===0||!Zn(sn)?Jt(sn):Nt(sn)}),fn=oi(a,Jt);a.state.selectingText=fn,ge(E.wrapper.ownerDocument,"mousemove",an),ge(E.wrapper.ownerDocument,"mouseup",fn)}function zu(a,y){var x=y.anchor,b=y.head,E=at(a.doc,x.line);if(Lt(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),oe=z[re];if(oe.from!=x.ch&&oe.to!=x.ch)return y;var le=re+(oe.from==x.ch==(oe.level!=1)?0:1);if(le==0||le==z.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=ee(z,b.ch,b.sticky),De=be-re||(b.ch-x.ch)*(oe.level==1?-1:1);be==le-1||be==le?he=De<0:he=De>0}var tt=z[le+(he?-1:0)],Qe=he==(tt.level==1),Tt=Qe?tt.from:tt.to,Nt=Qe?"after":"before";return x.ch==Tt&&x.sticky==Nt?y:new kr(new We(x.line,Tt,Nt),b)}function Ll(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(tt){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&un(y);var re=a.display,oe=re.lineDiv.getBoundingClientRect();if(z>oe.bottom||!Rt(a,x))return cn(y);z-=oe.top-re.viewOffset;for(var le=0;le<a.display.gutterSpecs.length;++le){var he=re.gutters.childNodes[le];if(he&&he.getBoundingClientRect().right>=E){var be=Ne(a.doc,z),De=a.display.gutterSpecs[le];return Ct(a,x,a,be,De.className,y),cn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||Zu(a,y)||Re(a,y,"contextmenu")||vt||a.display.input.onContextMenu(y)}function Zu(a,y){return Rt(a,"gutterContextMenu")?Ll(a,y,"gutterContextMenu",!1):!1}function Tl(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wo(a)}var Go={toString:function(){return"CodeMirror.Init"}},Al={},za={};function _u(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(oe,le,he){he!=Go&&z(oe,le,he)}:z)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),wo(b),Ci(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var z=[],re=b.doc.first;b.doc.iter(function(le){for(var he=0;;){var be=le.text.indexOf(E,he);if(be==-1)break;he=be+E.length,z.push(We(re,be))}re++});for(var oe=z.length-1;oe>=0;oe--)Wo(b.doc,E,z[oe],We(z[oe].line,z[oe].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!=Go&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Oe?"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",!ut),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ra(b)},!0),x("keyMap","default",function(b,E,z){var re=Ha(E),oe=z!=Go&&Ha(z);oe&&oe.detach&&oe.detach(b,re),re.attach&&re.attach(b,oe||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Io(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Io(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=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(No(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,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!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,ia,!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!=Go;if(!y!=!b){var E=a.display.dragFunctions,z=y?ge:pt;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 ju(a){a.options.lineWrapping?(ze(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ht(a.display.wrapper,"CodeMirror-wrap"),Vn(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Io(a)},100)}function Gr(a,y){var x=this;if(!(this instanceof Gr))return new Gr(a,y);this.options=y=y?dt(y):{},dt(Al,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 Gr.inputStyles[y.inputStyle](this),z=this.display=new ru(a,b,E,y);z.wrapper.CodeMirror=this,Tl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ce,keySeq:null,specialChars:null},y.autofocus&&!Oe&&z.input.focus(),me&&Ye<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,_s(this,b),y.autofocus&&!Oe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):No(this);for(var re in za)za.hasOwnProperty(re)&&za[re](this,y[re],Go);Is(this),y.finishInit&&y.finishInit(this);for(var oe=0;oe<ms.length;++oe)ms[oe](this);Lo(this),Be&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}Gr.defaults=Al,Gr.optionHandlers=za;function Vu(a){var y=a.display;ge(y.scroller,"mousedown",oi(a,El)),me&&Ye<11?ge(y.scroller,"dblclick",oi(a,function(le){if(!Re(a,le)){var he=Co(a,le);if(!(!he||vs(a,le)||ui(a.display,le))){un(le);var be=a.findWordAt(he);Na(a.doc,be.anchor,be.head)}}})):ge(y.scroller,"dblclick",function(le){return Re(a,le)||un(le)}),ge(y.scroller,"contextmenu",function(le){return Ml(a,le)}),ge(y.input.getField(),"contextmenu",function(le){y.scroller.contains(le.target)||Ml(a,le)});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(le){if(le.touches.length!=1)return!1;var he=le.touches[0];return he.radiusX<=1&&he.radiusY<=1}function re(le,he){if(he.left==null)return!0;var be=he.left-le.left,De=he.top-le.top;return be*be+De*De>20*20}ge(y.scroller,"touchstart",function(le){if(!Re(a,le)&&!z(le)&&!vs(a,le)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},le.touches.length==1&&(y.activeTouch.left=le.touches[0].pageX,y.activeTouch.top=le.touches[0].pageY)}}),ge(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ge(y.scroller,"touchend",function(le){var he=y.activeTouch;if(he&&!ui(y,le)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),De;!he.prev||re(he,he.prev)?De=new kr(be,be):!he.prev.prev||re(he,he.prev.prev)?De=a.findWordAt(be):De=new kr(We(be.line,0),At(a.doc,We(be.line+1,0))),a.setSelection(De.anchor,De.head),a.focus(),un(le)}E()}),ge(y.scroller,"touchcancel",E),ge(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Ct(a,"scroll",a))}),ge(y.scroller,"mousewheel",function(le){return Hs(a,le)}),ge(y.scroller,"DOMMouseScroll",function(le){return Hs(a,le)}),ge(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(le){Re(a,le)||wn(le)},over:function(le){Re(a,le)||(wu(a,le),wn(le))},start:function(le){return xu(a,le)},drop:oi(a,bu),leave:function(le){Re(a,le)||fl(a)}};var oe=y.input.getField();ge(oe,"keyup",function(le){return Sl.call(a,le)}),ge(oe,"keydown",oi(a,Cl)),ge(oe,"keypress",oi(a,kl)),ge(oe,"focus",function(le){return Ja(a,le)}),ge(oe,"blur",function(le){return No(a,le)})}var ms=[];Gr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=Yn(a,y).state:x="prev");var re=a.options.tabSize,oe=at(E,y),le=pe(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var he=oe.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(oe.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(z,oe.text.slice(he.length),oe.text),be==lt||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe(at(E,y-1).text,null,re):be=0:x=="add"?be=le+a.options.indentUnit:x=="subtract"?be=le-a.options.indentUnit:typeof x=="number"&&(be=le+x),be=Math.max(0,be);var De="",tt=0;if(a.options.indentWithTabs)for(var Qe=Math.floor(be/re);Qe;--Qe)tt+=re,De+=" ";if(tt<be&&(De+=Ce(be-tt)),De!=he)return Wo(E,De,We(y,0),We(y,he.length),"+input"),oe.stateAfter=null,!0;for(var Tt=0;Tt<E.sel.ranges.length;Tt++){var Nt=E.sel.ranges[Tt];if(Nt.head.line==y&&Nt.head.ch<he.length){var Jt=We(y,he.length);us(E,Tt,new kr(Jt,Jt));break}}}var Yi=null;function Za(a){Yi=a}function gs(a,y,x,b,E){var z=a.doc;a.display.shift=!1,b||(b=z.sel);var re=+new Date-200,oe=E=="paste"||a.state.pasteIncoming>re,le=rr(y),he=null;if(oe&&b.ranges.length>1)if(Yi&&Yi.text.join(`
`)==y){if(b.ranges.length%Yi.text.length==0){he=[];for(var be=0;be<Yi.text.length;be++)he.push(z.splitLines(Yi.text[be]))}}else le.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Me(le,function(an){return[an]}));for(var De=a.curOp.updateInput,tt=b.ranges.length-1;tt>=0;tt--){var Qe=b.ranges[tt],Tt=Qe.from(),Nt=Qe.to();Qe.empty()&&(x&&x>0?Tt=We(Tt.line,Tt.ch-x):a.state.overwrite&&!oe?Nt=We(Nt.line,Math.min(at(z,Nt.line).text.length,Nt.ch+ve(le).length)):oe&&Yi&&Yi.lineWise&&Yi.text.join(`
`)==le.join(`
`)&&(Tt=Nt=We(Tt.line,0)));var Jt={from:Tt,to:Nt,text:he?he[tt%he.length]:le,origin:E||(oe?"paste":a.state.cutIncoming>re?"cut":"+input")};Ho(a.doc,Jt),Zr(a,"inputRead",a,Jt)}y&&!oe&&Bl(a,y),Ro(a),a.curOp.updateInput<2&&(a.curOp.updateInput=De),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Pi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Bl(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 oe=0;oe<z.electricChars.length;oe++)if(y.indexOf(z.electricChars.charAt(oe))>-1){re=ga(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(at(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Zr(a,"electricInput",a,E.head.line)}}}function Nl(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:We(E,0),head:We(E+1,0)};x.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:x}}function Rl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Il(){var a=Ge("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ge("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Be?a.style.width="1000px":a.setAttribute("wrap","off"),Ue&&(a.style.border="1px solid black"),Rl(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)&&oi(this,y[b])(this,E,re),Ct(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"](Ha(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.");$e(this.state.overlays,{mode:z,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Ci(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++,Ci(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"),Bt(this.doc,b)&&ga(this,b,E,z)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var oe=E[re];if(oe.empty())oe.head.line>z&&(ga(this,oe.head.line,b,!0),z=oe.head.line,re==this.doc.sel.primIndex&&Ro(this));else{var le=oe.from(),he=oe.to(),be=Math.max(z,le.line);z=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var De=be;De<z;++De)ga(this,De,b);var tt=this.doc.sel.ranges;le.ch==0&&E.length==tt.length&&tt[re].from().ch>0&&us(this.doc,re,new kr(le,tt[re].to()),we)}}}),getTokenAt:function(b,E){return Wn(this,b,E)},getLineTokens:function(b,E){return Wn(this,We(b),E,!0)},getTokenTypeAt:function(b){b=At(this.doc,b);var E=Hn(this,at(this.doc,b.line)),z=0,re=(E.length-1)/2,oe=b.ch,le;if(oe==0)le=E[2];else for(;;){var he=z+re>>1;if((he?E[he*2-1]:0)>=oe)re=he;else if(E[he*2+1]<oe)z=he+1;else{le=E[he*2+2];break}}var be=le?le.indexOf("overlay "):-1;return be<0?le:be==0?null:le.slice(0,be-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],oe=this.getModeAt(b);if(typeof oe[E]=="string")re[oe[E]]&&z.push(re[oe[E]]);else if(oe[E])for(var le=0;le<oe[E].length;le++){var he=re[oe[E][le]];he&&z.push(he)}else oe.helperType&&re[oe.helperType]?z.push(re[oe.helperType]):re[oe.name]&&z.push(re[oe.name]);for(var be=0;be<re._global.length;be++){var De=re._global[be];De.pred(oe,this)&&Ve(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),Yn(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=At(this.doc,b):z=b?re.from():re.to(),wi(this,z,E||"page")},charCoords:function(b,E){return Bo(this,At(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ci(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Ne(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,z){var re=!1,oe;if(typeof b=="number"){var le=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>le&&(b=le,re=!0),oe=at(this.doc,b)}else oe=b;return Po(this,oe,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-Mn(oe):0)},defaultTextHeight:function(){return Ai(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,oe){var le=this.display;b=wi(this,At(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),le.sizer.appendChild(E),re=="over")he=b.top;else if(re=="above"||re=="near"){var De=Math.max(le.wrapper.clientHeight,this.doc.height),tt=Math.max(le.sizer.clientWidth,le.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>De)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=De&&(he=b.bottom),be+E.offsetWidth>tt&&(be=tt-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",oe=="right"?(be=le.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(oe=="left"?be=0:oe=="middle"&&(be=(le.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),z&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(da.hasOwnProperty(b))return da[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,z,re){var oe=1;E<0&&(oe=-1,E=-E);for(var le=At(this.doc,b),he=0;he<E&&(le=ys(this.doc,le,oe,z,re),!le.hitSide);++he);return le},moveH:yi(function(b,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?ys(z.doc,re.head,b,E,z.options.rtlMoveVisually):b<0?re.from():re.to()},Ze)}),deleteH:yi(function(b,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):_o(this,function(oe){var le=ys(re,oe.head,b,E,!1);return b<0?{from:le,to:oe.head}:{from:oe.head,to:le}})}),findPosV:function(b,E,z,re){var oe=1,le=re;E<0&&(oe=-1,E=-E);for(var he=At(this.doc,b),be=0;be<E;++be){var De=wi(this,he,"div");if(le==null?le=De.left:De.left=le,he=Fl(this,De,oe,z),he.hitSide)break}return he},moveV:yi(function(b,E){var z=this,re=this.doc,oe=[],le=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(be){if(le)return b<0?be.from():be.to();var De=wi(z,be.head,"div");be.goalColumn!=null&&(De.left=be.goalColumn),oe.push(De.left);var tt=Fl(z,De,b,E);return E=="page"&&be==re.sel.primary()&&qa(z,Bo(z,tt,"div").top-De.top),tt},Ze),oe.length)for(var he=0;he<re.sel.ranges.length;he++)re.sel.ranges[he].goalColumn=oe[he]}),findWordAt:function(b){var E=this.doc,z=at(E,b.line).text,re=b.ch,oe=b.ch;if(z){var le=this.getHelper(b,"wordChars");(b.sticky=="before"||oe==z.length)&&re?--re:++oe;for(var he=z.charAt(re),be=nt(he,le)?function(De){return nt(De,le)}:/\s/.test(he)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!nt(De)};re>0&&be(z.charAt(re-1));)--re;for(;oe<z.length&&be(z.charAt(oe));)++oe}return new kr(We(b.line,re),We(b.line,oe))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ze(this.display.cursorDiv,"CodeMirror-overwrite"):ht(this.display.cursorDiv,"CodeMirror-overwrite"),Ct(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Mi(this)-this.display.barHeight,width:b.scrollWidth-Mi(this)-this.display.barWidth,clientHeight:no(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:We(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?jl(this,b):Ms(this,b.from,b.to,b.margin)}),setSize:yi(function(b,E){var z=this,re=function(le){return typeof le=="number"||/^\d+$/.test(String(le))?le+"px":le};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(le){if(le.widgets){for(var he=0;he<le.widgets.length;he++)if(le.widgets[he].noHScroll){ho(z,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,Ct(this,"refresh",this)}),operation:function(b){return Pi(this,b)},startOperation:function(){return Do(this)},endOperation:function(){return Lo(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;Ci(this),this.curOp.forceUpdate=!0,wo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Ai(this.display))>.5||this.options.lineWrapping)&&Ya(this),Ct(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),_s(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Zr(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}},It(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 ys(a,y,x,b,E){var z=y,re=x,oe=at(a,y.line),le=E&&a.direction=="rtl"?-x:x;function he(){var fn=y.line+le;return fn<a.first||fn>=a.first+a.size?!1:(y=new We(fn,y.ch,y.sticky),oe=at(a,fn))}function be(fn){var sn;if(b=="codepoint"){var bn=oe.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(bn)?sn=null:sn=new We(y.line,Math.max(0,Math.min(oe.text.length,y.ch+x*(bn>=55296&&bn<56320?2:1))),-x)}else E?sn=Lu(a.cm,oe,y,x):sn=hs(oe,y,x);if(sn==null)if(!fn&&he())y=fs(E,a.cm,oe,y.line,le);else return!1;else y=sn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var De=null,tt=b=="group",Qe=a.cm&&a.cm.getHelper(y,"wordChars"),Tt=!0;!(x<0&&!be(!Tt));Tt=!1){var Nt=oe.text.charAt(y.ch)||`
`,Jt=nt(Nt,Qe)?"w":tt&&Nt==`
`?"n":!tt||/\s/.test(Nt)?null:"p";if(tt&&!Tt&&!Jt&&(Jt="s"),De&&De!=Jt){x<0&&(x=1,be(),y.sticky="after");break}if(Jt&&(De=Jt),x>0&&!be(!Tt))break}var an=Ia(a,y,z,re,!0);return Xt(z,an)&&(an.hitSide=!0),an}function Fl(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var oe=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),le=Math.max(oe-.5*Ai(a.display),3);re=(x>0?y.bottom:y.top)+x*le}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var he;he=ci(a,z,re),!!he.outside;){if(x<0?re<=0:re>=E.height){he.hitSide=!0;break}re+=x*5}return he}var Pr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Pr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Rl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(oe){for(var le=oe.target;le;le=le.parentNode){if(le==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(le.className))break}return!1}ge(E,"paste",function(oe){!z(oe)||Re(b,oe)||Pl(oe,b)||Ye<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),ge(E,"compositionstart",function(oe){y.composing={data:oe.data,done:!1}}),ge(E,"compositionupdate",function(oe){y.composing||(y.composing={data:oe.data,done:!1})}),ge(E,"compositionend",function(oe){y.composing&&(oe.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ge(E,"touchstart",function(){return x.forceCompositionEnd()}),ge(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(oe){if(!(!z(oe)||Re(b,oe))){if(b.somethingSelected())Za({lineWise:!1,text:b.getSelections()}),oe.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var le=Nl(b);Za({lineWise:!0,text:le.text}),oe.type=="cut"&&b.operation(function(){b.setSelections(le.ranges,0,we),b.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var he=Yi.text.join(`
`);if(oe.clipboardData.setData("Text",he),oe.clipboardData.getData("Text")==he){oe.preventDefault();return}}var be=Il(),De=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),De.value=Yi.text.join(`
`);var tt=document.activeElement;ot(De),setTimeout(function(){b.display.lineSpace.removeChild(be),tt.focus(),tt==E&&x.showPrimarySelection()},50)}}ge(E,"copy",re),ge(E,"cut",re)},Pr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Pr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Pr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Pr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Pr.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=_a(y,a.anchorNode,a.anchorOffset),re=_a(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&Lt(_t(z,re),b)==0&&Lt(hn(z,re),E)==0)){var oe=y.display.view,le=b.line>=y.display.viewFrom&&Ol(y,b)||{node:oe[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Ol(y,E);if(!he){var be=oe[oe.length-1].measure,De=be.maps?be.maps[be.maps.length-1]:be.map;he={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!le||!he){a.removeAllRanges();return}var tt=a.rangeCount&&a.getRangeAt(0),Qe;try{Qe=Pe(le.node,le.offset,he.offset,he.node)}catch(Tt){}Qe&&(!se&&y.state.focused?(a.collapse(le.node,le.offset),Qe.collapsed||(a.removeAllRanges(),a.addRange(Qe))):(a.removeAllRanges(),a.addRange(Qe)),tt&&a.anchorNode==null?a.addRange(tt):se&&this.startGracePeriod()),this.rememberSelection()}},Pr.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)},Pr.prototype.showMultipleSelections=function(a){Se(this.cm.display.cursorDiv,a.cursors),Se(this.cm.display.selectionDiv,a.selection)},Pr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Pr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return je(this.div,y)},Pr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Pr.prototype.blur=function(){this.div.blur()},Pr.prototype.getField=function(){return this.div},Pr.prototype.supportsTouch=function(){return!0},Pr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Pi(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)},Pr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Pr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Fe&&ke&&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=_a(y,a.anchorNode,a.anchorOffset),b=_a(y,a.focusNode,a.focusOffset);x&&b&&Pi(y,function(){di(y.doc,po(x,b),we),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Pr.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=We(b.line-1,at(a.doc,b.line-1).length)),E.ch==at(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=We(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,oe;b.line==y.viewFrom||(z=So(a,b.line))==0?(re=Ae(y.view[0].line),oe=y.view[0].node):(re=Ae(y.view[z].line),oe=y.view[z-1].node.nextSibling);var le=So(a,E.line),he,be;if(le==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=Ae(y.view[le+1].line)-1,be=y.view[le+1].node.previousSibling),!oe)return!1;for(var De=a.doc.splitLines(Yu(a,oe,be,re,he)),tt=Qt(a.doc,We(re,0),We(he,at(a.doc,he).text.length));De.length>1&&tt.length>1;)if(ve(De)==ve(tt))De.pop(),tt.pop(),he--;else if(De[0]==tt[0])De.shift(),tt.shift(),re++;else break;for(var Qe=0,Tt=0,Nt=De[0],Jt=tt[0],an=Math.min(Nt.length,Jt.length);Qe<an&&Nt.charCodeAt(Qe)==Jt.charCodeAt(Qe);)++Qe;for(var fn=ve(De),sn=ve(tt),bn=Math.min(fn.length-(De.length==1?Qe:0),sn.length-(tt.length==1?Qe:0));Tt<bn&&fn.charCodeAt(fn.length-Tt-1)==sn.charCodeAt(sn.length-Tt-1);)++Tt;if(De.length==1&&tt.length==1&&re==b.line)for(;Qe&&Qe>b.ch&&fn.charCodeAt(fn.length-Tt-1)==sn.charCodeAt(sn.length-Tt-1);)Qe--,Tt++;De[De.length-1]=fn.slice(0,fn.length-Tt).replace(/^\u200b+/,""),De[0]=De[0].slice(Qe).replace(/\u200b+$/,"");var An=We(re,Qe),Sn=We(he,tt.length?ve(tt).length-Tt:0);if(De.length>1||De[0]||Lt(An,Sn))return Wo(a.doc,De,An,Sn,"+input"),!0},Pr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Pr.prototype.reset=function(){this.forceCompositionEnd()},Pr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Pr.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))},Pr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return Ci(a.cm)})},Pr.prototype.setUneditable=function(a){a.contentEditable="false"},Pr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||oi(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Pr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Pr.prototype.onContextMenu=function(){},Pr.prototype.resetPosition=function(){},Pr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=at(a.doc,y.line),E=Ao(x,b,y.line),z=ue(b,a.doc.direction),re="left";if(z){var oe=ee(z,y.ch);re=oe%2?"right":"left"}var le=xa(E.map,y.ch,re);return le.offset=le.collapse=="right"?le.end:le.start,le}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,oe=a.doc.lineSeparator(),le=!1;function he(Qe){return function(Tt){return Tt.id==Qe}}function be(){re&&(z+=oe,le&&(z+=oe),re=le=!1)}function De(Qe){Qe&&(be(),z+=Qe)}function tt(Qe){if(Qe.nodeType==1){var Tt=Qe.getAttribute("cm-text");if(Tt){De(Tt);return}var Nt=Qe.getAttribute("cm-marker"),Jt;if(Nt){var an=a.findMarks(We(b,0),We(E+1,0),he(+Nt));an.length&&(Jt=an[0].find(0))&&De(Qt(a.doc,Jt.from,Jt.to).join(oe));return}if(Qe.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;fn&&be();for(var sn=0;sn<Qe.childNodes.length;sn++)tt(Qe.childNodes[sn]);/^(pre|p)$/i.test(Qe.nodeName)&&(le=!0),fn&&(re=!0)}else Qe.nodeType==3&&De(Qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;tt(y),y!=x;)y=y.nextSibling,le=!1;return z}function _a(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(We(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||!je(b,y))return jo(We(Ae(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var z=a.rest?ve(a.rest):a.line;return jo(We(Ae(z),z.text.length),E)}var re=y.nodeType==3?y:null,oe=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));oe.parentNode!=b;)oe=oe.parentNode;var le=a.measure,he=le.maps;function be(Jt,an,fn){for(var sn=-1;sn<(he?he.length:0);sn++)for(var bn=sn<0?le.map:he[sn],An=0;An<bn.length;An+=3){var Sn=bn[An+2];if(Sn==Jt||Sn==an){var Un=Ae(sn<0?a.line:a.rest[sn]),Fr=bn[An]+fn;return(fn<0||Sn!=Jt)&&(Fr=bn[An+(fn?1:0)]),We(Un,Fr)}}}var De=be(re,oe,x);if(De)return jo(De,E);for(var tt=oe.nextSibling,Qe=re?re.nodeValue.length-x:0;tt;tt=tt.nextSibling){if(De=be(tt,tt.firstChild,0),De)return jo(We(De.line,De.ch-Qe),E);Qe+=tt.textContent.length}for(var Tt=oe.previousSibling,Nt=x;Tt;Tt=Tt.previousSibling){if(De=be(Tt,Tt.firstChild,-1),De)return jo(We(De.line,De.ch+Nt),E);Nt+=Tt.textContent.length}}var Xr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ce,this.hasSelection=!1,this.composing=null};Xr.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),Ue&&(E.style.width="0px"),ge(E,"input",function(){me&&Ye>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ge(E,"paste",function(re){Re(b,re)||Pl(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!Re(b,re)){if(b.somethingSelected())Za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var oe=Nl(b);Za({lineWise:!0,text:oe.text}),re.type=="cut"?b.setSelections(oe.ranges,null,we):(x.prevInput="",E.value=oe.text.join(`
`),ot(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ge(E,"cut",z),ge(E,"copy",z),ge(a.scroller,"paste",function(re){if(!(ui(a,re)||Re(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,E.dispatchEvent(oe)}}),ge(a.lineSpace,"selectstart",function(re){ui(a,re)||un(re)}),ge(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"})}}),ge(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Xr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Xr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Xr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=wi(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},Xr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Se(x.cursorDiv,a.cursors),Se(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Xr.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&&ot(this.textarea),me&&Ye>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&Ye>=9&&(this.hasSelection=null))}},Xr.prototype.getField=function(){return this.textarea},Xr.prototype.supportsTouch=function(){return!1},Xr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Oe||Ee()!=this.textarea))try{this.textarea.focus()}catch(a){}},Xr.prototype.blur=function(){this.textarea.blur()},Xr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xr.prototype.receivedFocus=function(){this.slowPoll()},Xr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Xr.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)},Xr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||cr(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&&Ye>=9&&this.hasSelection===E||Le&&/[\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,oe=Math.min(b.length,E.length);re<oe&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return Pi(y,function(){gs(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},Xr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xr.prototype.onKeyPress=function(){me&&Ye>=9&&(this.hasSelection=null),this.fastPoll()},Xr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=Co(x,a),re=b.scroller.scrollTop;if(!z||de)return;var oe=x.options.resetSelectionOnContextMenu;oe&&x.doc.sel.contains(z)==-1&&oi(x,di)(x.doc,po(z),we);var le=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.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;Be&&(De=window.scrollY),b.input.focus(),Be&&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 tt(){if(E.selectionStart!=null){var Nt=x.somethingSelected(),Jt="\u200B"+(Nt?E.value:"");E.value="\u21DA",E.value=Jt,y.prevInput=Nt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Jt.length,b.selForContextMenu=x.doc.sel}}function Qe(){if(y.contextMenuPending==Qe&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=le,me&&Ye<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!me||me&&Ye<9)&&tt();var Nt=0,Jt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Nt++<10?b.detectingSelectAll=setTimeout(Jt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Jt,200)}}if(me&&Ye>=9&&tt(),vt){wn(a);var Tt=function(){pt(window,"mouseup",Tt),setTimeout(Qe,20)};ge(window,"mouseup",Tt)}else setTimeout(Qe,50)},Xr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Xr.prototype.setUneditable=function(){},Xr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?dt(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=Ee();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=oe.getValue()}var E;if(a.form&&(ge(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(le){}}y.finishInit=function(le){le.save=b,le.getTextArea=function(){return a},le.toTextArea=function(){le.toTextArea=isNaN,b(),a.parentNode.removeChild(le.getWrapperElement()),a.style.display="",a.form&&(pt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var oe=Gr(function(le){return a.parentNode.insertBefore(le,a.nextSibling)},y);return oe}function Qu(a){a.off=pt,a.on=ge,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=rr,a.countColumn=pe,a.findColumn=Mt,a.isWordChar=et,a.Pass=lt,a.signal=Ct,a.Line=yr,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=We,a.cmpPos=Lt,a.modes=xr,a.mimeModes=Ut,a.resolveMode=Tn,a.getMode=Jn,a.modeExtensions=tr,a.extendMode=dr,a.copyState=_n,a.startState=hr,a.innerMode=Fn,a.commands=da,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=Zo,a.normalizeKeyMap=Du,a.StringStream=jt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=un,a.e_stopPropagation=kn,a.e_stop=wn,a.addClass=ze,a.contains=je,a.rmClass=ht,a.keyNames=yo}_u(Gr),Uu(Gr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&Ve(qu,Ga)<0&&(Gr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return It(Si),Gr.inputStyles={textarea:Xr,contenteditable:Pr},Gr.defineMode=function(a){!Gr.defaults.mode&&a!="null"&&(Gr.defaults.mode=a),pn.apply(this,arguments)},Gr.defineMIME=En,Gr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Gr.defineMIME("text/plain","null"),Gr.defineExtension=function(a,y){Gr.prototype[a]=y},Gr.defineDocExtension=function(a,y){Si.prototype[a]=y},Gr.fromTextArea=Ju,Qu(Gr),Gr.version="5.58.2",Gr})},25419:function(Ot,zt,fe){(function(se){se(fe(89780),fe(15525),fe(98101))})(function(se){"use strict";se.defineMode("markdown",function(gt,Ie){var _e=se.getMode(gt,"text/html"),me=_e.name=="null";function Ye(pe){if(se.findModeByName){var ce=se.findModeByName(pe);ce&&(pe=ce.mime||ce.mimes[0])}var Ve=se.getMode(gt,pe);return Ve.name=="null"?null:Ve}Ie.highlightFormatting===void 0&&(Ie.highlightFormatting=!1),Ie.maxBlockquoteDepth===void 0&&(Ie.maxBlockquoteDepth=0),Ie.taskLists===void 0&&(Ie.taskLists=!1),Ie.strikethrough===void 0&&(Ie.strikethrough=!1),Ie.emoji===void 0&&(Ie.emoji=!1),Ie.fencedCodeBlockHighlighting===void 0&&(Ie.fencedCodeBlockHighlighting=!0),Ie.fencedCodeBlockDefaultMode===void 0&&(Ie.fencedCodeBlockDefaultMode="text/plain"),Ie.xml===void 0&&(Ie.xml=!0),Ie.tokenTypeOverrides===void 0&&(Ie.tokenTypeOverrides={});var Be={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 qe in Be)Be.hasOwnProperty(qe)&&Ie.tokenTypeOverrides[qe]&&(Be[qe]=Ie.tokenTypeOverrides[qe]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Te=/^\[(x| )\](?=\s)/i,ye=Ie.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ft=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ue=/^[^#!\[\]*_\\<>` "'(~:]+/,Fe=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Oe=/^\s*\[[^\]]+?\]:.*$/,Le=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,st=" ";function ut(pe,ce,Ve){return ce.f=ce.inline=Ve,Ve(pe,ce)}function Et(pe,ce,Ve){return ce.f=ce.block=Ve,Ve(pe,ce)}function yt(pe){return!pe||!/\S/.test(pe.string)}function vt(pe){if(pe.linkTitle=!1,pe.linkHref=!1,pe.linkText=!1,pe.em=!1,pe.strong=!1,pe.strikethrough=!1,pe.quote=0,pe.indentedCode=!1,pe.f==ht){var ce=me;if(!ce){var Ve=se.innerMode(_e,pe.htmlState);ce=Ve.mode.name=="xml"&&Ve.state.tagStart===null&&!Ve.state.context&&Ve.state.tokenize.isInText}ce&&(pe.f=rt,pe.block=mt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function mt(pe,ce){var Ve=pe.column()===ce.indentation,wt=yt(ce.prevLine.stream),lt=ce.indentedCode,we=ce.prevLine.hr,Xe=ce.list!==!1,Ze=(ce.listStack[ce.listStack.length-1]||0)+3;ce.indentedCode=!1;var Mt=ce.indentation;if(ce.indentationDiff===null&&(ce.indentationDiff=ce.indentation,Xe)){for(ce.list=null;Mt<ce.listStack[ce.listStack.length-1];)ce.listStack.pop(),ce.listStack.length?ce.indentation=ce.listStack[ce.listStack.length-1]:ce.list=!1;ce.list!==!1&&(ce.indentationDiff=Mt-ce.listStack[ce.listStack.length-1])}var it=!wt&&!we&&!ce.prevLine.header&&(!Xe||!lt)&&!ce.prevLine.fencedCodeEnd,Ce=(ce.list===!1||we||wt)&&ce.indentation<=Ze&&pe.match(ke),ve=null;if(ce.indentationDiff>=4&&(lt||ce.prevLine.fencedCodeEnd||ce.prevLine.header||wt))return pe.skipToEnd(),ce.indentedCode=!0,Be.code;if(pe.eatSpace())return null;if(Ve&&ce.indentation<=Ze&&(ve=pe.match(ye))&&ve[1].length<=6)return ce.quote=0,ce.header=ve[1].length,ce.thisLine.header=!0,Ie.highlightFormatting&&(ce.formatting="header"),ce.f=ce.inline,Se(ce);if(ce.indentation<=Ze&&pe.eat(">"))return ce.quote=Ve?1:ce.quote+1,Ie.highlightFormatting&&(ce.formatting="quote"),pe.eatSpace(),Se(ce);if(!Ce&&!ce.setext&&Ve&&ce.indentation<=Ze&&(ve=pe.match(de))){var Me=ve[1]?"ol":"ul";return ce.indentation=Mt+pe.current().length,ce.list=!0,ce.quote=0,ce.listStack.push(ce.indentation),ce.em=!1,ce.strong=!1,ce.code=!1,ce.strikethrough=!1,Ie.taskLists&&pe.match(Te,!1)&&(ce.taskList=!0),ce.f=ce.inline,Ie.highlightFormatting&&(ce.formatting=["list","list-"+Me]),Se(ce)}else{if(Ve&&ce.indentation<=Ze&&(ve=pe.match(Fe,!0)))return ce.quote=0,ce.fencedEndRE=new RegExp(ve[1]+"+ *$"),ce.localMode=Ie.fencedCodeBlockHighlighting&&Ye(ve[2]||Ie.fencedCodeBlockDefaultMode),ce.localMode&&(ce.localState=se.startState(ce.localMode)),ce.f=ce.block=$t,Ie.highlightFormatting&&(ce.formatting="code-block"),ce.code=-1,Se(ce);if(ce.setext||(!it||!Xe)&&!ce.quote&&ce.list===!1&&!ce.code&&!Ce&&!Oe.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(ft)))return ce.setext?(ce.header=ce.setext,ce.setext=0,pe.skipToEnd(),Ie.highlightFormatting&&(ce.formatting="header")):(ce.header=ve[0].charAt(0)=="="?1:2,ce.setext=ce.header),ce.thisLine.header=!0,ce.f=ce.inline,Se(ce);if(Ce)return pe.skipToEnd(),ce.hr=!0,ce.thisLine.hr=!0,Be.hr;if(pe.peek()==="[")return ut(pe,ce,Pt)}return ut(pe,ce,ce.inline)}function ht(pe,ce){var Ve=_e.token(pe,ce.htmlState);if(!me){var wt=se.innerMode(_e,ce.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||ce.md_inside&&pe.current().indexOf(">")>-1)&&(ce.f=rt,ce.block=mt,ce.htmlState=null)}return Ve}function $t(pe,ce){var Ve=ce.listStack[ce.listStack.length-1]||0,wt=ce.indentation<Ve,lt=Ve+3;if(ce.fencedEndRE&&ce.indentation<=lt&&(wt||pe.match(ce.fencedEndRE))){Ie.highlightFormatting&&(ce.formatting="code-block");var we;return wt||(we=Se(ce)),ce.localMode=ce.localState=null,ce.block=mt,ce.f=rt,ce.fencedEndRE=null,ce.code=0,ce.thisLine.fencedCodeEnd=!0,wt?Et(pe,ce,ce.block):we}else return ce.localMode?ce.localMode.token(pe,ce.localState):(pe.skipToEnd(),Be.code)}function Se(pe){var ce=[];if(pe.formatting){ce.push(Be.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var Ve=0;Ve<pe.formatting.length;Ve++)ce.push(Be.formatting+"-"+pe.formatting[Ve]),pe.formatting[Ve]==="header"&&ce.push(Be.formatting+"-"+pe.formatting[Ve]+"-"+pe.header),pe.formatting[Ve]==="quote"&&(!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=pe.quote?ce.push(Be.formatting+"-"+pe.formatting[Ve]+"-"+pe.quote):ce.push("error"))}if(pe.taskOpen)return ce.push("meta"),ce.length?ce.join(" "):null;if(pe.taskClosed)return ce.push("property"),ce.length?ce.join(" "):null;if(pe.linkHref?ce.push(Be.linkHref,"url"):(pe.strong&&ce.push(Be.strong),pe.em&&ce.push(Be.em),pe.strikethrough&&ce.push(Be.strikethrough),pe.emoji&&ce.push(Be.emoji),pe.linkText&&ce.push(Be.linkText),pe.code&&ce.push(Be.code),pe.image&&ce.push(Be.image),pe.imageAltText&&ce.push(Be.imageAltText,"link"),pe.imageMarker&&ce.push(Be.imageMarker)),pe.header&&ce.push(Be.header,Be.header+"-"+pe.header),pe.quote&&(ce.push(Be.quote),!Ie.maxBlockquoteDepth||Ie.maxBlockquoteDepth>=pe.quote?ce.push(Be.quote+"-"+pe.quote):ce.push(Be.quote+"-"+Ie.maxBlockquoteDepth)),pe.list!==!1){var wt=(pe.listStack.length-1)%3;wt?wt===1?ce.push(Be.list2):ce.push(Be.list3):ce.push(Be.list1)}return pe.trailingSpaceNewLine?ce.push("trailing-space-new-line"):pe.trailingSpace&&ce.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ce.length?ce.join(" "):null}function Ge(pe,ce){if(pe.match(Ue,!0))return Se(ce)}function rt(pe,ce){var Ve=ce.text(pe,ce);if(typeof Ve!="undefined")return Ve;if(ce.list)return ce.list=null,Se(ce);if(ce.taskList){var wt=pe.match(Te,!0)[1]===" ";return wt?ce.taskOpen=!0:ce.taskClosed=!0,Ie.highlightFormatting&&(ce.formatting="task"),ce.taskList=!1,Se(ce)}if(ce.taskOpen=!1,ce.taskClosed=!1,ce.header&&pe.match(/^#+$/,!0))return Ie.highlightFormatting&&(ce.formatting="header"),Se(ce);var lt=pe.next();if(ce.linkTitle){ce.linkTitle=!1;var we=lt;lt==="("&&(we=")"),we=(we+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Xe="^\\s*(?:[^"+we+"\\\\]+|\\\\\\\\|\\\\.)"+we;if(pe.match(new RegExp(Xe),!0))return Be.linkHref}if(lt==="`"){var Ze=ce.formatting;Ie.highlightFormatting&&(ce.formatting="code"),pe.eatWhile("`");var Mt=pe.current().length;if(ce.code==0&&(!ce.quote||Mt==1))return ce.code=Mt,Se(ce);if(Mt==ce.code){var it=Se(ce);return ce.code=0,it}else return ce.formatting=Ze,Se(ce)}else if(ce.code)return Se(ce);if(lt==="\\"&&(pe.next(),Ie.highlightFormatting)){var Ce=Se(ce),ve=Be.formatting+"-escape";return Ce?Ce+" "+ve:ve}if(lt==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ce.imageMarker=!0,ce.image=!0,Ie.highlightFormatting&&(ce.formatting="image"),Se(ce);if(lt==="["&&ce.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ce.imageMarker=!1,ce.imageAltText=!0,Ie.highlightFormatting&&(ce.formatting="image"),Se(ce);if(lt==="]"&&ce.imageAltText){Ie.highlightFormatting&&(ce.formatting="image");var Ce=Se(ce);return ce.imageAltText=!1,ce.image=!1,ce.inline=ce.f=je,Ce}if(lt==="["&&!ce.image)return ce.linkText&&pe.match(/^.*?\]/)||(ce.linkText=!0,Ie.highlightFormatting&&(ce.formatting="link")),Se(ce);if(lt==="]"&&ce.linkText){Ie.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return ce.linkText=!1,ce.inline=ce.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?je:rt,Ce}if(lt==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Pe,Ie.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return Ce?Ce+=" ":Ce="",Ce+Be.linkInline}if(lt==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Pe,Ie.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return Ce?Ce+=" ":Ce="",Ce+Be.linkEmail}if(Ie.xml&&lt==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Me=pe.string.indexOf(">",pe.pos);if(Me!=-1){var $e=pe.string.substring(pe.start,Me);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test($e)&&(ce.md_inside=!0)}return pe.backUp(1),ce.htmlState=se.startState(_e),Et(pe,ce,ht)}if(Ie.xml&&lt==="<"&&pe.match(/^\/\w*?>/))return ce.md_inside=!1,"tag";if(lt==="*"||lt==="_"){for(var xe=1,He=pe.pos==1?" ":pe.string.charAt(pe.pos-2);xe<3&&pe.eat(lt);)xe++;var Je=pe.peek()||" ",et=!/\s/.test(Je)&&(!Le.test(Je)||/\s/.test(He)||Le.test(He)),nt=!/\s/.test(He)&&(!Le.test(He)||/\s/.test(Je)||Le.test(Je)),Ke=null,xt=null;if(xe%2&&(!ce.em&&et&&(lt==="*"||!nt||Le.test(He))?Ke=!0:ce.em==lt&&nt&&(lt==="*"||!et||Le.test(Je))&&(Ke=!1)),xe>1&&(!ce.strong&&et&&(lt==="*"||!nt||Le.test(He))?xt=!0:ce.strong==lt&&nt&&(lt==="*"||!et||Le.test(Je))&&(xt=!1)),xt!=null||Ke!=null){Ie.highlightFormatting&&(ce.formatting=Ke==null?"strong":xt==null?"em":"strong em"),Ke===!0&&(ce.em=lt),xt===!0&&(ce.strong=lt);var it=Se(ce);return Ke===!1&&(ce.em=!1),xt===!1&&(ce.strong=!1),it}}else if(lt===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Se(ce);pe.backUp(1)}if(Ie.strikethrough){if(lt==="~"&&pe.eatWhile(lt)){if(ce.strikethrough){Ie.highlightFormatting&&(ce.formatting="strikethrough");var it=Se(ce);return ce.strikethrough=!1,it}else if(pe.match(/^[^\s]/,!1))return ce.strikethrough=!0,Ie.highlightFormatting&&(ce.formatting="strikethrough"),Se(ce)}else if(lt===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Se(ce);pe.backUp(2)}}if(Ie.emoji&&lt===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ce.emoji=!0,Ie.highlightFormatting&&(ce.formatting="emoji");var kt=Se(ce);return ce.emoji=!1,kt}return lt===" "&&(pe.match(/^ +$/,!1)?ce.trailingSpace++:ce.trailingSpace&&(ce.trailingSpaceNewLine=!0)),Se(ce)}function Pe(pe,ce){var Ve=pe.next();if(Ve===">"){ce.f=ce.inline=rt,Ie.highlightFormatting&&(ce.formatting="link");var wt=Se(ce);return wt?wt+=" ":wt="",wt+Be.linkInline}return pe.match(/^[^>]+/,!0),Be.linkInline}function je(pe,ce){if(pe.eatSpace())return null;var Ve=pe.next();return Ve==="("||Ve==="["?(ce.f=ce.inline=ze(Ve==="("?")":"]"),Ie.highlightFormatting&&(ce.formatting="link-string"),ce.linkHref=!0,Se(ce)):"error"}var Ee={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ze(pe){return function(ce,Ve){var wt=ce.next();if(wt===pe){Ve.f=Ve.inline=rt,Ie.highlightFormatting&&(Ve.formatting="link-string");var lt=Se(Ve);return Ve.linkHref=!1,lt}return ce.match(Ee[pe]),Ve.linkHref=!0,Se(Ve)}}function Pt(pe,ce){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ce.f=ot,pe.next(),Ie.highlightFormatting&&(ce.formatting="link"),ce.linkText=!0,Se(ce)):ut(pe,ce,rt)}function ot(pe,ce){if(pe.match(/^\]:/,!0)){ce.f=ce.inline=St,Ie.highlightFormatting&&(ce.formatting="link");var Ve=Se(ce);return ce.linkText=!1,Ve}return pe.match(/^([^\]\\]|\\.)+/,!0),Be.linkText}function St(pe,ce){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ce.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ce.f=ce.inline=rt,Be.linkHref+" url")}var dt={startState:function(){return{f:mt,prevLine:{stream:null},thisLine:{stream:null},block:mt,htmlState:null,indentation:0,inline:rt,text:Ge,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&se.copyState(_e,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?se.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,ce){if(ce.formatting=!1,pe!=ce.thisLine.stream){if(ce.header=0,ce.hr=!1,pe.match(/^\s*$/,!0))return vt(ce),null;if(ce.prevLine=ce.thisLine,ce.thisLine={stream:pe},ce.taskList=!1,ce.trailingSpace=0,ce.trailingSpaceNewLine=!1,!ce.localState&&(ce.f=ce.block,ce.f!=ht)){var Ve=pe.match(/^\s*/,!0)[0].replace(/\t/g,st).length;if(ce.indentation=Ve,ce.indentationDiff=null,Ve>0)return null}}return ce.f(pe,ce)},innerMode:function(pe){return pe.block==ht?{state:pe.htmlState,mode:_e}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:dt}},indent:function(pe,ce,Ve){return pe.block==ht&&_e.indent?_e.indent(pe.htmlState,ce,Ve):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ce,Ve):se.Pass},blankLine:vt,getType:Se,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return dt},"xml"),se.defineMIME("text/markdown","markdown"),se.defineMIME("text/x-markdown","markdown")})},98101:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){"use strict";se.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 gt=0;gt<se.modeInfo.length;gt++){var Ie=se.modeInfo[gt];Ie.mimes&&(Ie.mime=Ie.mimes[0])}se.findModeByMIME=function(_e){_e=_e.toLowerCase();for(var me=0;me<se.modeInfo.length;me++){var Ye=se.modeInfo[me];if(Ye.mime==_e)return Ye;if(Ye.mimes){for(var Be=0;Be<Ye.mimes.length;Be++)if(Ye.mimes[Be]==_e)return Ye}}if(/\+xml$/.test(_e))return se.findModeByMIME("application/xml");if(/\+json$/.test(_e))return se.findModeByMIME("application/json")},se.findModeByExtension=function(_e){_e=_e.toLowerCase();for(var me=0;me<se.modeInfo.length;me++){var Ye=se.modeInfo[me];if(Ye.ext){for(var Be=0;Be<Ye.ext.length;Be++)if(Ye.ext[Be]==_e)return Ye}}},se.findModeByFileName=function(_e){for(var me=0;me<se.modeInfo.length;me++){var Ye=se.modeInfo[me];if(Ye.file&&Ye.file.test(_e))return Ye}var Be=_e.lastIndexOf("."),qe=Be>-1&&_e.substring(Be+1,_e.length);if(qe)return se.findModeByExtension(qe)},se.findModeByName=function(_e){_e=_e.toLowerCase();for(var me=0;me<se.modeInfo.length;me++){var Ye=se.modeInfo[me];if(Ye.name.toLowerCase()==_e)return Ye;if(Ye.alias){for(var Be=0;Be<Ye.alias.length;Be++)if(Ye.alias[Be].toLowerCase()==_e)return Ye}}}})},67549:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){"use strict";se.defineMode("stex",function(gt,Ie){"use strict";function _e(Ue,Fe){Ue.cmdState.push(Fe)}function me(Ue){return Ue.cmdState.length>0?Ue.cmdState[Ue.cmdState.length-1]:null}function Ye(Ue){var Fe=Ue.cmdState.pop();Fe&&Fe.closeBracket()}function Be(Ue){for(var Fe=Ue.cmdState,Oe=Fe.length-1;Oe>=0;Oe--){var Le=Fe[Oe];if(Le.name!="DEFAULT")return Le}return{styleIdentifier:function(){return null}}}function qe(Ue,Fe,Oe){return function(){this.name=Ue,this.bracketNo=0,this.style=Fe,this.styles=Oe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ke={};ke.importmodule=qe("importmodule","tag",["string","builtin"]),ke.documentclass=qe("documentclass","tag",["","atom"]),ke.usepackage=qe("usepackage","tag",["atom"]),ke.begin=qe("begin","tag",["atom"]),ke.end=qe("end","tag",["atom"]),ke.label=qe("label","tag",["atom"]),ke.ref=qe("ref","tag",["atom"]),ke.eqref=qe("eqref","tag",["atom"]),ke.cite=qe("cite","tag",["atom"]),ke.bibitem=qe("bibitem","tag",["atom"]),ke.Bibitem=qe("Bibitem","tag",["atom"]),ke.RBibitem=qe("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(Ue,Fe){Ue.f=Fe}function Te(Ue,Fe){var Oe;if(Ue.match(/^\\[a-zA-Z@]+/)){var Le=Ue.current().slice(1);return Oe=ke.hasOwnProperty(Le)?ke[Le]:ke.DEFAULT,Oe=new Oe,_e(Fe,Oe),de(Fe,ft),Oe.style}if(Ue.match(/^\\[$&%#{}_]/)||Ue.match(/^\\[,;!\/\\]/))return"tag";if(Ue.match("\\["))return de(Fe,function(ut,Et){return ye(ut,Et,"\\]")}),"keyword";if(Ue.match("\\("))return de(Fe,function(ut,Et){return ye(ut,Et,"\\)")}),"keyword";if(Ue.match("$$"))return de(Fe,function(ut,Et){return ye(ut,Et,"$$")}),"keyword";if(Ue.match("$"))return de(Fe,function(ut,Et){return ye(ut,Et,"$")}),"keyword";var st=Ue.next();if(st=="%")return Ue.skipToEnd(),"comment";if(st=="}"||st=="]"){if(Oe=me(Fe),Oe)Oe.closeBracket(st),de(Fe,ft);else return"error";return"bracket"}else return st=="{"||st=="["?(Oe=ke.DEFAULT,Oe=new Oe,_e(Fe,Oe),"bracket"):/\d/.test(st)?(Ue.eatWhile(/[\w.%]/),"atom"):(Ue.eatWhile(/[\w\-_]/),Oe=Be(Fe),Oe.name=="begin"&&(Oe.argument=Ue.current()),Oe.styleIdentifier())}function ye(Ue,Fe,Oe){if(Ue.eatSpace())return null;if(Oe&&Ue.match(Oe))return de(Fe,Te),"keyword";if(Ue.match(/^\\[a-zA-Z@]+/))return"tag";if(Ue.match(/^[a-zA-Z]+/))return"variable-2";if(Ue.match(/^\\[$&%#{}_]/)||Ue.match(/^\\[,;!\/]/)||Ue.match(/^[\^_&]/))return"tag";if(Ue.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ue.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Le=Ue.next();return Le=="{"||Le=="}"||Le=="["||Le=="]"||Le=="("||Le==")"?"bracket":Le=="%"?(Ue.skipToEnd(),"comment"):"error"}function ft(Ue,Fe){var Oe=Ue.peek(),Le;return Oe=="{"||Oe=="["?(Le=me(Fe),Le.openBracket(Oe),Ue.eat(Oe),de(Fe,Te),"bracket"):/[ \t\r]/.test(Oe)?(Ue.eat(Oe),null):(de(Fe,Te),Ye(Fe),Te(Ue,Fe))}return{startState:function(){var Ue=Ie.inMathMode?function(Fe,Oe){return ye(Fe,Oe)}:Te;return{cmdState:[],f:Ue}},copyState:function(Ue){return{cmdState:Ue.cmdState.slice(),f:Ue.f}},token:function(Ue,Fe){return Fe.f(Ue,Fe)},blankLine:function(Ue){Ue.f=Te,Ue.cmdState.length=0},lineComment:"%"}}),se.defineMIME("text/x-stex","stex"),se.defineMIME("text/x-latex","stex")})},15525:function(Ot,zt,fe){(function(se){se(fe(89780))})(function(se){"use strict";var gt={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},Ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};se.defineMode("xml",function(_e,me){var Ye=_e.indentUnit,Be={},qe=me.htmlMode?gt:Ie;for(var ke in qe)Be[ke]=qe[ke];for(var ke in me)Be[ke]=me[ke];var de,Te;function ye(Pe,je){function Ee(ot){return je.tokenize=ot,ot(Pe,je)}var ze=Pe.next();if(ze=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Ee(Fe("atom","]]>")):null:Pe.match("--")?Ee(Fe("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Ee(Oe(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),je.tokenize=Fe("meta","?>"),"meta"):(de=Pe.eat("/")?"closeTag":"openTag",je.tokenize=ft,"tag bracket");if(ze=="&"){var Pt;return Pe.eat("#")?Pe.eat("x")?Pt=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):Pt=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):Pt=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),Pt?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}ye.isInText=!0;function ft(Pe,je){var Ee=Pe.next();if(Ee==">"||Ee=="/"&&Pe.eat(">"))return je.tokenize=ye,de=Ee==">"?"endTag":"selfcloseTag","tag bracket";if(Ee=="=")return de="equals",null;if(Ee=="<"){je.tokenize=ye,je.state=Et,je.tagName=je.tagStart=null;var ze=je.tokenize(Pe,je);return ze?ze+" tag error":"tag error"}else return/[\'\"]/.test(Ee)?(je.tokenize=Ue(Ee),je.stringStartCol=Pe.column(),je.tokenize(Pe,je)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ue(Pe){var je=function(Ee,ze){for(;!Ee.eol();)if(Ee.next()==Pe){ze.tokenize=ft;break}return"string"};return je.isInAttribute=!0,je}function Fe(Pe,je){return function(Ee,ze){for(;!Ee.eol();){if(Ee.match(je)){ze.tokenize=ye;break}Ee.next()}return Pe}}function Oe(Pe){return function(je,Ee){for(var ze;(ze=je.next())!=null;){if(ze=="<")return Ee.tokenize=Oe(Pe+1),Ee.tokenize(je,Ee);if(ze==">")if(Pe==1){Ee.tokenize=ye;break}else return Ee.tokenize=Oe(Pe-1),Ee.tokenize(je,Ee)}return"meta"}}function Le(Pe,je,Ee){this.prev=Pe.context,this.tagName=je,this.indent=Pe.indented,this.startOfLine=Ee,(Be.doNotIndent.hasOwnProperty(je)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function st(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function ut(Pe,je){for(var Ee;;){if(!Pe.context||(Ee=Pe.context.tagName,!Be.contextGrabbers.hasOwnProperty(Ee)||!Be.contextGrabbers[Ee].hasOwnProperty(je)))return;st(Pe)}}function Et(Pe,je,Ee){return Pe=="openTag"?(Ee.tagStart=je.column(),yt):Pe=="closeTag"?vt:Et}function yt(Pe,je,Ee){return Pe=="word"?(Ee.tagName=je.current(),Te="tag",$t):Be.allowMissingTagName&&Pe=="endTag"?(Te="tag bracket",$t(Pe,je,Ee)):(Te="error",yt)}function vt(Pe,je,Ee){if(Pe=="word"){var ze=je.current();return Ee.context&&Ee.context.tagName!=ze&&Be.implicitlyClosed.hasOwnProperty(Ee.context.tagName)&&st(Ee),Ee.context&&Ee.context.tagName==ze||Be.matchClosing===!1?(Te="tag",mt):(Te="tag error",ht)}else return Be.allowMissingTagName&&Pe=="endTag"?(Te="tag bracket",mt(Pe,je,Ee)):(Te="error",ht)}function mt(Pe,je,Ee){return Pe!="endTag"?(Te="error",mt):(st(Ee),Et)}function ht(Pe,je,Ee){return Te="error",mt(Pe,je,Ee)}function $t(Pe,je,Ee){if(Pe=="word")return Te="attribute",Se;if(Pe=="endTag"||Pe=="selfcloseTag"){var ze=Ee.tagName,Pt=Ee.tagStart;return Ee.tagName=Ee.tagStart=null,Pe=="selfcloseTag"||Be.autoSelfClosers.hasOwnProperty(ze)?ut(Ee,ze):(ut(Ee,ze),Ee.context=new Le(Ee,ze,Pt==Ee.indented)),Et}return Te="error",$t}function Se(Pe,je,Ee){return Pe=="equals"?Ge:(Be.allowMissing||(Te="error"),$t(Pe,je,Ee))}function Ge(Pe,je,Ee){return Pe=="string"?rt:Pe=="word"&&Be.allowUnquoted?(Te="string",$t):(Te="error",$t(Pe,je,Ee))}function rt(Pe,je,Ee){return Pe=="string"?rt:$t(Pe,je,Ee)}return{startState:function(Pe){var je={tokenize:ye,state:Et,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(je.baseIndent=Pe),je},token:function(Pe,je){if(!je.tagName&&Pe.sol()&&(je.indented=Pe.indentation()),Pe.eatSpace())return null;de=null;var Ee=je.tokenize(Pe,je);return(Ee||de)&&Ee!="comment"&&(Te=null,je.state=je.state(de||Ee,Pe,je),Te&&(Ee=Te=="error"?Ee+" error":Te)),Ee},indent:function(Pe,je,Ee){var ze=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+Ye;if(ze&&ze.noIndent)return se.Pass;if(Pe.tokenize!=ft&&Pe.tokenize!=ye)return Ee?Ee.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return Be.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+Ye*(Be.multilineTagIndentFactor||1);if(Be.alignCDATA&&/<!\[CDATA\[/.test(je))return 0;var Pt=je&&/^<(\/)?([\w_:\.-]*)/.exec(je);if(Pt&&Pt[1])for(;ze;)if(ze.tagName==Pt[2]){ze=ze.prev;break}else if(Be.implicitlyClosed.hasOwnProperty(ze.tagName))ze=ze.prev;else break;else if(Pt)for(;ze;){var ot=Be.contextGrabbers[ze.tagName];if(ot&&ot.hasOwnProperty(Pt[2]))ze=ze.prev;else break}for(;ze&&ze.prev&&!ze.startOfLine;)ze=ze.prev;return ze?ze.indent+Ye:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Be.htmlMode?"html":"xml",helperType:Be.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Ge&&(Pe.state=$t)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var je=[],Ee=Pe.context;Ee;Ee=Ee.prev)Ee.tagName&&je.push(Ee.tagName);return je.reverse()}}}),se.defineMIME("text/xml","xml"),se.defineMIME("application/xml","xml"),se.mimeModes.hasOwnProperty("text/html")||se.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return je}});var se=fe(33885),gt=fe(42978),Ie=fe(43403),_e=fe(34280),me=fe(59301),Ye=me.createContext(null),Be=me.createContext({}),qe=Ye,ke=fe(20068),de=fe(54476),Te=fe(92310),ye=fe.n(Te),ft=fe(77900),Ue=fe(10228),Fe=fe(26112),Oe=fe(75931),Le=fe(8654),st=["prefixCls","className","containerRef"],ut=function(ze){var Pt=ze.prefixCls,ot=ze.className,St=ze.containerRef,dt=(0,Oe.Z)(ze,st),pe=me.useContext(Be),ce=pe.panel,Ve=(0,Le.x1)(ce,St);return me.createElement("div",(0,de.Z)({className:ye()("".concat(Pt,"-content"),ot),role:"dialog",ref:Ve},(0,Fe.Z)(ze,{aria:!0}),{"aria-modal":"true"},dt))},Et=ut,yt=fe(48736);function vt(Ee){return typeof Ee=="string"&&String(Number(Ee))===Ee?((0,yt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ee)):Ee}function mt(Ee){warning(!("wrapperClassName"in Ee),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ee.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ht={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function $t(Ee,ze){var Pt,ot,St,dt=Ee.prefixCls,pe=Ee.open,ce=Ee.placement,Ve=Ee.inline,wt=Ee.push,lt=Ee.forceRender,we=Ee.autoFocus,Xe=Ee.keyboard,Ze=Ee.classNames,Mt=Ee.rootClassName,it=Ee.rootStyle,Ce=Ee.zIndex,ve=Ee.className,Me=Ee.id,$e=Ee.style,xe=Ee.motion,He=Ee.width,Je=Ee.height,et=Ee.children,nt=Ee.mask,Ke=Ee.maskClosable,xt=Ee.maskMotion,kt=Ee.maskClassName,Yt=Ee.maskStyle,Wt=Ee.afterOpenChange,ae=Ee.onClose,te=Ee.onMouseEnter,ee=Ee.onMouseOver,ie=Ee.onMouseLeave,ue=Ee.onClick,ne=Ee.onKeyDown,ge=Ee.onKeyUp,ct=Ee.styles,pt=Ee.drawerRender,Ct=me.useRef(),Re=me.useRef(),Zt=me.useRef();me.useImperativeHandle(ze,function(){return Ct.current});var Rt=function(Xn){var Kn=Xn.keyCode,xr=Xn.shiftKey;switch(Kn){case Ue.Z.TAB:{if(Kn===Ue.Z.TAB){if(!xr&&document.activeElement===Zt.current){var Ut;(Ut=Re.current)===null||Ut===void 0||Ut.focus({preventScroll:!0})}else if(xr&&document.activeElement===Re.current){var pn;(pn=Zt.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case Ue.Z.ESC:{ae&&Xe&&(Xn.stopPropagation(),ae(Xn));break}}};me.useEffect(function(){if(pe&&we){var Bn;(Bn=Ct.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[pe]);var It=me.useState(!1),un=(0,gt.Z)(It,2),kn=un[0],cn=un[1],wn=me.useContext(qe),$n;typeof wt=="boolean"?$n=wt?{}:{distance:0}:$n=wt||{};var Zn=(Pt=(ot=(St=$n)===null||St===void 0?void 0:St.distance)!==null&&ot!==void 0?ot:wn==null?void 0:wn.pushDistance)!==null&&Pt!==void 0?Pt:180,mr=me.useMemo(function(){return{pushDistance:Zn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[Zn]);me.useEffect(function(){if(pe){var Bn;wn==null||(Bn=wn.push)===null||Bn===void 0||Bn.call(wn)}else{var Xn;wn==null||(Xn=wn.pull)===null||Xn===void 0||Xn.call(wn)}},[pe]),me.useEffect(function(){return function(){var Bn;wn==null||(Bn=wn.pull)===null||Bn===void 0||Bn.call(wn)}},[]);var er=nt&&me.createElement(ft.default,(0,de.Z)({key:"mask"},xt,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style;return me.createElement("div",{className:ye()("".concat(dt,"-mask"),Kn,Ze==null?void 0:Ze.mask,kt),style:(0,se.Z)((0,se.Z)((0,se.Z)({},xr),Yt),ct==null?void 0:ct.mask),onClick:Ke&&pe?ae:void 0,ref:Xn})}),ur=typeof xe=="function"?xe(ce):xe,nr={};if(kn&&Zn)switch(ce){case"top":nr.transform="translateY(".concat(Zn,"px)");break;case"bottom":nr.transform="translateY(".concat(-Zn,"px)");break;case"left":nr.transform="translateX(".concat(Zn,"px)");break;default:nr.transform="translateX(".concat(-Zn,"px)");break}ce==="left"||ce==="right"?nr.width=vt(He):nr.height=vt(Je);var In={onMouseEnter:te,onMouseOver:ee,onMouseLeave:ie,onClick:ue,onKeyDown:ne,onKeyUp:ge},rr=me.createElement(ft.default,(0,de.Z)({key:"panel"},ur,{visible:pe,forceRender:lt,onVisibleChanged:function(Xn){Wt==null||Wt(Xn)},removeOnLeave:!1,leavedClassName:"".concat(dt,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,xr=Bn.style,Ut=me.createElement(Et,(0,de.Z)({id:Me,containerRef:Xn,prefixCls:dt,className:ye()(ve,Ze==null?void 0:Ze.content),style:(0,se.Z)((0,se.Z)({},$e),ct==null?void 0:ct.content)},(0,Fe.Z)(Ee,{aria:!0}),In),et);return me.createElement("div",(0,de.Z)({className:ye()("".concat(dt,"-content-wrapper"),Ze==null?void 0:Ze.wrapper,Kn),style:(0,se.Z)((0,se.Z)((0,se.Z)({},nr),xr),ct==null?void 0:ct.wrapper)},(0,Fe.Z)(Ee,{data:!0})),pt?pt(Ut):Ut)}),cr=(0,se.Z)({},it);return Ce&&(cr.zIndex=Ce),me.createElement(qe.Provider,{value:mr},me.createElement("div",{className:ye()(dt,"".concat(dt,"-").concat(ce),Mt,(0,ke.Z)((0,ke.Z)({},"".concat(dt,"-open"),pe),"".concat(dt,"-inline"),Ve)),style:cr,tabIndex:-1,ref:Ct,onKeyDown:Rt},er,me.createElement("div",{tabIndex:0,ref:Re,style:ht,"aria-hidden":"true","data-sentinel":"start"}),rr,me.createElement("div",{tabIndex:0,ref:Zt,style:ht,"aria-hidden":"true","data-sentinel":"end"})))}var Se=me.forwardRef($t),Ge=Se,rt=function(ze){var Pt=ze.open,ot=Pt===void 0?!1:Pt,St=ze.prefixCls,dt=St===void 0?"rc-drawer":St,pe=ze.placement,ce=pe===void 0?"right":pe,Ve=ze.autoFocus,wt=Ve===void 0?!0:Ve,lt=ze.keyboard,we=lt===void 0?!0:lt,Xe=ze.width,Ze=Xe===void 0?378:Xe,Mt=ze.mask,it=Mt===void 0?!0:Mt,Ce=ze.maskClosable,ve=Ce===void 0?!0:Ce,Me=ze.getContainer,$e=ze.forceRender,xe=ze.afterOpenChange,He=ze.destroyOnClose,Je=ze.onMouseEnter,et=ze.onMouseOver,nt=ze.onMouseLeave,Ke=ze.onClick,xt=ze.onKeyDown,kt=ze.onKeyUp,Yt=ze.panelRef,Wt=me.useState(!1),ae=(0,gt.Z)(Wt,2),te=ae[0],ee=ae[1],ie=me.useState(!1),ue=(0,gt.Z)(ie,2),ne=ue[0],ge=ue[1];(0,_e.Z)(function(){ge(!0)},[]);var ct=ne?ot:!1,pt=me.useRef(),Ct=me.useRef();(0,_e.Z)(function(){ct&&(Ct.current=document.activeElement)},[ct]);var Re=function(kn){var cn;if(ee(kn),xe==null||xe(kn),!kn&&Ct.current&&!((cn=pt.current)!==null&&cn!==void 0&&cn.contains(Ct.current))){var wn;(wn=Ct.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},Zt=me.useMemo(function(){return{panel:Yt}},[Yt]);if(!$e&&!te&&!ct&&He)return null;var Rt={onMouseEnter:Je,onMouseOver:et,onMouseLeave:nt,onClick:Ke,onKeyDown:xt,onKeyUp:kt},It=(0,se.Z)((0,se.Z)({},ze),{},{open:ct,prefixCls:dt,placement:ce,autoFocus:wt,keyboard:we,width:Ze,mask:it,maskClosable:ve,inline:Me===!1,afterOpenChange:Re,ref:pt},Rt);return me.createElement(Be.Provider,{value:Zt},me.createElement(Ie.Z,{open:ct||$e||te,autoDestroy:!1,getContainer:Me,autoLock:it&&(ct||te)},me.createElement(Ge,It)))},Pe=rt,je=Pe},20922:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return it}});var se=fe(54476),gt=fe(20068),Ie=fe(76190),_e=fe(42978),me=fe(75931),Ye=fe(67732),Be=fe(83652);function qe(){return typeof BigInt=="function"}function ke(Ce){return!Ce&&Ce!==0&&!Number.isNaN(Ce)||!String(Ce).trim()}function de(Ce){var ve=Ce.trim(),Me=ve.startsWith("-");Me&&(ve=ve.slice(1)),ve=ve.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ve.startsWith(".")&&(ve="0".concat(ve));var $e=ve||"0",xe=$e.split("."),He=xe[0]||"0",Je=xe[1]||"0";He==="0"&&Je==="0"&&(Me=!1);var et=Me?"-":"";return{negative:Me,negativeStr:et,trimStr:$e,integerStr:He,decimalStr:Je,fullStr:"".concat(et).concat($e)}}function Te(Ce){var ve=String(Ce);return!Number.isNaN(Number(ve))&&ve.includes("e")}function ye(Ce){var ve=String(Ce);if(Te(Ce)){var Me=Number(ve.slice(ve.indexOf("e-")+2)),$e=ve.match(/\.(\d+)/);return $e!=null&&$e[1]&&(Me+=$e[1].length),Me}return ve.includes(".")&&Ue(ve)?ve.length-ve.indexOf(".")-1:0}function ft(Ce){var ve=String(Ce);if(Te(Ce)){if(Ce>Number.MAX_SAFE_INTEGER)return String(qe()?BigInt(Ce).toString():Number.MAX_SAFE_INTEGER);if(Ce<Number.MIN_SAFE_INTEGER)return String(qe()?BigInt(Ce).toString():Number.MIN_SAFE_INTEGER);ve=Ce.toFixed(ye(ve))}return de(ve).fullStr}function Ue(Ce){return typeof Ce=="number"?!Number.isNaN(Ce):Ce?/^\s*-?\d+(\.\d+)?\s*$/.test(Ce)||/^\s*-?\d+\.\s*$/.test(Ce)||/^\s*-?\.\d+\s*$/.test(Ce):!1}var Fe=function(){function Ce(ve){if((0,Ye.Z)(this,Ce),(0,gt.Z)(this,"origin",""),(0,gt.Z)(this,"negative",void 0),(0,gt.Z)(this,"integer",void 0),(0,gt.Z)(this,"decimal",void 0),(0,gt.Z)(this,"decimalLen",void 0),(0,gt.Z)(this,"empty",void 0),(0,gt.Z)(this,"nan",void 0),ke(ve)){this.empty=!0;return}if(this.origin=String(ve),ve==="-"||Number.isNaN(ve)){this.nan=!0;return}var Me=ve;if(Te(Me)&&(Me=Number(Me)),Me=typeof Me=="string"?Me:ft(Me),Ue(Me)){var $e=de(Me);this.negative=$e.negative;var xe=$e.trimStr.split(".");this.integer=BigInt(xe[0]);var He=xe[1]||"0";this.decimal=BigInt(He),this.decimalLen=He.length}else this.nan=!0}return(0,Be.Z)(Ce,[{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(Me){var $e="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Me,"0"));return BigInt($e)}},{key:"negate",value:function(){var Me=new Ce(this.toString());return Me.negative=!Me.negative,Me}},{key:"cal",value:function(Me,$e,xe){var He=Math.max(this.getDecimalStr().length,Me.getDecimalStr().length),Je=this.alignDecimal(He),et=Me.alignDecimal(He),nt=$e(Je,et).toString(),Ke=xe(He),xt=de(nt),kt=xt.negativeStr,Yt=xt.trimStr,Wt="".concat(kt).concat(Yt.padStart(Ke+1,"0"));return new Ce("".concat(Wt.slice(0,-Ke),".").concat(Wt.slice(-Ke)))}},{key:"add",value:function(Me){if(this.isInvalidate())return new Ce(Me);var $e=new Ce(Me);return $e.isInvalidate()?this:this.cal($e,function(xe,He){return xe+He},function(xe){return xe})}},{key:"multi",value:function(Me){var $e=new Ce(Me);return this.isInvalidate()||$e.isInvalidate()?new Ce(NaN):this.cal($e,function(xe,He){return xe*He},function(xe){return xe*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(Me){return this.toString()===(Me==null?void 0:Me.toString())}},{key:"lessEquals",value:function(Me){return this.add(Me.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Me?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Ce}(),Oe=function(){function Ce(ve){if((0,Ye.Z)(this,Ce),(0,gt.Z)(this,"origin",""),(0,gt.Z)(this,"number",void 0),(0,gt.Z)(this,"empty",void 0),ke(ve)){this.empty=!0;return}this.origin=String(ve),this.number=Number(ve)}return(0,Be.Z)(Ce,[{key:"negate",value:function(){return new Ce(-this.toNumber())}},{key:"add",value:function(Me){if(this.isInvalidate())return new Ce(Me);var $e=Number(Me);if(Number.isNaN($e))return this;var xe=this.number+$e;if(xe>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new Ce(Number.MIN_SAFE_INTEGER);var He=Math.max(ye(this.number),ye($e));return new Ce(xe.toFixed(He))}},{key:"multi",value:function(Me){var $e=Number(Me);if(this.isInvalidate()||Number.isNaN($e))return new Ce(NaN);var xe=this.number*$e;if(xe>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new Ce(Number.MIN_SAFE_INTEGER);var He=Math.max(ye(this.number),ye($e));return new Ce(xe.toFixed(He))}},{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(Me){return this.toNumber()===(Me==null?void 0:Me.toNumber())}},{key:"lessEquals",value:function(Me){return this.add(Me.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Me?this.isInvalidate()?"":ft(this.number):this.origin}}]),Ce}();function Le(Ce){return qe()?new Fe(Ce):new Oe(Ce)}function st(Ce,ve,Me){var $e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ce==="")return"";var xe=de(Ce),He=xe.negativeStr,Je=xe.integerStr,et=xe.decimalStr,nt="".concat(ve).concat(et),Ke="".concat(He).concat(Je);if(Me>=0){var xt=Number(et[Me]);if(xt>=5&&!$e){var kt=Le(Ce).add("".concat(He,"0.").concat("0".repeat(Me)).concat(10-xt));return st(kt.toString(),ve,Me,$e)}return Me===0?Ke:"".concat(Ke).concat(ve).concat(et.padEnd(Me,"0").slice(0,Me))}return nt===".0"?Ke:"".concat(Ke).concat(nt)}var ut=Le,Et=fe(92310),yt=fe.n(Et),vt=fe(36901),mt=fe(34280);function ht(Ce,ve){return typeof Proxy!="undefined"&&Ce?new Proxy(Ce,{get:function($e,xe){if(ve[xe])return ve[xe];var He=$e[xe];return typeof He=="function"?He.bind($e):He}}):Ce}var $t=fe(8654),Se=fe(59301),Ge=fe(48736);function rt(Ce,ve){var Me=(0,Se.useRef)(null);function $e(){try{var He=Ce.selectionStart,Je=Ce.selectionEnd,et=Ce.value,nt=et.substring(0,He),Ke=et.substring(Je);Me.current={start:He,end:Je,value:et,beforeTxt:nt,afterTxt:Ke}}catch(xt){}}function xe(){if(Ce&&Me.current&&ve)try{var He=Ce.value,Je=Me.current,et=Je.beforeTxt,nt=Je.afterTxt,Ke=Je.start,xt=He.length;if(He.startsWith(et))xt=et.length;else if(He.endsWith(nt))xt=He.length-Me.current.afterTxt.length;else{var kt=et[Ke-1],Yt=He.indexOf(kt,Ke-1);Yt!==-1&&(xt=Yt+1)}Ce.setSelectionRange(xt,xt)}catch(Wt){(0,Ge.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Wt.message))}}return[$e,xe]}var Pe=fe(49658),je=function(){var ve=(0,Se.useState)(!1),Me=(0,_e.Z)(ve,2),$e=Me[0],xe=Me[1];return(0,mt.Z)(function(){xe((0,Pe.Z)())},[]),$e},Ee=je,ze=fe(16089),Pt=200,ot=600;function St(Ce){var ve=Ce.prefixCls,Me=Ce.upNode,$e=Ce.downNode,xe=Ce.upDisabled,He=Ce.downDisabled,Je=Ce.onStep,et=Se.useRef(),nt=Se.useRef([]),Ke=Se.useRef();Ke.current=Je;var xt=function(){clearTimeout(et.current)},kt=function(ne,ge){ne.preventDefault(),xt(),Ke.current(ge);function ct(){Ke.current(ge),et.current=setTimeout(ct,Pt)}et.current=setTimeout(ct,ot)};Se.useEffect(function(){return function(){xt(),nt.current.forEach(function(ue){return ze.Z.cancel(ue)})}},[]);var Yt=Ee();if(Yt)return null;var Wt="".concat(ve,"-handler"),ae=yt()(Wt,"".concat(Wt,"-up"),(0,gt.Z)({},"".concat(Wt,"-up-disabled"),xe)),te=yt()(Wt,"".concat(Wt,"-down"),(0,gt.Z)({},"".concat(Wt,"-down-disabled"),He)),ee=function(){return nt.current.push((0,ze.Z)(xt))},ie={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Se.createElement("div",{className:"".concat(Wt,"-wrap")},Se.createElement("span",(0,se.Z)({},ie,{onMouseDown:function(ne){kt(ne,!0)},"aria-label":"Increase Value","aria-disabled":xe,className:ae}),Me||Se.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),Se.createElement("span",(0,se.Z)({},ie,{onMouseDown:function(ne){kt(ne,!1)},"aria-label":"Decrease Value","aria-disabled":He,className:te}),$e||Se.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function dt(Ce){var ve=typeof Ce=="number"?ft(Ce):de(Ce).fullStr,Me=ve.includes(".");return Me?de(ve.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Ce+"0"}var pe=fe(30292),ce=function(){var Ce=(0,Se.useRef)(0),ve=function(){ze.Z.cancel(Ce.current)};return(0,Se.useEffect)(function(){return ve},[]),function(Me){ve(),Ce.current=(0,ze.Z)(function(){Me()})}},Ve=["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"],wt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],lt=function(ve,Me){return ve||Me.isEmpty()?Me.toString():Me.toNumber()},we=function(ve){var Me=ut(ve);return Me.isInvalidate()?null:Me},Xe=Se.forwardRef(function(Ce,ve){var Me=Ce.prefixCls,$e=Ce.className,xe=Ce.style,He=Ce.min,Je=Ce.max,et=Ce.step,nt=et===void 0?1:et,Ke=Ce.defaultValue,xt=Ce.value,kt=Ce.disabled,Yt=Ce.readOnly,Wt=Ce.upHandler,ae=Ce.downHandler,te=Ce.keyboard,ee=Ce.changeOnWheel,ie=ee===void 0?!1:ee,ue=Ce.controls,ne=ue===void 0?!0:ue,ge=Ce.classNames,ct=Ce.stringMode,pt=Ce.parser,Ct=Ce.formatter,Re=Ce.precision,Zt=Ce.decimalSeparator,Rt=Ce.onChange,It=Ce.onInput,un=Ce.onPressEnter,kn=Ce.onStep,cn=Ce.changeOnBlur,wn=cn===void 0?!0:cn,$n=Ce.domRef,Zn=(0,me.Z)(Ce,Ve),mr="".concat(Me,"-input"),er=Se.useRef(null),ur=Se.useState(!1),nr=(0,_e.Z)(ur,2),In=nr[0],rr=nr[1],cr=Se.useRef(!1),Bn=Se.useRef(!1),Xn=Se.useRef(!1),Kn=Se.useState(function(){return ut(xt!=null?xt:Ke)}),xr=(0,_e.Z)(Kn,2),Ut=xr[0],pn=xr[1];function En(dn){xt===void 0&&pn(dn)}var Tn=Se.useCallback(function(dn,Gt){if(!Gt)return Re>=0?Re:Math.max(ye(dn),ye(nt))},[Re,nt]),Jn=Se.useCallback(function(dn){var Gt=String(dn);if(pt)return pt(Gt);var gn=Gt;return Zt&&(gn=gn.replace(Zt,".")),gn.replace(/[^\w.-]+/g,"")},[pt,Zt]),tr=Se.useRef(""),dr=Se.useCallback(function(dn,Gt){if(Ct)return Ct(dn,{userTyping:Gt,input:String(tr.current)});var gn=typeof dn=="number"?ft(dn):dn;if(!Gt){var nn=Tn(gn,Gt);if(Ue(gn)&&(Zt||nn>=0)){var Wn=Zt||".";gn=st(gn,Wn,nn)}}return gn},[Ct,Tn,Zt]),_n=Se.useState(function(){var dn=Ke!=null?Ke:xt;return Ut.isInvalidate()&&["string","number"].includes((0,Ie.Z)(dn))?Number.isNaN(dn)?"":dn:dr(Ut.toString(),!1)}),Fn=(0,_e.Z)(_n,2),hr=Fn[0],jt=Fn[1];tr.current=hr;function at(dn,Gt){jt(dr(dn.isInvalidate()?dn.toString(!1):dn.toString(!Gt),Gt))}var Qt=Se.useMemo(function(){return we(Je)},[Je,Re]),Cn=Se.useMemo(function(){return we(He)},[He,Re]),Gn=Se.useMemo(function(){return!Qt||!Ut||Ut.isInvalidate()?!1:Qt.lessEquals(Ut)},[Qt,Ut]),Ae=Se.useMemo(function(){return!Cn||!Ut||Ut.isInvalidate()?!1:Ut.lessEquals(Cn)},[Cn,Ut]),Ne=rt(er.current,In),Bt=(0,_e.Z)(Ne,2),Dt=Bt[0],We=Bt[1],Lt=function(Gt){return Qt&&!Gt.lessEquals(Qt)?Qt:Cn&&!Cn.lessEquals(Gt)?Cn:null},Xt=function(Gt){return!Lt(Gt)},tn=function(Gt,gn){var nn=Gt,Wn=Xt(nn)||nn.isEmpty();if(!nn.isEmpty()&&!gn&&(nn=Lt(nn)||nn,Wn=!0),!Yt&&!kt&&Wn){var wr=nn.toString(),Qn=Tn(wr,gn);return Qn>=0&&(nn=ut(st(wr,".",Qn)),Xt(nn)||(nn=ut(st(wr,".",Qn,!0)))),nn.equals(Ut)||(En(nn),Rt==null||Rt(nn.isEmpty()?null:lt(ct,nn)),xt===void 0&&at(nn,gn)),nn}return Ut},hn=ce(),_t=function dn(Gt){if(Dt(),tr.current=Gt,jt(Gt),!Bn.current){var gn=Jn(Gt),nn=ut(gn);nn.isNaN()||tn(nn,!0)}It==null||It(Gt),hn(function(){var Wn=Gt;pt||(Wn=Gt.replace(/。/g,".")),Wn!==Gt&&dn(Wn)})},qt=function(){Bn.current=!0},At=function(){Bn.current=!1,_t(er.current.value)},bt=function(Gt){_t(Gt.target.value)},en=function(Gt){var gn;if(!(Gt&&Gn||!Gt&&Ae)){cr.current=!1;var nn=ut(Xn.current?dt(nt):nt);Gt||(nn=nn.negate());var Wn=(Ut||ut(0)).add(nn.toString()),wr=tn(Wn,!1);kn==null||kn(lt(ct,wr),{offset:Xn.current?dt(nt):nt,type:Gt?"up":"down"}),(gn=er.current)===null||gn===void 0||gn.focus()}},vn=function(Gt){var gn=ut(Jn(hr)),nn;gn.isNaN()?nn=tn(Ut,Gt):nn=tn(gn,Gt),xt!==void 0?at(Ut,!1):nn.isNaN()||at(nn,!1)},mn=function(){cr.current=!0},xn=function(Gt){var gn=Gt.key,nn=Gt.shiftKey;cr.current=!0,Xn.current=nn,gn==="Enter"&&(Bn.current||(cr.current=!1),vn(!1),un==null||un(Gt)),te!==!1&&!Bn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gn)&&(en(gn==="Up"||gn==="ArrowUp"),Gt.preventDefault())},Hn=function(){cr.current=!1,Xn.current=!1};Se.useEffect(function(){if(ie&&In){var dn=function(nn){en(nn.deltaY<0),nn.preventDefault()},Gt=er.current;if(Gt)return Gt.addEventListener("wheel",dn,{passive:!1}),function(){return Gt.removeEventListener("wheel",dn)}}});var Yn=function(){wn&&vn(!1),rr(!1),cr.current=!1};return(0,mt.o)(function(){Ut.isInvalidate()||at(Ut,!1)},[Re,Ct]),(0,mt.o)(function(){var dn=ut(xt);pn(dn);var Gt=ut(Jn(hr));(!dn.equals(Gt)||!cr.current||Ct)&&at(dn,cr.current)},[xt]),(0,mt.o)(function(){Ct&&We()},[hr]),Se.createElement("div",{ref:$n,className:yt()(Me,$e,(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},"".concat(Me,"-focused"),In),"".concat(Me,"-disabled"),kt),"".concat(Me,"-readonly"),Yt),"".concat(Me,"-not-a-number"),Ut.isNaN()),"".concat(Me,"-out-of-range"),!Ut.isInvalidate()&&!Xt(Ut))),style:xe,onFocus:function(){rr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:Hn,onCompositionStart:qt,onCompositionEnd:At,onBeforeInput:mn},ne&&Se.createElement(St,{prefixCls:Me,upNode:Wt,downNode:ae,upDisabled:Gn,downDisabled:Ae,onStep:en}),Se.createElement("div",{className:"".concat(mr,"-wrap")},Se.createElement("input",(0,se.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":He,"aria-valuemax":Je,"aria-valuenow":Ut.isInvalidate()?null:Ut.toString(),step:nt},Zn,{ref:(0,$t.sQ)(er,ve),className:mr,value:hr,onChange:bt,disabled:kt,readOnly:Yt}))))}),Ze=Se.forwardRef(function(Ce,ve){var Me=Ce.disabled,$e=Ce.style,xe=Ce.prefixCls,He=xe===void 0?"rc-input-number":xe,Je=Ce.value,et=Ce.prefix,nt=Ce.suffix,Ke=Ce.addonBefore,xt=Ce.addonAfter,kt=Ce.className,Yt=Ce.classNames,Wt=(0,me.Z)(Ce,wt),ae=Se.useRef(null),te=Se.useRef(null),ee=Se.useRef(null),ie=function(ne){ee.current&&(0,pe.nH)(ee.current,ne)};return Se.useImperativeHandle(ve,function(){return ht(ee.current,{focus:ie,nativeElement:ae.current.nativeElement||te.current})}),Se.createElement(vt.BaseInput,{className:kt,triggerFocus:ie,prefixCls:He,value:Je,disabled:Me,style:$e,prefix:et,suffix:nt,addonAfter:xt,addonBefore:Ke,classNames:Yt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:ae},Se.createElement(Xe,(0,se.Z)({prefixCls:He,disabled:Me,ref:ee,domRef:te,className:Yt==null?void 0:Yt.input},Wt)))}),Mt=Ze,it=Mt},25930:function(Ot,zt,fe){"use strict";fe.d(zt,{Cd:function(){return rt}});var se=fe(54476),gt=fe(33885),Ie=fe(75931),_e=fe(59301),me=fe(92310),Ye=fe.n(me),Be={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},qe=function(){var Ee=(0,_e.useRef)([]),ze=(0,_e.useRef)(null);return(0,_e.useEffect)(function(){var Pt=Date.now(),ot=!1;Ee.current.forEach(function(St){if(St){ot=!0;var dt=St.style;dt.transitionDuration=".3s, .3s, .3s, .06s",ze.current&&Pt-ze.current<100&&(dt.transitionDuration="0s, 0s")}}),ot&&(ze.current=Date.now())}),Ee.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(Ee){var ze=(0,gt.Z)((0,gt.Z)({},Be),Ee),Pt=ze.className,ot=ze.percent,St=ze.prefixCls,dt=ze.strokeColor,pe=ze.strokeLinecap,ce=ze.strokeWidth,Ve=ze.style,wt=ze.trailColor,lt=ze.trailWidth,we=ze.transition,Xe=(0,Ie.Z)(ze,ke);delete Xe.gapPosition;var Ze=Array.isArray(ot)?ot:[ot],Mt=Array.isArray(dt)?dt:[dt],it=qe(),Ce=ce/2,ve=100-ce/2,Me="M ".concat(pe==="round"?Ce:0,",").concat(Ce,`
L `).concat(pe==="round"?ve:100,",").concat(Ce),$e="0 0 100 ".concat(ce),xe=0;return _e.createElement("svg",(0,se.Z)({className:Ye()("".concat(St,"-line"),Pt),viewBox:$e,preserveAspectRatio:"none",style:Ve},Xe),_e.createElement("path",{className:"".concat(St,"-line-trail"),d:Me,strokeLinecap:pe,stroke:wt,strokeWidth:lt||ce,fillOpacity:"0"}),Ze.map(function(He,Je){var et=1;switch(pe){case"round":et=1-ce/100;break;case"square":et=1-ce/2/100;break;default:et=1;break}var nt={strokeDasharray:"".concat(He*et,"px, 100px"),strokeDashoffset:"-".concat(xe,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ke=Mt[Je]||Mt[Mt.length-1];return xe+=He,_e.createElement("path",{key:Je,className:"".concat(St,"-line-path"),d:Me,strokeLinecap:pe,stroke:Ke,strokeWidth:ce,fillOpacity:"0",ref:function(kt){it[Je]=kt},style:nt})}))},Te=de,ye=fe(76190),ft=fe(42978),Ue=fe(47273),Fe=0,Oe=(0,Ue.Z)();function Le(){var je;return Oe?(je=Fe,Fe+=1):je="TEST_OR_SSR",je}var st=function(je){var Ee=_e.useState(),ze=(0,ft.Z)(Ee,2),Pt=ze[0],ot=ze[1];return _e.useEffect(function(){ot("rc_progress_".concat(Le()))},[]),je||Pt},ut=function(Ee){var ze=Ee.bg,Pt=Ee.children;return _e.createElement("div",{style:{width:"100%",height:"100%",background:ze}},Pt)};function Et(je,Ee){return Object.keys(je).map(function(ze){var Pt=parseFloat(ze),ot="".concat(Math.floor(Pt*Ee),"%");return"".concat(je[ze]," ").concat(ot)})}var yt=_e.forwardRef(function(je,Ee){var ze=je.prefixCls,Pt=je.color,ot=je.gradientId,St=je.radius,dt=je.style,pe=je.ptg,ce=je.strokeLinecap,Ve=je.strokeWidth,wt=je.size,lt=je.gapDegree,we=Pt&&(0,ye.Z)(Pt)==="object",Xe=we?"#FFF":void 0,Ze=wt/2,Mt=_e.createElement("circle",{className:"".concat(ze,"-circle-path"),r:St,cx:Ze,cy:Ze,stroke:Xe,strokeLinecap:ce,strokeWidth:Ve,opacity:pe===0?0:1,style:dt,ref:Ee});if(!we)return Mt;var it="".concat(ot,"-conic"),Ce=lt?"".concat(180+lt/2,"deg"):"0deg",ve=Et(Pt,(360-lt)/360),Me=Et(Pt,1),$e="conic-gradient(from ".concat(Ce,", ").concat(ve.join(", "),")"),xe="linear-gradient(to ".concat(lt?"bottom":"top",", ").concat(Me.join(", "),")");return _e.createElement(_e.Fragment,null,_e.createElement("mask",{id:it},Mt),_e.createElement("foreignObject",{x:0,y:0,width:wt,height:wt,mask:"url(#".concat(it,")")},_e.createElement(ut,{bg:xe},_e.createElement(ut,{bg:$e}))))}),vt=yt,mt=100,ht=function(Ee,ze,Pt,ot,St,dt,pe,ce,Ve,wt){var lt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,we=Pt/100*360*((360-dt)/360),Xe=dt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ze=(100-ot)/100*ze;Ve==="round"&&ot!==100&&(Ze+=wt/2,Ze>=ze&&(Ze=ze-.01));var Mt=mt/2;return{stroke:typeof ce=="string"?ce:void 0,strokeDasharray:"".concat(ze,"px ").concat(Ee),strokeDashoffset:Ze+lt,transform:"rotate(".concat(St+we+Xe,"deg)"),transformOrigin:"".concat(Mt,"px ").concat(Mt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},$t=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Se(je){var Ee=je!=null?je:[];return Array.isArray(Ee)?Ee:[Ee]}var Ge=function(Ee){var ze=(0,gt.Z)((0,gt.Z)({},Be),Ee),Pt=ze.id,ot=ze.prefixCls,St=ze.steps,dt=ze.strokeWidth,pe=ze.trailWidth,ce=ze.gapDegree,Ve=ce===void 0?0:ce,wt=ze.gapPosition,lt=ze.trailColor,we=ze.strokeLinecap,Xe=ze.style,Ze=ze.className,Mt=ze.strokeColor,it=ze.percent,Ce=(0,Ie.Z)(ze,$t),ve=mt/2,Me=st(Pt),$e="".concat(Me,"-gradient"),xe=ve-dt/2,He=Math.PI*2*xe,Je=Ve>0?90+Ve/2:-90,et=He*((360-Ve)/360),nt=(0,ye.Z)(St)==="object"?St:{count:St,gap:2},Ke=nt.count,xt=nt.gap,kt=Se(it),Yt=Se(Mt),Wt=Yt.find(function(ge){return ge&&(0,ye.Z)(ge)==="object"}),ae=Wt&&(0,ye.Z)(Wt)==="object",te=ae?"butt":we,ee=ht(He,et,0,100,Je,Ve,wt,lt,te,dt),ie=qe(),ue=function(){var ct=0;return kt.map(function(pt,Ct){var Re=Yt[Ct]||Yt[Yt.length-1],Zt=ht(He,et,ct,pt,Je,Ve,wt,Re,te,dt);return ct+=pt,_e.createElement(vt,{key:Ct,color:Re,ptg:pt,radius:xe,prefixCls:ot,gradientId:$e,style:Zt,strokeLinecap:te,strokeWidth:dt,gapDegree:Ve,ref:function(It){ie[Ct]=It},size:mt})}).reverse()},ne=function(){var ct=Math.round(Ke*(kt[0]/100)),pt=100/Ke,Ct=0;return new Array(Ke).fill(null).map(function(Re,Zt){var Rt=Zt<=ct-1?Yt[0]:lt,It=Rt&&(0,ye.Z)(Rt)==="object"?"url(#".concat($e,")"):void 0,un=ht(He,et,Ct,pt,Je,Ve,wt,Rt,"butt",dt,xt);return Ct+=(et-un.strokeDashoffset+xt)*100/et,_e.createElement("circle",{key:Zt,className:"".concat(ot,"-circle-path"),r:xe,cx:ve,cy:ve,stroke:It,strokeWidth:dt,opacity:1,style:un,ref:function(cn){ie[Zt]=cn}})})};return _e.createElement("svg",(0,se.Z)({className:Ye()("".concat(ot,"-circle"),Ze),viewBox:"0 0 ".concat(mt," ").concat(mt),style:Xe,id:Pt,role:"presentation"},Ce),!Ke&&_e.createElement("circle",{className:"".concat(ot,"-circle-trail"),r:xe,cx:ve,cy:ve,stroke:lt,strokeLinecap:te,strokeWidth:pe||dt,style:ee}),Ke?ne():ue())},rt=Ge,Pe={Line:Te,Circle:rt}},6551:function(Ot,zt,fe){"use strict";fe.d(zt,{ZP:function(){return Be}});var se=fe(42978),gt=fe(59301),Ie=fe(47273),_e=0,me=(0,Ie.Z)();function Ye(){var qe;return me?(qe=_e,_e+=1):qe="TEST_OR_SSR",qe}function Be(qe){var ke=gt.useState(),de=(0,se.Z)(ke,2),Te=de[0],ye=de[1];return gt.useEffect(function(){ye("rc_select_".concat(Ye()))},[]),qe||Te}},37463:function(Ot,zt,fe){"use strict";fe.d(zt,{Ac:function(){return Re},Xo:function(){return Rt},Wx:function(){return un},ZP:function(){return Gn},lk:function(){return Et}});var se=fe(54476),gt=fe(94480),Ie=fe(20068),_e=fe(33885),me=fe(42978),Ye=fe(75931),Be=fe(76190),qe=fe(18929),ke=fe(48736),de=fe(59301),Te=fe(92310),ye=fe.n(Te),ft=fe(34280),Ue=fe(49658),Fe=fe(8654),Oe=function(Ne){var Bt=Ne.className,Dt=Ne.customizeIcon,We=Ne.customizeIconProps,Lt=Ne.children,Xt=Ne.onMouseDown,tn=Ne.onClick,hn=typeof Dt=="function"?Dt(We):Dt;return de.createElement("span",{className:Bt,onMouseDown:function(qt){qt.preventDefault(),Xt==null||Xt(qt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:tn,"aria-hidden":!0},hn!==void 0?hn:de.createElement("span",{className:ye()(Bt.split(/\s+/).map(function(_t){return"".concat(_t,"-icon")}))},Lt))},Le=Oe,st=function(Ne,Bt,Dt,We,Lt){var Xt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,tn=arguments.length>6?arguments[6]:void 0,hn=arguments.length>7?arguments[7]:void 0,_t=de.useMemo(function(){if((0,Be.Z)(We)==="object")return We.clearIcon;if(Lt)return Lt},[We,Lt]),qt=de.useMemo(function(){return!!(!Xt&&We&&(Dt.length||tn)&&!(hn==="combobox"&&tn===""))},[We,Xt,Dt.length,tn,hn]);return{allowClear:qt,clearIcon:de.createElement(Le,{className:"".concat(Ne,"-clear"),onMouseDown:Bt,customizeIcon:_t},"\xD7")}},ut=de.createContext(null);function Et(){return de.useContext(ut)}function yt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ne=de.useState(!1),Bt=(0,me.Z)(Ne,2),Dt=Bt[0],We=Bt[1],Lt=de.useRef(null),Xt=function(){window.clearTimeout(Lt.current)};de.useEffect(function(){return Xt},[]);var tn=function(_t,qt){Xt(),Lt.current=window.setTimeout(function(){We(_t),qt&&qt()},Ae)};return[Dt,tn,Xt]}function vt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ne=de.useRef(null),Bt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Bt.current)}},[]);function Dt(We){(We||Ne.current===null)&&(Ne.current=We),window.clearTimeout(Bt.current),Bt.current=window.setTimeout(function(){Ne.current=null},Ae)}return[function(){return Ne.current},Dt]}function mt(Ae,Ne,Bt,Dt){var We=de.useRef(null);We.current={open:Ne,triggerOpen:Bt,customizedTrigger:Dt},de.useEffect(function(){function Lt(Xt){var tn;if(!((tn=We.current)!==null&&tn!==void 0&&tn.customizedTrigger)){var hn=Xt.target;hn.shadowRoot&&Xt.composed&&(hn=Xt.composedPath()[0]||hn),We.current.open&&Ae().filter(function(_t){return _t}).every(function(_t){return!_t.contains(hn)&&_t!==hn})&&We.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Lt),function(){return window.removeEventListener("mousedown",Lt)}},[])}var ht=fe(10228);function $t(Ae){return Ae&&![ht.Z.ESC,ht.Z.SHIFT,ht.Z.BACKSPACE,ht.Z.TAB,ht.Z.WIN_KEY,ht.Z.ALT,ht.Z.META,ht.Z.WIN_KEY_RIGHT,ht.Z.CTRL,ht.Z.SEMICOLON,ht.Z.EQUALS,ht.Z.CAPS_LOCK,ht.Z.CONTEXT_MENU,ht.Z.F1,ht.Z.F2,ht.Z.F3,ht.Z.F4,ht.Z.F5,ht.Z.F6,ht.Z.F7,ht.Z.F8,ht.Z.F9,ht.Z.F10,ht.Z.F11,ht.Z.F12].includes(Ae)}var Se=fe(26112),Ge=fe(83836);function rt(Ae,Ne,Bt){var Dt=(0,_e.Z)((0,_e.Z)({},Ae),Bt?Ne:{});return Object.keys(Ne).forEach(function(We){var Lt=Ne[We];typeof Lt=="function"&&(Dt[We]=function(){for(var Xt,tn=arguments.length,hn=new Array(tn),_t=0;_t<tn;_t++)hn[_t]=arguments[_t];return Lt.apply(void 0,hn),(Xt=Ae[We])===null||Xt===void 0?void 0:Xt.call.apply(Xt,[Ae].concat(hn))})}),Dt}var Pe=rt,je=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ee=function(Ne,Bt){var Dt=Ne.prefixCls,We=Ne.id,Lt=Ne.inputElement,Xt=Ne.autoFocus,tn=Ne.autoComplete,hn=Ne.editable,_t=Ne.activeDescendantId,qt=Ne.value,At=Ne.open,bt=Ne.attrs,en=(0,Ye.Z)(Ne,je),vn=Lt||de.createElement("input",null),mn=vn,xn=mn.ref,Hn=mn.props;return(0,ke.Kp)(!("maxLength"in vn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),vn=de.cloneElement(vn,(0,_e.Z)((0,_e.Z)((0,_e.Z)({type:"search"},Pe(en,Hn,!0)),{},{id:We,ref:(0,Fe.sQ)(Bt,xn),autoComplete:tn||"off",autoFocus:Xt,className:ye()("".concat(Dt,"-selection-search-input"),Hn==null?void 0:Hn.className),role:"combobox","aria-expanded":At||!1,"aria-haspopup":"listbox","aria-owns":"".concat(We,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(We,"_list"),"aria-activedescendant":At?_t:void 0},bt),{},{value:hn?qt:"",readOnly:!hn,unselectable:hn?null:"on",style:(0,_e.Z)((0,_e.Z)({},Hn.style),{},{opacity:hn?null:0})})),vn},ze=de.forwardRef(Ee),Pt=ze;function ot(Ae){return Array.isArray(Ae)?Ae:Ae!==void 0?[Ae]:[]}var St=typeof window!="undefined"&&window.document&&window.document.documentElement,dt=St;function pe(Ae){return Ae!=null}function ce(Ae){return!Ae&&Ae!==0}function Ve(Ae){return["string","number"].includes((0,Be.Z)(Ae))}function wt(Ae){var Ne=void 0;return Ae&&(Ve(Ae.title)?Ne=Ae.title.toString():Ve(Ae.label)&&(Ne=Ae.label.toString())),Ne}function lt(Ae,Ne){dt?de.useLayoutEffect(Ae,Ne):de.useEffect(Ae,Ne)}function we(Ae){var Ne;return(Ne=Ae.key)!==null&&Ne!==void 0?Ne:Ae.value}var Xe=function(Ne){Ne.preventDefault(),Ne.stopPropagation()},Ze=function(Ne){var Bt=Ne.id,Dt=Ne.prefixCls,We=Ne.values,Lt=Ne.open,Xt=Ne.searchValue,tn=Ne.autoClearSearchValue,hn=Ne.inputRef,_t=Ne.placeholder,qt=Ne.disabled,At=Ne.mode,bt=Ne.showSearch,en=Ne.autoFocus,vn=Ne.autoComplete,mn=Ne.activeDescendantId,xn=Ne.tabIndex,Hn=Ne.removeIcon,Yn=Ne.maxTagCount,dn=Ne.maxTagTextLength,Gt=Ne.maxTagPlaceholder,gn=Gt===void 0?function(yn){return"+ ".concat(yn.length," ...")}:Gt,nn=Ne.tagRender,Wn=Ne.onToggleOpen,wr=Ne.onRemove,Qn=Ne.onInputChange,Lr=Ne.onInputPaste,Mr=Ne.onInputKeyDown,Cr=Ne.onInputMouseDown,ir=Ne.onInputCompositionStart,Rr=Ne.onInputCompositionEnd,gr=Ne.onInputBlur,or=de.useRef(null),Er=(0,de.useState)(0),Tr=(0,me.Z)(Er,2),pr=Tr[0],qn=Tr[1],jn=(0,de.useState)(!1),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1],Dr="".concat(Dt,"-selection"),Wr=Lt||At==="multiple"&&tn===!1||At==="tags"?Xt:"",Nr=At==="tags"||At==="multiple"&&tn===!1||bt&&(Lt||Vr);lt(function(){qn(or.current.scrollWidth)},[Wr]);var _r=function(on,Dn,ar,Vt,Ft){return de.createElement("span",{title:wt(on),className:ye()("".concat(Dr,"-item"),(0,Ie.Z)({},"".concat(Dr,"-item-disabled"),ar))},de.createElement("span",{className:"".concat(Dr,"-item-content")},Dn),Vt&&de.createElement(Le,{className:"".concat(Dr,"-item-remove"),onMouseDown:Xe,onClick:Ft,customizeIcon:Hn},"\xD7"))},ii=function(on,Dn,ar,Vt,Ft,rn){var ln=function(sr){Xe(sr),Wn(!Lt)};return de.createElement("span",{onMouseDown:ln},nn({label:Dn,value:on,disabled:ar,closable:Vt,onClose:Ft,isMaxTag:!!rn}))},Or=function(on){var Dn=on.disabled,ar=on.label,Vt=on.value,Ft=!qt&&!Dn,rn=ar;if(typeof dn=="number"&&(typeof ar=="string"||typeof ar=="number")){var ln=String(rn);ln.length>dn&&(rn="".concat(ln.slice(0,dn),"..."))}var Mn=function(Vn){Vn&&Vn.stopPropagation(),wr(on)};return typeof nn=="function"?ii(Vt,rn,Dn,Ft,Mn):_r(on,rn,Dn,Ft,Mn)},Rn=function(on){if(!We.length)return null;var Dn=typeof gn=="function"?gn(on):gn;return typeof nn=="function"?ii(void 0,Dn,!1,!1,void 0,!0):_r({title:Dn},Dn,!1)},Ht=de.createElement("div",{className:"".concat(Dr,"-search"),style:{width:pr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},de.createElement(Pt,{ref:hn,open:Lt,prefixCls:Dt,id:Bt,inputElement:null,disabled:qt,autoFocus:en,autoComplete:vn,editable:Nr,activeDescendantId:mn,value:Wr,onKeyDown:Mr,onMouseDown:Cr,onChange:Qn,onPaste:Lr,onCompositionStart:ir,onCompositionEnd:Rr,onBlur:gr,tabIndex:xn,attrs:(0,Se.Z)(Ne,!0)}),de.createElement("span",{ref:or,className:"".concat(Dr,"-search-mirror"),"aria-hidden":!0},Wr,"\xA0")),Kt=de.createElement(Ge.Z,{prefixCls:"".concat(Dr,"-overflow"),data:We,renderItem:Or,renderRest:Rn,suffix:Ht,itemKey:we,maxCount:Yn});return de.createElement("span",{className:"".concat(Dr,"-wrap")},Kt,!We.length&&!Wr&&de.createElement("span",{className:"".concat(Dr,"-placeholder")},_t))},Mt=Ze,it=function(Ne){var Bt=Ne.inputElement,Dt=Ne.prefixCls,We=Ne.id,Lt=Ne.inputRef,Xt=Ne.disabled,tn=Ne.autoFocus,hn=Ne.autoComplete,_t=Ne.activeDescendantId,qt=Ne.mode,At=Ne.open,bt=Ne.values,en=Ne.placeholder,vn=Ne.tabIndex,mn=Ne.showSearch,xn=Ne.searchValue,Hn=Ne.activeValue,Yn=Ne.maxLength,dn=Ne.onInputKeyDown,Gt=Ne.onInputMouseDown,gn=Ne.onInputChange,nn=Ne.onInputPaste,Wn=Ne.onInputCompositionStart,wr=Ne.onInputCompositionEnd,Qn=Ne.onInputBlur,Lr=Ne.title,Mr=de.useState(!1),Cr=(0,me.Z)(Mr,2),ir=Cr[0],Rr=Cr[1],gr=qt==="combobox",or=gr||mn,Er=bt[0],Tr=xn||"";gr&&Hn&&!ir&&(Tr=Hn),de.useEffect(function(){gr&&Rr(!1)},[gr,Hn]);var pr=qt!=="combobox"&&!At&&!mn?!1:!!Tr,qn=Lr===void 0?wt(Er):Lr,jn=de.useMemo(function(){return Er?null:de.createElement("span",{className:"".concat(Dt,"-selection-placeholder"),style:pr?{visibility:"hidden"}:void 0},en)},[Er,pr,en,Dt]);return de.createElement("span",{className:"".concat(Dt,"-selection-wrap")},de.createElement("span",{className:"".concat(Dt,"-selection-search")},de.createElement(Pt,{ref:Lt,prefixCls:Dt,id:We,open:At,inputElement:Bt,disabled:Xt,autoFocus:tn,autoComplete:hn,editable:or,activeDescendantId:_t,value:Tr,onKeyDown:dn,onMouseDown:Gt,onChange:function(Vr){Rr(!0),gn(Vr)},onPaste:nn,onCompositionStart:Wn,onCompositionEnd:wr,onBlur:Qn,tabIndex:vn,attrs:(0,Se.Z)(Ne,!0),maxLength:gr?Yn:void 0})),!gr&&Er?de.createElement("span",{className:"".concat(Dt,"-selection-item"),title:qn,style:pr?{visibility:"hidden"}:void 0},Er.label):null,jn)},Ce=it,ve=function(Ne,Bt){var Dt=(0,de.useRef)(null),We=(0,de.useRef)(!1),Lt=Ne.prefixCls,Xt=Ne.open,tn=Ne.mode,hn=Ne.showSearch,_t=Ne.tokenWithEnter,qt=Ne.disabled,At=Ne.prefix,bt=Ne.autoClearSearchValue,en=Ne.onSearch,vn=Ne.onSearchSubmit,mn=Ne.onToggleOpen,xn=Ne.onInputKeyDown,Hn=Ne.onInputBlur,Yn=Ne.domRef;de.useImperativeHandle(Bt,function(){return{focus:function(qn){Dt.current.focus(qn)},blur:function(){Dt.current.blur()}}});var dn=vt(0),Gt=(0,me.Z)(dn,2),gn=Gt[0],nn=Gt[1],Wn=function(qn){var jn=qn.which,Br=Dt.current instanceof HTMLTextAreaElement;!Br&&Xt&&(jn===ht.Z.UP||jn===ht.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),jn===ht.Z.ENTER&&tn==="tags"&&!We.current&&!Xt&&(vn==null||vn(qn.target.value)),!(Br&&!Xt&&~[ht.Z.UP,ht.Z.DOWN,ht.Z.LEFT,ht.Z.RIGHT].indexOf(jn))&&$t(jn)&&mn(!0)},wr=function(){nn(!0)},Qn=(0,de.useRef)(null),Lr=function(qn){en(qn,!0,We.current)!==!1&&mn(!0)},Mr=function(){We.current=!0},Cr=function(qn){We.current=!1,tn!=="combobox"&&Lr(qn.target.value)},ir=function(qn){var jn=qn.target.value;if(_t&&Qn.current&&/[\r\n]/.test(Qn.current)){var Br=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");jn=jn.replace(Br,Qn.current)}Qn.current=null,Lr(jn)},Rr=function(qn){var jn=qn.clipboardData,Br=jn==null?void 0:jn.getData("text");Qn.current=Br||""},gr=function(qn){var jn=qn.target;if(jn!==Dt.current){var Br=document.body.style.msTouchAction!==void 0;Br?setTimeout(function(){Dt.current.focus()}):Dt.current.focus()}},or=function(qn){var jn=gn();qn.target!==Dt.current&&!jn&&!(tn==="combobox"&&qt)&&qn.preventDefault(),(tn!=="combobox"&&(!hn||!jn)||!Xt)&&(Xt&&bt!==!1&&en("",!0,!1),mn())},Er={inputRef:Dt,onInputKeyDown:Wn,onInputMouseDown:wr,onInputChange:ir,onInputPaste:Rr,onInputCompositionStart:Mr,onInputCompositionEnd:Cr,onInputBlur:Hn},Tr=tn==="multiple"||tn==="tags"?de.createElement(Mt,(0,se.Z)({},Ne,Er)):de.createElement(Ce,(0,se.Z)({},Ne,Er));return de.createElement("div",{ref:Yn,className:"".concat(Lt,"-selector"),onClick:gr,onMouseDown:or},At&&de.createElement("div",{className:"".concat(Lt,"-prefix")},At),Tr)},Me=de.forwardRef(ve),$e=Me,xe=fe(65030),He=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Je=function(Ne){var Bt=Ne===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"}}},et=function(Ne,Bt){var Dt=Ne.prefixCls,We=Ne.disabled,Lt=Ne.visible,Xt=Ne.children,tn=Ne.popupElement,hn=Ne.animation,_t=Ne.transitionName,qt=Ne.dropdownStyle,At=Ne.dropdownClassName,bt=Ne.direction,en=bt===void 0?"ltr":bt,vn=Ne.placement,mn=Ne.builtinPlacements,xn=Ne.dropdownMatchSelectWidth,Hn=Ne.dropdownRender,Yn=Ne.dropdownAlign,dn=Ne.getPopupContainer,Gt=Ne.empty,gn=Ne.getTriggerDOMNode,nn=Ne.onPopupVisibleChange,Wn=Ne.onPopupMouseEnter,wr=(0,Ye.Z)(Ne,He),Qn="".concat(Dt,"-dropdown"),Lr=tn;Hn&&(Lr=Hn(tn));var Mr=de.useMemo(function(){return mn||Je(xn)},[mn,xn]),Cr=hn?"".concat(Qn,"-").concat(hn):_t,ir=typeof xn=="number",Rr=de.useMemo(function(){return ir?null:xn===!1?"minWidth":"width"},[xn,ir]),gr=qt;ir&&(gr=(0,_e.Z)((0,_e.Z)({},gr),{},{width:xn}));var or=de.useRef(null);return de.useImperativeHandle(Bt,function(){return{getPopupElement:function(){var Tr;return(Tr=or.current)===null||Tr===void 0?void 0:Tr.popupElement}}}),de.createElement(xe.Z,(0,se.Z)({},wr,{showAction:nn?["click"]:[],hideAction:nn?["click"]:[],popupPlacement:vn||(en==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Mr,prefixCls:Qn,popupTransitionName:Cr,popup:de.createElement("div",{onMouseEnter:Wn},Lr),ref:or,stretch:Rr,popupAlign:Yn,popupVisible:Lt,getPopupContainer:dn,popupClassName:ye()(At,(0,Ie.Z)({},"".concat(Qn,"-empty"),Gt)),popupStyle:gr,getTriggerDOMNode:gn,onPopupVisibleChange:nn}),Xt)},nt=de.forwardRef(et),Ke=nt,xt=fe(66712);function kt(Ae,Ne){var Bt=Ae.key,Dt;return"value"in Ae&&(Dt=Ae.value),Bt!=null?Bt:Dt!==void 0?Dt:"rc-index-key-".concat(Ne)}function Yt(Ae){return typeof Ae!="undefined"&&!Number.isNaN(Ae)}function Wt(Ae,Ne){var Bt=Ae||{},Dt=Bt.label,We=Bt.value,Lt=Bt.options,Xt=Bt.groupLabel,tn=Dt||(Ne?"children":"label");return{label:tn,value:We||"value",options:Lt||"options",groupLabel:Xt||tn}}function ae(Ae){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=Ne.fieldNames,Dt=Ne.childrenAsData,We=[],Lt=Wt(Bt,!1),Xt=Lt.label,tn=Lt.value,hn=Lt.options,_t=Lt.groupLabel;function qt(At,bt){Array.isArray(At)&&At.forEach(function(en){if(bt||!(hn in en)){var vn=en[tn];We.push({key:kt(en,We.length),groupOption:bt,data:en,label:en[Xt],value:vn})}else{var mn=en[_t];mn===void 0&&Dt&&(mn=en.label),We.push({key:kt(en,We.length),group:!0,data:en,label:mn}),qt(en[hn],!0)}})}return qt(Ae,!1),We}function te(Ae){var Ne=(0,_e.Z)({},Ae);return"props"in Ne||Object.defineProperty(Ne,"props",{get:function(){return(0,ke.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ne}}),Ne}var ee=function(Ne,Bt,Dt){if(!Bt||!Bt.length)return null;var We=!1,Lt=function tn(hn,_t){var qt=(0,xt.Z)(_t),At=qt[0],bt=qt.slice(1);if(!At)return[hn];var en=hn.split(At);return We=We||en.length>1,en.reduce(function(vn,mn){return[].concat((0,gt.Z)(vn),(0,gt.Z)(tn(mn,bt)))},[]).filter(Boolean)},Xt=Lt(Ne,Bt);return We?typeof Dt!="undefined"?Xt.slice(0,Dt):Xt:null},ie=de.createContext(null),ue=ie;function ne(Ae){var Ne=Ae.visible,Bt=Ae.values;if(!Ne)return null;var Dt=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Bt.slice(0,Dt).map(function(We){var Lt=We.label,Xt=We.value;return["number","string"].includes((0,Be.Z)(Lt))?Lt:Xt}).join(", ")),Bt.length>Dt?", ...":null)}var ge=["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"],ct=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],pt=function(Ne){return Ne==="tags"||Ne==="multiple"},Ct=de.forwardRef(function(Ae,Ne){var Bt,Dt=Ae.id,We=Ae.prefixCls,Lt=Ae.className,Xt=Ae.showSearch,tn=Ae.tagRender,hn=Ae.direction,_t=Ae.omitDomProps,qt=Ae.displayValues,At=Ae.onDisplayValuesChange,bt=Ae.emptyOptions,en=Ae.notFoundContent,vn=en===void 0?"Not Found":en,mn=Ae.onClear,xn=Ae.mode,Hn=Ae.disabled,Yn=Ae.loading,dn=Ae.getInputElement,Gt=Ae.getRawInputElement,gn=Ae.open,nn=Ae.defaultOpen,Wn=Ae.onDropdownVisibleChange,wr=Ae.activeValue,Qn=Ae.onActiveValueChange,Lr=Ae.activeDescendantId,Mr=Ae.searchValue,Cr=Ae.autoClearSearchValue,ir=Ae.onSearch,Rr=Ae.onSearchSplit,gr=Ae.tokenSeparators,or=Ae.allowClear,Er=Ae.prefix,Tr=Ae.suffixIcon,pr=Ae.clearIcon,qn=Ae.OptionList,jn=Ae.animation,Br=Ae.transitionName,Vr=Ae.dropdownStyle,Jr=Ae.dropdownClassName,Dr=Ae.dropdownMatchSelectWidth,Wr=Ae.dropdownRender,Nr=Ae.dropdownAlign,_r=Ae.placement,ii=Ae.builtinPlacements,Or=Ae.getPopupContainer,Rn=Ae.showAction,Ht=Rn===void 0?[]:Rn,Kt=Ae.onFocus,yn=Ae.onBlur,on=Ae.onKeyUp,Dn=Ae.onKeyDown,ar=Ae.onMouseDown,Vt=(0,Ye.Z)(Ae,ge),Ft=pt(xn),rn=(Xt!==void 0?Xt:Ft)||xn==="combobox",ln=(0,_e.Z)({},Vt);ct.forEach(function(lr){delete ln[lr]}),_t==null||_t.forEach(function(lr){delete ln[lr]});var Mn=de.useState(!1),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1];de.useEffect(function(){yr((0,Ue.Z)())},[]);var br=de.useRef(null),Sr=de.useRef(null),zr=de.useRef(null),Ar=de.useRef(null),Hr=de.useRef(null),ei=de.useRef(!1),Li=yt(),Oi=(0,me.Z)(Li,3),xi=Oi[0],vi=Oi[1],Xi=Oi[2];de.useImperativeHandle(Ne,function(){var lr,zn;return{focus:(lr=Ar.current)===null||lr===void 0?void 0:lr.focus,blur:(zn=Ar.current)===null||zn===void 0?void 0:zn.blur,scrollTo:function(fi){var Yr;return(Yr=Hr.current)===null||Yr===void 0?void 0:Yr.scrollTo(fi)},nativeElement:br.current||Sr.current}});var fr=de.useMemo(function(){var lr;if(xn!=="combobox")return Mr;var zn=(lr=qt[0])===null||lr===void 0?void 0:lr.value;return typeof zn=="string"||typeof zn=="number"?String(zn):""},[Mr,xn,qt]),to=xn==="combobox"&&typeof dn=="function"&&dn()||null,ti=typeof Gt=="function"&&Gt(),Ni=(0,Fe.x1)(Sr,ti==null||(Bt=ti.props)===null||Bt===void 0?void 0:Bt.ref),ao=de.useState(!1),Ji=(0,me.Z)(ao,2),mi=Ji[0],Ri=Ji[1];(0,ft.Z)(function(){Ri(!0)},[]);var Zr=(0,qe.Z)(!1,{defaultValue:nn,value:gn}),Hi=(0,me.Z)(Zr,2),so=Hi[0],_i=Hi[1],Qr=mi?so:!1,xo=!vn&&bt;(Hn||xo&&Qr&&xn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,Ln=de.useCallback(function(lr){var zn=lr!==void 0?lr:!Qr;Hn||(_i(zn),Qr!==zn&&(Wn==null||Wn(zn)))},[Hn,Qr,_i,Wn]),On=de.useMemo(function(){return(gr||[]).some(function(lr){return[`
`,`\r
`].includes(lr)})},[gr]),Pn=de.useContext(ue)||{},Nn=Pn.maxCount,vr=Pn.rawValues,Ir=function(zn,ci,fi){if(!(Ft&&Yt(Nn)&&(vr==null?void 0:vr.size)>=Nn)){var Yr=!0,ni=zn;Qn==null||Qn(null);var Vi=ee(zn,gr,Yt(Nn)?Nn-vr.size:void 0),Zi=fi?null:Vi;return xn!=="combobox"&&Zi&&(ni="",Rr==null||Rr(Zi),Ln(!1),Yr=!1),ir&&fr!==ni&&ir(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(zn){!zn||!zn.trim()||ir(zn,{source:"submit"})};de.useEffect(function(){!Qr&&!Ft&&xn!=="combobox"&&Ir("",!1,!1)},[Qr]),de.useEffect(function(){so&&Hn&&_i(!1),Hn&&!ei.current&&vi(!1)},[Hn]);var gi=vt(),ui=(0,me.Z)(gi,2),Kr=ui[0],Wi=ui[1],Qi=de.useRef(!1),Mi=function(zn){var ci=Kr(),fi=zn.key,Yr=fi==="Enter";if(Yr&&(xn!=="combobox"&&zn.preventDefault(),Qr||Ln(!0)),Wi(!!fr),fi==="Backspace"&&!ci&&Ft&&!fr&&qt.length){for(var ni=(0,gt.Z)(qt),Vi=null,Zi=ni.length-1;Zi>=0;Zi-=1){var ro=ni[Zi];if(!ro.disabled){ni.splice(Zi,1),Vi=ro;break}}Vi&&At(ni,{type:"remove",values:[Vi]})}for(var Ti=arguments.length,Ai=new Array(Ti>1?Ti-1:0),Ui=1;Ui<Ti;Ui++)Ai[Ui-1]=arguments[Ui];if(Qr&&(!Yr||!Qi.current)){var co;Yr&&(Qi.current=!0),(co=Hr.current)===null||co===void 0||co.onKeyDown.apply(co,[zn].concat(Ai))}Dn==null||Dn.apply(void 0,[zn].concat(Ai))},qi=function(zn){for(var ci=arguments.length,fi=new Array(ci>1?ci-1:0),Yr=1;Yr<ci;Yr++)fi[Yr-1]=arguments[Yr];if(Qr){var ni;(ni=Hr.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[zn].concat(fi))}zn.key==="Enter"&&(Qi.current=!1),on==null||on.apply(void 0,[zn].concat(fi))},no=function(zn){var ci=qt.filter(function(fi){return fi!==zn});At(ci,{type:"remove",values:[zn]})},ji=function(){Qi.current=!1},Ao=de.useRef(!1),ja=function(){vi(!0),Hn||(Kt&&!Ao.current&&Kt.apply(void 0,arguments),Ht.includes("focus")&&Ln(!0)),Ao.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Ao.current=!1,ei.current=!1,Ln(!1)}),!Hn&&(fr&&(xn==="tags"?ir(fr,{source:"submit"}):xn==="multiple"&&ir("",{source:"blur"})),yn&&yn.apply(void 0,arguments))},$i=[];de.useEffect(function(){return function(){$i.forEach(function(lr){return clearTimeout(lr)}),$i.splice(0,$i.length)}},[]);var uo=function(zn){var ci,fi=zn.target,Yr=(ci=zr.current)===null||ci===void 0?void 0:ci.getPopupElement();if(Yr&&Yr.contains(fi)){var ni=setTimeout(function(){var Ti=$i.indexOf(ni);if(Ti!==-1&&$i.splice(Ti,1),Xi(),!Vn&&!Yr.contains(document.activeElement)){var Ai;(Ai=Ar.current)===null||Ai===void 0||Ai.focus()}});$i.push(ni)}for(var Vi=arguments.length,Zi=new Array(Vi>1?Vi-1:0),ro=1;ro<Vi;ro++)Zi[ro-1]=arguments[ro];ar==null||ar.apply(void 0,[zn].concat(Zi))},zi=de.useState({}),ba=(0,me.Z)(zi,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(zn){Ln(zn)}),mt(function(){var lr;return[br.current,(lr=zr.current)===null||lr===void 0?void 0:lr.getPopupElement()]},lo,Ln,!!ti);var Ua=de.useMemo(function(){return(0,_e.Z)((0,_e.Z)({},Ae),{},{notFoundContent:vn,open:Qr,triggerOpen:lo,id:Dt,showSearch:rn,multiple:Ft,toggleOpen:Ln})},[Ae,vn,lo,Qr,Dt,rn,Ft,Ln]),Ko=!!Tr||Yn,Yo;Ko&&(Yo=de.createElement(Le,{className:ye()("".concat(We,"-arrow"),(0,Ie.Z)({},"".concat(We,"-arrow-loading"),Yn)),customizeIcon:Tr,customizeIconProps:{loading:Yn,searchValue:fr,open:Qr,focused:xi,showSearch:rn}}));var wo=function(){var zn;mn==null||mn(),(zn=Ar.current)===null||zn===void 0||zn.focus(),At([],{type:"clear",values:qt}),Ir("",!1,!1)},Xo=st(We,wo,qt,or,pr,Hn,fr,xn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Po=de.createElement(qn,{ref:Hr}),Sa=ye()(We,Lt,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(We,"-focused"),xi),"".concat(We,"-multiple"),Ft),"".concat(We,"-single"),!Ft),"".concat(We,"-allow-clear"),or),"".concat(We,"-show-arrow"),Ko),"".concat(We,"-disabled"),Hn),"".concat(We,"-loading"),Yn),"".concat(We,"-open"),Qr),"".concat(We,"-customize-input"),to),"".concat(We,"-show-search"),rn)),Bo=de.createElement(Ke,{ref:zr,disabled:Hn,prefixCls:We,visible:lo,popupElement:Po,animation:jn,transitionName:Br,dropdownStyle:Vr,dropdownClassName:Jr,direction:hn,dropdownMatchSelectWidth:Dr,dropdownRender:Wr,dropdownAlign:Nr,placement:_r,builtinPlacements:ii,getPopupContainer:Or,empty:bt,getTriggerDOMNode:function(zn){return Sr.current||zn},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?de.cloneElement(ti,{ref:Ni}):de.createElement($e,(0,se.Z)({},Ae,{domRef:Sr,prefixCls:We,inputElement:to,ref:Ar,id:Dt,prefix:Er,showSearch:rn,autoClearSearchValue:Cr,mode:xn,activeDescendantId:Lr,tagRender:tn,values:qt,open:Qr,onToggleOpen:Ln,activeValue:wr,searchValue:fr,onSearch:Ir,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:On,onInputBlur:ji}))),wi;return ti?wi=Bo:wi=de.createElement("div",(0,se.Z)({className:Sa},ln,{ref:br,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:ja,onBlur:ya}),de.createElement(ne,{visible:xi&&!Qr,values:qt}),Bo,Yo,Ca&&Jo),de.createElement(ut.Provider,{value:Ua},wi)}),Re=Ct,Zt=function(){return null};Zt.isSelectOptGroup=!0;var Rt=Zt,It=function(){return null};It.isSelectOption=!0;var un=It,kn=fe(80547),cn=fe(2738),wn=fe(48911);function $n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Zn=["disabled","title","children","style","className"];function mr(Ae){return typeof Ae=="string"||typeof Ae=="number"}var er=function(Ne,Bt){var Dt=Et(),We=Dt.prefixCls,Lt=Dt.id,Xt=Dt.open,tn=Dt.multiple,hn=Dt.mode,_t=Dt.searchValue,qt=Dt.toggleOpen,At=Dt.notFoundContent,bt=Dt.onPopupScroll,en=de.useContext(ue),vn=en.maxCount,mn=en.flattenOptions,xn=en.onActiveValue,Hn=en.defaultActiveFirstOption,Yn=en.onSelect,dn=en.menuItemSelectedIcon,Gt=en.rawValues,gn=en.fieldNames,nn=en.virtual,Wn=en.direction,wr=en.listHeight,Qn=en.listItemHeight,Lr=en.optionRender,Mr="".concat(We,"-item"),Cr=(0,kn.Z)(function(){return mn},[Xt,mn],function(Rn,Ht){return Ht[0]&&Rn[1]!==Ht[1]}),ir=de.useRef(null),Rr=de.useMemo(function(){return tn&&Yt(vn)&&(Gt==null?void 0:Gt.size)>=vn},[tn,vn,Gt==null?void 0:Gt.size]),gr=function(Ht){Ht.preventDefault()},or=function(Ht){var Kt;(Kt=ir.current)===null||Kt===void 0||Kt.scrollTo(typeof Ht=="number"?{index:Ht}:Ht)},Er=de.useCallback(function(Rn){return hn==="combobox"?!1:Gt.has(Rn)},[hn,(0,gt.Z)(Gt).toString(),Gt.size]),Tr=function(Ht){for(var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,yn=Cr.length,on=0;on<yn;on+=1){var Dn=(Ht+on*Kt+yn)%yn,ar=Cr[Dn]||{},Vt=ar.group,Ft=ar.data;if(!Vt&&!(Ft!=null&&Ft.disabled)&&(Er(Ft.value)||!Rr))return Dn}return-1},pr=de.useState(function(){return Tr(0)}),qn=(0,me.Z)(pr,2),jn=qn[0],Br=qn[1],Vr=function(Ht){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Br(Ht);var yn={source:Kt?"keyboard":"mouse"},on=Cr[Ht];if(!on){xn(null,-1,yn);return}xn(on.value,Ht,yn)};(0,de.useEffect)(function(){Vr(Hn!==!1?Tr(0):-1)},[Cr.length,_t]);var Jr=de.useCallback(function(Rn){return hn==="combobox"?String(Rn).toLowerCase()===_t.toLowerCase():Gt.has(Rn)},[hn,_t,(0,gt.Z)(Gt).toString(),Gt.size]);(0,de.useEffect)(function(){var Rn=setTimeout(function(){if(!tn&&Xt&&Gt.size===1){var Kt=Array.from(Gt)[0],yn=Cr.findIndex(function(on){var Dn=on.data;return _t?String(Dn.value).startsWith(_t):Dn.value===Kt});yn!==-1&&(Vr(yn),or(yn))}});if(Xt){var Ht;(Ht=ir.current)===null||Ht===void 0||Ht.scrollTo(void 0)}return function(){return clearTimeout(Rn)}},[Xt,_t]);var Dr=function(Ht){Ht!==void 0&&Yn(Ht,{selected:!Gt.has(Ht)}),tn||qt(!1)};if(de.useImperativeHandle(Bt,function(){return{onKeyDown:function(Ht){var Kt=Ht.which,yn=Ht.ctrlKey;switch(Kt){case ht.Z.N:case ht.Z.P:case ht.Z.UP:case ht.Z.DOWN:{var on=0;if(Kt===ht.Z.UP?on=-1:Kt===ht.Z.DOWN?on=1:$n()&&yn&&(Kt===ht.Z.N?on=1:Kt===ht.Z.P&&(on=-1)),on!==0){var Dn=Tr(jn+on,on);or(Dn),Vr(Dn,!0)}break}case ht.Z.TAB:case ht.Z.ENTER:{var ar,Vt=Cr[jn];Vt&&!(Vt!=null&&(ar=Vt.data)!==null&&ar!==void 0&&ar.disabled)&&!Rr?Dr(Vt.value):Dr(void 0),Xt&&Ht.preventDefault();break}case ht.Z.ESC:qt(!1),Xt&&Ht.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ht){or(Ht)}}}),Cr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(Lt,"_list"),className:"".concat(Mr,"-empty"),onMouseDown:gr},At);var Wr=Object.keys(gn).map(function(Rn){return gn[Rn]}),Nr=function(Ht){return Ht.label};function _r(Rn,Ht){var Kt=Rn.group;return{role:Kt?"presentation":"option",id:"".concat(Lt,"_list_").concat(Ht)}}var ii=function(Ht){var Kt=Cr[Ht];if(!Kt)return null;var yn=Kt.data||{},on=yn.value,Dn=Kt.group,ar=(0,Se.Z)(yn,!0),Vt=Nr(Kt);return Kt?de.createElement("div",(0,se.Z)({"aria-label":typeof Vt=="string"&&!Dn?Vt:null},ar,{key:Ht},_r(Kt,Ht),{"aria-selected":Jr(on)}),on):null},Or={role:"listbox",id:"".concat(Lt,"_list")};return de.createElement(de.Fragment,null,nn&&de.createElement("div",(0,se.Z)({},Or,{style:{height:0,width:0,overflow:"hidden"}}),ii(jn-1),ii(jn),ii(jn+1)),de.createElement(wn.Z,{itemKey:"key",ref:ir,data:Cr,height:wr,itemHeight:Qn,fullHeight:!1,onMouseDown:gr,onScroll:bt,virtual:nn,direction:Wn,innerProps:nn?null:Or},function(Rn,Ht){var Kt=Rn.group,yn=Rn.groupOption,on=Rn.data,Dn=Rn.label,ar=Rn.value,Vt=on.key;if(Kt){var Ft,rn=(Ft=on.title)!==null&&Ft!==void 0?Ft:mr(Dn)?Dn.toString():void 0;return de.createElement("div",{className:ye()(Mr,"".concat(Mr,"-group"),on.className),title:rn},Dn!==void 0?Dn:Vt)}var ln=on.disabled,Mn=on.title,sr=on.children,Vn=on.style,yr=on.className,br=(0,Ye.Z)(on,Zn),Sr=(0,cn.Z)(br,Wr),zr=Er(ar),Ar=ln||!zr&&Rr,Hr="".concat(Mr,"-option"),ei=ye()(Mr,Hr,yr,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(Hr,"-grouped"),yn),"".concat(Hr,"-active"),jn===Ht&&!Ar),"".concat(Hr,"-disabled"),Ar),"".concat(Hr,"-selected"),zr)),Li=Nr(Rn),Oi=!dn||typeof dn=="function"||zr,xi=typeof Li=="number"?Li:Li||ar,vi=mr(xi)?xi.toString():void 0;return Mn!==void 0&&(vi=Mn),de.createElement("div",(0,se.Z)({},(0,Se.Z)(Sr),nn?{}:_r(Rn,Ht),{"aria-selected":Jr(ar),className:ei,title:vi,onMouseMove:function(){jn===Ht||Ar||Vr(Ht)},onClick:function(){Ar||Dr(ar)},style:Vn}),de.createElement("div",{className:"".concat(Hr,"-content")},typeof Lr=="function"?Lr(Rn,{index:Ht}):xi),de.isValidElement(dn)||zr,Oi&&de.createElement(Le,{className:"".concat(Mr,"-option-state"),customizeIcon:dn,customizeIconProps:{value:ar,disabled:Ar,isSelected:zr}},zr?"\u2713":null))}))},ur=de.forwardRef(er),nr=ur,In=function(Ae,Ne){var Bt=de.useRef({values:new Map,options:new Map}),Dt=de.useMemo(function(){var Lt=Bt.current,Xt=Lt.values,tn=Lt.options,hn=Ae.map(function(At){if(At.label===void 0){var bt;return(0,_e.Z)((0,_e.Z)({},At),{},{label:(bt=Xt.get(At.value))===null||bt===void 0?void 0:bt.label})}return At}),_t=new Map,qt=new Map;return hn.forEach(function(At){_t.set(At.value,At),qt.set(At.value,Ne.get(At.value)||tn.get(At.value))}),Bt.current.values=_t,Bt.current.options=qt,hn},[Ae,Ne]),We=de.useCallback(function(Lt){return Ne.get(Lt)||Bt.current.options.get(Lt)},[Ne]);return[Dt,We]};function rr(Ae,Ne){return ot(Ae).join("").toUpperCase().includes(Ne)}var cr=function(Ae,Ne,Bt,Dt,We){return de.useMemo(function(){if(!Bt||Dt===!1)return Ae;var Lt=Ne.options,Xt=Ne.label,tn=Ne.value,hn=[],_t=typeof Dt=="function",qt=Bt.toUpperCase(),At=_t?Dt:function(en,vn){return We?rr(vn[We],qt):vn[Lt]?rr(vn[Xt!=="children"?Xt:"label"],qt):rr(vn[tn],qt)},bt=_t?function(en){return te(en)}:function(en){return en};return Ae.forEach(function(en){if(en[Lt]){var vn=At(Bt,bt(en));if(vn)hn.push(en);else{var mn=en[Lt].filter(function(xn){return At(Bt,bt(xn))});mn.length&&hn.push((0,_e.Z)((0,_e.Z)({},en),{},(0,Ie.Z)({},Lt,mn)))}return}At(Bt,bt(en))&&hn.push(en)}),hn},[Ae,Dt,We,Bt,Ne])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],xr=["children"];function Ut(Ae){var Ne=Ae,Bt=Ne.key,Dt=Ne.props,We=Dt.children,Lt=Dt.value,Xt=(0,Ye.Z)(Dt,Kn);return(0,_e.Z)({key:Bt,value:Lt!==void 0?Lt:Bt,children:We},Xt)}function pn(Ae){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Ae).map(function(Bt,Dt){if(!de.isValidElement(Bt)||!Bt.type)return null;var We=Bt,Lt=We.type.isSelectOptGroup,Xt=We.key,tn=We.props,hn=tn.children,_t=(0,Ye.Z)(tn,xr);return Ne||!Lt?Ut(Bt):(0,_e.Z)((0,_e.Z)({key:"__RC_SELECT_GRP__".concat(Xt===null?Dt:Xt,"__"),label:Xt},_t),{},{options:pn(hn)})}).filter(function(Bt){return Bt})}var En=function(Ne,Bt,Dt,We,Lt){return de.useMemo(function(){var Xt=Ne,tn=!Ne;tn&&(Xt=pn(Bt));var hn=new Map,_t=new Map,qt=function(en,vn,mn){mn&&typeof mn=="string"&&en.set(vn[mn],vn)},At=function bt(en){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn=0;mn<en.length;mn+=1){var xn=en[mn];!xn[Dt.options]||vn?(hn.set(xn[Dt.value],xn),qt(_t,xn,Dt.label),qt(_t,xn,We),qt(_t,xn,Lt)):bt(xn[Dt.options],!0)}};return At(Xt),{options:Xt,valueOptions:hn,labelOptions:_t}},[Ne,Bt,Dt,We,Lt])},Tn=En;function Jn(Ae){var Ne=de.useRef();Ne.current=Ae;var Bt=de.useCallback(function(){return Ne.current.apply(Ne,arguments)},[]);return Bt}function tr(Ae){var Ne=Ae.mode,Bt=Ae.options,Dt=Ae.children,We=Ae.backfill,Lt=Ae.allowClear,Xt=Ae.placeholder,tn=Ae.getInputElement,hn=Ae.showSearch,_t=Ae.onSearch,qt=Ae.defaultOpen,At=Ae.autoFocus,bt=Ae.labelInValue,en=Ae.value,vn=Ae.inputValue,mn=Ae.optionLabelProp,xn=isMultiple(Ne),Hn=hn!==void 0?hn:xn||Ne==="combobox",Yn=Bt||convertChildrenToData(Dt);if(warning(Ne!=="tags"||Yn.every(function(nn){return!nn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ne==="tags"||Ne==="combobox"){var dn=Yn.some(function(nn){return nn.options?nn.options.some(function(Wn){return typeof("value"in Wn?Wn.value:Wn.key)=="number"}):typeof("value"in nn?nn.value:nn.key)=="number"});warning(!dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ne!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ne==="combobox"||!We,"`backfill` only works with `combobox` mode."),warning(Ne==="combobox"||!tn,"`getInputElement` only work with `combobox` mode."),noteOnce(Ne!=="combobox"||!tn||!Lt||!Xt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_t&&!Hn&&Ne!=="combobox"&&Ne!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!qt||At,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),en!=null){var Gt=toArray(en);warning(!bt||Gt.every(function(nn){return _typeof(nn)==="object"&&("key"in nn||"value"in nn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!xn||Array.isArray(en),"`value` should be array when `mode` is `multiple` or `tags`")}if(Dt){var gn=null;toNodeArray(Dt).some(function(nn){if(!React.isValidElement(nn)||!nn.type)return!1;var Wn=nn,wr=Wn.type;if(wr.isSelectOption)return!1;if(wr.isSelectOptGroup){var Qn=toNodeArray(nn.props.children).every(function(Lr){return!React.isValidElement(Lr)||!nn.type||Lr.type.isSelectOption?!0:(gn=Lr.type,!1)});return!Qn}return gn=wr,!0}),gn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(gn.displayName||gn.name||gn,"`.")),warning(vn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function dr(Ae,Ne){if(Ae){var Bt=function Dt(We){for(var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xt=0;Xt<We.length;Xt++){var tn=We[Xt];if(tn[Ne==null?void 0:Ne.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Lt&&Array.isArray(tn[Ne==null?void 0:Ne.options])&&Dt(tn[Ne==null?void 0:Ne.options],!0))break}};Bt(Ae)}}var _n=null,Fn=["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"],hr=["inputValue"];function jt(Ae){return!Ae||(0,Be.Z)(Ae)!=="object"}var at=de.forwardRef(function(Ae,Ne){var Bt=Ae.id,Dt=Ae.mode,We=Ae.prefixCls,Lt=We===void 0?"rc-select":We,Xt=Ae.backfill,tn=Ae.fieldNames,hn=Ae.inputValue,_t=Ae.searchValue,qt=Ae.onSearch,At=Ae.autoClearSearchValue,bt=At===void 0?!0:At,en=Ae.onSelect,vn=Ae.onDeselect,mn=Ae.dropdownMatchSelectWidth,xn=mn===void 0?!0:mn,Hn=Ae.filterOption,Yn=Ae.filterSort,dn=Ae.optionFilterProp,Gt=Ae.optionLabelProp,gn=Ae.options,nn=Ae.optionRender,Wn=Ae.children,wr=Ae.defaultActiveFirstOption,Qn=Ae.menuItemSelectedIcon,Lr=Ae.virtual,Mr=Ae.direction,Cr=Ae.listHeight,ir=Cr===void 0?200:Cr,Rr=Ae.listItemHeight,gr=Rr===void 0?20:Rr,or=Ae.labelRender,Er=Ae.value,Tr=Ae.defaultValue,pr=Ae.labelInValue,qn=Ae.onChange,jn=Ae.maxCount,Br=(0,Ye.Z)(Ae,Fn),Vr=(0,Bn.ZP)(Bt),Jr=pt(Dt),Dr=!!(!gn&&Wn),Wr=de.useMemo(function(){return Hn===void 0&&Dt==="combobox"?!1:Hn},[Hn,Dt]),Nr=de.useMemo(function(){return Wt(tn,Dr)},[JSON.stringify(tn),Dr]),_r=(0,qe.Z)("",{value:_t!==void 0?_t:hn,postState:function(On){return On||""}}),ii=(0,me.Z)(_r,2),Or=ii[0],Rn=ii[1],Ht=Tn(gn,Wn,Nr,dn,Gt),Kt=Ht.valueOptions,yn=Ht.labelOptions,on=Ht.options,Dn=de.useCallback(function(Ln){var On=ot(Ln);return On.map(function(Pn){var Nn,vr,Ir,Gi,gi;if(jt(Pn))Nn=Pn;else{var ui;Ir=Pn.key,vr=Pn.label,Nn=(ui=Pn.value)!==null&&ui!==void 0?ui:Ir}var Kr=Kt.get(Nn);if(Kr){var Wi;if(vr===void 0&&(vr=Kr==null?void 0:Kr[Gt||Nr.label]),Ir===void 0&&(Ir=(Wi=Kr==null?void 0:Kr.key)!==null&&Wi!==void 0?Wi:Nn),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:vr,value:Nn,key:Ir,disabled:Gi,title:gi}})},[Nr,Gt,Kt]),ar=(0,qe.Z)(Tr,{value:Er}),Vt=(0,me.Z)(ar,2),Ft=Vt[0],rn=Vt[1],ln=de.useMemo(function(){var Ln,On=Jr&&Ft===null?[]:Ft,Pn=Dn(On);return Dt==="combobox"&&ce((Ln=Pn[0])===null||Ln===void 0?void 0:Ln.value)?[]:Pn},[Ft,Dn,Dt,Jr]),Mn=In(ln,Kt),sr=(0,me.Z)(Mn,2),Vn=sr[0],yr=sr[1],br=de.useMemo(function(){if(!Dt&&Vn.length===1){var Ln=Vn[0];if(Ln.value===null&&(Ln.label===null||Ln.label===void 0))return[]}return Vn.map(function(On){var Pn;return(0,_e.Z)((0,_e.Z)({},On),{},{label:(Pn=typeof or=="function"?or(On):On.label)!==null&&Pn!==void 0?Pn:On.value})})},[Dt,Vn,or]),Sr=de.useMemo(function(){return new Set(Vn.map(function(Ln){return Ln.value}))},[Vn]);de.useEffect(function(){if(Dt==="combobox"){var Ln,On=(Ln=Vn[0])===null||Ln===void 0?void 0:Ln.value;Rn(pe(On)?String(On):"")}},[Vn]);var zr=Jn(function(Ln,On){var Pn=On!=null?On:Ln;return(0,Ie.Z)((0,Ie.Z)({},Nr.value,Ln),Nr.label,Pn)}),Ar=de.useMemo(function(){if(Dt!=="tags")return on;var Ln=(0,gt.Z)(on),On=function(Nn){return Kt.has(Nn)};return(0,gt.Z)(Vn).sort(function(Pn,Nn){return Pn.value<Nn.value?-1:1}).forEach(function(Pn){var Nn=Pn.value;On(Nn)||Ln.push(zr(Nn,Pn.label))}),Ln},[zr,on,Kt,Vn,Dt]),Hr=cr(Ar,Nr,Or,Wr,dn),ei=de.useMemo(function(){return Dt!=="tags"||!Or||Hr.some(function(Ln){return Ln[dn||"value"]===Or})||Hr.some(function(Ln){return Ln[Nr.value]===Or})?Hr:[zr(Or)].concat((0,gt.Z)(Hr))},[zr,dn,Dt,Hr,Or,Nr]),Li=function Ln(On){var Pn=(0,gt.Z)(On).sort(function(Nn,vr){return Yn(Nn,vr,{searchValue:Or})});return Pn.map(function(Nn){return Array.isArray(Nn.options)?(0,_e.Z)((0,_e.Z)({},Nn),{},{options:Nn.options.length>0?Ln(Nn.options):Nn.options}):Nn})},Oi=de.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Or]),xi=de.useMemo(function(){return ae(Oi,{fieldNames:Nr,childrenAsData:Dr})},[Oi,Nr,Dr]),vi=function(On){var Pn=Dn(On);if(rn(Pn),qn&&(Pn.length!==Vn.length||Pn.some(function(Ir,Gi){var gi;return((gi=Vn[Gi])===null||gi===void 0?void 0:gi.value)!==(Ir==null?void 0:Ir.value)}))){var Nn=pr?Pn:Pn.map(function(Ir){return Ir.value}),vr=Pn.map(function(Ir){return te(yr(Ir.value))});qn(Jr?Nn:Nn[0],Jr?vr:vr[0])}},Xi=de.useState(null),fr=(0,me.Z)(Xi,2),to=fr[0],ti=fr[1],Ni=de.useState(0),ao=(0,me.Z)(Ni,2),Ji=ao[0],mi=ao[1],Ri=wr!==void 0?wr:Dt!=="combobox",Zr=de.useCallback(function(Ln,On){var Pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nn=Pn.source,vr=Nn===void 0?"keyboard":Nn;mi(On),Xt&&Dt==="combobox"&&Ln!==null&&vr==="keyboard"&&ti(String(Ln))},[Xt,Dt]),Hi=function(On,Pn,Nn){var vr=function(){var no,ji=yr(On);return[pr?{label:ji==null?void 0:ji[Nr.label],value:On,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:On}:On,te(ji)]};if(Pn&&en){var Ir=vr(),Gi=(0,me.Z)(Ir,2),gi=Gi[0],ui=Gi[1];en(gi,ui)}else if(!Pn&&vn&&Nn!=="clear"){var Kr=vr(),Wi=(0,me.Z)(Kr,2),Qi=Wi[0],Mi=Wi[1];vn(Qi,Mi)}},so=Jn(function(Ln,On){var Pn,Nn=Jr?On.selected:!0;Nn?Pn=Jr?[].concat((0,gt.Z)(Vn),[Ln]):[Ln]:Pn=Vn.filter(function(vr){return vr.value!==Ln}),vi(Pn),Hi(Ln,Nn),Dt==="combobox"?ti(""):(!pt||bt)&&(Rn(""),ti(""))}),_i=function(On,Pn){vi(On);var Nn=Pn.type,vr=Pn.values;(Nn==="remove"||Nn==="clear")&&vr.forEach(function(Ir){Hi(Ir.value,!1,Nn)})},Qr=function(On,Pn){if(Rn(On),ti(null),Pn.source==="submit"){var Nn=(On||"").trim();if(Nn){var vr=Array.from(new Set([].concat((0,gt.Z)(Sr),[Nn])));vi(vr),Hi(Nn,!0),Rn("")}return}Pn.source!=="blur"&&(Dt==="combobox"&&vi(On),qt==null||qt(On))},xo=function(On){var Pn=On;Dt!=="tags"&&(Pn=On.map(function(vr){var Ir=yn.get(vr);return Ir==null?void 0:Ir.value}).filter(function(vr){return vr!==void 0}));var Nn=Array.from(new Set([].concat((0,gt.Z)(Sr),(0,gt.Z)(Pn))));vi(Nn),Nn.forEach(function(vr){Hi(vr,!0)})},lo=de.useMemo(function(){var Ln=Lr!==!1&&xn!==!1;return(0,_e.Z)((0,_e.Z)({},Ht),{},{flattenOptions:xi,onActiveValue:Zr,defaultActiveFirstOption:Ri,onSelect:so,menuItemSelectedIcon:Qn,rawValues:Sr,fieldNames:Nr,virtual:Ln,direction:Mr,listHeight:ir,listItemHeight:gr,childrenAsData:Dr,maxCount:jn,optionRender:nn})},[jn,Ht,xi,Zr,Ri,so,Qn,Sr,Nr,Lr,xn,Mr,ir,gr,Dr,nn]);return de.createElement(ue.Provider,{value:lo},de.createElement(Re,(0,se.Z)({},Br,{id:Vr,prefixCls:Lt,ref:Ne,omitDomProps:hr,mode:Dt,displayValues:br,onDisplayValuesChange:_i,direction:Mr,searchValue:Or,onSearch:Qr,autoClearSearchValue:bt,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:nr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Qt=at;Qt.Option=un,Qt.OptGroup=Rt;var Cn=Qt,Gn=Cn},63158:function(Ot,zt,fe){"use strict";var se=fe(54476),gt=fe(20068),Ie=fe(42978),_e=fe(75931),me=fe(59301),Ye=fe(92310),Be=fe.n(Ye),qe=fe(18929),ke=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Te=me.forwardRef(function(ye,ft){var Ue,Fe=ye.prefixCls,Oe=Fe===void 0?"rc-switch":Fe,Le=ye.className,st=ye.checked,ut=ye.defaultChecked,Et=ye.disabled,yt=ye.loadingIcon,vt=ye.checkedChildren,mt=ye.unCheckedChildren,ht=ye.onClick,$t=ye.onChange,Se=ye.onKeyDown,Ge=(0,_e.Z)(ye,de),rt=(0,qe.Z)(!1,{value:st,defaultValue:ut}),Pe=(0,Ie.Z)(rt,2),je=Pe[0],Ee=Pe[1];function ze(dt,pe){var ce=je;return Et||(ce=dt,Ee(ce),$t==null||$t(ce,pe)),ce}function Pt(dt){dt.which===ke.Z.LEFT?ze(!1,dt):dt.which===ke.Z.RIGHT&&ze(!0,dt),Se==null||Se(dt)}function ot(dt){var pe=ze(!je,dt);ht==null||ht(pe,dt)}var St=Be()(Oe,Le,(Ue={},(0,gt.Z)(Ue,"".concat(Oe,"-checked"),je),(0,gt.Z)(Ue,"".concat(Oe,"-disabled"),Et),Ue));return me.createElement("button",(0,se.Z)({},Ge,{type:"button",role:"switch","aria-checked":je,disabled:Et,className:St,ref:ft,onKeyDown:Pt,onClick:ot}),yt,me.createElement("span",{className:"".concat(Oe,"-inner")},me.createElement("span",{className:"".concat(Oe,"-inner-checked")},vt),me.createElement("span",{className:"".concat(Oe,"-inner-unchecked")},mt)))});Te.displayName="Switch",zt.Z=Te},22711:function(Ot,zt,fe){"use strict";fe.r(zt),fe.d(zt,{ResizableTextArea:function(){return Pe},default:function(){return Pt}});var se=fe(54476),gt=fe(20068),Ie=fe(33885),_e=fe(94480),me=fe(42978),Ye=fe(75931),Be=fe(92310),qe=fe.n(Be),ke=fe(36901),de=fe(66003),Te=fe(30292),ye=fe(18929),ft=fe(59301),Ue=fe(76190),Fe=fe(29301),Oe=fe(34280),Le=fe(16089),st=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,ut=["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"],Et={},yt;function vt(ot){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=ot.getAttribute("id")||ot.getAttribute("data-reactid")||ot.getAttribute("name");if(St&&Et[dt])return Et[dt];var pe=window.getComputedStyle(ot),ce=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),wt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),lt=ut.map(function(Xe){return"".concat(Xe,":").concat(pe.getPropertyValue(Xe))}).join(";"),we={sizingStyle:lt,paddingSize:Ve,borderSize:wt,boxSizing:ce};return St&&dt&&(Et[dt]=we),we}function mt(ot){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;yt||(yt=document.createElement("textarea"),yt.setAttribute("tab-index","-1"),yt.setAttribute("aria-hidden","true"),yt.setAttribute("name","hiddenTextarea"),document.body.appendChild(yt)),ot.getAttribute("wrap")?yt.setAttribute("wrap",ot.getAttribute("wrap")):yt.removeAttribute("wrap");var ce=vt(ot,St),Ve=ce.paddingSize,wt=ce.borderSize,lt=ce.boxSizing,we=ce.sizingStyle;yt.setAttribute("style","".concat(we,";").concat(st)),yt.value=ot.value||ot.placeholder||"";var Xe=void 0,Ze=void 0,Mt,it=yt.scrollHeight;if(lt==="border-box"?it+=wt:lt==="content-box"&&(it-=Ve),dt!==null||pe!==null){yt.value=" ";var Ce=yt.scrollHeight-Ve;dt!==null&&(Xe=Ce*dt,lt==="border-box"&&(Xe=Xe+Ve+wt),it=Math.max(Xe,it)),pe!==null&&(Ze=Ce*pe,lt==="border-box"&&(Ze=Ze+Ve+wt),Mt=it>Ze?"":"hidden",it=Math.min(Ze,it))}var ve={height:it,overflowY:Mt,resize:"none"};return Xe&&(ve.minHeight=Xe),Ze&&(ve.maxHeight=Ze),ve}var ht=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],$t=0,Se=1,Ge=2,rt=ft.forwardRef(function(ot,St){var dt=ot,pe=dt.prefixCls,ce=dt.defaultValue,Ve=dt.value,wt=dt.autoSize,lt=dt.onResize,we=dt.className,Xe=dt.style,Ze=dt.disabled,Mt=dt.onChange,it=dt.onInternalAutoSize,Ce=(0,Ye.Z)(dt,ht),ve=(0,ye.Z)(ce,{value:Ve,postState:function(un){return un!=null?un:""}}),Me=(0,me.Z)(ve,2),$e=Me[0],xe=Me[1],He=function(un){xe(un.target.value),Mt==null||Mt(un)},Je=ft.useRef();ft.useImperativeHandle(St,function(){return{textArea:Je.current}});var et=ft.useMemo(function(){return wt&&(0,Ue.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),nt=(0,me.Z)(et,2),Ke=nt[0],xt=nt[1],kt=!!wt,Yt=function(){try{if(document.activeElement===Je.current){var un=Je.current,kn=un.selectionStart,cn=un.selectionEnd,wn=un.scrollTop;Je.current.setSelectionRange(kn,cn),Je.current.scrollTop=wn}}catch($n){}},Wt=ft.useState(Ge),ae=(0,me.Z)(Wt,2),te=ae[0],ee=ae[1],ie=ft.useState(),ue=(0,me.Z)(ie,2),ne=ue[0],ge=ue[1],ct=function(){ee($t)};(0,Oe.Z)(function(){kt&&ct()},[Ve,Ke,xt,kt]),(0,Oe.Z)(function(){if(te===$t)ee(Se);else if(te===Se){var It=mt(Je.current,!1,Ke,xt);ee(Ge),ge(It)}else Yt()},[te]);var pt=ft.useRef(),Ct=function(){Le.Z.cancel(pt.current)},Re=function(un){te===Ge&&(lt==null||lt(un),wt&&(Ct(),pt.current=(0,Le.Z)(function(){ct()})))};ft.useEffect(function(){return Ct},[]);var Zt=kt?ne:null,Rt=(0,Ie.Z)((0,Ie.Z)({},Xe),Zt);return(te===$t||te===Se)&&(Rt.overflowY="hidden",Rt.overflowX="hidden"),ft.createElement(Fe.Z,{onResize:Re,disabled:!(wt||lt)},ft.createElement("textarea",(0,se.Z)({},Ce,{ref:Je,style:Rt,className:qe()(pe,we,(0,gt.Z)({},"".concat(pe,"-disabled"),Ze)),disabled:Ze,value:$e,onChange:He})))}),Pe=rt,je=["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"],Ee=ft.forwardRef(function(ot,St){var dt,pe=ot.defaultValue,ce=ot.value,Ve=ot.onFocus,wt=ot.onBlur,lt=ot.onChange,we=ot.allowClear,Xe=ot.maxLength,Ze=ot.onCompositionStart,Mt=ot.onCompositionEnd,it=ot.suffix,Ce=ot.prefixCls,ve=Ce===void 0?"rc-textarea":Ce,Me=ot.showCount,$e=ot.count,xe=ot.className,He=ot.style,Je=ot.disabled,et=ot.hidden,nt=ot.classNames,Ke=ot.styles,xt=ot.onResize,kt=ot.onClear,Yt=ot.onPressEnter,Wt=ot.readOnly,ae=ot.autoSize,te=ot.onKeyDown,ee=(0,Ye.Z)(ot,je),ie=(0,ye.Z)(pe,{value:ce,defaultValue:pe}),ue=(0,me.Z)(ie,2),ne=ue[0],ge=ue[1],ct=ne==null?"":String(ne),pt=ft.useState(!1),Ct=(0,me.Z)(pt,2),Re=Ct[0],Zt=Ct[1],Rt=ft.useRef(!1),It=ft.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=(0,ft.useRef)(null),$n=(0,ft.useRef)(null),Zn=function(){var Qt;return(Qt=$n.current)===null||Qt===void 0?void 0:Qt.textArea},mr=function(){Zn().focus()};(0,ft.useImperativeHandle)(St,function(){var at;return{resizableTextArea:$n.current,focus:mr,blur:function(){Zn().blur()},nativeElement:((at=wn.current)===null||at===void 0?void 0:at.nativeElement)||Zn()}}),(0,ft.useEffect)(function(){Zt(function(at){return!Je&&at})},[Je]);var er=ft.useState(null),ur=(0,me.Z)(er,2),nr=ur[0],In=ur[1];ft.useEffect(function(){if(nr){var at;(at=Zn()).setSelectionRange.apply(at,(0,_e.Z)(nr))}},[nr]);var rr=(0,de.Z)($e,Me),cr=(dt=rr.max)!==null&&dt!==void 0?dt:Xe,Bn=Number(cr)>0,Xn=rr.strategy(ct),Kn=!!cr&&Xn>cr,xr=function(Qt,Cn){var Gn=Cn;!Rt.current&&rr.exceedFormatter&&rr.max&&rr.strategy(Cn)>rr.max&&(Gn=rr.exceedFormatter(Cn,{max:rr.max}),Cn!==Gn&&In([Zn().selectionStart||0,Zn().selectionEnd||0])),ge(Gn),(0,Te.rJ)(Qt.currentTarget,Qt,lt,Gn)},Ut=function(Qt){Rt.current=!0,Ze==null||Ze(Qt)},pn=function(Qt){Rt.current=!1,xr(Qt,Qt.currentTarget.value),Mt==null||Mt(Qt)},En=function(Qt){xr(Qt,Qt.target.value)},Tn=function(Qt){Qt.key==="Enter"&&Yt&&Yt(Qt),te==null||te(Qt)},Jn=function(Qt){Zt(!0),Ve==null||Ve(Qt)},tr=function(Qt){Zt(!1),wt==null||wt(Qt)},dr=function(Qt){ge(""),mr(),(0,Te.rJ)(Zn(),Qt,lt)},_n=it,Fn;rr.show&&(rr.showFormatter?Fn=rr.showFormatter({value:ct,count:Xn,maxLength:cr}):Fn="".concat(Xn).concat(Bn?" / ".concat(cr):""),_n=ft.createElement(ft.Fragment,null,_n,ft.createElement("span",{className:qe()("".concat(ve,"-data-count"),nt==null?void 0:nt.count),style:Ke==null?void 0:Ke.count},Fn)));var hr=function(Qt){var Cn;xt==null||xt(Qt),(Cn=Zn())!==null&&Cn!==void 0&&Cn.style.height&&cn(!0)},jt=!ae&&!Me&&!we;return ft.createElement(ke.BaseInput,{ref:wn,value:ct,allowClear:we,handleReset:dr,suffix:_n,prefixCls:ve,classNames:(0,Ie.Z)((0,Ie.Z)({},nt),{},{affixWrapper:qe()(nt==null?void 0:nt.affixWrapper,(0,gt.Z)((0,gt.Z)({},"".concat(ve,"-show-count"),Me),"".concat(ve,"-textarea-allow-clear"),we))}),disabled:Je,focused:Re,className:qe()(xe,Kn&&"".concat(ve,"-out-of-range")),style:(0,Ie.Z)((0,Ie.Z)({},He),kn&&!jt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fn=="string"?Fn:void 0}},hidden:et,readOnly:Wt,onClear:kt},ft.createElement(Pe,(0,se.Z)({},ee,{autoSize:ae,maxLength:Xe,onKeyDown:Tn,onChange:En,onFocus:Jn,onBlur:tr,onCompositionStart:Ut,onCompositionEnd:pn,className:qe()(nt==null?void 0:nt.textarea),style:(0,Ie.Z)((0,Ie.Z)({},Ke==null?void 0:Ke.textarea),{},{resize:He==null?void 0:He.resize}),disabled:Je,prefixCls:ve,onResize:hr,ref:$n,readOnly:Wt})))}),ze=Ee,Pt=ze},90472:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return ot}});var se=fe(54476),gt=fe(67732),Ie=fe(83652),_e=fe(31226),me=fe(42403),Ye=fe(158),Be=fe(20068),qe=fe(59301),ke=fe(33885),de=fe(75931),Te=fe(76190),ye=fe(75044),ft=fe(3202),Ue=fe(94480),Fe=fe(92310),Oe=fe.n(Fe),Le=fe(26112),st=fe(48736),ut=function(St,dt){if(St&&dt){var pe=Array.isArray(dt)?dt:dt.split(","),ce=St.name||"",Ve=St.type||"",wt=Ve.replace(/\/.*$/,"");return pe.some(function(lt){var we=lt.trim();if(/^\*(\/\*)?$/.test(lt))return!0;if(we.charAt(0)==="."){var Xe=ce.toLowerCase(),Ze=we.toLowerCase(),Mt=[Ze];return(Ze===".jpg"||Ze===".jpeg")&&(Mt=[".jpg",".jpeg"]),Mt.some(function(it){return Xe.endsWith(it)})}return/\/\*$/.test(we)?wt===we.replace(/\/.*$/,""):Ve===we?!0:/^\w+$/.test(we)?((0,st.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(we,"'.Skip for check.")),!0):!1})}return!0};function Et(St,dt){var pe="cannot ".concat(St.method," ").concat(St.action," ").concat(dt.status,"'"),ce=new Error(pe);return ce.status=dt.status,ce.method=St.method,ce.url=St.action,ce}function yt(St){var dt=St.responseText||St.response;if(!dt)return dt;try{return JSON.parse(dt)}catch(pe){return dt}}function vt(St){var dt=new XMLHttpRequest;St.onProgress&&dt.upload&&(dt.upload.onprogress=function(wt){wt.total>0&&(wt.percent=wt.loaded/wt.total*100),St.onProgress(wt)});var pe=new FormData;St.data&&Object.keys(St.data).forEach(function(Ve){var wt=St.data[Ve];if(Array.isArray(wt)){wt.forEach(function(lt){pe.append("".concat(Ve,"[]"),lt)});return}pe.append(Ve,wt)}),St.file instanceof Blob?pe.append(St.filename,St.file,St.file.name):pe.append(St.filename,St.file),dt.onerror=function(wt){St.onError(wt)},dt.onload=function(){return dt.status<200||dt.status>=300?St.onError(Et(St,dt),yt(dt)):St.onSuccess(yt(dt),dt)},dt.open(St.method,St.action,!0),St.withCredentials&&"withCredentials"in dt&&(dt.withCredentials=!0);var ce=St.headers||{};return ce["X-Requested-With"]!==null&&dt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ce).forEach(function(Ve){ce[Ve]!==null&&dt.setRequestHeader(Ve,ce[Ve])}),dt.send(pe),{abort:function(){dt.abort()}}}var mt=function(){var St=(0,ft.Z)((0,ye.Z)().mark(function dt(pe,ce){var Ve,wt,lt,we,Xe,Ze,Mt,it;return(0,ye.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Ze=function(){return Ze=(0,ft.Z)((0,ye.Z)().mark(function $e(xe){return(0,ye.Z)().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.abrupt("return",new Promise(function(et){xe.file(function(nt){ce(nt)?(xe.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=xe.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),et(nt)):et(null)})}));case 1:case"end":return Je.stop()}},$e)})),Ze.apply(this,arguments)},Xe=function($e){return Ze.apply(this,arguments)},we=function(){return we=(0,ft.Z)((0,ye.Z)().mark(function $e(xe){var He,Je,et,nt,Ke;return(0,ye.Z)().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:He=xe.createReader(),Je=[];case 2:return kt.next=5,new Promise(function(Yt){He.readEntries(Yt,function(){return Yt([])})});case 5:if(et=kt.sent,nt=et.length,nt){kt.next=9;break}return kt.abrupt("break",12);case 9:for(Ke=0;Ke<nt;Ke++)Je.push(et[Ke]);kt.next=2;break;case 12:return kt.abrupt("return",Je);case 13:case"end":return kt.stop()}},$e)})),we.apply(this,arguments)},lt=function($e){return we.apply(this,arguments)},Ve=[],wt=[],pe.forEach(function(Me){return wt.push(Me.webkitGetAsEntry())}),Mt=function(){var Me=(0,ft.Z)((0,ye.Z)().mark(function $e(xe,He){var Je,et;return(0,ye.Z)().wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(xe){Ke.next=2;break}return Ke.abrupt("return");case 2:if(xe.path=He||"",!xe.isFile){Ke.next=10;break}return Ke.next=6,Xe(xe);case 6:Je=Ke.sent,Je&&Ve.push(Je),Ke.next=15;break;case 10:if(!xe.isDirectory){Ke.next=15;break}return Ke.next=13,lt(xe);case 13:et=Ke.sent,wt.push.apply(wt,(0,Ue.Z)(et));case 15:case"end":return Ke.stop()}},$e)}));return function(xe,He){return Me.apply(this,arguments)}}(),it=0;case 9:if(!(it<wt.length)){ve.next=15;break}return ve.next=12,Mt(wt[it]);case 12:it++,ve.next=9;break;case 15:return ve.abrupt("return",Ve);case 16:case"end":return ve.stop()}},dt)}));return function(pe,ce){return St.apply(this,arguments)}}(),ht=mt,$t=+new Date,Se=0;function Ge(){return"rc-upload-".concat($t,"-").concat(++Se)}var rt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Pe=function(St){(0,me.Z)(pe,St);var dt=(0,Ye.Z)(pe);function pe(){var ce;(0,gt.Z)(this,pe);for(var Ve=arguments.length,wt=new Array(Ve),lt=0;lt<Ve;lt++)wt[lt]=arguments[lt];return ce=dt.call.apply(dt,[this].concat(wt)),(0,Be.Z)((0,_e.Z)(ce),"state",{uid:Ge()}),(0,Be.Z)((0,_e.Z)(ce),"reqs",{}),(0,Be.Z)((0,_e.Z)(ce),"fileInput",void 0),(0,Be.Z)((0,_e.Z)(ce),"_isMounted",void 0),(0,Be.Z)((0,_e.Z)(ce),"onChange",function(we){var Xe=ce.props,Ze=Xe.accept,Mt=Xe.directory,it=we.target.files,Ce=(0,Ue.Z)(it).filter(function(ve){return!Mt||ut(ve,Ze)});ce.uploadFiles(Ce),ce.reset()}),(0,Be.Z)((0,_e.Z)(ce),"onClick",function(we){var Xe=ce.fileInput;if(Xe){var Ze=we.target,Mt=ce.props.onClick;if(Ze&&Ze.tagName==="BUTTON"){var it=Xe.parentNode;it.focus(),Ze.blur()}Xe.click(),Mt&&Mt(we)}}),(0,Be.Z)((0,_e.Z)(ce),"onKeyDown",function(we){we.key==="Enter"&&ce.onClick(we)}),(0,Be.Z)((0,_e.Z)(ce),"onFileDrop",function(){var we=(0,ft.Z)((0,ye.Z)().mark(function Xe(Ze){var Mt,it,Ce;return(0,ye.Z)().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(Mt=ce.props.multiple,Ze.preventDefault(),Ze.type!=="dragover"){Me.next=4;break}return Me.abrupt("return");case 4:if(!ce.props.directory){Me.next=11;break}return Me.next=7,ht(Array.prototype.slice.call(Ze.dataTransfer.items),function($e){return ut($e,ce.props.accept)});case 7:it=Me.sent,ce.uploadFiles(it),Me.next=14;break;case 11:Ce=(0,Ue.Z)(Ze.dataTransfer.files).filter(function($e){return ut($e,ce.props.accept)}),Mt===!1&&(Ce=Ce.slice(0,1)),ce.uploadFiles(Ce);case 14:case"end":return Me.stop()}},Xe)}));return function(Xe){return we.apply(this,arguments)}}()),(0,Be.Z)((0,_e.Z)(ce),"uploadFiles",function(we){var Xe=(0,Ue.Z)(we),Ze=Xe.map(function(Mt){return Mt.uid=Ge(),ce.processFile(Mt,Xe)});Promise.all(Ze).then(function(Mt){var it=ce.props.onBatchStart;it==null||it(Mt.map(function(Ce){var ve=Ce.origin,Me=Ce.parsedFile;return{file:ve,parsedFile:Me}})),Mt.filter(function(Ce){return Ce.parsedFile!==null}).forEach(function(Ce){ce.post(Ce)})})}),(0,Be.Z)((0,_e.Z)(ce),"processFile",function(){var we=(0,ft.Z)((0,ye.Z)().mark(function Xe(Ze,Mt){var it,Ce,ve,Me,$e,xe,He,Je,et;return(0,ye.Z)().wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(it=ce.props.beforeUpload,Ce=Ze,!it){Ke.next=14;break}return Ke.prev=3,Ke.next=6,it(Ze,Mt);case 6:Ce=Ke.sent,Ke.next=12;break;case 9:Ke.prev=9,Ke.t0=Ke.catch(3),Ce=!1;case 12:if(Ce!==!1){Ke.next=14;break}return Ke.abrupt("return",{origin:Ze,parsedFile:null,action:null,data:null});case 14:if(ve=ce.props.action,typeof ve!="function"){Ke.next=21;break}return Ke.next=18,ve(Ze);case 18:Me=Ke.sent,Ke.next=22;break;case 21:Me=ve;case 22:if($e=ce.props.data,typeof $e!="function"){Ke.next=29;break}return Ke.next=26,$e(Ze);case 26:xe=Ke.sent,Ke.next=30;break;case 29:xe=$e;case 30:return He=((0,Te.Z)(Ce)==="object"||typeof Ce=="string")&&Ce?Ce:Ze,He instanceof File?Je=He:Je=new File([He],Ze.name,{type:Ze.type}),et=Je,et.uid=Ze.uid,Ke.abrupt("return",{origin:Ze,data:xe,parsedFile:et,action:Me});case 35:case"end":return Ke.stop()}},Xe,null,[[3,9]])}));return function(Xe,Ze){return we.apply(this,arguments)}}()),(0,Be.Z)((0,_e.Z)(ce),"saveFileInput",function(we){ce.fileInput=we}),ce}return(0,Ie.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Ve){var wt=this,lt=Ve.data,we=Ve.origin,Xe=Ve.action,Ze=Ve.parsedFile;if(this._isMounted){var Mt=this.props,it=Mt.onStart,Ce=Mt.customRequest,ve=Mt.name,Me=Mt.headers,$e=Mt.withCredentials,xe=Mt.method,He=we.uid,Je=Ce||vt,et={action:Xe,filename:ve,data:lt,file:Ze,headers:Me,withCredentials:$e,method:xe||"post",onProgress:function(Ke){var xt=wt.props.onProgress;xt==null||xt(Ke,Ze)},onSuccess:function(Ke,xt){var kt=wt.props.onSuccess;kt==null||kt(Ke,Ze,xt),delete wt.reqs[He]},onError:function(Ke,xt){var kt=wt.props.onError;kt==null||kt(Ke,xt,Ze),delete wt.reqs[He]}};it(we),this.reqs[He]=Je(et)}}},{key:"reset",value:function(){this.setState({uid:Ge()})}},{key:"abort",value:function(Ve){var wt=this.reqs;if(Ve){var lt=Ve.uid?Ve.uid:Ve;wt[lt]&&wt[lt].abort&&wt[lt].abort(),delete wt[lt]}else Object.keys(wt).forEach(function(we){wt[we]&&wt[we].abort&&wt[we].abort(),delete wt[we]})}},{key:"render",value:function(){var Ve=this.props,wt=Ve.component,lt=Ve.prefixCls,we=Ve.className,Xe=Ve.classNames,Ze=Xe===void 0?{}:Xe,Mt=Ve.disabled,it=Ve.id,Ce=Ve.name,ve=Ve.style,Me=Ve.styles,$e=Me===void 0?{}:Me,xe=Ve.multiple,He=Ve.accept,Je=Ve.capture,et=Ve.children,nt=Ve.directory,Ke=Ve.openFileDialogOnClick,xt=Ve.onMouseEnter,kt=Ve.onMouseLeave,Yt=Ve.hasControlInside,Wt=(0,de.Z)(Ve,rt),ae=Oe()((0,Be.Z)((0,Be.Z)((0,Be.Z)({},lt,!0),"".concat(lt,"-disabled"),Mt),we,we)),te=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},ee=Mt?{}:{onClick:Ke?this.onClick:function(){},onKeyDown:Ke?this.onKeyDown:function(){},onMouseEnter:xt,onMouseLeave:kt,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Yt?void 0:"0"};return qe.createElement(wt,(0,se.Z)({},ee,{className:ae,role:Yt?void 0:"button",style:ve}),qe.createElement("input",(0,se.Z)({},(0,Le.Z)(Wt,{aria:!0,data:!0}),{id:it,name:Ce,disabled:Mt,type:"file",ref:this.saveFileInput,onClick:function(ue){return ue.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},$e.input),className:Ze.input,accept:He},te,{multiple:xe,onChange:this.onChange},Je!=null?{capture:Je}:{})),et)}}]),pe}(qe.Component),je=Pe;function Ee(){}var ze=function(St){(0,me.Z)(pe,St);var dt=(0,Ye.Z)(pe);function pe(){var ce;(0,gt.Z)(this,pe);for(var Ve=arguments.length,wt=new Array(Ve),lt=0;lt<Ve;lt++)wt[lt]=arguments[lt];return ce=dt.call.apply(dt,[this].concat(wt)),(0,Be.Z)((0,_e.Z)(ce),"uploader",void 0),(0,Be.Z)((0,_e.Z)(ce),"saveUploader",function(we){ce.uploader=we}),ce}return(0,Ie.Z)(pe,[{key:"abort",value:function(Ve){this.uploader.abort(Ve)}},{key:"render",value:function(){return qe.createElement(je,(0,se.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(qe.Component);(0,Be.Z)(ze,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ee,onError:Ee,onSuccess:Ee,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Pt=ze,ot=Pt},48911:function(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return $e}});var se=fe(54476),gt=fe(76190),Ie=fe(33885),_e=fe(20068),me=fe(42978),Ye=fe(75931),Be=fe(92310),qe=fe.n(Be),ke=fe(29301),de=fe(70425),Te=fe(34280),ye=fe(59301),ft=fe(4676),Ue=ye.forwardRef(function(xe,He){var Je=xe.height,et=xe.offsetY,nt=xe.offsetX,Ke=xe.children,xt=xe.prefixCls,kt=xe.onInnerResize,Yt=xe.innerProps,Wt=xe.rtl,ae=xe.extra,te={},ee={display:"flex",flexDirection:"column"};return et!==void 0&&(te={height:Je,position:"relative",overflow:"hidden"},ee=(0,Ie.Z)((0,Ie.Z)({},ee),{},(0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)({transform:"translateY(".concat(et,"px)")},Wt?"marginRight":"marginLeft",-nt),"position","absolute"),"left",0),"right",0),"top",0))),ye.createElement("div",{style:te},ye.createElement(ke.Z,{onResize:function(ue){var ne=ue.offsetHeight;ne&&kt&&kt()}},ye.createElement("div",(0,se.Z)({style:ee,className:qe()((0,_e.Z)({},"".concat(xt,"-holder-inner"),xt)),ref:He},Yt),Ke,ae)))});Ue.displayName="Filler";var Fe=Ue;function Oe(xe){var He=xe.children,Je=xe.setRef,et=ye.useCallback(function(nt){Je(nt)},[]);return ye.cloneElement(He,{ref:et})}function Le(xe,He,Je,et,nt,Ke,xt,kt){var Yt=kt.getKey;return xe.slice(He,Je+1).map(function(Wt,ae){var te=He+ae,ee=xt(Wt,te,{style:{width:et},offsetX:nt}),ie=Yt(Wt);return ye.createElement(Oe,{key:ie,setRef:function(ne){return Ke(Wt,ne)}},ee)})}function st(xe,He,Je,et){var nt=Je-xe,Ke=He-Je,xt=Math.min(nt,Ke)*2;if(et<=xt){var kt=Math.floor(et/2);return et%2?Je+kt+1:Je-kt}return nt>Ke?Je-(et-Ke):Je+(et-nt)}function ut(xe,He,Je){var et=xe.length,nt=He.length,Ke,xt;if(et===0&&nt===0)return null;et<nt?(Ke=xe,xt=He):(Ke=He,xt=xe);var kt={__EMPTY_ITEM__:!0};function Yt(ue){return ue!==void 0?Je(ue):kt}for(var Wt=null,ae=Math.abs(et-nt)!==1,te=0;te<xt.length;te+=1){var ee=Yt(Ke[te]),ie=Yt(xt[te]);if(ee!==ie){Wt=te,ae=ae||ee!==Yt(xt[te+1]);break}}return Wt===null?null:{index:Wt,multiple:ae}}function Et(xe,He,Je){var et=ye.useState(xe),nt=(0,me.Z)(et,2),Ke=nt[0],xt=nt[1],kt=ye.useState(null),Yt=(0,me.Z)(kt,2),Wt=Yt[0],ae=Yt[1];return ye.useEffect(function(){var te=ut(Ke||[],xe||[],He);(te==null?void 0:te.index)!==void 0&&(Je==null||Je(te.index),ae(xe[te.index])),xt(xe)},[xe]),[Wt]}var yt=fe(16089),vt=(typeof navigator=="undefined"?"undefined":(0,gt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),mt=vt,ht=function(xe,He,Je,et){var nt=(0,ye.useRef)(!1),Ke=(0,ye.useRef)(null);function xt(){clearTimeout(Ke.current),nt.current=!0,Ke.current=setTimeout(function(){nt.current=!1},50)}var kt=(0,ye.useRef)({top:xe,bottom:He,left:Je,right:et});return kt.current.top=xe,kt.current.bottom=He,kt.current.left=Je,kt.current.right=et,function(Yt,Wt){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,te=Yt?Wt<0&&kt.current.left||Wt>0&&kt.current.right:Wt<0&&kt.current.top||Wt>0&&kt.current.bottom;return ae&&te?(clearTimeout(Ke.current),nt.current=!1):(!te||nt.current)&&xt(),!nt.current&&te}};function $t(xe,He,Je,et,nt,Ke,xt){var kt=(0,ye.useRef)(0),Yt=(0,ye.useRef)(null),Wt=(0,ye.useRef)(null),ae=(0,ye.useRef)(!1),te=ht(He,Je,et,nt);function ee(pt,Ct){if(yt.Z.cancel(Yt.current),!te(!1,Ct)){var Re=pt;if(!Re._virtualHandled)Re._virtualHandled=!0;else return;kt.current+=Ct,Wt.current=Ct,mt||Re.preventDefault(),Yt.current=(0,yt.Z)(function(){var Zt=ae.current?10:1;xt(kt.current*Zt,!1),kt.current=0})}}function ie(pt,Ct){xt(Ct,!0),mt||pt.preventDefault()}var ue=(0,ye.useRef)(null),ne=(0,ye.useRef)(null);function ge(pt){if(xe){yt.Z.cancel(ne.current),ne.current=(0,yt.Z)(function(){ue.current=null},2);var Ct=pt.deltaX,Re=pt.deltaY,Zt=pt.shiftKey,Rt=Ct,It=Re;(ue.current==="sx"||!ue.current&&Zt&&Re&&!Ct)&&(Rt=Re,It=0,ue.current="sx");var un=Math.abs(Rt),kn=Math.abs(It);ue.current===null&&(ue.current=Ke&&un>kn?"x":"y"),ue.current==="y"?ee(pt,It):ie(pt,Rt)}}function ct(pt){xe&&(ae.current=pt.detail===Wt.current)}return[ge,ct]}function Se(xe,He,Je,et){var nt=ye.useMemo(function(){return[new Map,[]]},[xe,Je.id,et]),Ke=(0,me.Z)(nt,2),xt=Ke[0],kt=Ke[1],Yt=function(ae){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ae,ee=xt.get(ae),ie=xt.get(te);if(ee===void 0||ie===void 0)for(var ue=xe.length,ne=kt.length;ne<ue;ne+=1){var ge,ct=xe[ne],pt=He(ct);xt.set(pt,ne);var Ct=(ge=Je.get(pt))!==null&&ge!==void 0?ge:et;if(kt[ne]=(kt[ne-1]||0)+Ct,pt===ae&&(ee=ne),pt===te&&(ie=ne),ee!==void 0&&ie!==void 0)break}return{top:kt[ee-1]||0,bottom:kt[ie]}};return Yt}var Ge=fe(67732),rt=fe(83652),Pe=function(){function xe(){(0,Ge.Z)(this,xe),(0,_e.Z)(this,"maps",void 0),(0,_e.Z)(this,"id",0),(0,_e.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,rt.Z)(xe,[{key:"set",value:function(Je,et){this.diffRecords.set(Je,this.maps[Je]),this.maps[Je]=et,this.id+=1}},{key:"get",value:function(Je){return this.maps[Je]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),xe}(),je=Pe;function Ee(xe){var He=parseFloat(xe);return isNaN(He)?0:He}function ze(xe,He,Je){var et=ye.useState(0),nt=(0,me.Z)(et,2),Ke=nt[0],xt=nt[1],kt=(0,ye.useRef)(new Map),Yt=(0,ye.useRef)(new je),Wt=(0,ye.useRef)(0);function ae(){Wt.current+=1}function te(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ae();var ue=function(){var ct=!1;kt.current.forEach(function(pt,Ct){if(pt&&pt.offsetParent){var Re=pt.offsetHeight,Zt=getComputedStyle(pt),Rt=Zt.marginTop,It=Zt.marginBottom,un=Ee(Rt),kn=Ee(It),cn=Re+un+kn;Yt.current.get(Ct)!==cn&&(Yt.current.set(Ct,cn),ct=!0)}}),ct&&xt(function(pt){return pt+1})};if(ie)ue();else{Wt.current+=1;var ne=Wt.current;Promise.resolve().then(function(){ne===Wt.current&&ue()})}}function ee(ie,ue){var ne=xe(ie),ge=kt.current.get(ne);ue?(kt.current.set(ne,ue),te()):kt.current.delete(ne),!ge!=!ue&&(ue?He==null||He(ie):Je==null||Je(ie))}return(0,ye.useEffect)(function(){return ae},[]),[ee,te,Yt.current,Ke]}var Pt=14/15;function ot(xe,He,Je){var et=(0,ye.useRef)(!1),nt=(0,ye.useRef)(0),Ke=(0,ye.useRef)(0),xt=(0,ye.useRef)(null),kt=(0,ye.useRef)(null),Yt,Wt=function(ie){if(et.current){var ue=Math.ceil(ie.touches[0].pageX),ne=Math.ceil(ie.touches[0].pageY),ge=nt.current-ue,ct=Ke.current-ne,pt=Math.abs(ge)>Math.abs(ct);pt?nt.current=ue:Ke.current=ne;var Ct=Je(pt,pt?ge:ct,!1,ie);Ct&&ie.preventDefault(),clearInterval(kt.current),Ct&&(kt.current=setInterval(function(){pt?ge*=Pt:ct*=Pt;var Re=Math.floor(pt?ge:ct);(!Je(pt,Re,!0)||Math.abs(Re)<=.1)&&clearInterval(kt.current)},16))}},ae=function(){et.current=!1,Yt()},te=function(ie){Yt(),ie.touches.length===1&&!et.current&&(et.current=!0,nt.current=Math.ceil(ie.touches[0].pageX),Ke.current=Math.ceil(ie.touches[0].pageY),xt.current=ie.target,xt.current.addEventListener("touchmove",Wt,{passive:!1}),xt.current.addEventListener("touchend",ae,{passive:!0}))};Yt=function(){xt.current&&(xt.current.removeEventListener("touchmove",Wt),xt.current.removeEventListener("touchend",ae))},(0,Te.Z)(function(){return xe&&He.current.addEventListener("touchstart",te,{passive:!0}),function(){var ee;(ee=He.current)===null||ee===void 0||ee.removeEventListener("touchstart",te),Yt(),clearInterval(kt.current)}},[xe])}function St(xe){return Math.floor(Math.pow(xe,.5))}function dt(xe,He){var Je="touches"in xe?xe.touches[0]:xe;return Je[He?"pageX":"pageY"]-window[He?"scrollX":"scrollY"]}function pe(xe,He,Je){ye.useEffect(function(){var et=He.current;if(xe&&et){var nt=!1,Ke,xt,kt=function(){yt.Z.cancel(Ke)},Yt=function ee(){kt(),Ke=(0,yt.Z)(function(){Je(xt),ee()})},Wt=function(){nt=!1,kt()},ae=function(ie){if(!(ie.target.draggable||ie.button!==0)){var ue=ie;ue._virtualHandled||(ue._virtualHandled=!0,nt=!0)}},te=function(ie){if(nt){var ue=dt(ie,!1),ne=et.getBoundingClientRect(),ge=ne.top,ct=ne.bottom;if(ue<=ge){var pt=ge-ue;xt=-St(pt),Yt()}else if(ue>=ct){var Ct=ue-ct;xt=St(Ct),Yt()}else kt()}};return et.addEventListener("mousedown",ae),et.ownerDocument.addEventListener("mouseup",Wt),et.ownerDocument.addEventListener("mousemove",te),et.ownerDocument.addEventListener("dragend",Wt),function(){et.removeEventListener("mousedown",ae),et.ownerDocument.removeEventListener("mouseup",Wt),et.ownerDocument.removeEventListener("mousemove",te),et.ownerDocument.removeEventListener("dragend",Wt),kt()}}},[xe])}var ce=10;function Ve(xe,He,Je,et,nt,Ke,xt,kt){var Yt=ye.useRef(),Wt=ye.useState(null),ae=(0,me.Z)(Wt,2),te=ae[0],ee=ae[1];return(0,Te.Z)(function(){if(te&&te.times<ce){if(!xe.current){ee(function(rr){return(0,Ie.Z)({},rr)});return}Ke();var ie=te.targetAlign,ue=te.originAlign,ne=te.index,ge=te.offset,ct=xe.current.clientHeight,pt=!1,Ct=ie,Re=null;if(ct){for(var Zt=ie||ue,Rt=0,It=0,un=0,kn=Math.min(He.length-1,ne),cn=0;cn<=kn;cn+=1){var wn=nt(He[cn]);It=Rt;var $n=Je.get(wn);un=It+($n===void 0?et:$n),Rt=un}for(var Zn=Zt==="top"?ge:ct-ge,mr=kn;mr>=0;mr-=1){var er=nt(He[mr]),ur=Je.get(er);if(ur===void 0){pt=!0;break}if(Zn-=ur,Zn<=0)break}switch(Zt){case"top":Re=It-ge;break;case"bottom":Re=un-ct+ge;break;default:{var nr=xe.current.scrollTop,In=nr+ct;It<nr?Ct="top":un>In&&(Ct="bottom")}}Re!==null&&xt(Re),Re!==te.lastTop&&(pt=!0)}pt&&ee((0,Ie.Z)((0,Ie.Z)({},te),{},{times:te.times+1,targetAlign:Ct,lastTop:Re}))}},[te,xe.current]),function(ie){if(ie==null){kt();return}if(yt.Z.cancel(Yt.current),typeof ie=="number")xt(ie);else if(ie&&(0,gt.Z)(ie)==="object"){var ue,ne=ie.align;"index"in ie?ue=ie.index:ue=He.findIndex(function(pt){return nt(pt)===ie.key});var ge=ie.offset,ct=ge===void 0?0:ge;ee({times:0,index:ue,offset:ct,originAlign:ne})}}}var wt=ye.forwardRef(function(xe,He){var Je=xe.prefixCls,et=xe.rtl,nt=xe.scrollOffset,Ke=xe.scrollRange,xt=xe.onStartMove,kt=xe.onStopMove,Yt=xe.onScroll,Wt=xe.horizontal,ae=xe.spinSize,te=xe.containerSize,ee=xe.style,ie=xe.thumbStyle,ue=xe.showScrollBar,ne=ye.useState(!1),ge=(0,me.Z)(ne,2),ct=ge[0],pt=ge[1],Ct=ye.useState(null),Re=(0,me.Z)(Ct,2),Zt=Re[0],Rt=Re[1],It=ye.useState(null),un=(0,me.Z)(It,2),kn=un[0],cn=un[1],wn=!et,$n=ye.useRef(),Zn=ye.useRef(),mr=ye.useState(ue),er=(0,me.Z)(mr,2),ur=er[0],nr=er[1],In=ye.useRef(),rr=function(){ue===!0||ue===!1||(clearTimeout(In.current),nr(!0),In.current=setTimeout(function(){nr(!1)},3e3))},cr=Ke-te||0,Bn=te-ae||0,Xn=ye.useMemo(function(){if(nt===0||cr===0)return 0;var dr=nt/cr;return dr*Bn},[nt,cr,Bn]),Kn=function(_n){_n.stopPropagation(),_n.preventDefault()},xr=ye.useRef({top:Xn,dragging:ct,pageY:Zt,startTop:kn});xr.current={top:Xn,dragging:ct,pageY:Zt,startTop:kn};var Ut=function(_n){pt(!0),Rt(dt(_n,Wt)),cn(xr.current.top),xt(),_n.stopPropagation(),_n.preventDefault()};ye.useEffect(function(){var dr=function(jt){jt.preventDefault()},_n=$n.current,Fn=Zn.current;return _n.addEventListener("touchstart",dr,{passive:!1}),Fn.addEventListener("touchstart",Ut,{passive:!1}),function(){_n.removeEventListener("touchstart",dr),Fn.removeEventListener("touchstart",Ut)}},[]);var pn=ye.useRef();pn.current=cr;var En=ye.useRef();En.current=Bn,ye.useEffect(function(){if(ct){var dr,_n=function(jt){var at=xr.current,Qt=at.dragging,Cn=at.pageY,Gn=at.startTop;yt.Z.cancel(dr);var Ae=$n.current.getBoundingClientRect(),Ne=te/(Wt?Ae.width:Ae.height);if(Qt){var Bt=(dt(jt,Wt)-Cn)*Ne,Dt=Gn;!wn&&Wt?Dt-=Bt:Dt+=Bt;var We=pn.current,Lt=En.current,Xt=Lt?Dt/Lt:0,tn=Math.ceil(Xt*We);tn=Math.max(tn,0),tn=Math.min(tn,We),dr=(0,yt.Z)(function(){Yt(tn,Wt)})}},Fn=function(){pt(!1),kt()};return window.addEventListener("mousemove",_n,{passive:!0}),window.addEventListener("touchmove",_n,{passive:!0}),window.addEventListener("mouseup",Fn,{passive:!0}),window.addEventListener("touchend",Fn,{passive:!0}),function(){window.removeEventListener("mousemove",_n),window.removeEventListener("touchmove",_n),window.removeEventListener("mouseup",Fn),window.removeEventListener("touchend",Fn),yt.Z.cancel(dr)}}},[ct]),ye.useEffect(function(){return rr(),function(){clearTimeout(In.current)}},[nt]),ye.useImperativeHandle(He,function(){return{delayHidden:rr}});var Tn="".concat(Je,"-scrollbar"),Jn={position:"absolute",visibility:ur?null:"hidden"},tr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Wt?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,_e.Z)({height:"100%",width:ae},wn?"left":"right",Xn))):(Object.assign(Jn,(0,_e.Z)({width:8,top:0,bottom:0},wn?"right":"left",0)),Object.assign(tr,{width:"100%",height:ae,top:Xn})),ye.createElement("div",{ref:$n,className:qe()(Tn,(0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(Tn,"-horizontal"),Wt),"".concat(Tn,"-vertical"),!Wt),"".concat(Tn,"-visible"),ur)),style:(0,Ie.Z)((0,Ie.Z)({},Jn),ee),onMouseDown:Kn,onMouseMove:rr},ye.createElement("div",{ref:Zn,className:qe()("".concat(Tn,"-thumb"),(0,_e.Z)({},"".concat(Tn,"-thumb-moving"),ct)),style:(0,Ie.Z)((0,Ie.Z)({},tr),ie),onMouseDown:Ut}))}),lt=wt,we=20;function Xe(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Je=xe/He*xe;return isNaN(Je)&&(Je=0),Je=Math.max(Je,we),Math.floor(Je)}var Ze=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Mt=[],it={overflowY:"auto",overflowAnchor:"none"};function Ce(xe,He){var Je=xe.prefixCls,et=Je===void 0?"rc-virtual-list":Je,nt=xe.className,Ke=xe.height,xt=xe.itemHeight,kt=xe.fullHeight,Yt=kt===void 0?!0:kt,Wt=xe.style,ae=xe.data,te=xe.children,ee=xe.itemKey,ie=xe.virtual,ue=xe.direction,ne=xe.scrollWidth,ge=xe.component,ct=ge===void 0?"div":ge,pt=xe.onScroll,Ct=xe.onVirtualScroll,Re=xe.onVisibleChange,Zt=xe.innerProps,Rt=xe.extraRender,It=xe.styles,un=xe.showScrollBar,kn=un===void 0?"optional":un,cn=(0,Ye.Z)(xe,Ze),wn=ye.useCallback(function(Ht){return typeof ee=="function"?ee(Ht):Ht==null?void 0:Ht[ee]},[ee]),$n=ze(wn,null,null),Zn=(0,me.Z)($n,4),mr=Zn[0],er=Zn[1],ur=Zn[2],nr=Zn[3],In=!!(ie!==!1&&Ke&&xt),rr=ye.useMemo(function(){return Object.values(ur.maps).reduce(function(Ht,Kt){return Ht+Kt},0)},[ur.id,ur.maps]),cr=In&&ae&&(Math.max(xt*ae.length,rr)>Ke||!!ne),Bn=ue==="rtl",Xn=qe()(et,(0,_e.Z)({},"".concat(et,"-rtl"),Bn),nt),Kn=ae||Mt,xr=(0,ye.useRef)(),Ut=(0,ye.useRef)(),pn=(0,ye.useRef)(),En=(0,ye.useState)(0),Tn=(0,me.Z)(En,2),Jn=Tn[0],tr=Tn[1],dr=(0,ye.useState)(0),_n=(0,me.Z)(dr,2),Fn=_n[0],hr=_n[1],jt=(0,ye.useState)(!1),at=(0,me.Z)(jt,2),Qt=at[0],Cn=at[1],Gn=function(){Cn(!0)},Ae=function(){Cn(!1)},Ne={getKey:wn};function Bt(Ht){tr(function(Kt){var yn;typeof Ht=="function"?yn=Ht(Kt):yn=Ht;var on=wr(yn);return xr.current.scrollTop=on,on})}var Dt=(0,ye.useRef)({start:0,end:Kn.length}),We=(0,ye.useRef)(),Lt=Et(Kn,wn),Xt=(0,me.Z)(Lt,1),tn=Xt[0];We.current=tn;var hn=ye.useMemo(function(){if(!In)return{scrollHeight:void 0,start:0,end:Kn.length-1,offset:void 0};if(!cr){var Ht;return{scrollHeight:((Ht=Ut.current)===null||Ht===void 0?void 0:Ht.offsetHeight)||0,start:0,end:Kn.length-1,offset:void 0}}for(var Kt=0,yn,on,Dn,ar=Kn.length,Vt=0;Vt<ar;Vt+=1){var Ft=Kn[Vt],rn=wn(Ft),ln=ur.get(rn),Mn=Kt+(ln===void 0?xt:ln);Mn>=Jn&&yn===void 0&&(yn=Vt,on=Kt),Mn>Jn+Ke&&Dn===void 0&&(Dn=Vt),Kt=Mn}return yn===void 0&&(yn=0,on=0,Dn=Math.ceil(Ke/xt)),Dn===void 0&&(Dn=Kn.length-1),Dn=Math.min(Dn+1,Kn.length-1),{scrollHeight:Kt,start:yn,end:Dn,offset:on}},[cr,In,Jn,Kn,nr,Ke]),_t=hn.scrollHeight,qt=hn.start,At=hn.end,bt=hn.offset;Dt.current.start=qt,Dt.current.end=At,ye.useLayoutEffect(function(){var Ht=ur.getRecord();if(Ht.size===1){var Kt=Array.from(Ht.keys())[0],yn=Ht.get(Kt),on=Kn[qt];if(on&&yn===void 0){var Dn=wn(on);if(Dn===Kt){var ar=ur.get(Kt),Vt=ar-xt;Bt(function(Ft){return Ft+Vt})}}}ur.resetRecord()},[_t]);var en=ye.useState({width:0,height:Ke}),vn=(0,me.Z)(en,2),mn=vn[0],xn=vn[1],Hn=function(Kt){xn({width:Kt.offsetWidth,height:Kt.offsetHeight})},Yn=(0,ye.useRef)(),dn=(0,ye.useRef)(),Gt=ye.useMemo(function(){return Xe(mn.width,ne)},[mn.width,ne]),gn=ye.useMemo(function(){return Xe(mn.height,_t)},[mn.height,_t]),nn=_t-Ke,Wn=(0,ye.useRef)(nn);Wn.current=nn;function wr(Ht){var Kt=Ht;return Number.isNaN(Wn.current)||(Kt=Math.min(Kt,Wn.current)),Kt=Math.max(Kt,0),Kt}var Qn=Jn<=0,Lr=Jn>=nn,Mr=Fn<=0,Cr=Fn>=ne,ir=ht(Qn,Lr,Mr,Cr),Rr=function(){return{x:Bn?-Fn:Fn,y:Jn}},gr=(0,ye.useRef)(Rr()),or=(0,de.zX)(function(Ht){if(Ct){var Kt=(0,Ie.Z)((0,Ie.Z)({},Rr()),Ht);(gr.current.x!==Kt.x||gr.current.y!==Kt.y)&&(Ct(Kt),gr.current=Kt)}});function Er(Ht,Kt){var yn=Ht;Kt?((0,ft.flushSync)(function(){hr(yn)}),or()):Bt(yn)}function Tr(Ht){var Kt=Ht.currentTarget.scrollTop;Kt!==Jn&&Bt(Kt),pt==null||pt(Ht),or()}var pr=function(Kt){var yn=Kt,on=ne?ne-mn.width:0;return yn=Math.max(yn,0),yn=Math.min(yn,on),yn},qn=(0,de.zX)(function(Ht,Kt){Kt?((0,ft.flushSync)(function(){hr(function(yn){var on=yn+(Bn?-Ht:Ht);return pr(on)})}),or()):Bt(function(yn){var on=yn+Ht;return on})}),jn=$t(In,Qn,Lr,Mr,Cr,!!ne,qn),Br=(0,me.Z)(jn,2),Vr=Br[0],Jr=Br[1];ot(In,xr,function(Ht,Kt,yn,on){var Dn=on;return ir(Ht,Kt,yn)?!1:!Dn||!Dn._virtualHandled?(Dn&&(Dn._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Ht?Kt:0,deltaY:Ht?0:Kt}),!0):!1}),pe(cr,xr,function(Ht){Bt(function(Kt){return Kt+Ht})}),(0,Te.Z)(function(){function Ht(yn){var on=Qn&&yn.detail<0,Dn=Lr&&yn.detail>0;In&&!on&&!Dn&&yn.preventDefault()}var Kt=xr.current;return Kt.addEventListener("wheel",Vr,{passive:!1}),Kt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),Kt.addEventListener("MozMousePixelScroll",Ht,{passive:!1}),function(){Kt.removeEventListener("wheel",Vr),Kt.removeEventListener("DOMMouseScroll",Jr),Kt.removeEventListener("MozMousePixelScroll",Ht)}},[In,Qn,Lr]),(0,Te.Z)(function(){if(ne){var Ht=pr(Fn);hr(Ht),or({x:Ht})}},[mn.width,ne]);var Dr=function(){var Kt,yn;(Kt=Yn.current)===null||Kt===void 0||Kt.delayHidden(),(yn=dn.current)===null||yn===void 0||yn.delayHidden()},Wr=Ve(xr,Kn,ur,xt,wn,function(){return er(!0)},Bt,Dr);ye.useImperativeHandle(He,function(){return{nativeElement:pn.current,getScrollInfo:Rr,scrollTo:function(Kt){function yn(on){return on&&(0,gt.Z)(on)==="object"&&("left"in on||"top"in on)}yn(Kt)?(Kt.left!==void 0&&hr(pr(Kt.left)),Wr(Kt.top)):Wr(Kt)}}}),(0,Te.Z)(function(){if(Re){var Ht=Kn.slice(qt,At+1);Re(Ht,Kn)}},[qt,At,Kn]);var Nr=Se(Kn,wn,ur,xt),_r=Rt==null?void 0:Rt({start:qt,end:At,virtual:cr,offsetX:Fn,offsetY:bt,rtl:Bn,getSize:Nr}),ii=Le(Kn,qt,At,ne,Fn,mr,te,Ne),Or=null;Ke&&(Or=(0,Ie.Z)((0,_e.Z)({},Yt?"height":"maxHeight",Ke),it),In&&(Or.overflowY="hidden",ne&&(Or.overflowX="hidden"),Qt&&(Or.pointerEvents="none")));var Rn={};return Bn&&(Rn.dir="rtl"),ye.createElement("div",(0,se.Z)({ref:pn,style:(0,Ie.Z)((0,Ie.Z)({},Wt),{},{position:"relative"}),className:Xn},Rn,cn),ye.createElement(ke.Z,{onResize:Hn},ye.createElement(ct,{className:"".concat(et,"-holder"),style:Or,ref:xr,onScroll:Tr,onMouseEnter:Dr},ye.createElement(Fe,{prefixCls:et,height:_t,offsetX:Fn,offsetY:bt,scrollWidth:ne,onInnerResize:er,ref:Ut,innerProps:Zt,rtl:Bn,extra:_r},ii))),cr&&_t>Ke&&ye.createElement(lt,{ref:Yn,prefixCls:et,scrollOffset:Jn,scrollRange:_t,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Ae,spinSize:gn,containerSize:mn.height,style:It==null?void 0:It.verticalScrollBar,thumbStyle:It==null?void 0:It.verticalScrollBarThumb,showScrollBar:kn}),cr&&ne>mn.width&&ye.createElement(lt,{ref:dn,prefixCls:et,scrollOffset:Fn,scrollRange:ne,rtl:Bn,onScroll:Er,onStartMove:Gn,onStopMove:Ae,spinSize:Gt,containerSize:mn.width,horizontal:!0,style:It==null?void 0:It.horizontalScrollBar,thumbStyle:It==null?void 0:It.horizontalScrollBarThumb,showScrollBar:kn}))}var ve=ye.forwardRef(Ce);ve.displayName="List";var Me=ve,$e=Me},93314:function(Ot){"use strict";Ot.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(Ot,zt,fe){"use strict";fe.d(zt,{Z:function(){return qe}});const se=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,gt=(ke,de)=>(!de||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",Ie=(ke,de)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const Te=getComputedStyle(ke,null);return gt(Te.overflowY,de)||gt(Te.overflowX,de)||(ye=>{const ft=(Ue=>{if(!Ue.ownerDocument||!Ue.ownerDocument.defaultView)return null;try{return Ue.ownerDocument.defaultView.frameElement}catch(Fe){return null}})(ye);return!!ft&&(ft.clientHeight<ye.scrollHeight||ft.clientWidth<ye.scrollWidth)})(ke)}return!1},_e=(ke,de,Te,ye,ft,Ue,Fe,Oe)=>Ue<ke&&Fe>de||Ue>ke&&Fe<de?0:Ue<=ke&&Oe<=Te||Fe>=de&&Oe>=Te?Ue-ke-ye:Fe>de&&Oe<Te||Ue<ke&&Oe>Te?Fe-de+ft:0,me=ke=>{const de=ke.parentElement;return de==null?ke.getRootNode().host||null:de},Ye=(ke,de)=>{var Te,ye,ft,Ue;if(typeof document=="undefined")return[];const{scrollMode:Fe,block:Oe,inline:Le,boundary:st,skipOverflowHiddenElements:ut}=de,Et=typeof st=="function"?st:lt=>lt!==st;if(!se(ke))throw new TypeError("Invalid target");const yt=document.scrollingElement||document.documentElement,vt=[];let mt=ke;for(;se(mt)&&Et(mt);){if(mt=me(mt),mt===yt){vt.push(mt);break}mt!=null&&mt===document.body&&Ie(mt)&&!Ie(document.documentElement)||mt!=null&&Ie(mt,ut)&&vt.push(mt)}const ht=(ye=(Te=window.visualViewport)==null?void 0:Te.width)!=null?ye:innerWidth,$t=(Ue=(ft=window.visualViewport)==null?void 0:ft.height)!=null?Ue:innerHeight,{scrollX:Se,scrollY:Ge}=window,{height:rt,width:Pe,top:je,right:Ee,bottom:ze,left:Pt}=ke.getBoundingClientRect(),{top:ot,right:St,bottom:dt,left:pe}=(lt=>{const we=window.getComputedStyle(lt);return{top:parseFloat(we.scrollMarginTop)||0,right:parseFloat(we.scrollMarginRight)||0,bottom:parseFloat(we.scrollMarginBottom)||0,left:parseFloat(we.scrollMarginLeft)||0}})(ke);let ce=Oe==="start"||Oe==="nearest"?je-ot:Oe==="end"?ze+dt:je+rt/2-ot+dt,Ve=Le==="center"?Pt+Pe/2-pe+St:Le==="end"?Ee+St:Pt-pe;const wt=[];for(let lt=0;lt<vt.length;lt++){const we=vt[lt],{height:Xe,width:Ze,top:Mt,right:it,bottom:Ce,left:ve}=we.getBoundingClientRect();if(Fe==="if-needed"&&je>=0&&Pt>=0&&ze<=$t&&Ee<=ht&&(we===yt&&!Ie(we)||je>=Mt&&ze<=Ce&&Pt>=ve&&Ee<=it))return wt;const Me=getComputedStyle(we),$e=parseInt(Me.borderLeftWidth,10),xe=parseInt(Me.borderTopWidth,10),He=parseInt(Me.borderRightWidth,10),Je=parseInt(Me.borderBottomWidth,10);let et=0,nt=0;const Ke="offsetWidth"in we?we.offsetWidth-we.clientWidth-$e-He:0,xt="offsetHeight"in we?we.offsetHeight-we.clientHeight-xe-Je:0,kt="offsetWidth"in we?we.offsetWidth===0?0:Ze/we.offsetWidth:0,Yt="offsetHeight"in we?we.offsetHeight===0?0:Xe/we.offsetHeight:0;if(yt===we)et=Oe==="start"?ce:Oe==="end"?ce-$t:Oe==="nearest"?_e(Ge,Ge+$t,$t,xe,Je,Ge+ce,Ge+ce+rt,rt):ce-$t/2,nt=Le==="start"?Ve:Le==="center"?Ve-ht/2:Le==="end"?Ve-ht:_e(Se,Se+ht,ht,$e,He,Se+Ve,Se+Ve+Pe,Pe),et=Math.max(0,et+Ge),nt=Math.max(0,nt+Se);else{et=Oe==="start"?ce-Mt-xe:Oe==="end"?ce-Ce+Je+xt:Oe==="nearest"?_e(Mt,Ce,Xe,xe,Je+xt,ce,ce+rt,rt):ce-(Mt+Xe/2)+xt/2,nt=Le==="start"?Ve-ve-$e:Le==="center"?Ve-(ve+Ze/2)+Ke/2:Le==="end"?Ve-it+He+Ke:_e(ve,it,Ze,$e,He+Ke,Ve,Ve+Pe,Pe);const{scrollLeft:Wt,scrollTop:ae}=we;et=Yt===0?0:Math.max(0,Math.min(ae+et/Yt,we.scrollHeight-Xe/Yt+xt)),nt=kt===0?0:Math.max(0,Math.min(Wt+nt/kt,we.scrollWidth-Ze/kt+Ke)),ce+=ae-et,Ve+=Wt-nt}wt.push({el:we,top:et,left:nt})}return wt},Be=ke=>ke===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function qe(ke,de){if(!ke.isConnected||!(ft=>{let Ue=ft;for(;Ue&&Ue.parentNode;){if(Ue.parentNode===document)return!0;Ue=Ue.parentNode instanceof ShadowRoot?Ue.parentNode.host:Ue.parentNode}return!1})(ke))return;const Te=(ft=>{const Ue=window.getComputedStyle(ft);return{top:parseFloat(Ue.scrollMarginTop)||0,right:parseFloat(Ue.scrollMarginRight)||0,bottom:parseFloat(Ue.scrollMarginBottom)||0,left:parseFloat(Ue.scrollMarginLeft)||0}})(ke);if((ft=>typeof ft=="object"&&typeof ft.behavior=="function")(de))return de.behavior(Ye(ke,de));const ye=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:ft,top:Ue,left:Fe}of Ye(ke,Be(de))){const Oe=Ue-Te.top+Te.bottom,Le=Fe-Te.left+Te.right;ft.scroll({top:Oe,left:Le,behavior:ye})}}}}]);