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.
1106 lines
647 KiB
1106 lines
647 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[4496],{78318:function(){"use strict"},44084:function(){"use strict"},32313:function(At,Rt){"use strict";Rt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},93127: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 At={},Rt="5.0",fe={},le=null,Qe=!1,Ne=!1,He=null,ye=!1,be=null,Ie=null,Ke=0;Ke<arguments.length;Ke++){var Ee=arguments[Ke];if(Ee!==null)switch(typeof Ee){case"number":Rt=Ee.toFixed(1);break;case"string":Ee.match(new RegExp("^[0-9]\\.[0-9]+$"))?Rt=Ee:He=Ee;break;case"object":typeof Ee.is3D!="undefined"?le=Ee:fe=Ee;break;case"boolean":Qe=Ee,Ne=!0;break}}le===null&&(le={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&&!Ne&&(Qe=!0)),He!==null&&fe.id===void 0&&(fe.id=He);var de="",nt="",me=!1,lt=null,Ze=null,Be=null,Re=!1,Ae=null,et=null,tt=null,ft=null,ct=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var rt=function(we){return parseFloat(we)>4?parseFloat(we):5};At.setHTML5Codebase=function(we,Ve){Ie=we,je(we,Ve)},At.setJavaCodebase=At.setJavaCodebaseVersion=At.isCompiledInstalled=At.setPreCompiledScriptPath=At.setPreCompiledResourcePath=function(){},At.setHTML5CodebaseVersion=function(we,Ve){var Ge=parseFloat(we);if(Ge!==NaN&&Ge<5){console.log("The GeoGebra HTML5 codebase version "+Ge+" is deprecated. Using version latest instead.");return}be=we,ce(we,Ve)},At.getHTML5CodebaseVersion=function(){return Ze},At.getParameters=function(){return fe},At.setFontsCSSURL=function(we){ft=we},At.setGiacJSURL=function(we){},At.setJNLPFile=function(we){de=we},At.setJNLPBaseDir=function(we){},At.inject=function(){function we(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ve="auto",Ge=fe.id,St,Je=!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)$/)?Ve=ve:Ge=arguments[Ce]):typeof ve=="boolean"?Je=ve:ve instanceof HTMLElement&&(St=ve)}Le();function Le(){if(!ye){setTimeout(Le,200);return}Ve=dt(Ve);var Ye=St||document.getElementById(Ge);if(!Ye){console.log("possibly bug on ajax loading? ");return}if(At.removeExistingApplet(Ye,!1),fe.width===void 0&&Ye.clientWidth&&(fe.width=Ye.clientWidth),fe.height===void 0&&Ye.clientHeight&&(fe.height=Ye.clientHeight),!(fe.width&&fe.height)&&Ve==="html5"&&(delete fe.width,delete fe.height),lt=Ve,Ve==="screenshot")ke(Ye,fe);else{var ie=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?ie=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(ie=(!at()||we())&&st()),ie?(lt="screenshot",Et(Ye,fe,Je,Ve)):_e(Ye,fe,Je)}}};function at(){try{return window.self!==window.top}catch(we){return!0}}function st(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}At.getViews=function(){return le},At.isJavaInstalled=function(){return!1};var Vt=function(we){var Ve=function(Ce){var ve=JSON.parse(Ce),Le=function(ee){return ee.type=="G"||ee.type=="E"},Ye=ve.elements?ve.elements.filter(Le)[0]:ve;if(!Ye||!Ye.url){Ge();return}fe.fileName=Ye.url,Se(Ye.settings||{}),le.is3D=!0;var ie="https://www.geogebra.org/images/";At.setPreviewImage(Ae||Ye.previewUrl,ie+"GeoGebra_loading.png",ie+"applet_play.png"),we()},Ge=function(){fe.onError&&fe.onError(),vt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},St=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Je="/materials/"+fe.material_id+"?scope=basic";Oe("https://"+St+"/api/proxy.php?path="+encodeURIComponent(Je),Ve,Ge)};function Se(we){var Ve=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ge){we[Ge]=!!we[Ge]}),Ve.forEach(function(Ge){fe[Ge]===void 0&&we[Ge]!==void 0&&(fe[Ge]=we[Ge])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Oe(we,Ve,Ge){var St=new XMLHttpRequest;St.open("GET",we),St.onload=function(){Ve(St.responseText)},St.onerror=Ge,St.send()}At.isHTML5Installed=function(){return!0},At.getLoadedAppletType=function(){return lt},At.setPreviewImage=function(we,Ve,Ge){Ae=we,et=Ve,tt=Ge},At.removeExistingApplet=function(we,Ve){var Ge;typeof we=="string"&&(we=document.getElementById(we)),lt=null;var St=null;for(Ge=0;Ge<we.childNodes.length;Ge++){var Je=we.childNodes[Ge],Ce=Je.className;Ce==="applet_screenshot"?Ve?(Je.style.display="block",lt="screenshot"):Je.style.display="none":Ce!=="applet_scaler prerender"&&(we.removeChild(Je),St=Ce&&Ce.indexOf("appletParameters")!=-1?Je.id:null,Ge--)}var ve=fe.id!==void 0?fe.id:St,Le=window[ve];Le&&typeof Le.getBase64=="function"&&(Le.remove(),window[ve]=null)},At.refreshHitPoints=function(){if(rt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var we=At.getAppletObject();return we&&typeof we.recalculateEnvironments=="function"?(we.recalculateEnvironments(),!0):!1},At.startAnimation=function(){var we=At.getAppletObject();return we&&typeof we.startAnimation=="function"?(we.startAnimation(),!0):!1},At.stopAnimation=function(){var we=At.getAppletObject();return we&&typeof we.stopAnimation=="function"?(we.stopAnimation(),!0):!1},At.getAppletObject=function(){var we=fe.id!==void 0?fe.id:"ggbApplet";return window[we]},At.resize=function(){};var qe=function(we,Ve,Ge){var St=document.createElement("param");St.setAttribute("name",Ve),St.setAttribute("value",Ge),we.appendChild(St)},Te=function(we){return we&&we!=="false"},_e=function(we,Ve,Ge){rt(Ze)<=4.2&&(Ge=!0);var St=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ze||ggbHTML5LoadedCodebaseIsWebSimple&&!Re)&&(St=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Je=document.createElement("div");Je.classList.add("appletParameters","notranslate");var Ce=Ve.width,ve=Ve.height;if(Ve.disableAutoScale=Ve.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ve.disableAutoScale,Ve.width!==void 0)if(rt(Ze)<=4.4)Te(Ve.showToolBar)&&(Ve.height-=7),Te(Ve.showAlgebraInput)&&(Ve.height-=37),Ve.width<605&&Te(Ve.showToolBar)&&(Ve.width=605,Ce=605);else{var Le=100;(Te(Ve.showToolBar)||Te(Ve.showMenuBar))&&(Ve.hasOwnProperty("customToolBar")&&(Ve.customToolbar=Ve.customToolBar),Le=Te(Ve.showMenuBar)?245:155),Ce<Le&&(Ve.width=Le,Ce=Le)}Je.style.border="none",Je.style.display="inline-block";for(var Ye in Ve)Ve.hasOwnProperty(Ye)&&Ye!=="appletOnLoad"&&Je.setAttribute("data-param-"+Ye,Ve[Ye]);ft&&Je.setAttribute("data-param-fontscssurl",ft),At.resize=function(){GGBAppletUtils.responsiveResize(we,Ve)},window.addEventListener("resize",function(Nt){At.resize()});var ie=typeof Ve.appletOnLoad=="function"?Ve.appletOnLoad:function(){};if(!Ge&&Ve.width!==void 0){Ve.hasOwnProperty("showSplash")||Je.setAttribute("data-param-showSplash","false");var ee=we.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var re=ee.querySelector(".ggb_preview");else{var re=gt(Ce,ve,Ve.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=Ce+"px",ee.style.height=ve+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),rt(Ze)>=5?(Ve.appletOnLoad=function(Nt){var Dt=we.querySelector(".ggb_preview");Dt&&Dt.parentNode.removeChild(Dt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),ie(Nt)},z||ee.appendChild(re)):Je.appendChild(re),ee.appendChild(Je),z||we.appendChild(ee),setTimeout(function(){At.resize()},1)}else{var ae=document.createElement("div");ae.className="applet_scaler",ae.style.position="relative",ae.style.display="block",ae.appendChild(Je),we.appendChild(ae),Ve.appletOnLoad=function(Nt){At.resize(),ie(Nt)}}function ne(Nt,Dt){Dt&&typeof Dt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Nt,Dt.appletOnLoad):renderGGBElement(Nt),vt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dt)}function ge(Nt,Dt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Nt,params:Dt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Ft){ne(Ft.article,Ft.params)}),html5AppletsToProcess=null)},rt(Ze)<5&&(Nt.className+=" geogebraweb")):ne(Nt,Dt)}if(St){scriptLoadStarted=!0;for(var We=0;We<Je.childNodes.length;We++){var xt=Je.childNodes[We].tagName;xt==="TABLE"&&(Je.removeChild(Je.childNodes[We]),We--)}if(ggbHTML5LoadedScript!==null){var yt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');yt!=null&&yt.parentNode.removeChild(yt)}var ht=document.createElement("script"),mt=function(){ge(Je,Ve)};ht.src=nt+Be,ggbHTML5LoadedCodebaseIsWebSimple=Re,ggbHTML5LoadedCodebaseVersion=Ze,ggbHTML5LoadedScript=ht.src,vt("GeoGebra HTML5 codebase loaded: '"+nt+"'.",Ve),!Ie&&(!be||be=="5.0")?(Re?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),mt()):nt.requirejs?__webpack_require__.e(5455).then(function(){var Nt=[__webpack_require__(75455)];mt.apply(null,Nt)}.bind(this)).catch(__webpack_require__.oe):(ht.onload=mt,we.appendChild(ht))}else ge(Je,Ve);Ve.height=ve,Ve.width=Ce},ke=function(we,Ve,Ge){var St=gt(Ve.width,Ve.height,Ve.borderColor,Ge),Je=document.createElement("div");Je.style.position="relative",Je.style.display="block",Je.style.width=Ve.width+"px",Je.style.height=Ve.height+"px",Je.className="applet_screenshot applet_scaler"+(Ge?" applet_screenshot_play":""),Je.appendChild(St);var Ce=GGBAppletUtils.getScale(Ve,we,Ge);Ge?(we.appendChild($e()),window.GGBT_wsf_view||(we.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Je,"66%"),we.appendChild(Je),Ce!==1&&!isNaN(Ce)&&(GGBAppletUtils.scaleElement(Je,Ce),Je.style.width=Ve.width+"px",Je.style.height=Ve.height+"px",Je.parentNode.style.width=Ve.width*Ce+"px",Je.parentNode.style.height=Ve.height*Ce+"px"),At.resize=function(){Fe(we,St,Je,Ge)},window.addEventListener("resize",function(ve){At.resize()}),At.resize()};function Fe(we,Ve,Ge,St){if(we.contains(Ve)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(we.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(we)}var Je=GGBAppletUtils.getScale(fe,we,St);Ge.parentNode!==null&&(!isNaN(Je)&&Je!==1?(GGBAppletUtils.scaleElement(Ge,Je),Ge.parentNode.style.width=fe.width*Je+"px",Ge.parentNode.style.height=fe.height*Je+"px"):(GGBAppletUtils.scaleElement(Ge,1),Ge.parentNode.style.width=fe.width+"px",Ge.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()}}At.onExitFullscreen=function(we,Ve){Ve.appendChild(we)};var Et=function(we,Ve,Ge,St){ke(we,Ve,!0);for(var Je=function(){var Le=[];for(ve=0;ve<we.childNodes.length;ve++)Le.push(we.childNodes[ve]);if(window.GGBT_wsf_view){var Ye=window.GGBT_wsf_view.renderFullScreen(we,Ve.id),ie=document.getElementById("fullscreencontainer"),ee=jQuery(we).find(".fullscreencontent");ee.length>0?(Ye.remove(),ee.attr("id","fullscreencontent").show(),jQuery(ie).append(ee),window.dispatchEvent(new Event("resize"))):_e(Ye,Ve,!1),window.GGBT_wsf_view.launchFullScreen(ie)}else lt=St,_e(we,Ve,!1);if(!window.GGBT_wsf_view)for(ve=0;ve<Le.length;ve++)we.removeChild(Le[ve])},Ce=we.getElementsByClassName("ggb_preview_play"),ve=0;ve<Ce.length;ve++)Ce[ve].addEventListener("click",Je,!1),Ce[ve].addEventListener("ontouchstart",Je,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(we),st()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},$e=function(){var we=document.createElement("div");if(we.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ve='.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");}',Ge=document.createElement("style");Ge.styleSheet?Ge.styleSheet.cssText=Ve:Ge.appendChild(document.createTextNode(Ve)),document.getElementsByTagName("head")[0].appendChild(Ge)}return we},gt=function(we,Ve,Ge,St){var Je=document.createElement("div");Je.className="ggb_preview",Je.style.position="absolute",Je.style.zIndex="90",Je.style.width=we-2+"px",Je.style.height=Ve-2+"px",Je.style.top="0px",Je.style.left="0px",Je.style.overflow="hidden",Je.style.backgroundColor="white";var Ce="lightgrey";Ge!==void 0&&(Ge==="none"?Ce="transparent":Ce=Ge),Je.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",Ae!==null&&ve.setAttribute("src",Ae),ve.style.opacity=.7,et!==null){var Le,Ye,ie;if(!St){Le=document.createElement("img"),Le.style.position="absolute",Le.style.zIndex="1001",Le.style.opacity=1,ve.style.opacity=.3,Ye=360,Ye>we/4*3&&(Ye=we/4*3),ie=Ye/5.8,Le.setAttribute("src",et),Le.setAttribute("width",Ye),Le.setAttribute("height",ie);var ee=(we-Ye)/2,z=(Ve-ie)/2;Le.style.left=ee+"px",Le.style.top=z+"px",Je.appendChild(Le)}}return Je.appendChild(ve),Je},dt=function(we){return we=we.toLowerCase(),we==="html5"||we==="screenshot"?we:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ce=function(we,Ve){if(Ze=we,Ve){je(Ze,!0);return}var Ge=!Qe;if(Ge){var St=rt(Ze);!isNaN(St)&&St<4.4&&(Ge=!1)}var Je,Ce;window.location.protocol.substr(0,4)==="http"?Je=window.location.protocol:Je="http:";var ve=Ze.indexOf("//");ve>0?Ce=Ze:ve===0?Ce=Je+Ze:Ce="https://www.geogebra.org/apps/5.2.814.0/";for(var Le in pe)if(Ze.slice(pe[Le].length*-1)===pe[Le]||Ze.slice((pe[Le].length+1)*-1)===pe[Le]+"/"){je(Ce,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ge&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Te(fe.showToolBar)&&!Te(fe.showMenuBar)&&!Te(fe.showAlgebraInput)&&!Te(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Ce+="webSimple/":Ce+="web3d/",je(Ce,!1)},je=function(we,Ve){if(we.requirejs){nt=we;return}we.slice(-1)!=="/"&&(we+="/"),nt=we,Ve===null&&(Ve=we.indexOf("http")===-1),me=Ve,Be="web.nocache.js",Re=!1;var Ge=nt.split("/");Ge.length>1&&(!Ve&&Ge[Ge.length-2]==="webSimple"?(Be="webSimple.nocache.js",Re=!0):pe.indexOf(Ge[Ge.length-2])>=0&&(Be=Ge[Ge.length-2]+".nocache.js")),Ge=we.split("/"),Ze=Ge[Ge.length-3],Ze.substr(0,4)==="test"?Ze=Ze.substr(4,1)+"."+Ze.substr(5,1):(Ze.substr(0,3)==="war"||Ze.substr(0,4)==="beta")&&(Ze="5.0");var St=parseFloat(Ze);St!==NaN&&St<5&&we.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+St+" is deprecated. Using version latest instead."),ce("5.0",Ve))},vt=function(we,Ve){window.console&&window.console.log&&(!Ve||typeof Ve.showLogging=="undefined"||Ve.showLogging&&Ve.showLogging!=="false")&&console.log(we)};fe.material_id!==void 0?Vt(ut):ut();function ut(){var we=Rt;be!==null?we=be:parseFloat(we)<5&&(we="5.0"),ce(we,!1),Ie!==null&&je(Ie,me),ye=!0}return At},GGBAppletUtils=function(){"use strict";function At(){return window.GGBT_wsf_edit!==void 0}function Rt(ye,be){be!=1?(ye.style.transformOrigin="0% 0% 0px",ye.style.webkitTransformOrigin="0% 0% 0px",ye.style.transform="scale("+be+","+be+")",ye.style.webkitTransform="scale("+be+","+be+")",ye.style.maxWidth="initial",ye.querySelector(".ggb_preview")!==null&&(ye.querySelector(".ggb_preview").style.maxWidth="initial"),ye.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ye.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ye.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ye.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ye.style.transform="none",ye.style.webkitTransform="none")}function fe(ye,be,Ie,Ke,Ee,de){var nt=null;if(de!=null&&de!="")for(var me=ye.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+de+" ")>-1){nt=me;break}else me=me.parentNode;var lt=0,Ze=0,Be=0,Re=0,Ae=0,et=0,tt=0;if(nt)lt=nt.offsetWidth,Ze=Math.max(Ke?nt.offsetWidth:0,nt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(lt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ze=Math.min(window.innerHeight,document.documentElement.clientHeight),Be=lt):(lt=window.innerWidth,Ze=window.innerHeight,Be=window.innerWidth),ye){var ft=ye.getBoundingClientRect();ft.left>0&&ft.left<=lt&&(Ee===void 0||!Ee)&&(document.dir==="rtl"?(Ae=lt-ft.width-ft.left,et=Be<=480?10:30):(et=ft.left,Ae=Be<=480?10:30),Re=et+Ae)}if(ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ct=ye.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Re=40,tt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Re=0,tt=40)}}return ye&&((Ie===void 0||!Ie)&&be>0&&be+Re<lt?lt=be:lt-=Re,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ie===void 0||!Ie)&&(Ze-=tt)),{width:lt,height:Ze}}function le(ye,be,Ie,Ke,Ee){if(ye.isScreenshoGenerator)return 1;var de=Ke!==void 0&&Ke,nt=ye.noScaleMargin!=null&&ye.noScaleMargin,me=function(ct){return ct&&ct!=="false"},lt=me(ye.autoHeight),Ze=fe(be,ye.width,Ie,lt,de&&window.GGBT_wsf_view||nt,Ee),Be=parseInt(Ze.width),Re=ye.width,Ae=ye.height;if(Re===void 0){var et=be.querySelector(".appletParameters");et&&(Re=et.offsetWidth,Ae=et.offsetHeight)}var tt=Be/Re,ft=de?1:Ze.height/Ae;return Ie!==void 0&&!Ie&&(tt=Math.min(1,tt),ft=Math.min(1,ft)),Math.min(tt,ft)}function Qe(ye,be,Ie){var Ke=1,Ee,de=!1;if(ye.hasOwnProperty("allowUpscale")&&(de=ye.allowUpscale),ye.hasOwnProperty("scale")&&(Ke=parseFloat(ye.scale),(isNaN(Ke)||Ke===null||Ke===0)&&(Ke=1),Ke>1&&(de=!0)),be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de=!0),!(ye.hasOwnProperty("disableAutoScale")&&ye.disableAutoScale))Ee=le(ye,be,de,Ie,ye.scaleContainerClass);else return Ke;return de&&(!ye.hasOwnProperty("scale")||Ke===1)?Ee:Math.min(Ke,Ee)}function Ne(ye){var be=Math.min(window.innerWidth,document.documentElement.clientWidth),Ie=Math.min(window.innerHeight,document.documentElement.clientHeight),Ke=ye.getBoundingClientRect(),Ee=(be-Ke.width)/2,de=(Ie-Ke.height)/2;de<0&&(de=0),ye.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee<40?ye.style.left="40px":ye.style.left=Ee+"px",ye.style.top=de+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(de<40?ye.style.top="40px":ye.style.top=de+"px",ye.style.left=Ee+"px")}function He(ye,be){var Ie=ye.querySelector(".appletParameters");if(Ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(be.id!==Ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ye)}if(Ie.parentElement&&/fullscreen/.test(Ie.parentElement.className))return;var Ke=Qe(be,ye);At()&&Ie.setAttribute("data-param-scale",Ke);for(var Ee=null,de=0;de<ye.childNodes.length;de++)if(ye.childNodes[de].className!==void 0&&ye.childNodes[de].className.match(/^applet_scaler/)){Ee=ye.childNodes[de];break}if(Ee!==null&&Ee.querySelector(".noscale")!==null)return;var nt=be.id!==void 0?be.id:"ggbApplet",me=window[nt];(me==null||!me.recalculateEnvironments)&&Ee!==null&&!Ee.className.match(/fullscreen/)&&(Ee.parentNode.style.transform="",!isNaN(Ke)&&Ke!==1?(Ee.parentNode.style.width=be.width*Ke+"px",Ee.parentNode.style.height=be.height*Ke+"px",Rt(Ee,Ke)):(Rt(Ee,1),Ee.parentNode.style.width=be.width+"px",Ee.parentNode.style.height=be.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ne(ye),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ie).parents(".content-added-content"))}}return{responsiveResize:He,isFlexibleWorksheetEditor:At,positionCenter:Ne,getScale:Qe,scaleElement:Rt}}();__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 At=n.location.search;return At.indexOf(J)!=-1||At.indexOf(K)!=-1}function q(At,Rt){}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(At){var Rt=s[L].bindings;s[L].bindings=function(){for(var fe=Rt?Rt():{},le=At[webModule.__softPermutationId],Qe=O;Qe<le.length;Qe++){var Ne=le[Qe];fe[Ne[O]]=Ne[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var At=o.createElement(Q);if(At.id=L,At.style.cssText=R+S,At.tabIndex=-1,o.body.appendChild(At),t=At.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Rt=document.compatMode==U?V:W;t.write(Rt+X),t.close()}}}function w(At){function Rt(le){function Qe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ne=Qe();if(Ne){le();return}function He(){if(!Ne){if(!Qe())return;Ne=!0,le(),o.removeEventListener&&o.removeEventListener(Z,He,!1),ye&&clearInterval(ye)}}o.addEventListener&&o.addEventListener(Z,He,!1);var ye=setInterval(function(){He()},$)}function fe(le){var Qe=u(),Ne=Qe.body,He=Qe.createElement(_);He.language=ab,He.crossOrigin=W,He.src=le,webModule.__errFn&&(He.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),Ne.appendChild(He)}Rt(function(){fe(At)})}webModule.__startLoadingFragment=function(At){return C(At)},webModule.__installRunAsyncCode=function(At){var Rt=u(),fe=Rt.body,le=Rt.createElement(_);le.language=ab,le.text=At,fe.appendChild(le),fe.removeChild(le)};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(At){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(At){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(At){var Rt=c[At];return Rt==null?null:Rt},r=d,webModule.__errFn=e}function B(){function At(ye){var be=ye.lastIndexOf(rb);be==-1&&(be=ye.length);var Ie=ye.indexOf(sb);Ie==-1&&(Ie=ye.length);var Ke=ye.lastIndexOf(tb,Math.min(Ie,be));return Ke>=O?ye.substring(O,Ke+P):W}function Rt(ye){if(!ye.match(/^\w+:\/\//)){var be=o.createElement(ub);be.src=ye+vb,ye=At(be.src)}return ye}function fe(){var ye=__gwt_getMetaProperty(wb);return ye!=null?ye:W}function le(){for(var ye=o.getElementsByTagName(_),be=O;be<ye.length;++be)if(ye[be].src.indexOf(xb)!=-1)return At(ye[be].src);return W}function Qe(){var ye=o.getElementsByTagName(yb);return ye.length>O?ye[ye.length-P].href:W}function Ne(){var ye=o.location;return ye.href==ye.protocol+zb+ye.host+ye.pathname+ye.search+ye.hash}var He=fe();return He==W&&(He=le()),He==W&&(He=Qe()),He==W&&Ne()&&(He=At(o.location.href)),He=Rt(He),He}function C(At){return At.match(/^\//)||At.match(/^[a-zA-Z]+:\/\//)?At:webModule.__moduleBase+At}function D(){var At=[],Rt=O,fe=[],le=[];function Qe(ye){var be=le[ye](),Ie=fe[ye];if(be in Ie)return be;var Ke=[];for(var Ee in Ie)Ke[Ie[Ee]]=Ee;throw r&&r(ye,Ke,be),null}if(__gwt_isKnownPropertyValue=function(ye,be){return be in fe[ye]},webModule.__getPropMap=function(){var ye={};for(var be in fe)fe.hasOwnProperty(be)&&(ye[be]=Qe(be));return ye},webModule.__computePropValue=Qe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var He=Ne.indexOf(Db);He!=-1&&(Rt=parseInt(Ne.substring(He+P),$),Ne=Ne.substring(O,He))}catch(ye){}return webModule.__softPermutationId=Rt,C(Ne+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})()},8396:function(At,Rt,fe){"use strict";fe.d(Rt,{Ax:function(){return He},Ds:function(){return ye},KI:function(){return Ie},SI:function(){return Ne},f1:function(){return Qe}});var le=fe(85386);function Qe(Ke){let Ee=!0;if(Ke.length>0){for(let de=0;de<Ke.length;de++)if(Ke[de].compile_success==0||!Ke[de].compile_success){Ee=!1;break}}else Ee=!1;return Ee}function Ne(Ke,Ee=""){let de=[];for(let nt=0;nt<Ke.length;nt++){let me=Ke[nt],lt=Ee?`${Ee}/${me.name}`:`${me.name}`;de.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:lt})}return de}function He(Ke,Ee,de){for(let nt=0;nt<Ke.length;nt++){let me=Ke[nt];if(me.key===Ee){me.children=de;break}me.children&&He(me.children,Ee,de)}return Ke}function ye(Ke,Ee,de){let nt;return function(){let me=this,lt=arguments,Ze=function(){nt=null,de||Ke.apply(me,lt)},Be=de&&!nt;clearTimeout(nt),nt=setTimeout(Ze,Ee),Be&&Ke.apply(me,lt)}}const be=!0,Ie=le.Z.API_SERVER},40783:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return nt}});var le=fe(59301),Qe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=fe(92310),He=fe.n(Ne),ye=fe(29787),be=fe(2859),Ie=fe(43597),Ke=fe(94601),Ee=(me,lt,Ze)=>new Promise((Be,Re)=>{var Ae=ft=>{try{tt(Ze.next(ft))}catch(ct){Re(ct)}},et=ft=>{try{tt(Ze.throw(ft))}catch(ct){Re(ct)}},tt=ft=>ft.done?Be(ft.value):Promise.resolve(ft.value).then(Ae,et);tt((Ze=Ze.apply(me,lt)).next())}),nt=({data:me,className:lt,fullWidth:Ze,style:Be={},onClose:Re,onOk:Ae,showFullTools:et,noAssociationId:tt})=>{const ft=(0,le.useRef)(null),ct=(0,le.useRef)(null),rt=(0,le.useRef)(null),at=(0,le.useRef)(null),[st,Vt]=(0,le.useState)(!1),[Se,Oe]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(rt.current||(rt.current=document.createElement("style"),document.head.appendChild(rt.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),rt.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&qe()):(document.body.removeAttribute("data-custom"),rt.current&&(document.head.removeChild(rt.current),rt.current=null)),()=>{document.body.removeAttribute("data-custom"),rt.current&&(document.head.removeChild(rt.current),rt.current=null)}),[me==null?void 0:me.visible]);const qe=()=>Ee(void 0,null,function*(){Vt(!0),Oe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Fe=yield(0,Ke.ZJ)(me==null?void 0:me.src);ft.current.src="",ft.current.src=Fe,ft.current.onload=function(){ke()},Vt(!1),Oe("")}),Te=Fe=>Ee(void 0,null,function*(){Vt(!0),Oe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Et=yield(0,Ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:Fe.dataUrl}});Et!=null&&Et.id&&!tt?(yield(0,Ie.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:Et==null?void 0:Et.id,settings:JSON.stringify(Fe.state)}})).status===0&&Ae():Et!=null&&Et.id&&Ae(Et),Vt(!1),Oe("")}),_e=()=>{const Fe=document.querySelector('a[href="https://markerjs.com/"]');Fe&&Fe.parentNode&&(Fe.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($e=>{const gt=document.querySelector($e.name);gt&>.setAttribute("title",$e.title)})},ke=()=>{ct.current=new be.hP(ft.current),ct.current.targetRoot=at.current,ct.current.addEventListener("render",Te),ct.current.addEventListener("beforeclose",Re),et&&(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(),me!=null&&me.snapshotData&&ct.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),_e()},300)};return le.createElement(le.Fragment,null,(me==null?void 0:me.visible)&&le.createElement(ye.Z,{spinning:st,tip:Se,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:at,className:He()(Qe.imageDimensions,lt,Ze?Qe.fullWidth:""),style:Be},le.createElement("img",{className:Qe.img,ref:ft}))))}},57765:function(At,Rt,fe){"use strict";var le=fe(59301),Qe=fe(77019),Ne=fe(5269),He=fe(20554),ye=fe(99571),be=fe(74776),Ie=fe(32313),Ke=fe(48136),Ee=fe(59301);const de=(0,le.forwardRef)(({callback:nt,showSaveButton:me,value:lt=""},Ze)=>{const Be=(0,le.useRef)(),Re=[{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 "}]}]}],Ae=[{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}`}]}]}],et=ct=>{Be.current.setValue(Be.current.getValue()+" "+ct.value+" ")},tt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ee.createElement(Qe.Z,{className:Ie.Z.lists,gutter:[10,10]},Re.map((ct,rt)=>Ee.createElement(Ne.Z,{flex:"110px",className:Ie.Z.item},Ee.createElement("div",null,Ee.createElement(be.Z,{value:`$$${ct.value}$$`}),ct.name),Ee.createElement("div",{className:Ie.Z.children},ct.children.map((at,st)=>Ee.createElement("div",{key:st},Ee.createElement("h1",null,at.name),Ee.createElement(Qe.Z,{gutter:[10,10]},at.data.map((Vt,Se)=>Ee.createElement(Ne.Z,{key:Se,onClick:()=>et(Vt),className:Ie.Z.diamond},Ee.createElement(be.Z,{value:"`$$"+Vt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ee.createElement(Qe.Z,{className:Ie.Z.lists,gutter:[10,10]},Ae.map((ct,rt)=>Ee.createElement(Ne.Z,{flex:"110px",className:Ie.Z.item},Ee.createElement("div",null,Ee.createElement(be.Z,{value:"`$$"+ct.value+"$$`"}),ct.name),Ee.createElement("div",{className:Ie.Z.children},ct.children.map((at,st)=>Ee.createElement("div",{key:st},at.name&&Ee.createElement("h1",null,at.name),Ee.createElement(Qe.Z,{gutter:[10,10]},at.data.map((Vt,Se)=>Ee.createElement(Ne.Z,{key:Se,onClick:()=>et(Vt),className:Ie.Z.diamond},Ee.createElement(be.Z,{value:"`$$"+Vt.value+"$$`"}))))))))))}],ft=()=>{var ct=document.createElement("div");ct.innerHTML=Be.current.getValue();var rt=ct.innerText;return nt&&nt(rt),rt};return(0,le.useImperativeHandle)(Ze,()=>({getData:ft})),Ee.createElement("div",{className:Ie.Z.mathWrap},Ee.createElement(He.default,{defaultActiveKey:"1",items:tt}),Ee.createElement("math-field",{locale:"zh_cn",className:Ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Be,style:{width:800,marginTop:30,fontSize:18}},lt||""),me&&Ee.createElement("div",{className:Ie.Z.button},Ee.createElement(ye.ZP,{size:"large",onClick:ft,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Rt.Z=de},62556:function(At,Rt,fe){"use strict";var le=fe(59301),Qe=fe(93314),Ne=fe(99571),He=Object.defineProperty,ye=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,de=(Ze,Be,Re)=>Be in Ze?He(Ze,Be,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Ze[Be]=Re,nt=(Ze,Be)=>{for(var Re in Be||(Be={}))Ke.call(Be,Re)&&de(Ze,Re,Be[Re]);if(Ie)for(var Re of Ie(Be))Ee.call(Be,Re)&&de(Ze,Re,Be[Re]);return Ze},me=(Ze,Be)=>ye(Ze,be(Be));const lt=({img:Ze,buttonProps:Be={},styles:Re={},customText:Ae,ButtonText:et,ButtonClick:tt,Buttonclass:ft,ButtonTwo:ct,imgStyles:rt,loading:at=!1,className:st=""})=>le.createElement("section",{className:`tc animated fadeIn ${st}`,style:nt({color:"#999",margin:"100px auto",visibility:at?"hidden":"visible"},Re)},le.createElement("img",{src:Ze||Qe,style:me(nt({},rt),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},Ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),et&&le.createElement(Ne.ZP,nt({className:ft,onClick:tt},Be),et),ct&&ct);Rt.Z=lt},33859:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return ft}});var le=fe(59301),Qe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ne=fe(99571),He=fe(70557),ye=fe(71775),be=fe(25399),Ie=fe(94601),Ke=fe(39598),Ee=fe(62556),de=fe(85386),nt=fe(40976),me=fe(59301),lt=Object.defineProperty,Ze=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Ae=(ct,rt,at)=>rt in ct?lt(ct,rt,{enumerable:!0,configurable:!0,writable:!0,value:at}):ct[rt]=at,et=(ct,rt)=>{for(var at in rt||(rt={}))Be.call(rt,at)&&Ae(ct,at,rt[at]);if(Ze)for(var at of Ze(rt))Re.call(rt,at)&&Ae(ct,at,rt[at]);return ct},tt=(ct,rt,at)=>new Promise((st,Vt)=>{var Se=Te=>{try{qe(at.next(Te))}catch(_e){Vt(_e)}},Oe=Te=>{try{qe(at.throw(Te))}catch(_e){Vt(_e)}},qe=Te=>Te.done?st(Te.value):Promise.resolve(Te.value).then(Se,Oe);qe((at=at.apply(ct,rt)).next())}),ft=({editOffice:ct="view",data:rt,issaver:at,onSaver:st,theme:Vt,type:Se,filename:Oe,monacoEditor:qe,className:Te,style:_e,close:ke,onClose:Fe,hasMask:Et,disabledDownload:$e,onImgDimensions:gt,showNodata:dt,recordInfo:pe})=>{const[ce,je]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[vt,ut]=(0,le.useState)(""),[we,Ve]=(0,le.useState)(),Ge=window.ENV==="build"?"/react/build":"",St=location.host.startsWith("localhost")?de.Z.PROXY_SERVER:de.Z.API_SERVER,Ce=10*(1024*1024),ve=(0,le.useRef)();rt!=null&&rt.startsWith("/api")&&Se!=="txt"&&(rt=de.Z.API_SERVER+rt);const Le=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();Oe&&qe&&(qe.filename=Oe),(0,le.useEffect)(()=>{var re,ae;const ne=(ae=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:ae.split(";");ne==null||ne.map(ge=>{let We=ge.split("=");We[0]==="_educoder_session"&&ut(We[1])})},[]),(0,le.useEffect)(()=>{Se==="office"&&(rt.indexOf("bigfilescdn.")>-1||rt.indexOf("bigfiles1")>-1?Ve({url:rt,fileType:Le(rt),model:rt.indexOf("model=edit")?"edit":"view"}):ie())},[Se,rt]);function Ye(re){return tt(this,null,function*(){re.data.type==="pdfdata"&&(st(re.data.data),window.removeEventListener("message",Ye,!1)),console.log("mess---:",re.data)})}const ie=()=>tt(void 0,null,function*(){console.log("data:",rt);let re=rt;rt.startsWith("http")||(re=location.origin+re);let ae=new URL(re).pathname.split("/").pop();const ne=yield(0,Ke.gJ)({attachment_id:ae});ne.url=St+ne.url,Ve(ne)}),ee=()=>{if(rt.startsWith("http")||rt.startsWith("blob:")){z();return}(0,Ie.Sv)(Oe||"educoder",rt,Oe)},z=()=>{pe&&(0,nt.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Ie.Nd)(Oe||"educoder",decodeURIComponent(rt))};return me.createElement("div",{style:et({},_e||{}),className:`${Et&&Qe.bgBlack} ${Se?Qe.wrp:"hide"}`},ke&&me.createElement("div",{className:Qe.close,ref:ve},!!gt&&me.createElement(be.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ve.current},me.createElement("span",{onClick:()=>{Fe(),gt()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!$e&&me.createElement(be.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ve.current},me.createElement("span",{onClick:z},me.createElement("i",{className:"icon-quxiaozhiding"}))),at&&me.createElement(be.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ve.current},me.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",Ye,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},me.createElement("i",{className:"icon-baocun"}))),me.createElement(be.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ve.current},me.createElement("span",{className:"",onClick:()=>{Fe()}},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Qe[Te]} ${Te} ${Qe.monaco} ${Se==="txt"?"show":"hide"}`},Se==="txt"&&me.createElement(me.Fragment,null,me.createElement(ye.ZP,et({},qe)))),Se==="audio"&&me.createElement("audio",{src:`${(rt==null?void 0:rt.indexOf("http://"))>-1||(rt==null?void 0:rt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${rt}`,autoPlay:!0}),Se==="video"&&me.createElement(me.Fragment,null,(rt==null?void 0:rt.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${rt}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${rt}`,autoPlay:!0})),Se==="office"&&we&&me.createElement("iframe",{src:`${Ge}/office.html?key=${we.key}&url=${btoa(we.url)}&callbackUrl=${St+(we.callbackUrl||"")}&fileType=${we.fileType}&title=${we.title||""}&model=${ct}&officeServer=${de.Z.ONLYOFFICE}&disabledDownload=${!!$e}`}),Se==="html"&&me.createElement("iframe",{src:rt+"&disposition=inline"}),Se==="pdf"&&me.createElement("iframe",{id:"pdfiframe",src:`${Ge}/js/pdfview/index.html?filename=${Oe||"educoder.pdf"}&url=${encodeURIComponent(rt)}&disabledDownload=${!!$e}&model=${ct}`}),Se==="image"&&me.createElement("img",{src:`${(rt==null?void 0:rt.indexOf("http://"))>-1||(rt==null?void 0:rt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${rt}`}),(Se==="other"||Se==="download")&&me.createElement(me.Fragment,null,dt?me.createElement(Ee.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(Ne.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:$e},"\u4E0B\u8F7D")}):me.createElement(Ne.ZP,{type:"primary",size:"middle",onClick:ee,disabled:$e},me.createElement(He.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Se==="flowChart"&&me.createElement("div",{className:"embed"},me.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${rt||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},74776:function(At,Rt,fe){"use strict";fe.d(Rt,{z:function(){return qe},Z:function(){return Te}});var le=fe(59301),Qe=fe(73958),Ne=fe(42684),He=fe(64018),ye=fe(44523),be=fe(85386),Ie=fe(94601),Ke=fe(15342),Ee=fe(44104),de=fe(99571),nt=fe(1012),me=fe(33859),lt=fe(59301),Be=({html:_e})=>{const ke=(0,le.useRef)(null),Fe=(0,le.useRef)(null),Et=`.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,le.useEffect)(()=>{const $e=ke.current.attachShadow({mode:"open"});Fe.current=document.createElement("div"),Fe.current.className="markdown-body",Fe.current.innerHTML=_e,$e.appendChild(Fe.current);const gt=document.createElement("style");return gt.textContent=Et,$e.appendChild(gt),()=>{$e.innerHTML=""}},[]),(0,le.useEffect)(()=>{Fe.current&&(Fe.current.innerHTML=_e)},[_e]),lt.createElement("div",{ref:ke})};function Re(_e){const ke=["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"],Fe=new RegExp(`\\b(${ke.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return _e.replace(Fe,"").trim()}var Ae={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},et=Object.defineProperty,tt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,rt=(_e,ke,Fe)=>ke in _e?et(_e,ke,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):_e[ke]=Fe,at=(_e,ke)=>{for(var Fe in ke||(ke={}))ft.call(ke,Fe)&&rt(_e,Fe,ke[Fe]);if(tt)for(var Fe of tt(ke))ct.call(ke,Fe)&&rt(_e,Fe,ke[Fe]);return _e};const st="@\u2581\u2581@",Vt="@\u2581@",Se=/<pre[^>]*>/g;function Oe(_e){let ke=document.createElement("div");return ke.innerHTML=_e,ke.childNodes.length===0?"":ke.childNodes[0].nodeValue}const qe=(_e,ke)=>{_e=_e||"";const Fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,$e=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,gt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ke?_e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Fe,(dt,pe,ce,je,vt,ut,we)=>{const Ve=pe||je||ut,Ge=ce||vt||we||"?";return be.Z.API_SERVER+"/api/attachments/"+Ve+Ge+"&t="+(0,Ie.Jn)(Ve,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(_e=_e.replace(gt,(dt,pe,ce,je,vt,ut,we)=>{const Ve=pe||je||ut,Ge=ce||vt||we||"?";return be.Z.API_SERVER+"/attachments/download/"+Ve+Ge+"&t="+(0,Ie.Jn)(Ve,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Fe,(dt,pe,ce,je,vt,ut,we)=>{const Ve=pe||je||ut,Ge=ce||vt||we||"?";return be.Z.API_SERVER+"/api/attachments/"+Ve+Ge+"&t="+(0,Ie.Jn)(Ve,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Et,(dt,pe,ce,je,vt)=>{const ut=pe||je,we=ce||vt||"";return'"'+be.Z.API_SERVER+"/api/attachments/"+ut+we+ut+we+"&t="+(0,Ie.Jn)(ut,Date.now())}).replace($e,(dt,pe,ce,je,vt)=>{const ut=pe||je,we=ce||vt||"";return"("+be.Z.API_SERVER+"/files/uploads/"+ut+we+ut+we+"&t="+(0,Ie.Jn)(ut,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,`
|
|
`),_e)};var Te=({value:_e="",edit:ke=!1,className:Fe,showTextOnly:Et,showLines:$e,style:gt={},stylesPrev:dt={},highlightKeywords:pe,showProgramFill:ce,isProgramFill:je,disabledFill:vt=!1,programFillValue:ut,openEditor:we=()=>{},onFillChange:Ve=Je=>{},onFillBlur:Ge=()=>{},onFillFocus:St=()=>{}})=>{let Je=Re(String(_e||""));const Ce=(0,le.useRef)(),ve=(0,le.useRef)(),[Le,Ye]=(0,le.useState)(""),[ie,ee]=(0,le.useState)("office"),[z,re]=(0,le.useState)([]),ae=(0,le.useRef)("a"+(0,nt.Z)()),ne={},ge=it=>/<style[\s\S]*?>/i.test(it||""),We=(it,ln,Wt)=>{const Ut=document.createElement(it===Vt?"input":"textarea");Ut.style.width="100%",Ut.style.height=it===Vt?"40px":"151px",Ut.rows=5,Ut.spellcheck=!1,Ut.name="edu-program-fill",Ut.placeholder="\u8BF7\u8F93\u5165",Ut.dataset.id=ln;const un=Object.keys(ne).length;return ne[un]=Ut,`<span class="edu-program-fill-wrap ${it===Vt?"":"show"}" style="width:${it===Vt?"600px":"100%"}" title=${Wt||""}><span>${Ut.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function xt(it){return it=it.replace(/!\[.*?\]\(.*?\)/g,""),it=it.replace(/\[.*?\]\(.*?\)/g,""),it=it.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),it=it.replace(/<embed.*?>/g,""),it=it.replace(/<img.*?>/g,""),it=it.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),it=it.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),it=it.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),it=it.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),it}const yt=it=>!Et&&ge(Je)?it:it.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ln,Wt){let Ut=Wt.replace(/(\n|\r)/g,"").split("}"),un=[];return Ut.map(An=>{An!=""&&un.push(`.${ae.current} ${An}`)}),`<style>${un.join("}")}</style>`}),ht=(0,le.useMemo)(()=>{try{const Ut=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,An=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,hn=/\(\/attachments\/download\//g;Je=Je.replace(hn,"("+be.Z.API_SERVER+"/attachments/download/").replace(Ut,"("+be.Z.API_SERVER+"/api/attachments/").replace(un,'"'+be.Z.API_SERVER+"/api/attachments/").replace(An,'"'+be.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(Ut){}if(ce){let Ut=-1;return Je=Je.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(un,An,hn){var wn;return++Ut,We(un,Ut,(wn=ut==null?void 0:ut[Ut])==null?void 0:wn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${yt(Je||"")}</pre>`}let it=yt(Je);it=(0,Ne.ZP)(it);const ln=(0,Ne.ez)();Je.match(/\[TOC\]/)&&(it=it.replace("<p>[TOC]</p>",(0,Ne.Qv)()),(0,Ne.Iy)()),it=it.replace(/(__special_katext_id_\d+__)/g,(Ut,un)=>{const{type:An,expression:hn}=ln[un];return(0,Ke.renderToString)(Oe(hn)||"",{displayMode:An==="block",throwOnError:!1,output:"html"})}),it=it.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ne.AL)();const Wt=document.createElement("div");if(Wt.innerHTML=it,Et)return Wt.innerText;if(pe){const Ut=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ft(Wt,Ut),Wt.innerHTML}return setTimeout(()=>sn(),500),Wt.innerHTML},[Je,pe]);(0,le.useEffect)(()=>{zt.current&&zt.current.querySelectorAll(["input","textarea"]).forEach(ln=>{ln.oninput=mt,ln.onblur=Nt,ln.onfocus=Dt})},[z]),(0,le.useEffect)(()=>{var it,ln,Wt,Ut,un;if(ut!=null&&ut.length)try{const An=zt.current.querySelectorAll(".edu-program-fill-score"),hn=zt.current.querySelectorAll('[name="edu-program-fill"]');for(const[wn,er]of hn.entries())er.value=((it=ut==null?void 0:ut[wn])==null?void 0:it.value)||"",((ln=ut==null?void 0:ut[wn])==null?void 0:ln.type)==="warning"?er.className="program-fill-warning":((Wt=ut==null?void 0:ut[wn])==null?void 0:Wt.type)==="success"?er.className="program-fill-success":er.className="";for(const[wn,er]of An.entries())er.innerHTML=(Ut=ut==null?void 0:ut[wn])!=null&&Ut.score?`${(un=ut==null?void 0:ut[wn])==null?void 0:un.score}\u5206`:"";re(ut)}catch(An){console.log(An,"error")}},[ut]);const mt=it=>{z[it.target.dataset.id]=z[it.target.dataset.id]||{},z[it.target.dataset.id].value=it.target.value,re([...z]),Ve(z,it.target.dataset.id)},Nt=it=>{z[it.target.dataset.id]=z[it.target.dataset.id]||{},z[it.target.dataset.id].value=it.target.value,re([...z]),Ge(z,it.target.dataset.id)},Dt=it=>{z[it.target.dataset.id]=z[it.target.dataset.id]||{},z[it.target.dataset.id].value=it.target.value,re([...z]),St(z,it.target.dataset.id)};function Ft(it,ln){return it.childNodes.forEach(Wt=>{var Ut;if(Wt.childNodes.length>0)Ft(Wt,ln);else if(Wt.nodeName!=="IMG")if(Wt.innerHTML)Wt.innerHTML=(Ut=Wt.innerHTML)==null?void 0:Ut.replace(new RegExp(ln,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=Wt.textContent.replace(new RegExp(ln,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Wt.replaceWith(un)}})}const zt=(0,le.useRef)();Ne.jb.WebkitLineClamp=$e,$e&&(gt=at(at({},gt),Ne.jb));function Lt(it){let ln=it.target;if(ln.tagName.toUpperCase()==="A"){let Wt=ln.getAttribute("href");if(Wt.indexOf("office")>-1)it.preventDefault(),Ye(Wt),ee("office");else if(Wt.indexOf("application/pdf")>-1)it.preventDefault(),Ye(Wt),ee("pdf");else if(Wt.indexOf("text/html")>-1)it.preventDefault(),Ye(Wt),ee("html");else if(Wt.startsWith("#")){it.preventDefault();let Ut=document.getElementById(Wt.replace("#",""));Ut&&Ut.scrollIntoView(!0)}}}const sn=()=>{var it;const ln=(it=zt.current)==null?void 0:it.querySelectorAll("video");ln==null||ln.forEach(Wt=>{if(Wt.oncontextmenu=()=>!1,Wt.src.indexOf(".m3u8")>-1&&!Wt.canPlayType("application/vnd.apple.mpegurl")){if(ye.ZP.isSupported()){var Ut=new ye.ZP;Ut.loadSource(Wt.src),Ut.attachMedia(Wt)}}})};(0,le.useEffect)(()=>{if(zt.current&&ht&&ht.match(Se)&&window.PR.prettyPrint(),zt.current)return zt.current.addEventListener("click",Lt),()=>{var it;(it=zt.current)==null||it.removeEventListener("click",Lt),(0,Ne.AL)(),(0,Ne.Iy)()}},[ht,zt.current,Lt]);const Ot=it=>{it.target.nodeName==="IMG"&&it.target.className.indexOf("draw-flowchart")>-1?(Ce.current.style.zIndex=1,Ce.current.style.display="flex",Ce.current.style.width=it.target.clientWidth+"px",Ce.current.style.height=it.target.clientHeight+"px",Ce.current.style.top=it.target.offsetTop+"px",Ce.current.style.left=it.target.offsetLeft+"px",it.target.id&&(ve.current=it.target.id)):Ce.current.style.display="none"},qt=()=>{Ce.current.style.display="none"};return(0,le.useEffect)(()=>{var it;const ln=Wt=>{Wt.preventDefault(),Wt.clipboardData.setData("text",window.getSelection().toString())};return(it=zt.current)==null||it.addEventListener("copy",ln),()=>{var Wt;(Wt=zt.current)==null||Wt.removeEventListener("copy",ln)}},[zt.current]),le.createElement("div",{style:{position:"relative"},onMouseLeave:qt},Et&&le.createElement("div",{ref:zt,className:`${Ae.mdBody} `},ht),!Et&&!ge(ht)&&le.createElement("div",{ref:zt,style:at({},gt),onMouseOver:Ot,className:`${Fe||""} ${vt?"disabled-fill":""} markdown-body ${Ae.mdBody} ${ae.current}`,dangerouslySetInnerHTML:{__html:ht}}),!Et&&ge(ht)&&le.createElement(Be,{html:ht}),le.createElement("div",{ref:Ce,className:`${Ae.button} ${ke?"":Ae.previewFlowChart}`},le.createElement(Ee.Z,null,le.createElement(de.ZP,{onClick:()=>{ke?we(ve.current):(Ye(ve.current),ee("flowChart"))}},ke?"\u7F16\u8F91":"\u9884\u89C8"))),le.createElement(me.Z,{close:!0,data:Le,type:Le!=null&&Le.length?ie:"",style:at({},dt),onClose:()=>Ye("")}))}},57560:function(At,Rt,fe){"use strict";fe.d(Rt,{h:function(){return ct}});var le=fe(59301),Qe=fe(82326),Ne=fe(28284),He=fe(99571),ye=fe(89780),be=fe.n(ye),Ie=fe(78318),Ke=fe(44084),Ee=Object.defineProperty,de=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Be=(rt,at,st)=>at in rt?Ee(rt,at,{enumerable:!0,configurable:!0,writable:!0,value:st}):rt[at]=st,Re=(rt,at)=>{for(var st in at||(at={}))lt.call(at,st)&&Be(rt,st,at[st]);if(me)for(var st of me(at))Ze.call(at,st)&&Be(rt,st,at[st]);return rt},Ae=(rt,at)=>de(rt,nt(at));const et=Qe.default.Option,tt={labelCol:{span:4},wrapperCol:{span:20}},ft={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"]};Rt.Z=({callback:rt,onCancel:at})=>{const[st,Vt]=(0,le.useState)("python");function Se(qe){Vt(ft[qe][1])}function Oe(qe){rt(qe)}return le.createElement(Ne.default,Ae(Re({},tt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),le.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(Qe.default,{getPopupContainer:qe=>qe.parentNode,onChange:Se},Object.keys(ft).map(qe=>le.createElement(et,{key:qe,value:qe},ft[qe][0])))),le.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(ct,{mode:st})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(He.ZP,{type:"ghost",onClick:at},"\u53D6\u6D88")))};function ct({value:rt,onChange:at,mode:st,options:Vt={}}){const Se=(0,le.useRef)(),[Oe,qe]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Oe){let Te=function(_e){const ke=_e.getValue();at&&at(ke)};return Oe.on("change",Te),()=>{Oe.off("change",Te)}}},[Oe,at]),(0,le.useEffect)(()=>{Oe&&Oe.setOption("mode",st)},[Oe,st]),(0,le.useEffect)(()=>{Oe&&(rt!==Oe.getValue()||rt==="")&&setTimeout(()=>{Oe.setValue(rt||"")},300)},[Oe,rt]),(0,le.useEffect)(()=>{if(Se.current&&!Oe){const Te=be().fromTextArea(Se.current,Re({mode:st,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Vt));qe(Te)}},[Se.current,Oe]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Se}))}},16984:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return yr}});var le=fe(59301),Qe=fe(92123),Ne=fe(89780),He=fe.n(Ne),ye=fe(76374),be=fe(78318),Ie=fe(6313),Ke=fe(25717),Ee=fe(99498),de=fe(25419),nt=fe(67549),me=fe(74776),lt=({value:Gt="",className:pn,showTextOnly:kn,showLines:Mn,style:Jn={}})=>{const $n=(0,le.useMemo)(()=>"",[Gt]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:$n}}))},Ze=Object.defineProperty,Be=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,ft=(Gt,pn,kn)=>pn in Gt?Ze(Gt,pn,{enumerable:!0,configurable:!0,writable:!0,value:kn}):Gt[pn]=kn,ct=(Gt,pn)=>{for(var kn in pn||(pn={}))et.call(pn,kn)&&ft(Gt,kn,pn[kn]);if(Ae)for(var kn of Ae(pn))tt.call(pn,kn)&&ft(Gt,kn,pn[kn]);return Gt},rt=(Gt,pn)=>Be(Gt,Re(pn));let at=[{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 st({onActionCallback:Gt,title:pn,icon:kn,actionName:Mn,className:Jn="",children:$n}){function hr(){Gt(Mn)}return le.createElement("a",{title:pn,className:Jn,onClick:hr},le.createElement("i",{className:`${kn}`}),$n)}var Vt=({watch:Gt,showNullButton:pn,showNullProgramButton:kn,onActionCallback:Mn,fullScreen:Jn,insertTemp:$n,hidetoolBar:hr,extraUse:zn})=>{const Fn=[...at,{title:`${Gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Gt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return le.createElement("ul",{className:"markdown-toolbar-container"},!hr&&Fn.map((lr,_t)=>le.createElement("li",{key:_t},lr.actionName?le.createElement(st,rt(ct({},lr),{onActionCallback:Mn})):le.createElement("span",{className:"v-line"}))),pn?le.createElement("li",null,le.createElement(st,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Mn},le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,kn?le.createElement(le.Fragment,null,le.createElement("li",null,le.createElement(st,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Mn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),le.createElement("li",null,le.createElement(st,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Mn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,$n&&le.createElement("li",null,le.createElement(st,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${$n}`,onActionCallback:Mn},le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),zn&&le.createElement("li",null,zn),le.createElement("li",{className:"btn-full-screen"},le.createElement(st,{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:Mn})))},Se=fe(74254),Oe=fe(28284),qe=fe(37568),Te=fe(99571),_e=Object.defineProperty,ke=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,dt=(Gt,pn,kn)=>pn in Gt?_e(Gt,pn,{enumerable:!0,configurable:!0,writable:!0,value:kn}):Gt[pn]=kn,pe=(Gt,pn)=>{for(var kn in pn||(pn={}))$e.call(pn,kn)&&dt(Gt,kn,pn[kn]);if(Et)for(var kn of Et(pn))gt.call(pn,kn)&&dt(Gt,kn,pn[kn]);return Gt},ce=(Gt,pn)=>ke(Gt,Fe(pn));const je={labelCol:{span:4},wrapperCol:{span:20}};var vt=({callback:Gt,onCancel:pn})=>{function kn(Mn){Gt(Mn)}return le.createElement(Oe.default,ce(pe({},je),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:kn,style:{width:500}}),le.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(qe.default,null)),le.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(qe.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Te.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},ut=fe(57560),we=fe(42307),Ve=fe(62957),Ge=fe(77019),St=fe(40783),Je=fe(59301),Ce=({callback:Gt,onCancel:pn})=>{const kn=document.createElement("canvas"),Mn=kn.getContext("2d");kn.width=1e3,kn.height=800,Mn.fillStyle="#ffffff",Mn.fillRect(0,0,kn.width,kn.height);const Jn=kn.toDataURL("image/png");return Je.createElement(Ve.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Je.createElement(Ge.Z,{style:{height:"100vh"}},Je.createElement(St.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Jn,visible:!0,title:String(Date.now())},onOk:$n=>{Gt({src:$n.url})},onClose:pn})))},ve=fe(30641),Le=fe(5269),Ye=fe(6767),ie={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ee=fe(59301),re=(0,le.forwardRef)(({onCancel:Gt,editImgId:pn,callback:kn},Mn)=>{let Jn=(0,le.useRef)(),$n=(0,le.useRef)(),hr=(0,le.useRef)(),zn=(0,le.useRef)(!1);const Fn=(0,le.useRef)(!1);console.log("ref:",Mn);const[lr,_t]=(0,le.useState)(0),[ot,Xt]=(0,le.useState)("100vh");return(0,le.useEffect)(()=>{_t(1)},[]),(0,le.useImperativeHandle)(Mn,()=>({setHeight:Xt})),ee.createElement("div",{ref:Fn,className:"body-overflow-initial"},ee.createElement(ve.Z,{width:"100vw",height:ot,footer:null,closable:!0,placement:"bottom",open:!!lr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ie.drawerWrap}`,onClose:()=>{window.saveDrawData(Cn=>{kn({src:`/api/attachments/${Cn}`,id:Cn})})},title:ee.createElement(Ge.Z,{align:"middle"},ee.createElement(Le.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(Le.Z,{onClick:()=>{Xt(ot==="60px"?"100vh":"60px")}},ee.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ee.createElement(Le.Z,{onClick:()=>{window.saveDrawData(Cn=>{if(Cn===null){Ye.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Ye.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),kn({src:`/api/attachments/${Cn}`,id:Cn,disabledClose:!0})})}},ee.createElement(Te.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ee.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:$n})))}),ae=fe(85386),ne=fe(47889),ge=fe(71051);const We=ne.ZP.Group,xt={margin:"0 8px"};var yt=({callback:Gt,onCancel:pn})=>{function kn(Mn){Gt(Mn)}return le.createElement(Oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:kn},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:xt},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:xt},"\u884C\u6570"),le.createElement(Oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(ge.Z,null)),le.createElement("span",{style:xt},"\u5217\u6570"),le.createElement(Oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(ge.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:xt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Oe.default.Item,{name:"align"},le.createElement(We,null,le.createElement(ne.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(ne.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(ne.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(ne.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Te.ZP,{type:"ghost",onClick:pn},"\u53D6\u6D88")))},ht=fe(71411),mt=fe(93127),Nt=fe.n(mt),Ft=(0,le.forwardRef)(({use3d:Gt,width:pn,height:kn,callback:Mn,showSaveButton:Jn},$n)=>{const hr=(0,le.useRef)(),zn=(0,le.useRef)(),[Fn,lr]=(0,le.useState)(!1),_t=(0,le.useRef)({id:hr,appName:"graphing",width:pn||1e3,height:kn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{zn.current=new(Nt())(_t.current,!0),window.onload=function(){zn.current.inject("applet_container")}},[]);const ot=()=>{var Xt=window.ggbApplet.getPNGBase64(1,!0,72);return Mn&&Mn(Xt),Xt};return(0,le.useEffect)(()=>{_t.current.appName=Fn?"3D":"graphing",zn.current.inject("applet_container")},[Fn]),(0,le.useEffect)(()=>{lr(Gt)},[Gt]),(0,le.useImperativeHandle)($n,()=>({getImgData:ot})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:hr}),le.createElement(Ge.Z,{align:"middle"},le.createElement(Le.Z,{flex:1},le.createElement(ht.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Fn,onChange:Xt=>lr(Xt)})),le.createElement(Le.Z,null,le.createElement(Te.ZP,{size:"large",onClick:ot,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),zt=fe(57765);const Lt="link",sn="upload-image",Ot="add-flowchart",qt="draw-image",it="add-flowchart",ln="code-block",Wt="add-table",Ut="------------",un={default:Ut,left:`:${Ut}`,center:`:${Ut}:`,right:`${Ut}:`};var An=fe(61346),hn=fe(94601);function wn(){}let er=0;const Gn=1e4,Gr="\u2581",Ar="@\u2581\u2581@",gr="@\u2581@",cr=`
|
|
**\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 tr(Gt){return/^\d+$/.test(Gt)?`${Gt}px`:Gt}const Bn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Xn={[Bn+"-B"]:"bold",[Bn+"-I"]:"italic"},Kn={[Lt]:"\u6DFB\u52A0\u94FE\u63A5",[ln]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[sn]:"\u6DFB\u52A0\u56FE\u7247",[qt]:"\u6DFB\u52A0\u753B\u56FE",[Ot]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Wt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var yr=({defaultValue:Gt="",onChange:pn,width:kn="100%",height:Mn=400,miniToolbar:Jn=!1,isFocus:$n=!1,watch:hr,insertTemp:zn,mode:Fn="markdown",id:lr="markdown-editor-id",showResizeBar:_t=!1,noStorage:ot=!1,showNullButton:Xt=!1,showNullProgramButton:Cn=!1,hidetoolBar:Zn=!1,fullScreen:Me=!1,onBlur:Pe,onCMBeforeChange:Mt,onFullScreen:bt,className:ze="",disablePaste:wt=!1,disabled:Kt=!1,disabledFill:$t=!1,placeholder:cn="",values:It="",extraUse:Jt,onAddBlank:kt})=>{const[pt,Qt]=(0,le.useState)(null),[vn,mn]=(0,le.useState)(Gt),[xn,Wn]=(0,le.useState)(hr),[Yn,dn]=(0,le.useState)(Me),[Ht,gn]=(0,le.useState)(""),[en,Hn]=(0,le.useState)(0),[br,Qn]=(0,le.useState)(Mn),[Er,Dr]=(0,le.useState)(!1),[xr,nr]=(0,le.useState)(0),[Nr,pr]=(0,le.useState)(0),rr=(0,le.useRef)(),Sr=(0,le.useRef)(),Lr=(0,le.useRef)(),fr=(0,le.useRef)(),qn=(0,le.useRef)(),jn=(0,le.useRef)(),Pr=(0,Qe.useDispatch)();(0,le.useEffect)(()=>{const Zt=window.scrollY||window.pageYOffset;mn(It),pt==null||pt.setValue(It),window.scrollTo(0,Zt)},[It]),(0,le.useEffect)(()=>{bt==null||bt(Yn)},[Yn]),(0,le.useEffect)(()=>{if(rr.current){let Zt=function(tn,an){var Ln;if(wt){an.preventDefault();return}const or=an.clipboardData;if(or){const Vn=or.types.toString(),vr=or.items;if(Vn==="Files"||or.types.indexOf("Files")>-1){if(an.preventDefault(),Fn=="stex")return;try{let mr=vr[1];((Ln=vr[0])==null?void 0:Ln.kind)==="file"&&(mr=vr[0]);const wr=mr.getAsFile(),Hr=wr.name.split(".").pop();(0,we.I)(wr,Mr=>{var Or,ei,Li;Mr.id?((Or=wr==null?void 0:wr.type)==null?void 0:Or.indexOf("image"))>-1?Pt.replaceSelection(`<img width="100%" src="/api/attachments/${Mr.id}?type=${Mr.content_type})" alt="" />`):((ei=wr==null?void 0:wr.type)==null?void 0:ei.indexOf("video"))>-1?Pt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Mr.id}"></video>`):((Li=wr==null?void 0:wr.type)==null?void 0:Li.indexOf("pdf"))>-1?Pt.replaceSelection(`<a href="/api/attachments/${Mr.id}?type=${wr.type}&disposition=inline" target="_blank">${wr.name}</a>`):In.includes(Hr)?Pt.replaceSelection(`<a href="/api/attachments/${Mr.id}?type=office&disposition=inline" target="_blank">${wr.name}</a>`):Pt.replaceSelection(`[${wr.name}](/api/attachments/${Mr.id}?type=${Mr.content_type})`):(Mr==null?void 0:Mr.status)===401&&(document.location.href="/user/login")})}catch(mr){Ye.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Pt=He().fromTextArea(rr.current,{mode:Fn,lineNumbers:!Jn,lineWrapping:!0,value:Gt,autoCloseTags:!0,autoCloseBrackets:!0});return Pt.on("keyup",function(tn,an){an.keyCode===8&&(tn.getValue()==""?Pt.setOption("placeholder",cn):Pt.setOption("placeholder",null))}),Pt.on("keydown",function(tn,an){if(an.keyCode===8){var Ln=Jr(tn);Ln&&an.preventDefault()}}),$n&&Pt.focus(),Pt.on("paste",Zt),Kt&&Pt.on("beforeChange",function(tn,an){(an.origin==="paste"||an.origin==="+input")&&an.cancel()}),Qt(Pt),()=>{Pt.off("paste",Zt)}}},[]);const Vr=(0,le.useCallback)(()=>{if(Sr.current)try{}catch(Zt){console.log(Zt,"---- to set md editor body height")}},[br,Sr,Yn]);(0,le.useEffect)(()=>{function Zt(){let Pt=new ye.Z(tn=>{for(let an of tn)(an.target.offsetHeight>0||an.target.offsetWidth>0)&&(Vr(),pt.setSize("100%","100%"),pt.refresh())});return Pt.observe(rr.current.parentElement),Pt}if(pt){const Pt=Zt();return()=>{var tn,an;(tn=rr.current)!=null&&tn.parentElement&&Pt.unobserve((an=rr.current)==null?void 0:an.parentElement)}}},[pt,Vr]),(0,le.useEffect)(()=>{if(pt){let Zt=[];for(const[Pt,tn]of Object.entries(Xn)){let an={[Pt]:()=>{kr(tn)}};Zt.push(an),pt.addKeyMap(an)}return()=>{for(let Pt of Zt)pt.removeKeyMap(Pt)}}},[pt]),(0,le.useEffect)(()=>{Me!==Yn&&dn(Me)},[Me]),(0,An.Z)(()=>{if(!ot&&en>0){let Zt=new Date().getTime(),Pt=window.sessionStorage.getItem(lr);Zt>=en+Gn&&(!Pt||Pt!==vn)&&(window.sessionStorage.setItem(lr,vn),Dr(!0))}},Gn),(0,le.useEffect)(()=>{Wn(hr)},[pt,hr]),(0,le.useEffect)(()=>{pt&&$n&&pt.focus()},[pt,$n]),(0,le.useEffect)(()=>{if(xn&&pt){let Zt=function(tn){let an=tn.target;if(fr.current){let Ln=an.scrollTop/an.scrollHeight;fr.current.scrollTop=fr.current.scrollHeight*Ln}};const Pt=pt.getScrollerElement();return Pt.addEventListener("scroll",Zt),()=>{Pt.removeEventListener("scroll",Zt)}}},[pt,xn]),(0,le.useEffect)(()=>{if(pt&&Mt){let Zt=function(Pt,tn){Mt(Pt,tn)};return pt.on("beforeChange",Zt),()=>{pt.off("beforeChange",Zt)}}},[pt,Mt]),(0,le.useEffect)(()=>{if(pt&&Pe){let Zt=function(){Pe(pt.getValue())};return pt.on("blur",Zt),()=>{pt.off("blur",Zt)}}},[pt,Pe]);function Jr(Zt,Pt){var tn=Zt.getDoc(),an=tn.getCursor(),Ln=tn.getLine(an.line),or=Ln.charAt(an.ch-1),Vn=Ln.lastIndexOf("@\u2581@",an.ch),vr=Ln.lastIndexOf("@\u2581\u2581@",an.ch),mr=Vn>vr?Vn:vr,wr=Vn>vr?3:4;if(Ar.indexOf(or)===-1)return null;if(console.log("change1:",Pt,Zt,Ln,an,mr,Vn,vr,or),mr>=0&&an.ch-mr<5){var Hr=mr+wr;return tn.replaceRange("",{line:an.line,ch:mr},{line:an.line,ch:Hr}),{line:an.line,ch:Hr}}return null}(0,le.useEffect)(()=>{if(pt){let Zt=function(Pt,tn){const an=Pt.getValue();mn(an),Hn(new Date().getTime()),Pt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pn&&(Cn?pn(an,jt(an)):pn(an))};return pt.on("change",Zt),()=>{pt.off("change",Zt)}}},[pt,pn]),(0,le.useEffect)(()=>{if(pt)if(Gt==null)pt.setValue(""),mn("");else{const Zt=window.scrollY||window.pageYOffset;Gt!==pt.getValue()&&(pt.setValue(Gt),mn(Gt),pt.setCursor(Kt?1:pt.lineCount(),0),window.scrollTo(0,Zt))}},[pt,Gt]);const kr=(0,le.useCallback)(Zt=>{const Pt=pt.getCursor(),tn=pt.getSelection();let an=tn.split(`
|
|
`);switch(Zt){case"bold":return pt.replaceSelection("**"+tn+"**"),tn===""&&pt.setCursor(Pt.line,Pt.ch+2),pt.focus();case"italic":return pt.replaceSelection("*"+tn+"*"),tn===""&&pt.setCursor(Pt.line,Pt.ch+1),pt.focus();case"code":return pt.replaceSelection("`"+tn+"`"),tn===""&&pt.setCursor(Pt.line,Pt.ch+1),pt.focus();case"inline-latex":return(0,hn.Ye)(Pr)?void 0:(gn("inline-latex"),pt.focus());case"latex":return pt.replaceSelection("```latex\n"+tn+"\n```"),pt.setCursor(Pt.line+1,tn.length+1),pt.focus();case"line-break":return pt.replaceSelection(`<br/>
|
|
`),pt.focus();case"list-ul":return tn===""?pt.replaceSelection("- "+tn):pt.replaceSelection(an.map(Ln=>Ln===""?"":`- ${Ln}`).join(`
|
|
`)),pt.focus();case"list-ol":return tn===""?pt.replaceSelection("1. "+tn):pt.replaceSelection(an.map((Ln,or)=>Ln===""?"":`${or+1}. ${Ln}`).join(`
|
|
`)),pt.focus();case"add-null-ch":kt==null||kt();return;case"add-signal":return tn===""&&pt.setCursor(Pt.line,Pt.ch),pt.replaceSelection(gr),pt.focus();case"add-multiple":return tn===""&&pt.setCursor(Pt.line,Pt.ch),pt.replaceSelection(Ar),pt.focus();case"inster-template-1":return tn===""&&pt.setCursor(Pt.line,Pt.ch),pt.replaceSelection(cr),pt.focus();case"eraser":return pt.setValue(""),pt.focus();case"trigger-watch":return Wn(!xn),pt.focus();case"trigger-full-screen":return dn(!Yn),pt.focus();case Lt:gn(Lt);return;case ln:gn(ln);return;case sn:gn(sn);return;case qt:gn(qt);return;case"maths-latex":if((0,hn.Ye)(Pr))return;gn("maths-latex");return;case Ot:qn.current="",sessionStorage.removeItem("file_id"),gn(Ot);return;case Wt:gn(Wt);return;default:throw new Error}},[pt,xn,Yn]),Wr=(0,le.useCallback)((Zt,Pt)=>{var tn,an,Ln,or,Vn,vr;Zt!=null&&Zt.disabledClose||gn("");const{src:mr,alt:wr,id:Hr}=Zt||{};switch(Ht){case Lt:const{title:Oi,link:xi}=Zt;return pt.replaceSelection(`[${Oi}](${xi})`),pt.focus();case ln:const{language:vi,content:Xi}=Zt;return pt.replaceSelection(["```"+vi,Xi,"```"].join(`
|
|
`)),pt.focus();case"maths-latex":for(var Mr=atob(Zt),Or=new Uint8Array(Mr.length),ei=0;ei<Mr.length;ei++)Or[ei]=Mr.charCodeAt(ei);var Li=new Blob([Or],{type:"image/png"});(0,we.I)(Li,mi=>{mi.id?pt.replaceSelection(``):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,hn.Ye)(Pr))return;pt.replaceSelection("`$$"+Zt+"$$`");break;case it:if(!Hr)return;pt.getValue().indexOf(mr)===-1?pt.replaceSelection(`<center><img id="${Hr}" width="80%" src="${mr}" class="draw-flowchart" alt="${wr||""}" /></center>`):document.getElementById(Hr).src=ae.Z.API_SERVER+mr+"?t="+Date.now();break;case sn:case qt:const ur=Pt,to=(Ln=(an=(tn=ur==null?void 0:ur.name)==null?void 0:tn.split("."))==null?void 0:an.pop)==null?void 0:Ln.call(an);return((or=ur==null?void 0:ur.type)==null?void 0:or.indexOf("image"))>-1||!(ur!=null&&ur.type)?ur!=null&&ur.align||ur!=null&&ur.width?pt.replaceSelection(`<p style="text-align:${ur.align||"initial"}"><img width="${ur.width?ur.width+"%":"initial"}" src="${mr}" alt="${wr||""}" /></p>`):pt.replaceSelection(`<img width="100%" src="${mr}" alt="${wr||""}" />`):((Vn=ur==null?void 0:ur.type)==null?void 0:Vn.indexOf("video"))>-1?pt.replaceSelection(`<video width="100%" controls src="${mr}"></video>`):((vr=ur==null?void 0:ur.type)==null?void 0:vr.indexOf("pdf"))>-1?pt.replaceSelection(`<a href="${mr}?type=${ur.type}&disposition=inline" target="_blank">${ur.name}</a>`):In.includes(to)?pt.replaceSelection(`<a href="${mr}?type=office&disposition=inline" target="_blank">${ur.name}</a>`):pt.replaceSelection(`[${ur.name}](${mr})`),pt.focus();case Wt:const{row:ti,col:Ni,align:ao}=Zt;let Ji=`
|
|
`;for(let mi=0;mi<ti;mi++){let Ri=[],_r=[];for(let Wi=0;Wi<Ni;Wi++)mi===1&&_r.push(un[ao]),Ri.push(" ");mi===1&&(Ji+=`| ${_r.join(" | ")} |
|
|
`),Ji+=`| ${Ri.join(Ni===1?"":" | ")} |
|
|
`}return pt.replaceSelection(Ji+`
|
|
`),pt.focus();default:throw new Error}},[pt,Ht]),Br=(0,le.useMemo)(()=>{switch(Ht){case Lt:return le.createElement(vt,{callback:Wr,onCancel:zr});case ln:return le.createElement(ut.Z,{callback:Wr,onCancel:zr});case sn:return le.createElement(we.Z,{callback:Wr,onCancel:zr});case Ot:return le.createElement(re,{editImgId:qn.current,callback:Wr,onCancel:zr});case Wt:return le.createElement(yt,{callback:Wr,onCancel:zr});case"maths-latex":return le.createElement(Ft,{showSaveButton:!0,callback:Wr});case"inline-latex":return le.createElement(zt.Z,{showSaveButton:!0,callback:Wr});default:return null}},[Ht]);function zr(){gn("")}(0,le.useEffect)(()=>{if(Lr.current){let Zt=function(Vn){Ln=!0,or=Vn.pageY},Pt=function(){Ln=!1},tn=function(Vn){if(Ln){let vr=Vn.pageY-or;vr<0&&(vr=0),vr>300&&(vr=300);let mr=Mn+vr+"px";Qn(mr)}},an=Lr.current,Ln=!1,or=0;return an.addEventListener("mousedown",Zt),document.addEventListener("mousemove",tn),document.addEventListener("mouseup",Pt),()=>{an.removeEventListener("mousedown",Zt),document.removeEventListener("mousemove",tn),document.removeEventListener("mouseup",Pt)}}},[pt,Lr]),(0,le.useEffect)(()=>{Qn(Mn)},[Mn]);const ii=tr(kn),Fr=tr(br),Rn={width:ii,height:Fr},Bt=(0,le.useMemo)(()=>{if(en){let Zt=new Date(en),Pt=Zt.getHours(),tn=Zt.getMinutes(),an=Zt.getSeconds();return Pt=Pt<10?"0"+Pt:Pt,tn=tn<10?"0"+tn:tn,an=an<10?"0"+an:an,`${Pt}:${tn}:${an}`}return 0},[en]),jt=Zt=>{const Pt=[];if(Cn){let tn=-1;Zt=Zt.replace(/(@▁▁@|@▁@)/g,function(an,Ln,or){Pt.push({multiLine:an!==gr})})}return Pt};function yn(){window.sessionStorage.removeItem(lr),Dr(!1),Hn(0)}function nn(){Dr(!1),Hn(0),pt.setValue(window.sessionStorage.getItem(lr))}(0,le.useEffect)(()=>{Kn[Ht]&&Ht!==qt&&Ht!==Ot&&setTimeout(()=>{const Zt=document.getElementsByClassName("markdown-popup-form")[0],Pt=window.innerWidth/2-Zt.offsetWidth/2,tn=window.innerHeight/2-Zt.offsetHeight/2;nr(Pt),pr(tn)},0)},[Ht]);const En=Zt=>{Zt.preventDefault();const Pt=Zt.clientX-xr,tn=Zt.clientY-Nr;document.body.onmousemove=an=>{let Ln=an.clientX-Pt,or=an.clientY-tn;const Vn=document.getElementsByClassName("markdown-popup-form")[0],vr=window.innerWidth-Vn.offsetWidth,mr=window.innerHeight-Vn.offsetHeight;Ln=Math.max(0,Math.min(Ln,vr)),or=Math.max(0,Math.min(or,mr)),ir(an.clientX,an.clientY,Pt,tn)&&(nr(Ln),pr(or))},document.body.onmouseup=function(){document.body.onmousemove=null}},ir=(Zt,Pt,tn,an)=>{const Ln=document.body.clientHeight,or=document.body.clientWidth;return Zt<20&&tn>Zt||Zt>or-20&&tn<Zt||Pt<20&&an>Pt||Pt>Ln-20&&an<Pt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:Sr},le.createElement("div",{className:`markdown-editor-container ${ze} ${xn?"on-preview":""} ${Jn?"mini":""} ${Yn?"full-screen":""}`,style:Rn},le.createElement(Vt,{insertTemp:zn,watch:xn,fullScreen:Yn,showNullButton:Xt,showNullProgramButton:Cn,onActionCallback:kr,hidetoolBar:Zn,extraUse:Jt}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:rr,placeholder:cn})),xn?le.createElement("div",{ref:fr,className:"preview-container"},Fn==="stex"&&le.createElement(lt,{value:vn}),Fn!=="stex"&&le.createElement(me.Z,{edit:!0,disabledFill:$t,showProgramFill:Cn,value:vn,openEditor:Zt=>{var Pt;qn.current=Zt,(Pt=jn.current)==null||Pt.setHeight("100vh"),setTimeout(()=>{gn("add-flowchart")},150)}})):null))),_t?le.createElement("a",{ref:Lr,className:"editor-resize"}):null,Ht===qt&&le.createElement(Ce,{callback:Wr,onCancel:zr}),Ht===Ot&&le.createElement(re,{ref:jn,editImgId:qn.current,callback:Wr,onCancel:zr}),le.createElement(Se.Z,null,Kn[Ht]&&Ht!==qt&&Ht!==Ot?le.createElement(Ve.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:xr,top:Nr},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:En},Kn[Ht]),open:!0,onCancel:zr,footer:null,destroyOnClose:!0,width:Ht===Ot?"1200px":null,height:Ht===Ot?"80vh":null,className:"markdown-popup-form"},Br):null))}},42307:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return at},I:function(){return Vt}});var le=fe(28284),Qe=fe(6767),Ne=fe(37568),He=fe(44104),ye=fe(71051),be=fe(47889),Ie=fe(99571),Ke=fe(8396),Ee=fe(59301),de=fe(59301),nt=Object.defineProperty,me=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Ae=(Se,Oe,qe)=>Oe in Se?nt(Se,Oe,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Se[Oe]=qe,et=(Se,Oe)=>{for(var qe in Oe||(Oe={}))Be.call(Oe,qe)&&Ae(Se,qe,Oe[qe]);if(Ze)for(var qe of Ze(Oe))Re.call(Oe,qe)&&Ae(Se,qe,Oe[qe]);return Se},tt=(Se,Oe)=>me(Se,lt(Oe));const{useForm:ft}=le.default,ct={width:280,marginRight:10},rt={labelCol:{span:5},wrapperCol:{span:19}};var at=({callback:Se,onCancel:Oe})=>{const[qe]=ft();let Te=(0,Ee.useRef)();function _e(Et){Te.current.width=qe.getFieldValue("width"),Te.current.align=qe.getFieldValue("align"),Se(Et,Te.current)}function ke(Et,$e){if(Et.status===-1){Qe.ZP.error(Et.message);return}qe.setFieldsValue({src:`/api/attachments/${Et.id}`,type:$e.type})}function Fe(Et){let $e=Et.target.files[0];Te.current=$e,Vt($e,ke)}return de.createElement(le.default,tt(et({form:qe},rt),{className:"upload-image-panel",onFinish:_e,style:{width:470,overflow:"hidden"}}),de.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},de.createElement("div",{className:"flex-container"},de.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},de.createElement(Ne.default,{style:ct})),de.createElement(st,{onFileChange:Fe}))),de.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},de.createElement(Ne.default,{style:{width:264}})),de.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},de.createElement(He.Z,null,de.createElement(le.default.Item,{name:"width",style:{margin:0}},de.createElement(ye.Z,{style:{width:264}})),de.createElement("span",{className:"ml8"},"%"))),de.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},de.createElement(be.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(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},de.createElement(Ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Ie.ZP,{type:"default",onClick:Oe},"\u53D6\u6D88"))))};function st({onFileChange:Se}){return de.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",de.createElement("input",{type:"file",onChange:Se}))}function Vt(Se,Oe){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");let qe=new FormData;qe.append("editormd-image-file",Se),qe.append("file_param_name","editormd-image-file"),qe.append("byxhr","true");var Te=new window.XMLHttpRequest;Te.withCredentials=!0,Te.addEventListener("load",function(_e){Oe(JSON.parse(_e.target.responseText),Se)},!1),Te.addEventListener("error",function(_e){console.error(_e)},!1),Te.open("POST",`${Ke.KI}/api/attachments.json`),Te.send(qe)}},74254:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return Ne}});var le=fe(59301),Qe=fe(4676);class Ne extends le.Component{constructor(ye){super(ye);const be=window.document;this.node=be.createElement("div"),be.body.appendChild(this.node)}render(){const{children:ye}=this.props;return(0,Qe.createPortal)(ye,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},71775:function(At,Rt,fe){"use strict";fe.d(Rt,{SV:function(){return Ce},ZP:function(){return Je}});var le=fe(59301),Qe=fe(76374);const Ne={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"]},He={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"]},ye={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(`
|
|
`)}]},be={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(`
|
|
`)}]},Ie={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var Ke=fe(53184),Ee=fe.n(Ke),de=(ve,Le,Ye)=>new Promise((ie,ee)=>{var z=ne=>{try{ae(Ye.next(ne))}catch(ge){ee(ge)}},re=ne=>{try{ae(Ye.throw(ne))}catch(ge){ee(ge)}},ae=ne=>ne.done?ie(ne.value):Promise.resolve(ne.value).then(z,re);ae((Ye=Ye.apply(ve,Le)).next())});const nt={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"]}},me=(ve,Le,Ye,ie)=>{const ee=Le.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ye.lineNumber,endColumn:Ye.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:ve.languages.CompletionItemKind.Text,insertText:re,range:ie}))},lt=(ve,Le,Ye,ie)=>{ve.languages.registerCompletionItemProvider(Le,{provideCompletionItems(ee,z){const re=ee.getWordUntilPosition(z),ae={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=ee.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...me(ve,ee,z,ae),...Ye.map(We=>({label:We,kind:ve.languages.CompletionItemKind.Keyword,documentation:We,insertText:We,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ae})),...ie.map(We=>({label:We.label,kind:ve.languages.CompletionItemKind.Snippet,documentation:We.content,insertText:ne.startsWith("#")?We.content.replace(/#/,""):We.content,insertTextRules:ve.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ae}))]}}})};var Ze=ve=>{nt.languages.forEach(Le=>{ve.languages.registerDocumentFormattingEditProvider(Le,{provideDocumentFormattingEdits(Ye){return de(this,null,function*(){const ie=Ee()(Ye.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:Ye.getFullModelRange(),text:ie}]})}})}),lt(ve,"java",He.keywords,He.quickKey),lt(ve,"cpp",ye.keywords,ye.quickKey),lt(ve,"c",Ne.keywords,[]),lt(ve,"python",be.keywords,be.quickKey),lt(ve,"scala",Ie.keywords,Ie.quickKey)};const Be="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Re=Object.defineProperty,Ae=(ve,Le,Ye)=>Le in ve?Re(ve,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ve[Le]=Ye,et=(ve,Le,Ye)=>Ae(ve,typeof Le!="symbol"?Le+"":Le,Ye);const tt=class Wl{constructor(Le,Ye,ie){this.placeholder=Le,this.editor=Ye,this.monaco=ie,Ye.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Wl.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)}};et(tt,"ID","editor.widget.placeholderHint");var ct=tt,rt=fe(96236),at=fe(6767),st=fe(25399),Vt=fe(89392),Se=fe(29724),Oe=fe(56102),qe=Object.defineProperty,Te=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,$e=(ve,Le,Ye)=>Le in ve?qe(ve,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ve[Le]=Ye,gt=(ve,Le)=>{for(var Ye in Le||(Le={}))Fe.call(Le,Ye)&&$e(ve,Ye,Le[Ye]);if(ke)for(var Ye of ke(Le))Et.call(Le,Ye)&&$e(ve,Ye,Le[Ye]);return ve},dt=(ve,Le)=>Te(ve,_e(Le)),pe=(ve,Le)=>{var Ye={};for(var ie in ve)Fe.call(ve,ie)&&Le.indexOf(ie)<0&&(Ye[ie]=ve[ie]);if(ve!=null&&ke)for(var ie of ke(ve))Le.indexOf(ie)<0&&Et.call(ve,ie)&&(Ye[ie]=ve[ie]);return Ye},ce=(ve,Le,Ye)=>new Promise((ie,ee)=>{var z=ne=>{try{ae(Ye.next(ne))}catch(ge){ee(ge)}},re=ne=>{try{ae(Ye.throw(ne))}catch(ge){ee(ge)}},ae=ne=>ne.done?ie(ne.value):Promise.resolve(ne.value).then(z,re);ae((Ye=Ye.apply(ve,Le)).next())});function je(ve){return/^\d+$/.test(ve)?`${ve}px`:ve}function vt(){}let ut=!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 Ve(ve=[]){let Le=ve;if(Array.isArray(ve)){for(let Ye=0;Ye<ve.length;Ye++){let ie=we[ve[Ye]];if(ie)return ie}return Le[0]}return we[Le]||Le}let Ge=null;const St=()=>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 Je=ve=>{var Le=ve,{width:Ye="100%",height:ie="100%",value:ee,language:z="javascript",style:re={},options:ae={},overrideServices:ne={},theme:ge="vs-dark",onEditBlur:We,isCopy:xt=!1,onSave:yt,autoHeight:ht=!1,forbidCopy:mt=!1,onChange:Nt=vt,editorDidMount:Dt=vt,onFocus:Ft=vt,onBreakPoint:zt=vt,breakPointValue:Lt=[],filename:sn="educoder.txt",errorLine:Ot,errorContent:qt="",highlightLine:it,openBreakPoint:ln=!1,placeholder:Wt="",showMiniMap:Ut=!0}=Le,un=pe(Le,["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 An=(0,le.useRef)(),hn=(0,le.useRef)({}),wn=(0,le.useRef)(),er=(0,le.useRef)(),Gn=(0,le.useRef)([]),Gr=(0,le.useRef)(!1),Ar=(0,le.useRef)(),gr=(0,le.useRef)(),cr=(0,le.useRef)(!1),[In,tr]=(0,le.useState)(!1);function sr(){let _t;return An.current&&(_t=new Qe.Z(ot=>{for(let Xt of ot)(Xt.target.offsetHeight>0||Xt.target.offsetWidth>0)&&hn.current.instance.layout()}),_t.observe(An.current)),_t}function Bn(){at.ZP.warning({content:decodeURIComponent(Be),key:"monaco-editor-tip"})}const Xn=()=>{let _t=hn.current.instance;if(ee!=null&&_t&&In){const ot=_t.getModel();ot&&ee!==ot.getValue()&&(ut=!0,ot.setValue(ee),_t.layout(),ut=!1)}};(0,le.useEffect)(()=>{const _t=Se.Z.subscribe("formatDocument",ot=>{var Xt;let Cn=hn.current.instance;(Xt=Cn==null?void 0:Cn.getAction)==null||Xt.call(Cn,"editor.action.formatDocument").run()});return window.updateMonacoValue=ot=>{Nt(ot)},_t},[]),(0,le.useEffect)(()=>{var _t;let ot=hn.current.instance;er.current&&clearTimeout(er.current),er.current=setTimeout(()=>{Xn()},500),ee&&(ee!=null&&ee.length)&&((_t=ot==null?void 0:ot.updateOptions)==null||_t.call(ot,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,In,hn.current]),(0,le.useEffect)(()=>{if(Ot&&hn.current&&hn.current.instance){let ot=hn.current.instance;ot.changeViewZones(function(Xt){var Cn=document.createElement("div");Cn.style.padding="10px 20px",Cn.style.width="calc(100% - 20px)",Cn.className="my-error-line-wrp",Cn.innerHTML=qt,Xt.addZone({afterLineNumber:Ot||11,heightInLines:3,domNode:Cn})});var _t={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}};ot.addOverlayWidget(_t),ot.revealPositionInCenter({lineNumber:20,column:1})}},[Ot,hn.current,In]);const Kn=(_t="",ot)=>{if(!_t||_t.trim()==="")return!0;const Cn=hn.current.instance.getModel().getLineTokens(ot);let Zn=!1;for(let Me=0;Me<2;Me++)Cn.getStandardTokenType(Me)===1&&(Zn=!0);return Zn};(0,le.useEffect)(()=>{var _t;const ot=(_t=hn.current)==null?void 0:_t.instance;if(ot&&In&&mt){const Xt=ot.onDidBlurEditorWidget(()=>{cr.current=!1}),Cn=ot.onDidFocusEditorText(()=>{cr.current=!0});return()=>{Xt.dispose(),Cn.dispose()}}},[hn.current,In,mt]),(0,le.useEffect)(()=>{var _t;if((_t=hn.current)!=null&&_t.instance&&In&&ln){let ot=hn.current.instance,Xt=ot.getModel();if(!Xt)return;(()=>{var It;let Jt=[],kt=[];const pt=Xt.getAllDecorations();for(let vn of pt)vn.options.className==="highlighted-line"&&(Jt.push((It=vn==null?void 0:vn.range)==null?void 0:It.startLineNumber),kt.push(vn==null?void 0:vn.id));if(it===Jt[0])return;Xt.deltaDecorations(kt,[]);const Qt=Xt.getLineCount();it&&it<=Qt&&(ot.deltaDecorations([],[{range:new Ge.Range(it,1,it,Xt.getLineMaxColumn(it)),options:{isWholeLine:!0,className:"highlighted-line"}}]),ot.revealLineInCenter(it))})();const Zn=(It=!1)=>{var Jt;let kt=[],pt=[];const Qt=Xt.getAllDecorations();for(let vn of Qt)vn.options.linesDecorationsClassName==="breakpoints-select"&&(kt.push((Jt=vn==null?void 0:vn.range)==null?void 0:Jt.startLineNumber),pt.push(vn==null?void 0:vn.id));if(It)return{lines:kt,ids:pt};zt(kt)},Me=It=>ce(void 0,null,function*(){let Jt={range:new Ge.Range(It,1,It,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Xt.deltaDecorations([],[Jt]),Zn()}),Pe=It=>ce(void 0,null,function*(){let Jt=[];const kt=ot.getLineDecorations(It);for(let pt of kt)pt.options.linesDecorationsClassName==="breakpoints-select"&&Jt.push(pt.id);yield Xt.deltaDecorations(Jt,[]),Zn()}),Mt=It=>{let Jt=ot.getLineDecorations(It);for(let kt of Jt)if(kt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Vt.isEqual)(Lt,Zn(!0).lines)){Xt.deltaDecorations(Zn(!0).ids,[]);const It=Lt.map(Jt=>({range:new Ge.Range(Jt,1,Jt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Xt.deltaDecorations([],It)}const bt=ot.onDidChangeModelContent(It=>{let Jt=ot.getPosition();if(Jt){let kt=Jt.lineNumber;clearTimeout(gr.current),gr.current=setTimeout(()=>{Kn(Xt.getLineContent(kt),kt)?Pe(kt):Mt(kt)?(Pe(kt),Me(kt)):Zn()},100)}}),ze=ot.onMouseDown(It=>{var Jt,kt,pt;if(It.target.detail&&((pt=(kt=(Jt=It.target)==null?void 0:Jt.element)==null?void 0:kt.className)!=null&&pt.includes("line-numbers"))){let Qt=It.target.position.lineNumber;if(Kn(Xt.getLineContent(Qt),Qt))return;Mt(Qt)?Pe(Qt):Me(Qt)}}),wt=It=>{let Jt={range:new Ge.Range(It,1,It,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Gn.current=ot.deltaDecorations(Gn.current,[Jt])},Kt=()=>{Gn.current=ot.deltaDecorations(Gn.current,[])},$t=ot.onMouseMove(It=>{var Jt,kt,pt;if(Kt(),It.target.detail&&((pt=(kt=(Jt=It.target)==null?void 0:Jt.element)==null?void 0:kt.className)!=null&&pt.includes("line-numbers"))){let Qt=It.target.position.lineNumber;if(Kn(Xt.getLineContent(Qt),Qt))return;wt(Qt)}}),cn=ot.onMouseLeave(()=>{Kt()});return()=>{bt.dispose(),ze.dispose(),$t.dispose(),cn.dispose()}}},[hn.current,In,Lt,it,ln,z]),(0,le.useEffect)(()=>{var _t;(_t=hn.current)!=null&&_t.instance&&ln&&hn.current.instance.setPosition({lineNumber:0,column:0})},[it]);function yr(){let _t=hn.current.instance;if(_t){const ot=_t.getSelection(),Xt=hn.current.pastePos||{},Cn=new Ge.Range(Xt.startLineNumber||ot.endLineNumber,Xt.startColumn||ot.endColumn,Xt.endLineNumber||ot.endLineNumber,Xt.endColumn||ot.endColumn);setTimeout(()=>{_t.executeEdits("",[{range:Cn,text:""}])},300)}}function Gt(_t){(window.navigator.platform.match("Mac")?_t.metaKey:_t.ctrlKey)&&_t.keyCode==83&&(_t.preventDefault(),yt())}const pn=()=>{if(ht&&hn.current.instance){const _t=hn.current.instance.getContentHeight();Fn(_t<ie?ie:_t)}else Fn(ie)};function kn(_t){var ot=document.createEvent("MouseEvents");ot.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_t.dispatchEvent(ot)}const Mn=_t=>{if(!cr.current)return;const{keyCode:ot,ctrlKey:Xt,metaKey:Cn,target:Zn,type:Me}=_t;return(Me==="paste"||(ot===67||ot===86)&&(Cn||Xt))&&Zn.nodeName==="TEXTAREA"&&(Bn(),_t.preventDefault()),!1};function Jn(_t,ot){var Xt=window.URL||window.webkitURL||window,Cn=new Blob([ot]),Zn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Zn.href=Xt.createObjectURL(Cn),Zn.download=_t,kn(Zn)}(0,le.useEffect)(()=>{pn()},[pn]),(0,le.useEffect)(()=>{An.current&&!In&&Promise.all([fe.e(8909),fe.e(1196)]).then(fe.bind(fe,71448)).then(_t=>{try{Ge=_t,hn.current.instance=Ge.editor.create(An.current,{value:ee,language:Ve(z),theme:ge,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ut||!1}},ne);const ot=hn.current.instance;let Zn=[...rt.BH._menuItems].find(bt=>bt[0]._debugName=="EditorContext")[1],Me=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Pe=(bt,ze)=>{var wt,Kt;let $t=bt._first;do ze.includes((Kt=(wt=$t.element)==null?void 0:wt.command)==null?void 0:Kt.id)&&bt._remove($t);while($t=$t.next)};if(Dt(ot,Ge),setTimeout(()=>{pn(),hn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(sn||"educoder.txt",ot.getValue())}})},500),hn.current.subscription=ot.onDidChangeModelContent(bt=>{Gr.current?clearTimeout(Ar.current):(pn(),Nt(ot.getValue(),bt)),Ar.current=setTimeout(()=>{Gr.current=!1},500)}),window.Monaco||Ze(Ge,Ve(z)),mt&&(Pe(Zn,Me),An.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Mn),window.removeEventListener("paste",Mn),window.addEventListener("keydown",Mn),window.addEventListener("paste",Mn)),window.Monaco=Ge,We&&ot.onDidBlurEditorWidget(()=>{We(ot.getValue())}),Ft&&ot.onDidFocusEditorText(()=>{mt&&St(),Ft(ot.getValue())}),mt){St();try{ot.onDidPaste(bt=>{const ze=ot.getSelection(),wt=hn.current.pastePos||{},Kt=new Ge.Range(wt.startLineNumber||ze.endLineNumber,wt.startColumn||ze.endColumn,wt.endLineNumber||ze.endLineNumber,wt.endColumn||ze.endColumn);ot.executeEdits("",[{range:bt.range,text:""}])})}catch(bt){}}let Mt=sr();return Wt&&typeof Wt=="string"&&new ct(Wt,ot,Ge),tr(!0),()=>{const bt=hn.current.instance;bt.dispose();const ze=bt.getModel();ze&&ze.dispose(),hn.current.subscription&&hn.current.subscription.dispose(),Mt.unobserve(An.current)}}catch(ot){}})},[]),(0,le.useEffect)(()=>{if(hn.current.instance&&In)return document.addEventListener("keydown",Gt,!1),()=>{document.removeEventListener("keydown",Gt)}},[yt,In]),(0,le.useEffect)(()=>{let _t=hn.current.instance;if(_t&&In){let ot=Ve(z);Ge.editor.setModelLanguage(_t.getModel(),ot)}},[z,In]),(0,le.useEffect)(()=>{hn.current.instance&&In&&Ge.editor.setTheme(ge)},[ge,In]),(0,le.useEffect)(()=>{let _t=hn.current.instance;wn.current=ae,_t&&In&&(_t.updateOptions(gt({},ae)),setTimeout(()=>{_t.getModel().updateOptions(gt({},ae))},200))},[JSON.stringify(ae),In]),(0,le.useEffect)(()=>{let _t=hn.current.instance;_t&&In&&_t.layout()},[Ye,ie,In]);const[$n,hr]=(0,le.useState)(je(Ye)),[zn,Fn]=(0,le.useState)(je(ie)),lr=dt(gt({},re),{width:$n,height:zn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:An,style:lr},xt&&le.createElement(Oe.CopyToClipboard,{text:ee,onCopy:()=>at.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(st.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ce({width:ve="100%",height:Le="100%",original:Ye,modified:ie,language:ee,options:z={}}){const re=(0,le.useRef)(),[ae,ne]=(0,le.useState)(null);function ge(ht){let mt;return re.current&&(mt=new Qe.Z(Nt=>{for(let Dt of Nt)(Dt.target.offsetHeight>0||Dt.target.offsetWidth>0)&&ht.layout()}),mt.observe(re.current)),mt}(0,le.useEffect)(()=>(re.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(ht=>{Ge=ht;const mt=Ge.editor.createDiffEditor(re.current,dt(gt({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},z),{wordWrap:!0}));ne(mt);let Nt=ge(mt);return()=>{mt.dispose();const Dt=mt.getModel();Dt&&Dt.dispose(),Nt.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{ae&&ae.setModel({original:Ge.editor.createModel(Ye,ee),modified:Ge.editor.createModel(ie,ee)})},[Ye,ie,ee,ae]);const We=je(ve),xt=je(Le),yt={width:We,height:xt};return le.createElement("div",{className:"my-diff-editor",ref:re,style:yt})}},61346:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return Qe}});var le=fe(59301);function Qe(Ne,He){const ye=(0,le.useRef)();(0,le.useEffect)(()=>{ye.current=Ne}),(0,le.useEffect)(()=>{function be(){ye.current()}if(He!==null){let Ie=setInterval(be,He);return()=>clearInterval(Ie)}},[He])}},53926:function(At,Rt,fe){"use strict";fe.r(Rt),fe.d(Rt,{default:function(){return Vt}});var le=fe(59301),Qe=fe(16984),Ne=fe(6767),He=fe(37568),ye=fe(99571),be=fe(43597),Ie=(Se,Oe,qe)=>new Promise((Te,_e)=>{var ke=$e=>{try{Et(qe.next($e))}catch(gt){_e(gt)}},Fe=$e=>{try{Et(qe.throw($e))}catch(gt){_e(gt)}},Et=$e=>$e.done?Te($e.value):Promise.resolve($e.value).then(ke,Fe);Et((qe=qe.apply(Se,Oe)).next())});function Ke({setIscreate:Se,init:Oe,UpdateItem:qe}){const[Te,_e]=(0,le.useState)(""),[ke,Fe]=(0,le.useState)("");(0,le.useEffect)(()=>{qe&&(_e(qe&&qe.name),Fe(qe&&qe.description))},[qe]);function Et(){return Ie(this,null,function*(){if(!Te){Ne.ZP.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}if(!ke){Ne.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}if(qe){$e();return}(yield(0,be.ZP)("/api/hpc_courses.json",{method:"post",body:{name:Te,description:ke,container_type:window.location.pathname.split("/")[1]}}))&&(Ne.ZP.info("\u521B\u5EFA\u6210\u529F"),Se(!1),Oe("add"))})}function $e(){return Ie(this,null,function*(){(yield(0,be.ZP)(`/api/hpc_courses/${qe.id}.json`,{method:"put",body:{name:Te,description:ke,container_type:window.location.pathname.split("/")[1]}}))&&(Ne.ZP.info("\u7F16\u8F91\u6210\u529F"),Se(!1),Oe(""))})}return le.createElement("div",null,le.createElement(He.default,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:Te,maxLength:60,addonAfter:String(Te.length)+"/60",onChange:gt=>_e(gt.target.value)}),le.createElement(Qe.Z,{id:"courseContentMD",defaultValue:ke,onChange:gt=>Fe(gt)}),le.createElement("div",{className:"clearfix mt30 mb30"},le.createElement(ye.ZP,{type:"primary",onClick:()=>Et(),className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),le.createElement("a",{className:"defalutCancelbtn fl",onClick:()=>Se(!1)},"\u53D6\u6D88")))}var Ee=Ke,de=fe(74776),nt=(Se,Oe,qe)=>new Promise((Te,_e)=>{var ke=$e=>{try{Et(qe.next($e))}catch(gt){_e(gt)}},Fe=$e=>{try{Et(qe.throw($e))}catch(gt){_e(gt)}},Et=$e=>$e.done?Te($e.value):Promise.resolve($e.value).then(ke,Fe);Et((qe=qe.apply(Se,Oe)).next())});function me({CourseItem:Se,userId:Oe,init:qe,ItemUpdate:Te,setSee:_e,UserInfo:ke}){function Fe(){return nt(this,null,function*(){(yield(0,be.ZP)(`/api/hpc_courses/${Se.id}.json`,{method:"delete"}))&&(Ne.ZP.info("\u5220\u9664\u6210\u529F"),qe("delete"),_e(!1))})}function Et(){Te(Se)}return le.createElement("div",null,Oe===299635||Oe===301458||ke!=null&&ke.admin||ke!=null&&ke.business?le.createElement("div",{style:{textAlign:"right"}},le.createElement(ye.ZP,{onClick:()=>Et()},"\u7F16\u8F91"),le.createElement(ye.ZP,{onClick:()=>Fe(),style:{marginLeft:"30px"}},"\u5220\u9664")):null,le.createElement("h1",null,Se==null?void 0:Se.name),le.createElement(de.Z,{value:Se==null?void 0:Se.description}))}var lt=me,Ze=fe(14566),Be=fe(85386),Re=fe(92123),Ae=Object.defineProperty,et=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,ct=(Se,Oe,qe)=>Oe in Se?Ae(Se,Oe,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Se[Oe]=qe,rt=(Se,Oe)=>{for(var qe in Oe||(Oe={}))tt.call(Oe,qe)&&ct(Se,qe,Oe[qe]);if(et)for(var qe of et(Oe))ft.call(Oe,qe)&&ct(Se,qe,Oe[qe]);return Se},at=(Se,Oe,qe)=>new Promise((Te,_e)=>{var ke=$e=>{try{Et(qe.next($e))}catch(gt){_e(gt)}},Fe=$e=>{try{Et(qe.throw($e))}catch(gt){_e(gt)}},Et=$e=>$e.done?Te($e.value):Promise.resolve($e.value).then(ke,Fe);Et((qe=qe.apply(Se,Oe)).next())});function st({user:Se,dispatch:Oe}){var qe,Te,_e,ke,Fe,Et,$e,gt,dt;const[pe,ce]=(0,le.useState)(1),[je,vt]=(0,le.useState)(100),[ut,we]=(0,le.useState)([]),[Ve,Ge]=(0,le.useState)(!1),[St,Je]=(0,le.useState)(!1),[Ce,ve]=(0,le.useState)(""),[Le,Ye]=(0,le.useState)(""),[ie,ee]=(0,le.useState)("");let{itemname:z}=(0,Re.useParams)();const[re,ae]=(0,le.useState)("");(0,le.useEffect)(()=>{Oe({type:"globalSetting/headerToggle",payload:!1}),pe&&ne("")},[pe]);function ne(ht){return at(this,null,function*(){var mt,Nt;const Dt=yield(0,be.ZP)("/api/hpc_courses.json",{method:"get",params:{page:pe,per_page:je,container_type:window.location.pathname.split("/")[1]}});if(Dt){let Ft=Dt.data.hpc_courses.length;if(we(Dt.data.hpc_courses),ee(Dt.data.file_url),Ye(""),!Ft)return;if(re)if(ht==="delete"){if(Ft===0){Je(!1);return}ve(Dt.data.hpc_courses[0]),Je(!0),ae(Dt.data.hpc_courses[0].id)}else ht==="add"?(ve(Dt.data.hpc_courses[Ft-1]),Je(!0),ae(Dt.data.hpc_courses[Ft-1].id)):(ve(Dt.data.hpc_courses.filter(zt=>zt.id===re)[0]),Je(!0),ae(re));else if(z){let zt=0;(Nt=(mt=Dt==null?void 0:Dt.data)==null?void 0:mt.hpc_courses)==null||Nt.map((Lt,sn)=>{var Ot;(z==null?void 0:z.toLocaleLowerCase())===((Ot=Lt==null?void 0:Lt.name)==null?void 0:Ot.toLocaleLowerCase())&&(zt=sn)}),ve(Dt.data.hpc_courses[zt]),Je(!0),ae(Dt.data.hpc_courses[zt].id),(z==null?void 0:z.toLocaleLowerCase())==="resources"&&(ve(Dt.data.hpc_courses.filter(Lt=>Lt.id===15)[0]),Je(!0),ae(15))}else ve(Dt.data.hpc_courses[0]),Je(!0),ae(Dt.data.hpc_courses[0].id)}})}function ge(ht){Ge(!1),Je(!0),ve(ht),ae(ht.id)}function We(ht){Ye(ht),Ge(!0),Je(!1)}function xt(){Ye(""),Ge(!0),Je(!1)}const yt={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange(ht){const{status:mt}=ht.file;mt==="done"?(Ne.ZP.success(`${ht.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`),ne("")):mt==="error"&&Ne.ZP.error(`${ht.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:ht=>{const mt=ht.size/1024/1024<150;return mt||Ne.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),mt}};return le.createElement("div",{style:{marginBottom:"40px"}},le.createElement("div",{className:"bannterdiv",style:{background:`url(${Be.Z.IMG_SERVER+`/${ie}`})`}}),le.createElement("img",{style:{width:"100%"},src:Be.Z.IMG_SERVER+`/${ie}`}),le.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},le.createElement("div",{style:{flex:"1",marginTop:"17px"}},ut&&ut.map((ht,mt)=>le.createElement("p",{key:mt,onClick:()=>ge(ht),className:re===ht.id?"menuitemselect":"menuitem task-hide"},ht.name)),((qe=Se==null?void 0:Se.userInfo)==null?void 0:qe.user_id)===299635||((Te=Se==null?void 0:Se.userInfo)==null?void 0:Te.user_id)===301458||(_e=Se==null?void 0:Se.userInfo)!=null&&_e.admin||(ke=Se==null?void 0:Se.userInfo)!=null&&ke.business?le.createElement("p",{onClick:()=>xt(),className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},le.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),le.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},Ve?le.createElement(Ee,{UpdateItem:Le,setIscreate:Ge,init:ne}):null,St?le.createElement(lt,{UserInfo:Se==null?void 0:Se.userInfo,setSee:Je,userId:(Fe=Se==null?void 0:Se.userInfo)==null?void 0:Fe.user_id,ItemUpdate:We,CourseItem:Ce,init:ne}):null)),((Et=Se==null?void 0:Se.userInfo)==null?void 0:Et.user_id)===299635||(($e=Se==null?void 0:Se.userInfo)==null?void 0:$e.user_id)===301458||(gt=Se==null?void 0:Se.userInfo)!=null&>.admin||(dt=Se==null?void 0:Se.userInfo)!=null&&dt.business?le.createElement(Ze.default,rt({},yt),le.createElement(ye.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var Vt=(0,Re.connect)(({user:Se})=>({user:Se}))(st)},42684:function(At,Rt,fe){"use strict";fe.d(Rt,{AL:function(){return ct},Iy:function(){return nt},Qv:function(){return Ze},ez:function(){return ft},jb:function(){return me}});var le=fe(32834),Qe=fe.n(le),Ne=fe(11690),He=fe.n(Ne);let ye=1;function be(Se,Oe){const qe=Se.match(/^(\s+)(?:```)/);if(qe===null)return Oe;const Te=qe[1];return Oe.split(`
|
|
`).map(_e=>{const ke=_e.match(/^\s+/);if(ke===null)return _e;const[Fe]=ke;return Fe.length>=Te.length?_e.slice(Te.length):_e}).join(`
|
|
`)}let Ie=[],Ke=["<ul>"];const Ee=new(Qe()).Renderer,de=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function nt(){Ie.length=0,Ke=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function lt(Se,Oe,qe,Te){if(Oe>=Se.length||Se[Oe].level<=qe)return Oe;var _e=Se[Oe];Te.push("<li><a href='#"+ye+_e.anchor+"'>"+_e.text+"</a>"),Oe++;var ke=[];return Oe=lt(Se,Oe,_e.level,ke),ke.length>0&&(Te.push("<ul>"),ke.forEach(function(Fe){Te.push(Fe)}),Te.push("</ul>")),Te.push("</li>"),Oe=lt(Se,Oe,qe,Te),Oe}function Ze(){return lt(Ie,0,0,Ke),Ke.push("</ul>"),Ke.join("")}const Be={heading(Se){const Oe=de.exec(Se);if(ye+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(Se){const Oe=this.rules.block.fences.exec(Se);if(Oe){const qe=Oe[0];let Te=be(qe,Oe[3]||"");const _e=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(_e)>=0){const ke=et(),Fe=Te;Te=ke,tt[ke]={type:"block",expression:Fe}}return{type:"code",raw:qe,lang:_e,text:Te}}}},Re=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Ae=0;const et=()=>`__special_katext_id_${Ae++}__`;let tt={};function ft(){return tt}function ct(){Ae=0,tt={}}function rt(Se){return Se=Se.replace(Re,(Oe,qe)=>{const Te=et();return tt[Te]={type:"inline",expression:qe},Te}),Se}const at=Ee.listitem;Ee.listitem=function(Se){return at(rt(Se))};const st=Ee.paragraph;Ee.paragraph=function(Se){return st(rt(Se))};const Vt=Ee.tablecell;Ee.tablecell=function(Se,Oe){return Vt(rt(Se),Oe)},Ee.code=function(Se,Oe,qe){const Te=(Oe||"").match(/\S*/)[0];return Te?["latex","katex","math"].indexOf(Te)>=0?`<p class='editormd-tex'>${Se}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${qe?Se:(0,Ne.escape)(Se,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(qe?Se:(0,Ne.escape)(Se,!0))+"</code></pre>"},Ee.heading=function(Se,Oe,qe){let Te=this.options.headerPrefix+qe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ie.push({anchor:Te,level:Oe,text:Se}),"<h"+Oe+' id="'+ye+Te+'">'+Se+"</h"+Oe+">"},Qe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Qe().use({tokenizer:Be,renderer:Ee}),Rt.ZP=Qe()},99498:function(At,Rt,fe){(function(le){le(fe(89780))})(function(le){le.defineOption("placeholder","",function(Ke,Ee,de){var nt=de&&de!=le.Init;if(Ee&&!nt)Ke.on("blur",ye),Ke.on("change",be),Ke.on("swapDoc",be),le.on(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose=function(){He(Ke)}),be(Ke);else if(!Ee&&nt){Ke.off("blur",ye),Ke.off("change",be),Ke.off("swapDoc",be),le.off(Ke.getInputField(),"compositionupdate",Ke.state.placeholderCompose),Qe(Ke);var me=Ke.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}Ee&&!Ke.hasFocus()&&ye(Ke)});function Qe(Ke){Ke.state.placeholder&&(Ke.state.placeholder.parentNode.removeChild(Ke.state.placeholder),Ke.state.placeholder=null)}function Ne(Ke){Qe(Ke);var Ee=Ke.state.placeholder=document.createElement("pre");Ee.style.cssText="height: 0; overflow: visible",Ee.style.direction=Ke.getOption("direction"),Ee.className="CodeMirror-placeholder CodeMirror-line-like";var de=Ke.getOption("placeholder");typeof de=="string"&&(de=document.createTextNode(de)),Ee.appendChild(de),Ke.display.lineSpace.insertBefore(Ee,Ke.display.lineSpace.firstChild)}function He(Ke){setTimeout(function(){var Ee=!1,de=Ke.getInputField();de.nodeName=="TEXTAREA"?Ee=!de.value:Ke.lineCount()==1&&(Ee=!/[^\u200b]/.test(de.querySelector(".CodeMirror-line").textContent)),Ee?Ne(Ke):Qe(Ke)},20)}function ye(Ke){Ie(Ke)&&Ne(Ke)}function be(Ke){var Ee=Ke.getWrapperElement(),de=Ie(Ke);Ee.className=Ee.className.replace(" CodeMirror-empty","")+(de?" CodeMirror-empty":""),de?Ne(Ke):Qe(Ke)}function Ie(Ke){return Ke.lineCount()===1&&Ke.getLine(0)===""}})},25717:function(At,Rt,fe){(function(le){le(fe(89780))})(function(le){var Qe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=le.Pos;le.defineOption("autoCloseBrackets",!1,function(Be,Re,Ae){Ae&&Ae!=le.Init&&(Be.removeKeyMap(ye),Be.state.closeBrackets=null),Re&&(be(He(Re,"pairs")),Be.state.closeBrackets=Re,Be.addKeyMap(ye))});function He(Be,Re){return Re=="pairs"&&typeof Be=="string"?Be:typeof Be=="object"&&Be[Re]!=null?Be[Re]:Qe[Re]}var ye={Backspace:Ee,Enter:de};function be(Be){for(var Re=0;Re<Be.length;Re++){var Ae=Be.charAt(Re),et="'"+Ae+"'";ye[et]||(ye[et]=Ie(Ae))}}be(Qe.pairs+"`");function Ie(Be){return function(Re){return me(Re,Be)}}function Ke(Be){var Re=Be.state.closeBrackets;if(!Re||Re.override)return Re;var Ae=Be.getModeAt(Be.getCursor());return Ae.closeBrackets||Re}function Ee(Be){var Re=Ke(Be);if(!Re||Be.getOption("disableInput"))return le.Pass;for(var Ae=He(Re,"pairs"),et=Be.listSelections(),tt=0;tt<et.length;tt++){if(!et[tt].empty())return le.Pass;var ft=lt(Be,et[tt].head);if(!ft||Ae.indexOf(ft)%2!=0)return le.Pass}for(var tt=et.length-1;tt>=0;tt--){var ct=et[tt].head;Be.replaceRange("",Ne(ct.line,ct.ch-1),Ne(ct.line,ct.ch+1),"+delete")}}function de(Be){var Re=Ke(Be),Ae=Re&&He(Re,"explode");if(!Ae||Be.getOption("disableInput"))return le.Pass;for(var et=Be.listSelections(),tt=0;tt<et.length;tt++){if(!et[tt].empty())return le.Pass;var ft=lt(Be,et[tt].head);if(!ft||Ae.indexOf(ft)%2!=0)return le.Pass}Be.operation(function(){var ct=Be.lineSeparator()||`
|
|
`;Be.replaceSelection(ct+ct,null),Be.execCommand("goCharLeft"),et=Be.listSelections();for(var rt=0;rt<et.length;rt++){var at=et[rt].head.line;Be.indentLine(at,null,!0),Be.indentLine(at+1,null,!0)}})}function nt(Be){var Re=le.cmpPos(Be.anchor,Be.head)>0;return{anchor:new Ne(Be.anchor.line,Be.anchor.ch+(Re?-1:1)),head:new Ne(Be.head.line,Be.head.ch+(Re?1:-1))}}function me(Be,Re){var Ae=Ke(Be);if(!Ae||Be.getOption("disableInput"))return le.Pass;var et=He(Ae,"pairs"),tt=et.indexOf(Re);if(tt==-1)return le.Pass;for(var ft=He(Ae,"closeBefore"),ct=He(Ae,"triples"),rt=et.charAt(tt+1)==Re,at=Be.listSelections(),st=tt%2==0,Vt,Se=0;Se<at.length;Se++){var Oe=at[Se],qe=Oe.head,Te,_e=Be.getRange(qe,Ne(qe.line,qe.ch+1));if(st&&!Oe.empty())Te="surround";else if((rt||!st)&&_e==Re)rt&&Ze(Be,qe)?Te="both":ct.indexOf(Re)>=0&&Be.getRange(qe,Ne(qe.line,qe.ch+3))==Re+Re+Re?Te="skipThree":Te="skip";else if(rt&&qe.ch>1&&ct.indexOf(Re)>=0&&Be.getRange(Ne(qe.line,qe.ch-2),qe)==Re+Re){if(qe.ch>2&&/\bstring/.test(Be.getTokenTypeAt(Ne(qe.line,qe.ch-2))))return le.Pass;Te="addFour"}else if(rt){var ke=qe.ch==0?" ":Be.getRange(Ne(qe.line,qe.ch-1),qe);if(!le.isWordChar(_e)&&ke!=Re&&!le.isWordChar(ke))Te="both";else return le.Pass}else if(st&&(_e.length===0||/\s/.test(_e)||ft.indexOf(_e)>-1))Te="both";else return le.Pass;if(!Vt)Vt=Te;else if(Vt!=Te)return le.Pass}var Fe=tt%2?et.charAt(tt-1):Re,Et=tt%2?Re:et.charAt(tt+1);Be.operation(function(){if(Vt=="skip")Be.execCommand("goCharRight");else if(Vt=="skipThree")for(var $e=0;$e<3;$e++)Be.execCommand("goCharRight");else if(Vt=="surround"){for(var gt=Be.getSelections(),$e=0;$e<gt.length;$e++)gt[$e]=Fe+gt[$e]+Et;Be.replaceSelections(gt,"around"),gt=Be.listSelections().slice();for(var $e=0;$e<gt.length;$e++)gt[$e]=nt(gt[$e]);Be.setSelections(gt)}else Vt=="both"?(Be.replaceSelection(Fe+Et,null),Be.triggerElectric(Fe+Et),Be.execCommand("goCharLeft")):Vt=="addFour"&&(Be.replaceSelection(Fe+Fe+Fe+Fe,"before"),Be.execCommand("goCharRight"))})}function lt(Be,Re){var Ae=Be.getRange(Ne(Re.line,Re.ch-1),Ne(Re.line,Re.ch+1));return Ae.length==2?Ae:null}function Ze(Be,Re){var Ae=Be.getTokenAt(Ne(Re.line,Re.ch+1));return/\bstring/.test(Ae.type)&&Ae.start==Re.ch&&(Re.ch==0||!/\bstring/.test(Be.getTokenTypeAt(Re)))}})},6313:function(At,Rt,fe){(function(le){le(fe(89780),fe(32855))})(function(le){le.defineOption("autoCloseTags",!1,function(Ee,de,nt){if(nt!=le.Init&&nt&&Ee.removeKeyMap("autoCloseTags"),!!de){var me={name:"autoCloseTags"};(typeof de!="object"||de.whenClosing!==!1)&&(me["'/'"]=function(lt){return be(lt)}),(typeof de!="object"||de.whenOpening!==!1)&&(me["'>'"]=function(lt){return He(lt)}),Ee.addKeyMap(me)}});var Qe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ne=["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 He(Ee){if(Ee.getOption("disableInput"))return le.Pass;for(var de=Ee.listSelections(),nt=[],me=Ee.getOption("autoCloseTags"),lt=0;lt<de.length;lt++){if(!de[lt].empty())return le.Pass;var Ze=de[lt].head,Be=Ee.getTokenAt(Ze),Re=le.innerMode(Ee.getMode(),Be.state),Ae=Re.state,et=Re.mode.xmlCurrentTag&&Re.mode.xmlCurrentTag(Ae),tt=et&&et.name;if(!tt)return le.Pass;var ft=Re.mode.configuration=="html",ct=typeof me=="object"&&me.dontCloseTags||ft&&Qe,rt=typeof me=="object"&&me.indentTags||ft&&Ne;Be.end>Ze.ch&&(tt=tt.slice(0,tt.length-Be.end+Ze.ch));var at=tt.toLowerCase();if(!tt||Be.type=="string"&&(Be.end!=Ze.ch||!/[\"\']/.test(Be.string.charAt(Be.string.length-1))||Be.string.length==1)||Be.type=="tag"&&et.close||Be.string.indexOf("/")==Ze.ch-Be.start-1||ct&&Ie(ct,at)>-1||Ke(Ee,Re.mode.xmlCurrentContext&&Re.mode.xmlCurrentContext(Ae)||[],tt,Ze,!0))return le.Pass;var st=typeof me=="object"&&me.emptyTags;if(st&&Ie(st,tt)>-1){nt[lt]={text:"/>",newPos:le.Pos(Ze.line,Ze.ch+2)};continue}var Vt=rt&&Ie(rt,at)>-1;nt[lt]={indent:Vt,text:">"+(Vt?`
|
|
|
|
`:"")+"</"+tt+">",newPos:Vt?le.Pos(Ze.line+1,0):le.Pos(Ze.line,Ze.ch+1)}}for(var Se=typeof me=="object"&&me.dontIndentOnAutoClose,lt=de.length-1;lt>=0;lt--){var Oe=nt[lt];Ee.replaceRange(Oe.text,de[lt].head,de[lt].anchor,"+insert");var qe=Ee.listSelections().slice(0);qe[lt]={head:Oe.newPos,anchor:Oe.newPos},Ee.setSelections(qe),!Se&&Oe.indent&&(Ee.indentLine(Oe.newPos.line,null,!0),Ee.indentLine(Oe.newPos.line+1,null,!0))}}function ye(Ee,de){for(var nt=Ee.listSelections(),me=[],lt=de?"/":"</",Ze=Ee.getOption("autoCloseTags"),Be=typeof Ze=="object"&&Ze.dontIndentOnSlash,Re=0;Re<nt.length;Re++){if(!nt[Re].empty())return le.Pass;var Ae=nt[Re].head,et=Ee.getTokenAt(Ae),tt=le.innerMode(Ee.getMode(),et.state),ft=tt.state;if(de&&(et.type=="string"||et.string.charAt(0)!="<"||et.start!=Ae.ch-1))return le.Pass;var ct,rt=tt.mode.name!="xml"&&Ee.getMode().name=="htmlmixed";if(rt&&tt.mode.name=="javascript")ct=lt+"script";else if(rt&&tt.mode.name=="css")ct=lt+"style";else{var at=tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(ft);if(!at||at.length&&Ke(Ee,at,at[at.length-1],Ae))return le.Pass;ct=lt+at[at.length-1]}Ee.getLine(Ae.line).charAt(et.end)!=">"&&(ct+=">"),me[Re]=ct}if(Ee.replaceSelections(me),nt=Ee.listSelections(),!Be)for(var Re=0;Re<nt.length;Re++)(Re==nt.length-1||nt[Re].head.line<nt[Re+1].head.line)&&Ee.indentLine(nt[Re].head.line)}function be(Ee){return Ee.getOption("disableInput")?le.Pass:ye(Ee,!0)}le.commands.closeTag=function(Ee){return ye(Ee)};function Ie(Ee,de){if(Ee.indexOf)return Ee.indexOf(de);for(var nt=0,me=Ee.length;nt<me;++nt)if(Ee[nt]==de)return nt;return-1}function Ke(Ee,de,nt,me,lt){if(!le.scanForClosingTag)return!1;var Ze=Math.min(Ee.lastLine()+1,me.line+500),Be=le.scanForClosingTag(Ee,me,null,Ze);if(!Be||Be.tag!=nt)return!1;for(var Re=lt?1:0,Ae=de.length-1;Ae>=0&&de[Ae]==nt;Ae--)++Re;me=Be.to;for(var Ae=1;Ae<Re;Ae++){var et=le.scanForClosingTag(Ee,me,null,Ze);if(!et||et.tag!=nt)return!1;me=et.to}return!0}})},32855:function(At,Rt,fe){(function(le){le(fe(89780))})(function(le){"use strict";var Qe=le.Pos;function Ne(Ae,et){return Ae.line-et.line||Ae.ch-et.ch}var He="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",ye=He+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",be=new RegExp("<(/?)(["+He+"]["+ye+"]*)","g");function Ie(Ae,et,tt,ft){this.line=et,this.ch=tt,this.cm=Ae,this.text=Ae.getLine(et),this.min=ft?Math.max(ft.from,Ae.firstLine()):Ae.firstLine(),this.max=ft?Math.min(ft.to-1,Ae.lastLine()):Ae.lastLine()}function Ke(Ae,et){var tt=Ae.cm.getTokenTypeAt(Qe(Ae.line,et));return tt&&/\btag\b/.test(tt)}function Ee(Ae){if(!(Ae.line>=Ae.max))return Ae.ch=0,Ae.text=Ae.cm.getLine(++Ae.line),!0}function de(Ae){if(!(Ae.line<=Ae.min))return Ae.text=Ae.cm.getLine(--Ae.line),Ae.ch=Ae.text.length,!0}function nt(Ae){for(;;){var et=Ae.text.indexOf(">",Ae.ch);if(et==-1){if(Ee(Ae))continue;return}if(!Ke(Ae,et+1)){Ae.ch=et+1;continue}var tt=Ae.text.lastIndexOf("/",et),ft=tt>-1&&!/\S/.test(Ae.text.slice(tt+1,et));return Ae.ch=et+1,ft?"selfClose":"regular"}}function me(Ae){for(;;){var et=Ae.ch?Ae.text.lastIndexOf("<",Ae.ch-1):-1;if(et==-1){if(de(Ae))continue;return}if(!Ke(Ae,et+1)){Ae.ch=et;continue}be.lastIndex=et,Ae.ch=et;var tt=be.exec(Ae.text);if(tt&&tt.index==et)return tt}}function lt(Ae){for(;;){be.lastIndex=Ae.ch;var et=be.exec(Ae.text);if(!et){if(Ee(Ae))continue;return}if(!Ke(Ae,et.index+1)){Ae.ch=et.index+1;continue}return Ae.ch=et.index+et[0].length,et}}function Ze(Ae){for(;;){var et=Ae.ch?Ae.text.lastIndexOf(">",Ae.ch-1):-1;if(et==-1){if(de(Ae))continue;return}if(!Ke(Ae,et+1)){Ae.ch=et;continue}var tt=Ae.text.lastIndexOf("/",et),ft=tt>-1&&!/\S/.test(Ae.text.slice(tt+1,et));return Ae.ch=et+1,ft?"selfClose":"regular"}}function Be(Ae,et){for(var tt=[];;){var ft=lt(Ae),ct,rt=Ae.line,at=Ae.ch-(ft?ft[0].length:0);if(!ft||!(ct=nt(Ae)))return;if(ct!="selfClose")if(ft[1]){for(var st=tt.length-1;st>=0;--st)if(tt[st]==ft[2]){tt.length=st;break}if(st<0&&(!et||et==ft[2]))return{tag:ft[2],from:Qe(rt,at),to:Qe(Ae.line,Ae.ch)}}else tt.push(ft[2])}}function Re(Ae,et){for(var tt=[];;){var ft=Ze(Ae);if(!ft)return;if(ft=="selfClose"){me(Ae);continue}var ct=Ae.line,rt=Ae.ch,at=me(Ae);if(!at)return;if(at[1])tt.push(at[2]);else{for(var st=tt.length-1;st>=0;--st)if(tt[st]==at[2]){tt.length=st;break}if(st<0&&(!et||et==at[2]))return{tag:at[2],from:Qe(Ae.line,Ae.ch),to:Qe(ct,rt)}}}}le.registerHelper("fold","xml",function(Ae,et){for(var tt=new Ie(Ae,et.line,0);;){var ft=lt(tt);if(!ft||tt.line!=et.line)return;var ct=nt(tt);if(!ct)return;if(!ft[1]&&ct!="selfClose"){var rt=Qe(tt.line,tt.ch),at=Be(tt,ft[2]);return at&&Ne(at.from,rt)>0?{from:rt,to:at.from}:null}}}),le.findMatchingTag=function(Ae,et,tt){var ft=new Ie(Ae,et.line,et.ch,tt);if(!(ft.text.indexOf(">")==-1&&ft.text.indexOf("<")==-1)){var ct=nt(ft),rt=ct&&Qe(ft.line,ft.ch),at=ct&&me(ft);if(!(!ct||!at||Ne(ft,et)>0)){var st={from:Qe(ft.line,ft.ch),to:rt,tag:at[2]};return ct=="selfClose"?{open:st,close:null,at:"open"}:at[1]?{open:Re(ft,at[2]),close:st,at:"close"}:(ft=new Ie(Ae,rt.line,rt.ch,tt),{open:st,close:Be(ft,at[2]),at:"open"})}}},le.findEnclosingTag=function(Ae,et,tt,ft){for(var ct=new Ie(Ae,et.line,et.ch,tt);;){var rt=Re(ct,ft);if(!rt)break;var at=new Ie(Ae,et.line,et.ch,tt),st=Be(at,rt.tag);if(st)return{open:rt,close:st}}},le.scanForClosingTag=function(Ae,et,tt,ft){var ct=new Ie(Ae,et.line,et.ch,ft?{from:0,to:ft}:null);return Be(ct,tt)}})},89780:function(At){(function(Rt,fe){At.exports=fe()})(this,function(){"use strict";var Rt=navigator.userAgent,fe=navigator.platform,le=/gecko\/\d/i.test(Rt),Qe=/MSIE \d/.test(Rt),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Rt),He=/Edge\/(\d+)/.exec(Rt),ye=Qe||Ne||He,be=ye&&(Qe?document.documentMode||6:+(He||Ne)[1]),Ie=!He&&/WebKit\//.test(Rt),Ke=Ie&&/Qt\/\d+\.\d+/.test(Rt),Ee=!He&&/Chrome\//.test(Rt),de=/Opera\//.test(Rt),nt=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Rt),lt=/PhantomJS/.test(Rt),Ze=!He&&/AppleWebKit/.test(Rt)&&/Mobile\/\w+/.test(Rt),Be=/Android/.test(Rt),Re=Ze||Be||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Rt),Ae=Ze||/Mac/.test(fe),et=/\bCrOS\b/.test(Rt),tt=/win/i.test(fe),ft=de&&Rt.match(/Version\/(\d*\.\d*)/);ft&&(ft=Number(ft[1])),ft&&ft>=15&&(de=!1,Ie=!0);var ct=Ae&&(Ke||de&&(ft==null||ft<12.11)),rt=le||ye&&be>=9;function at(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var st=function(a,y){var x=a.className,b=at(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 Vt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Se(a,y){return Vt(a).appendChild(y)}function Oe(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 te=0;te<y.length;++te)E.appendChild(y[te]);return E}function qe(a,y,x,b){var E=Oe(a,y,x,b);return E.setAttribute("role","presentation"),E}var Te;document.createRange?Te=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Te=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 _e(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 ke(){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 Fe(a,y){var x=a.className;at(y).test(x)||(a.className+=(x?" ":"")+y)}function Et(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!at(x[b]).test(y)&&(y+=" "+x[b]);return y}var $e=function(a){a.select()};Ze?$e=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:ye&&($e=function(a){try{a.select()}catch(y){}});function gt(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 te=b||0,oe=E||0;;){var se=a.indexOf(" ",te);if(se<0||se>=y)return oe+(y-te);oe+=se-te,oe+=x-oe%x,te=se+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=gt(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 je(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var vt=50,ut={toString:function(){return"CodeMirror.Pass"}},we={scroll:!1},Ve={origin:"*mouse"},Ge={origin:"+move"};function St(a,y,x){for(var b=0,E=0;;){var te=a.indexOf(" ",b);te==-1&&(te=a.length);var oe=te-b;if(te==a.length||E+oe>=y)return b+Math.min(oe,y-E);if(E+=te-b,E+=x-E%x,b=te+1,E>=y)return b}}var Je=[""];function Ce(a){for(;Je.length<=a;)Je.push(ve(Je)+" ");return Je[a]}function ve(a){return a[a.length-1]}function Le(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function Ye(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function ie(){}function ee(a,y){var x;return Object.create?x=Object.create(a):(ie.prototype=a,x=new ie),y&&dt(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function ae(a,y){return y?y.source.indexOf("\\w")>-1&&re(a)?!0:y.test(a):re(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var ge=/[\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 We(a){return a.charCodeAt(0)>=768&&ge.test(a)}function xt(a,y,x){for(;(x<0?y>0:y<a.length)&&We(a.charAt(y));)y+=x;return y}function yt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,te=b<0?Math.ceil(E):Math.floor(E);if(te==y)return a(te)?y:x;a(te)?x=te:y=te+b}}function ht(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,te=0;te<a.length;++te){var oe=a[te];(oe.from<x&&oe.to>y||y==x&&oe.to==y)&&(b(Math.max(oe.from,y),Math.min(oe.to,x),oe.level==1?"rtl":"ltr",te),E=!0)}E||b(y,x,"ltr")}var mt=null;function Nt(a,y,x){var b;mt=null;for(var E=0;E<a.length;++E){var te=a[E];if(te.from<y&&te.to>y)return E;te.to==y&&(te.from!=te.to&&x=="before"?b=E:mt=E),te.from==y&&(te.from!=te.to&&x!="before"?b=E:mt=E)}return b!=null?b:mt}var Dt=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]/,te=/[LRr]/,oe=/[Lb1n]/,se=/[1n]/;function ue(he,xe,De){this.level=he,this.from=xe,this.to=De}return function(he,xe){var De=xe=="ltr"?"L":"R";if(he.length==0||xe=="ltr"&&!b.test(he))return!1;for(var Xe=he.length,Ue=[],Ct=0;Ct<Xe;++Ct)Ue.push(x(he.charCodeAt(Ct)));for(var Tt=0,Yt=De;Tt<Xe;++Tt){var rn=Ue[Tt];rn=="m"?Ue[Tt]=Yt:Yt=rn}for(var fn=0,on=De;fn<Xe;++fn){var bn=Ue[fn];bn=="1"&&on=="r"?Ue[fn]="n":te.test(bn)&&(on=bn,bn=="r"&&(Ue[fn]="R"))}for(var Tn=1,Sn=Ue[0];Tn<Xe-1;++Tn){var Un=Ue[Tn];Un=="+"&&Sn=="1"&&Ue[Tn+1]=="1"?Ue[Tn]="1":Un==","&&Sn==Ue[Tn+1]&&(Sn=="1"||Sn=="n")&&(Ue[Tn]=Sn),Sn=Un}for(var Ir=0;Ir<Xe;++Ir){var si=Ue[Ir];if(si==",")Ue[Ir]="N";else if(si=="%"){var jr=void 0;for(jr=Ir+1;jr<Xe&&Ue[jr]=="%";++jr);for(var Bi=Ir&&Ue[Ir-1]=="!"||jr<Xe&&Ue[jr]=="1"?"1":"N",ki=Ir;ki<jr;++ki)Ue[ki]=Bi;Ir=jr-1}}for(var qr=0,Ei=De;qr<Xe;++qr){var hi=Ue[qr];Ei=="L"&&hi=="1"?Ue[qr]="L":te.test(hi)&&(Ei=hi)}for(var ri=0;ri<Xe;++ri)if(E.test(Ue[ri])){var $r=void 0;for($r=ri+1;$r<Xe&&E.test(Ue[$r]);++$r);for(var Ur=(ri?Ue[ri-1]:De)=="L",Di=($r<Xe?Ue[$r]:De)=="L",Vo=Ur==Di?Ur?"L":"R":De,bo=ri;bo<$r;++bo)Ue[bo]=Vo;ri=$r-1}for(var pi=[],eo,li=0;li<Xe;)if(oe.test(Ue[li])){var bs=li;for(++li;li<Xe&&oe.test(Ue[li]);++li);pi.push(new ue(0,bs,li))}else{var oo=li,Mo=pi.length,To=xe=="rtl"?1:0;for(++li;li<Xe&&Ue[li]!="L";++li);for(var bi=oo;bi<li;)if(se.test(Ue[bi])){oo<bi&&(pi.splice(Mo,0,new ue(1,oo,bi)),Mo+=To);var Uo=bi;for(++bi;bi<li&&se.test(Ue[bi]);++bi);pi.splice(Mo,0,new ue(2,Uo,bi)),Mo+=To,oo=bi}else++bi;oo<li&&pi.splice(Mo,0,new ue(1,oo,li))}return xe=="ltr"&&(pi[0].level==1&&(eo=he.match(/^\s+/))&&(pi[0].from=eo[0].length,pi.unshift(new ue(0,0,eo[0].length))),ve(pi).level==1&&(eo=he.match(/\s+$/))&&(ve(pi).to-=eo[0].length,pi.push(new ue(0,Xe-eo[0].length,Xe)))),xe=="rtl"?pi.reverse():pi}}();function Ft(a,y){var x=a.order;return x==null&&(x=a.order=Dt(a.text,y)),x}var zt=[],Lt=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]||zt).concat(x)}};function sn(a,y){return a._handlers&&a._handlers[y]||zt}function Ot(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 te=je(E,x);te>-1&&(b[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function qt(a,y){var x=sn(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 it(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),qt(a,x||y.type,a,y),hn(y)||y.codemirrorIgnore}function ln(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)je(x,y[b])==-1&&x.push(y[b])}function Wt(a,y){return sn(a,y).length>0}function Ut(a){a.prototype.on=function(y,x){Lt(this,y,x)},a.prototype.off=function(y,x){Ot(this,y,x)}}function un(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function An(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function hn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function wn(a){un(a),An(a)}function er(a){return a.target||a.srcElement}function Gn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ae&&a.ctrlKey&&y==1&&(y=3),y}var Gr=function(){if(ye&&be<9)return!1;var a=Oe("div");return"draggable"in a||"dragDrop"in a}(),Ar;function gr(a){if(Ar==null){var y=Oe("span","\u200B");Se(a,Oe("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Ar=y.offsetWidth<=1&&y.offsetHeight>2&&!(ye&&be<8))}var x=Ar?Oe("span","\u200B"):Oe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var cr;function In(a){if(cr!=null)return cr;var y=Se(a,document.createTextNode("A\u062EA")),x=Te(y,0,1).getBoundingClientRect(),b=Te(y,1,2).getBoundingClientRect();return Vt(a),!x||x.left==x.right?!1:cr=b.right-x.right<3}var tr=`
|
|
|
|
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 te=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),oe=te.indexOf("\r");oe!=-1?(x.push(te.slice(0,oe)),y+=oe+1):(x.push(te),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},sr=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=Oe("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,Oe("span","x")),x=y.getBoundingClientRect(),b=Te(y,0,1).getBoundingClientRect();return Xn=Math.abs(x.left-b.left)>1}var yr={},Gt={};function pn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),yr[a]=y}function kn(a,y){Gt[a]=y}function Mn(a){if(typeof a=="string"&&Gt.hasOwnProperty(a))a=Gt[a];else if(a&&typeof a.name=="string"&&Gt.hasOwnProperty(a.name)){var y=Gt[a.name];typeof y=="string"&&(y={name:y}),a=ee(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Mn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Mn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Jn(a,y){y=Mn(y);var x=yr[y.name];if(!x)return Jn(a,"text/plain");var b=x(a,y);if($n.hasOwnProperty(y.name)){var E=$n[y.name];for(var te in E)E.hasOwnProperty(te)&&(b.hasOwnProperty(te)&&(b["_"+te]=b[te]),b[te]=E[te])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var oe in y.modeProps)b[oe]=y.modeProps[oe];return b}var $n={};function hr(a,y){var x=$n.hasOwnProperty(a)?$n[a]:$n[a]={};dt(y,x)}function zn(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 lr(a,y,x){return a.startState?a.startState(y,x):!0}var _t=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};_t.prototype.eol=function(){return this.pos>=this.string.length},_t.prototype.sol=function(){return this.pos==this.lineStart},_t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_t.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},_t.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},_t.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},_t.prototype.skipToEnd=function(){this.pos=this.string.length},_t.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},_t.prototype.backUp=function(a){this.pos-=a},_t.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)},_t.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},_t.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(oe){return x?oe.toLowerCase():oe},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var te=this.string.slice(this.pos).match(a);return te&&te.index>0?null:(te&&y!==!1&&(this.pos+=te[0].length),te)}},_t.prototype.current=function(){return this.string.slice(this.start,this.pos)},_t.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},_t.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},_t.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function ot(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],te=E.chunkSize();if(y<te){x=E;break}y-=te}return x.lines[y]}function Xt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(te){var oe=te.text;E==x.line&&(oe=oe.slice(0,x.ch)),E==y.line&&(oe=oe.slice(y.ch)),b.push(oe),++E}),b}function Cn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Zn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Me(a){if(a.parent==null)return null;for(var y=a.parent,x=je(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 Pe(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],te=E.height;if(y<te){a=E;continue e}y-=te,x+=E.chunkSize()}return x}while(!a.lines);for(var oe=0;oe<a.lines.length;++oe){var se=a.lines[oe],ue=se.height;if(y<ue)break;y-=ue}return x+oe}function Mt(a,y){return y>=a.first&&y<a.first+a.size}function bt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function ze(a,y,x){if(x===void 0&&(x=null),!(this instanceof ze))return new ze(a,y,x);this.line=a,this.ch=y,this.sticky=x}function wt(a,y){return a.line-y.line||a.ch-y.ch}function Kt(a,y){return a.sticky==y.sticky&&wt(a,y)==0}function $t(a){return ze(a.line,a.ch)}function cn(a,y){return wt(a,y)<0?y:a}function It(a,y){return wt(a,y)<0?a:y}function Jt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function kt(a,y){if(y.line<a.first)return ze(a.first,0);var x=a.first+a.size-1;return y.line>x?ze(x,ot(a,x).text.length):pt(y,ot(a,y.line).text.length)}function pt(a,y){var x=a.ch;return x==null||x>y?ze(a.line,y):x<0?ze(a.line,0):a}function Qt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=kt(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,zn(a.mode,y.state),x,y.lookAhead):new mn(a,zn(a.mode,y),x)},mn.prototype.save=function(a){var y=a!==!1?zn(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],te={};Qn(a,y.text,a.doc.mode,x,function(he,xe){return E.push(he,xe)},te,b);for(var oe=x.state,se=function(he){x.baseTokens=E;var xe=a.state.overlays[he],De=1,Xe=0;x.state=!0,Qn(a,y.text,xe.mode,x,function(Ue,Ct){for(var Tt=De;Xe<Ue;){var Yt=E[De];Yt>Ue&&E.splice(De,1,Ue,E[De+1],Yt),De+=2,Xe=Math.min(Ue,Yt)}if(Ct)if(xe.opaque)E.splice(Tt,De-Tt,Ue,"overlay "+Ct),De=Tt+2;else for(;Tt<De;Tt+=2){var rn=E[Tt+1];E[Tt+1]=(rn?rn+" ":"")+"overlay "+Ct}},te),x.state=oe,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)se(ue);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function Wn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Yn(a,Me(y)),E=y.text.length>a.options.maxHighlightLength&&zn(a.doc.mode,b.state),te=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=te.styles,te.classes?y.styleClasses=te.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 te=Er(a,y,x),oe=te>b.first&&ot(b,te-1).stateAfter,se=oe?mn.fromSaved(b,oe,te):new mn(b,lr(b.mode),te);return b.iter(te,y,function(ue){dn(a,ue.text,se);var he=se.line;ue.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?se.save():null,se.nextLine()}),x&&(b.modeFrontier=se.line),se}function dn(a,y,x,b){var E=a.doc.mode,te=new _t(y,a.options.tabSize,x);for(te.start=te.pos=b||0,y==""&&Ht(E,x.state);!te.eol();)gn(E,te,x.state),te.start=te.pos}function Ht(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 te=a.token(y,x);if(y.pos>y.start)return te}throw new Error("Mode "+a.name+" failed to advance stream.")}var en=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function Hn(a,y,x,b){var E=a.doc,te=E.mode,oe;y=kt(E,y);var se=ot(E,y.line),ue=Yn(a,y.line,x),he=new _t(se.text,a.options.tabSize,ue),xe;for(b&&(xe=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,oe=gn(te,he,ue.state),b&&xe.push(new en(he,oe,zn(E.mode,ue.state)));return b?xe:new en(he,oe,ue.state)}function br(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,te,oe){var se=x.flattenSpans;se==null&&(se=a.options.flattenSpans);var ue=0,he=null,xe=new _t(y,a.options.tabSize,b),De,Xe=a.options.addModeClass&&[null];for(y==""&&br(Ht(x,b.state),te);!xe.eol();){if(xe.pos>a.options.maxHighlightLength?(se=!1,oe&&dn(a,y,b,xe.pos),xe.pos=y.length,De=null):De=br(gn(x,xe,b.state,Xe),te),Xe){var Ue=Xe[0].name;Ue&&(De="m-"+(De?Ue+" "+De:Ue))}if(!se||he!=De){for(;ue<xe.start;)ue=Math.min(xe.start,ue+5e3),E(ue,he);he=De}xe.start=xe.pos}for(;ue<xe.pos;){var Ct=Math.min(xe.pos,ue+5e3);E(Ct,he),ue=Ct}}function Er(a,y,x){for(var b,E,te=a.doc,oe=x?-1:y-(a.doc.mode.innerMode?1e3:100),se=y;se>oe;--se){if(se<=te.first)return te.first;var ue=ot(te,se-1),he=ue.stateAfter;if(he&&(!x||se+(he instanceof vn?he.lookAhead:0)<=te.modeFrontier))return se;var xe=pe(ue.text,null,a.options.tabSize);(E==null||b>xe)&&(E=se-1,b=xe)}return E}function Dr(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=ot(a,b).stateAfter;if(E&&(!(E instanceof vn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var xr=!1,nr=!1;function Nr(){xr=!0}function pr(){nr=!0}function rr(a,y,x){this.marker=a,this.from=y,this.to=x}function Sr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Lr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function fr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function qn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],oe=te.marker,se=te.from==null||(oe.inclusiveLeft?te.from<=y:te.from<y);if(se||te.from==y&&oe.type=="bookmark"&&(!x||!te.marker.insertLeft)){var ue=te.to==null||(oe.inclusiveRight?te.to>=y:te.to>y);(b||(b=[])).push(new rr(oe,te.from,ue?null:te.to))}}return b}function jn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],oe=te.marker,se=te.to==null||(oe.inclusiveRight?te.to>=y:te.to>y);if(se||te.from==y&&oe.type=="bookmark"&&(!x||te.marker.insertLeft)){var ue=te.from==null||(oe.inclusiveLeft?te.from<=y:te.from<y);(b||(b=[])).push(new rr(oe,ue?null:te.from-y,te.to==null?null:te.to-y))}}return b}function Pr(a,y){if(y.full)return null;var x=Mt(a,y.from.line)&&ot(a,y.from.line).markedSpans,b=Mt(a,y.to.line)&&ot(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,te=y.to.ch,oe=wt(y.from,y.to)==0,se=qn(x,E,oe),ue=jn(b,te,oe),he=y.text.length==1,xe=ve(y.text).length+(he?E:0);if(se)for(var De=0;De<se.length;++De){var Xe=se[De];if(Xe.to==null){var Ue=Sr(ue,Xe.marker);Ue?he&&(Xe.to=Ue.to==null?null:Ue.to+xe):Xe.to=E}}if(ue)for(var Ct=0;Ct<ue.length;++Ct){var Tt=ue[Ct];if(Tt.to!=null&&(Tt.to+=xe),Tt.from==null){var Yt=Sr(se,Tt.marker);Yt||(Tt.from=xe,he&&(se||(se=[])).push(Tt))}else Tt.from+=xe,he&&(se||(se=[])).push(Tt)}se&&(se=Vr(se)),ue&&ue!=se&&(ue=Vr(ue));var rn=[se];if(!he){var fn=y.text.length-2,on;if(fn>0&&se)for(var bn=0;bn<se.length;++bn)se[bn].to==null&&(on||(on=[])).push(new rr(se[bn].marker,null,null));for(var Tn=0;Tn<fn;++Tn)rn.push(on);rn.push(ue)}return rn}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(Ue){if(Ue.markedSpans)for(var Ct=0;Ct<Ue.markedSpans.length;++Ct){var Tt=Ue.markedSpans[Ct].marker;Tt.readOnly&&(!b||je(b,Tt)==-1)&&(b||(b=[])).push(Tt)}}),!b)return null;for(var E=[{from:y,to:x}],te=0;te<b.length;++te)for(var oe=b[te],se=oe.find(0),ue=0;ue<E.length;++ue){var he=E[ue];if(!(wt(he.to,se.from)<0||wt(he.from,se.to)>0)){var xe=[ue,1],De=wt(he.from,se.from),Xe=wt(he.to,se.to);(De<0||!oe.inclusiveLeft&&!De)&&xe.push({from:he.from,to:se.from}),(Xe>0||!oe.inclusiveRight&&!Xe)&&xe.push({from:se.to,to:he.to}),E.splice.apply(E,xe),ue+=xe.length-3}}return E}function kr(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 Br(a){return a.inclusiveLeft?-1:0}function zr(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(),te=wt(b.from,E.from)||Br(a)-Br(y);if(te)return-te;var oe=wt(b.to,E.to)||zr(a)-zr(y);return oe||y.id-a.id}function Fr(a,y){var x=nr&&a.markedSpans,b;if(x)for(var E=void 0,te=0;te<x.length;++te)E=x[te],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||ii(b,E.marker)<0)&&(b=E.marker);return b}function Rn(a){return Fr(a,!0)}function Bt(a){return Fr(a,!1)}function jt(a,y){var x=nr&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var te=x[E];te.marker.collapsed&&(te.from==null||te.from<y)&&(te.to==null||te.to>y)&&(!b||ii(b,te.marker)<0)&&(b=te.marker)}return b}function yn(a,y,x,b,E){var te=ot(a,y),oe=nr&&te.markedSpans;if(oe)for(var se=0;se<oe.length;++se){var ue=oe[se];if(ue.marker.collapsed){var he=ue.marker.find(0),xe=wt(he.from,x)||Br(ue.marker)-Br(E),De=wt(he.to,b)||zr(ue.marker)-zr(E);if(!(xe>=0&&De<=0||xe<=0&&De>=0)&&(xe<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?wt(he.to,x)>=0:wt(he.to,x)>0)||xe>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?wt(he.from,b)<=0:wt(he.from,b)<0)))return!0}}}function nn(a){for(var y;y=Rn(a);)a=y.find(-1,!0).line;return a}function En(a){for(var y;y=Bt(a);)a=y.find(1,!0).line;return a}function ir(a){for(var y,x;y=Bt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Zt(a,y){var x=ot(a,y),b=nn(x);return x==b?y:Me(b)}function Pt(a,y){if(y>a.lastLine())return y;var x=ot(a,y),b;if(!tn(a,x))return y;for(;b=Bt(x);)x=b.find(1,!0).line;return Me(x)+1}function tn(a,y){var x=nr&&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&&an(a,y,b))return!0}}}function an(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return an(a,b.line,Sr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,te=0;te<y.markedSpans.length;++te)if(E=y.markedSpans[te],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&an(a,y,E))return!0}function Ln(a){a=nn(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 te=x.parent;te;x=te,te=x.parent)for(var oe=0;oe<te.children.length;++oe){var se=te.children[oe];if(se==x)break;y+=se.height}return y}function or(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=Bt(b);){var te=x.find(0,!0);y-=b.text.length-te.from.ch,b=te.to.line,y+=b.text.length-te.to.ch}return y}function Vn(a){var y=a.display,x=a.doc;y.maxLine=ot(x,x.first),y.maxLineLength=or(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=or(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var vr=function(a,y,x){this.text=a,Wr(this,y),this.height=x?x(this):1};vr.prototype.lineNo=function(){return Me(this)},Ut(vr);function mr(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),kr(a),Wr(a,x);var E=b?b(a):1;E!=a.height&&Zn(a,E)}function wr(a){a.parent=null,kr(a)}var Hr={},Mr={};function Or(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Mr:Hr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function ei(a,y){var x=qe("span",null,null,Ie?"padding-right: .1px":null),b={pre:qe("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 te=E?y.rest[E-1]:y.line,oe=void 0;b.pos=0,b.addToken=Oi,In(a.display.measure)&&(oe=Ft(te,a.doc.direction))&&(b.addToken=vi(b.addToken,oe)),b.map=[];var se=y!=a.display.externalMeasured&&Me(te);ur(te,b,Wn(a,te,se)),te.styleClasses&&(te.styleClasses.bgClass&&(b.bgClass=Et(te.styleClasses.bgClass,b.bgClass||"")),te.styleClasses.textClass&&(b.textClass=Et(te.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(gr(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(Ie){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return qt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Et(b.pre.className,b.textClass||"")),b}function Li(a){var y=Oe("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,te,oe){if(y){var se=a.splitSpaces?xi(y,a.trailingSpace):y,ue=a.cm.state.specialChars,he=!1,xe;if(!ue.test(y))a.col+=y.length,xe=document.createTextNode(se),a.map.push(a.pos,a.pos+y.length,xe),ye&&be<9&&(he=!0),a.pos+=y.length;else{xe=document.createDocumentFragment();for(var De=0;;){ue.lastIndex=De;var Xe=ue.exec(y),Ue=Xe?Xe.index-De:y.length-De;if(Ue){var Ct=document.createTextNode(se.slice(De,De+Ue));ye&&be<9?xe.appendChild(Oe("span",[Ct])):xe.appendChild(Ct),a.map.push(a.pos,a.pos+Ue,Ct),a.col+=Ue,a.pos+=Ue}if(!Xe)break;De+=Ue+1;var Tt=void 0;if(Xe[0]==" "){var Yt=a.cm.options.tabSize,rn=Yt-a.col%Yt;Tt=xe.appendChild(Oe("span",Ce(rn),"cm-tab")),Tt.setAttribute("role","presentation"),Tt.setAttribute("cm-text"," "),a.col+=rn}else Xe[0]=="\r"||Xe[0]==`
|
|
`?(Tt=xe.appendChild(Oe("span",Xe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Tt.setAttribute("cm-text",Xe[0]),a.col+=1):(Tt=a.cm.options.specialCharPlaceholder(Xe[0]),Tt.setAttribute("cm-text",Xe[0]),ye&&be<9?xe.appendChild(Oe("span",[Tt])):xe.appendChild(Tt),a.col+=1);a.map.push(a.pos,a.pos+1,Tt),a.pos++}}if(a.trailingSpace=se.charCodeAt(y.length-1)==32,x||b||E||he||te||oe){var fn=x||"";b&&(fn+=b),E&&(fn+=E);var on=Oe("span",[xe],fn,te);if(oe)for(var bn in oe)oe.hasOwnProperty(bn)&&bn!="style"&&bn!="class"&&on.setAttribute(bn,oe[bn]);return a.content.appendChild(on)}a.content.appendChild(xe)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),b+=te,x=te==" "}return b}function vi(a,y){return function(x,b,E,te,oe,se,ue){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,xe=he+b.length;;){for(var De=void 0,Xe=0;Xe<y.length&&(De=y[Xe],!(De.to>he&&De.from<=he));Xe++);if(De.to>=xe)return a(x,b,E,te,oe,se,ue);a(x,b.slice(0,De.to-he),E,te,null,se,ue),te=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 ur(a,y,x){var b=a.markedSpans,E=a.text,te=0;if(!b){for(var oe=1;oe<x.length;oe+=2)y.addToken(y,E.slice(te,te=x[oe]),Or(x[oe+1],y.cm.options));return}for(var se=E.length,ue=0,he=1,xe="",De,Xe,Ue=0,Ct,Tt,Yt,rn,fn;;){if(Ue==ue){Ct=Tt=Yt=Xe="",fn=null,rn=null,Ue=1/0;for(var on=[],bn=void 0,Tn=0;Tn<b.length;++Tn){var Sn=b[Tn],Un=Sn.marker;if(Un.type=="bookmark"&&Sn.from==ue&&Un.widgetNode)on.push(Un);else if(Sn.from<=ue&&(Sn.to==null||Sn.to>ue||Un.collapsed&&Sn.to==ue&&Sn.from==ue)){if(Sn.to!=null&&Sn.to!=ue&&Ue>Sn.to&&(Ue=Sn.to,Tt=""),Un.className&&(Ct+=" "+Un.className),Un.css&&(Xe=(Xe?Xe+";":"")+Un.css),Un.startStyle&&Sn.from==ue&&(Yt+=" "+Un.startStyle),Un.endStyle&&Sn.to==Ue&&(bn||(bn=[])).push(Un.endStyle,Sn.to),Un.title&&((fn||(fn={})).title=Un.title),Un.attributes)for(var Ir in Un.attributes)(fn||(fn={}))[Ir]=Un.attributes[Ir];Un.collapsed&&(!rn||ii(rn.marker,Un)<0)&&(rn=Sn)}else Sn.from>ue&&Ue>Sn.from&&(Ue=Sn.from)}if(bn)for(var si=0;si<bn.length;si+=2)bn[si+1]==Ue&&(Tt+=" "+bn[si]);if(!rn||rn.from==ue)for(var jr=0;jr<on.length;++jr)Xi(y,0,on[jr]);if(rn&&(rn.from||0)==ue){if(Xi(y,(rn.to==null?se+1:rn.to)-ue,rn.marker,rn.from==null),rn.to==null)return;rn.to==ue&&(rn=!1)}}if(ue>=se)break;for(var Bi=Math.min(se,Ue);;){if(xe){var ki=ue+xe.length;if(!rn){var qr=ki>Bi?xe.slice(0,Bi-ue):xe;y.addToken(y,qr,De?De+Ct:Ct,Yt,ue+qr.length==Ue?Tt:"",Xe,fn)}if(ki>=Bi){xe=xe.slice(Bi-ue),ue=Bi;break}ue=ki,Yt=""}xe=E.slice(te,te=x[he++]),De=Or(x[he++],y.cm.options)}}}function to(a,y,x){this.line=y,this.rest=ir(y),this.size=this.rest?Me(ve(this.rest))-x+1:1,this.node=this.text=null,this.hidden=tn(a,y)}function ti(a,y,x){for(var b=[],E,te=y;te<x;te=E){var oe=new to(a.doc,ot(a.doc,te),te);E=te+oe.size,b.push(oe)}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 _r(a,y){var x=sn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Ni?E=Ni.delayedCallbacks:Ri?E=Ri:(E=Ri=[],setTimeout(Wi,0));for(var te=function(se){E.push(function(){return x[se].apply(null,b)})},oe=0;oe<x.length;++oe)te(oe)}}function Wi(){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 te=y.changes[E];te=="text"?lo(a,y):te=="gutter"?On(a,y,x,b):te=="class"?Dn(a,y):te=="widget"&&Pn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=Oe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),ye&&be<8&&(a.node.style.zIndex=2)),a.node}function Qr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=Zi(y);y.background=b.insertBefore(Oe("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,Dn(a,y)):x&&(y.text.className=x)}function Dn(a,y){Qr(a,y),y.line.wrapClass?Zi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function 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=Zi(y);y.gutterBackground=Oe("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 te=y.line.gutterMarkers;if(a.options.lineNumbers||te){var oe=Zi(y),se=y.gutter=Oe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(se),oe.insertBefore(se,y.text),y.line.gutterClass&&(se.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=se.appendChild(Oe("div",bt(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),te)for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var he=a.display.gutterSpecs[ue].className,xe=te.hasOwnProperty(he)&&te[he];xe&&se.appendChild(Oe("div",[xe],"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=at("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);dr(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),Dn(a,y),On(a,y,x,b),dr(a,y,b),y.node}function dr(a,y,x){if(Rr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Rr(a,y.rest[b],y,x,!1)}function Rr(a,y,x,b,E){if(y.widgets)for(var te=Zi(x),oe=0,se=y.widgets;oe<se.length;++oe){var ue=se[oe],he=Oe("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||he.setAttribute("cm-ignore-events","true"),Gi(ue,he,x,b),a.display.input.setUneditable(he),E&&ue.above?te.insertBefore(he,x.gutter||x.text):te.appendChild(he),_r(ue,"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(!_e(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,Oe("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function ui(a,y){for(var x=er(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 Hi(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Qi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Se(a.measure,Oe("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 vt-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 te=y.measure.heights=[];if(b){y.measure.width=E;for(var oe=y.text.firstChild.getClientRects(),se=0;se<oe.length-1;se++){var ue=oe[se],he=oe[se+1];Math.abs(ue.bottom-he.bottom)>2&&te.push((ue.bottom+he.top)/2-x.top)}}te.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(Me(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=nn(y);var x=Me(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 _i(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=Me(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 _i(a,y,x,b,E){y.before&&(x=-1);var te=x+(b||""),oe;return y.cache.hasOwnProperty(te)?oe=y.cache[te]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(ji(a,y.view,y.rect),y.hasHeights=!0),oe=wa(a,y,x,b),oe.bogus||(y.cache[te]=oe)),{left:oe.left,right:oe.right,top:E?oe.rtop:oe.top,bottom:E?oe.rbottom:oe.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,te,oe,se,ue,he=0;he<a.length;he+=3)if(se=a[he],ue=a[he+1],y<se?(E=0,te=1,oe="left"):y<ue?(E=y-se,te=E+1):(he==a.length-3||y==ue&&a[he+3]>y)&&(te=ue-se,E=te-1,y>=ue&&(oe="right")),E!=null){if(b=a[he+2],se==ue&&x==(b.insertLeft?"left":"right")&&(oe=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],oe="left";if(x=="right"&&E==ue-se)for(;he<a.length-3&&a[he+3]==a[he+4]&&!a[he+5].insertLeft;)b=a[(he+=3)+2],oe="right";break}return{node:b,start:E,end:te,collapse:oe,coverStart:se,coverEnd:ue}}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),te=E.node,oe=E.start,se=E.end,ue=E.collapse,he;if(te.nodeType==3){for(var xe=0;xe<4;xe++){for(;oe&&We(y.line.text.charAt(E.coverStart+oe));)--oe;for(;E.coverStart+se<E.coverEnd&&We(y.line.text.charAt(E.coverStart+se));)++se;if(ye&&be<9&&oe==0&&se==E.coverEnd-E.coverStart?he=te.parentNode.getBoundingClientRect():he=Va(Te(te,oe,se).getClientRects(),b),he.left||he.right||oe==0)break;se=oe,oe=oe-1,ue="right"}ye&&be<11&&(he=Ua(a.display.measure,he))}else{oe>0&&(ue=b="right");var De;a.options.lineWrapping&&(De=te.getClientRects()).length>1?he=De[b=="right"?De.length-1:0]:he=te.getBoundingClientRect()}if(ye&&be<9&&!oe&&(!he||!he.left&&!he.right)){var Xe=te.parentNode.getClientRects()[0];Xe?he={left:Xe.left,right:Xe.left+Ui(a.display),top:Xe.top,bottom:Xe.bottom}:he=ba}for(var Ue=he.top-y.rect.top,Ct=he.bottom-y.rect.top,Tt=(Ue+Ct)/2,Yt=y.view.measure.heights,rn=0;rn<Yt.length-1&&!(Tt<Yt[rn]);rn++);var fn=rn?Yt[rn-1]:0,on=Yt[rn],bn={left:(ue=="right"?he.right:he.left)-y.rect.left,right:(ue=="left"?he.left:he.right)-y.rect.left,top:fn,bottom:on};return!he.left&&!he.right&&(bn.bogus=!0),a.options.singleCursorHeightPerLine||(bn.rtop=Ue,bn.rbottom=Ct),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,Vt(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 Ee&&Be?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Ee&&Be?-(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 te=Jo(y);x.top+=te,x.bottom+=te}if(b=="line")return x;b||(b="local");var oe=Ln(y);if(b=="local"?oe+=Kr(a.display):oe-=a.display.viewOffset,b=="page"||b=="window"){var se=a.display.lineSpace.getBoundingClientRect();oe+=se.top+(b=="window"?0:Ca());var ue=se.left+(b=="window"?0:Xo());x.left+=ue,x.right+=ue}return x.top+=oe,x.bottom+=oe,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 te=a.display.sizer.getBoundingClientRect();b+=te.left,E+=te.top}var oe=a.display.lineSpace.getBoundingClientRect();return{left:b-oe.left,top:E-oe.top}}function Bo(a,y,x,b,E){return b||(b=ot(a.doc,y.line)),Po(a,b,ya(a,b,y.ch,E),x)}function wi(a,y,x,b,E,te){b=b||ot(a.doc,y.line),E||(E=uo(a,b));function oe(Ct,Tt){var Yt=_i(a,E,Ct,Tt?"right":"left",te);return Tt?Yt.left=Yt.right:Yt.right=Yt.left,Po(a,b,Yt,x)}var se=Ft(b,a.doc.direction),ue=y.ch,he=y.sticky;if(ue>=b.text.length?(ue=b.text.length,he="before"):ue<=0&&(ue=0,he="after"),!se)return oe(he=="before"?ue-1:ue,he=="before");function xe(Ct,Tt,Yt){var rn=se[Tt],fn=rn.level==1;return oe(Yt?Ct-1:Ct,fn!=Yt)}var De=Nt(se,ue,he),Xe=mt,Ue=xe(ue,De,he=="before");return Xe!=null&&(Ue.other=xe(ue,Xe,he!="before")),Ue}function ar(a,y){var x=0;y=kt(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=ot(a.doc,y.line),E=Ln(b)+Kr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function _n(a,y,x,b,E){var te=ze(a,y,x);return te.xRel=E,b&&(te.outside=b),te}function ci(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return _n(b.first,0,null,-1,-1);var E=Pe(b,x),te=b.first+b.size-1;if(E>te)return _n(b.first+b.size-1,ot(b,te).text.length,null,1,1);y<0&&(y=0);for(var oe=ot(b,E);;){var se=Vi(a,oe,E,y,x),ue=jt(oe,se.ch+(se.xRel>0||se.outside>0?1:0));if(!ue)return se;var he=ue.find(1);if(he.line==E)return he;oe=ot(b,E=he.line)}}function fi(a,y,x,b){b-=Jo(y);var E=y.text.length,te=yt(function(oe){return _i(a,x,oe-1).bottom<=b},E,0);return E=yt(function(oe){return _i(a,x,oe).top>b},te,E),{begin:te,end:E}}function Yr(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,_i(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-=Ln(y);var te=uo(a,y),oe=Jo(y),se=0,ue=y.text.length,he=!0,xe=Ft(y,a.doc.direction);if(xe){var De=(a.options.lineWrapping?ro:zi)(a,y,x,te,xe,b,E);he=De.level!=1,se=he?De.from:De.to-1,ue=he?De.to:De.from-1}var Xe=null,Ue=null,Ct=yt(function(Tn){var Sn=_i(a,te,Tn);return Sn.top+=oe,Sn.bottom+=oe,ni(Sn,b,E,!1)?(Sn.top<=E&&Sn.left<=b&&(Xe=Tn,Ue=Sn),!0):!1},se,ue),Tt,Yt,rn=!1;if(Ue){var fn=b-Ue.left<Ue.right-b,on=fn==he;Ct=Xe+(on?0:1),Yt=on?"after":"before",Tt=fn?Ue.left:Ue.right}else{!he&&(Ct==ue||Ct==se)&&Ct++,Yt=Ct==0?"after":Ct==y.text.length?"before":_i(a,te,Ct-(he?1:0)).bottom+oe<=E==he?"after":"before";var bn=wi(a,ze(x,Ct,Yt),"line",y,te);Tt=bn.left,rn=E<bn.top?-1:E>=bn.bottom?1:0}return Ct=xt(y.text,Ct,1),_n(x,Ct,Yt,rn,b-Tt)}function zi(a,y,x,b,E,te,oe){var se=yt(function(De){var Xe=E[De],Ue=Xe.level!=1;return ni(wi(a,ze(x,Ue?Xe.to:Xe.from,Ue?"before":"after"),"line",y,b),te,oe,!0)},0,E.length-1),ue=E[se];if(se>0){var he=ue.level!=1,xe=wi(a,ze(x,he?ue.from:ue.to,he?"after":"before"),"line",y,b);ni(xe,te,oe,!0)&&xe.top>oe&&(ue=E[se-1])}return ue}function ro(a,y,x,b,E,te,oe){var se=fi(a,y,b,oe),ue=se.begin,he=se.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var xe=null,De=null,Xe=0;Xe<E.length;Xe++){var Ue=E[Xe];if(!(Ue.from>=he||Ue.to<=ue)){var Ct=Ue.level!=1,Tt=_i(a,b,Ct?Math.min(he,Ue.to)-1:Math.max(ue,Ue.from)).right,Yt=Tt<te?te-Tt+1e9:Tt-te;(!xe||De>Yt)&&(xe=Ue,De=Yt)}}return xe||(xe=E[E.length-1]),xe.from<ue&&(xe={from:ue,to:xe.to,level:xe.level}),xe.to>he&&(xe={from:xe.from,to:he,level:xe.level}),xe}var Ti;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=Oe("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild(Oe("br"));Ti.appendChild(document.createTextNode("x"))}Se(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Vt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Oe("span","xxxxxxxxxx"),x=Oe("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,te=y.gutters.firstChild,oe=0;te;te=te.nextSibling,++oe){var se=a.display.gutterSpecs[oe].className;x[se]=te.offsetLeft+te.clientLeft+E,b[se]=te.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(tn(a.doc,E))return 0;var te=0;if(E.widgets)for(var oe=0;oe<E.widgets.length;oe++)E.widgets[oe].height&&(te+=E.widgets[oe].height);return x?te+(Math.ceil(E.text.length/b)||1)*y:te+y}}function Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&Zn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&er(y).getAttribute("cm-not-content")=="true")return null;var te,oe,se=E.lineSpace.getBoundingClientRect();try{te=y.clientX-se.left,oe=y.clientY-se.top}catch(De){return null}var ue=ci(a,te,oe),he;if(b&&ue.xRel>0&&(he=ot(a.doc,ue.line).text).length==ue.ch){var xe=pe(he,he.length,a.options.tabSize)-he.length;ue=ze(ue.line,Math.max(0,Math.round((te-Qi(a.display).left)/Ui(a.display))-xe))}return ue}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)nr&&Zt(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)nr&&Pt(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 te=ka(a,x,x+b,1);te?(E.view=E.view.slice(te.index),E.viewFrom=te.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var oe=ka(a,y,y,-1);oe?(E.view=E.view.slice(0,oe.index),E.viewTo=oe.lineN):fo(a)}else{var se=ka(a,y,y,-1),ue=ka(a,x,x+b,1);se&&ue?(E.view=E.view.slice(0,se.index).concat(ti(a,se.lineN,ue.lineN)).concat(E.view.slice(ue.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 te=b.view[So(a,y)];if(te.node!=null){var oe=te.changes||(te.changes=[]);je(oe,x)==-1&&oe.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),te,oe=a.display.view;if(!nr||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var se=a.display.viewFrom,ue=0;ue<E;ue++)se+=oe[ue].size;if(se!=y){if(b>0){if(E==oe.length-1)return null;te=se+oe[E].size-y,E++}else te=se-y;y+=te,x+=te}for(;Zt(a.doc,x)!=x;){if(E==(b<0?0:oe.length-1))return null;x+=b*oe[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(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(),te=b.selection=document.createDocumentFragment(),oe=0;oe<x.sel.ranges.length;oe++)if(!(!y&&oe==x.sel.primIndex)){var se=x.sel.ranges[oe];if(!(se.from().line>=a.display.viewTo||se.to().line<a.display.viewFrom)){var ue=se.empty();(ue||a.options.showCursorWhenSelecting)&&ks(a,se.head,E),ue||_l(a,se,te)}}return b}function ks(a,y,x){var b=wi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Oe("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 te=x.appendChild(Oe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=b.other.left+"px",te.style.top=b.other.top+"px",te.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function _l(a,y,x){var b=a.display,E=a.doc,te=document.createDocumentFragment(),oe=Qi(a.display),se=oe.left,ue=Math.max(b.sizerWidth,qi(a)-b.sizer.offsetLeft)-oe.right,he=E.direction=="ltr";function xe(on,bn,Tn,Sn){bn<0&&(bn=0),bn=Math.round(bn),Sn=Math.round(Sn),te.appendChild(Oe("div",null,"CodeMirror-selected","position: absolute; left: "+on+`px;
|
|
top: `+bn+"px; width: "+(Tn==null?ue-on:Tn)+`px;
|
|
height: `+(Sn-bn)+"px"))}function De(on,bn,Tn){var Sn=ot(E,on),Un=Sn.text.length,Ir,si;function jr(qr,Ei){return Bo(a,ze(on,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=Ft(Sn,E.direction);return ht(ki,bn||0,Tn==null?Un:Tn,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=Tn==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?se:($r?Ur:Di).left,Mo=bs?ue:($r?Di:Ur).right;xe(oo,Ur.top,Mo-oo,Ur.bottom)}else{var To,bi,Uo,xs;$r?(To=he&&Vo&&pi?se:Ur.left,bi=he?ue:Bi(qr,hi,"before"),Uo=he?se:Bi(Ei,hi,"after"),xs=he&&bo&&eo?ue:Di.right):(To=he?Bi(qr,hi,"before"):se,bi=!he&&Vo&&pi?ue:Ur.right,Uo=!he&&bo&&eo?se:Di.left,xs=he?Bi(Ei,hi,"after"):ue),xe(To,Ur.top,bi-To,Ur.bottom),Ur.bottom<Di.top&&xe(se,Ur.bottom,null,Di.top),xe(Uo,Di.top,xs-Uo,Di.bottom)}(!Ir||Ea(Ur,Ir)<0)&&(Ir=Ur),Ea(Di,Ir)<0&&(Ir=Di),(!si||Ea(Ur,si)<0)&&(si=Ur),Ea(Di,si)<0&&(si=Di)}),{start:Ir,end:si}}var Xe=y.from(),Ue=y.to();if(Xe.line==Ue.line)De(Xe.line,Xe.ch,Ue.ch);else{var Ct=ot(E,Xe.line),Tt=ot(E,Ue.line),Yt=nn(Ct)==nn(Tt),rn=De(Xe.line,Xe.ch,Yt?Ct.text.length+1:null).end,fn=De(Ue.line,Yt?0:null,Ue.ch).start;Yt&&(rn.top<fn.top-2?(xe(rn.right,rn.top,null,rn.bottom),xe(se,fn.top,fn.left,fn.bottom)):xe(rn.right,rn.top,fn.left-rn.right,rn.bottom)),rn.bottom<fn.top&&xe(se,rn.bottom,null,fn.top)}x.appendChild(te)}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||(qt(a,"focus",a,y),a.state.focused=!0,Fe(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Ie&&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&&(qt(a,"blur",a,y),a.state.focused=!1,st(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],te=a.options.lineWrapping,oe=void 0,se=0;if(!E.hidden){if(ye&&be<8){var ue=E.node.offsetTop+E.node.offsetHeight;oe=ue-x,x=ue}else{var he=E.node.getBoundingClientRect();oe=he.bottom-he.top,!te&&E.text.firstChild&&(se=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var xe=E.line.height-oe;if((xe>.005||xe<-.005)&&(Zn(E.line,oe),Ls(E.line),E.rest))for(var De=0;De<E.rest.length;De++)Ls(E.rest[De]);if(se>a.display.sizerWidth){var Xe=Math.ceil(se/Ui(a.display));Xe>a.display.maxLineLength&&(a.display.maxLineLength=Xe,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,te=Pe(y,b),oe=Pe(y,E);if(x&&x.ensure){var se=x.ensure.from.line,ue=x.ensure.to.line;se<te?(te=se,oe=Pe(y,Ln(ot(y,se))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=oe&&(te=Pe(y,Ln(ot(y,ue))-a.wrapper.clientHeight),oe=ue)}return{from:te,to:Math.max(oe,te+1)}}function zl(a,y){if(!it(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!lt){var te=Oe("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(te),te.scrollIntoView(E),a.display.lineSpace.removeChild(te)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?ze(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?ze(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var oe=!1,se=wi(a,y),ue=!x||x==y?se:wi(a,x);E={left:Math.min(se.left,ue.left),top:Math.min(se.top,ue.top)-b,right:Math.max(se.left,ue.left),bottom:Math.max(se.bottom,ue.bottom)+b};var he=Qa(a,E),xe=a.doc.scrollTop,De=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-xe)>1&&(oe=!0)),he.scrollLeft!=null&&(ko(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-De)>1&&(oe=!0)),!oe)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,te=no(a),oe={};y.bottom-y.top>te&&(y.bottom=y.top+te);var se=a.doc.height+Hi(x),ue=y.top<b,he=y.bottom>se-b;if(y.top<E)oe.scrollTop=ue?0:y.top;else if(y.bottom>E+te){var xe=Math.min(y.top,(he?se:y.bottom)-te);xe!=E&&(oe.scrollTop=xe)}var De=a.options.fixedGutter?0:x.gutters.offsetWidth,Xe=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-De,Ue=qi(a)-x.gutters.offsetWidth,Ct=y.right-y.left>Ue;return Ct&&(y.right=y.left+Ue),y.left<10?oe.scrollLeft=0:y.left<Xe?oe.scrollLeft=Math.max(0,y.left+De-(Ct?0:10)):y.right>Ue+Xe-3&&(oe.scrollLeft=y.right+(Ct?0:10)-Ue),oe}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=ar(a,y.from),b=ar(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||(le||es(a,{top:y}),Ts(a,y,!0),le&&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+Hi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Mi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var Eo=function(a,y,x){this.cm=x;var b=this.vert=Oe("div",[Oe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Oe("div",[Oe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Lt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Lt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ye&&be<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 te=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+te)+"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=Ae&&!me?"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(),te=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);te!=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&&st(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),Lt(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&&Fe(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 te=0;te<y.length;te++)Jl(y[te]);for(var oe=0;oe<y.length;oe++)Ql(y[oe])}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==ke();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=Zl(y,kt(b,a.scrollToPos.from),kt(b,a.scrollToPos.to),a.scrollToPos.margin);zl(y,E)}var te=a.maybeHiddenMarkers,oe=a.maybeUnhiddenMarkers;if(te)for(var se=0;se<te.length;++se)te[se].lines.length||qt(te[se],"hide");if(oe)for(var ue=0;ue<oe.length;++ue)oe[ue].lines.length&&qt(oe[ue],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&qt(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,gt(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(te){if(b.line>=a.display.viewFrom){var oe=te.styles,se=te.text.length>a.options.maxHighlightLength?zn(y.mode,b.state):null,ue=xn(a,te,b,!0);se&&(b.state=se),te.styles=ue.styles;var he=te.styleClasses,xe=ue.classes;xe?te.styleClasses=xe:he&&(te.styleClasses=null);for(var De=!oe||oe.length!=te.styles.length||he!=xe&&(!he||!xe||he.bgClass!=xe.bgClass||he.textClass!=xe.textClass),Xe=0;!De&&Xe<oe.length;++Xe)De=oe[Xe]!=te.styles[Xe];De&&E.push(b.line),te.stateAfter=b.save(),b.nextLine()}else te.text.length<=a.options.maxHighlightLength&&dn(a,te.text,b),te.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 te=0;te<E.length;te++)ho(a,E[te],"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){Wt(a,y)&&this.events.push(arguments)},Ta.prototype.finish=function(){for(var a=0;a<this.events.length;a++)qt.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=ke();if(!y||!_e(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&_e(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==ke())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&_e(document.body,a.anchorNode)&&_e(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,te=Math.max(y.visible.from-a.options.viewportMargin,b.first),oe=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<te&&te-x.viewFrom<20&&(te=Math.max(b.first,x.viewFrom)),x.viewTo>oe&&x.viewTo-oe<20&&(oe=Math.min(E,x.viewTo)),nr&&(te=Zt(a.doc,te),oe=Pt(a.doc,oe));var se=te!=x.viewFrom||oe!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,te,oe),x.viewOffset=Ln(ot(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cs(a);if(!se&&ue==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return ue>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),Vt(x.cursorDiv),Vt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,se&&(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+Hi(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,te=b.lineDiv,oe=te.firstChild;function se(Ct){var Tt=Ct.nextSibling;return Ie&&Ae&&a.display.currentWheelTarget==Ct?Ct.style.display="none":Ct.parentNode.removeChild(Ct),Tt}for(var ue=b.view,he=b.viewFrom,xe=0;xe<ue.length;xe++){var De=ue[xe];if(!De.hidden)if(!De.node||De.node.parentNode!=te){var Xe=Nn(a,De,he,x);te.insertBefore(Xe,oe)}else{for(;oe!=De.node;)oe=se(oe);var Ue=E&&y!=null&&y<=he&&De.lineNumber;De.changes&&(je(De.changes,"gutter")>-1&&(Ue=!1),so(a,De,he,x)),Ue&&(Vt(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(bt(a.options,he)))),oe=De.node.nextSibling}he+=De.size}for(;oe;)oe=se(oe)}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,te=b+"px",oe=0;oe<x.length;oe++)if(!x[oe].hidden){a.options.fixedGutter&&(x[oe].gutter&&(x[oe].gutter.style.left=te),x[oe].gutterBackground&&(x[oe].gutterBackground.style.left=te));var se=x[oe].alignable;if(se)for(var ue=0;ue<se.length;ue++)se[ue].style.left=te}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Is(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=bt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Oe("div",[Oe("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=E.firstChild.offsetWidth,oe=E.offsetWidth-te;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(te,b.lineGutter.offsetWidth-oe)+1,b.lineNumWidth=b.lineNumInnerWidth+oe,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 te=a[E],oe=null;if(typeof te!="string"&&(oe=te.style,te=te.className),te=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:te,style:oe})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Fs(a){var y=a.gutters,x=a.gutterSpecs;Vt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],te=E.className,oe=E.style,se=y.appendChild(Oe("div",null,"CodeMirror-gutter "+te));oe&&(se.style.cssText=oe),te=="CodeMirror-linenumbers"&&(a.lineGutter=se,se.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=Oe("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Oe("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=qe("div",null,"CodeMirror-code"),E.selectionDiv=Oe("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Oe("div",null,"CodeMirror-cursors"),E.measure=Oe("div",null,"CodeMirror-measure"),E.lineMeasure=Oe("div",null,"CodeMirror-measure"),E.lineSpace=qe("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=qe("div",[E.lineSpace],"CodeMirror-lines");E.mover=Oe("div",[te],null,"position: relative"),E.sizer=Oe("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Oe("div",null,null,"position: absolute; height: "+vt+"px; width: 1px;"),E.gutters=Oe("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Oe("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Oe("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),ye&&be<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Ie&&!(le&&Re)&&(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;ye?Ii=-.53:le?Ii=15:Ee?Ii=-.7:nt&&(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 Ws(a,y){var x=Os(y),b=x.x,E=x.y,te=a.display,oe=te.scroller,se=oe.scrollWidth>oe.clientWidth,ue=oe.scrollHeight>oe.clientHeight;if(b&&se||E&&ue){if(E&&Ae&&Ie){e:for(var he=y.target,xe=te.view;he!=oe;he=he.parentNode)for(var De=0;De<xe.length;De++)if(xe[De].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!le&&!de&&Ii!=null){E&&ue&&$o(a,Math.max(0,oe.scrollTop+E*Ii)),ko(a,Math.max(0,oe.scrollLeft+b*Ii)),(!E||E&&ue)&&un(y),te.wheelStartX=null;return}if(E&&Ii!=null){var Xe=E*Ii,Ue=a.doc.scrollTop,Ct=Ue+te.wrapper.clientHeight;Xe<0?Ue=Math.max(0,Ue+Xe-50):Ct=Math.min(a.doc.height,Ct+Xe+50),es(a,{top:Ue,bottom:Ct})}Aa<20&&(te.wheelStartX==null?(te.wheelStartX=oe.scrollLeft,te.wheelStartY=oe.scrollTop,te.wheelDX=b,te.wheelDY=E,setTimeout(function(){if(te.wheelStartX!=null){var Tt=oe.scrollLeft-te.wheelStartX,Yt=oe.scrollTop-te.wheelStartY,rn=Yt&&te.wheelDY&&Yt/te.wheelDY||Tt&&te.wheelDX&&Tt/te.wheelDX;te.wheelStartX=te.wheelStartY=null,rn&&(Ii=(Ii*Aa+rn)/(Aa+1),++Aa)}},200)):(te.wheelDX+=b,te.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(!Kt(x.anchor,b.anchor)||!Kt(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 Cr($t(this.ranges[y].anchor),$t(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(wt(y,b.from())>=0&&wt(a,b.to())<=0)return x}return-1};var Cr=function(a,y){this.anchor=a,this.head=y};Cr.prototype.from=function(){return It(this.anchor,this.head)},Cr.prototype.to=function(){return cn(this.anchor,this.head)},Cr.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(Xe,Ue){return wt(Xe.from(),Ue.from())}),x=je(y,E);for(var te=1;te<y.length;te++){var oe=y[te],se=y[te-1],ue=wt(se.to(),oe.from());if(b&&!oe.empty()?ue>0:ue>=0){var he=It(se.from(),oe.from()),xe=cn(se.to(),oe.to()),De=se.empty()?oe.from()==oe.head:se.from()==se.head;te<=x&&--x,y.splice(--te,2,new Cr(De?xe:he,De?he:xe))}}return new Fi(y,x)}function po(a,y){return new Fi([new Cr(a,y||a)],0)}function vo(a){return a.text?ze(a.from.line+a.text.length-1,ve(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(wt(a,y.from)<0)return a;if(wt(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),ze(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 Cr(Hs(E.anchor,y),Hs(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function _s(a,y,x){return a.line==y.line?ze(x.line,a.ch-y.ch+x.ch):ze(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=ze(a.first,0),te=E,oe=0;oe<y.length;oe++){var se=y[oe],ue=_s(se.from,E,te),he=_s(vo(se),E,te);if(E=se.to,te=he,x=="around"){var xe=a.sel.ranges[oe],De=wt(xe.head,xe.anchor)<0;b[oe]=new Cr(De?he:ue,De?ue:he)}else b[oe]=new Cr(ue,ue)}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 te(fn,on,bn){mr(fn,on,bn,b),_r(fn,"change",fn,y)}function oe(fn,on){for(var bn=[],Tn=fn;Tn<on;++Tn)bn.push(new vr(he[Tn],E(Tn),b));return bn}var se=y.from,ue=y.to,he=y.text,xe=ot(a,se.line),De=ot(a,ue.line),Xe=ve(he),Ue=E(he.length-1),Ct=ue.line-se.line;if(y.full)a.insert(0,oe(0,he.length)),a.remove(he.length,a.size-he.length);else if(zs(a,y)){var Tt=oe(0,he.length-1);te(De,De.text,Ue),Ct&&a.remove(se.line,Ct),Tt.length&&a.insert(se.line,Tt)}else if(xe==De)if(he.length==1)te(xe,xe.text.slice(0,se.ch)+Xe+xe.text.slice(ue.ch),Ue);else{var Yt=oe(1,he.length-1);Yt.push(new vr(Xe+xe.text.slice(ue.ch),Ue,b)),te(xe,xe.text.slice(0,se.ch)+he[0],E(0)),a.insert(se.line+1,Yt)}else if(he.length==1)te(xe,xe.text.slice(0,se.ch)+he[0]+De.text.slice(ue.ch),E(0)),a.remove(se.line+1,Ct);else{te(xe,xe.text.slice(0,se.ch)+he[0],E(0)),te(De,Xe+De.text.slice(ue.ch),Ue);var rn=oe(1,he.length-1);Ct>1&&a.remove(se.line+1,Ct-1),a.insert(se.line+1,rn)}_r(a,"change",a,y)}function mo(a,y,x){function b(E,te,oe){if(E.linked)for(var se=0;se<E.linked.length;++se){var ue=E.linked[se];if(ue.doc!=te){var he=oe&&ue.sharedHist;x&&!he||(y(ue.doc,he),b(ue.doc,E,he))}}}b(a,null,!0)}function Zs(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"?Fe:st)(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:$t(y.from),to:vo(y),text:Xt(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 te=+new Date,oe,se;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>te-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(oe=su(E,E.lastOp==b)))se=ve(oe.changes),wt(y.from,y.to)==0&&wt(y.from,se.to)==0?se.to=vo(y):oe.changes.push(ss(a,y));else{var ue=ve(E.done);for((!ue||!ue.ranges)&&Ba(a.sel,E.done),oe={changes:[ss(a,y)],generation:E.generation},E.done.push(oe);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=te,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,se||qt(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,te=b&&b.origin;x==E.lastSelOp||te&&E.lastSelOrigin==te&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==te||lu(a,te,ve(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=te,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],te=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(oe){oe.markedSpans&&((E||(E=y["spans_"+a.id]={}))[te]=oe.markedSpans),++te})}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=Pr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var te=x[E],oe=b[E];if(te&&oe)e:for(var se=0;se<oe.length;++se){for(var ue=oe[se],he=0;he<te.length;++he)if(te[he].marker==ue.marker)continue e;te.push(ue)}else oe&&(x[E]=oe)}return x}function Fo(a,y,x){for(var b=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){b.push(x?Fi.prototype.deepCopy.call(te):te);continue}var oe=te.changes,se=[];b.push({changes:se});for(var ue=0;ue<oe.length;++ue){var he=oe[ue],xe=void 0;if(se.push({from:he.from,to:he.to,text:he.text}),y)for(var De in he)(xe=De.match(/^spans_(\d+)$/))&&je(y,Number(xe[1]))>-1&&(ve(se)[De]=he[De],delete he[De])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var te=wt(y,E)<0;te!=wt(x,E)<0?(E=y,y=x):te!=wt(y,x)<0&&(y=x)}return new Cr(E,y)}else return new Cr(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),te=0;te<a.sel.ranges.length;te++)b[te]=ls(a.sel.ranges[te],y[te],null,E);var oe=Ki(a.cm,b,a.sel.primIndex);di(a,oe,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 te=0;te<E.length;te++)this.ranges[te]=new Cr(kt(a,E[te].anchor),kt(a,E[te].head))},origin:x&&x.origin};return qt(a,"beforeSelectionChange",a,b),a.cm&&qt(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){(Wt(a,"beforeSelectionChange")||a.cm&&Wt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(wt(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,ln(a.cm)),_r(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,te=0;te<y.ranges.length;te++){var oe=y.ranges[te],se=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ue=Ia(a,oe.anchor,se&&se.anchor,x,b),he=Ia(a,oe.head,se&&se.head,x,b);(E||ue!=oe.anchor||he!=oe.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new Cr(ue,he))}return E?Ki(a.cm,E,y.primIndex):y}function Oo(a,y,x,b,E){var te=ot(a,y.line);if(te.markedSpans)for(var oe=0;oe<te.markedSpans.length;++oe){var se=te.markedSpans[oe],ue=se.marker,he="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,xe="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((se.from==null||(he?se.from<=y.ch:se.from<y.ch))&&(se.to==null||(xe?se.to>=y.ch:se.to>y.ch))){if(E&&(qt(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(te.markedSpans){--oe;continue}else break;if(!ue.atomic)continue;if(x){var De=ue.find(b<0?1:-1),Xe=void 0;if((b<0?xe:he)&&(De=el(a,De,-b,De&&De.line==y.line?te:null)),De&&De.line==y.line&&(Xe=wt(De,x))&&(b<0?Xe<0:Xe>0))return Oo(a,De,y,b,E)}var Ue=ue.find(b<0?-1:1);return(b<0?he:xe)&&(Ue=el(a,Ue,b,Ue.line==y.line?te:null)),Ue?Oo(a,Ue,y,b,E):null}}return y}function Ia(a,y,x,b,E){var te=b||1,oe=Oo(a,y,x,te,E)||!E&&Oo(a,y,x,te,!0)||Oo(a,y,x,-te,E)||!E&&Oo(a,y,x,-te,!0);return oe||(a.cantEdit=!0,ze(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?kt(a,ze(y.line-1)):null:x>0&&y.ch==(b||ot(a,y.line)).text.length?y.line<a.first+a.size-1?ze(y.line+1,0):null:new ze(y.line,y.ch+x)}function tl(a){a.setSelection(ze(a.firstLine(),0),ze(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,te,oe,se){E&&(b.from=kt(a,E)),te&&(b.to=kt(a,te)),oe&&(b.text=oe),se!==void 0&&(b.origin=se)}),qt(a,"beforeChange",a,b),a.cm&&qt(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 Wo(a,y,x){if(a.cm){if(!a.cm.curOp)return oi(a.cm,Wo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Wt(a,"beforeChange")||a.cm&&Wt(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=xr&&!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]==""&&wt(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,Pr(a,y));var b=[];mo(a,function(E,te){!te&&je(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Pr(E,y))})}}function Fa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,te,oe=a.sel,se=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,he=0;he<se.length&&(te=se[he],!(x?te.ranges&&!te.equals(a.sel):!te.ranges));he++);if(he!=se.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=se.pop(),te.ranges){if(Ba(te,ue),x&&!te.equals(a.sel)){di(a,te,{clearRedo:!1});return}oe=te}else if(b){se.push(te);return}else break;var xe=[];Ba(oe,ue),ue.push({changes:xe,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var De=Wt(a,"beforeChange")||a.cm&&Wt(a.cm,"beforeChange"),Xe=function(Tt){var Yt=te.changes[Tt];if(Yt.origin=y,De&&!nl(a,Yt,!1))return se.length=0,{};xe.push(ss(a,Yt));var rn=Tt?is(a,Yt):ve(se);oa(a,Yt,rn,Ks(a,Yt)),!Tt&&a.cm&&a.cm.scrollIntoView({from:Yt.from,to:vo(Yt)});var fn=[];mo(a,function(on,bn){!bn&&je(fn,on.history)==-1&&(sl(on.history,Yt),fn.push(on.history)),oa(on,Yt,null,Ks(on,Yt))})},Ue=te.changes.length-1;Ue>=0;--Ue){var Ct=Xe(Ue);if(Ct)return Ct.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Fi(Le(a.sel.ranges,function(E){return new Cr(ze(E.anchor.line+y,E.anchor.ch),ze(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:ze(a.first,0),to:ze(y.to.line+E,y.to.ch),text:[ve(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:ze(te,ot(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Xt(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,ze(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,x){var b=a.doc,E=a.display,te=y.from,oe=y.to,se=!1,ue=te.line;a.options.lineWrapping||(ue=Me(nn(ot(b,te.line))),b.iter(ue,oe.line+1,function(Ue){if(Ue==E.maxLine)return se=!0,!0})),b.sel.contains(y.from,y.to)>-1&&ln(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ue,te.line+y.text.length,function(Ue){var Ct=or(Ue);Ct>E.maxLineLength&&(E.maxLine=Ue,E.maxLineLength=Ct,E.maxLineChanged=!0,se=!1)}),se&&(a.curOp.updateMaxLine=!0)),Dr(b,te.line),na(a,400);var he=y.text.length-(oe.line-te.line)-1;y.full?Ci(a):te.line==oe.line&&y.text.length==1&&!zs(a.doc,y)?ho(a,te.line,"text"):Ci(a,te.line,oe.line+1,he);var xe=Wt(a,"changes"),De=Wt(a,"change");if(De||xe){var Xe={from:te,to:oe,text:y.text,removed:y.removed,origin:y.origin};De&&_r(a,"change",a,Xe),xe&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Xe)}a.display.selForContextMenu=null}function Ho(a,y,x,b,E){var te;b||(b=x),wt(b,x)<0&&(te=[b,x],x=te[0],b=te[1]),typeof y=="string"&&(y=a.splitLines(y)),Wo(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 te=a[E],oe=!0;if(te.ranges){te.copied||(te=a[E]=te.deepCopy(),te.copied=!0);for(var se=0;se<te.ranges.length;se++)ol(te.ranges[se].anchor,y,x,b),ol(te.ranges[se].head,y,x,b);continue}for(var ue=0;ue<te.changes.length;++ue){var he=te.changes[ue];if(x<he.from.line)he.from=ze(he.from.line+b,he.from.ch),he.to=ze(he.to.line+b,he.to.ch);else if(y<=he.to.line){oe=!1;break}}oe||(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,te=y;return typeof y=="number"?te=ot(a,Jt(a,y)):E=Me(y),E==null?null:(b(te,E)&&a.cm&&ho(a.cm,E,x),te)}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,wr(E),_r(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 te=Math.min(y,E-a),oe=b.height;if(b.removeInner(a,te),this.height-=oe-b.height,E==te&&(this.children.splice(x--,1),b.parent=null),(y-=te)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var se=[];this.collapse(se),this.children=[new sa(se)],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],te=E.chunkSize();if(a<=te){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var oe=E.lines.length%25+25,se=oe;se<E.lines.length;){var ue=new sa(E.lines.slice(se,se+=25));E.height-=ue.height,this.children.splice(++b,0,ue),ue.parent=this}E.lines=E.lines.slice(0,oe),this.maybeSpill()}break}a-=te}},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=je(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],te=E.chunkSize();if(a<te){var oe=Math.min(y,te-a);if(E.iterN(a,oe,x))return!0;if((y-=oe)==0)break;a=0}else a-=te}}};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=Me(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 te=gi(this);Zn(x,Math.max(0,x.height-te)),a&&(Pi(a,function(){ll(a,x,-te),ho(a,b,"widget")}),_r(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&&(tn(this.doc,b)||Zn(b,b.height+E),x&&Pi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),_r(x,"lineWidgetChanged",x,a,Me(b))}))},Ut(ua);function ll(a,y,x){Ln(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),te=a.cm;return te&&E.noHScroll&&(te.display.alignWidgets=!0),aa(a,y,"widget",function(oe){var se=oe.widgets||(oe.widgets=[]);if(E.insertAt==null?se.push(E):se.splice(Math.min(se.length-1,Math.max(0,E.insertAt)),0,E),E.line=oe,te&&!tn(a,oe)){var ue=Ln(oe)<a.scrollTop;Zn(oe,oe.height+gi(E)),ue&&qa(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&_r(te,"lineWidgetAdded",te,E,typeof y=="number"?y:Me(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),Wt(this,"clear")){var x=this.find();x&&_r(this,"clear",x.from,x.to)}for(var b=null,E=null,te=0;te<this.lines.length;++te){var oe=this.lines[te],se=Sr(oe.markedSpans,this);a&&!this.collapsed?ho(a,Me(oe),"text"):a&&(se.to!=null&&(E=Me(oe)),se.from!=null&&(b=Me(oe))),oe.markedSpans=Lr(oe.markedSpans,se),se.from==null&&this.collapsed&&!tn(this.doc,oe)&&a&&Zn(oe,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var he=nn(this.lines[ue]),xe=or(he);xe>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=xe,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&&_r(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 te=this.lines[E],oe=Sr(te.markedSpans,this);if(oe.from!=null&&(x=ze(y?te:Me(te),oe.from),a==-1))return x;if(oe.to!=null&&(b=ze(y?te:Me(te),oe.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,te=Me(y.line),oe=$i(b,te);if(oe&&(Ko(oe),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!tn(x.doc,E)&&x.height!=null){var se=x.height;x.height=null;var ue=gi(x)-se;ue&&Zn(E,E.height+ue)}_r(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||je(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(je(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Ut(go);function _o(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,_o)(a,y,x,b,E);var te=new go(a,E),oe=wt(y,x);if(b&&dt(b,te,!1),oe>0||oe==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=qe("span",[te.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(yn(a,y.line,y,x,te)||y.line!=x.line&&yn(a,x.line,y,x,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");pr()}te.addToHistory&&Vs(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var se=y.line,ue=a.cm,he;if(a.iter(se,x.line+1,function(De){ue&&te.collapsed&&!ue.options.lineWrapping&&nn(De)==ue.display.maxLine&&(he=!0),te.collapsed&&se!=y.line&&Zn(De,0),fr(De,new rr(te,se==y.line?y.ch:null,se==x.line?x.ch:null)),++se}),te.collapsed&&a.iter(y.line,x.line+1,function(De){tn(a,De)&&Zn(De,0)}),te.clearOnEnter&&Lt(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(Nr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),te.collapsed&&(te.id=++ul,te.atomic=!0),ue){if(he&&(ue.curOp.updateMaxLine=!0),te.collapsed)Ci(ue,y.line,x.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var xe=y.line;xe<=x.line;xe++)ho(ue,xe,"text");te.atomic&&qs(ue.doc),_r(ue,"markerAdded",ue,te)}return te}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();_r(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Ut(ca);function vu(a,y,x,b,E){b=dt(b),b.shared=!1;var te=[_o(a,y,x,b,E)],oe=te[0],se=b.widgetNode;return mo(a,function(ue){se&&(b.widgetNode=se.cloneNode(!0)),te.push(_o(ue,kt(ue,y),kt(ue,x),b,E));for(var he=0;he<ue.linked.length;++he)if(ue.linked[he].isParent)return;oe=ve(te)}),new ca(te,oe)}function cl(a){return a.findMarks(ze(a.first,0),a.clipPos(ze(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(),te=a.clipPos(E.from),oe=a.clipPos(E.to);if(wt(te,oe)){var se=_o(a,te,oe,b.primary,b.primary.type);b.markers.push(se),se.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],te=[E.primary.doc];mo(E.primary.doc,function(ue){return te.push(ue)});for(var oe=0;oe<E.markers.length;oe++){var se=E.markers[oe];je(te,se.doc)==-1&&(se.parent=null,E.markers.splice(oe--,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 vr("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var te=ze(x,0);this.sel=po(te),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:te,to:te,text:a}),di(this,po(te),we)};Si.prototype=ee(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=ze(this.first,0),x=this.first+this.size-1;Wo(this,{from:y,to:ze(x,ot(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=kt(this,y),x=x?kt(this,x):y,Ho(this,a,y,x,b)},getRange:function(a,y,x){var b=Xt(this,kt(this,a),kt(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(Mt(this,a))return ot(this,a)},getLineNumber:function(a){return Me(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=ot(this,a)),nn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return kt(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,kt(this,typeof a=="number"?ze(a,y||0):a),null,x)}),setSelection:ai(function(a,y,x){Xs(this,kt(this,a),kt(this,y||a),x)}),extendSelection:ai(function(a,y,x){Na(this,kt(this,a),y&&kt(this,y),x)}),extendSelections:ai(function(a,y){Ys(this,Qt(this,a),y)}),extendSelectionsBy:ai(function(a,y){var x=Le(this.sel.ranges,a);Ys(this,Qt(this,x),y)}),setSelections:ai(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Cr(kt(this,a[E].anchor),kt(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 Cr(kt(this,a),kt(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=Xt(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=Xt(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,te=0;te<E.ranges.length;te++){var oe=E.ranges[te];b[te]={from:oe.from(),to:oe.to(),text:this.splitLines(a[te]),origin:x}}for(var se=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)Wo(this,b[ue]);se?Js(this,se):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&&ne(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,ne(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Mt(this,a)||(y=a,a=ot(this,a),!a))return null}else if(y=Me(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(at(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",te=b[E];if(te)if(x==null)b[E]=null;else{var oe=te.match(at(x));if(!oe)return!1;var se=oe.index+oe[0].length;b[E]=te.slice(0,oe.index)+(!oe.index||se==te.length?"":" ")+te.slice(se)||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 _o(this,kt(this,a),kt(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=kt(this,a),_o(this,a,a,x,"bookmark")},findMarksAt:function(a){a=kt(this,a);var y=[],x=ot(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=kt(this,a),y=kt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(te){var oe=te.markedSpans;if(oe)for(var se=0;se<oe.length;se++){var ue=oe[se];!(ue.to!=null&&E==a.line&&a.ch>=ue.to||ue.from==null&&E!=a.line||ue.from!=null&&E==y.line&&ue.from>=y.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.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 te=E.text.length+b;if(te>a)return y=a,!0;a-=te,++x}),kt(this,ze(x,y))},indexFromPos:function(a){a=kt(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 Zr&&(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):tr(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),!(it(y,a)||ui(y.display,a))){un(a),ye&&(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,te=Array(E),oe=0,se=function(){++oe==E&&oi(y,function(){x=kt(y.doc,x);var Ue={from:x,to:x,text:y.doc.splitLines(te.filter(function(Ct){return Ct!=null}).join(y.doc.lineSeparator())),origin:"paste"};Wo(y.doc,Ue),Js(y.doc,po(kt(y.doc,x),kt(y.doc,vo(Ue))))})()},ue=function(Ue,Ct){if(y.options.allowDropFileTypes&&je(y.options.allowDropFileTypes,Ue.type)==-1){se();return}var Tt=new FileReader;Tt.onerror=function(){return se()},Tt.onload=function(){var Yt=Tt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Yt)){se();return}te[Ct]=Yt,se()},Tt.readAsText(Ue)},he=0;he<b.length;he++)ue(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 xe=a.dataTransfer.getData("Text");if(xe){var De;if(y.state.draggingText&&!y.state.draggingText.copy&&(De=y.listSelections()),Ra(y.doc,po(x,x)),De)for(var Xe=0;Xe<De.length;++Xe)Ho(y.doc,"",De[Xe].anchor,De[Xe].head,"drag");y.replaceSelection(xe,"around","paste"),y.display.input.focus()}}catch(Ue){}}}}function xu(a,y){if(ye&&(!a.state.draggingText||+new Date-hl<100)){wn(y);return}if(!(it(a,y)||ui(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!nt)){var x=Oe("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=Oe("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 te=0;te<x.length;te++)a(x[te])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;Lt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,dl(ku)},100))}),Lt(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=Ae?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,te,oe=0;oe<y.length-1;oe++){var se=y[oe];if(/^(cmd|meta|m)$/i.test(se))te=!0;else if(/^a(lt)?$/i.test(se))x=!0;else if(/^(c|ctrl|control)$/i.test(se))b=!0;else if(/^s(hift)?$/i.test(se))E=!0;else throw new Error("Unrecognized modifier name: "+se)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),te&&(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=Le(x.split(" "),Eu),te=0;te<E.length;te++){var oe=void 0,se=void 0;te==E.length-1?(se=E.join(" "),oe=b):(se=E.slice(0,te+1).join(" "),oe="...");var ue=y[se];if(!ue)y[se]=oe;else if(ue!=oe)throw new Error("Inconsistent bindings for "+se)}delete a[x]}for(var he in y)a[he]=y[he];return a}function zo(a,y,x,b){y=Wa(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 te=0;te<y.fallthrough.length;te++){var oe=zo(a,y.fallthrough[te],x,b);if(oe)return oe}}}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),(ct?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(ct?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 Wa(a){return typeof a=="string"?io[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var te=y(x[E]);b.length&&wt(te.from,ve(b).to)<=0;){var oe=b.pop();if(wt(oe.from,te.from)<0){te.from=oe.from;break}}b.push(te)}Pi(a,function(){for(var se=b.length-1;se>=0;se--)Ho(a.doc,"",b[se].from,b[se].to,"+delete");Ro(a)})}function cs(a,y,x){var b=xt(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 ze(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=Ft(x,y.doc.direction);if(te){var oe=E<0?ve(te):te[0],se=E<0==(oe.level==1),ue=se?"after":"before",he;if(oe.level>0||y.doc.direction=="rtl"){var xe=uo(y,x);he=E<0?x.text.length-1:0;var De=_i(y,xe,he).top;he=yt(function(Xe){return _i(y,xe,Xe).top==De},E<0==(oe.level==1)?oe.from:oe.to-1,he),ue=="before"&&(he=cs(x,he,1))}else he=E<0?oe.to:oe.from;return new ze(b,he,ue)}}return new ze(b,E<0?x.text.length:0,E<0?"before":"after")}function Lu(a,y,x,b){var E=Ft(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 te=Nt(E,x.ch,x.sticky),oe=E[te];if(a.doc.direction=="ltr"&&oe.level%2==0&&(b>0?oe.to>x.ch:oe.from<x.ch))return hs(y,x,b);var se=function(rn,fn){return cs(y,rn instanceof ze?rn.ch:rn,fn)},ue,he=function(rn){return a.options.lineWrapping?(ue=ue||uo(a,y),Yr(a,y,ue,rn)):{begin:0,end:y.text.length}},xe=he(x.sticky=="before"?se(x,-1):x.ch);if(a.doc.direction=="rtl"||oe.level==1){var De=oe.level==1==b<0,Xe=se(x,De?1:-1);if(Xe!=null&&(De?Xe<=oe.to&&Xe<=xe.end:Xe>=oe.from&&Xe>=xe.begin)){var Ue=De?"before":"after";return new ze(x.line,Xe,Ue)}}var Ct=function(rn,fn,on){for(var bn=function(Ir,si){return si?new ze(x.line,se(Ir,1),"before"):new ze(x.line,Ir,"after")};rn>=0&&rn<E.length;rn+=fn){var Tn=E[rn],Sn=fn>0==(Tn.level!=1),Un=Sn?on.begin:se(on.end,-1);if(Tn.from<=Un&&Un<Tn.to||(Un=Sn?Tn.from:se(Tn.to,-1),on.begin<=Un&&Un<on.end))return bn(Un,Sn)}},Tt=Ct(te+b,b,xe);if(Tt)return Tt;var Yt=b>0?xe.end:se(xe.begin,-1);return Yt!=null&&!(b>0&&Yt==y.text.length)&&(Tt=Ct(b>0?0:E.length-1,b,he(Yt)),Tt)?Tt:null}var da={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),we)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=ot(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:ze(y.head.line+1,0)}:{from:y.head,to:ze(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:ze(y.from().line,0),to:kt(a.doc,ze(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:ze(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Zo(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 Zo(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(ze(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(ze(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")},Ge)},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")},Ge)},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},Ge)},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 te=x[E].from(),oe=pe(a.getLine(te.line),te.ch,b);y.push(Ce(b-oe%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,te=ot(a.doc,E.line).text;if(te){if(E.ch==te.length&&(E=new ze(E.line,E.ch-1)),E.ch>0)E=new ze(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),ze(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var oe=ot(a.doc,E.line-1).text;oe&&(E=new ze(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+oe.charAt(oe.length-1),ze(E.line-1,oe.length-1),E,"+transpose"))}}x.push(new Cr(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=ot(a.doc,y),b=nn(x);return b!=x&&(y=Me(b)),fs(!0,a,b,y,1)}function Mu(a,y){var x=ot(a.doc,y),b=En(x);return b!=x&&(y=Me(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=ot(a.doc,x.line),E=Ft(b,a.doc.direction);if(!E||E[0].level==0){var te=Math.max(x.ch,b.text.search(/\S/)),oe=y.line==x.line&&y.ch<=te&&y.ch;return ze(x.line,oe?0:te,x.sticky)}return x}function Ha(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)!=ut}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"&&_r(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 Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var ds=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=ke(),!it(y,a))){ye&&be<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&&(Ae?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),le&&!Ae&&!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;Fe(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(st(y,"CodeMirror-crosshair"),Ot(document,"keyup",x),Ot(document,"mouseover",x))}Lt(document,"keyup",x),Lt(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),it(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(ui(y.display,a)||it(y,a)||a.ctrlKey&&!a.altKey||Ae&&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&&wt(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(!(it(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,ui(x,a)){Ie||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Gn(a),te=b?Ru(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,te,a))&&(E==1?b?Ou(y,b,te,a):er(a)==x.scroller&&un(a):E==2?(b&&Na(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(rt?y.display.input.onContextMenu(a):Ds(y)))}}}function Iu(a,y,x,b,E){var te="Click";return b=="double"?te="Double"+te:b=="triple"&&(te="Triple"+te),te=(y==1?"Left":y==2?"Middle":"Right")+te,pa(a,ml(te,E),E,function(oe){if(typeof oe=="string"&&(oe=da[oe]),!oe)return!1;var se=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),se=oe(a,x)!=ut}finally{a.state.suppressEdits=!1}return se})}function Fu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var te=et?x.shiftKey&&x.metaKey:x.altKey;E.unit=te?"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=Ae?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ae?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){ye?setTimeout(gt(Es,a),0):a.curOp.focus=ke();var E=Fu(a,x,b),te=a.doc.sel,oe;a.options.dragDrop&&Gr&&!a.isReadOnly()&&x=="single"&&(oe=te.contains(y))>-1&&(wt((oe=te.ranges[oe]).from(),y)<0||y.xRel>0)&&(wt(oe.to(),y)>0||y.xRel<0)?Wu(a,b,y,E):Hu(a,b,y,E)}function Wu(a,y,x,b){var E=a.display,te=!1,oe=oi(a,function(he){Ie&&(E.scroller.draggable=!1),a.state.draggingText=!1,Ot(E.wrapper.ownerDocument,"mouseup",oe),Ot(E.wrapper.ownerDocument,"mousemove",se),Ot(E.scroller,"dragstart",ue),Ot(E.scroller,"drop",oe),te||(un(he),b.addNew||Na(a.doc,x,null,null,b.extend),Ie&&!nt||ye&&be==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),se=function(he){te=te||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ue=function(){return te=!0};Ie&&(E.scroller.draggable=!0),a.state.draggingText=oe,oe.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Lt(E.wrapper.ownerDocument,"mouseup",oe),Lt(E.wrapper.ownerDocument,"mousemove",se),Lt(E.scroller,"dragstart",ue),Lt(E.scroller,"drop",oe),Ds(a),setTimeout(function(){return E.input.focus()},20)}function Dl(a,y,x){if(x=="char")return new Cr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Cr(ze(y.line,0),kt(a.doc,ze(y.line+1,0)));var b=x(a,y);return new Cr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,te=a.doc;un(y);var oe,se,ue=te.sel,he=ue.ranges;if(b.addNew&&!b.extend?(se=te.sel.contains(x),se>-1?oe=he[se]:oe=new Cr(x,x)):(oe=te.sel.primary(),se=te.sel.primIndex),b.unit=="rectangle")b.addNew||(oe=new Cr(x,x)),x=Co(a,y,!0,!0),se=-1;else{var xe=Dl(a,x,b.unit);b.extend?oe=ls(oe,xe.anchor,xe.head,b.extend):oe=xe}b.addNew?se==-1?(se=he.length,di(te,Ki(a,he.concat([oe]),se),{scroll:!1,origin:"*mouse"})):he.length>1&&he[se].empty()&&b.unit=="char"&&!b.extend?(di(te,Ki(a,he.slice(0,se).concat(he.slice(se+1)),0),{scroll:!1,origin:"*mouse"}),ue=te.sel):us(te,se,oe,Ve):(se=0,di(te,new Fi([oe],0),Ve),ue=te.sel);var De=x;function Xe(on){if(wt(De,on)!=0)if(De=on,b.unit=="rectangle"){for(var bn=[],Tn=a.options.tabSize,Sn=pe(ot(te,x.line).text,x.ch,Tn),Un=pe(ot(te,on.line).text,on.ch,Tn),Ir=Math.min(Sn,Un),si=Math.max(Sn,Un),jr=Math.min(x.line,on.line),Bi=Math.min(a.lastLine(),Math.max(x.line,on.line));jr<=Bi;jr++){var ki=ot(te,jr).text,qr=St(ki,Ir,Tn);Ir==si?bn.push(new Cr(ze(jr,qr),ze(jr,qr))):ki.length>qr&&bn.push(new Cr(ze(jr,qr),ze(jr,St(ki,si,Tn))))}bn.length||bn.push(new Cr(x,x)),di(te,Ki(a,ue.ranges.slice(0,se).concat(bn),se),{origin:"*mouse",scroll:!1}),a.scrollIntoView(on)}else{var Ei=oe,hi=Dl(a,on,b.unit),ri=Ei.anchor,$r;wt(hi.anchor,ri)>0?($r=hi.head,ri=It(Ei.from(),hi.anchor)):($r=hi.anchor,ri=cn(Ei.to(),hi.head));var Ur=ue.ranges.slice(0);Ur[se]=_u(a,new Cr(kt(te,ri),$r)),di(te,Ki(a,Ur,se),Ve)}}var Ue=E.wrapper.getBoundingClientRect(),Ct=0;function Tt(on){var bn=++Ct,Tn=Co(a,on,!0,b.unit=="rectangle");if(Tn)if(wt(Tn,De)!=0){a.curOp.focus=ke(),Xe(Tn);var Sn=La(E,te);(Tn.line>=Sn.to||Tn.line<Sn.from)&&setTimeout(oi(a,function(){Ct==bn&&Tt(on)}),150)}else{var Un=on.clientY<Ue.top?-20:on.clientY>Ue.bottom?20:0;Un&&setTimeout(oi(a,function(){Ct==bn&&(E.scroller.scrollTop+=Un,Tt(on))}),50)}}function Yt(on){a.state.selectingText=!1,Ct=1/0,on&&(un(on),E.input.focus()),Ot(E.wrapper.ownerDocument,"mousemove",rn),Ot(E.wrapper.ownerDocument,"mouseup",fn),te.history.lastSelOrigin=null}var rn=oi(a,function(on){on.buttons===0||!Gn(on)?Yt(on):Tt(on)}),fn=oi(a,Yt);a.state.selectingText=fn,Lt(E.wrapper.ownerDocument,"mousemove",rn),Lt(E.wrapper.ownerDocument,"mouseup",fn)}function _u(a,y){var x=y.anchor,b=y.head,E=ot(a.doc,x.line);if(wt(x,b)==0&&x.sticky==b.sticky)return y;var te=Ft(E);if(!te)return y;var oe=Nt(te,x.ch,x.sticky),se=te[oe];if(se.from!=x.ch&&se.to!=x.ch)return y;var ue=oe+(se.from==x.ch==(se.level!=1)?0:1);if(ue==0||ue==te.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var xe=Nt(te,b.ch,b.sticky),De=xe-oe||(b.ch-x.ch)*(se.level==1?-1:1);xe==ue-1||xe==ue?he=De<0:he=De>0}var Xe=te[ue+(he?-1:0)],Ue=he==(Xe.level==1),Ct=Ue?Xe.from:Xe.to,Tt=Ue?"after":"before";return x.ch==Ct&&x.sticky==Tt?y:new Cr(new ze(x.line,Ct,Tt),b)}function Ll(a,y,x,b){var E,te;if(y.touches)E=y.touches[0].clientX,te=y.touches[0].clientY;else try{E=y.clientX,te=y.clientY}catch(Xe){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&un(y);var oe=a.display,se=oe.lineDiv.getBoundingClientRect();if(te>se.bottom||!Wt(a,x))return hn(y);te-=se.top-oe.viewOffset;for(var ue=0;ue<a.display.gutterSpecs.length;++ue){var he=oe.gutters.childNodes[ue];if(he&&he.getBoundingClientRect().right>=E){var xe=Pe(a.doc,te),De=a.display.gutterSpecs[ue];return qt(a,x,a,xe,De.className,y),hn(y)}}}function vs(a,y){return Ll(a,y,"gutterClick",!0)}function Ml(a,y){ui(a.display,y)||zu(a,y)||it(a,y,"contextmenu")||rt||a.display.input.onContextMenu(y)}function zu(a,y){return Wt(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={},_a={};function Zu(a){var y=a.optionHandlers;function x(b,E,te,oe){a.defaults[b]=E,te&&(y[b]=oe?function(se,ue,he){he!=Go&&te(se,ue,he)}:te)}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 te=[],oe=b.doc.first;b.doc.iter(function(ue){for(var he=0;;){var xe=ue.text.indexOf(E,he);if(xe==-1)break;he=xe+E.length,te.push(ze(oe,xe))}oe++});for(var se=te.length-1;se>=0;se--)Ho(b.doc,E,te[se],ze(te[se].line,te[se].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,te){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=Go&&b.refresh()}),x("specialCharPlaceholder",Li,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Re?"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",!tt),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ra(b)},!0),x("keyMap","default",function(b,E,te){var oe=Wa(E),se=te!=Go&&Wa(te);se&&se.detach&&se.detach(b,oe),oe.attach&&oe.attach(b,se||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,te=y?Lt:Ot;te(a.display.scroller,"dragstart",E.start),te(a.display.scroller,"dragenter",E.enter),te(a.display.scroller,"dragover",E.over),te(a.display.scroller,"dragleave",E.leave),te(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(Fe(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(st(a.display.wrapper,"CodeMirror-wrap"),Vn(a)),Ya(a),Ci(a),wo(a),setTimeout(function(){return Io(a)},100)}function Zr(a,y){var x=this;if(!(this instanceof Zr))return new Zr(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 Zr.inputStyles[y.inputStyle](this),te=this.display=new ru(a,b,E,y);te.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&&!Re&&te.input.focus(),ye&&be<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Do(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Re||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):No(this);for(var oe in _a)_a.hasOwnProperty(oe)&&_a[oe](this,y[oe],Go);Is(this),y.finishInit&&y.finishInit(this);for(var se=0;se<ms.length;++se)ms[se](this);Lo(this),Ie&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Zr.defaults=Al,Zr.optionHandlers=_a;function Vu(a){var y=a.display;Lt(y.scroller,"mousedown",oi(a,El)),ye&&be<11?Lt(y.scroller,"dblclick",oi(a,function(ue){if(!it(a,ue)){var he=Co(a,ue);if(!(!he||vs(a,ue)||ui(a.display,ue))){un(ue);var xe=a.findWordAt(he);Na(a.doc,xe.anchor,xe.head)}}})):Lt(y.scroller,"dblclick",function(ue){return it(a,ue)||un(ue)}),Lt(y.scroller,"contextmenu",function(ue){return Ml(a,ue)}),Lt(y.input.getField(),"contextmenu",function(ue){y.scroller.contains(ue.target)||Ml(a,ue)});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 te(ue){if(ue.touches.length!=1)return!1;var he=ue.touches[0];return he.radiusX<=1&&he.radiusY<=1}function oe(ue,he){if(he.left==null)return!0;var xe=he.left-ue.left,De=he.top-ue.top;return xe*xe+De*De>20*20}Lt(y.scroller,"touchstart",function(ue){if(!it(a,ue)&&!te(ue)&&!vs(a,ue)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),Lt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Lt(y.scroller,"touchend",function(ue){var he=y.activeTouch;if(he&&!ui(y,ue)&&he.left!=null&&!he.moved&&new Date-he.start<300){var xe=a.coordsChar(y.activeTouch,"page"),De;!he.prev||oe(he,he.prev)?De=new Cr(xe,xe):!he.prev.prev||oe(he,he.prev.prev)?De=a.findWordAt(xe):De=new Cr(ze(xe.line,0),kt(a.doc,ze(xe.line+1,0))),a.setSelection(De.anchor,De.head),a.focus(),un(ue)}E()}),Lt(y.scroller,"touchcancel",E),Lt(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),qt(a,"scroll",a))}),Lt(y.scroller,"mousewheel",function(ue){return Ws(a,ue)}),Lt(y.scroller,"DOMMouseScroll",function(ue){return Ws(a,ue)}),Lt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){it(a,ue)||wn(ue)},over:function(ue){it(a,ue)||(wu(a,ue),wn(ue))},start:function(ue){return xu(a,ue)},drop:oi(a,bu),leave:function(ue){it(a,ue)||fl(a)}};var se=y.input.getField();Lt(se,"keyup",function(ue){return Sl.call(a,ue)}),Lt(se,"keydown",oi(a,Cl)),Lt(se,"keypress",oi(a,kl)),Lt(se,"focus",function(ue){return Ja(a,ue)}),Lt(se,"blur",function(ue){return No(a,ue)})}var ms=[];Zr.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,te;x==null&&(x="add"),x=="smart"&&(E.mode.indent?te=Yn(a,y).state:x="prev");var oe=a.options.tabSize,se=ot(E,y),ue=pe(se.text,null,oe);se.stateAfter&&(se.stateAfter=null);var he=se.text.match(/^\s*/)[0],xe;if(!b&&!/\S/.test(se.text))xe=0,x="not";else if(x=="smart"&&(xe=E.mode.indent(te,se.text.slice(he.length),se.text),xe==ut||xe>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?xe=pe(ot(E,y-1).text,null,oe):xe=0:x=="add"?xe=ue+a.options.indentUnit:x=="subtract"?xe=ue-a.options.indentUnit:typeof x=="number"&&(xe=ue+x),xe=Math.max(0,xe);var De="",Xe=0;if(a.options.indentWithTabs)for(var Ue=Math.floor(xe/oe);Ue;--Ue)Xe+=oe,De+=" ";if(Xe<xe&&(De+=Ce(xe-Xe)),De!=he)return Ho(E,De,ze(y,0),ze(y,he.length),"+input"),se.stateAfter=null,!0;for(var Ct=0;Ct<E.sel.ranges.length;Ct++){var Tt=E.sel.ranges[Ct];if(Tt.head.line==y&&Tt.head.ch<he.length){var Yt=ze(y,he.length);us(E,Ct,new Cr(Yt,Yt));break}}}var Yi=null;function za(a){Yi=a}function gs(a,y,x,b,E){var te=a.doc;a.display.shift=!1,b||(b=te.sel);var oe=+new Date-200,se=E=="paste"||a.state.pasteIncoming>oe,ue=tr(y),he=null;if(se&&b.ranges.length>1)if(Yi&&Yi.text.join(`
|
|
`)==y){if(b.ranges.length%Yi.text.length==0){he=[];for(var xe=0;xe<Yi.text.length;xe++)he.push(te.splitLines(Yi.text[xe]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Le(ue,function(rn){return[rn]}));for(var De=a.curOp.updateInput,Xe=b.ranges.length-1;Xe>=0;Xe--){var Ue=b.ranges[Xe],Ct=Ue.from(),Tt=Ue.to();Ue.empty()&&(x&&x>0?Ct=ze(Ct.line,Ct.ch-x):a.state.overwrite&&!se?Tt=ze(Tt.line,Math.min(ot(te,Tt.line).text.length,Tt.ch+ve(ue).length)):se&&Yi&&Yi.lineWise&&Yi.text.join(`
|
|
`)==ue.join(`
|
|
`)&&(Ct=Tt=ze(Ct.line,0)));var Yt={from:Ct,to:Tt,text:he?he[Xe%he.length]:ue,origin:E||(se?"paste":a.state.cutIncoming>oe?"cut":"+input")};Wo(a.doc,Yt),_r(a,"inputRead",a,Yt)}y&&!se&&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 te=a.getModeAt(E.head),oe=!1;if(te.electricChars){for(var se=0;se<te.electricChars.length;se++)if(y.indexOf(te.electricChars.charAt(se))>-1){oe=ga(a,E.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(ot(a.doc,E.head.line).text.slice(0,E.head.ch))&&(oe=ga(a,E.head.line,"smart"));oe&&_r(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,te={anchor:ze(E,0),head:ze(E+1,0)};x.push(te),y.push(a.getRange(te.anchor,te.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=Oe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Oe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ie?a.style.width="1000px":a.setAttribute("wrap","off"),Ze&&(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 te=this.options,oe=te[b];te[b]==E&&b!="mode"||(te[b]=E,y.hasOwnProperty(b)&&oi(this,y[b])(this,E,oe),qt(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"](Wa(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,te=0;te<E.length;++te)if(E[te]==b||E[te].name==b)return E.splice(te,1),!0},addOverlay:yi(function(b,E){var te=b.token?b:a.getMode(this.options,b);if(te.startState)throw new Error("Overlays may not be stateful.");Ye(this.state.overlays,{mode:te,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(oe){return oe.priority}),this.state.modeGen++,Ci(this)}),removeOverlay:yi(function(b){for(var E=this.state.overlays,te=0;te<E.length;++te){var oe=E[te].modeSpec;if(oe==b||typeof b=="string"&&oe.name==b){E.splice(te,1),this.state.modeGen++,Ci(this);return}}}),indentLine:yi(function(b,E,te){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Mt(this.doc,b)&&ga(this,b,E,te)}),indentSelection:yi(function(b){for(var E=this.doc.sel.ranges,te=-1,oe=0;oe<E.length;oe++){var se=E[oe];if(se.empty())se.head.line>te&&(ga(this,se.head.line,b,!0),te=se.head.line,oe==this.doc.sel.primIndex&&Ro(this));else{var ue=se.from(),he=se.to(),xe=Math.max(te,ue.line);te=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var De=xe;De<te;++De)ga(this,De,b);var Xe=this.doc.sel.ranges;ue.ch==0&&E.length==Xe.length&&Xe[oe].from().ch>0&&us(this.doc,oe,new Cr(ue,Xe[oe].to()),we)}}}),getTokenAt:function(b,E){return Hn(this,b,E)},getLineTokens:function(b,E){return Hn(this,ze(b),E,!0)},getTokenTypeAt:function(b){b=kt(this.doc,b);var E=Wn(this,ot(this.doc,b.line)),te=0,oe=(E.length-1)/2,se=b.ch,ue;if(se==0)ue=E[2];else for(;;){var he=te+oe>>1;if((he?E[he*2-1]:0)>=se)oe=he;else if(E[he*2+1]<se)te=he+1;else{ue=E[he*2+2];break}}var xe=ue?ue.indexOf("overlay "):-1;return xe<0?ue:xe==0?null:ue.slice(0,xe-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var te=[];if(!x.hasOwnProperty(E))return te;var oe=x[E],se=this.getModeAt(b);if(typeof se[E]=="string")oe[se[E]]&&te.push(oe[se[E]]);else if(se[E])for(var ue=0;ue<se[E].length;ue++){var he=oe[se[E][ue]];he&&te.push(he)}else se.helperType&&oe[se.helperType]?te.push(oe[se.helperType]):oe[se.name]&&te.push(oe[se.name]);for(var xe=0;xe<oe._global.length;xe++){var De=oe._global[xe];De.pred(se,this)&&je(te,De.val)==-1&&te.push(De.val)}return te},getStateAfter:function(b,E){var te=this.doc;return b=Jt(te,b==null?te.first+te.size-1:b),Yn(this,b+1,E).state},cursorCoords:function(b,E){var te,oe=this.doc.sel.primary();return b==null?te=oe.head:typeof b=="object"?te=kt(this.doc,b):te=b?oe.from():oe.to(),wi(this,te,E||"page")},charCoords:function(b,E){return Bo(this,kt(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,Pe(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,te){var oe=!1,se;if(typeof b=="number"){var ue=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ue&&(b=ue,oe=!0),se=ot(this.doc,b)}else se=b;return Po(this,se,{top:0,left:0},E||"page",te||oe).top+(oe?this.doc.height-Ln(se):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,te,oe,se){var ue=this.display;b=wi(this,kt(this.doc,b));var he=b.bottom,xe=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),oe=="over")he=b.top;else if(oe=="above"||oe=="near"){var De=Math.max(ue.wrapper.clientHeight,this.doc.height),Xe=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(oe=="above"||b.bottom+E.offsetHeight>De)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=De&&(he=b.bottom),xe+E.offsetWidth>Xe&&(xe=Xe-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",se=="right"?(xe=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(se=="left"?xe=0:se=="middle"&&(xe=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=xe+"px"),te&&Gl(this,{left:xe,top:he,right:xe+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,te,oe){var se=1;E<0&&(se=-1,E=-E);for(var ue=kt(this.doc,b),he=0;he<E&&(ue=ys(this.doc,ue,se,te,oe),!ue.hitSide);++he);return ue},moveH:yi(function(b,E){var te=this;this.extendSelectionsBy(function(oe){return te.display.shift||te.doc.extend||oe.empty()?ys(te.doc,oe.head,b,E,te.options.rtlMoveVisually):b<0?oe.from():oe.to()},Ge)}),deleteH:yi(function(b,E){var te=this.doc.sel,oe=this.doc;te.somethingSelected()?oe.replaceSelection("",null,"+delete"):Zo(this,function(se){var ue=ys(oe,se.head,b,E,!1);return b<0?{from:ue,to:se.head}:{from:se.head,to:ue}})}),findPosV:function(b,E,te,oe){var se=1,ue=oe;E<0&&(se=-1,E=-E);for(var he=kt(this.doc,b),xe=0;xe<E;++xe){var De=wi(this,he,"div");if(ue==null?ue=De.left:De.left=ue,he=Fl(this,De,se,te),he.hitSide)break}return he},moveV:yi(function(b,E){var te=this,oe=this.doc,se=[],ue=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(xe){if(ue)return b<0?xe.from():xe.to();var De=wi(te,xe.head,"div");xe.goalColumn!=null&&(De.left=xe.goalColumn),se.push(De.left);var Xe=Fl(te,De,b,E);return E=="page"&&xe==oe.sel.primary()&&qa(te,Bo(te,Xe,"div").top-De.top),Xe},Ge),se.length)for(var he=0;he<oe.sel.ranges.length;he++)oe.sel.ranges[he].goalColumn=se[he]}),findWordAt:function(b){var E=this.doc,te=ot(E,b.line).text,oe=b.ch,se=b.ch;if(te){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||se==te.length)&&oe?--oe:++se;for(var he=te.charAt(oe),xe=ae(he,ue)?function(De){return ae(De,ue)}:/\s/.test(he)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!ae(De)};oe>0&&xe(te.charAt(oe-1));)--oe;for(;se<te.length&&xe(te.charAt(se));)++se}return new Cr(ze(b.line,oe),ze(b.line,se))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Fe(this.display.cursorDiv,"CodeMirror-overwrite"):st(this.display.cursorDiv,"CodeMirror-overwrite"),qt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ke()},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:ze(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 te=this,oe=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};b!=null&&(this.display.wrapper.style.width=oe(b)),E!=null&&(this.display.wrapper.style.height=oe(E)),this.options.lineWrapping&&Yo(this);var se=this.display.viewFrom;this.doc.iter(se,this.display.viewTo,function(ue){if(ue.widgets){for(var he=0;he<ue.widgets.length;he++)if(ue.widgets[he].noHScroll){ho(te,se,"widget");break}}++se}),this.curOp.forceUpdate=!0,qt(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),qt(this,"refresh",this)}),swapDoc:yi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),wo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,_r(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}},Ut(a),a.registerHelper=function(b,E,te){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=te},a.registerGlobalHelper=function(b,E,te,oe){a.registerHelper(b,E,oe),x[b]._global.push({pred:te,val:oe})}}function ys(a,y,x,b,E){var te=y,oe=x,se=ot(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function he(){var fn=y.line+ue;return fn<a.first||fn>=a.first+a.size?!1:(y=new ze(fn,y.ch,y.sticky),se=ot(a,fn))}function xe(fn){var on;if(b=="codepoint"){var bn=se.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(bn)?on=null:on=new ze(y.line,Math.max(0,Math.min(se.text.length,y.ch+x*(bn>=55296&&bn<56320?2:1))),-x)}else E?on=Lu(a.cm,se,y,x):on=hs(se,y,x);if(on==null)if(!fn&&he())y=fs(E,a.cm,se,y.line,ue);else return!1;else y=on;return!0}if(b=="char"||b=="codepoint")xe();else if(b=="column")xe(!0);else if(b=="word"||b=="group")for(var De=null,Xe=b=="group",Ue=a.cm&&a.cm.getHelper(y,"wordChars"),Ct=!0;!(x<0&&!xe(!Ct));Ct=!1){var Tt=se.text.charAt(y.ch)||`
|
|
`,Yt=ae(Tt,Ue)?"w":Xe&&Tt==`
|
|
`?"n":!Xe||/\s/.test(Tt)?null:"p";if(Xe&&!Ct&&!Yt&&(Yt="s"),De&&De!=Yt){x<0&&(x=1,xe(),y.sticky="after");break}if(Yt&&(De=Yt),x>0&&!xe(!Ct))break}var rn=Ia(a,y,te,oe,!0);return Kt(te,rn)&&(rn.hitSide=!0),rn}function Fl(a,y,x,b){var E=a.doc,te=y.left,oe;if(b=="page"){var se=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(se-.5*Ai(a.display),3);oe=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(oe=x>0?y.bottom+3:y.top-3);for(var he;he=ci(a,te,oe),!!he.outside;){if(x<0?oe<=0:oe>=E.height){he.hitSide=!0;break}oe+=x*5}return he}var Tr=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};Tr.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 te(se){for(var ue=se.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Lt(E,"paste",function(se){!te(se)||it(b,se)||Pl(se,b)||be<=11&&setTimeout(oi(b,function(){return y.updateFromDOM()}),20)}),Lt(E,"compositionstart",function(se){y.composing={data:se.data,done:!1}}),Lt(E,"compositionupdate",function(se){y.composing||(y.composing={data:se.data,done:!1})}),Lt(E,"compositionend",function(se){y.composing&&(se.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Lt(E,"touchstart",function(){return x.forceCompositionEnd()}),Lt(E,"input",function(){y.composing||y.readFromDOMSoon()});function oe(se){if(!(!te(se)||it(b,se))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),se.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Nl(b);za({lineWise:!0,text:ue.text}),se.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,we),b.replaceSelection("",null,"cut")})}else return;if(se.clipboardData){se.clipboardData.clearData();var he=Yi.text.join(`
|
|
`);if(se.clipboardData.setData("Text",he),se.clipboardData.getData("Text")==he){se.preventDefault();return}}var xe=Il(),De=xe.firstChild;b.display.lineSpace.insertBefore(xe,b.display.lineSpace.firstChild),De.value=Yi.text.join(`
|
|
`);var Xe=document.activeElement;$e(De),setTimeout(function(){b.display.lineSpace.removeChild(xe),Xe.focus(),Xe==E&&x.showPrimarySelection()},50)}}Lt(E,"copy",oe),Lt(E,"cut",oe)},Tr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Tr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Tr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Tr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Tr.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 te=Za(y,a.anchorNode,a.anchorOffset),oe=Za(y,a.focusNode,a.focusOffset);if(!(te&&!te.bad&&oe&&!oe.bad&&wt(It(te,oe),b)==0&&wt(cn(te,oe),E)==0)){var se=y.display.view,ue=b.line>=y.display.viewFrom&&Ol(y,b)||{node:se[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Ol(y,E);if(!he){var xe=se[se.length-1].measure,De=xe.maps?xe.maps[xe.maps.length-1]:xe.map;he={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!ue||!he){a.removeAllRanges();return}var Xe=a.rangeCount&&a.getRangeAt(0),Ue;try{Ue=Te(ue.node,ue.offset,he.offset,he.node)}catch(Ct){}Ue&&(!le&&y.state.focused?(a.collapse(ue.node,ue.offset),Ue.collapsed||(a.removeAllRanges(),a.addRange(Ue))):(a.removeAllRanges(),a.addRange(Ue)),Xe&&a.anchorNode==null?a.addRange(Xe):le&&this.startGracePeriod()),this.rememberSelection()}},Tr.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)},Tr.prototype.showMultipleSelections=function(a){Se(this.cm.display.cursorDiv,a.cursors),Se(this.cm.display.selectionDiv,a.selection)},Tr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Tr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return _e(this.div,y)},Tr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Tr.prototype.blur=function(){this.div.blur()},Tr.prototype.getField=function(){return this.div},Tr.prototype.supportsTouch=function(){return!0},Tr.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)},Tr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Tr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Be&&Ee&&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=Za(y,a.anchorNode,a.anchorOffset),b=Za(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)})}}},Tr.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=ze(b.line-1,ot(a.doc,b.line-1).length)),E.ch==ot(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=ze(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,oe,se;b.line==y.viewFrom||(te=So(a,b.line))==0?(oe=Me(y.view[0].line),se=y.view[0].node):(oe=Me(y.view[te].line),se=y.view[te-1].node.nextSibling);var ue=So(a,E.line),he,xe;if(ue==y.view.length-1?(he=y.viewTo-1,xe=y.lineDiv.lastChild):(he=Me(y.view[ue+1].line)-1,xe=y.view[ue+1].node.previousSibling),!se)return!1;for(var De=a.doc.splitLines(Yu(a,se,xe,oe,he)),Xe=Xt(a.doc,ze(oe,0),ze(he,ot(a.doc,he).text.length));De.length>1&&Xe.length>1;)if(ve(De)==ve(Xe))De.pop(),Xe.pop(),he--;else if(De[0]==Xe[0])De.shift(),Xe.shift(),oe++;else break;for(var Ue=0,Ct=0,Tt=De[0],Yt=Xe[0],rn=Math.min(Tt.length,Yt.length);Ue<rn&&Tt.charCodeAt(Ue)==Yt.charCodeAt(Ue);)++Ue;for(var fn=ve(De),on=ve(Xe),bn=Math.min(fn.length-(De.length==1?Ue:0),on.length-(Xe.length==1?Ue:0));Ct<bn&&fn.charCodeAt(fn.length-Ct-1)==on.charCodeAt(on.length-Ct-1);)++Ct;if(De.length==1&&Xe.length==1&&oe==b.line)for(;Ue&&Ue>b.ch&&fn.charCodeAt(fn.length-Ct-1)==on.charCodeAt(on.length-Ct-1);)Ue--,Ct++;De[De.length-1]=fn.slice(0,fn.length-Ct).replace(/^\u200b+/,""),De[0]=De[0].slice(Ue).replace(/\u200b+$/,"");var Tn=ze(oe,Ue),Sn=ze(he,Xe.length?ve(Xe).length-Ct:0);if(De.length>1||De[0]||wt(Tn,Sn))return Ho(a.doc,De,Tn,Sn,"+input"),!0},Tr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Tr.prototype.reset=function(){this.forceCompositionEnd()},Tr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Tr.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))},Tr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return Ci(a.cm)})},Tr.prototype.setUneditable=function(a){a.contentEditable="false"},Tr.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))},Tr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Tr.prototype.onContextMenu=function(){},Tr.prototype.resetPosition=function(){},Tr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=$i(a,y.line);if(!x||x.hidden)return null;var b=ot(a.doc,y.line),E=Ao(x,b,y.line),te=Ft(b,a.doc.direction),oe="left";if(te){var se=Nt(te,y.ch);oe=se%2?"right":"left"}var ue=xa(E.map,y.ch,oe);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}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 te="",oe=!1,se=a.doc.lineSeparator(),ue=!1;function he(Ue){return function(Ct){return Ct.id==Ue}}function xe(){oe&&(te+=se,ue&&(te+=se),oe=ue=!1)}function De(Ue){Ue&&(xe(),te+=Ue)}function Xe(Ue){if(Ue.nodeType==1){var Ct=Ue.getAttribute("cm-text");if(Ct){De(Ct);return}var Tt=Ue.getAttribute("cm-marker"),Yt;if(Tt){var rn=a.findMarks(ze(b,0),ze(E+1,0),he(+Tt));rn.length&&(Yt=rn[0].find(0))&&De(Xt(a.doc,Yt.from,Yt.to).join(se));return}if(Ue.getAttribute("contenteditable")=="false")return;var fn=/^(pre|div|p|li|table|br)$/i.test(Ue.nodeName);if(!/^br$/i.test(Ue.nodeName)&&Ue.textContent.length==0)return;fn&&xe();for(var on=0;on<Ue.childNodes.length;on++)Xe(Ue.childNodes[on]);/^(pre|p)$/i.test(Ue.nodeName)&&(ue=!0),fn&&(oe=!0)}else Ue.nodeType==3&&De(Ue.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Xe(y),y!=x;)y=y.nextSibling,ue=!1;return te}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(ze(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 te=a.display.view[E];if(te.node==b)return Xu(te,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!_e(b,y))return jo(ze(Me(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var te=a.rest?ve(a.rest):a.line;return jo(ze(Me(te),te.text.length),E)}var oe=y.nodeType==3?y:null,se=y;for(!oe&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(oe=y.firstChild,x&&(x=oe.nodeValue.length));se.parentNode!=b;)se=se.parentNode;var ue=a.measure,he=ue.maps;function xe(Yt,rn,fn){for(var on=-1;on<(he?he.length:0);on++)for(var bn=on<0?ue.map:he[on],Tn=0;Tn<bn.length;Tn+=3){var Sn=bn[Tn+2];if(Sn==Yt||Sn==rn){var Un=Me(on<0?a.line:a.rest[on]),Ir=bn[Tn]+fn;return(fn<0||Sn!=Yt)&&(Ir=bn[Tn+(fn?1:0)]),ze(Un,Ir)}}}var De=xe(oe,se,x);if(De)return jo(De,E);for(var Xe=se.nextSibling,Ue=oe?oe.nodeValue.length-x:0;Xe;Xe=Xe.nextSibling){if(De=xe(Xe,Xe.firstChild,0),De)return jo(ze(De.line,De.ch-Ue),E);Ue+=Xe.textContent.length}for(var Ct=se.previousSibling,Tt=x;Ct;Ct=Ct.previousSibling){if(De=xe(Ct,Ct.firstChild,-1),De)return jo(ze(De.line,De.ch+Tt),E);Tt+=Ct.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),Ze&&(E.style.width="0px"),Lt(E,"input",function(){ye&&be>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Lt(E,"paste",function(oe){it(b,oe)||Pl(oe,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function te(oe){if(!it(b,oe)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var se=Nl(b);za({lineWise:!0,text:se.text}),oe.type=="cut"?b.setSelections(se.ranges,null,we):(x.prevInput="",E.value=se.text.join(`
|
|
`),$e(E))}else return;oe.type=="cut"&&(b.state.cutIncoming=+new Date)}}Lt(E,"cut",te),Lt(E,"copy",te),Lt(a.scroller,"paste",function(oe){if(!(ui(a,oe)||it(b,oe))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var se=new Event("paste");se.clipboardData=oe.clipboardData,E.dispatchEvent(se)}}),Lt(a.lineSpace,"selectstart",function(oe){ui(a,oe)||un(oe)}),Lt(E,"compositionstart",function(){var oe=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:oe,range:b.markText(oe,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Lt(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"),te=y.wrapper.getBoundingClientRect(),oe=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+oe.top-te.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+oe.left-te.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&&$e(this.textarea),ye&&be>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",ye&&be>=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"&&(!Re||ke()!=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||sr(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(ye&&be>=9&&this.hasSelection===E||Ae&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var te=E.charCodeAt(0);if(te==8203&&!b&&(b="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,se=Math.min(b.length,E.length);oe<se&&b.charCodeAt(oe)==E.charCodeAt(oe);)++oe;return Pi(y,function(){gs(y,E.slice(oe),b.length-oe,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(){ye&&be>=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 te=Co(x,a),oe=b.scroller.scrollTop;if(!te||de)return;var se=x.options.resetSelectionOnContextMenu;se&&x.doc.sel.contains(te)==-1&&oi(x,di)(x.doc,po(te),we);var ue=E.style.cssText,he=y.wrapper.style.cssText,xe=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-xe.top-5)+"px; left: "+(a.clientX-xe.left-5)+`px;
|
|
z-index: 1000; background: `+(ye?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var De;Ie&&(De=window.scrollY),b.input.focus(),Ie&&window.scrollTo(null,De),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Ue,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Xe(){if(E.selectionStart!=null){var Tt=x.somethingSelected(),Yt="\u200B"+(Tt?E.value:"");E.value="\u21DA",E.value=Yt,y.prevInput=Tt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Yt.length,b.selForContextMenu=x.doc.sel}}function Ue(){if(y.contextMenuPending==Ue&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ue,ye&&be<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=oe),E.selectionStart!=null)){(!ye||ye&&be<9)&&Xe();var Tt=0,Yt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?oi(x,tl)(x):Tt++<10?b.detectingSelectAll=setTimeout(Yt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Yt,200)}}if(ye&&be>=9&&Xe(),rt){wn(a);var Ct=function(){Ot(window,"mouseup",Ct),setTimeout(Ue,20)};Lt(window,"mouseup",Ct)}else setTimeout(Ue,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=ke();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=se.getValue()}var E;if(a.form&&(Lt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var te=a.form;E=te.submit;try{var oe=te.submit=function(){b(),te.submit=E,te.submit(),te.submit=oe}}catch(ue){}}y.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return a},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),a.parentNode.removeChild(ue.getWrapperElement()),a.style.display="",a.form&&(Ot(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var se=Zr(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return se}function Qu(a){a.off=Ot,a.on=Lt,a.wheelEventPixels=iu,a.Doc=Si,a.splitLines=tr,a.countColumn=pe,a.findColumn=St,a.isWordChar=re,a.Pass=ut,a.signal=qt,a.Line=vr,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=ze,a.cmpPos=wt,a.modes=yr,a.mimeModes=Gt,a.resolveMode=Mn,a.getMode=Jn,a.modeExtensions=$n,a.extendMode=hr,a.copyState=zn,a.startState=lr,a.innerMode=Fn,a.commands=da,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=zo,a.normalizeKeyMap=Du,a.StringStream=_t,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=un,a.e_stopPropagation=An,a.e_stop=wn,a.addClass=Fe,a.contains=_e,a.rmClass=st,a.keyNames=yo}Zu(Zr),Uu(Zr);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Si.prototype)Si.prototype.hasOwnProperty(Ga)&&je(qu,Ga)<0&&(Zr.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Si.prototype[Ga]));return Ut(Si),Zr.inputStyles={textarea:Xr,contenteditable:Tr},Zr.defineMode=function(a){!Zr.defaults.mode&&a!="null"&&(Zr.defaults.mode=a),pn.apply(this,arguments)},Zr.defineMIME=kn,Zr.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Zr.defineMIME("text/plain","null"),Zr.defineExtension=function(a,y){Zr.prototype[a]=y},Zr.defineDocExtension=function(a,y){Si.prototype[a]=y},Zr.fromTextArea=Ju,Qu(Zr),Zr.version="5.58.2",Zr})},25419:function(At,Rt,fe){(function(le){le(fe(89780),fe(15525),fe(98101))})(function(le){"use strict";le.defineMode("markdown",function(Qe,Ne){var He=le.getMode(Qe,"text/html"),ye=He.name=="null";function be(pe){if(le.findModeByName){var ce=le.findModeByName(pe);ce&&(pe=ce.mime||ce.mimes[0])}var je=le.getMode(Qe,pe);return je.name=="null"?null:je}Ne.highlightFormatting===void 0&&(Ne.highlightFormatting=!1),Ne.maxBlockquoteDepth===void 0&&(Ne.maxBlockquoteDepth=0),Ne.taskLists===void 0&&(Ne.taskLists=!1),Ne.strikethrough===void 0&&(Ne.strikethrough=!1),Ne.emoji===void 0&&(Ne.emoji=!1),Ne.fencedCodeBlockHighlighting===void 0&&(Ne.fencedCodeBlockHighlighting=!0),Ne.fencedCodeBlockDefaultMode===void 0&&(Ne.fencedCodeBlockDefaultMode="text/plain"),Ne.xml===void 0&&(Ne.xml=!0),Ne.tokenTypeOverrides===void 0&&(Ne.tokenTypeOverrides={});var Ie={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Ke in Ie)Ie.hasOwnProperty(Ke)&&Ne.tokenTypeOverrides[Ke]&&(Ie[Ke]=Ne.tokenTypeOverrides[Ke]);var Ee=/^([*\-_])(?:\s*\1){2,}\s*$/,de=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,nt=/^\[(x| )\](?=\s)/i,me=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,lt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ze=/^[^#!\[\]*_\\<>` "'(~:]+/,Be=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Re=/^\s*\[[^\]]+?\]:.*$/,Ae=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,et=" ";function tt(pe,ce,je){return ce.f=ce.inline=je,je(pe,ce)}function ft(pe,ce,je){return ce.f=ce.block=je,je(pe,ce)}function ct(pe){return!pe||!/\S/.test(pe.string)}function rt(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==st){var ce=ye;if(!ce){var je=le.innerMode(He,pe.htmlState);ce=je.mode.name=="xml"&&je.state.tagStart===null&&!je.state.context&&je.state.tokenize.isInText}ce&&(pe.f=qe,pe.block=at,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function at(pe,ce){var je=pe.column()===ce.indentation,vt=ct(ce.prevLine.stream),ut=ce.indentedCode,we=ce.prevLine.hr,Ve=ce.list!==!1,Ge=(ce.listStack[ce.listStack.length-1]||0)+3;ce.indentedCode=!1;var St=ce.indentation;if(ce.indentationDiff===null&&(ce.indentationDiff=ce.indentation,Ve)){for(ce.list=null;St<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=St-ce.listStack[ce.listStack.length-1])}var Je=!vt&&!we&&!ce.prevLine.header&&(!Ve||!ut)&&!ce.prevLine.fencedCodeEnd,Ce=(ce.list===!1||we||vt)&&ce.indentation<=Ge&&pe.match(Ee),ve=null;if(ce.indentationDiff>=4&&(ut||ce.prevLine.fencedCodeEnd||ce.prevLine.header||vt))return pe.skipToEnd(),ce.indentedCode=!0,Ie.code;if(pe.eatSpace())return null;if(je&&ce.indentation<=Ge&&(ve=pe.match(me))&&ve[1].length<=6)return ce.quote=0,ce.header=ve[1].length,ce.thisLine.header=!0,Ne.highlightFormatting&&(ce.formatting="header"),ce.f=ce.inline,Se(ce);if(ce.indentation<=Ge&&pe.eat(">"))return ce.quote=je?1:ce.quote+1,Ne.highlightFormatting&&(ce.formatting="quote"),pe.eatSpace(),Se(ce);if(!Ce&&!ce.setext&&je&&ce.indentation<=Ge&&(ve=pe.match(de))){var Le=ve[1]?"ol":"ul";return ce.indentation=St+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,Ne.taskLists&&pe.match(nt,!1)&&(ce.taskList=!0),ce.f=ce.inline,Ne.highlightFormatting&&(ce.formatting=["list","list-"+Le]),Se(ce)}else{if(je&&ce.indentation<=Ge&&(ve=pe.match(Be,!0)))return ce.quote=0,ce.fencedEndRE=new RegExp(ve[1]+"+ *$"),ce.localMode=Ne.fencedCodeBlockHighlighting&&be(ve[2]||Ne.fencedCodeBlockDefaultMode),ce.localMode&&(ce.localState=le.startState(ce.localMode)),ce.f=ce.block=Vt,Ne.highlightFormatting&&(ce.formatting="code-block"),ce.code=-1,Se(ce);if(ce.setext||(!Je||!Ve)&&!ce.quote&&ce.list===!1&&!ce.code&&!Ce&&!Re.test(pe.string)&&(ve=pe.lookAhead(1))&&(ve=ve.match(lt)))return ce.setext?(ce.header=ce.setext,ce.setext=0,pe.skipToEnd(),Ne.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,Ie.hr;if(pe.peek()==="[")return tt(pe,ce,Et)}return tt(pe,ce,ce.inline)}function st(pe,ce){var je=He.token(pe,ce.htmlState);if(!ye){var vt=le.innerMode(He,ce.htmlState);(vt.mode.name=="xml"&&vt.state.tagStart===null&&!vt.state.context&&vt.state.tokenize.isInText||ce.md_inside&&pe.current().indexOf(">")>-1)&&(ce.f=qe,ce.block=at,ce.htmlState=null)}return je}function Vt(pe,ce){var je=ce.listStack[ce.listStack.length-1]||0,vt=ce.indentation<je,ut=je+3;if(ce.fencedEndRE&&ce.indentation<=ut&&(vt||pe.match(ce.fencedEndRE))){Ne.highlightFormatting&&(ce.formatting="code-block");var we;return vt||(we=Se(ce)),ce.localMode=ce.localState=null,ce.block=at,ce.f=qe,ce.fencedEndRE=null,ce.code=0,ce.thisLine.fencedCodeEnd=!0,vt?ft(pe,ce,ce.block):we}else return ce.localMode?ce.localMode.token(pe,ce.localState):(pe.skipToEnd(),Ie.code)}function Se(pe){var ce=[];if(pe.formatting){ce.push(Ie.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var je=0;je<pe.formatting.length;je++)ce.push(Ie.formatting+"-"+pe.formatting[je]),pe.formatting[je]==="header"&&ce.push(Ie.formatting+"-"+pe.formatting[je]+"-"+pe.header),pe.formatting[je]==="quote"&&(!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=pe.quote?ce.push(Ie.formatting+"-"+pe.formatting[je]+"-"+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(Ie.linkHref,"url"):(pe.strong&&ce.push(Ie.strong),pe.em&&ce.push(Ie.em),pe.strikethrough&&ce.push(Ie.strikethrough),pe.emoji&&ce.push(Ie.emoji),pe.linkText&&ce.push(Ie.linkText),pe.code&&ce.push(Ie.code),pe.image&&ce.push(Ie.image),pe.imageAltText&&ce.push(Ie.imageAltText,"link"),pe.imageMarker&&ce.push(Ie.imageMarker)),pe.header&&ce.push(Ie.header,Ie.header+"-"+pe.header),pe.quote&&(ce.push(Ie.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=pe.quote?ce.push(Ie.quote+"-"+pe.quote):ce.push(Ie.quote+"-"+Ne.maxBlockquoteDepth)),pe.list!==!1){var vt=(pe.listStack.length-1)%3;vt?vt===1?ce.push(Ie.list2):ce.push(Ie.list3):ce.push(Ie.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 Oe(pe,ce){if(pe.match(Ze,!0))return Se(ce)}function qe(pe,ce){var je=ce.text(pe,ce);if(typeof je!="undefined")return je;if(ce.list)return ce.list=null,Se(ce);if(ce.taskList){var vt=pe.match(nt,!0)[1]===" ";return vt?ce.taskOpen=!0:ce.taskClosed=!0,Ne.highlightFormatting&&(ce.formatting="task"),ce.taskList=!1,Se(ce)}if(ce.taskOpen=!1,ce.taskClosed=!1,ce.header&&pe.match(/^#+$/,!0))return Ne.highlightFormatting&&(ce.formatting="header"),Se(ce);var ut=pe.next();if(ce.linkTitle){ce.linkTitle=!1;var we=ut;ut==="("&&(we=")"),we=(we+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ve="^\\s*(?:[^"+we+"\\\\]+|\\\\\\\\|\\\\.)"+we;if(pe.match(new RegExp(Ve),!0))return Ie.linkHref}if(ut==="`"){var Ge=ce.formatting;Ne.highlightFormatting&&(ce.formatting="code"),pe.eatWhile("`");var St=pe.current().length;if(ce.code==0&&(!ce.quote||St==1))return ce.code=St,Se(ce);if(St==ce.code){var Je=Se(ce);return ce.code=0,Je}else return ce.formatting=Ge,Se(ce)}else if(ce.code)return Se(ce);if(ut==="\\"&&(pe.next(),Ne.highlightFormatting)){var Ce=Se(ce),ve=Ie.formatting+"-escape";return Ce?Ce+" "+ve:ve}if(ut==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ce.imageMarker=!0,ce.image=!0,Ne.highlightFormatting&&(ce.formatting="image"),Se(ce);if(ut==="["&&ce.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ce.imageMarker=!1,ce.imageAltText=!0,Ne.highlightFormatting&&(ce.formatting="image"),Se(ce);if(ut==="]"&&ce.imageAltText){Ne.highlightFormatting&&(ce.formatting="image");var Ce=Se(ce);return ce.imageAltText=!1,ce.image=!1,ce.inline=ce.f=_e,Ce}if(ut==="["&&!ce.image)return ce.linkText&&pe.match(/^.*?\]/)||(ce.linkText=!0,Ne.highlightFormatting&&(ce.formatting="link")),Se(ce);if(ut==="]"&&ce.linkText){Ne.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return ce.linkText=!1,ce.inline=ce.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?_e:qe,Ce}if(ut==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Te,Ne.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return Ce?Ce+=" ":Ce="",Ce+Ie.linkInline}if(ut==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Te,Ne.highlightFormatting&&(ce.formatting="link");var Ce=Se(ce);return Ce?Ce+=" ":Ce="",Ce+Ie.linkEmail}if(Ne.xml&&ut==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Le=pe.string.indexOf(">",pe.pos);if(Le!=-1){var Ye=pe.string.substring(pe.start,Le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ye)&&(ce.md_inside=!0)}return pe.backUp(1),ce.htmlState=le.startState(He),ft(pe,ce,st)}if(Ne.xml&&ut==="<"&&pe.match(/^\/\w*?>/))return ce.md_inside=!1,"tag";if(ut==="*"||ut==="_"){for(var ie=1,ee=pe.pos==1?" ":pe.string.charAt(pe.pos-2);ie<3&&pe.eat(ut);)ie++;var z=pe.peek()||" ",re=!/\s/.test(z)&&(!Ae.test(z)||/\s/.test(ee)||Ae.test(ee)),ae=!/\s/.test(ee)&&(!Ae.test(ee)||/\s/.test(z)||Ae.test(z)),ne=null,ge=null;if(ie%2&&(!ce.em&&re&&(ut==="*"||!ae||Ae.test(ee))?ne=!0:ce.em==ut&&ae&&(ut==="*"||!re||Ae.test(z))&&(ne=!1)),ie>1&&(!ce.strong&&re&&(ut==="*"||!ae||Ae.test(ee))?ge=!0:ce.strong==ut&&ae&&(ut==="*"||!re||Ae.test(z))&&(ge=!1)),ge!=null||ne!=null){Ne.highlightFormatting&&(ce.formatting=ne==null?"strong":ge==null?"em":"strong em"),ne===!0&&(ce.em=ut),ge===!0&&(ce.strong=ut);var Je=Se(ce);return ne===!1&&(ce.em=!1),ge===!1&&(ce.strong=!1),Je}}else if(ut===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Se(ce);pe.backUp(1)}if(Ne.strikethrough){if(ut==="~"&&pe.eatWhile(ut)){if(ce.strikethrough){Ne.highlightFormatting&&(ce.formatting="strikethrough");var Je=Se(ce);return ce.strikethrough=!1,Je}else if(pe.match(/^[^\s]/,!1))return ce.strikethrough=!0,Ne.highlightFormatting&&(ce.formatting="strikethrough"),Se(ce)}else if(ut===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Se(ce);pe.backUp(2)}}if(Ne.emoji&&ut===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ce.emoji=!0,Ne.highlightFormatting&&(ce.formatting="emoji");var We=Se(ce);return ce.emoji=!1,We}return ut===" "&&(pe.match(/^ +$/,!1)?ce.trailingSpace++:ce.trailingSpace&&(ce.trailingSpaceNewLine=!0)),Se(ce)}function Te(pe,ce){var je=pe.next();if(je===">"){ce.f=ce.inline=qe,Ne.highlightFormatting&&(ce.formatting="link");var vt=Se(ce);return vt?vt+=" ":vt="",vt+Ie.linkInline}return pe.match(/^[^>]+/,!0),Ie.linkInline}function _e(pe,ce){if(pe.eatSpace())return null;var je=pe.next();return je==="("||je==="["?(ce.f=ce.inline=Fe(je==="("?")":"]"),Ne.highlightFormatting&&(ce.formatting="link-string"),ce.linkHref=!0,Se(ce)):"error"}var ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Fe(pe){return function(ce,je){var vt=ce.next();if(vt===pe){je.f=je.inline=qe,Ne.highlightFormatting&&(je.formatting="link-string");var ut=Se(je);return je.linkHref=!1,ut}return ce.match(ke[pe]),je.linkHref=!0,Se(je)}}function Et(pe,ce){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ce.f=$e,pe.next(),Ne.highlightFormatting&&(ce.formatting="link"),ce.linkText=!0,Se(ce)):tt(pe,ce,qe)}function $e(pe,ce){if(pe.match(/^\]:/,!0)){ce.f=ce.inline=gt,Ne.highlightFormatting&&(ce.formatting="link");var je=Se(ce);return ce.linkText=!1,je}return pe.match(/^([^\]\\]|\\.)+/,!0),Ie.linkText}function gt(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=qe,Ie.linkHref+" url")}var dt={startState:function(){return{f:at,prevLine:{stream:null},thisLine:{stream:null},block:at,htmlState:null,indentation:0,inline:qe,text:Oe,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&&le.copyState(He,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?le.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 rt(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!=st)){var je=pe.match(/^\s*/,!0)[0].replace(/\t/g,et).length;if(ce.indentation=je,ce.indentationDiff=null,je>0)return null}}return ce.f(pe,ce)},innerMode:function(pe){return pe.block==st?{state:pe.htmlState,mode:He}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:dt}},indent:function(pe,ce,je){return pe.block==st&&He.indent?He.indent(pe.htmlState,ce,je):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ce,je):le.Pass},blankLine:rt,getType:Se,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return dt},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(At,Rt,fe){(function(le){le(fe(89780))})(function(le){"use strict";le.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 Qe=0;Qe<le.modeInfo.length;Qe++){var Ne=le.modeInfo[Qe];Ne.mimes&&(Ne.mime=Ne.mimes[0])}le.findModeByMIME=function(He){He=He.toLowerCase();for(var ye=0;ye<le.modeInfo.length;ye++){var be=le.modeInfo[ye];if(be.mime==He)return be;if(be.mimes){for(var Ie=0;Ie<be.mimes.length;Ie++)if(be.mimes[Ie]==He)return be}}if(/\+xml$/.test(He))return le.findModeByMIME("application/xml");if(/\+json$/.test(He))return le.findModeByMIME("application/json")},le.findModeByExtension=function(He){He=He.toLowerCase();for(var ye=0;ye<le.modeInfo.length;ye++){var be=le.modeInfo[ye];if(be.ext){for(var Ie=0;Ie<be.ext.length;Ie++)if(be.ext[Ie]==He)return be}}},le.findModeByFileName=function(He){for(var ye=0;ye<le.modeInfo.length;ye++){var be=le.modeInfo[ye];if(be.file&&be.file.test(He))return be}var Ie=He.lastIndexOf("."),Ke=Ie>-1&&He.substring(Ie+1,He.length);if(Ke)return le.findModeByExtension(Ke)},le.findModeByName=function(He){He=He.toLowerCase();for(var ye=0;ye<le.modeInfo.length;ye++){var be=le.modeInfo[ye];if(be.name.toLowerCase()==He)return be;if(be.alias){for(var Ie=0;Ie<be.alias.length;Ie++)if(be.alias[Ie].toLowerCase()==He)return be}}}})},67549:function(At,Rt,fe){(function(le){le(fe(89780))})(function(le){"use strict";le.defineMode("stex",function(Qe,Ne){"use strict";function He(Ze,Be){Ze.cmdState.push(Be)}function ye(Ze){return Ze.cmdState.length>0?Ze.cmdState[Ze.cmdState.length-1]:null}function be(Ze){var Be=Ze.cmdState.pop();Be&&Be.closeBracket()}function Ie(Ze){for(var Be=Ze.cmdState,Re=Be.length-1;Re>=0;Re--){var Ae=Be[Re];if(Ae.name!="DEFAULT")return Ae}return{styleIdentifier:function(){return null}}}function Ke(Ze,Be,Re){return function(){this.name=Ze,this.bracketNo=0,this.style=Be,this.styles=Re,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ee={};Ee.importmodule=Ke("importmodule","tag",["string","builtin"]),Ee.documentclass=Ke("documentclass","tag",["","atom"]),Ee.usepackage=Ke("usepackage","tag",["atom"]),Ee.begin=Ke("begin","tag",["atom"]),Ee.end=Ke("end","tag",["atom"]),Ee.label=Ke("label","tag",["atom"]),Ee.ref=Ke("ref","tag",["atom"]),Ee.eqref=Ke("eqref","tag",["atom"]),Ee.cite=Ke("cite","tag",["atom"]),Ee.bibitem=Ke("bibitem","tag",["atom"]),Ee.Bibitem=Ke("Bibitem","tag",["atom"]),Ee.RBibitem=Ke("RBibitem","tag",["atom"]),Ee.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function de(Ze,Be){Ze.f=Be}function nt(Ze,Be){var Re;if(Ze.match(/^\\[a-zA-Z@]+/)){var Ae=Ze.current().slice(1);return Re=Ee.hasOwnProperty(Ae)?Ee[Ae]:Ee.DEFAULT,Re=new Re,He(Be,Re),de(Be,lt),Re.style}if(Ze.match(/^\\[$&%#{}_]/)||Ze.match(/^\\[,;!\/\\]/))return"tag";if(Ze.match("\\["))return de(Be,function(tt,ft){return me(tt,ft,"\\]")}),"keyword";if(Ze.match("\\("))return de(Be,function(tt,ft){return me(tt,ft,"\\)")}),"keyword";if(Ze.match("$$"))return de(Be,function(tt,ft){return me(tt,ft,"$$")}),"keyword";if(Ze.match("$"))return de(Be,function(tt,ft){return me(tt,ft,"$")}),"keyword";var et=Ze.next();if(et=="%")return Ze.skipToEnd(),"comment";if(et=="}"||et=="]"){if(Re=ye(Be),Re)Re.closeBracket(et),de(Be,lt);else return"error";return"bracket"}else return et=="{"||et=="["?(Re=Ee.DEFAULT,Re=new Re,He(Be,Re),"bracket"):/\d/.test(et)?(Ze.eatWhile(/[\w.%]/),"atom"):(Ze.eatWhile(/[\w\-_]/),Re=Ie(Be),Re.name=="begin"&&(Re.argument=Ze.current()),Re.styleIdentifier())}function me(Ze,Be,Re){if(Ze.eatSpace())return null;if(Re&&Ze.match(Re))return de(Be,nt),"keyword";if(Ze.match(/^\\[a-zA-Z@]+/))return"tag";if(Ze.match(/^[a-zA-Z]+/))return"variable-2";if(Ze.match(/^\\[$&%#{}_]/)||Ze.match(/^\\[,;!\/]/)||Ze.match(/^[\^_&]/))return"tag";if(Ze.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ze.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ae=Ze.next();return Ae=="{"||Ae=="}"||Ae=="["||Ae=="]"||Ae=="("||Ae==")"?"bracket":Ae=="%"?(Ze.skipToEnd(),"comment"):"error"}function lt(Ze,Be){var Re=Ze.peek(),Ae;return Re=="{"||Re=="["?(Ae=ye(Be),Ae.openBracket(Re),Ze.eat(Re),de(Be,nt),"bracket"):/[ \t\r]/.test(Re)?(Ze.eat(Re),null):(de(Be,nt),be(Be),nt(Ze,Be))}return{startState:function(){var Ze=Ne.inMathMode?function(Be,Re){return me(Be,Re)}:nt;return{cmdState:[],f:Ze}},copyState:function(Ze){return{cmdState:Ze.cmdState.slice(),f:Ze.f}},token:function(Ze,Be){return Be.f(Ze,Be)},blankLine:function(Ze){Ze.f=nt,Ze.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(At,Rt,fe){(function(le){le(fe(89780))})(function(le){"use strict";var Qe={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},Ne={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(He,ye){var be=He.indentUnit,Ie={},Ke=ye.htmlMode?Qe:Ne;for(var Ee in Ke)Ie[Ee]=Ke[Ee];for(var Ee in ye)Ie[Ee]=ye[Ee];var de,nt;function me(Te,_e){function ke($e){return _e.tokenize=$e,$e(Te,_e)}var Fe=Te.next();if(Fe=="<")return Te.eat("!")?Te.eat("[")?Te.match("CDATA[")?ke(Be("atom","]]>")):null:Te.match("--")?ke(Be("comment","-->")):Te.match("DOCTYPE",!0,!0)?(Te.eatWhile(/[\w\._\-]/),ke(Re(1))):null:Te.eat("?")?(Te.eatWhile(/[\w\._\-]/),_e.tokenize=Be("meta","?>"),"meta"):(de=Te.eat("/")?"closeTag":"openTag",_e.tokenize=lt,"tag bracket");if(Fe=="&"){var Et;return Te.eat("#")?Te.eat("x")?Et=Te.eatWhile(/[a-fA-F\d]/)&&Te.eat(";"):Et=Te.eatWhile(/[\d]/)&&Te.eat(";"):Et=Te.eatWhile(/[\w\.\-:]/)&&Te.eat(";"),Et?"atom":"error"}else return Te.eatWhile(/[^&<]/),null}me.isInText=!0;function lt(Te,_e){var ke=Te.next();if(ke==">"||ke=="/"&&Te.eat(">"))return _e.tokenize=me,de=ke==">"?"endTag":"selfcloseTag","tag bracket";if(ke=="=")return de="equals",null;if(ke=="<"){_e.tokenize=me,_e.state=ft,_e.tagName=_e.tagStart=null;var Fe=_e.tokenize(Te,_e);return Fe?Fe+" tag error":"tag error"}else return/[\'\"]/.test(ke)?(_e.tokenize=Ze(ke),_e.stringStartCol=Te.column(),_e.tokenize(Te,_e)):(Te.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ze(Te){var _e=function(ke,Fe){for(;!ke.eol();)if(ke.next()==Te){Fe.tokenize=lt;break}return"string"};return _e.isInAttribute=!0,_e}function Be(Te,_e){return function(ke,Fe){for(;!ke.eol();){if(ke.match(_e)){Fe.tokenize=me;break}ke.next()}return Te}}function Re(Te){return function(_e,ke){for(var Fe;(Fe=_e.next())!=null;){if(Fe=="<")return ke.tokenize=Re(Te+1),ke.tokenize(_e,ke);if(Fe==">")if(Te==1){ke.tokenize=me;break}else return ke.tokenize=Re(Te-1),ke.tokenize(_e,ke)}return"meta"}}function Ae(Te,_e,ke){this.prev=Te.context,this.tagName=_e,this.indent=Te.indented,this.startOfLine=ke,(Ie.doNotIndent.hasOwnProperty(_e)||Te.context&&Te.context.noIndent)&&(this.noIndent=!0)}function et(Te){Te.context&&(Te.context=Te.context.prev)}function tt(Te,_e){for(var ke;;){if(!Te.context||(ke=Te.context.tagName,!Ie.contextGrabbers.hasOwnProperty(ke)||!Ie.contextGrabbers[ke].hasOwnProperty(_e)))return;et(Te)}}function ft(Te,_e,ke){return Te=="openTag"?(ke.tagStart=_e.column(),ct):Te=="closeTag"?rt:ft}function ct(Te,_e,ke){return Te=="word"?(ke.tagName=_e.current(),nt="tag",Vt):Ie.allowMissingTagName&&Te=="endTag"?(nt="tag bracket",Vt(Te,_e,ke)):(nt="error",ct)}function rt(Te,_e,ke){if(Te=="word"){var Fe=_e.current();return ke.context&&ke.context.tagName!=Fe&&Ie.implicitlyClosed.hasOwnProperty(ke.context.tagName)&&et(ke),ke.context&&ke.context.tagName==Fe||Ie.matchClosing===!1?(nt="tag",at):(nt="tag error",st)}else return Ie.allowMissingTagName&&Te=="endTag"?(nt="tag bracket",at(Te,_e,ke)):(nt="error",st)}function at(Te,_e,ke){return Te!="endTag"?(nt="error",at):(et(ke),ft)}function st(Te,_e,ke){return nt="error",at(Te,_e,ke)}function Vt(Te,_e,ke){if(Te=="word")return nt="attribute",Se;if(Te=="endTag"||Te=="selfcloseTag"){var Fe=ke.tagName,Et=ke.tagStart;return ke.tagName=ke.tagStart=null,Te=="selfcloseTag"||Ie.autoSelfClosers.hasOwnProperty(Fe)?tt(ke,Fe):(tt(ke,Fe),ke.context=new Ae(ke,Fe,Et==ke.indented)),ft}return nt="error",Vt}function Se(Te,_e,ke){return Te=="equals"?Oe:(Ie.allowMissing||(nt="error"),Vt(Te,_e,ke))}function Oe(Te,_e,ke){return Te=="string"?qe:Te=="word"&&Ie.allowUnquoted?(nt="string",Vt):(nt="error",Vt(Te,_e,ke))}function qe(Te,_e,ke){return Te=="string"?qe:Vt(Te,_e,ke)}return{startState:function(Te){var _e={tokenize:me,state:ft,indented:Te||0,tagName:null,tagStart:null,context:null};return Te!=null&&(_e.baseIndent=Te),_e},token:function(Te,_e){if(!_e.tagName&&Te.sol()&&(_e.indented=Te.indentation()),Te.eatSpace())return null;de=null;var ke=_e.tokenize(Te,_e);return(ke||de)&&ke!="comment"&&(nt=null,_e.state=_e.state(de||ke,Te,_e),nt&&(ke=nt=="error"?ke+" error":nt)),ke},indent:function(Te,_e,ke){var Fe=Te.context;if(Te.tokenize.isInAttribute)return Te.tagStart==Te.indented?Te.stringStartCol+1:Te.indented+be;if(Fe&&Fe.noIndent)return le.Pass;if(Te.tokenize!=lt&&Te.tokenize!=me)return ke?ke.match(/^(\s*)/)[0].length:0;if(Te.tagName)return Ie.multilineTagIndentPastTag!==!1?Te.tagStart+Te.tagName.length+2:Te.tagStart+be*(Ie.multilineTagIndentFactor||1);if(Ie.alignCDATA&&/<!\[CDATA\[/.test(_e))return 0;var Et=_e&&/^<(\/)?([\w_:\.-]*)/.exec(_e);if(Et&&Et[1])for(;Fe;)if(Fe.tagName==Et[2]){Fe=Fe.prev;break}else if(Ie.implicitlyClosed.hasOwnProperty(Fe.tagName))Fe=Fe.prev;else break;else if(Et)for(;Fe;){var $e=Ie.contextGrabbers[Fe.tagName];if($e&&$e.hasOwnProperty(Et[2]))Fe=Fe.prev;else break}for(;Fe&&Fe.prev&&!Fe.startOfLine;)Fe=Fe.prev;return Fe?Fe.indent+be:Te.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ie.htmlMode?"html":"xml",helperType:Ie.htmlMode?"html":"xml",skipAttribute:function(Te){Te.state==Oe&&(Te.state=Vt)},xmlCurrentTag:function(Te){return Te.tagName?{name:Te.tagName,close:Te.type=="closeTag"}:null},xmlCurrentContext:function(Te){for(var _e=[],ke=Te.context;ke;ke=ke.prev)ke.tagName&&_e.push(ke.tagName);return _e.reverse()}}}),le.defineMIME("text/xml","xml"),le.defineMIME("application/xml","xml"),le.mimeModes.hasOwnProperty("text/html")||le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(At,Rt,fe){"use strict";fe.d(Rt,{hP:function(){return Ye}});var le=function(ie,ee){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var ae in re)Object.prototype.hasOwnProperty.call(re,ae)&&(z[ae]=re[ae])})(ie,ee)};function Qe(ie,ee){function z(){this.constructor=ie}le(ie,ee),ie.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function Ne(ie,ee,z,re){return new(z||(z=Promise))(function(ae,ne){function ge(yt){try{xt(re.next(yt))}catch(ht){ne(ht)}}function We(yt){try{xt(re.throw(yt))}catch(ht){ne(ht)}}function xt(yt){var ht;yt.done?ae(yt.value):(ht=yt.value,ht instanceof z?ht:new z(function(mt){mt(ht)})).then(ge,We)}xt((re=re.apply(ie,ee||[])).next())})}function He(ie,ee){var z,re,ae,ne,ge={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return ne={next:We(0),throw:We(1),return:We(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function We(xt){return function(yt){return function(ht){if(z)throw new TypeError("Generator is already executing.");for(;ge;)try{if(z=1,re&&(ae=2&ht[0]?re.return:ht[0]?re.throw||((ae=re.return)&&ae.call(re),0):re.next)&&!(ae=ae.call(re,ht[1])).done)return ae;switch(re=0,ae&&(ht=[2&ht[0],ae.value]),ht[0]){case 0:case 1:ae=ht;break;case 4:return ge.label++,{value:ht[1],done:!1};case 5:ge.label++,re=ht[1],ht=[0];continue;case 7:ht=ge.ops.pop(),ge.trys.pop();continue;default:if(ae=ge.trys,!((ae=ae.length>0&&ae[ae.length-1])||ht[0]!==6&&ht[0]!==2)){ge=0;continue}if(ht[0]===3&&(!ae||ht[1]>ae[0]&&ht[1]<ae[3])){ge.label=ht[1];break}if(ht[0]===6&&ge.label<ae[1]){ge.label=ae[1],ae=ht;break}if(ae&&ge.label<ae[2]){ge.label=ae[2],ge.ops.push(ht);break}ae[2]&&ge.ops.pop(),ge.trys.pop();continue}ht=ee.call(ie,ge)}catch(mt){ht=[6,mt],re=0}finally{z=ae=0}if(5&ht[0])throw ht[1];return{value:ht[0]?ht[1]:void 0,done:!0}}([xt,yt])}}}function ye(){for(var ie=0,ee=0,z=arguments.length;ee<z;ee++)ie+=arguments[ee].length;var re=Array(ie),ae=0;for(ee=0;ee<z;ee++)for(var ne=arguments[ee],ge=0,We=ne.length;ge<We;ge++,ae++)re[ae]=ne[ge];return re}var be=function(){function ie(){}return ie.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ie.setAttributes=function(ee,z){for(var re=0,ae=z;re<ae.length;re++){var ne=ae[re],ge=ne[0],We=ne[1];ee.setAttribute(ge,We)}},ie.createRect=function(ee,z,re){var ae=document.createElementNS("http://www.w3.org/2000/svg","rect");return ae.setAttribute("width",ee.toString()),ae.setAttribute("height",z.toString()),re&&ie.setAttributes(ae,re),ae},ie.createLine=function(ee,z,re,ae,ne){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",ee.toString()),ge.setAttribute("y1",z.toString()),ge.setAttribute("x2",re.toString()),ge.setAttribute("y2",ae.toString()),ne&&ie.setAttributes(ge,ne),ge},ie.createPolygon=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",ee),z&&ie.setAttributes(re,z),re},ie.createCircle=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(ee/2).toString()),re.setAttribute("cy",(ee/2).toString()),re.setAttribute("r",ee.toString()),z&&ie.setAttributes(re,z),re},ie.createEllipse=function(ee,z,re){var ae=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ae.setAttribute("cx",(ee/2).toString()),ae.setAttribute("cy",(z/2).toString()),ae.setAttribute("rx",(ee/2).toString()),ae.setAttribute("ry",(z/2).toString()),re&&ie.setAttributes(ae,re),ae},ie.createGroup=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return ee&&ie.setAttributes(z,ee),z},ie.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ie.createMarker=function(ee,z,re,ae,ne,ge,We){var xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ie.setAttributes(xt,[["id",ee],["orient",z],["markerWidth",re.toString()],["markerHeight",ae.toString()],["refX",ne.toString()],["refY",ge.toString()]]),xt.appendChild(We),xt},ie.createText=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),ee&&ie.setAttributes(z,ee),z},ie.createTSpan=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=ee,z&&ie.setAttributes(re,z),re},ie.createImage=function(ee){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return ee&&ie.setAttributes(z,ee),z},ie.createPoint=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=ee,re.y=z,re},ie.createPath=function(ee,z){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",ee),z&&ie.setAttributes(re,z),re},ie}(),Ie=function(){function ie(){}return ie.addKey=function(ee){ie.key=ee},Object.defineProperty(ie,"isLicensed",{get:function(){return!!ie.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ie.key)},enumerable:!1,configurable:!0}),ie}(),Ke=function(){function ie(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ie.prototype.rasterize=function(ee,z,re){var ae=this;return new Promise(function(ne){var ge=re!==void 0?re:document.createElement("canvas");ee===null&&(ae.markersOnly=!0,ae.naturalSize=!1);var We=document.createElementNS("http://www.w3.org/2000/svg","svg");We.setAttribute("xmlns","http://www.w3.org/2000/svg"),We.setAttribute("width",z.width.baseVal.valueAsString),We.setAttribute("height",z.height.baseVal.valueAsString),We.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),We.innerHTML=z.innerHTML,ae.naturalSize===!0?(We.width.baseVal.value=ee.naturalWidth,We.height.baseVal.value=ee.naturalHeight):ae.width!==void 0&&ae.height!==void 0&&(We.width.baseVal.value=ae.width,We.height.baseVal.value=ae.height),ge.width=We.width.baseVal.value,ge.height=We.height.baseVal.value;var xt=We.outerHTML,yt=ge.getContext("2d");ae.markersOnly!==!0&&yt.drawImage(ee,0,0,ge.width,ge.height);var ht=window.URL,mt=new Image(ge.width,ge.height);mt.setAttribute("crossOrigin","anonymous");var Nt=new Blob([xt],{type:"image/svg+xml"}),Dt=ht.createObjectURL(Nt);mt.onload=function(){yt.drawImage(mt,0,0),ht.revokeObjectURL(Dt);var Ft=ge.toDataURL(ae.imageType,ae.imageQuality);ne(Ft)},mt.src=Dt})},ie}(),Ee=function(){},de=function(){function ie(ee){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ee+"_"}return Object.defineProperty(ie.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ie.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(ie.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ie.prototype.addClass=function(ee){return this.styleSheet===void 0&&this.addStyleSheet(),ee.name=""+this.classNamePrefix+ee.localName,this.classes.push(ee),this.styleSheet.sheet.insertRule("."+ee.name+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length),ee},ie.prototype.addRule=function(ee){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ee),this.styleSheet.sheet.insertRule(ee.selector+" {"+ee.style+"}",this.styleSheet.sheet.cssRules.length)},ie.prototype.addStyleSheet=function(){var ee;this.styleSheet=document.createElement("style"),((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).appendChild(this.styleSheet),this.addRule(new nt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new nt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new me("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new me("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ie.prototype.removeStyleSheet=function(){var ee;this.styleSheet&&(((ee=this.styleSheetRoot)!==null&&ee!==void 0?ee:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ie}(),nt=function(ie,ee){this.selector=ie,this.style=ee},me=function(ie,ee){this.localName=ie,this.style=ee},lt=function(){function ie(ee,z,re,ae,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=re,this.uiStyleSettings=ae,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ie.prototype.show=function(ee){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",this.uiContainer.appendChild(re),this.addActionButton(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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(re,'<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=""+z.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",ne.typeName),ge.innerHTML=ne.icon,ge.addEventListener("click",function(){z.markerToolbarButtonClicked(ge,ne)}),z.buttons.push(ge),z.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 ae=document.createElement("div");ae.className=this.toolbarBlockStyleClass.name,ae.style.whiteSpace="nowrap",ae.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ae),this.addActionButton(ae,'<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(ae,'<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()},ie.prototype.addButtonClickListener=function(ee){this.buttonClickListeners.push(ee)},ie.prototype.removeButtonClickListener=function(ee){this.buttonClickListeners.indexOf(ee)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ee),1)},ie.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ie.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ee=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<ee||z===ee&&this.markerButtons.length-1===ee?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===ee&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},ie.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")},ie.prototype.resetButtonStyles=function(){var ee=this;this.buttons.forEach(function(z){z.className=z.className.replace(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ee.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ee.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(ee.uiStyleSettings.toolbarButtonStyleColorsClassName?ee.uiStyleSettings.toolbarButtonStyleColorsClassName:ee.toolbarButtonStyleColorsClass.name)})},ie.prototype.addActionButton=function(ee,z,re){var ae=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){ae.actionToolbarButtonClicked(ne,re)}),re){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}ee.appendChild(ne),this.buttons.push(ne)},ie.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new me("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 me("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new me("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new me("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 me("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new me("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new me("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new nt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ie.prototype.markerToolbarButtonClicked=function(ee,z){this.setActiveButton(ee),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ie.prototype.actionToolbarButtonClicked=function(ee,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ie.prototype.setActiveButton=function(ee){this.resetButtonStyles(),ee.className=ee.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ie.prototype.setActiveMarkerButton=function(ee){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===ee});z&&this.setActiveButton(z)},ie.prototype.setCurrentMarker=function(ee){var z=this;this.currentMarker=ee,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){z.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},ie}(),Ze=function(){function ie(ee,z,re,ae){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=re,this.styles=ae,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ie.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new me("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 me("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("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 me("toolbox-panel-row_colors",`
|
|
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
padding: `+z+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new nt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ie.prototype.show=function(ee){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ee,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ie.prototype.setPanelButtons=function(ee){var z,re,ae=this;this.panels=ee,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ge;ne.uiStyleSettings=ae.uiStyleSettings;var We=document.createElement("div");We.className=ae.toolboxButtonStyleClass.name+" "+((ge=ae.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:ae.toolboxButtonStyleColorsClass.name),We.innerHTML=ne.icon,We.title=ne.title,We.addEventListener("click",function(){ae.panelButtonClick(ne)}),ae.panelButtons.push(We),ae.buttonRow.appendChild(We)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ie.prototype.panelButtonClick=function(ee){var z=this,re=-1;if(ee!==this.activePanel){re=this.panels.indexOf(ee),this.panelRow.innerHTML="";var ae=ee.getUi();ae.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ae),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=ee}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ge){var We,xt;ne.className=z.toolboxButtonStyleClass.name+" "+(ge===re?""+((We=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&We!==void 0?We:z.toolboxActiveButtonStyleColorsClass.name):""+((xt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xt!==void 0?xt:z.toolboxButtonStyleColorsClass.name))})},ie}(),Be=function(ie,ee){this.title=ie,this.icon=ee},Re=function(ie){function ee(z,re,ae,ne){var ge=ie.call(this,z,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=re,ge.currentColor=ae,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return Qe(ee,ie),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(ae){var ne=z.getColorBox(ae);re.appendChild(ne),z.colorBoxes.push(ne)}),re},ee.prototype.getColorBox=function(z){var re=this,ae=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ae,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=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){re.setCurrentColor(z,ge)});var We=document.createElement("div");return We.style.display="inline-block",We.style.width=ne-2+"px",We.style.height=ne-2+"px",We.style.backgroundColor=z,We.style.borderRadius=ne/2+"px",z==="transparent"&&(We.style.fill=this.uiStyleSettings.toolboxAccentColor,We.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(We),ge},ee.prototype.setCurrentColor=function(z,re){var ae=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(Be),Ae=function(){function ie(ee,z,re){this._state="new",this._isSelected=!1,this._container=ee,this._overlayContainer=z,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ie.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ie.prototype.ownsTarget=function(ee){return!1},Object.defineProperty(ie.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ie.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ie.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ie.prototype.pointerDown=function(ee,z){},ie.prototype.dblClick=function(ee,z){},ie.prototype.manipulate=function(ee){},ie.prototype.pointerUp=function(ee){this.stateChanged()},ie.prototype.dispose=function(){},ie.prototype.addMarkerVisualToContainer=function(ee){this.container.childNodes.length>0?this.container.insertBefore(ee,this.container.childNodes[0]):this.container.appendChild(ee)},ie.prototype.getState=function(){return{typeName:ie.typeName,state:this.state,notes:this.notes}},ie.prototype.restoreState=function(ee){this._state=ee.state,this.notes=ee.notes},ie.prototype.scale=function(ee,z){},ie.prototype.colorChanged=function(ee){this.onColorChanged&&this.onColorChanged(ee),this.stateChanged()},ie.prototype.fillColorChanged=function(ee){this.onFillColorChanged&&this.onFillColorChanged(ee),this.stateChanged()},ie.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ee=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ee.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ee)&&this.onStateChanged(this)}},ie.typeName="MarkerBase",ie}(),et=function(){function ie(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ie.prototype.findGripByVisual=function(ee){return this.topLeft.ownsTarget(ee)?this.topLeft:this.topCenter.ownsTarget(ee)?this.topCenter:this.topRight.ownsTarget(ee)?this.topRight:this.centerLeft.ownsTarget(ee)?this.centerLeft:this.centerRight.ownsTarget(ee)?this.centerRight:this.bottomLeft.ownsTarget(ee)?this.bottomLeft:this.bottomCenter.ownsTarget(ee)?this.bottomCenter:this.bottomRight.ownsTarget(ee)?this.bottomRight:void 0},ie}(),tt=function(){function ie(){this.GRIP_SIZE=10,this.visual=be.createGroup(),this.visual.appendChild(be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(be.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ie.prototype.ownsTarget=function(ee){return ee===this.visual||ee===this.visual.childNodes[0]||ee===this.visual.childNodes[1]},ie}(),ft=function(){function ie(){}return ie.toITransformMatrix=function(ee){return{a:ee.a,b:ee.b,c:ee.c,d:ee.d,e:ee.e,f:ee.f}},ie.toSVGMatrix=function(ee,z){return ee.a=z.a,ee.b=z.b,ee.c=z.c,ee.d=z.d,ee.e=z.e,ee.f=z.f,ee},ie}(),ct=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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(be.createTransform()),ne.setupControlBox(),ne}return Qe(ee,ie),Object.defineProperty(ee.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=be.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!!ie.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ae=this.unrotatePoint(z);if(this.manipulationStartX=ae.x,this.manipulationStartY=ae.y,this.offsetX=ae.x-this.left,this.offsetY=ae.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){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"},ee.prototype.pointerUp=function(z){var re=this.state;ie.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ee.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},ee.prototype.manipulate=function(z){var re=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(z)},ee.prototype.resize=function(z){var re=this.manipulationStartLeft,ae=this.manipulationStartWidth,ne=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,ae=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ae=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.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+z.y-this.manipulationStartY}ae>=0?(this.left=re,this.width=ae):(this.left=re+ae,this.width=-ae),ge>=0?(this.top=ne,this.height=ge):(this.top=ne+ge,this.height=-ge),this.setSize()},ee.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ee.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var re=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},ee.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},ee.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),ae=be.createPoint(z.x,z.y);return{x:(ae=ae.matrixTransform(re)).x,y:ae.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var ae=be.createPoint(z.x,z.y);return{x:(ae=ae.matrixTransform(re)).x,y:ae.y}},ee.prototype.select=function(){ie.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){ie.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=be.createGroup();var z=be.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=be.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=be.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 et,this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,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()},ee.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()},ee.prototype.createGrip=function(){var z=new tt;return z.visual.transform.baseVal.appendItem(be.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,ae=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,ge=(this.height+this.CB_DISTANCE)/2-z/2,We=this.height+this.CB_DISTANCE-z/2,xt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,ae),this.positionGrip(this.controlGrips.topCenter.visual,ne,ae),this.positionGrip(this.controlGrips.topRight.visual,xt,ae),this.positionGrip(this.controlGrips.centerLeft.visual,re,ge),this.positionGrip(this.controlGrips.centerRight.visual,xt,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,re,We),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,We),this.positionGrip(this.controlGrips.bottomRight.visual,xt,We),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ae-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,re,ae){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,ae),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ee.prototype.showControlBox=function(){this.controlBox.style.display=""},ee.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ft.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ft.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ie.prototype.getState.call(this))},ee.prototype.restoreState=function(z){ie.prototype.restoreState.call(this,z);var re=z;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ft.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re);var ae=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ae.x*z,y:ae.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},ee}(Ae),rt=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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 Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=be.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)},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){ie.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){ie.prototype.setSize.call(this),be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){ie.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&be.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ie.prototype.getState.call(this))},ee.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),ie.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.setSize()},ee.title="Rectangle marker",ee}(ct),at=function(ie){function ee(z,re,ae,ne){var ge=ie.call(this,z,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=re,ge.currentWidth=ae,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return Qe(ee,ie),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.widths.forEach(function(ae){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=ae===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(ae,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.innerText=ae.toString(),ge.style.marginRight="5px",ne.appendChild(ge);var We=document.createElement("div");We.style.minHeight="20px",We.style.flexGrow="2",We.style.display="flex",We.style.alignItems="center";var xt=document.createElement("hr");xt.style.minWidth="20px",xt.style.border="0px",xt.style.borderTop=ae+"px solid "+z.uiStyleSettings.toolboxColor,xt.style.flexGrow="2",We.appendChild(xt),ne.appendChild(We),z.widthBoxes.push(ne)}),re},ee.prototype.setCurrentWidth=function(z,re){var ae=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(Be),st=function(ie){function ee(z,re,ae,ne){var ge=ie.call(this,z,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=re,ge.currentStyle=ae,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return Qe(ee,ie),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.styles.forEach(function(ae){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/z.styles.length-5+"%",ne.style.borderColor=ae===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(ae,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var We=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ae!==""?'stroke-dasharray="'+ae+'"':"")+` />
|
|
</svg>`;ge.innerHTML=We,ne.appendChild(ge),z.styleBoxes.push(ne)}),re},ee.prototype.setCurrentStyle=function(z,re){var ae=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(Be),Vt=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||this;return ne.strokeColor=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",ae.defaultColorSet,ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new at("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new st("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Qe(ee,ie),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ie.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="FrameMarker",ee.title="Frame marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ee}(rt),Se=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"},Oe=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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 Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!!ie.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.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(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ee.prototype.pointerUp=function(z){var re=this.state;ie.prototype.pointerUp.call(this,z),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(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ee.prototype.adjustVisual=function(){},ee.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},ee.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},ee.prototype.select=function(){ie.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ee.prototype.deselect=function(){ie.prototype.deselect.call(this),this.controlBox.style.display="none"},ee.prototype.setupControlBox=function(){this.controlBox=be.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ee.prototype.adjustControlBox=function(){this.positionGrips()},ee.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ee.prototype.createGrip=function(){var z=new tt;return z.visual.transform.baseVal.appendItem(be.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},ee.prototype.positionGrip=function(z,re,ae){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,ae),z.transform.baseVal.replaceItem(ne,0)},ee.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ie.prototype.getState.call(this))},ee.prototype.restoreState=function(z){ie.prototype.restoreState.call(this,z);var re=z;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.x1=this.x1*z,this.y1=this.y1*re,this.x2=this.x2*z,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},ee}(Ae),qe=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",ae.defaultColorSet,ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new at("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new st("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},ee.prototype.createVisual=function(){this.visual=be.createGroup(),this.selectorLine=be.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=be.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)},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ee.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()),be.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),be.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ie.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},ee.typeName="LineMarker",ee.title="Line marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ee}(Oe),Te=function(ie){function ee(z,re,ae,ne){var ge=ie.call(this,z,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=re,ge.currentFont=ae,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return Qe(ee,ie),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(ae){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/z.fonts.length-5+"%",ne.style.borderColor=ae===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(ae,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=ae,ge.style.overflow="hidden";var We=document.createElement("div");We.style.whiteSpace="nowrap",We.style.overflow="hidden",We.style.textOverflow="ellipsis",We.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(We),ne.appendChild(ge),z.fontBoxes.push(ne)}),re},ee.prototype.setCurrentFont=function(z,re){var ae=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(Be),_e=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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=ae.defaultColor,ne.fontFamily=ae.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 Re("Color",ae.defaultColorSet,ae.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Te("Font",ae.defaultFontFamilies,ae.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){if(ie.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(ae){ae===z&&(re=!0)}),re},ee.prototype.createVisual=function(){this.visual=be.createGroup(),this.bgRectangle=be.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=be.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(be.createTransform()),this.textElement.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.renderText=function(){var z=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(re){z.textElement.appendChild(be.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ee.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var ae=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(ae,ne)}return re},ee.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),ae=0,ne=0;return re.width>0&&re.height>0&&(ae=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:ae,y:ne}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),ae=this.getTextPosition(re);ae.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ae.x+"px, "+ae.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ae.x,ae.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},ee.prototype.manipulate=function(z){ie.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},ee.prototype.setSize=function(){ie.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ee.prototype.pointerUp=function(z){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),ie.prototype.pointerUp.call(this,z),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ee.prototype.showTextEditor=function(){var z=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(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&re>.9;)re-=.1,z.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var ae=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ae)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ee.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ae=this.textElement.getBBox(),ne={x:ae.width*z,y:ae.height*z};re.x-=ne.x/2,re.y-=ne.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},ee.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ee.prototype.select=function(){ie.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ee.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ie.prototype.deselect.call(this)},ee.prototype.dblClick=function(z,re){ie.prototype.dblClick.call(this,z,re),this.showTextEditor()},ee.prototype.setColor=function(z){this.textElement&&be.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},ee.prototype.setFont=function(z){this.textElement&&be.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ee.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ee.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),ie.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},ee.typeName="TextMarker",ee.title="Text marker",ee.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>',ee}(ct),ke=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ae.defaultColor,ne.lineWidth=ae.defaultStrokeWidth,ne.pixelRatio=ae.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 Re("Color",ae.defaultColorSet,ae.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new at("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},ee.prototype.createVisual=function(){this.visual=be.createGroup(),this.drawingImage=be.createImage(),this.visual.appendChild(this.drawingImage);var z=be.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},ee.prototype.pointerDown=function(z,re){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(z.x,z.y),this.drawing=!0):ie.prototype.pointerDown.call(this,z,re)},ee.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):ie.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ee.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ie.prototype.pointerUp.call(this,z)},ee.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)},ee.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ie.prototype.select.call(this)},ee.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ie.prototype.deselect.call(this)},ee.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ae=re[0],ne=re[1],ge=re[2],We=re[3],xt=!1,yt=0;yt<this.canvasElement.height;yt++)for(var ht=0;ht<this.canvasElement.width;ht++)z.data[yt*this.canvasElement.width*4+4*ht+3]>0&&(xt=!0,yt<ne&&(ne=yt),ht<ae&&(ae=ht),yt>We&&(We=yt),ht>ge&&(ge=ht));if(xt){this.left=ae/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ge-ae)/this.pixelRatio,this.height=(We-ne)/this.pixelRatio;var mt=document.createElement("canvas");mt.width=ge-ae,mt.height=We-ne,mt.getContext("2d").putImageData(this.canvasContext.getImageData(ae,ne,ge-ae,We-ne),0,0),this.drawingImgUrl=mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),be.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ee.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},ee.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){this.createVisual(),ie.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.setDrawingImage()},ee.typeName="FreehandMarker",ee.title="Freehand marker",ee.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>',ee}(ct),Fe=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,ae||'<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=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Qe(ee,ie),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var ae=function(We){var xt="both";switch(We){case 0:xt="both";break;case 1:xt="start";break;case 2:xt="end";break;case 3:xt="none"}var yt=document.createElement("div");if(yt.style.display="flex",yt.style.flexGrow="2",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=xt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){z.setCurrentType(xt,yt)}),re.appendChild(yt),xt==="both"||xt==="start"){var ht=document.createElement("div");ht.style.display="flex",ht.style.alignItems="center",ht.style.minHeight="20px",ht.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>`,ht.style.marginLeft="5px",yt.appendChild(ht)}var mt=document.createElement("div");mt.style.display="flex",mt.style.alignItems="center",mt.style.minHeight="20px",mt.style.flexGrow="2";var Nt=document.createElement("hr");if(Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Nt.style.flexGrow="2",mt.appendChild(Nt),yt.appendChild(mt),xt==="both"||xt==="end"){var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.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>`,Dt.style.marginRight="5px",yt.appendChild(Dt)}ne.typeBoxes.push(yt)},ne=this,ge=0;ge<4;ge++)ae(ge);return re},ee.prototype.setCurrentType=function(z,re){var ae=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(Be),Et=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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 Fe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},ee.prototype.getArrowPoints=function(z,re){var ae=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-ae/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+ae/2)+","+(re+ne/2)},ee.prototype.createTips=function(){this.arrow1=be.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=be.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(be.createTransform()),this.visual.appendChild(this.arrow2)},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(ie.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",be.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),be.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var ae=this.arrow2.transform.baseVal.getItem(0);ae.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ae,0)}},ee.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ie.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},ee.typeName="ArrowMarker",ee.title="Arrow marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ee}(qe),$e=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||this;return ne.fillColor=ae.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Re("Color",ae.defaultColorSet,ae.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Qe(ee,ie),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ie.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="CoverMarker",ee.title="Cover marker",ee.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ee}(rt),gt=function(ie){function ee(z,re,ae,ne){var ge=ie.call(this,z,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=re,ge.currentOpacity=ae,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return Qe(ee,ie),ee.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.style.justifyContent="space-between",this.opacities.forEach(function(ae){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=ae===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(ae,ne)}),re.appendChild(ne);var ge=document.createElement("div");ge.innerText=100*ae+"%",ne.appendChild(ge),z.opacityBoxes.push(ne)}),re},ee.prototype.setCurrentOpacity=function(z,re){var ae=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(Be),dt=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ae.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ae.defaultHighlightOpacity,ne.fillPanel=new Re("Color",ae.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new gt("Opacity",ae.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Qe(ee,ie),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ie.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="HighlightMarker",ee.title="Highlight marker",ee.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>',ee}($e),pe='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',ce='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',je=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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=ae.defaultStrokeColor,ne.bgColor=ae.defaultFillColor,ne.fontFamily=ae.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 Re("Text color",ae.defaultColorSet,ne.color,pe),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Re("Fill color",ae.defaultColorSet,ne.bgColor,ce),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Te("Font",ae.defaultFontFamilies,ae.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new tt,ne.tipGrip.visual.transform.baseVal.appendItem(be.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return ie.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},ee.prototype.createTip=function(){be.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=be.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ee.prototype.pointerDown=function(z,re){this.state==="new"&&ie.prototype.pointerDown.call(this,z,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ie.prototype.pointerDown.call(this,z,re)},ee.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ie.prototype.pointerUp.call(this,z);else{var re=this.state==="creating";ie.prototype.pointerUp.call(this,z),this.setTipPoints(re),this.positionTip()}},ee.prototype.manipulate=function(z){if(this.tipMoving){var re=this.unrotatePoint(z);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else ie.prototype.manipulate.call(this,z)},ee.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(be.setAttributes(this.bgRectangle,[["fill",z]]),be.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},ee.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},ee.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),ae=this.height/5;z&&(this.tipPosition={x:re+ae/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))?(ae=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+ae,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+ae}):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))?(ae=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-ae,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+ae}):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))?(ae=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-ae,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-ae},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ae=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+ae,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-ae})},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),this.positionTip()},ee.prototype.positionTip=function(){be.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ee.prototype.select=function(){this.positionTip(),ie.prototype.select.call(this)},ee.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.bgColor=re.bgColor,this.tipPosition=re.tipPosition,ie.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*re},this.positionTip()},ee.typeName="CalloutMarker",ee.title="Callout marker",ee.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>',ee}(_e),vt=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.fillColor=ae.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 Re("Line color",ye(ae.defaultColorSet,["transparent"]),ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Re("Fill color",ye(ae.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new at("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new st("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new gt("Opacity",ae.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=be.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)},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){ie.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),this.setSize()},ee.prototype.setSize=function(){ie.prototype.setSize.call(this),be.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ee.prototype.pointerUp=function(z){ie.prototype.pointerUp.call(this,z),this.setSize()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&be.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),ie.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.setSize()},ee.typeName="EllipseMarker",ee.title="Ellipse marker",ee.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>',ee}(ct),ut=function(ie){function ee(z,re,ae){return ie.call(this,z,re,ae)||this}return Qe(ee,ie),Object.defineProperty(ee.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},ee.prototype.createTips=function(){this.tip1=be.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(be.createTransform()),this.visual.appendChild(this.tip1),this.tip2=be.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(be.createTransform()),this.visual.appendChild(this.tip2)},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},ee.prototype.adjustVisual=function(){if(ie.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(be.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()]]),be.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 z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var ae=this.tip2.transform.baseVal.getItem(0);ae.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ae,0)}},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ie.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ie.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},ee.typeName="MeasurementMarker",ee.title="Measurement marker",ee.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>',ee}(qe),we=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||this;return ne.strokePanel.colors=ae.defaultColorSet,ne.fillColor="transparent",ne}return Qe(ee,ie),Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=ie.prototype.getState.call(this);return z.typeName=ee.typeName,z},ee.typeName="EllipseFrameMarker",ee.title="Ellipse frame marker",ee.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>',ee}(vt),Ve=function(){function ie(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ie.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ie.prototype.addUndoStep=function(ee){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ee)||(this.undoStack.push(ee),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ee)&&this.redoStack.splice(0,this.redoStack.length))},ie.prototype.replaceLastUndoStep=function(ee){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ee)},ie.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ie.prototype.undo=function(){if(this.undoStack.length>1){var ee=this.undoStack.pop();return ee!==void 0&&this.redoStack.push(ee),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ie.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ie}(),Ge=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",ae.defaultColorSet,ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new at("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new st("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},ee.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ee.prototype.createVisual=function(){this.visual=be.createGroup(),this.selectorCurve=be.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=be.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)},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},ee.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),be.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),be.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),be.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){ie.prototype.setupControlBox.call(this),this.curveControlLine1=be.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=be.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)},ee.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ie.prototype.addControlGrips.call(this)},ee.prototype.positionGrips=function(){ie.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/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()))},ee.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),ie.prototype.manipulate.call(this,z)},ee.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),ie.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},ee.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,ie.prototype.scale.call(this,z,re)},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ie.prototype.getState.call(this));return z.typeName=ee.typeName,z},ee.prototype.restoreState=function(z){ie.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},ee.typeName="CurveMarker",ee.title="Curve marker",ee.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>',ee}(Oe),St=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,re,ae)||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=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.fillColor=ae.defaultFillColor,ne.textColor=ae.defaultStrokeColor,ne.fontFamily=ae.defaultFontFamily,ne.fontSize=ae.defaultCaptionFontSize,ne.captionText=ae.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 Re("Line color",ye(ae.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Re("Fill color",ye(ae.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new at("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new st("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Te("Font",ae.defaultFontFamilies,ae.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Re("Text color",ae.defaultColorSet,ne.textColor,pe),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Qe(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},ee.prototype.createVisual=function(){this.visual=be.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=be.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=be.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=be.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()},ee.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},ee.prototype.pointerDown=function(z,re){ie.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},ee.prototype.manipulate=function(z){ie.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),this.setSize()},ee.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),be.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')"]]),be.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')"]])},ee.prototype.showTextEditor=function(){var z=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(re){re.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(re){re.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ee.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"))},ee.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ee.prototype.setFont=function(z){this.captionElement&&be.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ee.prototype.setTextColor=function(z){this.captionElement&&be.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ee.prototype.setSize=function(){ie.prototype.setSize.call(this),be.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ee.prototype.pointerUp=function(z){ie.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ee.prototype.dblClick=function(z,re){ie.prototype.dblClick.call(this,z,re),this.showTextEditor()},ee.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&be.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&be.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&be.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&be.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ee.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ee.prototype.getState=function(){var z=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},ie.prototype.getState.call(this));return z.typeName=this.typeName,z},ee.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.textColor=re.textColor,this.fontFamily=re.fontFamily,this.captionText=re.captionText,this.fontSize=re.fontSize,this.createVisual(),ie.prototype.restoreState.call(this,z),this.setSize()},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re),this.setSize()},ee.typeName="CaptionFrameMarker",ee.title="Caption frame marker",ee.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>',ee}(ct),Je=function(){function ie(ee,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ee,this.cancelable=z}return Object.defineProperty(ie.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ie.prototype.preventDefault=function(){this._defaultPrevented=!0},ie}(),Ce=function(ie){function ee(z,re,ae){var ne=ie.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=ae,ne}return Qe(ee,ie),ee}(Je),ve=function(ie){function ee(z,re,ae){ae===void 0&&(ae=!1);var ne=ie.call(this,z,ae)||this;return ne.marker=re,ne}return Qe(ee,ie),ee}(Je),Le=function(){function ie(){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 ie.prototype.addEventListener=function(ee,z){this[ee].push(z)},ie.prototype.removeEventListener=function(ee,z){var re=this[ee].indexOf(z);re>-1&&this[ee].splice(re,1)},ie}(),Ye=function(){function ie(ee){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Se,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 Le,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ie.instanceCounter++,this.styles=new de(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ee,this.targetRoot=document.body,this.width=ee.clientWidth,this.height=ee.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(ie.prototype,"ALL_MARKER_TYPES",{get:function(){return[Vt,ke,Et,_e,we,vt,dt,je,ut,$e,qe,Ge,St]},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Vt,ke,Et,_e,vt,dt,je]},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Vt,ke,Et,_e,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ee){var z=this;this._availableMarkerTypes.splice(0),ee.forEach(function(re){if(typeof re=="string"){var ae=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});ae!==void 0&&z._availableMarkerTypes.push(ae)}else z._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ee){this._zoomLevel=ee,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(ie.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ie.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ie.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&Ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Je(ee))})},ie.prototype.render=function(){return Ne(this,void 0,void 0,function(){var ee;return He(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new Ke).naturalSize=this.renderAtNaturalSize,ee.imageType=this.renderImageType,ee.imageQuality=this.renderImageQuality,ee.markersOnly=this.renderMarkersOnly,ee.width=this.renderWidth,ee.height=this.renderHeight,[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,ee.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ie.prototype.close=function(ee){var z=this;if(ee===void 0&&(ee=!1),this.isOpen){var re=!1;ee||this.eventListeners.beforeclose.forEach(function(ae){var ne=new Je(z,!0);ae(ne),ne.defaultPrevented&&(re=!0)}),re||(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(ae){return ae(new Je(z))}),this.detachEvents(),this._isOpen=!1)}},ie.prototype.addMarkersToToolbar=function(){for(var ee,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];(ee=this._availableMarkerTypes).push.apply(ee,z)},ie.prototype.addRenderEventListener=function(ee){this.addEventListener("render",function(z){ee(z.dataUrl,z.state)})},ie.prototype.removeRenderEventListener=function(ee){},ie.prototype.addCloseEventListener=function(ee){this.addEventListener("close",function(){ee()})},ie.prototype.removeCloseEventListener=function(ee){},ie.prototype.setupResizeObserver=function(){var ee=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ee.resize(ee.target.clientWidth,ee.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ee.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ie.prototype.onPopupTargetResize=function(){var ee=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/ee>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ee:this.editorCanvas.clientWidth,re=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ee;this.resize(z,re)},ie.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ie.prototype.resize=function(ee,z){this._isResizing=!0;var re=ee/this.imageWidth,ae=z/this.imageHeight;this.imageWidth=Math.round(ee),this.imageHeight=Math.round(z),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(re,ae),this._isResizing=!1},ie.prototype.scaleMarkers=function(ee,z){var re,ae=this;this._currentMarker&&this._currentMarker instanceof _e?this._currentMarker.scale(ee,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ae._currentMarker&&ne.scale(ee,z)}),re!==void 0&&this.setCurrentMarker(re)},ie.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"},ie.prototype.setTopLeft=function(){var ee=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=ee.left-z.left,this.top=ee.top-z.top},ie.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)},ie.prototype.addDefs=function(){for(var ee,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];this.defs=be.createDefs(),this.addDefsToImage(),(ee=this.defs).append.apply(ee,z)},ie.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ie.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)},ie.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ie.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ie.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)},ie.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ie.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)},ie.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 ee=document.createElement("a");ee.href="https://markerjs.com/",ee.target="_blank",ee.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>',ee.title="Powered by marker.js",ee.style.display="grid",ee.style.alignItems="center",ee.style.justifyItems="center",ee.style.padding="3px",ee.style.width="20px",ee.style.height="20px",this.logoUI.appendChild(ee),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ie.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")},ie.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"},ie.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ie.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 ee=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=ee+"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 lt(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 Ze(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ie.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ie.prototype.removeMarker=function(ee){this.markerImage.removeChild(ee.container),this.markers.indexOf(ee)>-1&&this.markers.splice(this.markers.indexOf(ee),1),ee.dispose()},ie.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())},ie.prototype.toolbarButtonClicked=function(ee,z){if(ee==="marker"&&z!==void 0)this.createNewMarker(z);else if(ee==="action")switch(z){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()}},ie.prototype.deleteSelectedMarker=function(){var ee=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ae){var ne=new ve(ee,ee._currentMarker,!0);ae(ne),ne.defaultPrevented&&(z=!0)}),!z){var re=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(ae){return ae(new ve(ee,re))})}}},ie.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var We=new ve(ee,void 0,!0);ge(We),We.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(ge){var We=ae.markers[ge];ae.setCurrentMarker(ae.markers[ge]),ae._currentMarker.dispose(),ae.markerImage.removeChild(ae._currentMarker.container),ae.markers.splice(ae.markers.indexOf(ae._currentMarker),1),ae.eventListeners.markerdelete.forEach(function(xt){return xt(new ve(ee,We))})},ae=this,ne=this.markers.length-1;ne>=0;ne--)re(ne);this.addUndoStep()}},Object.defineProperty(ie.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ie.prototype.showNotesEditor=function(){var ee;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=(ee=this._currentMarker.notes)!==null&&ee!==void 0?ee:"",this.overlayContainer.appendChild(this.notesArea))},ie.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)},ie.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ie.prototype.addUndoStep=function(){var ee=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===z.width&&re.height===z.height){var ae=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),ae<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Je(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new Je(ee))})}},ie.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ie.prototype.undoStep=function(){var ee=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new Je(ee))}))},ie.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ie.prototype.redoStep=function(){var ee=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new Je(ee))}))},ie.prototype.stepZoom=function(){var ee=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ee<this.zoomSteps.length-1?this.zoomSteps[ee+1]:this.zoomSteps[0]},ie.prototype.panTo=function(ee){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ee.x,top:this.prevPanPoint.y-ee.y}),this.prevPanPoint=ee},ie.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var ee,z,re=this;return He(this,function(ae){switch(ae.label){case 0:return[4,this.render()];case 1:return ee=ae.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new Ce(re,ee,z))}),this.close(!0),[2]}})})},ie.prototype.getState=function(ee){ee===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(re){return z.markers.push(re.getState())}),z},ie.prototype.restoreState=function(ee){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ee.markers.forEach(function(re){var ae=z._availableMarkerTypes.find(function(ge){return ge.typeName===re.typeName});if(ae!==void 0){var ne=z.addNewMarker(ae);ne.restoreState(re),z.markers.push(ne)}}),ee.width&&ee.height&&(ee.width!==this.imageWidth||ee.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ee.width,this.imageHeight/ee.height),this.eventListeners.restorestate.forEach(function(re){return re(new Je(z))})},ie.prototype.addNewMarker=function(ee){var z=be.createGroup();return this.markerImage.appendChild(z),new ee(z,this.overlayContainer,this.settings)},ie.prototype.createNewMarker=function(ee){var z,re=this;(z=typeof ee=="string"?this._availableMarkerTypes.find(function(ae){return ae.typeName===ee}):ee)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),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(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ae){return ae(new ve(re,re._currentMarker))}))},ie.prototype.markerCreated=function(ee){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ee),this.setCurrentMarker(ee),ee instanceof ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new ve(z,z._currentMarker))})},ie.prototype.colorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ee,this.settings.defaultStrokeColor=ee)},ie.prototype.fillColorChanged=function(ee){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ee)},ie.prototype.markerStateChanged=function(ee){var z=this;this.eventListeners.markerchange.forEach(function(re){return re(new ve(z,ee))})},ie.prototype.setCurrentMarker=function(ee){var z=this;this._currentMarker!==ee&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new ve(z,z._currentMarker))})),this._currentMarker=ee,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(re){return re(new ve(z,z._currentMarker))}))},ie.prototype.onPointerDown=function(ee){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ee.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(ee.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ee.clientX,y:ee.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ee.clientX,ee.clientY))},ie.prototype.onDblClick=function(ee){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(ee.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ee.clientX,ee.clientY),ee.target):this.setCurrentMarker()}},ie.prototype.onPointerMove=function(ee){this.touchPoints!==1&&ee.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ee.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ee.clientX,ee.clientY)):this.zoomLevel>1&&this.panTo({x:ee.clientX,y:ee.clientY}))},ie.prototype.onPointerUp=function(ee){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ee.clientX,ee.clientY)),this.isDragging=!1,this.addUndoStep()},ie.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ie.prototype.onKeyUp=function(ee){this._currentMarker===void 0||this.notesArea!==void 0||ee.key!=="Delete"&&ee.key!=="Backspace"||this.deleteSelectedMarker()},ie.prototype.clientToLocalCoordinates=function(ee,z){var re=this.markerImage.getBoundingClientRect();return{x:(ee-re.left)/this.zoomLevel,y:(z-re.top)/this.zoomLevel}},ie.prototype.onWindowResize=function(){this.positionUI()},ie.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ee=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ee+"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()},ie.prototype.addLicenseKey=function(ee){Ie.addKey(ee)},ie.prototype.addEventListener=function(ee,z){this.eventListeners.addEventListener(ee,z)},ie.prototype.removeEventListener=function(ee,z){this.eventListeners.removeEventListener(ee,z)},ie.prototype.renderState=function(ee){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ee),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ie.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ie.prototype.focus=function(){var ee=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new Je(ee))}))},ie.prototype.blur=function(){var ee=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new Je(ee))}))},ie.instanceCounter=0,ie}()},66042:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return _e}});var le=fe(33885),Qe=fe(42978),Ne=fe(43403),He=fe(34280),ye=fe(59301),be=ye.createContext(null),Ie=ye.createContext({}),Ke=be,Ee=fe(20068),de=fe(54476),nt=fe(92310),me=fe.n(nt),lt=fe(77900),Ze=fe(10228),Be=fe(26112),Re=fe(75931),Ae=fe(8654),et=["prefixCls","className","containerRef"],tt=function(Fe){var Et=Fe.prefixCls,$e=Fe.className,gt=Fe.containerRef,dt=(0,Re.Z)(Fe,et),pe=ye.useContext(Ie),ce=pe.panel,je=(0,Ae.x1)(ce,gt);return ye.createElement("div",(0,de.Z)({className:me()("".concat(Et,"-content"),$e),role:"dialog",ref:je},(0,Be.Z)(Fe,{aria:!0}),{"aria-modal":"true"},dt))},ft=tt,ct=fe(48736);function rt(ke){return typeof ke=="string"&&String(Number(ke))===ke?((0,ct.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(ke)):ke}function at(ke){warning(!("wrapperClassName"in ke),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!ke.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var st={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Vt(ke,Fe){var Et,$e,gt,dt=ke.prefixCls,pe=ke.open,ce=ke.placement,je=ke.inline,vt=ke.push,ut=ke.forceRender,we=ke.autoFocus,Ve=ke.keyboard,Ge=ke.classNames,St=ke.rootClassName,Je=ke.rootStyle,Ce=ke.zIndex,ve=ke.className,Le=ke.id,Ye=ke.style,ie=ke.motion,ee=ke.width,z=ke.height,re=ke.children,ae=ke.mask,ne=ke.maskClosable,ge=ke.maskMotion,We=ke.maskClassName,xt=ke.maskStyle,yt=ke.afterOpenChange,ht=ke.onClose,mt=ke.onMouseEnter,Nt=ke.onMouseOver,Dt=ke.onMouseLeave,Ft=ke.onClick,zt=ke.onKeyDown,Lt=ke.onKeyUp,sn=ke.styles,Ot=ke.drawerRender,qt=ye.useRef(),it=ye.useRef(),ln=ye.useRef();ye.useImperativeHandle(Fe,function(){return qt.current});var Wt=function(Xn){var Kn=Xn.keyCode,yr=Xn.shiftKey;switch(Kn){case Ze.Z.TAB:{if(Kn===Ze.Z.TAB){if(!yr&&document.activeElement===ln.current){var Gt;(Gt=it.current)===null||Gt===void 0||Gt.focus({preventScroll:!0})}else if(yr&&document.activeElement===it.current){var pn;(pn=ln.current)===null||pn===void 0||pn.focus({preventScroll:!0})}}break}case Ze.Z.ESC:{ht&&Ve&&(Xn.stopPropagation(),ht(Xn));break}}};ye.useEffect(function(){if(pe&&we){var Bn;(Bn=qt.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[pe]);var Ut=ye.useState(!1),un=(0,Qe.Z)(Ut,2),An=un[0],hn=un[1],wn=ye.useContext(Ke),er;typeof vt=="boolean"?er=vt?{}:{distance:0}:er=vt||{};var Gn=(Et=($e=(gt=er)===null||gt===void 0?void 0:gt.distance)!==null&&$e!==void 0?$e:wn==null?void 0:wn.pushDistance)!==null&&Et!==void 0?Et:180,Gr=ye.useMemo(function(){return{pushDistance:Gn,push:function(){hn(!0)},pull:function(){hn(!1)}}},[Gn]);ye.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]),ye.useEffect(function(){return function(){var Bn;wn==null||(Bn=wn.pull)===null||Bn===void 0||Bn.call(wn)}},[]);var Ar=ae&&ye.createElement(lt.default,(0,de.Z)({key:"mask"},ge,{visible:pe}),function(Bn,Xn){var Kn=Bn.className,yr=Bn.style;return ye.createElement("div",{className:me()("".concat(dt,"-mask"),Kn,Ge==null?void 0:Ge.mask,We),style:(0,le.Z)((0,le.Z)((0,le.Z)({},yr),xt),sn==null?void 0:sn.mask),onClick:ne&&pe?ht:void 0,ref:Xn})}),gr=typeof ie=="function"?ie(ce):ie,cr={};if(An&&Gn)switch(ce){case"top":cr.transform="translateY(".concat(Gn,"px)");break;case"bottom":cr.transform="translateY(".concat(-Gn,"px)");break;case"left":cr.transform="translateX(".concat(Gn,"px)");break;default:cr.transform="translateX(".concat(-Gn,"px)");break}ce==="left"||ce==="right"?cr.width=rt(ee):cr.height=rt(z);var In={onMouseEnter:mt,onMouseOver:Nt,onMouseLeave:Dt,onClick:Ft,onKeyDown:zt,onKeyUp:Lt},tr=ye.createElement(lt.default,(0,de.Z)({key:"panel"},gr,{visible:pe,forceRender:ut,onVisibleChanged:function(Xn){yt==null||yt(Xn)},removeOnLeave:!1,leavedClassName:"".concat(dt,"-content-wrapper-hidden")}),function(Bn,Xn){var Kn=Bn.className,yr=Bn.style,Gt=ye.createElement(ft,(0,de.Z)({id:Le,containerRef:Xn,prefixCls:dt,className:me()(ve,Ge==null?void 0:Ge.content),style:(0,le.Z)((0,le.Z)({},Ye),sn==null?void 0:sn.content)},(0,Be.Z)(ke,{aria:!0}),In),re);return ye.createElement("div",(0,de.Z)({className:me()("".concat(dt,"-content-wrapper"),Ge==null?void 0:Ge.wrapper,Kn),style:(0,le.Z)((0,le.Z)((0,le.Z)({},cr),yr),sn==null?void 0:sn.wrapper)},(0,Be.Z)(ke,{data:!0})),Ot?Ot(Gt):Gt)}),sr=(0,le.Z)({},Je);return Ce&&(sr.zIndex=Ce),ye.createElement(Ke.Provider,{value:Gr},ye.createElement("div",{className:me()(dt,"".concat(dt,"-").concat(ce),St,(0,Ee.Z)((0,Ee.Z)({},"".concat(dt,"-open"),pe),"".concat(dt,"-inline"),je)),style:sr,tabIndex:-1,ref:qt,onKeyDown:Wt},Ar,ye.createElement("div",{tabIndex:0,ref:it,style:st,"aria-hidden":"true","data-sentinel":"start"}),tr,ye.createElement("div",{tabIndex:0,ref:ln,style:st,"aria-hidden":"true","data-sentinel":"end"})))}var Se=ye.forwardRef(Vt),Oe=Se,qe=function(Fe){var Et=Fe.open,$e=Et===void 0?!1:Et,gt=Fe.prefixCls,dt=gt===void 0?"rc-drawer":gt,pe=Fe.placement,ce=pe===void 0?"right":pe,je=Fe.autoFocus,vt=je===void 0?!0:je,ut=Fe.keyboard,we=ut===void 0?!0:ut,Ve=Fe.width,Ge=Ve===void 0?378:Ve,St=Fe.mask,Je=St===void 0?!0:St,Ce=Fe.maskClosable,ve=Ce===void 0?!0:Ce,Le=Fe.getContainer,Ye=Fe.forceRender,ie=Fe.afterOpenChange,ee=Fe.destroyOnClose,z=Fe.onMouseEnter,re=Fe.onMouseOver,ae=Fe.onMouseLeave,ne=Fe.onClick,ge=Fe.onKeyDown,We=Fe.onKeyUp,xt=Fe.panelRef,yt=ye.useState(!1),ht=(0,Qe.Z)(yt,2),mt=ht[0],Nt=ht[1],Dt=ye.useState(!1),Ft=(0,Qe.Z)(Dt,2),zt=Ft[0],Lt=Ft[1];(0,He.Z)(function(){Lt(!0)},[]);var sn=zt?$e:!1,Ot=ye.useRef(),qt=ye.useRef();(0,He.Z)(function(){sn&&(qt.current=document.activeElement)},[sn]);var it=function(An){var hn;if(Nt(An),ie==null||ie(An),!An&&qt.current&&!((hn=Ot.current)!==null&&hn!==void 0&&hn.contains(qt.current))){var wn;(wn=qt.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},ln=ye.useMemo(function(){return{panel:xt}},[xt]);if(!Ye&&!mt&&!sn&&ee)return null;var Wt={onMouseEnter:z,onMouseOver:re,onMouseLeave:ae,onClick:ne,onKeyDown:ge,onKeyUp:We},Ut=(0,le.Z)((0,le.Z)({},Fe),{},{open:sn,prefixCls:dt,placement:ce,autoFocus:vt,keyboard:we,width:Ge,mask:Je,maskClosable:ve,inline:Le===!1,afterOpenChange:it,ref:Ot},Wt);return ye.createElement(Ie.Provider,{value:ln},ye.createElement(Ne.Z,{open:sn||Ye||mt,autoDestroy:!1,getContainer:Le,autoLock:Je&&(sn||mt)},ye.createElement(Oe,Ut)))},Te=qe,_e=Te},20922:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return Je}});var le=fe(54476),Qe=fe(20068),Ne=fe(76190),He=fe(42978),ye=fe(75931),be=fe(67732),Ie=fe(83652);function Ke(){return typeof BigInt=="function"}function Ee(Ce){return!Ce&&Ce!==0&&!Number.isNaN(Ce)||!String(Ce).trim()}function de(Ce){var ve=Ce.trim(),Le=ve.startsWith("-");Le&&(ve=ve.slice(1)),ve=ve.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),ve.startsWith(".")&&(ve="0".concat(ve));var Ye=ve||"0",ie=Ye.split("."),ee=ie[0]||"0",z=ie[1]||"0";ee==="0"&&z==="0"&&(Le=!1);var re=Le?"-":"";return{negative:Le,negativeStr:re,trimStr:Ye,integerStr:ee,decimalStr:z,fullStr:"".concat(re).concat(Ye)}}function nt(Ce){var ve=String(Ce);return!Number.isNaN(Number(ve))&&ve.includes("e")}function me(Ce){var ve=String(Ce);if(nt(Ce)){var Le=Number(ve.slice(ve.indexOf("e-")+2)),Ye=ve.match(/\.(\d+)/);return Ye!=null&&Ye[1]&&(Le+=Ye[1].length),Le}return ve.includes(".")&&Ze(ve)?ve.length-ve.indexOf(".")-1:0}function lt(Ce){var ve=String(Ce);if(nt(Ce)){if(Ce>Number.MAX_SAFE_INTEGER)return String(Ke()?BigInt(Ce).toString():Number.MAX_SAFE_INTEGER);if(Ce<Number.MIN_SAFE_INTEGER)return String(Ke()?BigInt(Ce).toString():Number.MIN_SAFE_INTEGER);ve=Ce.toFixed(me(ve))}return de(ve).fullStr}function Ze(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 Be=function(){function Ce(ve){if((0,be.Z)(this,Ce),(0,Qe.Z)(this,"origin",""),(0,Qe.Z)(this,"negative",void 0),(0,Qe.Z)(this,"integer",void 0),(0,Qe.Z)(this,"decimal",void 0),(0,Qe.Z)(this,"decimalLen",void 0),(0,Qe.Z)(this,"empty",void 0),(0,Qe.Z)(this,"nan",void 0),Ee(ve)){this.empty=!0;return}if(this.origin=String(ve),ve==="-"||Number.isNaN(ve)){this.nan=!0;return}var Le=ve;if(nt(Le)&&(Le=Number(Le)),Le=typeof Le=="string"?Le:lt(Le),Ze(Le)){var Ye=de(Le);this.negative=Ye.negative;var ie=Ye.trimStr.split(".");this.integer=BigInt(ie[0]);var ee=ie[1]||"0";this.decimal=BigInt(ee),this.decimalLen=ee.length}else this.nan=!0}return(0,Ie.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(Le){var Ye="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Le,"0"));return BigInt(Ye)}},{key:"negate",value:function(){var Le=new Ce(this.toString());return Le.negative=!Le.negative,Le}},{key:"cal",value:function(Le,Ye,ie){var ee=Math.max(this.getDecimalStr().length,Le.getDecimalStr().length),z=this.alignDecimal(ee),re=Le.alignDecimal(ee),ae=Ye(z,re).toString(),ne=ie(ee),ge=de(ae),We=ge.negativeStr,xt=ge.trimStr,yt="".concat(We).concat(xt.padStart(ne+1,"0"));return new Ce("".concat(yt.slice(0,-ne),".").concat(yt.slice(-ne)))}},{key:"add",value:function(Le){if(this.isInvalidate())return new Ce(Le);var Ye=new Ce(Le);return Ye.isInvalidate()?this:this.cal(Ye,function(ie,ee){return ie+ee},function(ie){return ie})}},{key:"multi",value:function(Le){var Ye=new Ce(Le);return this.isInvalidate()||Ye.isInvalidate()?new Ce(NaN):this.cal(Ye,function(ie,ee){return ie*ee},function(ie){return ie*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(Le){return this.toString()===(Le==null?void 0:Le.toString())}},{key:"lessEquals",value:function(Le){return this.add(Le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Le?this.isInvalidate()?"":de("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Ce}(),Re=function(){function Ce(ve){if((0,be.Z)(this,Ce),(0,Qe.Z)(this,"origin",""),(0,Qe.Z)(this,"number",void 0),(0,Qe.Z)(this,"empty",void 0),Ee(ve)){this.empty=!0;return}this.origin=String(ve),this.number=Number(ve)}return(0,Ie.Z)(Ce,[{key:"negate",value:function(){return new Ce(-this.toNumber())}},{key:"add",value:function(Le){if(this.isInvalidate())return new Ce(Le);var Ye=Number(Le);if(Number.isNaN(Ye))return this;var ie=this.number+Ye;if(ie>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(ie<Number.MIN_SAFE_INTEGER)return new Ce(Number.MIN_SAFE_INTEGER);var ee=Math.max(me(this.number),me(Ye));return new Ce(ie.toFixed(ee))}},{key:"multi",value:function(Le){var Ye=Number(Le);if(this.isInvalidate()||Number.isNaN(Ye))return new Ce(NaN);var ie=this.number*Ye;if(ie>Number.MAX_SAFE_INTEGER)return new Ce(Number.MAX_SAFE_INTEGER);if(ie<Number.MIN_SAFE_INTEGER)return new Ce(Number.MIN_SAFE_INTEGER);var ee=Math.max(me(this.number),me(Ye));return new Ce(ie.toFixed(ee))}},{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(Le){return this.toNumber()===(Le==null?void 0:Le.toNumber())}},{key:"lessEquals",value:function(Le){return this.add(Le.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Le?this.isInvalidate()?"":lt(this.number):this.origin}}]),Ce}();function Ae(Ce){return Ke()?new Be(Ce):new Re(Ce)}function et(Ce,ve,Le){var Ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ce==="")return"";var ie=de(Ce),ee=ie.negativeStr,z=ie.integerStr,re=ie.decimalStr,ae="".concat(ve).concat(re),ne="".concat(ee).concat(z);if(Le>=0){var ge=Number(re[Le]);if(ge>=5&&!Ye){var We=Ae(Ce).add("".concat(ee,"0.").concat("0".repeat(Le)).concat(10-ge));return et(We.toString(),ve,Le,Ye)}return Le===0?ne:"".concat(ne).concat(ve).concat(re.padEnd(Le,"0").slice(0,Le))}return ae===".0"?ne:"".concat(ne).concat(ae)}var tt=Ae,ft=fe(92310),ct=fe.n(ft),rt=fe(36901),at=fe(34280);function st(Ce,ve){return typeof Proxy!="undefined"&&Ce?new Proxy(Ce,{get:function(Ye,ie){if(ve[ie])return ve[ie];var ee=Ye[ie];return typeof ee=="function"?ee.bind(Ye):ee}}):Ce}var Vt=fe(8654),Se=fe(59301),Oe=fe(48736);function qe(Ce,ve){var Le=(0,Se.useRef)(null);function Ye(){try{var ee=Ce.selectionStart,z=Ce.selectionEnd,re=Ce.value,ae=re.substring(0,ee),ne=re.substring(z);Le.current={start:ee,end:z,value:re,beforeTxt:ae,afterTxt:ne}}catch(ge){}}function ie(){if(Ce&&Le.current&&ve)try{var ee=Ce.value,z=Le.current,re=z.beforeTxt,ae=z.afterTxt,ne=z.start,ge=ee.length;if(ee.startsWith(re))ge=re.length;else if(ee.endsWith(ae))ge=ee.length-Le.current.afterTxt.length;else{var We=re[ne-1],xt=ee.indexOf(We,ne-1);xt!==-1&&(ge=xt+1)}Ce.setSelectionRange(ge,ge)}catch(yt){(0,Oe.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(yt.message))}}return[Ye,ie]}var Te=fe(49658),_e=function(){var ve=(0,Se.useState)(!1),Le=(0,He.Z)(ve,2),Ye=Le[0],ie=Le[1];return(0,at.Z)(function(){ie((0,Te.Z)())},[]),Ye},ke=_e,Fe=fe(16089),Et=200,$e=600;function gt(Ce){var ve=Ce.prefixCls,Le=Ce.upNode,Ye=Ce.downNode,ie=Ce.upDisabled,ee=Ce.downDisabled,z=Ce.onStep,re=Se.useRef(),ae=Se.useRef([]),ne=Se.useRef();ne.current=z;var ge=function(){clearTimeout(re.current)},We=function(zt,Lt){zt.preventDefault(),ge(),ne.current(Lt);function sn(){ne.current(Lt),re.current=setTimeout(sn,Et)}re.current=setTimeout(sn,$e)};Se.useEffect(function(){return function(){ge(),ae.current.forEach(function(Ft){return Fe.Z.cancel(Ft)})}},[]);var xt=ke();if(xt)return null;var yt="".concat(ve,"-handler"),ht=ct()(yt,"".concat(yt,"-up"),(0,Qe.Z)({},"".concat(yt,"-up-disabled"),ie)),mt=ct()(yt,"".concat(yt,"-down"),(0,Qe.Z)({},"".concat(yt,"-down-disabled"),ee)),Nt=function(){return ae.current.push((0,Fe.Z)(ge))},Dt={unselectable:"on",role:"button",onMouseUp:Nt,onMouseLeave:Nt};return Se.createElement("div",{className:"".concat(yt,"-wrap")},Se.createElement("span",(0,le.Z)({},Dt,{onMouseDown:function(zt){We(zt,!0)},"aria-label":"Increase Value","aria-disabled":ie,className:ht}),Le||Se.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-up-inner")})),Se.createElement("span",(0,le.Z)({},Dt,{onMouseDown:function(zt){We(zt,!1)},"aria-label":"Decrease Value","aria-disabled":ee,className:mt}),Ye||Se.createElement("span",{unselectable:"on",className:"".concat(ve,"-handler-down-inner")})))}function dt(Ce){var ve=typeof Ce=="number"?lt(Ce):de(Ce).fullStr,Le=ve.includes(".");return Le?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(){Fe.Z.cancel(Ce.current)};return(0,Se.useEffect)(function(){return ve},[]),function(Le){ve(),Ce.current=(0,Fe.Z)(function(){Le()})}},je=["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"],vt=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],ut=function(ve,Le){return ve||Le.isEmpty()?Le.toString():Le.toNumber()},we=function(ve){var Le=tt(ve);return Le.isInvalidate()?null:Le},Ve=Se.forwardRef(function(Ce,ve){var Le=Ce.prefixCls,Ye=Ce.className,ie=Ce.style,ee=Ce.min,z=Ce.max,re=Ce.step,ae=re===void 0?1:re,ne=Ce.defaultValue,ge=Ce.value,We=Ce.disabled,xt=Ce.readOnly,yt=Ce.upHandler,ht=Ce.downHandler,mt=Ce.keyboard,Nt=Ce.changeOnWheel,Dt=Nt===void 0?!1:Nt,Ft=Ce.controls,zt=Ft===void 0?!0:Ft,Lt=Ce.classNames,sn=Ce.stringMode,Ot=Ce.parser,qt=Ce.formatter,it=Ce.precision,ln=Ce.decimalSeparator,Wt=Ce.onChange,Ut=Ce.onInput,un=Ce.onPressEnter,An=Ce.onStep,hn=Ce.changeOnBlur,wn=hn===void 0?!0:hn,er=Ce.domRef,Gn=(0,ye.Z)(Ce,je),Gr="".concat(Le,"-input"),Ar=Se.useRef(null),gr=Se.useState(!1),cr=(0,He.Z)(gr,2),In=cr[0],tr=cr[1],sr=Se.useRef(!1),Bn=Se.useRef(!1),Xn=Se.useRef(!1),Kn=Se.useState(function(){return tt(ge!=null?ge:ne)}),yr=(0,He.Z)(Kn,2),Gt=yr[0],pn=yr[1];function kn(dn){ge===void 0&&pn(dn)}var Mn=Se.useCallback(function(dn,Ht){if(!Ht)return it>=0?it:Math.max(me(dn),me(ae))},[it,ae]),Jn=Se.useCallback(function(dn){var Ht=String(dn);if(Ot)return Ot(Ht);var gn=Ht;return ln&&(gn=gn.replace(ln,".")),gn.replace(/[^\w.-]+/g,"")},[Ot,ln]),$n=Se.useRef(""),hr=Se.useCallback(function(dn,Ht){if(qt)return qt(dn,{userTyping:Ht,input:String($n.current)});var gn=typeof dn=="number"?lt(dn):dn;if(!Ht){var en=Mn(gn,Ht);if(Ze(gn)&&(ln||en>=0)){var Hn=ln||".";gn=et(gn,Hn,en)}}return gn},[qt,Mn,ln]),zn=Se.useState(function(){var dn=ne!=null?ne:ge;return Gt.isInvalidate()&&["string","number"].includes((0,Ne.Z)(dn))?Number.isNaN(dn)?"":dn:hr(Gt.toString(),!1)}),Fn=(0,He.Z)(zn,2),lr=Fn[0],_t=Fn[1];$n.current=lr;function ot(dn,Ht){_t(hr(dn.isInvalidate()?dn.toString(!1):dn.toString(!Ht),Ht))}var Xt=Se.useMemo(function(){return we(z)},[z,it]),Cn=Se.useMemo(function(){return we(ee)},[ee,it]),Zn=Se.useMemo(function(){return!Xt||!Gt||Gt.isInvalidate()?!1:Xt.lessEquals(Gt)},[Xt,Gt]),Me=Se.useMemo(function(){return!Cn||!Gt||Gt.isInvalidate()?!1:Gt.lessEquals(Cn)},[Cn,Gt]),Pe=qe(Ar.current,In),Mt=(0,He.Z)(Pe,2),bt=Mt[0],ze=Mt[1],wt=function(Ht){return Xt&&!Ht.lessEquals(Xt)?Xt:Cn&&!Cn.lessEquals(Ht)?Cn:null},Kt=function(Ht){return!wt(Ht)},$t=function(Ht,gn){var en=Ht,Hn=Kt(en)||en.isEmpty();if(!en.isEmpty()&&!gn&&(en=wt(en)||en,Hn=!0),!xt&&!We&&Hn){var br=en.toString(),Qn=Mn(br,gn);return Qn>=0&&(en=tt(et(br,".",Qn)),Kt(en)||(en=tt(et(br,".",Qn,!0)))),en.equals(Gt)||(kn(en),Wt==null||Wt(en.isEmpty()?null:ut(sn,en)),ge===void 0&&ot(en,gn)),en}return Gt},cn=ce(),It=function dn(Ht){if(bt(),$n.current=Ht,_t(Ht),!Bn.current){var gn=Jn(Ht),en=tt(gn);en.isNaN()||$t(en,!0)}Ut==null||Ut(Ht),cn(function(){var Hn=Ht;Ot||(Hn=Ht.replace(/。/g,".")),Hn!==Ht&&dn(Hn)})},Jt=function(){Bn.current=!0},kt=function(){Bn.current=!1,It(Ar.current.value)},pt=function(Ht){It(Ht.target.value)},Qt=function(Ht){var gn;if(!(Ht&&Zn||!Ht&&Me)){sr.current=!1;var en=tt(Xn.current?dt(ae):ae);Ht||(en=en.negate());var Hn=(Gt||tt(0)).add(en.toString()),br=$t(Hn,!1);An==null||An(ut(sn,br),{offset:Xn.current?dt(ae):ae,type:Ht?"up":"down"}),(gn=Ar.current)===null||gn===void 0||gn.focus()}},vn=function(Ht){var gn=tt(Jn(lr)),en;gn.isNaN()?en=$t(Gt,Ht):en=$t(gn,Ht),ge!==void 0?ot(Gt,!1):en.isNaN()||ot(en,!1)},mn=function(){sr.current=!0},xn=function(Ht){var gn=Ht.key,en=Ht.shiftKey;sr.current=!0,Xn.current=en,gn==="Enter"&&(Bn.current||(sr.current=!1),vn(!1),un==null||un(Ht)),mt!==!1&&!Bn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(gn)&&(Qt(gn==="Up"||gn==="ArrowUp"),Ht.preventDefault())},Wn=function(){sr.current=!1,Xn.current=!1};Se.useEffect(function(){if(Dt&&In){var dn=function(en){Qt(en.deltaY<0),en.preventDefault()},Ht=Ar.current;if(Ht)return Ht.addEventListener("wheel",dn,{passive:!1}),function(){return Ht.removeEventListener("wheel",dn)}}});var Yn=function(){wn&&vn(!1),tr(!1),sr.current=!1};return(0,at.o)(function(){Gt.isInvalidate()||ot(Gt,!1)},[it,qt]),(0,at.o)(function(){var dn=tt(ge);pn(dn);var Ht=tt(Jn(lr));(!dn.equals(Ht)||!sr.current||qt)&&ot(dn,sr.current)},[ge]),(0,at.o)(function(){qt&&ze()},[lr]),Se.createElement("div",{ref:er,className:ct()(Le,Ye,(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},"".concat(Le,"-focused"),In),"".concat(Le,"-disabled"),We),"".concat(Le,"-readonly"),xt),"".concat(Le,"-not-a-number"),Gt.isNaN()),"".concat(Le,"-out-of-range"),!Gt.isInvalidate()&&!Kt(Gt))),style:ie,onFocus:function(){tr(!0)},onBlur:Yn,onKeyDown:xn,onKeyUp:Wn,onCompositionStart:Jt,onCompositionEnd:kt,onBeforeInput:mn},zt&&Se.createElement(gt,{prefixCls:Le,upNode:yt,downNode:ht,upDisabled:Zn,downDisabled:Me,onStep:Qt}),Se.createElement("div",{className:"".concat(Gr,"-wrap")},Se.createElement("input",(0,le.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":ee,"aria-valuemax":z,"aria-valuenow":Gt.isInvalidate()?null:Gt.toString(),step:ae},Gn,{ref:(0,Vt.sQ)(Ar,ve),className:Gr,value:lr,onChange:pt,disabled:We,readOnly:xt}))))}),Ge=Se.forwardRef(function(Ce,ve){var Le=Ce.disabled,Ye=Ce.style,ie=Ce.prefixCls,ee=ie===void 0?"rc-input-number":ie,z=Ce.value,re=Ce.prefix,ae=Ce.suffix,ne=Ce.addonBefore,ge=Ce.addonAfter,We=Ce.className,xt=Ce.classNames,yt=(0,ye.Z)(Ce,vt),ht=Se.useRef(null),mt=Se.useRef(null),Nt=Se.useRef(null),Dt=function(zt){Nt.current&&(0,pe.nH)(Nt.current,zt)};return Se.useImperativeHandle(ve,function(){return st(Nt.current,{focus:Dt,nativeElement:ht.current.nativeElement||mt.current})}),Se.createElement(rt.BaseInput,{className:We,triggerFocus:Dt,prefixCls:ee,value:z,disabled:Le,style:Ye,prefix:re,suffix:ae,addonAfter:ge,addonBefore:ne,classNames:xt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:ht},Se.createElement(Ve,(0,le.Z)({prefixCls:ee,disabled:Le,ref:Nt,domRef:mt,className:xt==null?void 0:xt.input},yt)))}),St=Ge,Je=St},25930:function(At,Rt,fe){"use strict";fe.d(Rt,{Cd:function(){return qe}});var le=fe(54476),Qe=fe(33885),Ne=fe(75931),He=fe(59301),ye=fe(92310),be=fe.n(ye),Ie={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ke=function(){var ke=(0,He.useRef)([]),Fe=(0,He.useRef)(null);return(0,He.useEffect)(function(){var Et=Date.now(),$e=!1;ke.current.forEach(function(gt){if(gt){$e=!0;var dt=gt.style;dt.transitionDuration=".3s, .3s, .3s, .06s",Fe.current&&Et-Fe.current<100&&(dt.transitionDuration="0s, 0s")}}),$e&&(Fe.current=Date.now())}),ke.current},Ee=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(ke){var Fe=(0,Qe.Z)((0,Qe.Z)({},Ie),ke),Et=Fe.className,$e=Fe.percent,gt=Fe.prefixCls,dt=Fe.strokeColor,pe=Fe.strokeLinecap,ce=Fe.strokeWidth,je=Fe.style,vt=Fe.trailColor,ut=Fe.trailWidth,we=Fe.transition,Ve=(0,Ne.Z)(Fe,Ee);delete Ve.gapPosition;var Ge=Array.isArray($e)?$e:[$e],St=Array.isArray(dt)?dt:[dt],Je=Ke(),Ce=ce/2,ve=100-ce/2,Le="M ".concat(pe==="round"?Ce:0,",").concat(Ce,`
|
|
L `).concat(pe==="round"?ve:100,",").concat(Ce),Ye="0 0 100 ".concat(ce),ie=0;return He.createElement("svg",(0,le.Z)({className:be()("".concat(gt,"-line"),Et),viewBox:Ye,preserveAspectRatio:"none",style:je},Ve),He.createElement("path",{className:"".concat(gt,"-line-trail"),d:Le,strokeLinecap:pe,stroke:vt,strokeWidth:ut||ce,fillOpacity:"0"}),Ge.map(function(ee,z){var re=1;switch(pe){case"round":re=1-ce/100;break;case"square":re=1-ce/2/100;break;default:re=1;break}var ae={strokeDasharray:"".concat(ee*re,"px, 100px"),strokeDashoffset:"-".concat(ie,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ne=St[z]||St[St.length-1];return ie+=ee,He.createElement("path",{key:z,className:"".concat(gt,"-line-path"),d:Le,strokeLinecap:pe,stroke:ne,strokeWidth:ce,fillOpacity:"0",ref:function(We){Je[z]=We},style:ae})}))},nt=de,me=fe(76190),lt=fe(42978),Ze=fe(47273),Be=0,Re=(0,Ze.Z)();function Ae(){var _e;return Re?(_e=Be,Be+=1):_e="TEST_OR_SSR",_e}var et=function(_e){var ke=He.useState(),Fe=(0,lt.Z)(ke,2),Et=Fe[0],$e=Fe[1];return He.useEffect(function(){$e("rc_progress_".concat(Ae()))},[]),_e||Et},tt=function(ke){var Fe=ke.bg,Et=ke.children;return He.createElement("div",{style:{width:"100%",height:"100%",background:Fe}},Et)};function ft(_e,ke){return Object.keys(_e).map(function(Fe){var Et=parseFloat(Fe),$e="".concat(Math.floor(Et*ke),"%");return"".concat(_e[Fe]," ").concat($e)})}var ct=He.forwardRef(function(_e,ke){var Fe=_e.prefixCls,Et=_e.color,$e=_e.gradientId,gt=_e.radius,dt=_e.style,pe=_e.ptg,ce=_e.strokeLinecap,je=_e.strokeWidth,vt=_e.size,ut=_e.gapDegree,we=Et&&(0,me.Z)(Et)==="object",Ve=we?"#FFF":void 0,Ge=vt/2,St=He.createElement("circle",{className:"".concat(Fe,"-circle-path"),r:gt,cx:Ge,cy:Ge,stroke:Ve,strokeLinecap:ce,strokeWidth:je,opacity:pe===0?0:1,style:dt,ref:ke});if(!we)return St;var Je="".concat($e,"-conic"),Ce=ut?"".concat(180+ut/2,"deg"):"0deg",ve=ft(Et,(360-ut)/360),Le=ft(Et,1),Ye="conic-gradient(from ".concat(Ce,", ").concat(ve.join(", "),")"),ie="linear-gradient(to ".concat(ut?"bottom":"top",", ").concat(Le.join(", "),")");return He.createElement(He.Fragment,null,He.createElement("mask",{id:Je},St),He.createElement("foreignObject",{x:0,y:0,width:vt,height:vt,mask:"url(#".concat(Je,")")},He.createElement(tt,{bg:ie},He.createElement(tt,{bg:Ye}))))}),rt=ct,at=100,st=function(ke,Fe,Et,$e,gt,dt,pe,ce,je,vt){var ut=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,we=Et/100*360*((360-dt)/360),Ve=dt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ge=(100-$e)/100*Fe;je==="round"&&$e!==100&&(Ge+=vt/2,Ge>=Fe&&(Ge=Fe-.01));var St=at/2;return{stroke:typeof ce=="string"?ce:void 0,strokeDasharray:"".concat(Fe,"px ").concat(ke),strokeDashoffset:Ge+ut,transform:"rotate(".concat(gt+we+Ve,"deg)"),transformOrigin:"".concat(St,"px ").concat(St,"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}},Vt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Se(_e){var ke=_e!=null?_e:[];return Array.isArray(ke)?ke:[ke]}var Oe=function(ke){var Fe=(0,Qe.Z)((0,Qe.Z)({},Ie),ke),Et=Fe.id,$e=Fe.prefixCls,gt=Fe.steps,dt=Fe.strokeWidth,pe=Fe.trailWidth,ce=Fe.gapDegree,je=ce===void 0?0:ce,vt=Fe.gapPosition,ut=Fe.trailColor,we=Fe.strokeLinecap,Ve=Fe.style,Ge=Fe.className,St=Fe.strokeColor,Je=Fe.percent,Ce=(0,Ne.Z)(Fe,Vt),ve=at/2,Le=et(Et),Ye="".concat(Le,"-gradient"),ie=ve-dt/2,ee=Math.PI*2*ie,z=je>0?90+je/2:-90,re=ee*((360-je)/360),ae=(0,me.Z)(gt)==="object"?gt:{count:gt,gap:2},ne=ae.count,ge=ae.gap,We=Se(Je),xt=Se(St),yt=xt.find(function(Lt){return Lt&&(0,me.Z)(Lt)==="object"}),ht=yt&&(0,me.Z)(yt)==="object",mt=ht?"butt":we,Nt=st(ee,re,0,100,z,je,vt,ut,mt,dt),Dt=Ke(),Ft=function(){var sn=0;return We.map(function(Ot,qt){var it=xt[qt]||xt[xt.length-1],ln=st(ee,re,sn,Ot,z,je,vt,it,mt,dt);return sn+=Ot,He.createElement(rt,{key:qt,color:it,ptg:Ot,radius:ie,prefixCls:$e,gradientId:Ye,style:ln,strokeLinecap:mt,strokeWidth:dt,gapDegree:je,ref:function(Ut){Dt[qt]=Ut},size:at})}).reverse()},zt=function(){var sn=Math.round(ne*(We[0]/100)),Ot=100/ne,qt=0;return new Array(ne).fill(null).map(function(it,ln){var Wt=ln<=sn-1?xt[0]:ut,Ut=Wt&&(0,me.Z)(Wt)==="object"?"url(#".concat(Ye,")"):void 0,un=st(ee,re,qt,Ot,z,je,vt,Wt,"butt",dt,ge);return qt+=(re-un.strokeDashoffset+ge)*100/re,He.createElement("circle",{key:ln,className:"".concat($e,"-circle-path"),r:ie,cx:ve,cy:ve,stroke:Ut,strokeWidth:dt,opacity:1,style:un,ref:function(hn){Dt[ln]=hn}})})};return He.createElement("svg",(0,le.Z)({className:be()("".concat($e,"-circle"),Ge),viewBox:"0 0 ".concat(at," ").concat(at),style:Ve,id:Et,role:"presentation"},Ce),!ne&&He.createElement("circle",{className:"".concat($e,"-circle-trail"),r:ie,cx:ve,cy:ve,stroke:ut,strokeLinecap:mt,strokeWidth:pe||dt,style:Nt}),ne?zt():Ft())},qe=Oe,Te={Line:nt,Circle:qe}},6551:function(At,Rt,fe){"use strict";fe.d(Rt,{ZP:function(){return Ie}});var le=fe(42978),Qe=fe(59301),Ne=fe(47273),He=0,ye=(0,Ne.Z)();function be(){var Ke;return ye?(Ke=He,He+=1):Ke="TEST_OR_SSR",Ke}function Ie(Ke){var Ee=Qe.useState(),de=(0,le.Z)(Ee,2),nt=de[0],me=de[1];return Qe.useEffect(function(){me("rc_select_".concat(be()))},[]),Ke||nt}},37463:function(At,Rt,fe){"use strict";fe.d(Rt,{Ac:function(){return it},Xo:function(){return Wt},Wx:function(){return un},ZP:function(){return Zn},lk:function(){return ft}});var le=fe(54476),Qe=fe(94480),Ne=fe(20068),He=fe(33885),ye=fe(42978),be=fe(75931),Ie=fe(76190),Ke=fe(18929),Ee=fe(48736),de=fe(59301),nt=fe(92310),me=fe.n(nt),lt=fe(34280),Ze=fe(49658),Be=fe(8654),Re=function(Pe){var Mt=Pe.className,bt=Pe.customizeIcon,ze=Pe.customizeIconProps,wt=Pe.children,Kt=Pe.onMouseDown,$t=Pe.onClick,cn=typeof bt=="function"?bt(ze):bt;return de.createElement("span",{className:Mt,onMouseDown:function(Jt){Jt.preventDefault(),Kt==null||Kt(Jt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:$t,"aria-hidden":!0},cn!==void 0?cn:de.createElement("span",{className:me()(Mt.split(/\s+/).map(function(It){return"".concat(It,"-icon")}))},wt))},Ae=Re,et=function(Pe,Mt,bt,ze,wt){var Kt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,$t=arguments.length>6?arguments[6]:void 0,cn=arguments.length>7?arguments[7]:void 0,It=de.useMemo(function(){if((0,Ie.Z)(ze)==="object")return ze.clearIcon;if(wt)return wt},[ze,wt]),Jt=de.useMemo(function(){return!!(!Kt&&ze&&(bt.length||$t)&&!(cn==="combobox"&&$t===""))},[ze,Kt,bt.length,$t,cn]);return{allowClear:Jt,clearIcon:de.createElement(Ae,{className:"".concat(Pe,"-clear"),onMouseDown:Mt,customizeIcon:It},"\xD7")}},tt=de.createContext(null);function ft(){return de.useContext(tt)}function ct(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Pe=de.useState(!1),Mt=(0,ye.Z)(Pe,2),bt=Mt[0],ze=Mt[1],wt=de.useRef(null),Kt=function(){window.clearTimeout(wt.current)};de.useEffect(function(){return Kt},[]);var $t=function(It,Jt){Kt(),wt.current=window.setTimeout(function(){ze(It),Jt&&Jt()},Me)};return[bt,$t,Kt]}function rt(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Pe=de.useRef(null),Mt=de.useRef(null);de.useEffect(function(){return function(){window.clearTimeout(Mt.current)}},[]);function bt(ze){(ze||Pe.current===null)&&(Pe.current=ze),window.clearTimeout(Mt.current),Mt.current=window.setTimeout(function(){Pe.current=null},Me)}return[function(){return Pe.current},bt]}function at(Me,Pe,Mt,bt){var ze=de.useRef(null);ze.current={open:Pe,triggerOpen:Mt,customizedTrigger:bt},de.useEffect(function(){function wt(Kt){var $t;if(!(($t=ze.current)!==null&&$t!==void 0&&$t.customizedTrigger)){var cn=Kt.target;cn.shadowRoot&&Kt.composed&&(cn=Kt.composedPath()[0]||cn),ze.current.open&&Me().filter(function(It){return It}).every(function(It){return!It.contains(cn)&&It!==cn})&&ze.current.triggerOpen(!1)}}return window.addEventListener("mousedown",wt),function(){return window.removeEventListener("mousedown",wt)}},[])}var st=fe(10228);function Vt(Me){return Me&&![st.Z.ESC,st.Z.SHIFT,st.Z.BACKSPACE,st.Z.TAB,st.Z.WIN_KEY,st.Z.ALT,st.Z.META,st.Z.WIN_KEY_RIGHT,st.Z.CTRL,st.Z.SEMICOLON,st.Z.EQUALS,st.Z.CAPS_LOCK,st.Z.CONTEXT_MENU,st.Z.F1,st.Z.F2,st.Z.F3,st.Z.F4,st.Z.F5,st.Z.F6,st.Z.F7,st.Z.F8,st.Z.F9,st.Z.F10,st.Z.F11,st.Z.F12].includes(Me)}var Se=fe(26112),Oe=fe(11780);function qe(Me,Pe,Mt){var bt=(0,He.Z)((0,He.Z)({},Me),Mt?Pe:{});return Object.keys(Pe).forEach(function(ze){var wt=Pe[ze];typeof wt=="function"&&(bt[ze]=function(){for(var Kt,$t=arguments.length,cn=new Array($t),It=0;It<$t;It++)cn[It]=arguments[It];return wt.apply(void 0,cn),(Kt=Me[ze])===null||Kt===void 0?void 0:Kt.call.apply(Kt,[Me].concat(cn))})}),bt}var Te=qe,_e=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],ke=function(Pe,Mt){var bt=Pe.prefixCls,ze=Pe.id,wt=Pe.inputElement,Kt=Pe.autoFocus,$t=Pe.autoComplete,cn=Pe.editable,It=Pe.activeDescendantId,Jt=Pe.value,kt=Pe.open,pt=Pe.attrs,Qt=(0,be.Z)(Pe,_e),vn=wt||de.createElement("input",null),mn=vn,xn=mn.ref,Wn=mn.props;return(0,Ee.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,He.Z)((0,He.Z)((0,He.Z)({type:"search"},Te(Qt,Wn,!0)),{},{id:ze,ref:(0,Be.sQ)(Mt,xn),autoComplete:$t||"off",autoFocus:Kt,className:me()("".concat(bt,"-selection-search-input"),Wn==null?void 0:Wn.className),role:"combobox","aria-expanded":kt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ze,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ze,"_list"),"aria-activedescendant":kt?It:void 0},pt),{},{value:cn?Jt:"",readOnly:!cn,unselectable:cn?null:"on",style:(0,He.Z)((0,He.Z)({},Wn.style),{},{opacity:cn?null:0})})),vn},Fe=de.forwardRef(ke),Et=Fe;function $e(Me){return Array.isArray(Me)?Me:Me!==void 0?[Me]:[]}var gt=typeof window!="undefined"&&window.document&&window.document.documentElement,dt=gt;function pe(Me){return Me!=null}function ce(Me){return!Me&&Me!==0}function je(Me){return["string","number"].includes((0,Ie.Z)(Me))}function vt(Me){var Pe=void 0;return Me&&(je(Me.title)?Pe=Me.title.toString():je(Me.label)&&(Pe=Me.label.toString())),Pe}function ut(Me,Pe){dt?de.useLayoutEffect(Me,Pe):de.useEffect(Me,Pe)}function we(Me){var Pe;return(Pe=Me.key)!==null&&Pe!==void 0?Pe:Me.value}var Ve=function(Pe){Pe.preventDefault(),Pe.stopPropagation()},Ge=function(Pe){var Mt=Pe.id,bt=Pe.prefixCls,ze=Pe.values,wt=Pe.open,Kt=Pe.searchValue,$t=Pe.autoClearSearchValue,cn=Pe.inputRef,It=Pe.placeholder,Jt=Pe.disabled,kt=Pe.mode,pt=Pe.showSearch,Qt=Pe.autoFocus,vn=Pe.autoComplete,mn=Pe.activeDescendantId,xn=Pe.tabIndex,Wn=Pe.removeIcon,Yn=Pe.maxTagCount,dn=Pe.maxTagTextLength,Ht=Pe.maxTagPlaceholder,gn=Ht===void 0?function(yn){return"+ ".concat(yn.length," ...")}:Ht,en=Pe.tagRender,Hn=Pe.onToggleOpen,br=Pe.onRemove,Qn=Pe.onInputChange,Er=Pe.onInputPaste,Dr=Pe.onInputKeyDown,xr=Pe.onInputMouseDown,nr=Pe.onInputCompositionStart,Nr=Pe.onInputCompositionEnd,pr=Pe.onInputBlur,rr=de.useRef(null),Sr=(0,de.useState)(0),Lr=(0,ye.Z)(Sr,2),fr=Lr[0],qn=Lr[1],jn=(0,de.useState)(!1),Pr=(0,ye.Z)(jn,2),Vr=Pr[0],Jr=Pr[1],kr="".concat(bt,"-selection"),Wr=wt||kt==="multiple"&&$t===!1||kt==="tags"?Kt:"",Br=kt==="tags"||kt==="multiple"&&$t===!1||pt&&(wt||Vr);ut(function(){qn(rr.current.scrollWidth)},[Wr]);var zr=function(nn,En,ir,Zt,Pt){return de.createElement("span",{title:vt(nn),className:me()("".concat(kr,"-item"),(0,Ne.Z)({},"".concat(kr,"-item-disabled"),ir))},de.createElement("span",{className:"".concat(kr,"-item-content")},En),Zt&&de.createElement(Ae,{className:"".concat(kr,"-item-remove"),onMouseDown:Ve,onClick:Pt,customizeIcon:Wn},"\xD7"))},ii=function(nn,En,ir,Zt,Pt,tn){var an=function(or){Ve(or),Hn(!wt)};return de.createElement("span",{onMouseDown:an},en({label:En,value:nn,disabled:ir,closable:Zt,onClose:Pt,isMaxTag:!!tn}))},Fr=function(nn){var En=nn.disabled,ir=nn.label,Zt=nn.value,Pt=!Jt&&!En,tn=ir;if(typeof dn=="number"&&(typeof ir=="string"||typeof ir=="number")){var an=String(tn);an.length>dn&&(tn="".concat(an.slice(0,dn),"..."))}var Ln=function(Vn){Vn&&Vn.stopPropagation(),br(nn)};return typeof en=="function"?ii(Zt,tn,En,Pt,Ln):zr(nn,tn,En,Pt,Ln)},Rn=function(nn){if(!ze.length)return null;var En=typeof gn=="function"?gn(nn):gn;return typeof en=="function"?ii(void 0,En,!1,!1,void 0,!0):zr({title:En},En,!1)},Bt=de.createElement("div",{className:"".concat(kr,"-search"),style:{width:fr},onFocus:function(){Jr(!0)},onBlur:function(){Jr(!1)}},de.createElement(Et,{ref:cn,open:wt,prefixCls:bt,id:Mt,inputElement:null,disabled:Jt,autoFocus:Qt,autoComplete:vn,editable:Br,activeDescendantId:mn,value:Wr,onKeyDown:Dr,onMouseDown:xr,onChange:Qn,onPaste:Er,onCompositionStart:nr,onCompositionEnd:Nr,onBlur:pr,tabIndex:xn,attrs:(0,Se.Z)(Pe,!0)}),de.createElement("span",{ref:rr,className:"".concat(kr,"-search-mirror"),"aria-hidden":!0},Wr,"\xA0")),jt=de.createElement(Oe.Z,{prefixCls:"".concat(kr,"-overflow"),data:ze,renderItem:Fr,renderRest:Rn,suffix:Bt,itemKey:we,maxCount:Yn});return de.createElement("span",{className:"".concat(kr,"-wrap")},jt,!ze.length&&!Wr&&de.createElement("span",{className:"".concat(kr,"-placeholder")},It))},St=Ge,Je=function(Pe){var Mt=Pe.inputElement,bt=Pe.prefixCls,ze=Pe.id,wt=Pe.inputRef,Kt=Pe.disabled,$t=Pe.autoFocus,cn=Pe.autoComplete,It=Pe.activeDescendantId,Jt=Pe.mode,kt=Pe.open,pt=Pe.values,Qt=Pe.placeholder,vn=Pe.tabIndex,mn=Pe.showSearch,xn=Pe.searchValue,Wn=Pe.activeValue,Yn=Pe.maxLength,dn=Pe.onInputKeyDown,Ht=Pe.onInputMouseDown,gn=Pe.onInputChange,en=Pe.onInputPaste,Hn=Pe.onInputCompositionStart,br=Pe.onInputCompositionEnd,Qn=Pe.onInputBlur,Er=Pe.title,Dr=de.useState(!1),xr=(0,ye.Z)(Dr,2),nr=xr[0],Nr=xr[1],pr=Jt==="combobox",rr=pr||mn,Sr=pt[0],Lr=xn||"";pr&&Wn&&!nr&&(Lr=Wn),de.useEffect(function(){pr&&Nr(!1)},[pr,Wn]);var fr=Jt!=="combobox"&&!kt&&!mn?!1:!!Lr,qn=Er===void 0?vt(Sr):Er,jn=de.useMemo(function(){return Sr?null:de.createElement("span",{className:"".concat(bt,"-selection-placeholder"),style:fr?{visibility:"hidden"}:void 0},Qt)},[Sr,fr,Qt,bt]);return de.createElement("span",{className:"".concat(bt,"-selection-wrap")},de.createElement("span",{className:"".concat(bt,"-selection-search")},de.createElement(Et,{ref:wt,prefixCls:bt,id:ze,open:kt,inputElement:Mt,disabled:Kt,autoFocus:$t,autoComplete:cn,editable:rr,activeDescendantId:It,value:Lr,onKeyDown:dn,onMouseDown:Ht,onChange:function(Vr){Nr(!0),gn(Vr)},onPaste:en,onCompositionStart:Hn,onCompositionEnd:br,onBlur:Qn,tabIndex:vn,attrs:(0,Se.Z)(Pe,!0),maxLength:pr?Yn:void 0})),!pr&&Sr?de.createElement("span",{className:"".concat(bt,"-selection-item"),title:qn,style:fr?{visibility:"hidden"}:void 0},Sr.label):null,jn)},Ce=Je,ve=function(Pe,Mt){var bt=(0,de.useRef)(null),ze=(0,de.useRef)(!1),wt=Pe.prefixCls,Kt=Pe.open,$t=Pe.mode,cn=Pe.showSearch,It=Pe.tokenWithEnter,Jt=Pe.disabled,kt=Pe.prefix,pt=Pe.autoClearSearchValue,Qt=Pe.onSearch,vn=Pe.onSearchSubmit,mn=Pe.onToggleOpen,xn=Pe.onInputKeyDown,Wn=Pe.onInputBlur,Yn=Pe.domRef;de.useImperativeHandle(Mt,function(){return{focus:function(qn){bt.current.focus(qn)},blur:function(){bt.current.blur()}}});var dn=rt(0),Ht=(0,ye.Z)(dn,2),gn=Ht[0],en=Ht[1],Hn=function(qn){var jn=qn.which,Pr=bt.current instanceof HTMLTextAreaElement;!Pr&&Kt&&(jn===st.Z.UP||jn===st.Z.DOWN)&&qn.preventDefault(),xn&&xn(qn),jn===st.Z.ENTER&&$t==="tags"&&!ze.current&&!Kt&&(vn==null||vn(qn.target.value)),!(Pr&&!Kt&&~[st.Z.UP,st.Z.DOWN,st.Z.LEFT,st.Z.RIGHT].indexOf(jn))&&Vt(jn)&&mn(!0)},br=function(){en(!0)},Qn=(0,de.useRef)(null),Er=function(qn){Qt(qn,!0,ze.current)!==!1&&mn(!0)},Dr=function(){ze.current=!0},xr=function(qn){ze.current=!1,$t!=="combobox"&&Er(qn.target.value)},nr=function(qn){var jn=qn.target.value;if(It&&Qn.current&&/[\r\n]/.test(Qn.current)){var Pr=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");jn=jn.replace(Pr,Qn.current)}Qn.current=null,Er(jn)},Nr=function(qn){var jn=qn.clipboardData,Pr=jn==null?void 0:jn.getData("text");Qn.current=Pr||""},pr=function(qn){var jn=qn.target;if(jn!==bt.current){var Pr=document.body.style.msTouchAction!==void 0;Pr?setTimeout(function(){bt.current.focus()}):bt.current.focus()}},rr=function(qn){var jn=gn();qn.target!==bt.current&&!jn&&!($t==="combobox"&&Jt)&&qn.preventDefault(),($t!=="combobox"&&(!cn||!jn)||!Kt)&&(Kt&&pt!==!1&&Qt("",!0,!1),mn())},Sr={inputRef:bt,onInputKeyDown:Hn,onInputMouseDown:br,onInputChange:nr,onInputPaste:Nr,onInputCompositionStart:Dr,onInputCompositionEnd:xr,onInputBlur:Wn},Lr=$t==="multiple"||$t==="tags"?de.createElement(St,(0,le.Z)({},Pe,Sr)):de.createElement(Ce,(0,le.Z)({},Pe,Sr));return de.createElement("div",{ref:Yn,className:"".concat(wt,"-selector"),onClick:pr,onMouseDown:rr},kt&&de.createElement("div",{className:"".concat(wt,"-prefix")},kt),Lr)},Le=de.forwardRef(ve),Ye=Le,ie=fe(65030),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Pe){var Mt=Pe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Mt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Mt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Mt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Mt,adjustY:1},htmlRegion:"scroll"}}},re=function(Pe,Mt){var bt=Pe.prefixCls,ze=Pe.disabled,wt=Pe.visible,Kt=Pe.children,$t=Pe.popupElement,cn=Pe.animation,It=Pe.transitionName,Jt=Pe.dropdownStyle,kt=Pe.dropdownClassName,pt=Pe.direction,Qt=pt===void 0?"ltr":pt,vn=Pe.placement,mn=Pe.builtinPlacements,xn=Pe.dropdownMatchSelectWidth,Wn=Pe.dropdownRender,Yn=Pe.dropdownAlign,dn=Pe.getPopupContainer,Ht=Pe.empty,gn=Pe.getTriggerDOMNode,en=Pe.onPopupVisibleChange,Hn=Pe.onPopupMouseEnter,br=(0,be.Z)(Pe,ee),Qn="".concat(bt,"-dropdown"),Er=$t;Wn&&(Er=Wn($t));var Dr=de.useMemo(function(){return mn||z(xn)},[mn,xn]),xr=cn?"".concat(Qn,"-").concat(cn):It,nr=typeof xn=="number",Nr=de.useMemo(function(){return nr?null:xn===!1?"minWidth":"width"},[xn,nr]),pr=Jt;nr&&(pr=(0,He.Z)((0,He.Z)({},pr),{},{width:xn}));var rr=de.useRef(null);return de.useImperativeHandle(Mt,function(){return{getPopupElement:function(){var Lr;return(Lr=rr.current)===null||Lr===void 0?void 0:Lr.popupElement}}}),de.createElement(ie.Z,(0,le.Z)({},br,{showAction:en?["click"]:[],hideAction:en?["click"]:[],popupPlacement:vn||(Qt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Dr,prefixCls:Qn,popupTransitionName:xr,popup:de.createElement("div",{onMouseEnter:Hn},Er),ref:rr,stretch:Nr,popupAlign:Yn,popupVisible:wt,getPopupContainer:dn,popupClassName:me()(kt,(0,Ne.Z)({},"".concat(Qn,"-empty"),Ht)),popupStyle:pr,getTriggerDOMNode:gn,onPopupVisibleChange:en}),Kt)},ae=de.forwardRef(re),ne=ae,ge=fe(66712);function We(Me,Pe){var Mt=Me.key,bt;return"value"in Me&&(bt=Me.value),Mt!=null?Mt:bt!==void 0?bt:"rc-index-key-".concat(Pe)}function xt(Me){return typeof Me!="undefined"&&!Number.isNaN(Me)}function yt(Me,Pe){var Mt=Me||{},bt=Mt.label,ze=Mt.value,wt=Mt.options,Kt=Mt.groupLabel,$t=bt||(Pe?"children":"label");return{label:$t,value:ze||"value",options:wt||"options",groupLabel:Kt||$t}}function ht(Me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Mt=Pe.fieldNames,bt=Pe.childrenAsData,ze=[],wt=yt(Mt,!1),Kt=wt.label,$t=wt.value,cn=wt.options,It=wt.groupLabel;function Jt(kt,pt){Array.isArray(kt)&&kt.forEach(function(Qt){if(pt||!(cn in Qt)){var vn=Qt[$t];ze.push({key:We(Qt,ze.length),groupOption:pt,data:Qt,label:Qt[Kt],value:vn})}else{var mn=Qt[It];mn===void 0&&bt&&(mn=Qt.label),ze.push({key:We(Qt,ze.length),group:!0,data:Qt,label:mn}),Jt(Qt[cn],!0)}})}return Jt(Me,!1),ze}function mt(Me){var Pe=(0,He.Z)({},Me);return"props"in Pe||Object.defineProperty(Pe,"props",{get:function(){return(0,Ee.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Pe}}),Pe}var Nt=function(Pe,Mt,bt){if(!Mt||!Mt.length)return null;var ze=!1,wt=function $t(cn,It){var Jt=(0,ge.Z)(It),kt=Jt[0],pt=Jt.slice(1);if(!kt)return[cn];var Qt=cn.split(kt);return ze=ze||Qt.length>1,Qt.reduce(function(vn,mn){return[].concat((0,Qe.Z)(vn),(0,Qe.Z)($t(mn,pt)))},[]).filter(Boolean)},Kt=wt(Pe,Mt);return ze?typeof bt!="undefined"?Kt.slice(0,bt):Kt:null},Dt=de.createContext(null),Ft=Dt;function zt(Me){var Pe=Me.visible,Mt=Me.values;if(!Pe)return null;var bt=50;return de.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Mt.slice(0,bt).map(function(ze){var wt=ze.label,Kt=ze.value;return["number","string"].includes((0,Ie.Z)(wt))?wt:Kt}).join(", ")),Mt.length>bt?", ...":null)}var Lt=["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"],sn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ot=function(Pe){return Pe==="tags"||Pe==="multiple"},qt=de.forwardRef(function(Me,Pe){var Mt,bt=Me.id,ze=Me.prefixCls,wt=Me.className,Kt=Me.showSearch,$t=Me.tagRender,cn=Me.direction,It=Me.omitDomProps,Jt=Me.displayValues,kt=Me.onDisplayValuesChange,pt=Me.emptyOptions,Qt=Me.notFoundContent,vn=Qt===void 0?"Not Found":Qt,mn=Me.onClear,xn=Me.mode,Wn=Me.disabled,Yn=Me.loading,dn=Me.getInputElement,Ht=Me.getRawInputElement,gn=Me.open,en=Me.defaultOpen,Hn=Me.onDropdownVisibleChange,br=Me.activeValue,Qn=Me.onActiveValueChange,Er=Me.activeDescendantId,Dr=Me.searchValue,xr=Me.autoClearSearchValue,nr=Me.onSearch,Nr=Me.onSearchSplit,pr=Me.tokenSeparators,rr=Me.allowClear,Sr=Me.prefix,Lr=Me.suffixIcon,fr=Me.clearIcon,qn=Me.OptionList,jn=Me.animation,Pr=Me.transitionName,Vr=Me.dropdownStyle,Jr=Me.dropdownClassName,kr=Me.dropdownMatchSelectWidth,Wr=Me.dropdownRender,Br=Me.dropdownAlign,zr=Me.placement,ii=Me.builtinPlacements,Fr=Me.getPopupContainer,Rn=Me.showAction,Bt=Rn===void 0?[]:Rn,jt=Me.onFocus,yn=Me.onBlur,nn=Me.onKeyUp,En=Me.onKeyDown,ir=Me.onMouseDown,Zt=(0,be.Z)(Me,Lt),Pt=Ot(xn),tn=(Kt!==void 0?Kt:Pt)||xn==="combobox",an=(0,He.Z)({},Zt);sn.forEach(function(ar){delete an[ar]}),It==null||It.forEach(function(ar){delete an[ar]});var Ln=de.useState(!1),or=(0,ye.Z)(Ln,2),Vn=or[0],vr=or[1];de.useEffect(function(){vr((0,Ze.Z)())},[]);var mr=de.useRef(null),wr=de.useRef(null),Hr=de.useRef(null),Mr=de.useRef(null),Or=de.useRef(null),ei=de.useRef(!1),Li=ct(),Oi=(0,ye.Z)(Li,3),xi=Oi[0],vi=Oi[1],Xi=Oi[2];de.useImperativeHandle(Pe,function(){var ar,_n;return{focus:(ar=Mr.current)===null||ar===void 0?void 0:ar.focus,blur:(_n=Mr.current)===null||_n===void 0?void 0:_n.blur,scrollTo:function(fi){var Yr;return(Yr=Or.current)===null||Yr===void 0?void 0:Yr.scrollTo(fi)},nativeElement:mr.current||wr.current}});var ur=de.useMemo(function(){var ar;if(xn!=="combobox")return Dr;var _n=(ar=Jt[0])===null||ar===void 0?void 0:ar.value;return typeof _n=="string"||typeof _n=="number"?String(_n):""},[Dr,xn,Jt]),to=xn==="combobox"&&typeof dn=="function"&&dn()||null,ti=typeof Ht=="function"&&Ht(),Ni=(0,Be.x1)(wr,ti==null||(Mt=ti.props)===null||Mt===void 0?void 0:Mt.ref),ao=de.useState(!1),Ji=(0,ye.Z)(ao,2),mi=Ji[0],Ri=Ji[1];(0,lt.Z)(function(){Ri(!0)},[]);var _r=(0,Ke.Z)(!1,{defaultValue:en,value:gn}),Wi=(0,ye.Z)(_r,2),so=Wi[0],Zi=Wi[1],Qr=mi?so:!1,xo=!vn&&pt;(Wn||xo&&Qr&&xn==="combobox")&&(Qr=!1);var lo=xo?!1:Qr,Dn=de.useCallback(function(ar){var _n=ar!==void 0?ar:!Qr;Wn||(Zi(_n),Qr!==_n&&(Hn==null||Hn(_n)))},[Wn,Qr,Zi,Hn]),On=de.useMemo(function(){return(pr||[]).some(function(ar){return[`
|
|
`,`\r
|
|
`].includes(ar)})},[pr]),Pn=de.useContext(Ft)||{},Nn=Pn.maxCount,dr=Pn.rawValues,Rr=function(_n,ci,fi){if(!(Pt&&xt(Nn)&&(dr==null?void 0:dr.size)>=Nn)){var Yr=!0,ni=_n;Qn==null||Qn(null);var Vi=Nt(_n,pr,xt(Nn)?Nn-dr.size:void 0),zi=fi?null:Vi;return xn!=="combobox"&&zi&&(ni="",Nr==null||Nr(zi),Dn(!1),Yr=!1),nr&&ur!==ni&&nr(ni,{source:ci?"typing":"effect"}),Yr}},Gi=function(_n){!_n||!_n.trim()||nr(_n,{source:"submit"})};de.useEffect(function(){!Qr&&!Pt&&xn!=="combobox"&&Rr("",!1,!1)},[Qr]),de.useEffect(function(){so&&Wn&&Zi(!1),Wn&&!ei.current&&vi(!1)},[Wn]);var gi=rt(),ui=(0,ye.Z)(gi,2),Kr=ui[0],Hi=ui[1],Qi=de.useRef(!1),Mi=function(_n){var ci=Kr(),fi=_n.key,Yr=fi==="Enter";if(Yr&&(xn!=="combobox"&&_n.preventDefault(),Qr||Dn(!0)),Hi(!!ur),fi==="Backspace"&&!ci&&Pt&&!ur&&Jt.length){for(var ni=(0,Qe.Z)(Jt),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&&kt(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=Or.current)===null||co===void 0||co.onKeyDown.apply(co,[_n].concat(Ai))}En==null||En.apply(void 0,[_n].concat(Ai))},qi=function(_n){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=Or.current)===null||ni===void 0||ni.onKeyUp.apply(ni,[_n].concat(fi))}_n.key==="Enter"&&(Qi.current=!1),nn==null||nn.apply(void 0,[_n].concat(fi))},no=function(_n){var ci=Jt.filter(function(fi){return fi!==_n});kt(ci,{type:"remove",values:[_n]})},ji=function(){Qi.current=!1},Ao=de.useRef(!1),ja=function(){vi(!0),Wn||(jt&&!Ao.current&&jt.apply(void 0,arguments),Bt.includes("focus")&&Dn(!0)),Ao.current=!0},ya=function(){ei.current=!0,vi(!1,function(){Ao.current=!1,ei.current=!1,Dn(!1)}),!Wn&&(ur&&(xn==="tags"?nr(ur,{source:"submit"}):xn==="multiple"&&nr("",{source:"blur"})),yn&&yn.apply(void 0,arguments))},$i=[];de.useEffect(function(){return function(){$i.forEach(function(ar){return clearTimeout(ar)}),$i.splice(0,$i.length)}},[]);var uo=function(_n){var ci,fi=_n.target,Yr=(ci=Hr.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=Mr.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];ir==null||ir.apply(void 0,[_n].concat(zi))},_i=de.useState({}),ba=(0,ye.Z)(_i,2),xa=ba[1];function Va(){xa({})}var wa;ti&&(wa=function(_n){Dn(_n)}),at(function(){var ar;return[mr.current,(ar=Hr.current)===null||ar===void 0?void 0:ar.getPopupElement()]},lo,Dn,!!ti);var Ua=de.useMemo(function(){return(0,He.Z)((0,He.Z)({},Me),{},{notFoundContent:vn,open:Qr,triggerOpen:lo,id:bt,showSearch:tn,multiple:Pt,toggleOpen:Dn})},[Me,vn,lo,Qr,bt,tn,Pt,Dn]),Ko=!!Lr||Yn,Yo;Ko&&(Yo=de.createElement(Ae,{className:me()("".concat(ze,"-arrow"),(0,Ne.Z)({},"".concat(ze,"-arrow-loading"),Yn)),customizeIcon:Lr,customizeIconProps:{loading:Yn,searchValue:ur,open:Qr,focused:xi,showSearch:tn}}));var wo=function(){var _n;mn==null||mn(),(_n=Mr.current)===null||_n===void 0||_n.focus(),kt([],{type:"clear",values:Jt}),Rr("",!1,!1)},Xo=et(ze,wo,Jt,rr,fr,Wn,ur,xn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Po=de.createElement(qn,{ref:Or}),Sa=me()(ze,wt,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(ze,"-focused"),xi),"".concat(ze,"-multiple"),Pt),"".concat(ze,"-single"),!Pt),"".concat(ze,"-allow-clear"),rr),"".concat(ze,"-show-arrow"),Ko),"".concat(ze,"-disabled"),Wn),"".concat(ze,"-loading"),Yn),"".concat(ze,"-open"),Qr),"".concat(ze,"-customize-input"),to),"".concat(ze,"-show-search"),tn)),Bo=de.createElement(ne,{ref:Hr,disabled:Wn,prefixCls:ze,visible:lo,popupElement:Po,animation:jn,transitionName:Pr,dropdownStyle:Vr,dropdownClassName:Jr,direction:cn,dropdownMatchSelectWidth:kr,dropdownRender:Wr,dropdownAlign:Br,placement:zr,builtinPlacements:ii,getPopupContainer:Fr,empty:pt,getTriggerDOMNode:function(_n){return wr.current||_n},onPopupVisibleChange:wa,onPopupMouseEnter:Va},ti?de.cloneElement(ti,{ref:Ni}):de.createElement(Ye,(0,le.Z)({},Me,{domRef:wr,prefixCls:ze,inputElement:to,ref:Mr,id:bt,prefix:Sr,showSearch:tn,autoClearSearchValue:xr,mode:xn,activeDescendantId:Er,tagRender:$t,values:Jt,open:Qr,onToggleOpen:Dn,activeValue:br,searchValue:ur,onSearch:Rr,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:On,onInputBlur:ji}))),wi;return ti?wi=Bo:wi=de.createElement("div",(0,le.Z)({className:Sa},an,{ref:mr,onMouseDown:uo,onKeyDown:Mi,onKeyUp:qi,onFocus:ja,onBlur:ya}),de.createElement(zt,{visible:xi&&!Qr,values:Jt}),Bo,Yo,Ca&&Jo),de.createElement(tt.Provider,{value:Ua},wi)}),it=qt,ln=function(){return null};ln.isSelectOptGroup=!0;var Wt=ln,Ut=function(){return null};Ut.isSelectOption=!0;var un=Ut,An=fe(80547),hn=fe(2738),wn=fe(48911);function er(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Gn=["disabled","title","children","style","className"];function Gr(Me){return typeof Me=="string"||typeof Me=="number"}var Ar=function(Pe,Mt){var bt=ft(),ze=bt.prefixCls,wt=bt.id,Kt=bt.open,$t=bt.multiple,cn=bt.mode,It=bt.searchValue,Jt=bt.toggleOpen,kt=bt.notFoundContent,pt=bt.onPopupScroll,Qt=de.useContext(Ft),vn=Qt.maxCount,mn=Qt.flattenOptions,xn=Qt.onActiveValue,Wn=Qt.defaultActiveFirstOption,Yn=Qt.onSelect,dn=Qt.menuItemSelectedIcon,Ht=Qt.rawValues,gn=Qt.fieldNames,en=Qt.virtual,Hn=Qt.direction,br=Qt.listHeight,Qn=Qt.listItemHeight,Er=Qt.optionRender,Dr="".concat(ze,"-item"),xr=(0,An.Z)(function(){return mn},[Kt,mn],function(Rn,Bt){return Bt[0]&&Rn[1]!==Bt[1]}),nr=de.useRef(null),Nr=de.useMemo(function(){return $t&&xt(vn)&&(Ht==null?void 0:Ht.size)>=vn},[$t,vn,Ht==null?void 0:Ht.size]),pr=function(Bt){Bt.preventDefault()},rr=function(Bt){var jt;(jt=nr.current)===null||jt===void 0||jt.scrollTo(typeof Bt=="number"?{index:Bt}:Bt)},Sr=de.useCallback(function(Rn){return cn==="combobox"?!1:Ht.has(Rn)},[cn,(0,Qe.Z)(Ht).toString(),Ht.size]),Lr=function(Bt){for(var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,yn=xr.length,nn=0;nn<yn;nn+=1){var En=(Bt+nn*jt+yn)%yn,ir=xr[En]||{},Zt=ir.group,Pt=ir.data;if(!Zt&&!(Pt!=null&&Pt.disabled)&&(Sr(Pt.value)||!Nr))return En}return-1},fr=de.useState(function(){return Lr(0)}),qn=(0,ye.Z)(fr,2),jn=qn[0],Pr=qn[1],Vr=function(Bt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Pr(Bt);var yn={source:jt?"keyboard":"mouse"},nn=xr[Bt];if(!nn){xn(null,-1,yn);return}xn(nn.value,Bt,yn)};(0,de.useEffect)(function(){Vr(Wn!==!1?Lr(0):-1)},[xr.length,It]);var Jr=de.useCallback(function(Rn){return cn==="combobox"?String(Rn).toLowerCase()===It.toLowerCase():Ht.has(Rn)},[cn,It,(0,Qe.Z)(Ht).toString(),Ht.size]);(0,de.useEffect)(function(){var Rn=setTimeout(function(){if(!$t&&Kt&&Ht.size===1){var jt=Array.from(Ht)[0],yn=xr.findIndex(function(nn){var En=nn.data;return It?String(En.value).startsWith(It):En.value===jt});yn!==-1&&(Vr(yn),rr(yn))}});if(Kt){var Bt;(Bt=nr.current)===null||Bt===void 0||Bt.scrollTo(void 0)}return function(){return clearTimeout(Rn)}},[Kt,It]);var kr=function(Bt){Bt!==void 0&&Yn(Bt,{selected:!Ht.has(Bt)}),$t||Jt(!1)};if(de.useImperativeHandle(Mt,function(){return{onKeyDown:function(Bt){var jt=Bt.which,yn=Bt.ctrlKey;switch(jt){case st.Z.N:case st.Z.P:case st.Z.UP:case st.Z.DOWN:{var nn=0;if(jt===st.Z.UP?nn=-1:jt===st.Z.DOWN?nn=1:er()&&yn&&(jt===st.Z.N?nn=1:jt===st.Z.P&&(nn=-1)),nn!==0){var En=Lr(jn+nn,nn);rr(En),Vr(En,!0)}break}case st.Z.TAB:case st.Z.ENTER:{var ir,Zt=xr[jn];Zt&&!(Zt!=null&&(ir=Zt.data)!==null&&ir!==void 0&&ir.disabled)&&!Nr?kr(Zt.value):kr(void 0),Kt&&Bt.preventDefault();break}case st.Z.ESC:Jt(!1),Kt&&Bt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Bt){rr(Bt)}}}),xr.length===0)return de.createElement("div",{role:"listbox",id:"".concat(wt,"_list"),className:"".concat(Dr,"-empty"),onMouseDown:pr},kt);var Wr=Object.keys(gn).map(function(Rn){return gn[Rn]}),Br=function(Bt){return Bt.label};function zr(Rn,Bt){var jt=Rn.group;return{role:jt?"presentation":"option",id:"".concat(wt,"_list_").concat(Bt)}}var ii=function(Bt){var jt=xr[Bt];if(!jt)return null;var yn=jt.data||{},nn=yn.value,En=jt.group,ir=(0,Se.Z)(yn,!0),Zt=Br(jt);return jt?de.createElement("div",(0,le.Z)({"aria-label":typeof Zt=="string"&&!En?Zt:null},ir,{key:Bt},zr(jt,Bt),{"aria-selected":Jr(nn)}),nn):null},Fr={role:"listbox",id:"".concat(wt,"_list")};return de.createElement(de.Fragment,null,en&&de.createElement("div",(0,le.Z)({},Fr,{style:{height:0,width:0,overflow:"hidden"}}),ii(jn-1),ii(jn),ii(jn+1)),de.createElement(wn.Z,{itemKey:"key",ref:nr,data:xr,height:br,itemHeight:Qn,fullHeight:!1,onMouseDown:pr,onScroll:pt,virtual:en,direction:Hn,innerProps:en?null:Fr},function(Rn,Bt){var jt=Rn.group,yn=Rn.groupOption,nn=Rn.data,En=Rn.label,ir=Rn.value,Zt=nn.key;if(jt){var Pt,tn=(Pt=nn.title)!==null&&Pt!==void 0?Pt:Gr(En)?En.toString():void 0;return de.createElement("div",{className:me()(Dr,"".concat(Dr,"-group"),nn.className),title:tn},En!==void 0?En:Zt)}var an=nn.disabled,Ln=nn.title,or=nn.children,Vn=nn.style,vr=nn.className,mr=(0,be.Z)(nn,Gn),wr=(0,hn.Z)(mr,Wr),Hr=Sr(ir),Mr=an||!Hr&&Nr,Or="".concat(Dr,"-option"),ei=me()(Dr,Or,vr,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(Or,"-grouped"),yn),"".concat(Or,"-active"),jn===Bt&&!Mr),"".concat(Or,"-disabled"),Mr),"".concat(Or,"-selected"),Hr)),Li=Br(Rn),Oi=!dn||typeof dn=="function"||Hr,xi=typeof Li=="number"?Li:Li||ir,vi=Gr(xi)?xi.toString():void 0;return Ln!==void 0&&(vi=Ln),de.createElement("div",(0,le.Z)({},(0,Se.Z)(wr),en?{}:zr(Rn,Bt),{"aria-selected":Jr(ir),className:ei,title:vi,onMouseMove:function(){jn===Bt||Mr||Vr(Bt)},onClick:function(){Mr||kr(ir)},style:Vn}),de.createElement("div",{className:"".concat(Or,"-content")},typeof Er=="function"?Er(Rn,{index:Bt}):xi),de.isValidElement(dn)||Hr,Oi&&de.createElement(Ae,{className:"".concat(Dr,"-option-state"),customizeIcon:dn,customizeIconProps:{value:ir,disabled:Mr,isSelected:Hr}},Hr?"\u2713":null))}))},gr=de.forwardRef(Ar),cr=gr,In=function(Me,Pe){var Mt=de.useRef({values:new Map,options:new Map}),bt=de.useMemo(function(){var wt=Mt.current,Kt=wt.values,$t=wt.options,cn=Me.map(function(kt){if(kt.label===void 0){var pt;return(0,He.Z)((0,He.Z)({},kt),{},{label:(pt=Kt.get(kt.value))===null||pt===void 0?void 0:pt.label})}return kt}),It=new Map,Jt=new Map;return cn.forEach(function(kt){It.set(kt.value,kt),Jt.set(kt.value,Pe.get(kt.value)||$t.get(kt.value))}),Mt.current.values=It,Mt.current.options=Jt,cn},[Me,Pe]),ze=de.useCallback(function(wt){return Pe.get(wt)||Mt.current.options.get(wt)},[Pe]);return[bt,ze]};function tr(Me,Pe){return $e(Me).join("").toUpperCase().includes(Pe)}var sr=function(Me,Pe,Mt,bt,ze){return de.useMemo(function(){if(!Mt||bt===!1)return Me;var wt=Pe.options,Kt=Pe.label,$t=Pe.value,cn=[],It=typeof bt=="function",Jt=Mt.toUpperCase(),kt=It?bt:function(Qt,vn){return ze?tr(vn[ze],Jt):vn[wt]?tr(vn[Kt!=="children"?Kt:"label"],Jt):tr(vn[$t],Jt)},pt=It?function(Qt){return mt(Qt)}:function(Qt){return Qt};return Me.forEach(function(Qt){if(Qt[wt]){var vn=kt(Mt,pt(Qt));if(vn)cn.push(Qt);else{var mn=Qt[wt].filter(function(xn){return kt(Mt,pt(xn))});mn.length&&cn.push((0,He.Z)((0,He.Z)({},Qt),{},(0,Ne.Z)({},wt,mn)))}return}kt(Mt,pt(Qt))&&cn.push(Qt)}),cn},[Me,bt,ze,Mt,Pe])},Bn=fe(6551),Xn=fe(11592),Kn=["children","value"],yr=["children"];function Gt(Me){var Pe=Me,Mt=Pe.key,bt=Pe.props,ze=bt.children,wt=bt.value,Kt=(0,be.Z)(bt,Kn);return(0,He.Z)({key:Mt,value:wt!==void 0?wt:Mt,children:ze},Kt)}function pn(Me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Me).map(function(Mt,bt){if(!de.isValidElement(Mt)||!Mt.type)return null;var ze=Mt,wt=ze.type.isSelectOptGroup,Kt=ze.key,$t=ze.props,cn=$t.children,It=(0,be.Z)($t,yr);return Pe||!wt?Gt(Mt):(0,He.Z)((0,He.Z)({key:"__RC_SELECT_GRP__".concat(Kt===null?bt:Kt,"__"),label:Kt},It),{},{options:pn(cn)})}).filter(function(Mt){return Mt})}var kn=function(Pe,Mt,bt,ze,wt){return de.useMemo(function(){var Kt=Pe,$t=!Pe;$t&&(Kt=pn(Mt));var cn=new Map,It=new Map,Jt=function(Qt,vn,mn){mn&&typeof mn=="string"&&Qt.set(vn[mn],vn)},kt=function pt(Qt){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mn=0;mn<Qt.length;mn+=1){var xn=Qt[mn];!xn[bt.options]||vn?(cn.set(xn[bt.value],xn),Jt(It,xn,bt.label),Jt(It,xn,ze),Jt(It,xn,wt)):pt(xn[bt.options],!0)}};return kt(Kt),{options:Kt,valueOptions:cn,labelOptions:It}},[Pe,Mt,bt,ze,wt])},Mn=kn;function Jn(Me){var Pe=de.useRef();Pe.current=Me;var Mt=de.useCallback(function(){return Pe.current.apply(Pe,arguments)},[]);return Mt}function $n(Me){var Pe=Me.mode,Mt=Me.options,bt=Me.children,ze=Me.backfill,wt=Me.allowClear,Kt=Me.placeholder,$t=Me.getInputElement,cn=Me.showSearch,It=Me.onSearch,Jt=Me.defaultOpen,kt=Me.autoFocus,pt=Me.labelInValue,Qt=Me.value,vn=Me.inputValue,mn=Me.optionLabelProp,xn=isMultiple(Pe),Wn=cn!==void 0?cn:xn||Pe==="combobox",Yn=Mt||convertChildrenToData(bt);if(warning(Pe!=="tags"||Yn.every(function(en){return!en.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Pe==="tags"||Pe==="combobox"){var dn=Yn.some(function(en){return en.options?en.options.some(function(Hn){return typeof("value"in Hn?Hn.value:Hn.key)=="number"}):typeof("value"in en?en.value:en.key)=="number"});warning(!dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Pe!=="combobox"||!mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Pe==="combobox"||!ze,"`backfill` only works with `combobox` mode."),warning(Pe==="combobox"||!$t,"`getInputElement` only work with `combobox` mode."),noteOnce(Pe!=="combobox"||!$t||!wt||!Kt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),It&&!Wn&&Pe!=="combobox"&&Pe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Jt||kt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Qt!=null){var Ht=toArray(Qt);warning(!pt||Ht.every(function(en){return _typeof(en)==="object"&&("key"in en||"value"in en)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!xn||Array.isArray(Qt),"`value` should be array when `mode` is `multiple` or `tags`")}if(bt){var gn=null;toNodeArray(bt).some(function(en){if(!React.isValidElement(en)||!en.type)return!1;var Hn=en,br=Hn.type;if(br.isSelectOption)return!1;if(br.isSelectOptGroup){var Qn=toNodeArray(en.props.children).every(function(Er){return!React.isValidElement(Er)||!en.type||Er.type.isSelectOption?!0:(gn=Er.type,!1)});return!Qn}return gn=br,!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 hr(Me,Pe){if(Me){var Mt=function bt(ze){for(var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Kt=0;Kt<ze.length;Kt++){var $t=ze[Kt];if($t[Pe==null?void 0:Pe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!wt&&Array.isArray($t[Pe==null?void 0:Pe.options])&&bt($t[Pe==null?void 0:Pe.options],!0))break}};Mt(Me)}}var zn=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"],lr=["inputValue"];function _t(Me){return!Me||(0,Ie.Z)(Me)!=="object"}var ot=de.forwardRef(function(Me,Pe){var Mt=Me.id,bt=Me.mode,ze=Me.prefixCls,wt=ze===void 0?"rc-select":ze,Kt=Me.backfill,$t=Me.fieldNames,cn=Me.inputValue,It=Me.searchValue,Jt=Me.onSearch,kt=Me.autoClearSearchValue,pt=kt===void 0?!0:kt,Qt=Me.onSelect,vn=Me.onDeselect,mn=Me.dropdownMatchSelectWidth,xn=mn===void 0?!0:mn,Wn=Me.filterOption,Yn=Me.filterSort,dn=Me.optionFilterProp,Ht=Me.optionLabelProp,gn=Me.options,en=Me.optionRender,Hn=Me.children,br=Me.defaultActiveFirstOption,Qn=Me.menuItemSelectedIcon,Er=Me.virtual,Dr=Me.direction,xr=Me.listHeight,nr=xr===void 0?200:xr,Nr=Me.listItemHeight,pr=Nr===void 0?20:Nr,rr=Me.labelRender,Sr=Me.value,Lr=Me.defaultValue,fr=Me.labelInValue,qn=Me.onChange,jn=Me.maxCount,Pr=(0,be.Z)(Me,Fn),Vr=(0,Bn.ZP)(Mt),Jr=Ot(bt),kr=!!(!gn&&Hn),Wr=de.useMemo(function(){return Wn===void 0&&bt==="combobox"?!1:Wn},[Wn,bt]),Br=de.useMemo(function(){return yt($t,kr)},[JSON.stringify($t),kr]),zr=(0,Ke.Z)("",{value:It!==void 0?It:cn,postState:function(On){return On||""}}),ii=(0,ye.Z)(zr,2),Fr=ii[0],Rn=ii[1],Bt=Mn(gn,Hn,Br,dn,Ht),jt=Bt.valueOptions,yn=Bt.labelOptions,nn=Bt.options,En=de.useCallback(function(Dn){var On=$e(Dn);return On.map(function(Pn){var Nn,dr,Rr,Gi,gi;if(_t(Pn))Nn=Pn;else{var ui;Rr=Pn.key,dr=Pn.label,Nn=(ui=Pn.value)!==null&&ui!==void 0?ui:Rr}var Kr=jt.get(Nn);if(Kr){var Hi;if(dr===void 0&&(dr=Kr==null?void 0:Kr[Ht||Br.label]),Rr===void 0&&(Rr=(Hi=Kr==null?void 0:Kr.key)!==null&&Hi!==void 0?Hi:Nn),Gi=Kr==null?void 0:Kr.disabled,gi=Kr==null?void 0:Kr.title,0)var Qi}return{label:dr,value:Nn,key:Rr,disabled:Gi,title:gi}})},[Br,Ht,jt]),ir=(0,Ke.Z)(Lr,{value:Sr}),Zt=(0,ye.Z)(ir,2),Pt=Zt[0],tn=Zt[1],an=de.useMemo(function(){var Dn,On=Jr&&Pt===null?[]:Pt,Pn=En(On);return bt==="combobox"&&ce((Dn=Pn[0])===null||Dn===void 0?void 0:Dn.value)?[]:Pn},[Pt,En,bt,Jr]),Ln=In(an,jt),or=(0,ye.Z)(Ln,2),Vn=or[0],vr=or[1],mr=de.useMemo(function(){if(!bt&&Vn.length===1){var Dn=Vn[0];if(Dn.value===null&&(Dn.label===null||Dn.label===void 0))return[]}return Vn.map(function(On){var Pn;return(0,He.Z)((0,He.Z)({},On),{},{label:(Pn=typeof rr=="function"?rr(On):On.label)!==null&&Pn!==void 0?Pn:On.value})})},[bt,Vn,rr]),wr=de.useMemo(function(){return new Set(Vn.map(function(Dn){return Dn.value}))},[Vn]);de.useEffect(function(){if(bt==="combobox"){var Dn,On=(Dn=Vn[0])===null||Dn===void 0?void 0:Dn.value;Rn(pe(On)?String(On):"")}},[Vn]);var Hr=Jn(function(Dn,On){var Pn=On!=null?On:Dn;return(0,Ne.Z)((0,Ne.Z)({},Br.value,Dn),Br.label,Pn)}),Mr=de.useMemo(function(){if(bt!=="tags")return nn;var Dn=(0,Qe.Z)(nn),On=function(Nn){return jt.has(Nn)};return(0,Qe.Z)(Vn).sort(function(Pn,Nn){return Pn.value<Nn.value?-1:1}).forEach(function(Pn){var Nn=Pn.value;On(Nn)||Dn.push(Hr(Nn,Pn.label))}),Dn},[Hr,nn,jt,Vn,bt]),Or=sr(Mr,Br,Fr,Wr,dn),ei=de.useMemo(function(){return bt!=="tags"||!Fr||Or.some(function(Dn){return Dn[dn||"value"]===Fr})||Or.some(function(Dn){return Dn[Br.value]===Fr})?Or:[Hr(Fr)].concat((0,Qe.Z)(Or))},[Hr,dn,bt,Or,Fr,Br]),Li=function Dn(On){var Pn=(0,Qe.Z)(On).sort(function(Nn,dr){return Yn(Nn,dr,{searchValue:Fr})});return Pn.map(function(Nn){return Array.isArray(Nn.options)?(0,He.Z)((0,He.Z)({},Nn),{},{options:Nn.options.length>0?Dn(Nn.options):Nn.options}):Nn})},Oi=de.useMemo(function(){return Yn?Li(ei):ei},[ei,Yn,Fr]),xi=de.useMemo(function(){return ht(Oi,{fieldNames:Br,childrenAsData:kr})},[Oi,Br,kr]),vi=function(On){var Pn=En(On);if(tn(Pn),qn&&(Pn.length!==Vn.length||Pn.some(function(Rr,Gi){var gi;return((gi=Vn[Gi])===null||gi===void 0?void 0:gi.value)!==(Rr==null?void 0:Rr.value)}))){var Nn=fr?Pn:Pn.map(function(Rr){return Rr.value}),dr=Pn.map(function(Rr){return mt(vr(Rr.value))});qn(Jr?Nn:Nn[0],Jr?dr:dr[0])}},Xi=de.useState(null),ur=(0,ye.Z)(Xi,2),to=ur[0],ti=ur[1],Ni=de.useState(0),ao=(0,ye.Z)(Ni,2),Ji=ao[0],mi=ao[1],Ri=br!==void 0?br:bt!=="combobox",_r=de.useCallback(function(Dn,On){var Pn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Nn=Pn.source,dr=Nn===void 0?"keyboard":Nn;mi(On),Kt&&bt==="combobox"&&Dn!==null&&dr==="keyboard"&&ti(String(Dn))},[Kt,bt]),Wi=function(On,Pn,Nn){var dr=function(){var no,ji=vr(On);return[fr?{label:ji==null?void 0:ji[Br.label],value:On,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:On}:On,mt(ji)]};if(Pn&&Qt){var Rr=dr(),Gi=(0,ye.Z)(Rr,2),gi=Gi[0],ui=Gi[1];Qt(gi,ui)}else if(!Pn&&vn&&Nn!=="clear"){var Kr=dr(),Hi=(0,ye.Z)(Kr,2),Qi=Hi[0],Mi=Hi[1];vn(Qi,Mi)}},so=Jn(function(Dn,On){var Pn,Nn=Jr?On.selected:!0;Nn?Pn=Jr?[].concat((0,Qe.Z)(Vn),[Dn]):[Dn]:Pn=Vn.filter(function(dr){return dr.value!==Dn}),vi(Pn),Wi(Dn,Nn),bt==="combobox"?ti(""):(!Ot||pt)&&(Rn(""),ti(""))}),Zi=function(On,Pn){vi(On);var Nn=Pn.type,dr=Pn.values;(Nn==="remove"||Nn==="clear")&&dr.forEach(function(Rr){Wi(Rr.value,!1,Nn)})},Qr=function(On,Pn){if(Rn(On),ti(null),Pn.source==="submit"){var Nn=(On||"").trim();if(Nn){var dr=Array.from(new Set([].concat((0,Qe.Z)(wr),[Nn])));vi(dr),Wi(Nn,!0),Rn("")}return}Pn.source!=="blur"&&(bt==="combobox"&&vi(On),Jt==null||Jt(On))},xo=function(On){var Pn=On;bt!=="tags"&&(Pn=On.map(function(dr){var Rr=yn.get(dr);return Rr==null?void 0:Rr.value}).filter(function(dr){return dr!==void 0}));var Nn=Array.from(new Set([].concat((0,Qe.Z)(wr),(0,Qe.Z)(Pn))));vi(Nn),Nn.forEach(function(dr){Wi(dr,!0)})},lo=de.useMemo(function(){var Dn=Er!==!1&&xn!==!1;return(0,He.Z)((0,He.Z)({},Bt),{},{flattenOptions:xi,onActiveValue:_r,defaultActiveFirstOption:Ri,onSelect:so,menuItemSelectedIcon:Qn,rawValues:wr,fieldNames:Br,virtual:Dn,direction:Dr,listHeight:nr,listItemHeight:pr,childrenAsData:kr,maxCount:jn,optionRender:en})},[jn,Bt,xi,_r,Ri,so,Qn,wr,Br,Er,xn,Dr,nr,pr,kr,en]);return de.createElement(Ft.Provider,{value:lo},de.createElement(it,(0,le.Z)({},Pr,{id:Vr,prefixCls:wt,ref:Pe,omitDomProps:lr,mode:bt,displayValues:mr,onDisplayValuesChange:Zi,direction:Dr,searchValue:Fr,onSearch:Qr,autoClearSearchValue:pt,onSearchSplit:xo,dropdownMatchSelectWidth:xn,OptionList:cr,emptyOptions:!xi.length,activeValue:to,activeDescendantId:"".concat(Vr,"_list_").concat(Ji)})))}),Xt=ot;Xt.Option=un,Xt.OptGroup=Wt;var Cn=Xt,Zn=Cn},63158:function(At,Rt,fe){"use strict";var le=fe(54476),Qe=fe(20068),Ne=fe(42978),He=fe(75931),ye=fe(59301),be=fe(92310),Ie=fe.n(be),Ke=fe(18929),Ee=fe(10228),de=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],nt=ye.forwardRef(function(me,lt){var Ze,Be=me.prefixCls,Re=Be===void 0?"rc-switch":Be,Ae=me.className,et=me.checked,tt=me.defaultChecked,ft=me.disabled,ct=me.loadingIcon,rt=me.checkedChildren,at=me.unCheckedChildren,st=me.onClick,Vt=me.onChange,Se=me.onKeyDown,Oe=(0,He.Z)(me,de),qe=(0,Ke.Z)(!1,{value:et,defaultValue:tt}),Te=(0,Ne.Z)(qe,2),_e=Te[0],ke=Te[1];function Fe(dt,pe){var ce=_e;return ft||(ce=dt,ke(ce),Vt==null||Vt(ce,pe)),ce}function Et(dt){dt.which===Ee.Z.LEFT?Fe(!1,dt):dt.which===Ee.Z.RIGHT&&Fe(!0,dt),Se==null||Se(dt)}function $e(dt){var pe=Fe(!_e,dt);st==null||st(pe,dt)}var gt=Ie()(Re,Ae,(Ze={},(0,Qe.Z)(Ze,"".concat(Re,"-checked"),_e),(0,Qe.Z)(Ze,"".concat(Re,"-disabled"),ft),Ze));return ye.createElement("button",(0,le.Z)({},Oe,{type:"button",role:"switch","aria-checked":_e,disabled:ft,className:gt,ref:lt,onKeyDown:Et,onClick:$e}),ct,ye.createElement("span",{className:"".concat(Re,"-inner")},ye.createElement("span",{className:"".concat(Re,"-inner-checked")},rt),ye.createElement("span",{className:"".concat(Re,"-inner-unchecked")},at)))});nt.displayName="Switch",Rt.Z=nt},22711:function(At,Rt,fe){"use strict";fe.r(Rt),fe.d(Rt,{ResizableTextArea:function(){return Te},default:function(){return Et}});var le=fe(54476),Qe=fe(20068),Ne=fe(33885),He=fe(94480),ye=fe(42978),be=fe(75931),Ie=fe(92310),Ke=fe.n(Ie),Ee=fe(36901),de=fe(66003),nt=fe(30292),me=fe(18929),lt=fe(59301),Ze=fe(76190),Be=fe(29301),Re=fe(34280),Ae=fe(16089),et=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,tt=["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"],ft={},ct;function rt($e){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=$e.getAttribute("id")||$e.getAttribute("data-reactid")||$e.getAttribute("name");if(gt&&ft[dt])return ft[dt];var pe=window.getComputedStyle($e),ce=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),je=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),vt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),ut=tt.map(function(Ve){return"".concat(Ve,":").concat(pe.getPropertyValue(Ve))}).join(";"),we={sizingStyle:ut,paddingSize:je,borderSize:vt,boxSizing:ce};return gt&&dt&&(ft[dt]=we),we}function at($e){var gt=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;ct||(ct=document.createElement("textarea"),ct.setAttribute("tab-index","-1"),ct.setAttribute("aria-hidden","true"),ct.setAttribute("name","hiddenTextarea"),document.body.appendChild(ct)),$e.getAttribute("wrap")?ct.setAttribute("wrap",$e.getAttribute("wrap")):ct.removeAttribute("wrap");var ce=rt($e,gt),je=ce.paddingSize,vt=ce.borderSize,ut=ce.boxSizing,we=ce.sizingStyle;ct.setAttribute("style","".concat(we,";").concat(et)),ct.value=$e.value||$e.placeholder||"";var Ve=void 0,Ge=void 0,St,Je=ct.scrollHeight;if(ut==="border-box"?Je+=vt:ut==="content-box"&&(Je-=je),dt!==null||pe!==null){ct.value=" ";var Ce=ct.scrollHeight-je;dt!==null&&(Ve=Ce*dt,ut==="border-box"&&(Ve=Ve+je+vt),Je=Math.max(Ve,Je)),pe!==null&&(Ge=Ce*pe,ut==="border-box"&&(Ge=Ge+je+vt),St=Je>Ge?"":"hidden",Je=Math.min(Ge,Je))}var ve={height:Je,overflowY:St,resize:"none"};return Ve&&(ve.minHeight=Ve),Ge&&(ve.maxHeight=Ge),ve}var st=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Vt=0,Se=1,Oe=2,qe=lt.forwardRef(function($e,gt){var dt=$e,pe=dt.prefixCls,ce=dt.defaultValue,je=dt.value,vt=dt.autoSize,ut=dt.onResize,we=dt.className,Ve=dt.style,Ge=dt.disabled,St=dt.onChange,Je=dt.onInternalAutoSize,Ce=(0,be.Z)(dt,st),ve=(0,me.Z)(ce,{value:je,postState:function(un){return un!=null?un:""}}),Le=(0,ye.Z)(ve,2),Ye=Le[0],ie=Le[1],ee=function(un){ie(un.target.value),St==null||St(un)},z=lt.useRef();lt.useImperativeHandle(gt,function(){return{textArea:z.current}});var re=lt.useMemo(function(){return vt&&(0,Ze.Z)(vt)==="object"?[vt.minRows,vt.maxRows]:[]},[vt]),ae=(0,ye.Z)(re,2),ne=ae[0],ge=ae[1],We=!!vt,xt=function(){try{if(document.activeElement===z.current){var un=z.current,An=un.selectionStart,hn=un.selectionEnd,wn=un.scrollTop;z.current.setSelectionRange(An,hn),z.current.scrollTop=wn}}catch(er){}},yt=lt.useState(Oe),ht=(0,ye.Z)(yt,2),mt=ht[0],Nt=ht[1],Dt=lt.useState(),Ft=(0,ye.Z)(Dt,2),zt=Ft[0],Lt=Ft[1],sn=function(){Nt(Vt)};(0,Re.Z)(function(){We&&sn()},[je,ne,ge,We]),(0,Re.Z)(function(){if(mt===Vt)Nt(Se);else if(mt===Se){var Ut=at(z.current,!1,ne,ge);Nt(Oe),Lt(Ut)}else xt()},[mt]);var Ot=lt.useRef(),qt=function(){Ae.Z.cancel(Ot.current)},it=function(un){mt===Oe&&(ut==null||ut(un),vt&&(qt(),Ot.current=(0,Ae.Z)(function(){sn()})))};lt.useEffect(function(){return qt},[]);var ln=We?zt:null,Wt=(0,Ne.Z)((0,Ne.Z)({},Ve),ln);return(mt===Vt||mt===Se)&&(Wt.overflowY="hidden",Wt.overflowX="hidden"),lt.createElement(Be.Z,{onResize:it,disabled:!(vt||ut)},lt.createElement("textarea",(0,le.Z)({},Ce,{ref:z,style:Wt,className:Ke()(pe,we,(0,Qe.Z)({},"".concat(pe,"-disabled"),Ge)),disabled:Ge,value:Ye,onChange:ee})))}),Te=qe,_e=["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"],ke=lt.forwardRef(function($e,gt){var dt,pe=$e.defaultValue,ce=$e.value,je=$e.onFocus,vt=$e.onBlur,ut=$e.onChange,we=$e.allowClear,Ve=$e.maxLength,Ge=$e.onCompositionStart,St=$e.onCompositionEnd,Je=$e.suffix,Ce=$e.prefixCls,ve=Ce===void 0?"rc-textarea":Ce,Le=$e.showCount,Ye=$e.count,ie=$e.className,ee=$e.style,z=$e.disabled,re=$e.hidden,ae=$e.classNames,ne=$e.styles,ge=$e.onResize,We=$e.onClear,xt=$e.onPressEnter,yt=$e.readOnly,ht=$e.autoSize,mt=$e.onKeyDown,Nt=(0,be.Z)($e,_e),Dt=(0,me.Z)(pe,{value:ce,defaultValue:pe}),Ft=(0,ye.Z)(Dt,2),zt=Ft[0],Lt=Ft[1],sn=zt==null?"":String(zt),Ot=lt.useState(!1),qt=(0,ye.Z)(Ot,2),it=qt[0],ln=qt[1],Wt=lt.useRef(!1),Ut=lt.useState(null),un=(0,ye.Z)(Ut,2),An=un[0],hn=un[1],wn=(0,lt.useRef)(null),er=(0,lt.useRef)(null),Gn=function(){var Xt;return(Xt=er.current)===null||Xt===void 0?void 0:Xt.textArea},Gr=function(){Gn().focus()};(0,lt.useImperativeHandle)(gt,function(){var ot;return{resizableTextArea:er.current,focus:Gr,blur:function(){Gn().blur()},nativeElement:((ot=wn.current)===null||ot===void 0?void 0:ot.nativeElement)||Gn()}}),(0,lt.useEffect)(function(){ln(function(ot){return!z&&ot})},[z]);var Ar=lt.useState(null),gr=(0,ye.Z)(Ar,2),cr=gr[0],In=gr[1];lt.useEffect(function(){if(cr){var ot;(ot=Gn()).setSelectionRange.apply(ot,(0,He.Z)(cr))}},[cr]);var tr=(0,de.Z)(Ye,Le),sr=(dt=tr.max)!==null&&dt!==void 0?dt:Ve,Bn=Number(sr)>0,Xn=tr.strategy(sn),Kn=!!sr&&Xn>sr,yr=function(Xt,Cn){var Zn=Cn;!Wt.current&&tr.exceedFormatter&&tr.max&&tr.strategy(Cn)>tr.max&&(Zn=tr.exceedFormatter(Cn,{max:tr.max}),Cn!==Zn&&In([Gn().selectionStart||0,Gn().selectionEnd||0])),Lt(Zn),(0,nt.rJ)(Xt.currentTarget,Xt,ut,Zn)},Gt=function(Xt){Wt.current=!0,Ge==null||Ge(Xt)},pn=function(Xt){Wt.current=!1,yr(Xt,Xt.currentTarget.value),St==null||St(Xt)},kn=function(Xt){yr(Xt,Xt.target.value)},Mn=function(Xt){Xt.key==="Enter"&&xt&&xt(Xt),mt==null||mt(Xt)},Jn=function(Xt){ln(!0),je==null||je(Xt)},$n=function(Xt){ln(!1),vt==null||vt(Xt)},hr=function(Xt){Lt(""),Gr(),(0,nt.rJ)(Gn(),Xt,ut)},zn=Je,Fn;tr.show&&(tr.showFormatter?Fn=tr.showFormatter({value:sn,count:Xn,maxLength:sr}):Fn="".concat(Xn).concat(Bn?" / ".concat(sr):""),zn=lt.createElement(lt.Fragment,null,zn,lt.createElement("span",{className:Ke()("".concat(ve,"-data-count"),ae==null?void 0:ae.count),style:ne==null?void 0:ne.count},Fn)));var lr=function(Xt){var Cn;ge==null||ge(Xt),(Cn=Gn())!==null&&Cn!==void 0&&Cn.style.height&&hn(!0)},_t=!ht&&!Le&&!we;return lt.createElement(Ee.BaseInput,{ref:wn,value:sn,allowClear:we,handleReset:hr,suffix:zn,prefixCls:ve,classNames:(0,Ne.Z)((0,Ne.Z)({},ae),{},{affixWrapper:Ke()(ae==null?void 0:ae.affixWrapper,(0,Qe.Z)((0,Qe.Z)({},"".concat(ve,"-show-count"),Le),"".concat(ve,"-textarea-allow-clear"),we))}),disabled:z,focused:it,className:Ke()(ie,Kn&&"".concat(ve,"-out-of-range")),style:(0,Ne.Z)((0,Ne.Z)({},ee),An&&!_t?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fn=="string"?Fn:void 0}},hidden:re,readOnly:yt,onClear:We},lt.createElement(Te,(0,le.Z)({},Nt,{autoSize:ht,maxLength:Ve,onKeyDown:Mn,onChange:kn,onFocus:Jn,onBlur:$n,onCompositionStart:Gt,onCompositionEnd:pn,className:Ke()(ae==null?void 0:ae.textarea),style:(0,Ne.Z)((0,Ne.Z)({},ne==null?void 0:ne.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:ve,onResize:lr,ref:er,readOnly:yt})))}),Fe=ke,Et=Fe},90472:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return $e}});var le=fe(54476),Qe=fe(67732),Ne=fe(83652),He=fe(31226),ye=fe(42403),be=fe(158),Ie=fe(20068),Ke=fe(59301),Ee=fe(33885),de=fe(75931),nt=fe(76190),me=fe(75044),lt=fe(3202),Ze=fe(94480),Be=fe(92310),Re=fe.n(Be),Ae=fe(26112),et=fe(48736),tt=function(gt,dt){if(gt&&dt){var pe=Array.isArray(dt)?dt:dt.split(","),ce=gt.name||"",je=gt.type||"",vt=je.replace(/\/.*$/,"");return pe.some(function(ut){var we=ut.trim();if(/^\*(\/\*)?$/.test(ut))return!0;if(we.charAt(0)==="."){var Ve=ce.toLowerCase(),Ge=we.toLowerCase(),St=[Ge];return(Ge===".jpg"||Ge===".jpeg")&&(St=[".jpg",".jpeg"]),St.some(function(Je){return Ve.endsWith(Je)})}return/\/\*$/.test(we)?vt===we.replace(/\/.*$/,""):je===we?!0:/^\w+$/.test(we)?((0,et.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(we,"'.Skip for check.")),!0):!1})}return!0};function ft(gt,dt){var pe="cannot ".concat(gt.method," ").concat(gt.action," ").concat(dt.status,"'"),ce=new Error(pe);return ce.status=dt.status,ce.method=gt.method,ce.url=gt.action,ce}function ct(gt){var dt=gt.responseText||gt.response;if(!dt)return dt;try{return JSON.parse(dt)}catch(pe){return dt}}function rt(gt){var dt=new XMLHttpRequest;gt.onProgress&&dt.upload&&(dt.upload.onprogress=function(vt){vt.total>0&&(vt.percent=vt.loaded/vt.total*100),gt.onProgress(vt)});var pe=new FormData;gt.data&&Object.keys(gt.data).forEach(function(je){var vt=gt.data[je];if(Array.isArray(vt)){vt.forEach(function(ut){pe.append("".concat(je,"[]"),ut)});return}pe.append(je,vt)}),gt.file instanceof Blob?pe.append(gt.filename,gt.file,gt.file.name):pe.append(gt.filename,gt.file),dt.onerror=function(vt){gt.onError(vt)},dt.onload=function(){return dt.status<200||dt.status>=300?gt.onError(ft(gt,dt),ct(dt)):gt.onSuccess(ct(dt),dt)},dt.open(gt.method,gt.action,!0),gt.withCredentials&&"withCredentials"in dt&&(dt.withCredentials=!0);var ce=gt.headers||{};return ce["X-Requested-With"]!==null&&dt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ce).forEach(function(je){ce[je]!==null&&dt.setRequestHeader(je,ce[je])}),dt.send(pe),{abort:function(){dt.abort()}}}var at=function(){var gt=(0,lt.Z)((0,me.Z)().mark(function dt(pe,ce){var je,vt,ut,we,Ve,Ge,St,Je;return(0,me.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:Ge=function(){return Ge=(0,lt.Z)((0,me.Z)().mark(function Ye(ie){return(0,me.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",new Promise(function(re){ie.file(function(ae){ce(ae)?(ie.fullPath&&!ae.webkitRelativePath&&(Object.defineProperties(ae,{webkitRelativePath:{writable:!0}}),ae.webkitRelativePath=ie.fullPath.replace(/^\//,""),Object.defineProperties(ae,{webkitRelativePath:{writable:!1}})),re(ae)):re(null)})}));case 1:case"end":return z.stop()}},Ye)})),Ge.apply(this,arguments)},Ve=function(Ye){return Ge.apply(this,arguments)},we=function(){return we=(0,lt.Z)((0,me.Z)().mark(function Ye(ie){var ee,z,re,ae,ne;return(0,me.Z)().wrap(function(We){for(;;)switch(We.prev=We.next){case 0:ee=ie.createReader(),z=[];case 2:return We.next=5,new Promise(function(xt){ee.readEntries(xt,function(){return xt([])})});case 5:if(re=We.sent,ae=re.length,ae){We.next=9;break}return We.abrupt("break",12);case 9:for(ne=0;ne<ae;ne++)z.push(re[ne]);We.next=2;break;case 12:return We.abrupt("return",z);case 13:case"end":return We.stop()}},Ye)})),we.apply(this,arguments)},ut=function(Ye){return we.apply(this,arguments)},je=[],vt=[],pe.forEach(function(Le){return vt.push(Le.webkitGetAsEntry())}),St=function(){var Le=(0,lt.Z)((0,me.Z)().mark(function Ye(ie,ee){var z,re;return(0,me.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(ie){ne.next=2;break}return ne.abrupt("return");case 2:if(ie.path=ee||"",!ie.isFile){ne.next=10;break}return ne.next=6,Ve(ie);case 6:z=ne.sent,z&&je.push(z),ne.next=15;break;case 10:if(!ie.isDirectory){ne.next=15;break}return ne.next=13,ut(ie);case 13:re=ne.sent,vt.push.apply(vt,(0,Ze.Z)(re));case 15:case"end":return ne.stop()}},Ye)}));return function(ie,ee){return Le.apply(this,arguments)}}(),Je=0;case 9:if(!(Je<vt.length)){ve.next=15;break}return ve.next=12,St(vt[Je]);case 12:Je++,ve.next=9;break;case 15:return ve.abrupt("return",je);case 16:case"end":return ve.stop()}},dt)}));return function(pe,ce){return gt.apply(this,arguments)}}(),st=at,Vt=+new Date,Se=0;function Oe(){return"rc-upload-".concat(Vt,"-").concat(++Se)}var qe=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Te=function(gt){(0,ye.Z)(pe,gt);var dt=(0,be.Z)(pe);function pe(){var ce;(0,Qe.Z)(this,pe);for(var je=arguments.length,vt=new Array(je),ut=0;ut<je;ut++)vt[ut]=arguments[ut];return ce=dt.call.apply(dt,[this].concat(vt)),(0,Ie.Z)((0,He.Z)(ce),"state",{uid:Oe()}),(0,Ie.Z)((0,He.Z)(ce),"reqs",{}),(0,Ie.Z)((0,He.Z)(ce),"fileInput",void 0),(0,Ie.Z)((0,He.Z)(ce),"_isMounted",void 0),(0,Ie.Z)((0,He.Z)(ce),"onChange",function(we){var Ve=ce.props,Ge=Ve.accept,St=Ve.directory,Je=we.target.files,Ce=(0,Ze.Z)(Je).filter(function(ve){return!St||tt(ve,Ge)});ce.uploadFiles(Ce),ce.reset()}),(0,Ie.Z)((0,He.Z)(ce),"onClick",function(we){var Ve=ce.fileInput;if(Ve){var Ge=we.target,St=ce.props.onClick;if(Ge&&Ge.tagName==="BUTTON"){var Je=Ve.parentNode;Je.focus(),Ge.blur()}Ve.click(),St&&St(we)}}),(0,Ie.Z)((0,He.Z)(ce),"onKeyDown",function(we){we.key==="Enter"&&ce.onClick(we)}),(0,Ie.Z)((0,He.Z)(ce),"onFileDrop",function(){var we=(0,lt.Z)((0,me.Z)().mark(function Ve(Ge){var St,Je,Ce;return(0,me.Z)().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(St=ce.props.multiple,Ge.preventDefault(),Ge.type!=="dragover"){Le.next=4;break}return Le.abrupt("return");case 4:if(!ce.props.directory){Le.next=11;break}return Le.next=7,st(Array.prototype.slice.call(Ge.dataTransfer.items),function(Ye){return tt(Ye,ce.props.accept)});case 7:Je=Le.sent,ce.uploadFiles(Je),Le.next=14;break;case 11:Ce=(0,Ze.Z)(Ge.dataTransfer.files).filter(function(Ye){return tt(Ye,ce.props.accept)}),St===!1&&(Ce=Ce.slice(0,1)),ce.uploadFiles(Ce);case 14:case"end":return Le.stop()}},Ve)}));return function(Ve){return we.apply(this,arguments)}}()),(0,Ie.Z)((0,He.Z)(ce),"uploadFiles",function(we){var Ve=(0,Ze.Z)(we),Ge=Ve.map(function(St){return St.uid=Oe(),ce.processFile(St,Ve)});Promise.all(Ge).then(function(St){var Je=ce.props.onBatchStart;Je==null||Je(St.map(function(Ce){var ve=Ce.origin,Le=Ce.parsedFile;return{file:ve,parsedFile:Le}})),St.filter(function(Ce){return Ce.parsedFile!==null}).forEach(function(Ce){ce.post(Ce)})})}),(0,Ie.Z)((0,He.Z)(ce),"processFile",function(){var we=(0,lt.Z)((0,me.Z)().mark(function Ve(Ge,St){var Je,Ce,ve,Le,Ye,ie,ee,z,re;return(0,me.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(Je=ce.props.beforeUpload,Ce=Ge,!Je){ne.next=14;break}return ne.prev=3,ne.next=6,Je(Ge,St);case 6:Ce=ne.sent,ne.next=12;break;case 9:ne.prev=9,ne.t0=ne.catch(3),Ce=!1;case 12:if(Ce!==!1){ne.next=14;break}return ne.abrupt("return",{origin:Ge,parsedFile:null,action:null,data:null});case 14:if(ve=ce.props.action,typeof ve!="function"){ne.next=21;break}return ne.next=18,ve(Ge);case 18:Le=ne.sent,ne.next=22;break;case 21:Le=ve;case 22:if(Ye=ce.props.data,typeof Ye!="function"){ne.next=29;break}return ne.next=26,Ye(Ge);case 26:ie=ne.sent,ne.next=30;break;case 29:ie=Ye;case 30:return ee=((0,nt.Z)(Ce)==="object"||typeof Ce=="string")&&Ce?Ce:Ge,ee instanceof File?z=ee:z=new File([ee],Ge.name,{type:Ge.type}),re=z,re.uid=Ge.uid,ne.abrupt("return",{origin:Ge,data:ie,parsedFile:re,action:Le});case 35:case"end":return ne.stop()}},Ve,null,[[3,9]])}));return function(Ve,Ge){return we.apply(this,arguments)}}()),(0,Ie.Z)((0,He.Z)(ce),"saveFileInput",function(we){ce.fileInput=we}),ce}return(0,Ne.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(je){var vt=this,ut=je.data,we=je.origin,Ve=je.action,Ge=je.parsedFile;if(this._isMounted){var St=this.props,Je=St.onStart,Ce=St.customRequest,ve=St.name,Le=St.headers,Ye=St.withCredentials,ie=St.method,ee=we.uid,z=Ce||rt,re={action:Ve,filename:ve,data:ut,file:Ge,headers:Le,withCredentials:Ye,method:ie||"post",onProgress:function(ne){var ge=vt.props.onProgress;ge==null||ge(ne,Ge)},onSuccess:function(ne,ge){var We=vt.props.onSuccess;We==null||We(ne,Ge,ge),delete vt.reqs[ee]},onError:function(ne,ge){var We=vt.props.onError;We==null||We(ne,ge,Ge),delete vt.reqs[ee]}};Je(we),this.reqs[ee]=z(re)}}},{key:"reset",value:function(){this.setState({uid:Oe()})}},{key:"abort",value:function(je){var vt=this.reqs;if(je){var ut=je.uid?je.uid:je;vt[ut]&&vt[ut].abort&&vt[ut].abort(),delete vt[ut]}else Object.keys(vt).forEach(function(we){vt[we]&&vt[we].abort&&vt[we].abort(),delete vt[we]})}},{key:"render",value:function(){var je=this.props,vt=je.component,ut=je.prefixCls,we=je.className,Ve=je.classNames,Ge=Ve===void 0?{}:Ve,St=je.disabled,Je=je.id,Ce=je.name,ve=je.style,Le=je.styles,Ye=Le===void 0?{}:Le,ie=je.multiple,ee=je.accept,z=je.capture,re=je.children,ae=je.directory,ne=je.openFileDialogOnClick,ge=je.onMouseEnter,We=je.onMouseLeave,xt=je.hasControlInside,yt=(0,de.Z)(je,qe),ht=Re()((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},ut,!0),"".concat(ut,"-disabled"),St),we,we)),mt=ae?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Nt=St?{}:{onClick:ne?this.onClick:function(){},onKeyDown:ne?this.onKeyDown:function(){},onMouseEnter:ge,onMouseLeave:We,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:xt?void 0:"0"};return Ke.createElement(vt,(0,le.Z)({},Nt,{className:ht,role:xt?void 0:"button",style:ve}),Ke.createElement("input",(0,le.Z)({},(0,Ae.Z)(yt,{aria:!0,data:!0}),{id:Je,name:Ce,disabled:St,type:"file",ref:this.saveFileInput,onClick:function(Ft){return Ft.stopPropagation()},key:this.state.uid,style:(0,Ee.Z)({display:"none"},Ye.input),className:Ge.input,accept:ee},mt,{multiple:ie,onChange:this.onChange},z!=null?{capture:z}:{})),re)}}]),pe}(Ke.Component),_e=Te;function ke(){}var Fe=function(gt){(0,ye.Z)(pe,gt);var dt=(0,be.Z)(pe);function pe(){var ce;(0,Qe.Z)(this,pe);for(var je=arguments.length,vt=new Array(je),ut=0;ut<je;ut++)vt[ut]=arguments[ut];return ce=dt.call.apply(dt,[this].concat(vt)),(0,Ie.Z)((0,He.Z)(ce),"uploader",void 0),(0,Ie.Z)((0,He.Z)(ce),"saveUploader",function(we){ce.uploader=we}),ce}return(0,Ne.Z)(pe,[{key:"abort",value:function(je){this.uploader.abort(je)}},{key:"render",value:function(){return Ke.createElement(_e,(0,le.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(Ke.Component);(0,Ie.Z)(Fe,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:ke,onError:ke,onSuccess:ke,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Et=Fe,$e=Et},48911:function(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return Ye}});var le=fe(54476),Qe=fe(76190),Ne=fe(33885),He=fe(20068),ye=fe(42978),be=fe(75931),Ie=fe(92310),Ke=fe.n(Ie),Ee=fe(29301),de=fe(70425),nt=fe(34280),me=fe(59301),lt=fe(4676),Ze=me.forwardRef(function(ie,ee){var z=ie.height,re=ie.offsetY,ae=ie.offsetX,ne=ie.children,ge=ie.prefixCls,We=ie.onInnerResize,xt=ie.innerProps,yt=ie.rtl,ht=ie.extra,mt={},Nt={display:"flex",flexDirection:"column"};return re!==void 0&&(mt={height:z,position:"relative",overflow:"hidden"},Nt=(0,Ne.Z)((0,Ne.Z)({},Nt),{},(0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)((0,He.Z)({transform:"translateY(".concat(re,"px)")},yt?"marginRight":"marginLeft",-ae),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:mt},me.createElement(Ee.Z,{onResize:function(Ft){var zt=Ft.offsetHeight;zt&&We&&We()}},me.createElement("div",(0,le.Z)({style:Nt,className:Ke()((0,He.Z)({},"".concat(ge,"-holder-inner"),ge)),ref:ee},xt),ne,ht)))});Ze.displayName="Filler";var Be=Ze;function Re(ie){var ee=ie.children,z=ie.setRef,re=me.useCallback(function(ae){z(ae)},[]);return me.cloneElement(ee,{ref:re})}function Ae(ie,ee,z,re,ae,ne,ge,We){var xt=We.getKey;return ie.slice(ee,z+1).map(function(yt,ht){var mt=ee+ht,Nt=ge(yt,mt,{style:{width:re},offsetX:ae}),Dt=xt(yt);return me.createElement(Re,{key:Dt,setRef:function(zt){return ne(yt,zt)}},Nt)})}function et(ie,ee,z,re){var ae=z-ie,ne=ee-z,ge=Math.min(ae,ne)*2;if(re<=ge){var We=Math.floor(re/2);return re%2?z+We+1:z-We}return ae>ne?z-(re-ne):z+(re-ae)}function tt(ie,ee,z){var re=ie.length,ae=ee.length,ne,ge;if(re===0&&ae===0)return null;re<ae?(ne=ie,ge=ee):(ne=ee,ge=ie);var We={__EMPTY_ITEM__:!0};function xt(Ft){return Ft!==void 0?z(Ft):We}for(var yt=null,ht=Math.abs(re-ae)!==1,mt=0;mt<ge.length;mt+=1){var Nt=xt(ne[mt]),Dt=xt(ge[mt]);if(Nt!==Dt){yt=mt,ht=ht||Nt!==xt(ge[mt+1]);break}}return yt===null?null:{index:yt,multiple:ht}}function ft(ie,ee,z){var re=me.useState(ie),ae=(0,ye.Z)(re,2),ne=ae[0],ge=ae[1],We=me.useState(null),xt=(0,ye.Z)(We,2),yt=xt[0],ht=xt[1];return me.useEffect(function(){var mt=tt(ne||[],ie||[],ee);(mt==null?void 0:mt.index)!==void 0&&(z==null||z(mt.index),ht(ie[mt.index])),ge(ie)},[ie]),[yt]}var ct=fe(16089),rt=(typeof navigator=="undefined"?"undefined":(0,Qe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),at=rt,st=function(ie,ee,z,re){var ae=(0,me.useRef)(!1),ne=(0,me.useRef)(null);function ge(){clearTimeout(ne.current),ae.current=!0,ne.current=setTimeout(function(){ae.current=!1},50)}var We=(0,me.useRef)({top:ie,bottom:ee,left:z,right:re});return We.current.top=ie,We.current.bottom=ee,We.current.left=z,We.current.right=re,function(xt,yt){var ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,mt=xt?yt<0&&We.current.left||yt>0&&We.current.right:yt<0&&We.current.top||yt>0&&We.current.bottom;return ht&&mt?(clearTimeout(ne.current),ae.current=!1):(!mt||ae.current)&&ge(),!ae.current&&mt}};function Vt(ie,ee,z,re,ae,ne,ge){var We=(0,me.useRef)(0),xt=(0,me.useRef)(null),yt=(0,me.useRef)(null),ht=(0,me.useRef)(!1),mt=st(ee,z,re,ae);function Nt(Ot,qt){if(ct.Z.cancel(xt.current),!mt(!1,qt)){var it=Ot;if(!it._virtualHandled)it._virtualHandled=!0;else return;We.current+=qt,yt.current=qt,at||it.preventDefault(),xt.current=(0,ct.Z)(function(){var ln=ht.current?10:1;ge(We.current*ln,!1),We.current=0})}}function Dt(Ot,qt){ge(qt,!0),at||Ot.preventDefault()}var Ft=(0,me.useRef)(null),zt=(0,me.useRef)(null);function Lt(Ot){if(ie){ct.Z.cancel(zt.current),zt.current=(0,ct.Z)(function(){Ft.current=null},2);var qt=Ot.deltaX,it=Ot.deltaY,ln=Ot.shiftKey,Wt=qt,Ut=it;(Ft.current==="sx"||!Ft.current&&ln&&it&&!qt)&&(Wt=it,Ut=0,Ft.current="sx");var un=Math.abs(Wt),An=Math.abs(Ut);Ft.current===null&&(Ft.current=ne&&un>An?"x":"y"),Ft.current==="y"?Nt(Ot,Ut):Dt(Ot,Wt)}}function sn(Ot){ie&&(ht.current=Ot.detail===yt.current)}return[Lt,sn]}function Se(ie,ee,z,re){var ae=me.useMemo(function(){return[new Map,[]]},[ie,z.id,re]),ne=(0,ye.Z)(ae,2),ge=ne[0],We=ne[1],xt=function(ht){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ht,Nt=ge.get(ht),Dt=ge.get(mt);if(Nt===void 0||Dt===void 0)for(var Ft=ie.length,zt=We.length;zt<Ft;zt+=1){var Lt,sn=ie[zt],Ot=ee(sn);ge.set(Ot,zt);var qt=(Lt=z.get(Ot))!==null&&Lt!==void 0?Lt:re;if(We[zt]=(We[zt-1]||0)+qt,Ot===ht&&(Nt=zt),Ot===mt&&(Dt=zt),Nt!==void 0&&Dt!==void 0)break}return{top:We[Nt-1]||0,bottom:We[Dt]}};return xt}var Oe=fe(67732),qe=fe(83652),Te=function(){function ie(){(0,Oe.Z)(this,ie),(0,He.Z)(this,"maps",void 0),(0,He.Z)(this,"id",0),(0,He.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,qe.Z)(ie,[{key:"set",value:function(z,re){this.diffRecords.set(z,this.maps[z]),this.maps[z]=re,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ie}(),_e=Te;function ke(ie){var ee=parseFloat(ie);return isNaN(ee)?0:ee}function Fe(ie,ee,z){var re=me.useState(0),ae=(0,ye.Z)(re,2),ne=ae[0],ge=ae[1],We=(0,me.useRef)(new Map),xt=(0,me.useRef)(new _e),yt=(0,me.useRef)(0);function ht(){yt.current+=1}function mt(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ht();var Ft=function(){var sn=!1;We.current.forEach(function(Ot,qt){if(Ot&&Ot.offsetParent){var it=Ot.offsetHeight,ln=getComputedStyle(Ot),Wt=ln.marginTop,Ut=ln.marginBottom,un=ke(Wt),An=ke(Ut),hn=it+un+An;xt.current.get(qt)!==hn&&(xt.current.set(qt,hn),sn=!0)}}),sn&&ge(function(Ot){return Ot+1})};if(Dt)Ft();else{yt.current+=1;var zt=yt.current;Promise.resolve().then(function(){zt===yt.current&&Ft()})}}function Nt(Dt,Ft){var zt=ie(Dt),Lt=We.current.get(zt);Ft?(We.current.set(zt,Ft),mt()):We.current.delete(zt),!Lt!=!Ft&&(Ft?ee==null||ee(Dt):z==null||z(Dt))}return(0,me.useEffect)(function(){return ht},[]),[Nt,mt,xt.current,ne]}var Et=14/15;function $e(ie,ee,z){var re=(0,me.useRef)(!1),ae=(0,me.useRef)(0),ne=(0,me.useRef)(0),ge=(0,me.useRef)(null),We=(0,me.useRef)(null),xt,yt=function(Dt){if(re.current){var Ft=Math.ceil(Dt.touches[0].pageX),zt=Math.ceil(Dt.touches[0].pageY),Lt=ae.current-Ft,sn=ne.current-zt,Ot=Math.abs(Lt)>Math.abs(sn);Ot?ae.current=Ft:ne.current=zt;var qt=z(Ot,Ot?Lt:sn,!1,Dt);qt&&Dt.preventDefault(),clearInterval(We.current),qt&&(We.current=setInterval(function(){Ot?Lt*=Et:sn*=Et;var it=Math.floor(Ot?Lt:sn);(!z(Ot,it,!0)||Math.abs(it)<=.1)&&clearInterval(We.current)},16))}},ht=function(){re.current=!1,xt()},mt=function(Dt){xt(),Dt.touches.length===1&&!re.current&&(re.current=!0,ae.current=Math.ceil(Dt.touches[0].pageX),ne.current=Math.ceil(Dt.touches[0].pageY),ge.current=Dt.target,ge.current.addEventListener("touchmove",yt,{passive:!1}),ge.current.addEventListener("touchend",ht,{passive:!0}))};xt=function(){ge.current&&(ge.current.removeEventListener("touchmove",yt),ge.current.removeEventListener("touchend",ht))},(0,nt.Z)(function(){return ie&&ee.current.addEventListener("touchstart",mt,{passive:!0}),function(){var Nt;(Nt=ee.current)===null||Nt===void 0||Nt.removeEventListener("touchstart",mt),xt(),clearInterval(We.current)}},[ie])}function gt(ie){return Math.floor(Math.pow(ie,.5))}function dt(ie,ee){var z="touches"in ie?ie.touches[0]:ie;return z[ee?"pageX":"pageY"]-window[ee?"scrollX":"scrollY"]}function pe(ie,ee,z){me.useEffect(function(){var re=ee.current;if(ie&&re){var ae=!1,ne,ge,We=function(){ct.Z.cancel(ne)},xt=function Nt(){We(),ne=(0,ct.Z)(function(){z(ge),Nt()})},yt=function(){ae=!1,We()},ht=function(Dt){if(!(Dt.target.draggable||Dt.button!==0)){var Ft=Dt;Ft._virtualHandled||(Ft._virtualHandled=!0,ae=!0)}},mt=function(Dt){if(ae){var Ft=dt(Dt,!1),zt=re.getBoundingClientRect(),Lt=zt.top,sn=zt.bottom;if(Ft<=Lt){var Ot=Lt-Ft;ge=-gt(Ot),xt()}else if(Ft>=sn){var qt=Ft-sn;ge=gt(qt),xt()}else We()}};return re.addEventListener("mousedown",ht),re.ownerDocument.addEventListener("mouseup",yt),re.ownerDocument.addEventListener("mousemove",mt),re.ownerDocument.addEventListener("dragend",yt),function(){re.removeEventListener("mousedown",ht),re.ownerDocument.removeEventListener("mouseup",yt),re.ownerDocument.removeEventListener("mousemove",mt),re.ownerDocument.removeEventListener("dragend",yt),We()}}},[ie])}var ce=10;function je(ie,ee,z,re,ae,ne,ge,We){var xt=me.useRef(),yt=me.useState(null),ht=(0,ye.Z)(yt,2),mt=ht[0],Nt=ht[1];return(0,nt.Z)(function(){if(mt&&mt.times<ce){if(!ie.current){Nt(function(tr){return(0,Ne.Z)({},tr)});return}ne();var Dt=mt.targetAlign,Ft=mt.originAlign,zt=mt.index,Lt=mt.offset,sn=ie.current.clientHeight,Ot=!1,qt=Dt,it=null;if(sn){for(var ln=Dt||Ft,Wt=0,Ut=0,un=0,An=Math.min(ee.length-1,zt),hn=0;hn<=An;hn+=1){var wn=ae(ee[hn]);Ut=Wt;var er=z.get(wn);un=Ut+(er===void 0?re:er),Wt=un}for(var Gn=ln==="top"?Lt:sn-Lt,Gr=An;Gr>=0;Gr-=1){var Ar=ae(ee[Gr]),gr=z.get(Ar);if(gr===void 0){Ot=!0;break}if(Gn-=gr,Gn<=0)break}switch(ln){case"top":it=Ut-Lt;break;case"bottom":it=un-sn+Lt;break;default:{var cr=ie.current.scrollTop,In=cr+sn;Ut<cr?qt="top":un>In&&(qt="bottom")}}it!==null&&ge(it),it!==mt.lastTop&&(Ot=!0)}Ot&&Nt((0,Ne.Z)((0,Ne.Z)({},mt),{},{times:mt.times+1,targetAlign:qt,lastTop:it}))}},[mt,ie.current]),function(Dt){if(Dt==null){We();return}if(ct.Z.cancel(xt.current),typeof Dt=="number")ge(Dt);else if(Dt&&(0,Qe.Z)(Dt)==="object"){var Ft,zt=Dt.align;"index"in Dt?Ft=Dt.index:Ft=ee.findIndex(function(Ot){return ae(Ot)===Dt.key});var Lt=Dt.offset,sn=Lt===void 0?0:Lt;Nt({times:0,index:Ft,offset:sn,originAlign:zt})}}}var vt=me.forwardRef(function(ie,ee){var z=ie.prefixCls,re=ie.rtl,ae=ie.scrollOffset,ne=ie.scrollRange,ge=ie.onStartMove,We=ie.onStopMove,xt=ie.onScroll,yt=ie.horizontal,ht=ie.spinSize,mt=ie.containerSize,Nt=ie.style,Dt=ie.thumbStyle,Ft=ie.showScrollBar,zt=me.useState(!1),Lt=(0,ye.Z)(zt,2),sn=Lt[0],Ot=Lt[1],qt=me.useState(null),it=(0,ye.Z)(qt,2),ln=it[0],Wt=it[1],Ut=me.useState(null),un=(0,ye.Z)(Ut,2),An=un[0],hn=un[1],wn=!re,er=me.useRef(),Gn=me.useRef(),Gr=me.useState(Ft),Ar=(0,ye.Z)(Gr,2),gr=Ar[0],cr=Ar[1],In=me.useRef(),tr=function(){Ft===!0||Ft===!1||(clearTimeout(In.current),cr(!0),In.current=setTimeout(function(){cr(!1)},3e3))},sr=ne-mt||0,Bn=mt-ht||0,Xn=me.useMemo(function(){if(ae===0||sr===0)return 0;var hr=ae/sr;return hr*Bn},[ae,sr,Bn]),Kn=function(zn){zn.stopPropagation(),zn.preventDefault()},yr=me.useRef({top:Xn,dragging:sn,pageY:ln,startTop:An});yr.current={top:Xn,dragging:sn,pageY:ln,startTop:An};var Gt=function(zn){Ot(!0),Wt(dt(zn,yt)),hn(yr.current.top),ge(),zn.stopPropagation(),zn.preventDefault()};me.useEffect(function(){var hr=function(_t){_t.preventDefault()},zn=er.current,Fn=Gn.current;return zn.addEventListener("touchstart",hr,{passive:!1}),Fn.addEventListener("touchstart",Gt,{passive:!1}),function(){zn.removeEventListener("touchstart",hr),Fn.removeEventListener("touchstart",Gt)}},[]);var pn=me.useRef();pn.current=sr;var kn=me.useRef();kn.current=Bn,me.useEffect(function(){if(sn){var hr,zn=function(_t){var ot=yr.current,Xt=ot.dragging,Cn=ot.pageY,Zn=ot.startTop;ct.Z.cancel(hr);var Me=er.current.getBoundingClientRect(),Pe=mt/(yt?Me.width:Me.height);if(Xt){var Mt=(dt(_t,yt)-Cn)*Pe,bt=Zn;!wn&&yt?bt-=Mt:bt+=Mt;var ze=pn.current,wt=kn.current,Kt=wt?bt/wt:0,$t=Math.ceil(Kt*ze);$t=Math.max($t,0),$t=Math.min($t,ze),hr=(0,ct.Z)(function(){xt($t,yt)})}},Fn=function(){Ot(!1),We()};return window.addEventListener("mousemove",zn,{passive:!0}),window.addEventListener("touchmove",zn,{passive:!0}),window.addEventListener("mouseup",Fn,{passive:!0}),window.addEventListener("touchend",Fn,{passive:!0}),function(){window.removeEventListener("mousemove",zn),window.removeEventListener("touchmove",zn),window.removeEventListener("mouseup",Fn),window.removeEventListener("touchend",Fn),ct.Z.cancel(hr)}}},[sn]),me.useEffect(function(){return tr(),function(){clearTimeout(In.current)}},[ae]),me.useImperativeHandle(ee,function(){return{delayHidden:tr}});var Mn="".concat(z,"-scrollbar"),Jn={position:"absolute",visibility:gr?null:"hidden"},$n={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return yt?(Object.assign(Jn,{height:8,left:0,right:0,bottom:0}),Object.assign($n,(0,He.Z)({height:"100%",width:ht},wn?"left":"right",Xn))):(Object.assign(Jn,(0,He.Z)({width:8,top:0,bottom:0},wn?"right":"left",0)),Object.assign($n,{width:"100%",height:ht,top:Xn})),me.createElement("div",{ref:er,className:Ke()(Mn,(0,He.Z)((0,He.Z)((0,He.Z)({},"".concat(Mn,"-horizontal"),yt),"".concat(Mn,"-vertical"),!yt),"".concat(Mn,"-visible"),gr)),style:(0,Ne.Z)((0,Ne.Z)({},Jn),Nt),onMouseDown:Kn,onMouseMove:tr},me.createElement("div",{ref:Gn,className:Ke()("".concat(Mn,"-thumb"),(0,He.Z)({},"".concat(Mn,"-thumb-moving"),sn)),style:(0,Ne.Z)((0,Ne.Z)({},$n),Dt),onMouseDown:Gt}))}),ut=vt,we=20;function Ve(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ie/ee*ie;return isNaN(z)&&(z=0),z=Math.max(z,we),Math.floor(z)}var Ge=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],St=[],Je={overflowY:"auto",overflowAnchor:"none"};function Ce(ie,ee){var z=ie.prefixCls,re=z===void 0?"rc-virtual-list":z,ae=ie.className,ne=ie.height,ge=ie.itemHeight,We=ie.fullHeight,xt=We===void 0?!0:We,yt=ie.style,ht=ie.data,mt=ie.children,Nt=ie.itemKey,Dt=ie.virtual,Ft=ie.direction,zt=ie.scrollWidth,Lt=ie.component,sn=Lt===void 0?"div":Lt,Ot=ie.onScroll,qt=ie.onVirtualScroll,it=ie.onVisibleChange,ln=ie.innerProps,Wt=ie.extraRender,Ut=ie.styles,un=ie.showScrollBar,An=un===void 0?"optional":un,hn=(0,be.Z)(ie,Ge),wn=me.useCallback(function(Bt){return typeof Nt=="function"?Nt(Bt):Bt==null?void 0:Bt[Nt]},[Nt]),er=Fe(wn,null,null),Gn=(0,ye.Z)(er,4),Gr=Gn[0],Ar=Gn[1],gr=Gn[2],cr=Gn[3],In=!!(Dt!==!1&&ne&&ge),tr=me.useMemo(function(){return Object.values(gr.maps).reduce(function(Bt,jt){return Bt+jt},0)},[gr.id,gr.maps]),sr=In&&ht&&(Math.max(ge*ht.length,tr)>ne||!!zt),Bn=Ft==="rtl",Xn=Ke()(re,(0,He.Z)({},"".concat(re,"-rtl"),Bn),ae),Kn=ht||St,yr=(0,me.useRef)(),Gt=(0,me.useRef)(),pn=(0,me.useRef)(),kn=(0,me.useState)(0),Mn=(0,ye.Z)(kn,2),Jn=Mn[0],$n=Mn[1],hr=(0,me.useState)(0),zn=(0,ye.Z)(hr,2),Fn=zn[0],lr=zn[1],_t=(0,me.useState)(!1),ot=(0,ye.Z)(_t,2),Xt=ot[0],Cn=ot[1],Zn=function(){Cn(!0)},Me=function(){Cn(!1)},Pe={getKey:wn};function Mt(Bt){$n(function(jt){var yn;typeof Bt=="function"?yn=Bt(jt):yn=Bt;var nn=br(yn);return yr.current.scrollTop=nn,nn})}var bt=(0,me.useRef)({start:0,end:Kn.length}),ze=(0,me.useRef)(),wt=ft(Kn,wn),Kt=(0,ye.Z)(wt,1),$t=Kt[0];ze.current=$t;var cn=me.useMemo(function(){if(!In)return{scrollHeight:void 0,start:0,end:Kn.length-1,offset:void 0};if(!sr){var Bt;return{scrollHeight:((Bt=Gt.current)===null||Bt===void 0?void 0:Bt.offsetHeight)||0,start:0,end:Kn.length-1,offset:void 0}}for(var jt=0,yn,nn,En,ir=Kn.length,Zt=0;Zt<ir;Zt+=1){var Pt=Kn[Zt],tn=wn(Pt),an=gr.get(tn),Ln=jt+(an===void 0?ge:an);Ln>=Jn&&yn===void 0&&(yn=Zt,nn=jt),Ln>Jn+ne&&En===void 0&&(En=Zt),jt=Ln}return yn===void 0&&(yn=0,nn=0,En=Math.ceil(ne/ge)),En===void 0&&(En=Kn.length-1),En=Math.min(En+1,Kn.length-1),{scrollHeight:jt,start:yn,end:En,offset:nn}},[sr,In,Jn,Kn,cr,ne]),It=cn.scrollHeight,Jt=cn.start,kt=cn.end,pt=cn.offset;bt.current.start=Jt,bt.current.end=kt,me.useLayoutEffect(function(){var Bt=gr.getRecord();if(Bt.size===1){var jt=Array.from(Bt.keys())[0],yn=Bt.get(jt),nn=Kn[Jt];if(nn&&yn===void 0){var En=wn(nn);if(En===jt){var ir=gr.get(jt),Zt=ir-ge;Mt(function(Pt){return Pt+Zt})}}}gr.resetRecord()},[It]);var Qt=me.useState({width:0,height:ne}),vn=(0,ye.Z)(Qt,2),mn=vn[0],xn=vn[1],Wn=function(jt){xn({width:jt.offsetWidth,height:jt.offsetHeight})},Yn=(0,me.useRef)(),dn=(0,me.useRef)(),Ht=me.useMemo(function(){return Ve(mn.width,zt)},[mn.width,zt]),gn=me.useMemo(function(){return Ve(mn.height,It)},[mn.height,It]),en=It-ne,Hn=(0,me.useRef)(en);Hn.current=en;function br(Bt){var jt=Bt;return Number.isNaN(Hn.current)||(jt=Math.min(jt,Hn.current)),jt=Math.max(jt,0),jt}var Qn=Jn<=0,Er=Jn>=en,Dr=Fn<=0,xr=Fn>=zt,nr=st(Qn,Er,Dr,xr),Nr=function(){return{x:Bn?-Fn:Fn,y:Jn}},pr=(0,me.useRef)(Nr()),rr=(0,de.zX)(function(Bt){if(qt){var jt=(0,Ne.Z)((0,Ne.Z)({},Nr()),Bt);(pr.current.x!==jt.x||pr.current.y!==jt.y)&&(qt(jt),pr.current=jt)}});function Sr(Bt,jt){var yn=Bt;jt?((0,lt.flushSync)(function(){lr(yn)}),rr()):Mt(yn)}function Lr(Bt){var jt=Bt.currentTarget.scrollTop;jt!==Jn&&Mt(jt),Ot==null||Ot(Bt),rr()}var fr=function(jt){var yn=jt,nn=zt?zt-mn.width:0;return yn=Math.max(yn,0),yn=Math.min(yn,nn),yn},qn=(0,de.zX)(function(Bt,jt){jt?((0,lt.flushSync)(function(){lr(function(yn){var nn=yn+(Bn?-Bt:Bt);return fr(nn)})}),rr()):Mt(function(yn){var nn=yn+Bt;return nn})}),jn=Vt(In,Qn,Er,Dr,xr,!!zt,qn),Pr=(0,ye.Z)(jn,2),Vr=Pr[0],Jr=Pr[1];$e(In,yr,function(Bt,jt,yn,nn){var En=nn;return nr(Bt,jt,yn)?!1:!En||!En._virtualHandled?(En&&(En._virtualHandled=!0),Vr({preventDefault:function(){},deltaX:Bt?jt:0,deltaY:Bt?0:jt}),!0):!1}),pe(sr,yr,function(Bt){Mt(function(jt){return jt+Bt})}),(0,nt.Z)(function(){function Bt(yn){var nn=Qn&&yn.detail<0,En=Er&&yn.detail>0;In&&!nn&&!En&&yn.preventDefault()}var jt=yr.current;return jt.addEventListener("wheel",Vr,{passive:!1}),jt.addEventListener("DOMMouseScroll",Jr,{passive:!0}),jt.addEventListener("MozMousePixelScroll",Bt,{passive:!1}),function(){jt.removeEventListener("wheel",Vr),jt.removeEventListener("DOMMouseScroll",Jr),jt.removeEventListener("MozMousePixelScroll",Bt)}},[In,Qn,Er]),(0,nt.Z)(function(){if(zt){var Bt=fr(Fn);lr(Bt),rr({x:Bt})}},[mn.width,zt]);var kr=function(){var jt,yn;(jt=Yn.current)===null||jt===void 0||jt.delayHidden(),(yn=dn.current)===null||yn===void 0||yn.delayHidden()},Wr=je(yr,Kn,gr,ge,wn,function(){return Ar(!0)},Mt,kr);me.useImperativeHandle(ee,function(){return{nativeElement:pn.current,getScrollInfo:Nr,scrollTo:function(jt){function yn(nn){return nn&&(0,Qe.Z)(nn)==="object"&&("left"in nn||"top"in nn)}yn(jt)?(jt.left!==void 0&&lr(fr(jt.left)),Wr(jt.top)):Wr(jt)}}}),(0,nt.Z)(function(){if(it){var Bt=Kn.slice(Jt,kt+1);it(Bt,Kn)}},[Jt,kt,Kn]);var Br=Se(Kn,wn,gr,ge),zr=Wt==null?void 0:Wt({start:Jt,end:kt,virtual:sr,offsetX:Fn,offsetY:pt,rtl:Bn,getSize:Br}),ii=Ae(Kn,Jt,kt,zt,Fn,Gr,mt,Pe),Fr=null;ne&&(Fr=(0,Ne.Z)((0,He.Z)({},xt?"height":"maxHeight",ne),Je),In&&(Fr.overflowY="hidden",zt&&(Fr.overflowX="hidden"),Xt&&(Fr.pointerEvents="none")));var Rn={};return Bn&&(Rn.dir="rtl"),me.createElement("div",(0,le.Z)({ref:pn,style:(0,Ne.Z)((0,Ne.Z)({},yt),{},{position:"relative"}),className:Xn},Rn,hn),me.createElement(Ee.Z,{onResize:Wn},me.createElement(sn,{className:"".concat(re,"-holder"),style:Fr,ref:yr,onScroll:Lr,onMouseEnter:kr},me.createElement(Be,{prefixCls:re,height:It,offsetX:Fn,offsetY:pt,scrollWidth:zt,onInnerResize:Ar,ref:Gt,innerProps:ln,rtl:Bn,extra:zr},ii))),sr&&It>ne&&me.createElement(ut,{ref:Yn,prefixCls:re,scrollOffset:Jn,scrollRange:It,rtl:Bn,onScroll:Sr,onStartMove:Zn,onStopMove:Me,spinSize:gn,containerSize:mn.height,style:Ut==null?void 0:Ut.verticalScrollBar,thumbStyle:Ut==null?void 0:Ut.verticalScrollBarThumb,showScrollBar:An}),sr&&zt>mn.width&&me.createElement(ut,{ref:dn,prefixCls:re,scrollOffset:Fn,scrollRange:zt,rtl:Bn,onScroll:Sr,onStartMove:Zn,onStopMove:Me,spinSize:Ht,containerSize:mn.width,horizontal:!0,style:Ut==null?void 0:Ut.horizontalScrollBar,thumbStyle:Ut==null?void 0:Ut.horizontalScrollBarThumb,showScrollBar:An}))}var ve=me.forwardRef(Ce);ve.displayName="List";var Le=ve,Ye=Le},93314:function(At){"use strict";At.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(At,Rt,fe){"use strict";fe.d(Rt,{Z:function(){return Ke}});const le=Ee=>typeof Ee=="object"&&Ee!=null&&Ee.nodeType===1,Qe=(Ee,de)=>(!de||Ee!=="hidden")&&Ee!=="visible"&&Ee!=="clip",Ne=(Ee,de)=>{if(Ee.clientHeight<Ee.scrollHeight||Ee.clientWidth<Ee.scrollWidth){const nt=getComputedStyle(Ee,null);return Qe(nt.overflowY,de)||Qe(nt.overflowX,de)||(me=>{const lt=(Ze=>{if(!Ze.ownerDocument||!Ze.ownerDocument.defaultView)return null;try{return Ze.ownerDocument.defaultView.frameElement}catch(Be){return null}})(me);return!!lt&&(lt.clientHeight<me.scrollHeight||lt.clientWidth<me.scrollWidth)})(Ee)}return!1},He=(Ee,de,nt,me,lt,Ze,Be,Re)=>Ze<Ee&&Be>de||Ze>Ee&&Be<de?0:Ze<=Ee&&Re<=nt||Be>=de&&Re>=nt?Ze-Ee-me:Be>de&&Re<nt||Ze<Ee&&Re>nt?Be-de+lt:0,ye=Ee=>{const de=Ee.parentElement;return de==null?Ee.getRootNode().host||null:de},be=(Ee,de)=>{var nt,me,lt,Ze;if(typeof document=="undefined")return[];const{scrollMode:Be,block:Re,inline:Ae,boundary:et,skipOverflowHiddenElements:tt}=de,ft=typeof et=="function"?et:ut=>ut!==et;if(!le(Ee))throw new TypeError("Invalid target");const ct=document.scrollingElement||document.documentElement,rt=[];let at=Ee;for(;le(at)&&ft(at);){if(at=ye(at),at===ct){rt.push(at);break}at!=null&&at===document.body&&Ne(at)&&!Ne(document.documentElement)||at!=null&&Ne(at,tt)&&rt.push(at)}const st=(me=(nt=window.visualViewport)==null?void 0:nt.width)!=null?me:innerWidth,Vt=(Ze=(lt=window.visualViewport)==null?void 0:lt.height)!=null?Ze:innerHeight,{scrollX:Se,scrollY:Oe}=window,{height:qe,width:Te,top:_e,right:ke,bottom:Fe,left:Et}=Ee.getBoundingClientRect(),{top:$e,right:gt,bottom:dt,left:pe}=(ut=>{const we=window.getComputedStyle(ut);return{top:parseFloat(we.scrollMarginTop)||0,right:parseFloat(we.scrollMarginRight)||0,bottom:parseFloat(we.scrollMarginBottom)||0,left:parseFloat(we.scrollMarginLeft)||0}})(Ee);let ce=Re==="start"||Re==="nearest"?_e-$e:Re==="end"?Fe+dt:_e+qe/2-$e+dt,je=Ae==="center"?Et+Te/2-pe+gt:Ae==="end"?ke+gt:Et-pe;const vt=[];for(let ut=0;ut<rt.length;ut++){const we=rt[ut],{height:Ve,width:Ge,top:St,right:Je,bottom:Ce,left:ve}=we.getBoundingClientRect();if(Be==="if-needed"&&_e>=0&&Et>=0&&Fe<=Vt&&ke<=st&&(we===ct&&!Ne(we)||_e>=St&&Fe<=Ce&&Et>=ve&&ke<=Je))return vt;const Le=getComputedStyle(we),Ye=parseInt(Le.borderLeftWidth,10),ie=parseInt(Le.borderTopWidth,10),ee=parseInt(Le.borderRightWidth,10),z=parseInt(Le.borderBottomWidth,10);let re=0,ae=0;const ne="offsetWidth"in we?we.offsetWidth-we.clientWidth-Ye-ee:0,ge="offsetHeight"in we?we.offsetHeight-we.clientHeight-ie-z:0,We="offsetWidth"in we?we.offsetWidth===0?0:Ge/we.offsetWidth:0,xt="offsetHeight"in we?we.offsetHeight===0?0:Ve/we.offsetHeight:0;if(ct===we)re=Re==="start"?ce:Re==="end"?ce-Vt:Re==="nearest"?He(Oe,Oe+Vt,Vt,ie,z,Oe+ce,Oe+ce+qe,qe):ce-Vt/2,ae=Ae==="start"?je:Ae==="center"?je-st/2:Ae==="end"?je-st:He(Se,Se+st,st,Ye,ee,Se+je,Se+je+Te,Te),re=Math.max(0,re+Oe),ae=Math.max(0,ae+Se);else{re=Re==="start"?ce-St-ie:Re==="end"?ce-Ce+z+ge:Re==="nearest"?He(St,Ce,Ve,ie,z+ge,ce,ce+qe,qe):ce-(St+Ve/2)+ge/2,ae=Ae==="start"?je-ve-Ye:Ae==="center"?je-(ve+Ge/2)+ne/2:Ae==="end"?je-Je+ee+ne:He(ve,Je,Ge,Ye,ee+ne,je,je+Te,Te);const{scrollLeft:yt,scrollTop:ht}=we;re=xt===0?0:Math.max(0,Math.min(ht+re/xt,we.scrollHeight-Ve/xt+ge)),ae=We===0?0:Math.max(0,Math.min(yt+ae/We,we.scrollWidth-Ge/We+ne)),ce+=ht-re,je+=yt-ae}vt.push({el:we,top:re,left:ae})}return vt},Ie=Ee=>Ee===!1?{block:"end",inline:"nearest"}:(de=>de===Object(de)&&Object.keys(de).length!==0)(Ee)?Ee:{block:"start",inline:"nearest"};function Ke(Ee,de){if(!Ee.isConnected||!(lt=>{let Ze=lt;for(;Ze&&Ze.parentNode;){if(Ze.parentNode===document)return!0;Ze=Ze.parentNode instanceof ShadowRoot?Ze.parentNode.host:Ze.parentNode}return!1})(Ee))return;const nt=(lt=>{const Ze=window.getComputedStyle(lt);return{top:parseFloat(Ze.scrollMarginTop)||0,right:parseFloat(Ze.scrollMarginRight)||0,bottom:parseFloat(Ze.scrollMarginBottom)||0,left:parseFloat(Ze.scrollMarginLeft)||0}})(Ee);if((lt=>typeof lt=="object"&&typeof lt.behavior=="function")(de))return de.behavior(be(Ee,de));const me=typeof de=="boolean"||de==null?void 0:de.behavior;for(const{el:lt,top:Ze,left:Be}of be(Ee,Ie(de))){const Re=Ze-nt.top+nt.bottom,Ae=Be-nt.left+nt.right;lt.scroll({top:Re,left:Ae,behavior:me})}}}}]);
|