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

1106 lines
636 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[8999],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(At,Bt){"use strict";Bt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11081: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={},Bt="5.0",de={},se=null,et=!1,Fe=!1,Ne=null,ge=!1,ye=null,Re=null,Ge=0;Ge<arguments.length;Ge++){var we=arguments[Ge];if(we!==null)switch(typeof we){case"number":Bt=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?Bt=we:Ne=we;break;case"object":typeof we.is3D!="undefined"?se=we:de=we;break;case"boolean":et=we,Fe=!0;break}}se===null&&(se={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},de.material_id!==void 0&&!Fe&&(et=!0)),Ne!==null&&de.id===void 0&&(de.id=Ne);var fe="",$e="",ve=!1,rt=null,We=null,Te=null,Pe=!1,De=null,tt=null,at=null,ht=null,st=null;de.height!==void 0&&(de.height=Math.round(de.height)),de.width!==void 0&&(de.width=Math.round(de.width));var qe=function(xe){return parseFloat(xe)>4?parseFloat(xe):5};At.setHTML5Codebase=function(xe,Be){Re=xe,He(xe,Be)},At.setJavaCodebase=At.setJavaCodebaseVersion=At.isCompiledInstalled=At.setPreCompiledScriptPath=At.setPreCompiledResourcePath=function(){},At.setHTML5CodebaseVersion=function(xe,Be){var Se=parseFloat(xe);if(Se!==NaN&&Se<5){console.log("The GeoGebra HTML5 codebase version "+Se+" is deprecated. Using version latest instead.");return}ye=xe,ce(xe,Be)},At.getHTML5CodebaseVersion=function(){return We},At.getParameters=function(){return de},At.setFontsCSSURL=function(xe){ht=xe},At.setGiacJSURL=function(xe){},At.setJNLPFile=function(xe){fe=xe},At.setJNLPBaseDir=function(xe){},At.inject=function(){function xe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Be="auto",Se=de.id,Qe,Ve=!1,ct=0;ct<arguments.length;ct++){var ke=arguments[ct];typeof ke=="string"?(ke=ke.toLowerCase(),ke.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Be=ke:Se=arguments[ct]):typeof ke=="boolean"?Ve=ke:ke instanceof HTMLElement&&(Qe=ke)}Ye();function Ye(){if(!ge){setTimeout(Ye,200);return}Be=dt(Be);var Xe=Qe||document.getElementById(Se);if(!Xe){console.log("possibly bug on ajax loading? ");return}if(At.removeExistingApplet(Xe,!1),de.width===void 0&&Xe.clientWidth&&(de.width=Xe.clientWidth),de.height===void 0&&Xe.clientHeight&&(de.height=Xe.clientHeight),!(de.width&&de.height)&&Be==="html5"&&(delete de.width,delete de.height),rt=Be,Be==="screenshot")Le(Xe,de);else{var ie=!1;de.hasOwnProperty("playButton")&&de.playButton||de.hasOwnProperty("clickToLoad")&&de.clickToLoad?ie=!0:de.hasOwnProperty("playButtonAutoDecide")&&de.playButtonAutoDecide&&(ie=(!lt()||xe())&&it()),ie?(rt="screenshot",Pt(Xe,de,Ve,Be)):Ze(Xe,de,Ve)}}};function lt(){try{return window.self!==window.top}catch(xe){return!0}}function it(){return de.hasOwnProperty("screenshotGenerator")&&de.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}At.getViews=function(){return se},At.isJavaInstalled=function(){return!1};var Zt=function(xe){var Be=function(ct){var ke=JSON.parse(ct),Ye=function(ee){return ee.type=="G"||ee.type=="E"},Xe=ke.elements?ke.elements.filter(Ye)[0]:ke;if(!Xe||!Xe.url){Se();return}de.fileName=Xe.url,Je(Xe.settings||{}),se.is3D=!0;var ie="https://www.geogebra.org/images/";At.setPreviewImage(De||Xe.previewUrl,ie+"GeoGebra_loading.png",ie+"applet_play.png"),xe()},Se=function(){de.onError&&de.onError(),ft("Error: Fetching material (id "+de.material_id+") failed.",de)},Qe=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ve="/materials/"+de.material_id+"?scope=basic";Ue("https://"+Qe+"/api/proxy.php?path="+encodeURIComponent(Ve),Be,Se)};function Je(xe){var Be=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Se){xe[Se]=!!xe[Se]}),Be.forEach(function(Se){de[Se]===void 0&&xe[Se]!==void 0&&(de[Se]=xe[Se])}),de.showToolBarHelp===void 0&&(de.showToolBarHelp=de.showToolBar)}function Ue(xe,Be,Se){var Qe=new XMLHttpRequest;Qe.open("GET",xe),Qe.onload=function(){Be(Qe.responseText)},Qe.onerror=Se,Qe.send()}At.isHTML5Installed=function(){return!0},At.getLoadedAppletType=function(){return rt},At.setPreviewImage=function(xe,Be,Se){De=xe,tt=Be,at=Se},At.removeExistingApplet=function(xe,Be){var Se;typeof xe=="string"&&(xe=document.getElementById(xe)),rt=null;var Qe=null;for(Se=0;Se<xe.childNodes.length;Se++){var Ve=xe.childNodes[Se],ct=Ve.className;ct==="applet_screenshot"?Be?(Ve.style.display="block",rt="screenshot"):Ve.style.display="none":ct!=="applet_scaler prerender"&&(xe.removeChild(Ve),Qe=ct&&ct.indexOf("appletParameters")!=-1?Ve.id:null,Se--)}var ke=de.id!==void 0?de.id:Qe,Ye=window[ke];Ye&&typeof Ye.getBase64=="function"&&(Ye.remove(),window[ke]=null)},At.refreshHitPoints=function(){if(qe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var xe=At.getAppletObject();return xe&&typeof xe.recalculateEnvironments=="function"?(xe.recalculateEnvironments(),!0):!1},At.startAnimation=function(){var xe=At.getAppletObject();return xe&&typeof xe.startAnimation=="function"?(xe.startAnimation(),!0):!1},At.stopAnimation=function(){var xe=At.getAppletObject();return xe&&typeof xe.stopAnimation=="function"?(xe.stopAnimation(),!0):!1},At.getAppletObject=function(){var xe=de.id!==void 0?de.id:"ggbApplet";return window[xe]},At.resize=function(){};var bt=function(xe,Be,Se){var Qe=document.createElement("param");Qe.setAttribute("name",Be),Qe.setAttribute("value",Se),xe.appendChild(Qe)},Ae=function(xe){return xe&&xe!=="false"},Ze=function(xe,Be,Se){qe(We)<=4.2&&(Se=!0);var Qe=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==We||ggbHTML5LoadedCodebaseIsWebSimple&&!Pe)&&(Qe=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ve=document.createElement("div");Ve.classList.add("appletParameters","notranslate");var ct=Be.width,ke=Be.height;if(Be.disableAutoScale=Be.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Be.disableAutoScale,Be.width!==void 0)if(qe(We)<=4.4)Ae(Be.showToolBar)&&(Be.height-=7),Ae(Be.showAlgebraInput)&&(Be.height-=37),Be.width<605&&Ae(Be.showToolBar)&&(Be.width=605,ct=605);else{var Ye=100;(Ae(Be.showToolBar)||Ae(Be.showMenuBar))&&(Be.hasOwnProperty("customToolBar")&&(Be.customToolbar=Be.customToolBar),Ye=Ae(Be.showMenuBar)?245:155),ct<Ye&&(Be.width=Ye,ct=Ye)}Ve.style.border="none",Ve.style.display="inline-block";for(var Xe in Be)Be.hasOwnProperty(Xe)&&Xe!=="appletOnLoad"&&Ve.setAttribute("data-param-"+Xe,Be[Xe]);ht&&Ve.setAttribute("data-param-fontscssurl",ht),At.resize=function(){GGBAppletUtils.responsiveResize(xe,Be)},window.addEventListener("resize",function(It){At.resize()});var ie=typeof Be.appletOnLoad=="function"?Be.appletOnLoad:function(){};if(!Se&&Be.width!==void 0){Be.hasOwnProperty("showSplash")||Ve.setAttribute("data-param-showSplash","false");var ee=xe.querySelector(".applet_scaler.prerender"),z=ee!==null;if(z)var re=ee.querySelector(".ggb_preview");else{var re=St(ct,ke,Be.borderColor,!1);ee=document.createElement("div"),ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.style.width=ct+"px",ee.style.height=ke+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ee,"66%"),qe(We)>=5?(Be.appletOnLoad=function(It){var Rt=xe.querySelector(".ggb_preview");Rt&&Rt.parentNode.removeChild(Rt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ee),window.GGBT_wsf_view&&$(window).trigger("resize"),ie(It)},z||ee.appendChild(re)):Ve.appendChild(re),ee.appendChild(Ve),z||xe.appendChild(ee),setTimeout(function(){At.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(Ve),xe.appendChild(le),Be.appletOnLoad=function(It){At.resize(),ie(It)}}function ne(It,Rt){Rt&&typeof Rt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(It,Rt.appletOnLoad):renderGGBElement(It),ft("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Rt)}function me(It,Rt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:It,params:Rt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Xt){ne(Xt.article,Xt.params)}),html5AppletsToProcess=null)},qe(We)<5&&(It.className+=" geogebraweb")):ne(It,Rt)}if(Qe){scriptLoadStarted=!0;for(var Oe=0;Oe<Ve.childNodes.length;Oe++){var wt=Ve.childNodes[Oe].tagName;wt==="TABLE"&&(Ve.removeChild(Ve.childNodes[Oe]),Oe--)}if(ggbHTML5LoadedScript!==null){var Ct=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ct!=null&&Ct.parentNode.removeChild(Ct)}var vt=document.createElement("script"),xt=function(){me(Ve,Be)};vt.src=$e+Te,ggbHTML5LoadedCodebaseIsWebSimple=Pe,ggbHTML5LoadedCodebaseVersion=We,ggbHTML5LoadedScript=vt.src,ft("GeoGebra HTML5 codebase loaded: '"+$e+"'.",Be),!Re&&(!ye||ye=="5.0")?(Pe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),xt()):$e.requirejs?__webpack_require__.e(981).then(function(){var It=[__webpack_require__(60981)];xt.apply(null,It)}.bind(this)).catch(__webpack_require__.oe):(vt.onload=xt,xe.appendChild(vt))}else me(Ve,Be);Be.height=ke,Be.width=ct},Le=function(xe,Be,Se){var Qe=St(Be.width,Be.height,Be.borderColor,Se),Ve=document.createElement("div");Ve.style.position="relative",Ve.style.display="block",Ve.style.width=Be.width+"px",Ve.style.height=Be.height+"px",Ve.className="applet_screenshot applet_scaler"+(Se?" applet_screenshot_play":""),Ve.appendChild(Qe);var ct=GGBAppletUtils.getScale(Be,xe,Se);Se?(xe.appendChild(pt()),window.GGBT_wsf_view||(xe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ve,"66%"),xe.appendChild(Ve),ct!==1&&!isNaN(ct)&&(GGBAppletUtils.scaleElement(Ve,ct),Ve.style.width=Be.width+"px",Ve.style.height=Be.height+"px",Ve.parentNode.style.width=Be.width*ct+"px",Ve.parentNode.style.height=Be.height*ct+"px"),At.resize=function(){ze(xe,Qe,Ve,Se)},window.addEventListener("resize",function(ke){At.resize()}),At.resize()};function ze(xe,Be,Se,Qe){if(xe.contains(Be)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}var Ve=GGBAppletUtils.getScale(de,xe,Qe);Se.parentNode!==null&&(!isNaN(Ve)&&Ve!==1?(GGBAppletUtils.scaleElement(Se,Ve),Se.parentNode.style.width=de.width*Ve+"px",Se.parentNode.style.height=de.height*Ve+"px"):(GGBAppletUtils.scaleElement(Se,1),Se.parentNode.style.width=de.width+"px",Se.parentNode.style.height=de.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(xe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}At.onExitFullscreen=function(xe,Be){Be.appendChild(xe)};var Pt=function(xe,Be,Se,Qe){Le(xe,Be,!0);for(var Ve=function(){var Ye=[];for(ke=0;ke<xe.childNodes.length;ke++)Ye.push(xe.childNodes[ke]);if(window.GGBT_wsf_view){var Xe=window.GGBT_wsf_view.renderFullScreen(xe,Be.id),ie=document.getElementById("fullscreencontainer"),ee=jQuery(xe).find(".fullscreencontent");ee.length>0?(Xe.remove(),ee.attr("id","fullscreencontent").show(),jQuery(ie).append(ee),window.dispatchEvent(new Event("resize"))):Ze(Xe,Be,!1),window.GGBT_wsf_view.launchFullScreen(ie)}else rt=Qe,Ze(xe,Be,!1);if(!window.GGBT_wsf_view)for(ke=0;ke<Ye.length;ke++)xe.removeChild(Ye[ke])},ct=xe.getElementsByClassName("ggb_preview_play"),ke=0;ke<ct.length;ke++)ct[ke].addEventListener("click",Ve,!1),ct[ke].addEventListener("ontouchstart",Ve,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(xe),it()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},pt=function(){var xe=document.createElement("div");if(xe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Be='.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");}',Se=document.createElement("style");Se.styleSheet?Se.styleSheet.cssText=Be:Se.appendChild(document.createTextNode(Be)),document.getElementsByTagName("head")[0].appendChild(Se)}return xe},St=function(xe,Be,Se,Qe){var Ve=document.createElement("div");Ve.className="ggb_preview",Ve.style.position="absolute",Ve.style.zIndex="90",Ve.style.width=xe-2+"px",Ve.style.height=Be-2+"px",Ve.style.top="0px",Ve.style.left="0px",Ve.style.overflow="hidden",Ve.style.backgroundColor="white";var ct="lightgrey";Se!==void 0&&(Se==="none"?ct="transparent":ct=Se),Ve.style.border="1px solid "+ct;var ke=document.createElement("img");if(ke.style.position="relative",ke.style.zIndex="1000",ke.style.top="-1px",ke.style.left="-1px",De!==null&&ke.setAttribute("src",De),ke.style.opacity=.7,tt!==null){var Ye,Xe,ie;if(!Qe){Ye=document.createElement("img"),Ye.style.position="absolute",Ye.style.zIndex="1001",Ye.style.opacity=1,ke.style.opacity=.3,Xe=360,Xe>xe/4*3&&(Xe=xe/4*3),ie=Xe/5.8,Ye.setAttribute("src",tt),Ye.setAttribute("width",Xe),Ye.setAttribute("height",ie);var ee=(xe-Xe)/2,z=(Be-ie)/2;Ye.style.left=ee+"px",Ye.style.top=z+"px",Ve.appendChild(Ye)}}return Ve.appendChild(ke),Ve},dt=function(xe){return xe=xe.toLowerCase(),xe==="html5"||xe==="screenshot"?xe:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ce=function(xe,Be){if(We=xe,Be){He(We,!0);return}var Se=!et;if(Se){var Qe=qe(We);!isNaN(Qe)&&Qe<4.4&&(Se=!1)}var Ve,ct;window.location.protocol.substr(0,4)==="http"?Ve=window.location.protocol:Ve="http:";var ke=We.indexOf("//");ke>0?ct=We:ke===0?ct=Ve+We:ct="https://www.geogebra.org/apps/5.2.814.0/";for(var Ye in pe)if(We.slice(pe[Ye].length*-1)===pe[Ye]||We.slice((pe[Ye].length+1)*-1)===pe[Ye]+"/"){He(ct,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Se&&!se.is3D&&!se.AV&&!se.SV&&!se.CV&&!se.EV2&&!se.CP&&!se.PC&&!se.DA&&!se.FI&&!se.PV&&!Ae(de.showToolBar)&&!Ae(de.showMenuBar)&&!Ae(de.showAlgebraInput)&&!Ae(de.enableRightClick)&&(!de.appName||de.appName=="classic")?ct+="webSimple/":ct+="web3d/",He(ct,!1)},He=function(xe,Be){if(xe.requirejs){$e=xe;return}xe.slice(-1)!=="/"&&(xe+="/"),$e=xe,Be===null&&(Be=xe.indexOf("http")===-1),ve=Be,Te="web.nocache.js",Pe=!1;var Se=$e.split("/");Se.length>1&&(!Be&&Se[Se.length-2]==="webSimple"?(Te="webSimple.nocache.js",Pe=!0):pe.indexOf(Se[Se.length-2])>=0&&(Te=Se[Se.length-2]+".nocache.js")),Se=xe.split("/"),We=Se[Se.length-3],We.substr(0,4)==="test"?We=We.substr(4,1)+"."+We.substr(5,1):(We.substr(0,3)==="war"||We.substr(0,4)==="beta")&&(We="5.0");var Qe=parseFloat(We);Qe!==NaN&&Qe<5&&xe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Qe+" is deprecated. Using version latest instead."),ce("5.0",Be))},ft=function(xe,Be){window.console&&window.console.log&&(!Be||typeof Be.showLogging=="undefined"||Be.showLogging&&Be.showLogging!=="false")&&console.log(xe)};de.material_id!==void 0?Zt(ut):ut();function ut(){var xe=Bt;ye!==null?xe=ye:parseFloat(xe)<5&&(xe="5.0"),ce(xe,!1),Re!==null&&He(Re,ve),ge=!0}return At},GGBAppletUtils=function(){"use strict";function At(){return window.GGBT_wsf_edit!==void 0}function Bt(ge,ye){ye!=1?(ge.style.transformOrigin="0% 0% 0px",ge.style.webkitTransformOrigin="0% 0% 0px",ge.style.transform="scale("+ye+","+ye+")",ge.style.webkitTransform="scale("+ye+","+ye+")",ge.style.maxWidth="initial",ge.querySelector(".ggb_preview")!==null&&(ge.querySelector(".ggb_preview").style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ge.style.transform="none",ge.style.webkitTransform="none")}function de(ge,ye,Re,Ge,we,fe){var $e=null;if(fe!=null&&fe!="")for(var ve=ge.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+fe+" ")>-1){$e=ve;break}else ve=ve.parentNode;var rt=0,We=0,Te=0,Pe=0,De=0,tt=0,at=0;if($e)rt=$e.offsetWidth,We=Math.max(Ge?$e.offsetWidth:0,$e.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(rt=Math.min(window.innerWidth,document.documentElement.clientWidth),We=Math.min(window.innerHeight,document.documentElement.clientHeight),Te=rt):(rt=window.innerWidth,We=window.innerHeight,Te=window.innerWidth),ge){var ht=ge.getBoundingClientRect();ht.left>0&&ht.left<=rt&&(we===void 0||!we)&&(document.dir==="rtl"?(De=rt-ht.width-ht.left,tt=Te<=480?10:30):(tt=ht.left,De=Te<=480?10:30),Pe=tt+De)}if(ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var st=ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pe=40,at=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Pe=0,at=40)}}return ge&&((Re===void 0||!Re)&&ye>0&&ye+Pe<rt?rt=ye:rt-=Pe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Re===void 0||!Re)&&(We-=at)),{width:rt,height:We}}function se(ge,ye,Re,Ge,we){if(ge.isScreenshoGenerator)return 1;var fe=Ge!==void 0&&Ge,$e=ge.noScaleMargin!=null&&ge.noScaleMargin,ve=function(st){return st&&st!=="false"},rt=ve(ge.autoHeight),We=de(ye,ge.width,Re,rt,fe&&window.GGBT_wsf_view||$e,we),Te=parseInt(We.width),Pe=ge.width,De=ge.height;if(Pe===void 0){var tt=ye.querySelector(".appletParameters");tt&&(Pe=tt.offsetWidth,De=tt.offsetHeight)}var at=Te/Pe,ht=fe?1:We.height/De;return Re!==void 0&&!Re&&(at=Math.min(1,at),ht=Math.min(1,ht)),Math.min(at,ht)}function et(ge,ye,Re){var Ge=1,we,fe=!1;if(ge.hasOwnProperty("allowUpscale")&&(fe=ge.allowUpscale),ge.hasOwnProperty("scale")&&(Ge=parseFloat(ge.scale),(isNaN(Ge)||Ge===null||Ge===0)&&(Ge=1),Ge>1&&(fe=!0)),ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(ge.hasOwnProperty("disableAutoScale")&&ge.disableAutoScale))we=se(ge,ye,fe,Re,ge.scaleContainerClass);else return Ge;return fe&&(!ge.hasOwnProperty("scale")||Ge===1)?we:Math.min(Ge,we)}function Fe(ge){var ye=Math.min(window.innerWidth,document.documentElement.clientWidth),Re=Math.min(window.innerHeight,document.documentElement.clientHeight),Ge=ge.getBoundingClientRect(),we=(ye-Ge.width)/2,fe=(Re-Ge.height)/2;fe<0&&(fe=0),ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?ge.style.left="40px":ge.style.left=we+"px",ge.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?ge.style.top="40px":ge.style.top=fe+"px",ge.style.left=we+"px")}function Ne(ge,ye){var Re=ge.querySelector(".appletParameters");if(Re){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ye.id!==Re.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ge)}if(Re.parentElement&&/fullscreen/.test(Re.parentElement.className))return;var Ge=et(ye,ge);At()&&Re.setAttribute("data-param-scale",Ge);for(var we=null,fe=0;fe<ge.childNodes.length;fe++)if(ge.childNodes[fe].className!==void 0&&ge.childNodes[fe].className.match(/^applet_scaler/)){we=ge.childNodes[fe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var $e=ye.id!==void 0?ye.id:"ggbApplet",ve=window[$e];(ve==null||!ve.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Ge)&&Ge!==1?(we.parentNode.style.width=ye.width*Ge+"px",we.parentNode.style.height=ye.height*Ge+"px",Bt(we,Ge)):(Bt(we,1),we.parentNode.style.width=ye.width+"px",we.parentNode.style.height=ye.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Fe(ge),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Re).parents(".content-added-content"))}}return{responsiveResize:Ne,isFlexibleWorksheetEditor:At,positionCenter:Fe,getScale:et,scaleElement:Bt}}();__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,Bt){}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 Bt=s[L].bindings;s[L].bindings=function(){for(var de=Bt?Bt():{},se=At[webModule.__softPermutationId],et=O;et<se.length;et++){var Fe=se[et];de[Fe[O]]=Fe[P]}return de}};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 Bt=document.compatMode==U?V:W;t.write(Bt+X),t.close()}}}function w(At){function Bt(se){function et(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Fe=et();if(Fe){se();return}function Ne(){if(!Fe){if(!et())return;Fe=!0,se(),o.removeEventListener&&o.removeEventListener(Z,Ne,!1),ge&&clearInterval(ge)}}o.addEventListener&&o.addEventListener(Z,Ne,!1);var ge=setInterval(function(){Ne()},$)}function de(se){var et=u(),Fe=et.body,Ne=et.createElement(_);Ne.language=ab,Ne.crossOrigin=W,Ne.src=se,webModule.__errFn&&(Ne.onerror=function(){webModule.__errFn(L,new Error(bb+se))}),Fe.appendChild(Ne)}Bt(function(){de(At)})}webModule.__startLoadingFragment=function(At){return C(At)},webModule.__installRunAsyncCode=function(At){var Bt=u(),de=Bt.body,se=Bt.createElement(_);se.language=ab,se.text=At,de.appendChild(se),de.removeChild(se)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(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 Bt=c[At];return Bt==null?null:Bt},r=d,webModule.__errFn=e}function B(){function At(ge){var ye=ge.lastIndexOf(rb);ye==-1&&(ye=ge.length);var Re=ge.indexOf(sb);Re==-1&&(Re=ge.length);var Ge=ge.lastIndexOf(tb,Math.min(Re,ye));return Ge>=O?ge.substring(O,Ge+P):W}function Bt(ge){if(!ge.match(/^\w+:\/\//)){var ye=o.createElement(ub);ye.src=ge+vb,ge=At(ye.src)}return ge}function de(){var ge=__gwt_getMetaProperty(wb);return ge!=null?ge:W}function se(){for(var ge=o.getElementsByTagName(_),ye=O;ye<ge.length;++ye)if(ge[ye].src.indexOf(xb)!=-1)return At(ge[ye].src);return W}function et(){var ge=o.getElementsByTagName(yb);return ge.length>O?ge[ge.length-P].href:W}function Fe(){var ge=o.location;return ge.href==ge.protocol+zb+ge.host+ge.pathname+ge.search+ge.hash}var Ne=de();return Ne==W&&(Ne=se()),Ne==W&&(Ne=et()),Ne==W&&Fe()&&(Ne=At(o.location.href)),Ne=Bt(Ne),Ne}function C(At){return At.match(/^\//)||At.match(/^[a-zA-Z]+:\/\//)?At:webModule.__moduleBase+At}function D(){var At=[],Bt=O,de=[],se=[];function et(ge){var ye=se[ge](),Re=de[ge];if(ye in Re)return ye;var Ge=[];for(var we in Re)Ge[Re[we]]=we;throw r&&r(ge,Ge,ye),null}if(__gwt_isKnownPropertyValue=function(ge,ye){return ye in de[ge]},webModule.__getPropMap=function(){var ge={};for(var ye in de)de.hasOwnProperty(ye)&&(ge[ye]=et(ye));return ge},webModule.__computePropValue=et,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Fe;try{Fe=Cb;var Ne=Fe.indexOf(Db);Ne!=-1&&(Bt=parseInt(Fe.substring(Ne+P),$),Fe=Fe.substring(O,Ne))}catch(ge){}return webModule.__softPermutationId=Bt,C(Fe+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})()},67303:function(At,Bt,de){"use strict";de.d(Bt,{Ax:function(){return Ne},Ds:function(){return ge},KI:function(){return Re},SI:function(){return Fe},f1:function(){return et}});var se=de(90524);function et(Ge){let we=!0;if(Ge.length>0){for(let fe=0;fe<Ge.length;fe++)if(Ge[fe].compile_success==0||!Ge[fe].compile_success){we=!1;break}}else we=!1;return we}function Fe(Ge,we=""){let fe=[];for(let $e=0;$e<Ge.length;$e++){let ve=Ge[$e],rt=we?`${we}/${ve.name}`:`${ve.name}`;fe.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:rt})}return fe}function Ne(Ge,we,fe){for(let $e=0;$e<Ge.length;$e++){let ve=Ge[$e];if(ve.key===we){ve.children=fe;break}ve.children&&Ne(ve.children,we,fe)}return Ge}function ge(Ge,we,fe){let $e;return function(){let ve=this,rt=arguments,We=function(){$e=null,fe||Ge.apply(ve,rt)},Te=fe&&!$e;clearTimeout($e),$e=setTimeout(We,we),Te&&Ge.apply(ve,rt)}}const ye=!0,Re=se.Z.API_SERVER},6077:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return $e}});var se=de(59301),et={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Fe=de(92310),Ne=de.n(Fe),ge=de(29787),ye=de(2859),Re=de(82093),Ge=de(49661),we=(ve,rt,We)=>new Promise((Te,Pe)=>{var De=ht=>{try{at(We.next(ht))}catch(st){Pe(st)}},tt=ht=>{try{at(We.throw(ht))}catch(st){Pe(st)}},at=ht=>ht.done?Te(ht.value):Promise.resolve(ht.value).then(De,tt);at((We=We.apply(ve,rt)).next())}),$e=({data:ve,className:rt,fullWidth:We,style:Te={},onClose:Pe,onOk:De,showFullTools:tt,noAssociationId:at})=>{const ht=(0,se.useRef)(null),st=(0,se.useRef)(null),qe=(0,se.useRef)(null),lt=(0,se.useRef)(null),[it,Zt]=(0,se.useState)(!1),[Je,Ue]=(0,se.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,se.useEffect)(()=>(qe.current||(qe.current=document.createElement("style"),document.head.appendChild(qe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),qe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&bt()):(document.body.removeAttribute("data-custom"),qe.current&&(document.head.removeChild(qe.current),qe.current=null)),()=>{document.body.removeAttribute("data-custom"),qe.current&&(document.head.removeChild(qe.current),qe.current=null)}),[ve==null?void 0:ve.visible]);const bt=()=>we(void 0,null,function*(){Zt(!0),Ue("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ze=yield(0,Ge.ZJ)(ve==null?void 0:ve.src);ht.current.src="",ht.current.src=ze,ht.current.onload=function(){Le()},Zt(!1),Ue("")}),Ae=ze=>we(void 0,null,function*(){Zt(!0),Ue("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Pt=yield(0,Re.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:ze.dataUrl}});Pt!=null&&Pt.id&&!at?(yield(0,Re.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:Pt==null?void 0:Pt.id,settings:JSON.stringify(ze.state)}})).status===0&&De():Pt!=null&&Pt.id&&De(Pt),Zt(!1),Ue("")}),Ze=()=>{const ze=document.querySelector('a[href="https://markerjs.com/"]');ze&&ze.parentNode&&(ze.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(pt=>{const St=document.querySelector(pt.name);St&&St.setAttribute("title",pt.title)})},Le=()=>{st.current=new ye.hP(ht.current),st.current.targetRoot=lt.current,st.current.addEventListener("render",Ae),st.current.addEventListener("beforeclose",Pe),tt&&(st.current.availableMarkerTypes=st.current.ALL_MARKER_TYPES,st.current.uiStyleSettings.redoButtonVisible=!0,st.current.uiStyleSettings.notesButtonVisible=!0,st.current.uiStyleSettings.zoomButtonVisible=!0,st.current.uiStyleSettings.zoomOutButtonVisible=!0,st.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=st.current.uiStyleSettings,st.current.show(),ve!=null&&ve.snapshotData&&st.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ze()},300)};return se.createElement(se.Fragment,null,(ve==null?void 0:ve.visible)&&se.createElement(ge.Z,{spinning:it,tip:Je,style:{position:"absolute",width:"100vw"}},se.createElement("div",{ref:lt,className:Ne()(et.imageDimensions,rt,We?et.fullWidth:""),style:Te},se.createElement("img",{className:et.img,ref:ht}))))}},88615:function(At,Bt,de){"use strict";var se=de(59301),et=de(77019),Fe=de(5269),Ne=de(20554),ge=de(99571),ye=de(38394),Re=de(21697),Ge=de(48136),we=de(59301);const fe=(0,se.forwardRef)(({callback:$e,showSaveButton:ve,value:rt=""},We)=>{const Te=(0,se.useRef)(),Pe=[{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 "}]}]}],De=[{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}`}]}]}],tt=st=>{Te.current.setValue(Te.current.getValue()+" "+st.value+" ")},at=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(et.Z,{className:Re.Z.lists,gutter:[10,10]},Pe.map((st,qe)=>we.createElement(Fe.Z,{flex:"110px",className:Re.Z.item},we.createElement("div",null,we.createElement(ye.Z,{value:`$$${st.value}$$`}),st.name),we.createElement("div",{className:Re.Z.children},st.children.map((lt,it)=>we.createElement("div",{key:it},we.createElement("h1",null,lt.name),we.createElement(et.Z,{gutter:[10,10]},lt.data.map((Zt,Je)=>we.createElement(Fe.Z,{key:Je,onClick:()=>tt(Zt),className:Re.Z.diamond},we.createElement(ye.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(et.Z,{className:Re.Z.lists,gutter:[10,10]},De.map((st,qe)=>we.createElement(Fe.Z,{flex:"110px",className:Re.Z.item},we.createElement("div",null,we.createElement(ye.Z,{value:"`$$"+st.value+"$$`"}),st.name),we.createElement("div",{className:Re.Z.children},st.children.map((lt,it)=>we.createElement("div",{key:it},lt.name&&we.createElement("h1",null,lt.name),we.createElement(et.Z,{gutter:[10,10]},lt.data.map((Zt,Je)=>we.createElement(Fe.Z,{key:Je,onClick:()=>tt(Zt),className:Re.Z.diamond},we.createElement(ye.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))}],ht=()=>{var st=document.createElement("div");st.innerHTML=Te.current.getValue();var qe=st.innerText;return $e&&$e(qe),qe};return(0,se.useImperativeHandle)(We,()=>({getData:ht})),we.createElement("div",{className:Re.Z.mathWrap},we.createElement(Ne.default,{defaultActiveKey:"1",items:at}),we.createElement("math-field",{locale:"zh_cn",className:Re.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Te,style:{width:800,marginTop:30,fontSize:18}},rt||""),ve&&we.createElement("div",{className:Re.Z.button},we.createElement(ge.ZP,{size:"large",onClick:ht,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Bt.Z=fe},57884:function(At,Bt,de){"use strict";var se=de(59301),et=de(93314),Fe=de(99571),Ne=Object.defineProperty,ge=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,fe=(We,Te,Pe)=>Te in We?Ne(We,Te,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):We[Te]=Pe,$e=(We,Te)=>{for(var Pe in Te||(Te={}))Ge.call(Te,Pe)&&fe(We,Pe,Te[Pe]);if(Re)for(var Pe of Re(Te))we.call(Te,Pe)&&fe(We,Pe,Te[Pe]);return We},ve=(We,Te)=>ge(We,ye(Te));const rt=({img:We,buttonProps:Te={},styles:Pe={},customText:De,ButtonText:tt,ButtonClick:at,Buttonclass:ht,ButtonTwo:st,imgStyles:qe,loading:lt=!1,className:it=""})=>se.createElement("section",{className:`tc animated fadeIn ${it}`,style:$e({color:"#999",margin:"100px auto",visibility:lt?"hidden":"visible"},Pe)},se.createElement("img",{src:We||et,style:ve($e({},qe),{pointerEvents:"none",userSelect:"none"})}),se.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),tt&&se.createElement(Fe.ZP,$e({className:ht,onClick:at},Te),tt),st&&st);Bt.Z=rt},41550:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return ht}});var se=de(59301),et={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Fe=de(99571),Ne=de(70557),ge=de(51124),ye=de(25399),Re=de(49661),Ge=de(72664),we=de(57884),fe=de(90524),$e=de(14794),ve=de(59301),rt=Object.defineProperty,We=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,De=(st,qe,lt)=>qe in st?rt(st,qe,{enumerable:!0,configurable:!0,writable:!0,value:lt}):st[qe]=lt,tt=(st,qe)=>{for(var lt in qe||(qe={}))Te.call(qe,lt)&&De(st,lt,qe[lt]);if(We)for(var lt of We(qe))Pe.call(qe,lt)&&De(st,lt,qe[lt]);return st},at=(st,qe,lt)=>new Promise((it,Zt)=>{var Je=Ae=>{try{bt(lt.next(Ae))}catch(Ze){Zt(Ze)}},Ue=Ae=>{try{bt(lt.throw(Ae))}catch(Ze){Zt(Ze)}},bt=Ae=>Ae.done?it(Ae.value):Promise.resolve(Ae.value).then(Je,Ue);bt((lt=lt.apply(st,qe)).next())}),ht=({editOffice:st="view",data:qe,issaver:lt,onSaver:it,theme:Zt,type:Je,filename:Ue,monacoEditor:bt,className:Ae,style:Ze,close:Le,onClose:ze,hasMask:Pt,disabledDownload:pt,onImgDimensions:St,showNodata:dt,recordInfo:pe})=>{const[ce,He]=(0,se.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ft,ut]=(0,se.useState)(""),[xe,Be]=(0,se.useState)(),Se=window.ENV==="build"?"/react/build":"",Qe=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,ct=10*(1024*1024),ke=(0,se.useRef)();qe!=null&&qe.startsWith("/api")&&Je!=="txt"&&(qe=fe.Z.API_SERVER+qe);const Ye=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();Ue&&bt&&(bt.filename=Ue),(0,se.useEffect)(()=>{var re,le;const ne=(le=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:le.split(";");ne==null||ne.map(me=>{let Oe=me.split("=");Oe[0]==="_educoder_session"&&ut(Oe[1])})},[]),(0,se.useEffect)(()=>{Je==="office"&&(qe.indexOf("bigfilescdn.")>-1||qe.indexOf("bigfiles1")>-1?Be({url:qe,fileType:Ye(qe),model:qe.indexOf("model=edit")?"edit":"view"}):ie())},[Je,qe]);function Xe(re){return at(this,null,function*(){re.data.type==="pdfdata"&&(it(re.data.data),window.removeEventListener("message",Xe,!1)),console.log("mess---:",re.data)})}const ie=()=>at(void 0,null,function*(){console.log("data:",qe);let re=qe;qe.startsWith("http")||(re=location.origin+re);let le=new URL(re).pathname.split("/").pop();const ne=yield(0,Ge.gJ)({attachment_id:le});ne.url=Qe+ne.url,Be(ne)}),ee=()=>{if(qe.startsWith("http")||qe.startsWith("blob:")){z();return}(0,Re.Sv)(Ue||"educoder",qe,Ue)},z=()=>{pe&&(0,$e.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Re.Nd)(Ue||"educoder",decodeURIComponent(qe))};return ve.createElement("div",{style:tt({},Ze||{}),className:`${Pt&&et.bgBlack} ${Je?et.wrp:"hide"}`},Le&&ve.createElement("div",{className:et.close,ref:ke},!!St&&ve.createElement(ye.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ke.current},ve.createElement("span",{onClick:()=>{ze(),St()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!pt&&ve.createElement(ye.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ke.current},ve.createElement("span",{onClick:z},ve.createElement("i",{className:"icon-quxiaozhiding"}))),lt&&ve.createElement(ye.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ke.current},ve.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",Xe,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(ye.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ke.current},ve.createElement("span",{className:"",onClick:()=>{ze()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${et[Ae]} ${Ae} ${et.monaco} ${Je==="txt"?"show":"hide"}`},Je==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(ge.ZP,tt({},bt)))),Je==="audio"&&ve.createElement("audio",{src:`${(qe==null?void 0:qe.indexOf("http://"))>-1||(qe==null?void 0:qe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${qe}`,autoPlay:!0}),Je==="video"&&ve.createElement(ve.Fragment,null,(qe==null?void 0:qe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${qe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${qe}`,autoPlay:!0})),Je==="office"&&xe&&ve.createElement("iframe",{src:`${Se}/office.html?key=${xe.key}&url=${btoa(xe.url)}&callbackUrl=${Qe+(xe.callbackUrl||"")}&fileType=${xe.fileType}&title=${xe.title||""}&model=${st}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!pt}`}),Je==="html"&&ve.createElement("iframe",{src:qe+"&disposition=inline"}),Je==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${Se}/js/pdfview/index.html?filename=${Ue||"educoder.pdf"}&url=${encodeURIComponent(qe)}&disabledDownload=${!!pt}&model=${st}`}),Je==="image"&&ve.createElement("img",{src:`${(qe==null?void 0:qe.indexOf("http://"))>-1||(qe==null?void 0:qe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${qe}`}),(Je==="other"||Je==="download")&&ve.createElement(ve.Fragment,null,dt?ve.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Fe.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ee,disabled:pt},"\u4E0B\u8F7D")}):ve.createElement(Fe.ZP,{type:"primary",size:"middle",onClick:ee,disabled:pt},ve.createElement(Ne.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Je==="flowChart"&&ve.createElement("div",{className:"embed"},ve.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${qe||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(At,Bt,de){"use strict";de.d(Bt,{z:function(){return bt},Z:function(){return Ae}});var se=de(59301),et=de(88831),Fe=de(90290),Ne=de(64018),ge=de(68535),ye=de(90524),Re=de(49661),Ge=de(15342),we=de(77736),fe=de(99571),$e=de(1012),ve=de(41550),rt=de(59301),Te=({html:Ze})=>{const Le=(0,se.useRef)(null),ze=(0,se.useRef)(null),Pt=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,se.useEffect)(()=>{const pt=Le.current.attachShadow({mode:"open"});ze.current=document.createElement("div"),ze.current.className="markdown-body",ze.current.innerHTML=Ze,pt.appendChild(ze.current);const St=document.createElement("style");return St.textContent=Pt,pt.appendChild(St),()=>{pt.innerHTML=""}},[]),(0,se.useEffect)(()=>{ze.current&&(ze.current.innerHTML=Ze)},[Ze]),rt.createElement("div",{ref:Le})};function Pe(Ze){const Le=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],ze=new RegExp(`\\b(${Le.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ze.replace(ze,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},tt=Object.defineProperty,at=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,qe=(Ze,Le,ze)=>Le in Ze?tt(Ze,Le,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Ze[Le]=ze,lt=(Ze,Le)=>{for(var ze in Le||(Le={}))ht.call(Le,ze)&&qe(Ze,ze,Le[ze]);if(at)for(var ze of at(Le))st.call(Le,ze)&&qe(Ze,ze,Le[ze]);return Ze};const it="@\u2581\u2581@",Zt="@\u2581@",Je=/<pre[^>]*>/g;function Ue(Ze){let Le=document.createElement("div");return Le.innerHTML=Ze,Le.childNodes.length===0?"":Le.childNodes[0].nodeValue}const bt=(Ze,Le)=>{Ze=Ze||"";const ze=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Pt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,St=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Le?Ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ze,(dt,pe,ce,He,ft,ut,xe)=>{const Be=pe||He||ut,Se=ce||ft||xe||"?";return ye.Z.API_SERVER+"/api/attachments/"+Be+Se+"&t="+(0,Re.Jn)(Be,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ze=Ze.replace(St,(dt,pe,ce,He,ft,ut,xe)=>{const Be=pe||He||ut,Se=ce||ft||xe||"?";return ye.Z.API_SERVER+"/attachments/download/"+Be+Se+"&t="+(0,Re.Jn)(Be,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(ze,(dt,pe,ce,He,ft,ut,xe)=>{const Be=pe||He||ut,Se=ce||ft||xe||"?";return ye.Z.API_SERVER+"/api/attachments/"+Be+Se+"&t="+(0,Re.Jn)(Be,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Pt,(dt,pe,ce,He,ft)=>{const ut=pe||He,xe=ce||ft||"";return'"'+ye.Z.API_SERVER+"/api/attachments/"+ut+xe+ut+xe+"&t="+(0,Re.Jn)(ut,Date.now())}).replace(pt,(dt,pe,ce,He,ft)=>{const ut=pe||He,xe=ce||ft||"";return"("+ye.Z.API_SERVER+"/files/uploads/"+ut+xe+ut+xe+"&t="+(0,Re.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,`
`),Ze)};var Ae=({value:Ze="",edit:Le=!1,className:ze,showTextOnly:Pt,showLines:pt,style:St={},stylesPrev:dt={},highlightKeywords:pe,showProgramFill:ce,isProgramFill:He,disabledFill:ft=!1,programFillValue:ut,openEditor:xe=()=>{},onFillChange:Be=Ve=>{},onFillBlur:Se=()=>{},onFillFocus:Qe=()=>{}})=>{let Ve=Pe(String(Ze||""));const ct=(0,se.useRef)(),ke=(0,se.useRef)(),[Ye,Xe]=(0,se.useState)(""),[ie,ee]=(0,se.useState)("office"),[z,re]=(0,se.useState)([]),le=(0,se.useRef)("a"+(0,$e.Z)()),ne={},me=nt=>/<style[\s\S]*?>/i.test(nt||""),Oe=(nt,rn,Ot)=>{const Gt=document.createElement(nt===Zt?"input":"textarea");Gt.style.width="100%",Gt.style.height=nt===Zt?"40px":"151px",Gt.rows=5,Gt.spellcheck=!1,Gt.name="edu-program-fill",Gt.placeholder="\u8BF7\u8F93\u5165",Gt.dataset.id=rn;const sn=Object.keys(ne).length;return ne[sn]=Gt,`<span class="edu-program-fill-wrap ${nt===Zt?"":"show"}" style="width:${nt===Zt?"600px":"100%"}" title=${Ot||""}><span>${Gt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function wt(nt){return nt=nt.replace(/!\[.*?\]\(.*?\)/g,""),nt=nt.replace(/\[.*?\]\(.*?\)/g,""),nt=nt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),nt=nt.replace(/<embed.*?>/g,""),nt=nt.replace(/<img.*?>/g,""),nt=nt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),nt=nt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),nt=nt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),nt=nt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),nt}const Ct=nt=>!Pt&&me(Ve)?nt:nt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(rn,Ot){let Gt=Ot.replace(/(\n|\r)/g,"").split("}"),sn=[];return Gt.map(Mn=>{Mn!=""&&sn.push(`.${le.current} ${Mn}`)}),`<style>${sn.join("}")}</style>`}),vt=(0,se.useMemo)(()=>{try{const Gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Mn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,un=/\(\/attachments\/download\//g;Ve=Ve.replace(un,"("+ye.Z.API_SERVER+"/attachments/download/").replace(Gt,"("+ye.Z.API_SERVER+"/api/attachments/").replace(sn,'"'+ye.Z.API_SERVER+"/api/attachments/").replace(Mn,'"'+ye.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),ct.current.style.display="none"}catch(Gt){}if(ce){let Gt=-1;return Ve=Ve.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(sn,Mn,un){var mn;return++Gt,Oe(sn,Gt,(mn=ut==null?void 0:ut[Gt])==null?void 0:mn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ct(Ve||"")}</pre>`}let nt=Ct(Ve);nt=(0,Fe.ZP)(nt);const rn=(0,Fe.ez)();Ve.match(/\[TOC\]/)&&(nt=nt.replace("<p>[TOC]</p>",(0,Fe.Qv)()),(0,Fe.Iy)()),nt=nt.replace(/(__special_katext_id_\d+__)/g,(Gt,sn)=>{const{type:Mn,expression:un}=rn[sn];return(0,Ge.renderToString)(Ue(un)||"",{displayMode:Mn==="block",throwOnError:!1,output:"html"})}),nt=nt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Fe.AL)();const Ot=document.createElement("div");if(Ot.innerHTML=nt,Pt)return Ot.innerText;if(pe){const Gt=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Xt(Ot,Gt),Ot.innerHTML}return setTimeout(()=>Ft(),500),Ot.innerHTML},[Ve,pe]);(0,se.useEffect)(()=>{Jt.current&&Jt.current.querySelectorAll(["input","textarea"]).forEach(rn=>{rn.oninput=xt,rn.onblur=It,rn.onfocus=Rt})},[z]),(0,se.useEffect)(()=>{var nt,rn,Ot,Gt,sn;if(ut!=null&&ut.length)try{const Mn=Jt.current.querySelectorAll(".edu-program-fill-score"),un=Jt.current.querySelectorAll('[name="edu-program-fill"]');for(const[mn,nr]of un.entries())nr.value=((nt=ut==null?void 0:ut[mn])==null?void 0:nt.value)||"",((rn=ut==null?void 0:ut[mn])==null?void 0:rn.type)==="warning"?nr.className="program-fill-warning":((Ot=ut==null?void 0:ut[mn])==null?void 0:Ot.type)==="success"?nr.className="program-fill-success":nr.className="";for(const[mn,nr]of Mn.entries())nr.innerHTML=(Gt=ut==null?void 0:ut[mn])!=null&&Gt.score?`${(sn=ut==null?void 0:ut[mn])==null?void 0:sn.score}\u5206`:"";re(ut)}catch(Mn){console.log(Mn,"error")}},[ut]);const xt=nt=>{z[nt.target.dataset.id]=z[nt.target.dataset.id]||{},z[nt.target.dataset.id].value=nt.target.value,re([...z]),Be(z,nt.target.dataset.id)},It=nt=>{z[nt.target.dataset.id]=z[nt.target.dataset.id]||{},z[nt.target.dataset.id].value=nt.target.value,re([...z]),Se(z,nt.target.dataset.id)},Rt=nt=>{z[nt.target.dataset.id]=z[nt.target.dataset.id]||{},z[nt.target.dataset.id].value=nt.target.value,re([...z]),Qe(z,nt.target.dataset.id)};function Xt(nt,rn){return nt.childNodes.forEach(Ot=>{var Gt;if(Ot.childNodes.length>0)Xt(Ot,rn);else if(Ot.nodeName!=="IMG")if(Ot.innerHTML)Ot.innerHTML=(Gt=Ot.innerHTML)==null?void 0:Gt.replace(new RegExp(rn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const sn=document.createElement("span");sn.innerHTML=Ot.textContent.replace(new RegExp(rn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ot.replaceWith(sn)}})}const Jt=(0,se.useRef)();Fe.jb.WebkitLineClamp=pt,pt&&(St=lt(lt({},St),Fe.jb));function Et(nt){let rn=nt.target;if(rn.tagName.toUpperCase()==="A"){let Ot=rn.getAttribute("href");if(Ot.indexOf("office")>-1)nt.preventDefault(),Xe(Ot),ee("office");else if(Ot.indexOf("application/pdf")>-1)nt.preventDefault(),Xe(Ot),ee("pdf");else if(Ot.indexOf("text/html")>-1)nt.preventDefault(),Xe(Ot),ee("html");else if(Ot.startsWith("#")){nt.preventDefault();let Gt=document.getElementById(Ot.replace("#",""));Gt&&Gt.scrollIntoView(!0)}}}const Ft=()=>{var nt;const rn=(nt=Jt.current)==null?void 0:nt.querySelectorAll("video");rn==null||rn.forEach(Ot=>{if(Ot.oncontextmenu=()=>!1,Ot.src.indexOf(".m3u8")>-1&&!Ot.canPlayType("application/vnd.apple.mpegurl")){if(ge.ZP.isSupported()){var Gt=new ge.ZP;Gt.loadSource(Ot.src),Gt.attachMedia(Ot)}}})};(0,se.useEffect)(()=>{if(Jt.current&&vt&&vt.match(Je)&&window.PR.prettyPrint(),Jt.current)return Jt.current.addEventListener("click",Et),()=>{var nt;(nt=Jt.current)==null||nt.removeEventListener("click",Et),(0,Fe.AL)(),(0,Fe.Iy)()}},[vt,Jt.current,Et]);const kt=nt=>{nt.target.nodeName==="IMG"&&nt.target.className.indexOf("draw-flowchart")>-1?(ct.current.style.zIndex=1,ct.current.style.display="flex",ct.current.style.width=nt.target.clientWidth+"px",ct.current.style.height=nt.target.clientHeight+"px",ct.current.style.top=nt.target.offsetTop+"px",ct.current.style.left=nt.target.offsetLeft+"px",nt.target.id&&(ke.current=nt.target.id)):ct.current.style.display="none"},Qt=()=>{ct.current.style.display="none"};return(0,se.useEffect)(()=>{var nt;const rn=Ot=>{Ot.preventDefault(),Ot.clipboardData.setData("text",window.getSelection().toString())};return(nt=Jt.current)==null||nt.addEventListener("copy",rn),()=>{var Ot;(Ot=Jt.current)==null||Ot.removeEventListener("copy",rn)}},[Jt.current]),se.createElement("div",{style:{position:"relative"},onMouseLeave:Qt},Pt&&se.createElement("div",{ref:Jt,className:`${De.mdBody} `},vt),!Pt&&!me(vt)&&se.createElement("div",{ref:Jt,style:lt({},St),onMouseOver:kt,className:`${ze||""} ${ft?"disabled-fill":""} markdown-body ${De.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:vt}}),!Pt&&me(vt)&&se.createElement(Te,{html:vt}),se.createElement("div",{ref:ct,className:`${De.button} ${Le?"":De.previewFlowChart}`},se.createElement(we.Z,null,se.createElement(fe.ZP,{onClick:()=>{Le?xe(ke.current):(Xe(ke.current),ee("flowChart"))}},Le?"\u7F16\u8F91":"\u9884\u89C8"))),se.createElement(ve.Z,{close:!0,data:Ye,type:Ye!=null&&Ye.length?ie:"",style:lt({},dt),onClose:()=>Xe("")}))}},44905:function(At,Bt,de){"use strict";de.d(Bt,{h:function(){return st}});var se=de(59301),et=de(82326),Fe=de(28284),Ne=de(99571),ge=de(89780),ye=de.n(ge),Re=de(66543),Ge=de(59598),we=Object.defineProperty,fe=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Te=(qe,lt,it)=>lt in qe?we(qe,lt,{enumerable:!0,configurable:!0,writable:!0,value:it}):qe[lt]=it,Pe=(qe,lt)=>{for(var it in lt||(lt={}))rt.call(lt,it)&&Te(qe,it,lt[it]);if(ve)for(var it of ve(lt))We.call(lt,it)&&Te(qe,it,lt[it]);return qe},De=(qe,lt)=>fe(qe,$e(lt));const tt=et.default.Option,at={labelCol:{span:4},wrapperCol:{span:20}},ht={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"]};Bt.Z=({callback:qe,onCancel:lt})=>{const[it,Zt]=(0,se.useState)("python");function Je(bt){Zt(ht[bt][1])}function Ue(bt){qe(bt)}return se.createElement(Fe.default,De(Pe({},at),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ue,style:{width:500}}),se.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},se.createElement(et.default,{getPopupContainer:bt=>bt.parentNode,onChange:Je},Object.keys(ht).map(bt=>se.createElement(tt,{key:bt,value:bt},ht[bt][0])))),se.createElement(Fe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},se.createElement(st,{mode:it})),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ne.ZP,{type:"ghost",onClick:lt},"\u53D6\u6D88")))};function st({value:qe,onChange:lt,mode:it,options:Zt={}}){const Je=(0,se.useRef)(),[Ue,bt]=(0,se.useState)();return(0,se.useEffect)(()=>{if(Ue){let Ae=function(Ze){const Le=Ze.getValue();lt&&lt(Le)};return Ue.on("change",Ae),()=>{Ue.off("change",Ae)}}},[Ue,lt]),(0,se.useEffect)(()=>{Ue&&Ue.setOption("mode",it)},[Ue,it]),(0,se.useEffect)(()=>{Ue&&(qe!==Ue.getValue()||qe==="")&&setTimeout(()=>{Ue.setValue(qe||"")},300)},[Ue,qe]),(0,se.useEffect)(()=>{if(Je.current&&!Ue){const Ae=ye().fromTextArea(Je.current,Pe({mode:it,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Zt));bt(Ae)}},[Je.current,Ue]),se.createElement("div",{className:"my-codemirror-container"},se.createElement("textarea",{ref:Je}))}},2978:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return kr}});var se=de(59301),et=de(76560),Fe=de(89780),Ne=de.n(Fe),ge=de(76374),ye=de(66543),Re=de(6313),Ge=de(25717),we=de(99498),fe=de(25419),$e=de(67549),ve=de(38394),rt=({value:an="",className:fn,showTextOnly:gn,showLines:En,style:$n={}})=>{const or=(0,se.useMemo)(()=>"",[an]);return se.createElement(se.Fragment,null,se.createElement("div",{dangerouslySetInnerHTML:{__html:or}}))},We=Object.defineProperty,Te=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ht=(an,fn,gn)=>fn in an?We(an,fn,{enumerable:!0,configurable:!0,writable:!0,value:gn}):an[fn]=gn,st=(an,fn)=>{for(var gn in fn||(fn={}))tt.call(fn,gn)&&ht(an,gn,fn[gn]);if(De)for(var gn of De(fn))at.call(fn,gn)&&ht(an,gn,fn[gn]);return an},qe=(an,fn)=>Te(an,Pe(fn));let lt=[{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 it({onActionCallback:an,title:fn,icon:gn,actionName:En,className:$n="",children:or}){function yr(){an(En)}return se.createElement("a",{title:fn,className:$n,onClick:yr},se.createElement("i",{className:`${gn}`}),or)}var Zt=({watch:an,showNullButton:fn,showNullProgramButton:gn,onActionCallback:En,fullScreen:$n,insertTemp:or,hidetoolBar:yr,extraUse:Zn})=>{const On=[...lt,{title:`${an?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${an?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return se.createElement("ul",{className:"markdown-toolbar-container"},!yr&&On.map((Er,Wt)=>se.createElement("li",{key:Wt},Er.actionName?se.createElement(it,qe(st({},Er),{onActionCallback:En})):se.createElement("span",{className:"v-line"}))),fn?se.createElement("li",null,se.createElement(it,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:En},se.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,gn?se.createElement(se.Fragment,null,se.createElement("li",null,se.createElement(it,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:En},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),se.createElement("li",null,se.createElement(it,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:En},se.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,or&&se.createElement("li",null,se.createElement(it,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${or}`,onActionCallback:En},se.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Zn&&se.createElement("li",null,Zn),se.createElement("li",{className:"btn-full-screen"},se.createElement(it,{icon:`${$n?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:$n?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:En})))},Je=de(75790),Ue=de(28284),bt=de(37568),Ae=de(99571),Ze=Object.defineProperty,Le=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,Pt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,dt=(an,fn,gn)=>fn in an?Ze(an,fn,{enumerable:!0,configurable:!0,writable:!0,value:gn}):an[fn]=gn,pe=(an,fn)=>{for(var gn in fn||(fn={}))pt.call(fn,gn)&&dt(an,gn,fn[gn]);if(Pt)for(var gn of Pt(fn))St.call(fn,gn)&&dt(an,gn,fn[gn]);return an},ce=(an,fn)=>Le(an,ze(fn));const He={labelCol:{span:4},wrapperCol:{span:20}};var ft=({callback:an,onCancel:fn})=>{function gn(En){an(En)}return se.createElement(Ue.default,ce(pe({},He),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:gn,style:{width:500}}),se.createElement(Ue.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},se.createElement(bt.default,null)),se.createElement(Ue.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},se.createElement(bt.default,null)),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ae.ZP,{type:"ghost",onClick:fn},"\u53D6\u6D88")))},ut=de(44905),xe=de(45596),Be=de(62957),Se=de(77019),Qe=de(6077),Ve=de(59301),ct=({callback:an,onCancel:fn})=>{const gn=document.createElement("canvas"),En=gn.getContext("2d");gn.width=1e3,gn.height=800,En.fillStyle="#ffffff",En.fillRect(0,0,gn.width,gn.height);const $n=gn.toDataURL("image/png");return Ve.createElement(Be.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ve.createElement(Se.Z,{style:{height:"100vh"}},Ve.createElement(Qe.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:$n,visible:!0,title:String(Date.now())},onOk:or=>{an({src:or.url})},onClose:fn})))},ke=de(30641),Ye=de(5269),Xe=de(6767),ie={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ee=de(59301),re=(0,se.forwardRef)(({onCancel:an,editImgId:fn,callback:gn},En)=>{let $n=(0,se.useRef)(),or=(0,se.useRef)(),yr=(0,se.useRef)(),Zn=(0,se.useRef)(!1);const On=(0,se.useRef)(!1);console.log("ref:",En);const[Er,Wt]=(0,se.useState)(0),[ot,qt]=(0,se.useState)("100vh");return(0,se.useEffect)(()=>{Wt(1)},[]),(0,se.useImperativeHandle)(En,()=>({setHeight:qt})),ee.createElement("div",{ref:On,className:"body-overflow-initial"},ee.createElement(ke.Z,{width:"100vw",height:ot,footer:null,closable:!0,placement:"bottom",open:!!Er,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ie.drawerWrap}`,onClose:()=>{window.saveDrawData(Sn=>{gn({src:`/api/attachments/${Sn}`,id:Sn})})},title:ee.createElement(Se.Z,{align:"middle"},ee.createElement(Ye.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(Ye.Z,{onClick:()=>{qt(ot==="60px"?"100vh":"60px")}},ee.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ee.createElement(Ye.Z,{onClick:()=>{window.saveDrawData(Sn=>{if(Sn===null){Xe.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Xe.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),gn({src:`/api/attachments/${Sn}`,id:Sn,disabledClose:!0})})}},ee.createElement(Ae.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ee.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${fn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:or})))}),le=de(90524),ne=de(47889),me=de(71051);const Oe=ne.ZP.Group,wt={margin:"0 8px"};var Ct=({callback:an,onCancel:fn})=>{function gn(En){an(En)}return se.createElement(Ue.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:gn},se.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},se.createElement("span",{style:wt},"\u5355\u5143\u683C\u6570\uFF1A"),se.createElement("span",{style:wt},"\u884C\u6570"),se.createElement(Ue.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},se.createElement(me.Z,null)),se.createElement("span",{style:wt},"\u5217\u6570"),se.createElement(Ue.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},se.createElement(me.Z,null))),se.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},se.createElement("span",{style:wt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),se.createElement(Ue.default.Item,{name:"align"},se.createElement(Oe,null,se.createElement(ne.ZP,{value:"default"},se.createElement("i",{className:"fa fa-align-justify"})),se.createElement(ne.ZP,{value:"left"},se.createElement("i",{className:"fa fa-align-left"})),se.createElement(ne.ZP,{value:"center"},se.createElement("i",{className:"fa fa-align-center"})),se.createElement(ne.ZP,{value:"right"},se.createElement("i",{className:"fa fa-align-right"}))))),se.createElement("div",{className:"flex-container flex-end"},se.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(Ae.ZP,{type:"ghost",onClick:fn},"\u53D6\u6D88")))},vt=de(71411),xt=de(11081),It=de.n(xt),Xt=(0,se.forwardRef)(({use3d:an,width:fn,height:gn,callback:En,showSaveButton:$n},or)=>{const yr=(0,se.useRef)(),Zn=(0,se.useRef)(),[On,Er]=(0,se.useState)(!1),Wt=(0,se.useRef)({id:yr,appName:"graphing",width:fn||1e3,height:gn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,se.useEffect)(()=>{Zn.current=new(It())(Wt.current,!0),window.onload=function(){Zn.current.inject("applet_container")}},[]);const ot=()=>{var qt=window.ggbApplet.getPNGBase64(1,!0,72);return En&&En(qt),qt};return(0,se.useEffect)(()=>{Wt.current.appName=On?"3D":"graphing",Zn.current.inject("applet_container")},[On]),(0,se.useEffect)(()=>{Er(an)},[an]),(0,se.useImperativeHandle)(or,()=>({getImgData:ot})),se.createElement(se.Fragment,null,se.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:yr}),se.createElement(Se.Z,{align:"middle"},se.createElement(Ye.Z,{flex:1},se.createElement(vt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:On,onChange:qt=>Er(qt)})),se.createElement(Ye.Z,null,se.createElement(Ae.ZP,{size:"large",onClick:ot,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Jt=de(88615);const Et="link",Ft="upload-image",kt="add-flowchart",Qt="draw-image",nt="add-flowchart",rn="code-block",Ot="add-table",Gt="------------",sn={default:Gt,left:`:${Gt}`,center:`:${Gt}:`,right:`${Gt}:`};var Mn=de(17904),un=de(49661);function mn(){}let nr=0;const Un=1e4,zr="\u2581",Wr="@\u2581\u2581@",xr="@\u2581@",gr=`
**\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`,Hn=["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 ir(an){return/^\d+$/.test(an)?`${an}px`:an}const Nn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",rr={[Nn+"-B"]:"bold",[Nn+"-I"]:"italic"},Vn={[Et]:"\u6DFB\u52A0\u94FE\u63A5",[rn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ft]:"\u6DFB\u52A0\u56FE\u7247",[Qt]:"\u6DFB\u52A0\u753B\u56FE",[kt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ot]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var kr=({defaultValue:an="",onChange:fn,width:gn="100%",height:En=400,miniToolbar:$n=!1,isFocus:or=!1,watch:yr,insertTemp:Zn,mode:On="markdown",id:Er="markdown-editor-id",showResizeBar:Wt=!1,noStorage:ot=!1,showNullButton:qt=!1,showNullProgramButton:Sn=!1,hidetoolBar:jn=!1,fullScreen:Ee=!1,onBlur:Me,onCMBeforeChange:Mt,onFullScreen:mt,className:_e="",disablePaste:gt=!1,disabled:Ut=!1,disabledFill:nn=!1,placeholder:on="",values:Nt="",extraUse:Vt})=>{const[Ie,yn]=(0,se.useState)(null),[Yt,pn]=(0,se.useState)(an),[cn,bn]=(0,se.useState)(yr),[Tn,cr]=(0,se.useState)(Ee),[Bn,Ln]=(0,se.useState)(""),[er,An]=(0,se.useState)(0),[hr,Ir]=(0,se.useState)(En),[ar,dr]=(0,se.useState)(!1),[Lr,fr]=(0,se.useState)(0),[Xn,Mr]=(0,se.useState)(0),Jn=(0,se.useRef)(),sr=(0,se.useRef)(),pr=(0,se.useRef)(),wr=(0,se.useRef)(),lr=(0,se.useRef)(),Kn=(0,se.useRef)(),zn=(0,et.useDispatch)();(0,se.useEffect)(()=>{const _t=window.scrollY||window.pageYOffset;pn(Nt),Ie==null||Ie.setValue(Nt),window.scrollTo(0,_t)},[Nt]),(0,se.useEffect)(()=>{mt==null||mt(Tn)},[Tn]),(0,se.useEffect)(()=>{if(Jn.current){let _t=function(jt,Kt){var Dn;if(gt){Kt.preventDefault();return}const Fn=Kt.clipboardData;if(Fn){const br=Fn.types.toString(),_n=Fn.items;if(br==="Files"||Fn.types.indexOf("Files")>-1){if(Kt.preventDefault(),On=="stex")return;try{let Qn=_n[1];((Dn=_n[0])==null?void 0:Dn.kind)==="file"&&(Qn=_n[0]);const Ar=Qn.getAsFile(),jr=Ar.name.split(".").pop();(0,xe.I)(Ar,vr=>{var Yr,Dr,hi;vr.id?((Yr=Ar==null?void 0:Ar.type)==null?void 0:Yr.indexOf("image"))>-1?Dt.replaceSelection(`<img width="100%" src="/api/attachments/${vr.id}?type=${vr.content_type})" alt="" />`):((Dr=Ar==null?void 0:Ar.type)==null?void 0:Dr.indexOf("video"))>-1?Dt.replaceSelection(`<video width="100%" controls src="/api/attachments/${vr.id}"></video>`):((hi=Ar==null?void 0:Ar.type)==null?void 0:hi.indexOf("pdf"))>-1?Dt.replaceSelection(`<a href="/api/attachments/${vr.id}?type=${Ar.type}&disposition=inline" target="_blank">${Ar.name}</a>`):Hn.includes(jr)?Dt.replaceSelection(`<a href="/api/attachments/${vr.id}?type=office&disposition=inline" target="_blank">${Ar.name}</a>`):Dt.replaceSelection(`[${Ar.name}](/api/attachments/${vr.id}?type=${vr.content_type})`):(vr==null?void 0:vr.status)===401&&(document.location.href="/user/login")})}catch(Qn){Xe.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Dt=Ne().fromTextArea(Jn.current,{mode:On,lineNumbers:!$n,lineWrapping:!0,value:an,autoCloseTags:!0,autoCloseBrackets:!0});return Dt.on("keyup",function(jt,Kt){Kt.keyCode===8&&(jt.getValue()==""?Dt.setOption("placeholder",on):Dt.setOption("placeholder",null))}),Dt.on("keydown",function(jt,Kt){if(Kt.keyCode===8){var Dn=Zr(jt);Dn&&Kt.preventDefault()}}),or&&Dt.focus(),Dt.on("paste",_t),Ut&&Dt.on("beforeChange",function(jt,Kt){(Kt.origin==="paste"||Kt.origin==="+input")&&Kt.cancel()}),yn(Dt),()=>{Dt.off("paste",_t)}}},[]);const Tr=(0,se.useCallback)(()=>{if(sr.current)try{}catch(_t){console.log(_t,"---- to set md editor body height")}},[hr,sr,Tn]);(0,se.useEffect)(()=>{function _t(){let Dt=new ge.Z(jt=>{for(let Kt of jt)(Kt.target.offsetHeight>0||Kt.target.offsetWidth>0)&&(Tr(),Ie.setSize("100%","100%"),Ie.refresh())});return Dt.observe(Jn.current.parentElement),Dt}if(Ie){const Dt=_t();return()=>{var jt,Kt;(jt=Jn.current)!=null&&jt.parentElement&&Dt.unobserve((Kt=Jn.current)==null?void 0:Kt.parentElement)}}},[Ie,Tr]),(0,se.useEffect)(()=>{if(Ie){let _t=[];for(const[Dt,jt]of Object.entries(rr)){let Kt={[Dt]:()=>{Gr(jt)}};_t.push(Kt),Ie.addKeyMap(Kt)}return()=>{for(let Dt of _t)Ie.removeKeyMap(Dt)}}},[Ie]),(0,se.useEffect)(()=>{Ee!==Tn&&cr(Ee)},[Ee]),(0,Mn.Z)(()=>{if(!ot&&er>0){let _t=new Date().getTime(),Dt=window.sessionStorage.getItem(Er);_t>=er+Un&&(!Dt||Dt!==Yt)&&(window.sessionStorage.setItem(Er,Yt),dr(!0))}},Un),(0,se.useEffect)(()=>{bn(yr)},[Ie,yr]),(0,se.useEffect)(()=>{Ie&&or&&Ie.focus()},[Ie,or]),(0,se.useEffect)(()=>{if(cn&&Ie){let _t=function(jt){let Kt=jt.target;if(wr.current){let Dn=Kt.scrollTop/Kt.scrollHeight;wr.current.scrollTop=wr.current.scrollHeight*Dn}};const Dt=Ie.getScrollerElement();return Dt.addEventListener("scroll",_t),()=>{Dt.removeEventListener("scroll",_t)}}},[Ie,cn]),(0,se.useEffect)(()=>{if(Ie&&Mt){let _t=function(Dt,jt){Mt(Dt,jt)};return Ie.on("beforeChange",_t),()=>{Ie.off("beforeChange",_t)}}},[Ie,Mt]),(0,se.useEffect)(()=>{if(Ie&&Me){let _t=function(){Me(Ie.getValue())};return Ie.on("blur",_t),()=>{Ie.off("blur",_t)}}},[Ie,Me]);function Zr(_t,Dt){var jt=_t.getDoc(),Kt=jt.getCursor(),Dn=jt.getLine(Kt.line),Fn=Dn.charAt(Kt.ch-1),br=Dn.lastIndexOf("@\u2581@",Kt.ch),_n=Dn.lastIndexOf("@\u2581\u2581@",Kt.ch),Qn=br>_n?br:_n,Ar=br>_n?3:4;if(Wr.indexOf(Fn)===-1)return null;if(console.log("change1:",Dt,_t,Dn,Kt,Qn,br,_n,Fn),Qn>=0&&Kt.ch-Qn<5){var jr=Qn+Ar;return jt.replaceRange("",{line:Kt.line,ch:Qn},{line:Kt.line,ch:jr}),{line:Kt.line,ch:jr}}return null}(0,se.useEffect)(()=>{if(Ie){let _t=function(Dt,jt){const Kt=Dt.getValue();pn(Kt),An(new Date().getTime()),Dt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),fn&&(Sn?fn(Kt,Tt(Kt)):fn(Kt))};return Ie.on("change",_t),()=>{Ie.off("change",_t)}}},[Ie,fn]),(0,se.useEffect)(()=>{if(Ie)if(an==null)Ie.setValue(""),pn("");else{const _t=window.scrollY||window.pageYOffset;an!==Ie.getValue()&&(Ie.setValue(an),pn(an),Ie.setCursor(Ut?1:Ie.lineCount(),0),window.scrollTo(0,_t))}},[Ie,an]);const Gr=(0,se.useCallback)(_t=>{const Dt=Ie.getCursor(),jt=Ie.getSelection();let Kt=jt.split(`
`);switch(_t){case"bold":return Ie.replaceSelection("**"+jt+"**"),jt===""&&Ie.setCursor(Dt.line,Dt.ch+2),Ie.focus();case"italic":return Ie.replaceSelection("*"+jt+"*"),jt===""&&Ie.setCursor(Dt.line,Dt.ch+1),Ie.focus();case"code":return Ie.replaceSelection("`"+jt+"`"),jt===""&&Ie.setCursor(Dt.line,Dt.ch+1),Ie.focus();case"inline-latex":return(0,un.Ye)(zn)?void 0:(Ln("inline-latex"),Ie.focus());case"latex":return Ie.replaceSelection("```latex\n"+jt+"\n```"),Ie.setCursor(Dt.line+1,jt.length+1),Ie.focus();case"line-break":return Ie.replaceSelection(`<br/>
`),Ie.focus();case"list-ul":return jt===""?Ie.replaceSelection("- "+jt):Ie.replaceSelection(Kt.map(Dn=>Dn===""?"":`- ${Dn}`).join(`
`)),Ie.focus();case"list-ol":return jt===""?Ie.replaceSelection("1. "+jt):Ie.replaceSelection(Kt.map((Dn,Fn)=>Dn===""?"":`${Fn+1}. ${Dn}`).join(`
`)),Ie.focus();case"add-null-ch":return jt===""&&Ie.setCursor(Dt.line,Dt.ch),Ie.replaceSelection(zr),Ie.focus();case"add-signal":return jt===""&&Ie.setCursor(Dt.line,Dt.ch),Ie.replaceSelection(xr),Ie.focus();case"add-multiple":return jt===""&&Ie.setCursor(Dt.line,Dt.ch),Ie.replaceSelection(Wr),Ie.focus();case"inster-template-1":return jt===""&&Ie.setCursor(Dt.line,Dt.ch),Ie.replaceSelection(gr),Ie.focus();case"eraser":return Ie.setValue(""),Ie.focus();case"trigger-watch":return bn(!cn),Ie.focus();case"trigger-full-screen":return cr(!Tn),Ie.focus();case Et:Ln(Et);return;case rn:Ln(rn);return;case Ft:Ln(Ft);return;case Qt:Ln(Qt);return;case"maths-latex":if((0,un.Ye)(zn))return;Ln("maths-latex");return;case kt:lr.current="",sessionStorage.removeItem("file_id"),Ln(kt);return;case Ot:Ln(Ot);return;default:throw new Error}},[Ie,cn,Tn]),Yn=(0,se.useCallback)((_t,Dt)=>{var jt,Kt,Dn,Fn,br,_n;_t!=null&&_t.disabledClose||Ln("");const{src:Qn,alt:Ar,id:jr}=_t||{};switch(Bn){case Et:const{title:zi,link:Ni}=_t;return Ie.replaceSelection(`[${zi}](${Ni})`),Ie.focus();case rn:const{language:xi,content:mi}=_t;return Ie.replaceSelection(["```"+xi,mi,"```"].join(`
`)),Ie.focus();case"maths-latex":for(var vr=atob(_t),Yr=new Uint8Array(vr.length),Dr=0;Dr<vr.length;Dr++)Yr[Dr]=vr.charCodeAt(Dr);var hi=new Blob([Yr],{type:"image/png"});(0,xe.I)(hi,di=>{di.id?Ie.replaceSelection(`![,](/api/attachments/${di.id}?type=${di.content_type})`):(di==null?void 0:di.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,un.Ye)(zn))return;Ie.replaceSelection("`$$"+_t+"$$`");break;case nt:if(!jr)return;Ie.getValue().indexOf(Qn)===-1?Ie.replaceSelection(`<center><img id="${jr}" width="80%" src="${Qn}" class="draw-flowchart" alt="${Ar||""}" /></center>`):document.getElementById(jr).src=le.Z.API_SERVER+Qn+"?t="+Date.now();break;case Ft:case Qt:const Cr=Dt,wi=(Dn=(Kt=(jt=Cr==null?void 0:Cr.name)==null?void 0:jt.split("."))==null?void 0:Kt.pop)==null?void 0:Dn.call(Kt);return((Fn=Cr==null?void 0:Cr.type)==null?void 0:Fn.indexOf("image"))>-1||!(Cr!=null&&Cr.type)?Cr!=null&&Cr.align||Cr!=null&&Cr.width?Ie.replaceSelection(`<p style="text-align:${Cr.align||"initial"}"><img width="${Cr.width?Cr.width+"%":"initial"}" src="${Qn}" alt="${Ar||""}" /></p>`):Ie.replaceSelection(`<img width="100%" src="${Qn}" alt="${Ar||""}" />`):((br=Cr==null?void 0:Cr.type)==null?void 0:br.indexOf("video"))>-1?Ie.replaceSelection(`<video width="100%" controls src="${Qn}"></video>`):((_n=Cr==null?void 0:Cr.type)==null?void 0:_n.indexOf("pdf"))>-1?Ie.replaceSelection(`<a href="${Qn}?type=${Cr.type}&disposition=inline" target="_blank">${Cr.name}</a>`):Hn.includes(wi)?Ie.replaceSelection(`<a href="${Qn}?type=office&disposition=inline" target="_blank">${Cr.name}</a>`):Ie.replaceSelection(`[${Cr.name}](${Qn})`),Ie.focus();case Ot:const{row:eo,col:Xr,align:Oi}=_t;let Xi=`
`;for(let di=0;di<eo;di++){let ao=[],Ri=[];for(let Nr=0;Nr<Xr;Nr++)di===1&&Ri.push(sn[Oi]),ao.push(" ");di===1&&(Xi+=`| ${Ri.join(" | ")} |
`),Xi+=`| ${ao.join(Xr===1?"":" | ")} |
`}return Ie.replaceSelection(Xi+`
`),Ie.focus();default:throw new Error}},[Ie,Bn]),ai=(0,se.useMemo)(()=>{switch(Bn){case Et:return se.createElement(ft,{callback:Yn,onCancel:tr});case rn:return se.createElement(ut.Z,{callback:Yn,onCancel:tr});case Ft:return se.createElement(xe.Z,{callback:Yn,onCancel:tr});case kt:return se.createElement(re,{editImgId:lr.current,callback:Yn,onCancel:tr});case Ot:return se.createElement(Ct,{callback:Yn,onCancel:tr});case"maths-latex":return se.createElement(Xt,{showSaveButton:!0,callback:Yn});case"inline-latex":return se.createElement(Jt.Z,{showSaveButton:!0,callback:Yn});default:return null}},[Bn]);function tr(){Ln("")}(0,se.useEffect)(()=>{if(pr.current){let _t=function(br){Dn=!0,Fn=br.pageY},Dt=function(){Dn=!1},jt=function(br){if(Dn){let _n=br.pageY-Fn;_n<0&&(_n=0),_n>300&&(_n=300);let Qn=En+_n+"px";Ir(Qn)}},Kt=pr.current,Dn=!1,Fn=0;return Kt.addEventListener("mousedown",_t),document.addEventListener("mousemove",jt),document.addEventListener("mouseup",Dt),()=>{Kt.removeEventListener("mousedown",_t),document.removeEventListener("mousemove",jt),document.removeEventListener("mouseup",Dt)}}},[Ie,pr]),(0,se.useEffect)(()=>{Ir(En)},[En]);const si=ir(gn),ti=ir(hr),Fr={width:si,height:ti},Rn=(0,se.useMemo)(()=>{if(er){let _t=new Date(er),Dt=_t.getHours(),jt=_t.getMinutes(),Kt=_t.getSeconds();return Dt=Dt<10?"0"+Dt:Dt,jt=jt<10?"0"+jt:jt,Kt=Kt<10?"0"+Kt:Kt,`${Dt}:${jt}:${Kt}`}return 0},[er]),Tt=_t=>{const Dt=[];if(Sn){let jt=-1;_t=_t.replace(/(@▁▁@|@▁@)/g,function(Kt,Dn,Fn){Dt.push({multiLine:Kt!==xr})})}return Dt};function Ht(){window.sessionStorage.removeItem(Er),dr(!1),An(0)}function hn(){dr(!1),An(0),Ie.setValue(window.sessionStorage.getItem(Er))}(0,se.useEffect)(()=>{Vn[Bn]&&Bn!==Qt&&Bn!==kt&&setTimeout(()=>{const _t=document.getElementsByClassName("markdown-popup-form")[0],Dt=window.innerWidth/2-_t.offsetWidth/2,jt=window.innerHeight/2-_t.offsetHeight/2;fr(Dt),Mr(jt)},0)},[Bn]);const $t=_t=>{_t.preventDefault();const Dt=_t.clientX-Lr,jt=_t.clientY-Xn;document.body.onmousemove=Kt=>{let Dn=Kt.clientX-Dt,Fn=Kt.clientY-jt;const br=document.getElementsByClassName("markdown-popup-form")[0],_n=window.innerWidth-br.offsetWidth,Qn=window.innerHeight-br.offsetHeight;Dn=Math.max(0,Math.min(Dn,_n)),Fn=Math.max(0,Math.min(Fn,Qn)),xn(Kt.clientX,Kt.clientY,Dt,jt)&&(fr(Dn),Mr(Fn))},document.body.onmouseup=function(){document.body.onmousemove=null}},xn=(_t,Dt,jt,Kt)=>{const Dn=document.body.clientHeight,Fn=document.body.clientWidth;return _t<20&&jt>_t||_t>Fn-20&&jt<_t||Dt<20&&Kt>Dt||Dt>Dn-20&&Kt<Dt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return se.createElement(se.Fragment,null,se.createElement("div",{className:"markdown-editor-wrapper",ref:sr},se.createElement("div",{className:`markdown-editor-container ${_e} ${cn?"on-preview":""} ${$n?"mini":""} ${Tn?"full-screen":""}`,style:Fr},se.createElement(Zt,{insertTemp:Zn,watch:cn,fullScreen:Tn,showNullButton:qt,showNullProgramButton:Sn,onActionCallback:Gr,hidetoolBar:jn,extraUse:Vt}),se.createElement("div",{className:"markdown-editor-body"},se.createElement("div",{className:"codemirror-container"},se.createElement("textarea",{ref:Jn,placeholder:on})),cn?se.createElement("div",{ref:wr,className:"preview-container"},On==="stex"&&se.createElement(rt,{value:Yt}),On!=="stex"&&se.createElement(ve.Z,{edit:!0,disabledFill:nn,showProgramFill:Sn,value:Yt,openEditor:_t=>{var Dt;lr.current=_t,(Dt=Kn.current)==null||Dt.setHeight("100vh"),setTimeout(()=>{Ln("add-flowchart")},150)}})):null))),Wt?se.createElement("a",{ref:pr,className:"editor-resize"}):null,Bn===Qt&&se.createElement(ct,{callback:Yn,onCancel:tr}),Bn===kt&&se.createElement(re,{ref:Kn,editImgId:lr.current,callback:Yn,onCancel:tr}),se.createElement(Je.Z,null,Vn[Bn]&&Bn!==Qt&&Bn!==kt?se.createElement(Be.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Lr,top:Xn},title:se.createElement("div",{style:{cursor:"move"},onMouseDown:$t},Vn[Bn]),open:!0,onCancel:tr,footer:null,destroyOnClose:!0,width:Bn===kt?"1200px":null,height:Bn===kt?"80vh":null,className:"markdown-popup-form"},ai):null))}},45596:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return lt},I:function(){return Zt}});var se=de(28284),et=de(6767),Fe=de(37568),Ne=de(77736),ge=de(71051),ye=de(47889),Re=de(99571),Ge=de(67303),we=de(59301),fe=de(59301),$e=Object.defineProperty,ve=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,De=(Je,Ue,bt)=>Ue in Je?$e(Je,Ue,{enumerable:!0,configurable:!0,writable:!0,value:bt}):Je[Ue]=bt,tt=(Je,Ue)=>{for(var bt in Ue||(Ue={}))Te.call(Ue,bt)&&De(Je,bt,Ue[bt]);if(We)for(var bt of We(Ue))Pe.call(Ue,bt)&&De(Je,bt,Ue[bt]);return Je},at=(Je,Ue)=>ve(Je,rt(Ue));const{useForm:ht}=se.default,st={width:280,marginRight:10},qe={labelCol:{span:5},wrapperCol:{span:19}};var lt=({callback:Je,onCancel:Ue})=>{const[bt]=ht();let Ae=(0,we.useRef)();function Ze(Pt){Ae.current.width=bt.getFieldValue("width"),Ae.current.align=bt.getFieldValue("align"),Je(Pt,Ae.current)}function Le(Pt,pt){if(Pt.status===-1){et.ZP.error(Pt.message);return}bt.setFieldsValue({src:`/api/attachments/${Pt.id}`,type:pt.type})}function ze(Pt){let pt=Pt.target.files[0];Ae.current=pt,Zt(pt,Le)}return fe.createElement(se.default,at(tt({form:bt},qe),{className:"upload-image-panel",onFinish:Ze,style:{width:470,overflow:"hidden"}}),fe.createElement(se.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(se.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(Fe.default,{style:st})),fe.createElement(it,{onFileChange:ze}))),fe.createElement(se.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(Fe.default,{style:{width:264}})),fe.createElement(se.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(Ne.Z,null,fe.createElement(se.default.Item,{name:"width",style:{margin:0}},fe.createElement(ge.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(se.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(ye.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),fe.createElement("aside",null,fe.createElement(se.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Re.ZP,{type:"default",onClick:Ue},"\u53D6\u6D88"))))};function it({onFileChange:Je}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Je}))}function Zt(Je,Ue){if(!Je)throw new String("\u6CA1\u6709\u6587\u4EF6");let bt=new FormData;bt.append("editormd-image-file",Je),bt.append("file_param_name","editormd-image-file"),bt.append("byxhr","true");var Ae=new window.XMLHttpRequest;Ae.withCredentials=!0,Ae.addEventListener("load",function(Ze){Ue(JSON.parse(Ze.target.responseText),Je)},!1),Ae.addEventListener("error",function(Ze){console.error(Ze)},!1),Ae.open("POST",`${Ge.KI}/api/attachments.json`),Ae.send(bt)}},75790:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return Fe}});var se=de(59301),et=de(4676);class Fe extends se.Component{constructor(ge){super(ge);const ye=window.document;this.node=ye.createElement("div"),ye.body.appendChild(this.node)}render(){const{children:ge}=this.props;return(0,et.createPortal)(ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(At,Bt,de){"use strict";de.d(Bt,{SV:function(){return ct},ZP:function(){return Ve}});var se=de(59301),et=de(76374);const Fe={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"]},Ne={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"]},ge={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},ye={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},Re={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 Ge=de(53184),we=de.n(Ge),fe=(ke,Ye,Xe)=>new Promise((ie,ee)=>{var z=ne=>{try{le(Xe.next(ne))}catch(me){ee(me)}},re=ne=>{try{le(Xe.throw(ne))}catch(me){ee(me)}},le=ne=>ne.done?ie(ne.value):Promise.resolve(ne.value).then(z,re);le((Xe=Xe.apply(ke,Ye)).next())});const $e={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"]}},ve=(ke,Ye,Xe,ie)=>{const ee=Ye.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Xe.lineNumber,endColumn:Xe.column});return Array.from(new Set(ee.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:ke.languages.CompletionItemKind.Text,insertText:re,range:ie}))},rt=(ke,Ye,Xe,ie)=>{ke.languages.registerCompletionItemProvider(Ye,{provideCompletionItems(ee,z){const re=ee.getWordUntilPosition(z),le={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:[...ve(ke,ee,z,le),...Xe.map(Oe=>({label:Oe,kind:ke.languages.CompletionItemKind.Keyword,documentation:Oe,insertText:Oe,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...ie.map(Oe=>({label:Oe.label,kind:ke.languages.CompletionItemKind.Snippet,documentation:Oe.content,insertText:ne.startsWith("#")?Oe.content.replace(/#/,""):Oe.content,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var We=ke=>{$e.languages.forEach(Ye=>{ke.languages.registerDocumentFormattingEditProvider(Ye,{provideDocumentFormattingEdits(Xe){return fe(this,null,function*(){const ie=we()(Xe.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:Xe.getFullModelRange(),text:ie}]})}})}),rt(ke,"java",Ne.keywords,Ne.quickKey),rt(ke,"cpp",ge.keywords,ge.quickKey),rt(ke,"c",Fe.keywords,[]),rt(ke,"python",ye.keywords,ye.quickKey),rt(ke,"scala",Re.keywords,Re.quickKey)};const Te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Pe=Object.defineProperty,De=(ke,Ye,Xe)=>Ye in ke?Pe(ke,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ke[Ye]=Xe,tt=(ke,Ye,Xe)=>De(ke,typeof Ye!="symbol"?Ye+"":Ye,Xe);const at=class _l{constructor(Ye,Xe,ie){this.placeholder=Ye,this.editor=Xe,this.monaco=ie,Xe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return _l.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)}};tt(at,"ID","editor.widget.placeholderHint");var st=at,qe=de(96236),lt=de(6767),it=de(25399),Zt=de(89392),Je=de(33796),Ue=de(56102),bt=Object.defineProperty,Ae=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,pt=(ke,Ye,Xe)=>Ye in ke?bt(ke,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ke[Ye]=Xe,St=(ke,Ye)=>{for(var Xe in Ye||(Ye={}))ze.call(Ye,Xe)&&pt(ke,Xe,Ye[Xe]);if(Le)for(var Xe of Le(Ye))Pt.call(Ye,Xe)&&pt(ke,Xe,Ye[Xe]);return ke},dt=(ke,Ye)=>Ae(ke,Ze(Ye)),pe=(ke,Ye)=>{var Xe={};for(var ie in ke)ze.call(ke,ie)&&Ye.indexOf(ie)<0&&(Xe[ie]=ke[ie]);if(ke!=null&&Le)for(var ie of Le(ke))Ye.indexOf(ie)<0&&Pt.call(ke,ie)&&(Xe[ie]=ke[ie]);return Xe},ce=(ke,Ye,Xe)=>new Promise((ie,ee)=>{var z=ne=>{try{le(Xe.next(ne))}catch(me){ee(me)}},re=ne=>{try{le(Xe.throw(ne))}catch(me){ee(me)}},le=ne=>ne.done?ie(ne.value):Promise.resolve(ne.value).then(z,re);le((Xe=Xe.apply(ke,Ye)).next())});function He(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}function ft(){}let ut=!1;const xe={"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 Be(ke=[]){let Ye=ke;if(Array.isArray(ke)){for(let Xe=0;Xe<ke.length;Xe++){let ie=xe[ke[Xe]];if(ie)return ie}return Ye[0]}return xe[Ye]||Ye}let Se=null;const Qe=()=>ce(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ke)}});var Ve=ke=>{var Ye=ke,{width:Xe="100%",height:ie="100%",value:ee,language:z="javascript",style:re={},options:le={},overrideServices:ne={},theme:me="vs-dark",onEditBlur:Oe,isCopy:wt=!1,onSave:Ct,autoHeight:vt=!1,forbidCopy:xt=!1,onChange:It=ft,editorDidMount:Rt=ft,onFocus:Xt=ft,onBreakPoint:Jt=ft,breakPointValue:Et=[],filename:Ft="educoder.txt",errorLine:kt,errorContent:Qt="",highlightLine:nt,openBreakPoint:rn=!1,placeholder:Ot="",showMiniMap:Gt=!0}=Ye,sn=pe(Ye,["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 Mn=(0,se.useRef)(),un=(0,se.useRef)({}),mn=(0,se.useRef)(),nr=(0,se.useRef)(),Un=(0,se.useRef)([]),zr=(0,se.useRef)(!1),Wr=(0,se.useRef)(),xr=(0,se.useRef)(),gr=(0,se.useRef)(!1),[Hn,ir]=(0,se.useState)(!1);function Rr(){let Wt;return Mn.current&&(Wt=new et.Z(ot=>{for(let qt of ot)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&un.current.instance.layout()}),Wt.observe(Mn.current)),Wt}function Nn(){lt.ZP.warning({content:decodeURIComponent(Te),key:"monaco-editor-tip"})}const rr=()=>{let Wt=un.current.instance;if(ee!=null&&Wt&&Hn){const ot=Wt.getModel();ot&&ee!==ot.getValue()&&(ut=!0,ot.setValue(ee),Wt.layout(),ut=!1)}};(0,se.useEffect)(()=>{const Wt=Je.Z.subscribe("formatDocument",ot=>{var qt;let Sn=un.current.instance;(qt=Sn==null?void 0:Sn.getAction)==null||qt.call(Sn,"editor.action.formatDocument").run()});return window.updateMonacoValue=ot=>{It(ot)},Wt},[]),(0,se.useEffect)(()=>{var Wt;let ot=un.current.instance;nr.current&&clearTimeout(nr.current),nr.current=setTimeout(()=>{rr()},500),ee&&(ee!=null&&ee.length)&&((Wt=ot==null?void 0:ot.updateOptions)==null||Wt.call(ot,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ee.split(/\r\n|\r|\n/g).length))+3,5)}))},[ee,Hn,un.current]),(0,se.useEffect)(()=>{if(kt&&un.current&&un.current.instance){let ot=un.current.instance;ot.changeViewZones(function(qt){var Sn=document.createElement("div");Sn.style.padding="10px 20px",Sn.style.width="calc(100% - 20px)",Sn.className="my-error-line-wrp",Sn.innerHTML=Qt,qt.addZone({afterLineNumber:kt||11,heightInLines:3,domNode:Sn})});var Wt={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(Wt),ot.revealPositionInCenter({lineNumber:20,column:1})}},[kt,un.current,Hn]);const Vn=(Wt="",ot)=>{if(!Wt||Wt.trim()==="")return!0;const Sn=un.current.instance.getModel().getLineTokens(ot);let jn=!1;for(let Ee=0;Ee<2;Ee++)Sn.getStandardTokenType(Ee)===1&&(jn=!0);return jn};(0,se.useEffect)(()=>{var Wt;const ot=(Wt=un.current)==null?void 0:Wt.instance;if(ot&&Hn&&xt){const qt=ot.onDidBlurEditorWidget(()=>{gr.current=!1}),Sn=ot.onDidFocusEditorText(()=>{gr.current=!0});return()=>{qt.dispose(),Sn.dispose()}}},[un.current,Hn,xt]),(0,se.useEffect)(()=>{var Wt;if((Wt=un.current)!=null&&Wt.instance&&Hn&&rn){let ot=un.current.instance,qt=ot.getModel();if(!qt)return;(()=>{var Nt;let Vt=[],Ie=[];const yn=qt.getAllDecorations();for(let pn of yn)pn.options.className==="highlighted-line"&&(Vt.push((Nt=pn==null?void 0:pn.range)==null?void 0:Nt.startLineNumber),Ie.push(pn==null?void 0:pn.id));if(nt===Vt[0])return;qt.deltaDecorations(Ie,[]);const Yt=qt.getLineCount();nt&&nt<=Yt&&(ot.deltaDecorations([],[{range:new Se.Range(nt,1,nt,qt.getLineMaxColumn(nt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),ot.revealLineInCenter(nt))})();const jn=(Nt=!1)=>{var Vt;let Ie=[],yn=[];const Yt=qt.getAllDecorations();for(let pn of Yt)pn.options.linesDecorationsClassName==="breakpoints-select"&&(Ie.push((Vt=pn==null?void 0:pn.range)==null?void 0:Vt.startLineNumber),yn.push(pn==null?void 0:pn.id));if(Nt)return{lines:Ie,ids:yn};Jt(Ie)},Ee=Nt=>ce(void 0,null,function*(){let Vt={range:new Se.Range(Nt,1,Nt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[Vt]),jn()}),Me=Nt=>ce(void 0,null,function*(){let Vt=[];const Ie=ot.getLineDecorations(Nt);for(let yn of Ie)yn.options.linesDecorationsClassName==="breakpoints-select"&&Vt.push(yn.id);yield qt.deltaDecorations(Vt,[]),jn()}),Mt=Nt=>{let Vt=ot.getLineDecorations(Nt);for(let Ie of Vt)if(Ie.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Zt.isEqual)(Et,jn(!0).lines)){qt.deltaDecorations(jn(!0).ids,[]);const Nt=Et.map(Vt=>({range:new Se.Range(Vt,1,Vt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],Nt)}const mt=ot.onDidChangeModelContent(Nt=>{let Vt=ot.getPosition();if(Vt){let Ie=Vt.lineNumber;clearTimeout(xr.current),xr.current=setTimeout(()=>{Vn(qt.getLineContent(Ie),Ie)?Me(Ie):Mt(Ie)?(Me(Ie),Ee(Ie)):jn()},100)}}),_e=ot.onMouseDown(Nt=>{var Vt,Ie,yn;if(Nt.target.detail&&((yn=(Ie=(Vt=Nt.target)==null?void 0:Vt.element)==null?void 0:Ie.className)!=null&&yn.includes("line-numbers"))){let Yt=Nt.target.position.lineNumber;if(Vn(qt.getLineContent(Yt),Yt))return;Mt(Yt)?Me(Yt):Ee(Yt)}}),gt=Nt=>{let Vt={range:new Se.Range(Nt,1,Nt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Un.current=ot.deltaDecorations(Un.current,[Vt])},Ut=()=>{Un.current=ot.deltaDecorations(Un.current,[])},nn=ot.onMouseMove(Nt=>{var Vt,Ie,yn;if(Ut(),Nt.target.detail&&((yn=(Ie=(Vt=Nt.target)==null?void 0:Vt.element)==null?void 0:Ie.className)!=null&&yn.includes("line-numbers"))){let Yt=Nt.target.position.lineNumber;if(Vn(qt.getLineContent(Yt),Yt))return;gt(Yt)}}),on=ot.onMouseLeave(()=>{Ut()});return()=>{mt.dispose(),_e.dispose(),nn.dispose(),on.dispose()}}},[un.current,Hn,Et,nt,rn,z]),(0,se.useEffect)(()=>{var Wt;(Wt=un.current)!=null&&Wt.instance&&rn&&un.current.instance.setPosition({lineNumber:0,column:0})},[nt]);function kr(){let Wt=un.current.instance;if(Wt){const ot=Wt.getSelection(),qt=un.current.pastePos||{},Sn=new Se.Range(qt.startLineNumber||ot.endLineNumber,qt.startColumn||ot.endColumn,qt.endLineNumber||ot.endLineNumber,qt.endColumn||ot.endColumn);setTimeout(()=>{Wt.executeEdits("",[{range:Sn,text:""}])},300)}}function an(Wt){(window.navigator.platform.match("Mac")?Wt.metaKey:Wt.ctrlKey)&&Wt.keyCode==83&&(Wt.preventDefault(),Ct())}const fn=()=>{if(vt&&un.current.instance){const Wt=un.current.instance.getContentHeight();On(Wt<ie?ie:Wt)}else On(ie)};function gn(Wt){var ot=document.createEvent("MouseEvents");ot.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Wt.dispatchEvent(ot)}const En=Wt=>{if(!gr.current)return;const{keyCode:ot,ctrlKey:qt,metaKey:Sn,target:jn,type:Ee}=Wt;return(Ee==="paste"||(ot===67||ot===86)&&(Sn||qt))&&jn.nodeName==="TEXTAREA"&&(Nn(),Wt.preventDefault()),!1};function $n(Wt,ot){var qt=window.URL||window.webkitURL||window,Sn=new Blob([ot]),jn=document.createElementNS("http://www.w3.org/1999/xhtml","a");jn.href=qt.createObjectURL(Sn),jn.download=Wt,gn(jn)}(0,se.useEffect)(()=>{fn()},[fn]),(0,se.useEffect)(()=>{Mn.current&&!Hn&&Promise.all([de.e(8909),de.e(5028)]).then(de.bind(de,71448)).then(Wt=>{try{Se=Wt,un.current.instance=Se.editor.create(Mn.current,{value:ee,language:Be(z),theme:me,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Gt||!1}},ne);const ot=un.current.instance;let jn=[...qe.BH._menuItems].find(mt=>mt[0]._debugName=="EditorContext")[1],Ee=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Me=(mt,_e)=>{var gt,Ut;let nn=mt._first;do _e.includes((Ut=(gt=nn.element)==null?void 0:gt.command)==null?void 0:Ut.id)&&mt._remove(nn);while(nn=nn.next)};if(Rt(ot,Se),setTimeout(()=>{fn(),un.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{$n(Ft||"educoder.txt",ot.getValue())}})},500),un.current.subscription=ot.onDidChangeModelContent(mt=>{zr.current?clearTimeout(Wr.current):(fn(),It(ot.getValue(),mt)),Wr.current=setTimeout(()=>{zr.current=!1},500)}),window.Monaco||We(Se,Be(z)),xt&&(Me(jn,Ee),Mn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",En),window.removeEventListener("paste",En),window.addEventListener("keydown",En),window.addEventListener("paste",En)),window.Monaco=Se,Oe&&ot.onDidBlurEditorWidget(()=>{Oe(ot.getValue())}),Xt&&ot.onDidFocusEditorText(()=>{xt&&Qe(),Xt(ot.getValue())}),xt){Qe();try{ot.onDidPaste(mt=>{const _e=ot.getSelection(),gt=un.current.pastePos||{},Ut=new Se.Range(gt.startLineNumber||_e.endLineNumber,gt.startColumn||_e.endColumn,gt.endLineNumber||_e.endLineNumber,gt.endColumn||_e.endColumn);ot.executeEdits("",[{range:mt.range,text:""}])})}catch(mt){}}let Mt=Rr();return Ot&&typeof Ot=="string"&&new st(Ot,ot,Se),ir(!0),()=>{const mt=un.current.instance;mt.dispose();const _e=mt.getModel();_e&&_e.dispose(),un.current.subscription&&un.current.subscription.dispose(),Mt.unobserve(Mn.current)}}catch(ot){}})},[]),(0,se.useEffect)(()=>{if(un.current.instance&&Hn)return document.addEventListener("keydown",an,!1),()=>{document.removeEventListener("keydown",an)}},[Ct,Hn]),(0,se.useEffect)(()=>{let Wt=un.current.instance;if(Wt&&Hn){let ot=Be(z);Se.editor.setModelLanguage(Wt.getModel(),ot)}},[z,Hn]),(0,se.useEffect)(()=>{un.current.instance&&Hn&&Se.editor.setTheme(me)},[me,Hn]),(0,se.useEffect)(()=>{let Wt=un.current.instance;mn.current=le,Wt&&Hn&&(Wt.updateOptions(St({},le)),setTimeout(()=>{Wt.getModel().updateOptions(St({},le))},200))},[JSON.stringify(le),Hn]),(0,se.useEffect)(()=>{let Wt=un.current.instance;Wt&&Hn&&Wt.layout()},[Xe,ie,Hn]);const[or,yr]=(0,se.useState)(He(Xe)),[Zn,On]=(0,se.useState)(He(ie)),Er=dt(St({},re),{width:or,height:Zn,position:"relative"});return se.createElement("div",{className:"my-monaco-editor",ref:Mn,style:Er},wt&&se.createElement(Ue.CopyToClipboard,{text:ee,onCopy:()=>lt.ZP.success("\u590D\u5236\u6210\u529F")},se.createElement(it.Z,{title:"\u590D\u5236\u4EE3\u7801"},se.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},se.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ct({width:ke="100%",height:Ye="100%",original:Xe,modified:ie,language:ee,options:z={}}){const re=(0,se.useRef)(),[le,ne]=(0,se.useState)(null);function me(vt){let xt;return re.current&&(xt=new et.Z(It=>{for(let Rt of It)(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&vt.layout()}),xt.observe(re.current)),xt}(0,se.useEffect)(()=>(re.current&&Promise.all([de.e(8909),de.e(9404)]).then(de.bind(de,2550)).then(vt=>{Se=vt;const xt=Se.editor.createDiffEditor(re.current,dt(St({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},z),{wordWrap:!0}));ne(xt);let It=me(xt);return()=>{xt.dispose();const Rt=xt.getModel();Rt&&Rt.dispose(),It.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,se.useEffect)(()=>{le&&le.setModel({original:Se.editor.createModel(Xe,ee),modified:Se.editor.createModel(ie,ee)})},[Xe,ie,ee,le]);const Oe=He(ke),wt=He(Ye),Ct={width:Oe,height:wt};return se.createElement("div",{className:"my-diff-editor",ref:re,style:Ct})}},17904:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return et}});var se=de(59301);function et(Fe,Ne){const ge=(0,se.useRef)();(0,se.useEffect)(()=>{ge.current=Fe}),(0,se.useEffect)(()=>{function ye(){ge.current()}if(Ne!==null){let Re=setInterval(ye,Ne);return()=>clearInterval(Re)}},[Ne])}},66427:function(At,Bt,de){"use strict";de.r(Bt),de.d(Bt,{default:function(){return xe}});var se=de(59301),et=de(93041),Fe=de(24404),Ne=de(6767),ge=de(62957),ye=de(37639),Re=de(90524),Ge={flex_box_center:"flex_box_center___GfbI9",flex_space_between:"flex_space_between___m14JJ",flex_box_vertical_center:"flex_box_vertical_center___IKGDg",flex_box_center_end:"flex_box_center_end___JZxvM",flex_box_column:"flex_box_column___WnVa8",SubMentItem:"SubMentItem___P0LXo",MenuItem:"MenuItem___p91mQ",wrp:"wrp___kMQ4i",classroomInfo:"classroomInfo___rb1qC",title:"title___AQndp",titleLeft:"titleLeft___K7c9u",titleRight:"titleRight___BUODH",classroomUser:"classroomUser___NkYxe",headPic:"headPic___RD_it",teacherInfo:"teacherInfo___Gyj_W",classroomDesc:"classroomDesc___ng_AB",classroomDescBg:"classroomDescBg___Dz_DM",joinCouses:"joinCouses___U2D0G",bg:"bg___IcypX",leftMenus:"leftMenus___fF5qD",titleSelected:"titleSelected___Rqtd8",menuText:"menuText___jhrfq",totalCount:"totalCount___fqkbl",actions:"actions___NAYZl",task_count:"task_count___a1sYB",container:"container___djeCS",leftMenuActions:"leftMenuActions___lRhBF"},we=de(82093),fe=de(76560),$e=de(87169),ve=de(43531),rt=de(34055),We=de(37568),Te=(Be,Se,Qe)=>new Promise((Ve,ct)=>{var ke=ie=>{try{Xe(Qe.next(ie))}catch(ee){ct(ee)}},Ye=ie=>{try{Xe(Qe.throw(ie))}catch(ee){ct(ee)}},Xe=ie=>ie.done?Ve(ie.value):Promise.resolve(ie.value).then(ke,Ye);Xe((Qe=Qe.apply(Be,Se)).next())});function Pe({user:Be,CategoryId:Se,IsShow:Qe,setIsShow:Ve,dispatch:ct,init:ke}){const[Ye,Xe]=(0,se.useState)();return se.createElement(ge.default,{title:Se?"\u65B0\u5EFA\u4E09\u7EA7\u7C7B\u76EE":"\u65B0\u5EFA\u4E8C\u7EA7\u7C7B\u76EE",width:424,onCancel:()=>{Ve(!1)},onOk:()=>Te(this,null,function*(){if(!Ye){Ne.ZP.error("\u680F\u76EE\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}(yield(0,we.ZP)("/api/programas.json",{method:"post",body:{name:Ye,parent_id:Se}})).status===0&&(Ne.ZP.info("\u521B\u5EFA\u6210\u529F"),Ve(!1),Xe(""),ke())}),open:Qe},se.createElement(We.default,{value:Ye,onChange:ie=>Xe(ie.target.value),placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC710\u4E2A\u6C49\u5B57\u7684\u540D\u79F0",maxLength:10}))}var De=(0,fe.connect)(({user:Be})=>({user:Be}))(Pe),tt=(Be,Se,Qe)=>new Promise((Ve,ct)=>{var ke=ie=>{try{Xe(Qe.next(ie))}catch(ee){ct(ee)}},Ye=ie=>{try{Xe(Qe.throw(ie))}catch(ee){ct(ee)}},Xe=ie=>ie.done?Ve(ie.value):Promise.resolve(ie.value).then(ke,Ye);Xe((Qe=Qe.apply(Be,Se)).next())});function at({user:Be,CategoryId:Se,name:Qe,IsShow:Ve,setIsShow:ct,dispatch:ke,init:Ye}){const[Xe,ie]=(0,se.useState)();return(0,se.useEffect)(()=>{ie(Qe)},[Qe]),se.createElement(ge.default,{title:"\u76EE\u5F55\u91CD\u547D\u540D",width:424,onCancel:()=>{ct(!1)},onOk:()=>tt(this,null,function*(){if(!Xe){Ne.ZP.error("\u680F\u76EE\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}(yield(0,we.ZP)(`/api/programas/${Se}/rename.json`,{method:"put",body:{name:Xe,id:Se}})).status===0&&(Ne.ZP.info("\u4FEE\u6539\u6210\u529F"),ct(!1),ie(""),Ye())}),open:Ve},se.createElement(We.default,{value:Xe,onChange:ee=>ie(ee.target.value),placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC710\u4E2A\u6C49\u5B57\u7684\u540D\u79F0",maxLength:10}))}var ht=(0,fe.connect)(({user:Be})=>({user:Be}))(at),st=de(99571),qe=de(38394);function lt({user:Be,ItemData:Se,setIssee:Qe,dispatch:Ve,init:ct}){var ke,Ye,Xe,ie;return se.createElement("div",null,se.createElement("div",{style:{textAlign:"right"}},(0,rt.Ny)()&&se.createElement(st.ZP,{onClick:()=>Qe(!1)},"\u7F16\u8F91")),se.createElement(qe.Z,{value:Se.content}),((ke=Se==null?void 0:Se.attachment)==null?void 0:ke.id)&&se.createElement("div",null,se.createElement("a",{href:(Ye=Se==null?void 0:Se.attachment)==null?void 0:Ye.url,target:"_self",download:(Xe=Se==null?void 0:Se.attachment)==null?void 0:Xe.title},se.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),se.createElement("span",{style:{color:"#000000"}},(ie=Se==null?void 0:Se.attachment)==null?void 0:ie.title))))}var it=(0,fe.connect)(({user:Be})=>({user:Be}))(lt),Zt=de(14566),Je=de(2978),Ue=de(65906),bt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,ze=(Be,Se,Qe)=>Se in Be?bt(Be,Se,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Be[Se]=Qe,Pt=(Be,Se)=>{for(var Qe in Se||(Se={}))Ze.call(Se,Qe)&&ze(Be,Qe,Se[Qe]);if(Ae)for(var Qe of Ae(Se))Le.call(Se,Qe)&&ze(Be,Qe,Se[Qe]);return Be},pt=(Be,Se,Qe)=>new Promise((Ve,ct)=>{var ke=ie=>{try{Xe(Qe.next(ie))}catch(ee){ct(ee)}},Ye=ie=>{try{Xe(Qe.throw(ie))}catch(ee){ct(ee)}},Xe=ie=>ie.done?Ve(ie.value):Promise.resolve(ie.value).then(ke,Ye);Xe((Qe=Qe.apply(Be,Se)).next())});function St({user:Be,ItemData:Se,setIssee:Qe,CategoryId:Ve,dispatch:ct,init:ke}){let[Ye,Xe]=(0,se.useState)([]);const[ie,ee]=(0,se.useState)(Se.content);function z(){var me;let Oe=[];return(me=Se==null?void 0:Se.attachments)==null||me.map(wt=>{let Ct={uid:wt==null?void 0:wt.id,name:wt.title,response:{id:wt.id}};Oe.push(Ct)}),Oe}const re={name:"file",multiple:!0,action:Re.Z.API_SERVER+"/api/attachments.json",defaultFileList:z(),onRemove(me){(0,Ue.y8)({id:me.uid})},onChange(me){console.log("info",me);const{status:Oe}=me.file;Oe==="removed"&&Xe(me.fileList),Oe==="done"?(Xe(me.fileList),Ne.ZP.success(`${me.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`)):Oe==="error"&&Ne.ZP.error(`${me.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:me=>{const Oe=me.size/1024/1024<150;return Oe||Ne.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Oe}};function le(){return pt(this,null,function*(){(yield(0,we.ZP)(`/api/programas/${Ve}/update_content.json`,{method:"put",body:{id:Ve,content:ie,attachment_id:ne(Ye)}}))&&(Ne.ZP.info("\u63D0\u4EA4\u6210\u529F"),Qe(!0))})}function ne(me){let Oe;return me&&me.map(wt=>{Oe=wt.response.id}),Oe}return se.createElement("div",null,se.createElement(Je.Z,{defaultValue:ie,onChange:me=>ee(me)}),se.createElement(Zt.default,Pt({},re),se.createElement(st.ZP,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),se.createElement("p",{style:{marginTop:"10px"}},se.createElement(st.ZP,{style:{width:"90px"},onClick:()=>le()},"\u63D0\u4EA4"),se.createElement(st.ZP,{style:{marginLeft:"30px",width:"90px"},type:"primary",onClick:()=>Qe(!0)},"\u53D6\u6D88")))}var dt=(0,fe.connect)(({user:Be})=>({user:Be}))(St),pe=(Be,Se,Qe)=>new Promise((Ve,ct)=>{var ke=ie=>{try{Xe(Qe.next(ie))}catch(ee){ct(ee)}},Ye=ie=>{try{Xe(Qe.throw(ie))}catch(ee){ct(ee)}},Xe=ie=>ie.done?Ve(ie.value):Promise.resolve(ie.value).then(ke,Ye);Xe((Qe=Qe.apply(Be,Se)).next())});const{SubMenu:ce}=et.default,{Content:He,Sider:ft}=Fe.default;function ut({user:Be,dispatch:Se,globalSetting:Qe}){var Ve;const[ct,ke]=(0,se.useState)(),[Ye,Xe]=(0,se.useState)(!1),[ie,ee]=(0,se.useState)();let[z,re]=(0,se.useState)();const[le,ne]=(0,se.useState)(!1),[me,Oe]=(0,se.useState)(""),[wt,Ct]=(0,se.useState)(""),[vt,xt]=(0,se.useState)(!0);(0,se.useEffect)(()=>{It()},[]),console.log("globalSetting",Qe);function It(){return pe(this,null,function*(){const Ft=yield(0,we.ZP)("/api/programas.json",{method:"get"});Ft&&ee(Ft==null?void 0:Ft.programas)})}const Rt=(Ft,kt,Qt)=>pe(this,null,function*(){switch(Ft){case 1:re(kt==null?void 0:kt.id),Xe(!0);break;case 2:re(kt==null?void 0:kt.id),ne(!0),Oe(kt==null?void 0:kt.name);break;case 3:(yield(0,we.ZP)(`/api/programas/${kt==null?void 0:kt.id}/top.json`,{method:"post",body:{id:kt==null?void 0:kt.id}})).status===0&&It();break;case 4:Xt(se.createElement("p",null,"\u5220\u9664\u4E4B\u540E\u4E0D\u80FD\u6062\u590D,",se.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),()=>pe(this,null,function*(){(yield(0,we.ZP)(`/api/programas/${kt==null?void 0:kt.id}.json`,{method:"delete",body:{id:kt==null?void 0:kt.id}})).status===0&&(Ne.ZP.info("\u5220\u9664\u6210\u529F"),It())}));break}}),Xt=(Ft,kt)=>{ge.default.confirm({centered:!0,title:"\u63D0\u793A",icon:se.createElement($e.Z,null),content:Ft,okText:"\u786E\u8BA4",onOk:()=>kt(),cancelText:"\u53D6\u6D88"})},Jt=(Ft,kt)=>se.createElement("div",{className:Ge.leftMenuActions},kt===1&&se.createElement("p",{className:"current",onClick:()=>Rt(1,Ft,kt)},"\u65B0\u5EFA"),se.createElement("p",{className:"current",onClick:()=>Rt(2,Ft,kt)},"\u91CD\u547D\u540D"),se.createElement("p",{className:"current",onClick:()=>Rt(3,Ft,kt)},"\u7F6E\u9876"),se.createElement("p",{className:"current",onClick:()=>Rt(4,Ft,kt)},"\u5220\u9664"));function Et(){return pe(this,null,function*(){const Ft=yield(0,we.ZP)(`/api/programas/${z}/content.json`,{method:"get",params:{id:z}});Ft&&Ct(Ft)})}return se.createElement("div",{style:{marginBottom:"40px"}},se.createElement("img",{style:{width:"100%"},src:Re.Z.IMG_SERVER+`/${(Ve=Qe==null?void 0:Qe.setting)==null?void 0:Ve.shixun_banner_url}`}),se.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},se.createElement(ft,{width:244,className:Ge.leftMenus,style:{background:"none",marginTop:"20px",height:"auto"}},se.createElement(et.default,{mode:"inline"},ie==null?void 0:ie.map((Ft,kt)=>{var Qt,nt;return(Ft==null?void 0:Ft.children.length)>0?se.createElement(ce,{title:se.createElement("span",{className:"font16"},se.createElement("span",null,Ft.name),!(0,rt.Ny)()&&se.createElement("span",null),(0,rt.Ny)()&&se.createElement(ye.Z,{placement:"right",content:()=>Jt(Ft,1),trigger:"hover"},se.createElement("span",{className:["iconfont icon-sandian",Ge.actions].join(" ")})))},(Qt=Ft==null?void 0:Ft.children)==null?void 0:Qt.map((rn,Ot)=>{var Gt;return se.createElement(et.default.Item,{className:(Gt=Ge)==null?void 0:Gt.SubMentItem,onClick:()=>{re(rn==null?void 0:rn.id),z=rn==null?void 0:rn.id,Et()}},se.createElement("span",{style:{flex:"1"}},rn==null?void 0:rn.name),(0,rt.Ny)()&&se.createElement(ye.Z,{placement:"right",content:()=>Jt(rn,2),trigger:"hover"},se.createElement("span",{className:["iconfont icon-sandian",Ge.actions].join(" ")})))})):se.createElement(et.default.Item,{className:(nt=Ge)==null?void 0:nt.SubMentItem,onClick:()=>{re(Ft==null?void 0:Ft.id),z=Ft==null?void 0:Ft.id,Et()}},se.createElement("span",{style:{flex:"1"}},Ft==null?void 0:Ft.name),(0,rt.Ny)()&&se.createElement(ye.Z,{placement:"right",content:()=>Jt(Ft,1),trigger:"hover"},se.createElement("span",{className:["iconfont icon-sandian",Ge.actions].join(" ")})))}),se.createElement(et.default.Item,{onClick:()=>{re(""),z="",Xe(!0)},style:{color:"#0152d9",fontSize:"16px",height:"40px",display:"flex",alignItems:"center"},icon:se.createElement(ve.Z,{style:{color:"#0152d9",fontSize:"16px"}})},"\u65B0\u589E\u4E8C\u7EA7\u7C7B\u76EE"))),se.createElement("div",{style:{width:"937px",marginLeft:"17px",background:"#fff",padding:"20px"}},vt&&se.createElement(it,{ItemData:wt,setIssee:xt}),vt===!1&&se.createElement(dt,{ItemData:wt,setIssee:xt,CategoryId:z}))),se.createElement(De,{CategoryId:z,IsShow:Ye,setIsShow:Xe,init:It}),se.createElement(ht,{CategoryId:z,name:me,IsShow:le,setIsShow:ne,init:It}))}var xe=(0,fe.connect)(({user:Be,globalSetting:Se})=>({user:Be,globalSetting:Se}))(ut)},90290:function(At,Bt,de){"use strict";de.d(Bt,{AL:function(){return st},Iy:function(){return $e},Qv:function(){return We},ez:function(){return ht},jb:function(){return ve}});var se=de(32834),et=de.n(se),Fe=de(11690),Ne=de.n(Fe);let ge=1;function ye(Je,Ue){const bt=Je.match(/^(\s+)(?:```)/);if(bt===null)return Ue;const Ae=bt[1];return Ue.split(`
`).map(Ze=>{const Le=Ze.match(/^\s+/);if(Le===null)return Ze;const[ze]=Le;return ze.length>=Ae.length?Ze.slice(Ae.length):Ze}).join(`
`)}let Re=[],Ge=["<ul>"];const we=new(et()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function $e(){Re.length=0,Ge=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function rt(Je,Ue,bt,Ae){if(Ue>=Je.length||Je[Ue].level<=bt)return Ue;var Ze=Je[Ue];Ae.push("<li><a href='#"+ge+Ze.anchor+"'>"+Ze.text+"</a>"),Ue++;var Le=[];return Ue=rt(Je,Ue,Ze.level,Le),Le.length>0&&(Ae.push("<ul>"),Le.forEach(function(ze){Ae.push(ze)}),Ae.push("</ul>")),Ae.push("</li>"),Ue=rt(Je,Ue,bt,Ae),Ue}function We(){return rt(Re,0,0,Ge),Ge.push("</ul>"),Ge.join("")}const Te={heading(Je){const Ue=fe.exec(Je);if(ge+=1,Ue)return{type:"heading",raw:Ue[0],depth:Ue[1].length,text:Ue[2]}},fences(Je){const Ue=this.rules.block.fences.exec(Je);if(Ue){const bt=Ue[0];let Ae=ye(bt,Ue[3]||"");const Ze=Ue[2]?Ue[2].trim():Ue[2];if(["latex","katex","math"].indexOf(Ze)>=0){const Le=tt(),ze=Ae;Ae=Le,at[Le]={type:"block",expression:ze}}return{type:"code",raw:bt,lang:Ze,text:Ae}}}},Pe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const tt=()=>`__special_katext_id_${De++}__`;let at={};function ht(){return at}function st(){De=0,at={}}function qe(Je){return Je=Je.replace(Pe,(Ue,bt)=>{const Ae=tt();return at[Ae]={type:"inline",expression:bt},Ae}),Je}const lt=we.listitem;we.listitem=function(Je){return lt(qe(Je))};const it=we.paragraph;we.paragraph=function(Je){return it(qe(Je))};const Zt=we.tablecell;we.tablecell=function(Je,Ue){return Zt(qe(Je),Ue)},we.code=function(Je,Ue,bt){const Ae=(Ue||"").match(/\S*/)[0];return Ae?["latex","katex","math"].indexOf(Ae)>=0?`<p class='editormd-tex'>${Je}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ue}">${bt?Je:(0,Fe.escape)(Je,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(bt?Je:(0,Fe.escape)(Je,!0))+"</code></pre>"},we.heading=function(Je,Ue,bt){let Ae=this.options.headerPrefix+bt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Re.push({anchor:Ae,level:Ue,text:Je}),"<h"+Ue+' id="'+ge+Ae+'">'+Je+"</h"+Ue+">"},et().setOptions({silent:!0,gfm:!0,pedantic:!1}),et().use({tokenizer:Te,renderer:we}),Bt.ZP=et()},99498:function(At,Bt,de){(function(se){se(de(89780))})(function(se){se.defineOption("placeholder","",function(Ge,we,fe){var $e=fe&&fe!=se.Init;if(we&&!$e)Ge.on("blur",ge),Ge.on("change",ye),Ge.on("swapDoc",ye),se.on(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose=function(){Ne(Ge)}),ye(Ge);else if(!we&&$e){Ge.off("blur",ge),Ge.off("change",ye),Ge.off("swapDoc",ye),se.off(Ge.getInputField(),"compositionupdate",Ge.state.placeholderCompose),et(Ge);var ve=Ge.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}we&&!Ge.hasFocus()&&ge(Ge)});function et(Ge){Ge.state.placeholder&&(Ge.state.placeholder.parentNode.removeChild(Ge.state.placeholder),Ge.state.placeholder=null)}function Fe(Ge){et(Ge);var we=Ge.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Ge.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ge.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),we.appendChild(fe),Ge.display.lineSpace.insertBefore(we,Ge.display.lineSpace.firstChild)}function Ne(Ge){setTimeout(function(){var we=!1,fe=Ge.getInputField();fe.nodeName=="TEXTAREA"?we=!fe.value:Ge.lineCount()==1&&(we=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),we?Fe(Ge):et(Ge)},20)}function ge(Ge){Re(Ge)&&Fe(Ge)}function ye(Ge){var we=Ge.getWrapperElement(),fe=Re(Ge);we.className=we.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?Fe(Ge):et(Ge)}function Re(Ge){return Ge.lineCount()===1&&Ge.getLine(0)===""}})},25717:function(At,Bt,de){(function(se){se(de(89780))})(function(se){var et={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Fe=se.Pos;se.defineOption("autoCloseBrackets",!1,function(Te,Pe,De){De&&De!=se.Init&&(Te.removeKeyMap(ge),Te.state.closeBrackets=null),Pe&&(ye(Ne(Pe,"pairs")),Te.state.closeBrackets=Pe,Te.addKeyMap(ge))});function Ne(Te,Pe){return Pe=="pairs"&&typeof Te=="string"?Te:typeof Te=="object"&&Te[Pe]!=null?Te[Pe]:et[Pe]}var ge={Backspace:we,Enter:fe};function ye(Te){for(var Pe=0;Pe<Te.length;Pe++){var De=Te.charAt(Pe),tt="'"+De+"'";ge[tt]||(ge[tt]=Re(De))}}ye(et.pairs+"`");function Re(Te){return function(Pe){return ve(Pe,Te)}}function Ge(Te){var Pe=Te.state.closeBrackets;if(!Pe||Pe.override)return Pe;var De=Te.getModeAt(Te.getCursor());return De.closeBrackets||Pe}function we(Te){var Pe=Ge(Te);if(!Pe||Te.getOption("disableInput"))return se.Pass;for(var De=Ne(Pe,"pairs"),tt=Te.listSelections(),at=0;at<tt.length;at++){if(!tt[at].empty())return se.Pass;var ht=rt(Te,tt[at].head);if(!ht||De.indexOf(ht)%2!=0)return se.Pass}for(var at=tt.length-1;at>=0;at--){var st=tt[at].head;Te.replaceRange("",Fe(st.line,st.ch-1),Fe(st.line,st.ch+1),"+delete")}}function fe(Te){var Pe=Ge(Te),De=Pe&&Ne(Pe,"explode");if(!De||Te.getOption("disableInput"))return se.Pass;for(var tt=Te.listSelections(),at=0;at<tt.length;at++){if(!tt[at].empty())return se.Pass;var ht=rt(Te,tt[at].head);if(!ht||De.indexOf(ht)%2!=0)return se.Pass}Te.operation(function(){var st=Te.lineSeparator()||`
`;Te.replaceSelection(st+st,null),Te.execCommand("goCharLeft"),tt=Te.listSelections();for(var qe=0;qe<tt.length;qe++){var lt=tt[qe].head.line;Te.indentLine(lt,null,!0),Te.indentLine(lt+1,null,!0)}})}function $e(Te){var Pe=se.cmpPos(Te.anchor,Te.head)>0;return{anchor:new Fe(Te.anchor.line,Te.anchor.ch+(Pe?-1:1)),head:new Fe(Te.head.line,Te.head.ch+(Pe?1:-1))}}function ve(Te,Pe){var De=Ge(Te);if(!De||Te.getOption("disableInput"))return se.Pass;var tt=Ne(De,"pairs"),at=tt.indexOf(Pe);if(at==-1)return se.Pass;for(var ht=Ne(De,"closeBefore"),st=Ne(De,"triples"),qe=tt.charAt(at+1)==Pe,lt=Te.listSelections(),it=at%2==0,Zt,Je=0;Je<lt.length;Je++){var Ue=lt[Je],bt=Ue.head,Ae,Ze=Te.getRange(bt,Fe(bt.line,bt.ch+1));if(it&&!Ue.empty())Ae="surround";else if((qe||!it)&&Ze==Pe)qe&&We(Te,bt)?Ae="both":st.indexOf(Pe)>=0&&Te.getRange(bt,Fe(bt.line,bt.ch+3))==Pe+Pe+Pe?Ae="skipThree":Ae="skip";else if(qe&&bt.ch>1&&st.indexOf(Pe)>=0&&Te.getRange(Fe(bt.line,bt.ch-2),bt)==Pe+Pe){if(bt.ch>2&&/\bstring/.test(Te.getTokenTypeAt(Fe(bt.line,bt.ch-2))))return se.Pass;Ae="addFour"}else if(qe){var Le=bt.ch==0?" ":Te.getRange(Fe(bt.line,bt.ch-1),bt);if(!se.isWordChar(Ze)&&Le!=Pe&&!se.isWordChar(Le))Ae="both";else return se.Pass}else if(it&&(Ze.length===0||/\s/.test(Ze)||ht.indexOf(Ze)>-1))Ae="both";else return se.Pass;if(!Zt)Zt=Ae;else if(Zt!=Ae)return se.Pass}var ze=at%2?tt.charAt(at-1):Pe,Pt=at%2?Pe:tt.charAt(at+1);Te.operation(function(){if(Zt=="skip")Te.execCommand("goCharRight");else if(Zt=="skipThree")for(var pt=0;pt<3;pt++)Te.execCommand("goCharRight");else if(Zt=="surround"){for(var St=Te.getSelections(),pt=0;pt<St.length;pt++)St[pt]=ze+St[pt]+Pt;Te.replaceSelections(St,"around"),St=Te.listSelections().slice();for(var pt=0;pt<St.length;pt++)St[pt]=$e(St[pt]);Te.setSelections(St)}else Zt=="both"?(Te.replaceSelection(ze+Pt,null),Te.triggerElectric(ze+Pt),Te.execCommand("goCharLeft")):Zt=="addFour"&&(Te.replaceSelection(ze+ze+ze+ze,"before"),Te.execCommand("goCharRight"))})}function rt(Te,Pe){var De=Te.getRange(Fe(Pe.line,Pe.ch-1),Fe(Pe.line,Pe.ch+1));return De.length==2?De:null}function We(Te,Pe){var De=Te.getTokenAt(Fe(Pe.line,Pe.ch+1));return/\bstring/.test(De.type)&&De.start==Pe.ch&&(Pe.ch==0||!/\bstring/.test(Te.getTokenTypeAt(Pe)))}})},6313:function(At,Bt,de){(function(se){se(de(89780),de(52730))})(function(se){se.defineOption("autoCloseTags",!1,function(we,fe,$e){if($e!=se.Init&&$e&&we.removeKeyMap("autoCloseTags"),!!fe){var ve={name:"autoCloseTags"};(typeof fe!="object"||fe.whenClosing!==!1)&&(ve["'/'"]=function(rt){return ye(rt)}),(typeof fe!="object"||fe.whenOpening!==!1)&&(ve["'>'"]=function(rt){return Ne(rt)}),we.addKeyMap(ve)}});var et=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Fe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ne(we){if(we.getOption("disableInput"))return se.Pass;for(var fe=we.listSelections(),$e=[],ve=we.getOption("autoCloseTags"),rt=0;rt<fe.length;rt++){if(!fe[rt].empty())return se.Pass;var We=fe[rt].head,Te=we.getTokenAt(We),Pe=se.innerMode(we.getMode(),Te.state),De=Pe.state,tt=Pe.mode.xmlCurrentTag&&Pe.mode.xmlCurrentTag(De),at=tt&&tt.name;if(!at)return se.Pass;var ht=Pe.mode.configuration=="html",st=typeof ve=="object"&&ve.dontCloseTags||ht&&et,qe=typeof ve=="object"&&ve.indentTags||ht&&Fe;Te.end>We.ch&&(at=at.slice(0,at.length-Te.end+We.ch));var lt=at.toLowerCase();if(!at||Te.type=="string"&&(Te.end!=We.ch||!/[\"\']/.test(Te.string.charAt(Te.string.length-1))||Te.string.length==1)||Te.type=="tag"&&tt.close||Te.string.indexOf("/")==We.ch-Te.start-1||st&&Re(st,lt)>-1||Ge(we,Pe.mode.xmlCurrentContext&&Pe.mode.xmlCurrentContext(De)||[],at,We,!0))return se.Pass;var it=typeof ve=="object"&&ve.emptyTags;if(it&&Re(it,at)>-1){$e[rt]={text:"/>",newPos:se.Pos(We.line,We.ch+2)};continue}var Zt=qe&&Re(qe,lt)>-1;$e[rt]={indent:Zt,text:">"+(Zt?`
`:"")+"</"+at+">",newPos:Zt?se.Pos(We.line+1,0):se.Pos(We.line,We.ch+1)}}for(var Je=typeof ve=="object"&&ve.dontIndentOnAutoClose,rt=fe.length-1;rt>=0;rt--){var Ue=$e[rt];we.replaceRange(Ue.text,fe[rt].head,fe[rt].anchor,"+insert");var bt=we.listSelections().slice(0);bt[rt]={head:Ue.newPos,anchor:Ue.newPos},we.setSelections(bt),!Je&&Ue.indent&&(we.indentLine(Ue.newPos.line,null,!0),we.indentLine(Ue.newPos.line+1,null,!0))}}function ge(we,fe){for(var $e=we.listSelections(),ve=[],rt=fe?"/":"</",We=we.getOption("autoCloseTags"),Te=typeof We=="object"&&We.dontIndentOnSlash,Pe=0;Pe<$e.length;Pe++){if(!$e[Pe].empty())return se.Pass;var De=$e[Pe].head,tt=we.getTokenAt(De),at=se.innerMode(we.getMode(),tt.state),ht=at.state;if(fe&&(tt.type=="string"||tt.string.charAt(0)!="<"||tt.start!=De.ch-1))return se.Pass;var st,qe=at.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(qe&&at.mode.name=="javascript")st=rt+"script";else if(qe&&at.mode.name=="css")st=rt+"style";else{var lt=at.mode.xmlCurrentContext&&at.mode.xmlCurrentContext(ht);if(!lt||lt.length&&Ge(we,lt,lt[lt.length-1],De))return se.Pass;st=rt+lt[lt.length-1]}we.getLine(De.line).charAt(tt.end)!=">"&&(st+=">"),ve[Pe]=st}if(we.replaceSelections(ve),$e=we.listSelections(),!Te)for(var Pe=0;Pe<$e.length;Pe++)(Pe==$e.length-1||$e[Pe].head.line<$e[Pe+1].head.line)&&we.indentLine($e[Pe].head.line)}function ye(we){return we.getOption("disableInput")?se.Pass:ge(we,!0)}se.commands.closeTag=function(we){return ge(we)};function Re(we,fe){if(we.indexOf)return we.indexOf(fe);for(var $e=0,ve=we.length;$e<ve;++$e)if(we[$e]==fe)return $e;return-1}function Ge(we,fe,$e,ve,rt){if(!se.scanForClosingTag)return!1;var We=Math.min(we.lastLine()+1,ve.line+500),Te=se.scanForClosingTag(we,ve,null,We);if(!Te||Te.tag!=$e)return!1;for(var Pe=rt?1:0,De=fe.length-1;De>=0&&fe[De]==$e;De--)++Pe;ve=Te.to;for(var De=1;De<Pe;De++){var tt=se.scanForClosingTag(we,ve,null,We);if(!tt||tt.tag!=$e)return!1;ve=tt.to}return!0}})},52730:function(At,Bt,de){(function(se){se(de(89780))})(function(se){"use strict";var et=se.Pos;function Fe(De,tt){return De.line-tt.line||De.ch-tt.ch}var Ne="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ge=Ne+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ye=new RegExp("<(/?)(["+Ne+"]["+ge+"]*)","g");function Re(De,tt,at,ht){this.line=tt,this.ch=at,this.cm=De,this.text=De.getLine(tt),this.min=ht?Math.max(ht.from,De.firstLine()):De.firstLine(),this.max=ht?Math.min(ht.to-1,De.lastLine()):De.lastLine()}function Ge(De,tt){var at=De.cm.getTokenTypeAt(et(De.line,tt));return at&&/\btag\b/.test(at)}function we(De){if(!(De.line>=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function fe(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function $e(De){for(;;){var tt=De.text.indexOf(">",De.ch);if(tt==-1){if(we(De))continue;return}if(!Ge(De,tt+1)){De.ch=tt+1;continue}var at=De.text.lastIndexOf("/",tt),ht=at>-1&&!/\S/.test(De.text.slice(at+1,tt));return De.ch=tt+1,ht?"selfClose":"regular"}}function ve(De){for(;;){var tt=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if(tt==-1){if(fe(De))continue;return}if(!Ge(De,tt+1)){De.ch=tt;continue}ye.lastIndex=tt,De.ch=tt;var at=ye.exec(De.text);if(at&&at.index==tt)return at}}function rt(De){for(;;){ye.lastIndex=De.ch;var tt=ye.exec(De.text);if(!tt){if(we(De))continue;return}if(!Ge(De,tt.index+1)){De.ch=tt.index+1;continue}return De.ch=tt.index+tt[0].length,tt}}function We(De){for(;;){var tt=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if(tt==-1){if(fe(De))continue;return}if(!Ge(De,tt+1)){De.ch=tt;continue}var at=De.text.lastIndexOf("/",tt),ht=at>-1&&!/\S/.test(De.text.slice(at+1,tt));return De.ch=tt+1,ht?"selfClose":"regular"}}function Te(De,tt){for(var at=[];;){var ht=rt(De),st,qe=De.line,lt=De.ch-(ht?ht[0].length:0);if(!ht||!(st=$e(De)))return;if(st!="selfClose")if(ht[1]){for(var it=at.length-1;it>=0;--it)if(at[it]==ht[2]){at.length=it;break}if(it<0&&(!tt||tt==ht[2]))return{tag:ht[2],from:et(qe,lt),to:et(De.line,De.ch)}}else at.push(ht[2])}}function Pe(De,tt){for(var at=[];;){var ht=We(De);if(!ht)return;if(ht=="selfClose"){ve(De);continue}var st=De.line,qe=De.ch,lt=ve(De);if(!lt)return;if(lt[1])at.push(lt[2]);else{for(var it=at.length-1;it>=0;--it)if(at[it]==lt[2]){at.length=it;break}if(it<0&&(!tt||tt==lt[2]))return{tag:lt[2],from:et(De.line,De.ch),to:et(st,qe)}}}}se.registerHelper("fold","xml",function(De,tt){for(var at=new Re(De,tt.line,0);;){var ht=rt(at);if(!ht||at.line!=tt.line)return;var st=$e(at);if(!st)return;if(!ht[1]&&st!="selfClose"){var qe=et(at.line,at.ch),lt=Te(at,ht[2]);return lt&&Fe(lt.from,qe)>0?{from:qe,to:lt.from}:null}}}),se.findMatchingTag=function(De,tt,at){var ht=new Re(De,tt.line,tt.ch,at);if(!(ht.text.indexOf(">")==-1&&ht.text.indexOf("<")==-1)){var st=$e(ht),qe=st&&et(ht.line,ht.ch),lt=st&&ve(ht);if(!(!st||!lt||Fe(ht,tt)>0)){var it={from:et(ht.line,ht.ch),to:qe,tag:lt[2]};return st=="selfClose"?{open:it,close:null,at:"open"}:lt[1]?{open:Pe(ht,lt[2]),close:it,at:"close"}:(ht=new Re(De,qe.line,qe.ch,at),{open:it,close:Te(ht,lt[2]),at:"open"})}}},se.findEnclosingTag=function(De,tt,at,ht){for(var st=new Re(De,tt.line,tt.ch,at);;){var qe=Pe(st,ht);if(!qe)break;var lt=new Re(De,tt.line,tt.ch,at),it=Te(lt,qe.tag);if(it)return{open:qe,close:it}}},se.scanForClosingTag=function(De,tt,at,ht){var st=new Re(De,tt.line,tt.ch,ht?{from:0,to:ht}:null);return Te(st,at)}})},89780:function(At){(function(Bt,de){At.exports=de()})(this,function(){"use strict";var Bt=navigator.userAgent,de=navigator.platform,se=/gecko\/\d/i.test(Bt),et=/MSIE \d/.test(Bt),Fe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bt),Ne=/Edge\/(\d+)/.exec(Bt),ge=et||Fe||Ne,ye=ge&&(et?document.documentMode||6:+(Ne||Fe)[1]),Re=!Ne&&/WebKit\//.test(Bt),Ge=Re&&/Qt\/\d+\.\d+/.test(Bt),we=!Ne&&/Chrome\//.test(Bt),fe=/Opera\//.test(Bt),$e=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Bt),rt=/PhantomJS/.test(Bt),We=!Ne&&/AppleWebKit/.test(Bt)&&/Mobile\/\w+/.test(Bt),Te=/Android/.test(Bt),Pe=We||Te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Bt),De=We||/Mac/.test(de),tt=/\bCrOS\b/.test(Bt),at=/win/i.test(de),ht=fe&&Bt.match(/Version\/(\d*\.\d*)/);ht&&(ht=Number(ht[1])),ht&&ht>=15&&(fe=!1,Re=!0);var st=De&&(Ge||fe&&(ht==null||ht<12.11)),qe=se||ge&&ye>=9;function lt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var it=function(a,y){var x=a.className,b=lt(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 Zt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Je(a,y){return Zt(a).appendChild(y)}function Ue(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 bt(a,y,x,b){var E=Ue(a,y,x,b);return E.setAttribute("role","presentation"),E}var Ae;document.createRange?Ae=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Ae=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 Ze(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 Le(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function ze(a,y){var x=a.className;lt(y).test(x)||(a.className+=(x?" ":"")+y)}function Pt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!lt(x[b]).test(y)&&(y+=" "+x[b]);return y}var pt=function(a){a.select()};We?pt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:ge&&(pt=function(a){try{a.select()}catch(y){}});function St(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function dt(a,y,x){y||(y={});for(var b in a)a.hasOwnProperty(b)&&(x!==!1||!y.hasOwnProperty(b))&&(y[b]=a[b]);return y}function pe(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var te=b||0,oe=E||0;;){var ae=a.indexOf(" ",te);if(ae<0||ae>=y)return oe+(y-te);oe+=ae-te,oe+=x-oe%x,te=ae+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=St(this.onTimeout,this)};ce.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ce.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=x)};function He(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var ft=50,ut={toString:function(){return"CodeMirror.Pass"}},xe={scroll:!1},Be={origin:"*mouse"},Se={origin:"+move"};function Qe(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 Ve=[""];function ct(a){for(;Ve.length<=a;)Ve.push(ke(Ve)+" ");return Ve[a]}function ke(a){return a[a.length-1]}function Ye(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function Xe(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 le(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 me=/[\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 Oe(a){return a.charCodeAt(0)>=768&&me.test(a)}function wt(a,y,x){for(;(x<0?y>0:y<a.length)&&Oe(a.charAt(y));)y+=x;return y}function Ct(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 vt(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 xt=null;function It(a,y,x){var b;xt=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:xt=E),te.from==y&&(te.from!=te.to&&x!="before"?b=E:xt=E)}return b!=null?b:xt}var Rt=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]/,ae=/[1n]/;function ue(he,be,Ce){this.level=he,this.from=be,this.to=Ce}return function(he,be){var Ce=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var Ke=he.length,je=[],yt=0;yt<Ke;++yt)je.push(x(he.charCodeAt(yt)));for(var Lt=0,zt=Ce;Lt<Ke;++Lt){var en=je[Lt];en=="m"?je[Lt]=zt:zt=en}for(var ln=0,tn=Ce;ln<Ke;++ln){var dn=je[ln];dn=="1"&&tn=="r"?je[ln]="n":te.test(dn)&&(tn=dn,dn=="r"&&(je[ln]="R"))}for(var Cn=1,vn=je[0];Cn<Ke-1;++Cn){var Gn=je[Cn];Gn=="+"&&vn=="1"&&je[Cn+1]=="1"?je[Cn]="1":Gn==","&&vn==je[Cn+1]&&(vn=="1"||vn=="n")&&(je[Cn]=vn),vn=Gn}for(var Br=0;Br<Ke;++Br){var ii=je[Br];if(ii==",")je[Br]="N";else if(ii=="%"){var _r=void 0;for(_r=Br+1;_r<Ke&&je[_r]=="%";++_r);for(var Bi=Br&&je[Br-1]=="!"||_r<Ke&&je[_r]=="1"?"1":"N",Ei=Br;Ei<_r;++Ei)je[Ei]=Bi;Br=_r-1}}for(var Qr=0,Li=Ce;Qr<Ke;++Qr){var ci=je[Qr];Li=="L"&&ci=="1"?je[Qr]="L":te.test(ci)&&(Li=ci)}for(var ei=0;ei<Ke;++ei)if(E.test(je[ei])){var qr=void 0;for(qr=ei+1;qr<Ke&&E.test(je[qr]);++qr);for(var Hr=(ei?je[ei-1]:Ce)=="L",Di=(qr<Ke?je[qr]:Ce)=="L",Uo=Hr==Di?Hr?"L":"R":Ce,bo=ei;bo<qr;++bo)je[bo]=Uo;ei=qr-1}for(var vi=[],$i,oi=0;oi<Ke;)if(oe.test(je[oi])){var bs=oi;for(++oi;oi<Ke&&oe.test(je[oi]);++oi);vi.push(new ue(0,bs,oi))}else{var oo=oi,Mo=vi.length,To=be=="rtl"?1:0;for(++oi;oi<Ke&&je[oi]!="L";++oi);for(var bi=oo;bi<oi;)if(ae.test(je[bi])){oo<bi&&(vi.splice(Mo,0,new ue(1,oo,bi)),Mo+=To);var Vo=bi;for(++bi;bi<oi&&ae.test(je[bi]);++bi);vi.splice(Mo,0,new ue(2,Vo,bi)),Mo+=To,oo=bi}else++bi;oo<oi&&vi.splice(Mo,0,new ue(1,oo,oi))}return be=="ltr"&&(vi[0].level==1&&($i=he.match(/^\s+/))&&(vi[0].from=$i[0].length,vi.unshift(new ue(0,0,$i[0].length))),ke(vi).level==1&&($i=he.match(/\s+$/))&&(ke(vi).to-=$i[0].length,vi.push(new ue(0,Ke-$i[0].length,Ke)))),be=="rtl"?vi.reverse():vi}}();function Xt(a,y){var x=a.order;return x==null&&(x=a.order=Rt(a.text,y)),x}var Jt=[],Et=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]||Jt).concat(x)}};function Ft(a,y){return a._handlers&&a._handlers[y]||Jt}function kt(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=He(E,x);te>-1&&(b[y]=E.slice(0,te).concat(E.slice(te+1)))}}}function Qt(a,y){var x=Ft(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 nt(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Qt(a,x||y.type,a,y),un(y)||y.codemirrorIgnore}function rn(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)He(x,y[b])==-1&&x.push(y[b])}function Ot(a,y){return Ft(a,y).length>0}function Gt(a){a.prototype.on=function(y,x){Et(this,y,x)},a.prototype.off=function(y,x){kt(this,y,x)}}function sn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Mn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function un(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function mn(a){sn(a),Mn(a)}function nr(a){return a.target||a.srcElement}function Un(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var zr=function(){if(ge&&ye<9)return!1;var a=Ue("div");return"draggable"in a||"dragDrop"in a}(),Wr;function xr(a){if(Wr==null){var y=Ue("span","\u200B");Je(a,Ue("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Wr=y.offsetWidth<=1&&y.offsetHeight>2&&!(ge&&ye<8))}var x=Wr?Ue("span","\u200B"):Ue("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var gr;function Hn(a){if(gr!=null)return gr;var y=Je(a,document.createTextNode("A\u062EA")),x=Ae(y,0,1).getBoundingClientRect(),b=Ae(y,1,2).getBoundingClientRect();return Zt(a),!x||x.left==x.right?!1:gr=b.right-x.right<3}var ir=`
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/)},Rr=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},Nn=function(){var a=Ue("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),rr=null;function Vn(a){if(rr!=null)return rr;var y=Je(a,Ue("span","x")),x=y.getBoundingClientRect(),b=Ae(y,0,1).getBoundingClientRect();return rr=Math.abs(x.left-b.left)>1}var kr={},an={};function fn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),kr[a]=y}function gn(a,y){an[a]=y}function En(a){if(typeof a=="string"&&an.hasOwnProperty(a))a=an[a];else if(a&&typeof a.name=="string"&&an.hasOwnProperty(a.name)){var y=an[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 En("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return En("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function $n(a,y){y=En(y);var x=kr[y.name];if(!x)return $n(a,"text/plain");var b=x(a,y);if(or.hasOwnProperty(y.name)){var E=or[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 or={};function yr(a,y){var x=or.hasOwnProperty(a)?or[a]:or[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 On(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 Er(a,y,x){return a.startState?a.startState(y,x):!0}var Wt=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};Wt.prototype.eol=function(){return this.pos>=this.string.length},Wt.prototype.sol=function(){return this.pos==this.lineStart},Wt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Wt.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},Wt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Wt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Wt.prototype.skipToEnd=function(){this.pos=this.string.length},Wt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Wt.prototype.backUp=function(a){this.pos-=a},Wt.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)},Wt.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},Wt.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)}},Wt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Wt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Wt.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 qt(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 Sn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function jn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ee(a){if(a.parent==null)return null;for(var y=a.parent,x=He(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 Me(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 ae=a.lines[oe],ue=ae.height;if(y<ue)break;y-=ue}return x+oe}function Mt(a,y){return y>=a.first&&y<a.first+a.size}function mt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function _e(a,y,x){if(x===void 0&&(x=null),!(this instanceof _e))return new _e(a,y,x);this.line=a,this.ch=y,this.sticky=x}function gt(a,y){return a.line-y.line||a.ch-y.ch}function Ut(a,y){return a.sticky==y.sticky&&gt(a,y)==0}function nn(a){return _e(a.line,a.ch)}function on(a,y){return gt(a,y)<0?y:a}function Nt(a,y){return gt(a,y)<0?a:y}function Vt(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Ie(a,y){if(y.line<a.first)return _e(a.first,0);var x=a.first+a.size-1;return y.line>x?_e(x,ot(a,x).text.length):yn(y,ot(a,y.line).text.length)}function yn(a,y){var x=a.ch;return x==null||x>y?_e(a.line,y):x<0?_e(a.line,0):a}function Yt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Ie(a,y[b]);return x}var pn=function(a,y){this.state=a,this.lookAhead=y},cn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};cn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},cn.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}},cn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},cn.fromSaved=function(a,y,x){return y instanceof pn?new cn(a,Zn(a.mode,y.state),x,y.lookAhead):new cn(a,Zn(a.mode,y),x)},cn.prototype.save=function(a){var y=a!==!1?Zn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pn(y,this.maxLookAhead):y};function bn(a,y,x,b){var E=[a.state.modeGen],te={};ar(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},te,b);for(var oe=x.state,ae=function(he){x.baseTokens=E;var be=a.state.overlays[he],Ce=1,Ke=0;x.state=!0,ar(a,y.text,be.mode,x,function(je,yt){for(var Lt=Ce;Ke<je;){var zt=E[Ce];zt>je&&E.splice(Ce,1,je,E[Ce+1],zt),Ce+=2,Ke=Math.min(je,zt)}if(yt)if(be.opaque)E.splice(Lt,Ce-Lt,je,"overlay "+yt),Ce=Lt+2;else for(;Lt<Ce;Lt+=2){var en=E[Lt+1];E[Lt+1]=(en?en+" ":"")+"overlay "+yt}},te),x.state=oe,x.baseTokens=null,x.baseTokenPos=1},ue=0;ue<a.state.overlays.length;++ue)ae(ue);return{styles:E,classes:te.bgClass||te.textClass?te:null}}function Tn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=cr(a,Ee(y)),E=y.text.length>a.options.maxHighlightLength&&Zn(a.doc.mode,b.state),te=bn(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 cr(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new cn(b,!0,y);var te=dr(a,y,x),oe=te>b.first&&ot(b,te-1).stateAfter,ae=oe?cn.fromSaved(b,oe,te):new cn(b,Er(b.mode),te);return b.iter(te,y,function(ue){Bn(a,ue.text,ae);var he=ae.line;ue.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&he<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function Bn(a,y,x,b){var E=a.doc.mode,te=new Wt(y,a.options.tabSize,x);for(te.start=te.pos=b||0,y==""&&Ln(E,x.state);!te.eol();)er(E,te,x.state),te.start=te.pos}function Ln(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=On(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function er(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=On(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 An=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function hr(a,y,x,b){var E=a.doc,te=E.mode,oe;y=Ie(E,y);var ae=ot(E,y.line),ue=cr(a,y.line,x),he=new Wt(ae.text,a.options.tabSize,ue),be;for(b&&(be=[]);(b||he.pos<y.ch)&&!he.eol();)he.start=he.pos,oe=er(te,he,ue.state),b&&be.push(new An(he,oe,Zn(E.mode,ue.state)));return b?be:new An(he,oe,ue.state)}function Ir(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 ar(a,y,x,b,E,te,oe){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var ue=0,he=null,be=new Wt(y,a.options.tabSize,b),Ce,Ke=a.options.addModeClass&&[null];for(y==""&&Ir(Ln(x,b.state),te);!be.eol();){if(be.pos>a.options.maxHighlightLength?(ae=!1,oe&&Bn(a,y,b,be.pos),be.pos=y.length,Ce=null):Ce=Ir(er(x,be,b.state,Ke),te),Ke){var je=Ke[0].name;je&&(Ce="m-"+(Ce?je+" "+Ce:je))}if(!ae||he!=Ce){for(;ue<be.start;)ue=Math.min(be.start,ue+5e3),E(ue,he);he=Ce}be.start=be.pos}for(;ue<be.pos;){var yt=Math.min(be.pos,ue+5e3);E(yt,he),ue=yt}}function dr(a,y,x){for(var b,E,te=a.doc,oe=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>oe;--ae){if(ae<=te.first)return te.first;var ue=ot(te,ae-1),he=ue.stateAfter;if(he&&(!x||ae+(he instanceof pn?he.lookAhead:0)<=te.modeFrontier))return ae;var be=pe(ue.text,null,a.options.tabSize);(E==null||b>be)&&(E=ae-1,b=be)}return E}function Lr(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 pn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var fr=!1,Xn=!1;function Mr(){fr=!0}function Jn(){Xn=!0}function sr(a,y,x){this.marker=a,this.from=y,this.to=x}function pr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function wr(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function lr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function Kn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],oe=te.marker,ae=te.from==null||(oe.inclusiveLeft?te.from<=y:te.from<y);if(ae||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 sr(oe,te.from,ue?null:te.to))}}return b}function zn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var te=a[E],oe=te.marker,ae=te.to==null||(oe.inclusiveRight?te.to>=y:te.to>y);if(ae||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 sr(oe,ue?null:te.from-y,te.to==null?null:te.to-y))}}return b}function Tr(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=gt(y.from,y.to)==0,ae=Kn(x,E,oe),ue=zn(b,te,oe),he=y.text.length==1,be=ke(y.text).length+(he?E:0);if(ae)for(var Ce=0;Ce<ae.length;++Ce){var Ke=ae[Ce];if(Ke.to==null){var je=pr(ue,Ke.marker);je?he&&(Ke.to=je.to==null?null:je.to+be):Ke.to=E}}if(ue)for(var yt=0;yt<ue.length;++yt){var Lt=ue[yt];if(Lt.to!=null&&(Lt.to+=be),Lt.from==null){var zt=pr(ae,Lt.marker);zt||(Lt.from=be,he&&(ae||(ae=[])).push(Lt))}else Lt.from+=be,he&&(ae||(ae=[])).push(Lt)}ae&&(ae=Zr(ae)),ue&&ue!=ae&&(ue=Zr(ue));var en=[ae];if(!he){var ln=y.text.length-2,tn;if(ln>0&&ae)for(var dn=0;dn<ae.length;++dn)ae[dn].to==null&&(tn||(tn=[])).push(new sr(ae[dn].marker,null,null));for(var Cn=0;Cn<ln;++Cn)en.push(tn);en.push(ue)}return en}function Zr(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 Gr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(je){if(je.markedSpans)for(var yt=0;yt<je.markedSpans.length;++yt){var Lt=je.markedSpans[yt].marker;Lt.readOnly&&(!b||He(b,Lt)==-1)&&(b||(b=[])).push(Lt)}}),!b)return null;for(var E=[{from:y,to:x}],te=0;te<b.length;++te)for(var oe=b[te],ae=oe.find(0),ue=0;ue<E.length;++ue){var he=E[ue];if(!(gt(he.to,ae.from)<0||gt(he.from,ae.to)>0)){var be=[ue,1],Ce=gt(he.from,ae.from),Ke=gt(he.to,ae.to);(Ce<0||!oe.inclusiveLeft&&!Ce)&&be.push({from:he.from,to:ae.from}),(Ke>0||!oe.inclusiveRight&&!Ke)&&be.push({from:ae.to,to:he.to}),E.splice.apply(E,be),ue+=be.length-3}}return E}function Yn(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function ai(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function tr(a){return a.inclusiveLeft?-1:0}function si(a){return a.inclusiveRight?1:0}function ti(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),te=gt(b.from,E.from)||tr(a)-tr(y);if(te)return-te;var oe=gt(b.to,E.to)||si(a)-si(y);return oe||y.id-a.id}function Fr(a,y){var x=Xn&&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||ti(b,E.marker)<0)&&(b=E.marker);return b}function Rn(a){return Fr(a,!0)}function Tt(a){return Fr(a,!1)}function Ht(a,y){var x=Xn&&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||ti(b,te.marker)<0)&&(b=te.marker)}return b}function hn(a,y,x,b,E){var te=ot(a,y),oe=Xn&&te.markedSpans;if(oe)for(var ae=0;ae<oe.length;++ae){var ue=oe[ae];if(ue.marker.collapsed){var he=ue.marker.find(0),be=gt(he.from,x)||tr(ue.marker)-tr(E),Ce=gt(he.to,b)||si(ue.marker)-si(E);if(!(be>=0&&Ce<=0||be<=0&&Ce>=0)&&(be<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?gt(he.to,x)>=0:gt(he.to,x)>0)||be>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?gt(he.from,b)<=0:gt(he.from,b)<0)))return!0}}}function $t(a){for(var y;y=Rn(a);)a=y.find(-1,!0).line;return a}function xn(a){for(var y;y=Tt(a);)a=y.find(1,!0).line;return a}function _t(a){for(var y,x;y=Tt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Dt(a,y){var x=ot(a,y),b=$t(x);return x==b?y:Ee(b)}function jt(a,y){if(y>a.lastLine())return y;var x=ot(a,y),b;if(!Kt(a,x))return y;for(;b=Tt(x);)x=b.find(1,!0).line;return Ee(x)+1}function Kt(a,y){var x=Xn&&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&&Dn(a,y,b))return!0}}}function Dn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return Dn(a,b.line,pr(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)&&Dn(a,y,E))return!0}function Fn(a){a=$t(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 ae=te.children[oe];if(ae==x)break;y+=ae.height}return y}function br(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=Tt(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 _n(a){var y=a.display,x=a.doc;y.maxLine=ot(x,x.first),y.maxLineLength=br(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=br(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Qn=function(a,y,x){this.text=a,ai(this,y),this.height=x?x(this):1};Qn.prototype.lineNo=function(){return Ee(this)},Gt(Qn);function Ar(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Yn(a),ai(a,x);var E=b?b(a):1;E!=a.height&&jn(a,E)}function jr(a){a.parent=null,Yn(a)}var vr={},Yr={};function Dr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?Yr:vr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function hi(a,y){var x=bt("span",null,null,Re?"padding-right: .1px":null),b={pre:bt("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=Ni,Hn(a.display.measure)&&(oe=Xt(te,a.doc.direction))&&(b.addToken=mi(b.addToken,oe)),b.map=[];var ae=y!=a.display.externalMeasured&&Ee(te);wi(te,b,Tn(a,te,ae)),te.styleClasses&&(te.styleClasses.bgClass&&(b.bgClass=Pt(te.styleClasses.bgClass,b.bgClass||"")),te.styleClasses.textClass&&(b.textClass=Pt(te.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(xr(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(Re){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=Pt(b.pre.className,b.textClass||"")),b}function zi(a){var y=Ue("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ni(a,y,x,b,E,te,oe){if(y){var ae=a.splitSpaces?xi(y,a.trailingSpace):y,ue=a.cm.state.specialChars,he=!1,be;if(!ue.test(y))a.col+=y.length,be=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,be),ge&&ye<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var Ce=0;;){ue.lastIndex=Ce;var Ke=ue.exec(y),je=Ke?Ke.index-Ce:y.length-Ce;if(je){var yt=document.createTextNode(ae.slice(Ce,Ce+je));ge&&ye<9?be.appendChild(Ue("span",[yt])):be.appendChild(yt),a.map.push(a.pos,a.pos+je,yt),a.col+=je,a.pos+=je}if(!Ke)break;Ce+=je+1;var Lt=void 0;if(Ke[0]==" "){var zt=a.cm.options.tabSize,en=zt-a.col%zt;Lt=be.appendChild(Ue("span",ct(en),"cm-tab")),Lt.setAttribute("role","presentation"),Lt.setAttribute("cm-text"," "),a.col+=en}else Ke[0]=="\r"||Ke[0]==`
`?(Lt=be.appendChild(Ue("span",Ke[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Lt.setAttribute("cm-text",Ke[0]),a.col+=1):(Lt=a.cm.options.specialCharPlaceholder(Ke[0]),Lt.setAttribute("cm-text",Ke[0]),ge&&ye<9?be.appendChild(Ue("span",[Lt])):be.appendChild(Lt),a.col+=1);a.map.push(a.pos,a.pos+1,Lt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||he||te||oe){var ln=x||"";b&&(ln+=b),E&&(ln+=E);var tn=Ue("span",[be],ln,te);if(oe)for(var dn in oe)oe.hasOwnProperty(dn)&&dn!="style"&&dn!="class"&&tn.setAttribute(dn,oe[dn]);return a.content.appendChild(tn)}a.content.appendChild(be)}}function xi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var te=a.charAt(E);te==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(te="\xA0"),b+=te,x=te==" "}return b}function mi(a,y){return function(x,b,E,te,oe,ae,ue){E=E?E+" cm-force-border":"cm-force-border";for(var he=x.pos,be=he+b.length;;){for(var Ce=void 0,Ke=0;Ke<y.length&&(Ce=y[Ke],!(Ce.to>he&&Ce.from<=he));Ke++);if(Ce.to>=be)return a(x,b,E,te,oe,ae,ue);a(x,b.slice(0,Ce.to-he),E,te,null,ae,ue),te=null,b=b.slice(Ce.to-he),he=Ce.to}}}function Cr(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 wi(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]),Dr(x[oe+1],y.cm.options));return}for(var ae=E.length,ue=0,he=1,be="",Ce,Ke,je=0,yt,Lt,zt,en,ln;;){if(je==ue){yt=Lt=zt=Ke="",ln=null,en=null,je=1/0;for(var tn=[],dn=void 0,Cn=0;Cn<b.length;++Cn){var vn=b[Cn],Gn=vn.marker;if(Gn.type=="bookmark"&&vn.from==ue&&Gn.widgetNode)tn.push(Gn);else if(vn.from<=ue&&(vn.to==null||vn.to>ue||Gn.collapsed&&vn.to==ue&&vn.from==ue)){if(vn.to!=null&&vn.to!=ue&&je>vn.to&&(je=vn.to,Lt=""),Gn.className&&(yt+=" "+Gn.className),Gn.css&&(Ke=(Ke?Ke+";":"")+Gn.css),Gn.startStyle&&vn.from==ue&&(zt+=" "+Gn.startStyle),Gn.endStyle&&vn.to==je&&(dn||(dn=[])).push(Gn.endStyle,vn.to),Gn.title&&((ln||(ln={})).title=Gn.title),Gn.attributes)for(var Br in Gn.attributes)(ln||(ln={}))[Br]=Gn.attributes[Br];Gn.collapsed&&(!en||ti(en.marker,Gn)<0)&&(en=vn)}else vn.from>ue&&je>vn.from&&(je=vn.from)}if(dn)for(var ii=0;ii<dn.length;ii+=2)dn[ii+1]==je&&(Lt+=" "+dn[ii]);if(!en||en.from==ue)for(var _r=0;_r<tn.length;++_r)Cr(y,0,tn[_r]);if(en&&(en.from||0)==ue){if(Cr(y,(en.to==null?ae+1:en.to)-ue,en.marker,en.from==null),en.to==null)return;en.to==ue&&(en=!1)}}if(ue>=ae)break;for(var Bi=Math.min(ae,je);;){if(be){var Ei=ue+be.length;if(!en){var Qr=Ei>Bi?be.slice(0,Bi-ue):be;y.addToken(y,Qr,Ce?Ce+yt:yt,zt,ue+Qr.length==je?Lt:"",Ke,ln)}if(Ei>=Bi){be=be.slice(Bi-ue),ue=Bi;break}ue=Ei,zt=""}be=E.slice(te,te=x[he++]),Ce=Dr(x[he++],y.cm.options)}}}function eo(a,y,x){this.line=y,this.rest=_t(y),this.size=this.rest?Ee(ke(this.rest))-x+1:1,this.node=this.text=null,this.hidden=Kt(a,y)}function Xr(a,y,x){for(var b=[],E,te=y;te<x;te=E){var oe=new eo(a.doc,ot(a.doc,te),te);E=te+oe.size,b.push(oe)}return b}var Oi=null;function Xi(a){Oi?Oi.ops.push(a):a.ownsGroup=Oi={ops:[a],delayedCallbacks:[]}}function di(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 ao(a,y){var x=a.ownsGroup;if(x)try{di(x)}finally{Oi=null,y(x)}}var Ri=null;function Nr(a,y){var x=Ft(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Oi?E=Oi.delayedCallbacks:Ri?E=Ri:(E=Ri=[],setTimeout(to,0));for(var te=function(ae){E.push(function(){return x[ae].apply(null,b)})},oe=0;oe<x.length;++oe)te(oe)}}function to(){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"?In(a,y,x,b):te=="class"?wn(a,y):te=="widget"&&kn(a,y,b)}y.changes=null}function Zi(a){return a.node==a.text&&(a.node=Ue("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),ge&&ye<8&&(a.node.style.zIndex=2)),a.node}function Jr(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(Ue("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):hi(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,wn(a,y)):x&&(y.text.className=x)}function wn(a,y){Jr(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 In(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=Ue("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),ae=y.gutter=Ue("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),oe.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(Ue("div",mt(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,be=te.hasOwnProperty(he)&&te[he];be&&ae.appendChild(Ue("div",[be],"CodeMirror-gutter-elt","left: "+b.gutterLeft[he]+"px; width: "+b.gutterWidth[he]+"px"))}}}function kn(a,y,x){y.alignable&&(y.alignable=null);for(var b=lt("CodeMirror-linewidget"),E=y.node.firstChild,te=void 0;E;E=te)te=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);ur(a,y,x)}function Pn(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),wn(a,y),In(a,y,x,b),ur(a,y,b),y.node}function ur(a,y,x){if(Pr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Pr(a,y.rest[b],y,x,!1)}function Pr(a,y,x,b,E){if(y.widgets)for(var te=Zi(x),oe=0,ae=y.widgets;oe<ae.length;++oe){var ue=ae[oe],he=Ue("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),Nr(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(!Ze(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;"),Je(y.display.measure,Ue("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function li(a,y){for(var x=nr(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 Ur(a){return a.lineSpace.offsetTop}function _i(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Ji(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Je(a.measure,Ue("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 ft-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(),ae=0;ae<oe.length-1;ae++){var ue=oe[ae],he=oe[ae+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(Ee(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=$t(y);var x=Ee(y),b=a.display.externalMeasured=new eo(a.doc,y,x);b.lineN=x;var E=b.built=hi(a,b);return b.text=E.pre,Je(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Wi(a,uo(a,y),x,b)}function qi(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=Ee(y),b=qi(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 Wi(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,ae,ue,he=0;he<a.length;he+=3)if(ae=a[he],ue=a[he+1],y<ae?(E=0,te=1,oe="left"):y<ue?(E=y-ae,te=E+1):(he==a.length-3||y==ue&&a[he+3]>y)&&(te=ue-ae,E=te-1,y>=ue&&(oe="right")),E!=null){if(b=a[he+2],ae==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-ae)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:ae,coverEnd:ue}}function Ua(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,ae=E.end,ue=E.collapse,he;if(te.nodeType==3){for(var be=0;be<4;be++){for(;oe&&Oe(y.line.text.charAt(E.coverStart+oe));)--oe;for(;E.coverStart+ae<E.coverEnd&&Oe(y.line.text.charAt(E.coverStart+ae));)++ae;if(ge&&ye<9&&oe==0&&ae==E.coverEnd-E.coverStart?he=te.parentNode.getBoundingClientRect():he=Ua(Ae(te,oe,ae).getClientRects(),b),he.left||he.right||oe==0)break;ae=oe,oe=oe-1,ue="right"}ge&&ye<11&&(he=Va(a.display.measure,he))}else{oe>0&&(ue=b="right");var Ce;a.options.lineWrapping&&(Ce=te.getClientRects()).length>1?he=Ce[b=="right"?Ce.length-1:0]:he=te.getBoundingClientRect()}if(ge&&ye<9&&!oe&&(!he||!he.left&&!he.right)){var Ke=te.parentNode.getClientRects()[0];Ke?he={left:Ke.left,right:Ke.left+Vi(a.display),top:Ke.top,bottom:Ke.bottom}:he=ba}for(var je=he.top-y.rect.top,yt=he.bottom-y.rect.top,Lt=(je+yt)/2,zt=y.view.measure.heights,en=0;en<zt.length-1&&!(Lt<zt[en]);en++);var ln=en?zt[en-1]:0,tn=zt[en],dn={left:(ue=="right"?he.right:he.left)-y.rect.left,right:(ue=="left"?he.left:he.right)-y.rect.left,top:ln,bottom:tn};return!he.left&&!he.right&&(dn.bogus=!0),a.options.singleCursorHeightPerLine||(dn.rtop=je,dn.rbottom=yt),dn}function Va(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vn(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,Zt(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 we&&Te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return we&&Te?-(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=Fn(y);if(b=="local"?oe+=Ur(a.display):oe-=a.display.viewOffset,b=="page"||b=="window"){var ae=a.display.lineSpace.getBoundingClientRect();oe+=ae.top+(b=="window"?0:Ca());var ue=ae.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 Ci(a,y,x,b,E,te){b=b||ot(a.doc,y.line),E||(E=uo(a,b));function oe(yt,Lt){var zt=Wi(a,E,yt,Lt?"right":"left",te);return Lt?zt.left=zt.right:zt.right=zt.left,Po(a,b,zt,x)}var ae=Xt(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"),!ae)return oe(he=="before"?ue-1:ue,he=="before");function be(yt,Lt,zt){var en=ae[Lt],ln=en.level==1;return oe(zt?yt-1:yt,ln!=zt)}var Ce=It(ae,ue,he),Ke=xt,je=be(ue,Ce,he=="before");return Ke!=null&&(je.other=be(ue,Ke,he!="before")),je}function qn(a,y){var x=0;y=Ie(a.doc,y),a.options.lineWrapping||(x=Vi(a.display)*y.ch);var b=ot(a.doc,y.line),E=Fn(b)+Ur(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Wn(a,y,x,b,E){var te=_e(a,y,x);return te.xRel=E,b&&(te.outside=b),te}function ui(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Wn(b.first,0,null,-1,-1);var E=Me(b,x),te=b.first+b.size-1;if(E>te)return Wn(b.first+b.size-1,ot(b,te).text.length,null,1,1);y<0&&(y=0);for(var oe=ot(b,E);;){var ae=Ui(a,oe,E,y,x),ue=Ht(oe,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!ue)return ae;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=Ct(function(oe){return Wi(a,x,oe-1).bottom<=b},E,0);return E=Ct(function(oe){return Wi(a,x,oe).top>b},te,E),{begin:te,end:E}}function Vr(a,y,x,b){x||(x=uo(a,y));var E=Po(a,y,Wi(a,x,b),"line").top;return fi(a,y,x,E)}function $r(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Ui(a,y,x,b,E){E-=Fn(y);var te=uo(a,y),oe=Jo(y),ae=0,ue=y.text.length,he=!0,be=Xt(y,a.doc.direction);if(be){var Ce=(a.options.lineWrapping?ro:Hi)(a,y,x,te,be,b,E);he=Ce.level!=1,ae=he?Ce.from:Ce.to-1,ue=he?Ce.to:Ce.from-1}var Ke=null,je=null,yt=Ct(function(Cn){var vn=Wi(a,te,Cn);return vn.top+=oe,vn.bottom+=oe,$r(vn,b,E,!1)?(vn.top<=E&&vn.left<=b&&(Ke=Cn,je=vn),!0):!1},ae,ue),Lt,zt,en=!1;if(je){var ln=b-je.left<je.right-b,tn=ln==he;yt=Ke+(tn?0:1),zt=tn?"after":"before",Lt=ln?je.left:je.right}else{!he&&(yt==ue||yt==ae)&&yt++,zt=yt==0?"after":yt==y.text.length?"before":Wi(a,te,yt-(he?1:0)).bottom+oe<=E==he?"after":"before";var dn=Ci(a,_e(x,yt,zt),"line",y,te);Lt=dn.left,en=E<dn.top?-1:E>=dn.bottom?1:0}return yt=wt(y.text,yt,1),Wn(x,yt,zt,en,b-Lt)}function Hi(a,y,x,b,E,te,oe){var ae=Ct(function(Ce){var Ke=E[Ce],je=Ke.level!=1;return $r(Ci(a,_e(x,je?Ke.to:Ke.from,je?"before":"after"),"line",y,b),te,oe,!0)},0,E.length-1),ue=E[ae];if(ae>0){var he=ue.level!=1,be=Ci(a,_e(x,he?ue.from:ue.to,he?"after":"before"),"line",y,b);$r(be,te,oe,!0)&&be.top>oe&&(ue=E[ae-1])}return ue}function ro(a,y,x,b,E,te,oe){var ae=fi(a,y,b,oe),ue=ae.begin,he=ae.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,Ce=null,Ke=0;Ke<E.length;Ke++){var je=E[Ke];if(!(je.from>=he||je.to<=ue)){var yt=je.level!=1,Lt=Wi(a,b,yt?Math.min(he,je.to)-1:Math.max(ue,je.from)).right,zt=Lt<te?te-Lt+1e9:Lt-te;(!be||Ce>zt)&&(be=je,Ce=zt)}}return be||(be=E[E.length-1]),be.from<ue&&(be={from:ue,to:be.to,level:be.level}),be.to>he&&(be={from:be.from,to:he,level:be.level}),be}var Ti;function Ai(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ti==null){Ti=Ue("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ti.appendChild(document.createTextNode("x")),Ti.appendChild(Ue("br"));Ti.appendChild(document.createTextNode("x"))}Je(a.measure,Ti);var x=Ti.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Zt(a.measure),x||1}function Vi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ue("span","xxxxxxxxxx"),x=Ue("pre",[y],"CodeMirror-line-like");Je(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 ae=a.display.gutterSpecs[oe].className;x[ae]=te.offsetLeft+te.clientLeft+E,b[ae]=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/Vi(a.display)-3);return function(E){if(Kt(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&&jn(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&nr(y).getAttribute("cm-not-content")=="true")return null;var te,oe,ae=E.lineSpace.getBoundingClientRect();try{te=y.clientX-ae.left,oe=y.clientY-ae.top}catch(Ce){return null}var ue=ui(a,te,oe),he;if(b&&ue.xRel>0&&(he=ot(a.doc,ue.line).text).length==ue.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;ue=_e(ue.line,Math.max(0,Math.round((te-Ji(a.display).left)/Vi(a.display))-be))}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 Si(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)Xn&&Dt(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)Xn&&jt(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 ae=ka(a,y,y,-1),ue=ka(a,x,x+b,1);ae&&ue?(E.view=E.view.slice(0,ae.index).concat(Xr(a,ae.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=[]);He(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(!Xn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,ue=0;ue<E;ue++)ae+=oe[ue].size;if(ae!=y){if(b>0){if(E==oe.length-1)return null;te=ae+oe[E].size-y,E++}else te=ae-y;y+=te,x+=te}for(;Dt(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 Wl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Xr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Xr(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(Xr(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 ae=x.sel.ranges[oe];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var ue=ae.empty();(ue||a.options.showCursorWhenSelecting)&&ks(a,ae.head,E),ue||Hl(a,ae,te)}}return b}function ks(a,y,x){var b=Ci(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ue("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(Ue("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 Hl(a,y,x){var b=a.display,E=a.doc,te=document.createDocumentFragment(),oe=Ji(a.display),ae=oe.left,ue=Math.max(b.sizerWidth,Qi(a)-b.sizer.offsetLeft)-oe.right,he=E.direction=="ltr";function be(tn,dn,Cn,vn){dn<0&&(dn=0),dn=Math.round(dn),vn=Math.round(vn),te.appendChild(Ue("div",null,"CodeMirror-selected","position: absolute; left: "+tn+`px;
top: `+dn+"px; width: "+(Cn==null?ue-tn:Cn)+`px;
height: `+(vn-dn)+"px"))}function Ce(tn,dn,Cn){var vn=ot(E,tn),Gn=vn.text.length,Br,ii;function _r(Qr,Li){return Bo(a,_e(tn,Qr),"div",vn,Li)}function Bi(Qr,Li,ci){var ei=Vr(a,vn,null,Qr),qr=Li=="ltr"==(ci=="after")?"left":"right",Hr=ci=="after"?ei.begin:ei.end-(/\s/.test(vn.text.charAt(ei.end-1))?2:1);return _r(Hr,qr)[qr]}var Ei=Xt(vn,E.direction);return vt(Ei,dn||0,Cn==null?Gn:Cn,function(Qr,Li,ci,ei){var qr=ci=="ltr",Hr=_r(Qr,qr?"left":"right"),Di=_r(Li-1,qr?"right":"left"),Uo=dn==null&&Qr==0,bo=Cn==null&&Li==Gn,vi=ei==0,$i=!Ei||ei==Ei.length-1;if(Di.top-Hr.top<=3){var oi=(he?Uo:bo)&&vi,bs=(he?bo:Uo)&&$i,oo=oi?ae:(qr?Hr:Di).left,Mo=bs?ue:(qr?Di:Hr).right;be(oo,Hr.top,Mo-oo,Hr.bottom)}else{var To,bi,Vo,xs;qr?(To=he&&Uo&&vi?ae:Hr.left,bi=he?ue:Bi(Qr,ci,"before"),Vo=he?ae:Bi(Li,ci,"after"),xs=he&&bo&&$i?ue:Di.right):(To=he?Bi(Qr,ci,"before"):ae,bi=!he&&Uo&&vi?ue:Hr.right,Vo=!he&&bo&&$i?ae:Di.left,xs=he?Bi(Li,ci,"after"):ue),be(To,Hr.top,bi-To,Hr.bottom),Hr.bottom<Di.top&&be(ae,Hr.bottom,null,Di.top),be(Vo,Di.top,xs-Vo,Di.bottom)}(!Br||Ea(Hr,Br)<0)&&(Br=Hr),Ea(Di,Br)<0&&(Br=Di),(!ii||Ea(Hr,ii)<0)&&(ii=Hr),Ea(Di,ii)<0&&(ii=Di)}),{start:Br,end:ii}}var Ke=y.from(),je=y.to();if(Ke.line==je.line)Ce(Ke.line,Ke.ch,je.ch);else{var yt=ot(E,Ke.line),Lt=ot(E,je.line),zt=$t(yt)==$t(Lt),en=Ce(Ke.line,Ke.ch,zt?yt.text.length+1:null).end,ln=Ce(je.line,zt?0:null,je.ch).start;zt&&(en.top<ln.top-2?(be(en.right,en.top,null,en.bottom),be(ae,ln.top,ln.left,ln.bottom)):be(en.right,en.top,ln.left-en.right,en.bottom)),en.bottom<ln.top&&be(ae,en.bottom,null,ln.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()||Ro(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 Ls(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ro(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,ze(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Re&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Ro(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Qt(a,"blur",a,y),a.state.focused=!1,it(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function La(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,ae=0;if(!E.hidden){if(ge&&ye<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&&(ae=E.text.firstChild.getBoundingClientRect().right-he.left-1)}var be=E.line.height-oe;if((be>.005||be<-.005)&&(jn(E.line,oe),Ds(E.line),E.rest))for(var Ce=0;Ce<E.rest.length;Ce++)Ds(E.rest[Ce]);if(ae>a.display.sizerWidth){var Ke=Math.ceil(ae/Vi(a.display));Ke>a.display.maxLineLength&&(a.display.maxLineLength=Ke,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ds(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 Da(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Ur(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,te=Me(y,b),oe=Me(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,ue=x.ensure.to.line;ae<te?(te=ae,oe=Me(y,Fn(ot(y,ae))+a.wrapper.clientHeight)):Math.min(ue,y.lastLine())>=oe&&(te=Me(y,Fn(ot(y,ue))-a.wrapper.clientHeight),oe=ue)}return{from:te,to:Math.max(oe,te+1)}}function zl(a,y){if(!nt(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&&!rt){var te=Ue("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Ur(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?_e(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?_e(y.line,y.ch+1,"before"):y);for(var te=0;te<5;te++){var oe=!1,ae=Ci(a,y),ue=!x||x==y?ae:Ci(a,x);E={left:Math.min(ae.left,ue.left),top:Math.min(ae.top,ue.top)-b,right:Math.max(ae.left,ue.left),bottom:Math.max(ae.bottom,ue.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,Ce=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(oe=!0)),he.scrollLeft!=null&&(ko(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Ce)>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 ae=a.doc.height+_i(x),ue=y.top<b,he=y.bottom>ae-b;if(y.top<E)oe.scrollTop=ue?0:y.top;else if(y.bottom>E+te){var be=Math.min(y.top,(he?ae:y.bottom)-te);be!=E&&(oe.scrollTop=be)}var Ce=a.options.fixedGutter?0:x.gutters.offsetWidth,Ke=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Ce,je=Qi(a)-x.gutters.offsetWidth,yt=y.right-y.left>je;return yt&&(y.right=y.left+je),y.left<10?oe.scrollLeft=0:y.left<Ke?oe.scrollLeft=Math.max(0,y.left+Ce-(yt?0:10)):y.right>je+Ke-3&&(oe.scrollLeft=y.right+(yt?0:10)-je),oe}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Fo(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=qn(a,y.from),b=qn(a,y.to);Ms(a,x,b,y.margin)}}function Ms(a,y,x,b){var E=Qa(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(se||es(a,{top:y}),Ts(a,y,!0),se&&es(a),na(a,100))}function Ts(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ko(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Fs(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+_i(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=Ue("div",[Ue("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ue("div",[Ue("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Et(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Et(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ge&&ye<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Eo.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var 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=De&&!ve?"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&&La(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&&it(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),Et(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?ko(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&ze(a.display.wrapper,a.display.scrollbars.addClass)}var Ul=0;function Lo(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:++Ul},Xi(a.curOp)}function Do(a){var y=a.curOp;y&&ao(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Vl(x)})}function Vl(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&&_n(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&&La(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==Le();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&&Rs(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,Ie(b,a.scrollToPos.from),Ie(b,a.scrollToPos.to),a.scrollToPos.margin);zl(y,E)}var te=a.maybeHiddenMarkers,oe=a.maybeUnhiddenMarkers;if(te)for(var ae=0;ae<te.length;++ae)te[ae].lines.length||Qt(te[ae],"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();Lo(a);try{return y()}finally{Do(a)}}function ni(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Lo(a);try{return y.apply(a,arguments)}finally{Do(a)}}}function yi(a){return function(){if(this.curOp)return a.apply(this,arguments);Lo(this);try{return a.apply(this,arguments)}finally{Do(this)}}}function ri(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Lo(y);try{return a.apply(this,arguments)}finally{Do(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,St(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=cr(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,ae=te.text.length>a.options.maxHighlightLength?Zn(y.mode,b.state):null,ue=bn(a,te,b,!0);ae&&(b.state=ae),te.styles=ue.styles;var he=te.styleClasses,be=ue.classes;be?te.styleClasses=be:he&&(te.styleClasses=null);for(var Ce=!oe||oe.length!=te.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),Ke=0;!Ce&&Ke<oe.length;++Ke)Ce=oe[Ke]!=te.styles[Ke];Ce&&E.push(b.line),te.stateAfter=b.save(),b.nextLine()}else te.text.length<=a.options.maxHighlightLength&&Bn(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=Da(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){Ot(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=Le();if(!y||!Ze(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ze(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==Le())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ze(document.body,a.anchorNode)&&Ze(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)),Xn&&(te=Dt(a.doc,te),oe=jt(a.doc,oe));var ae=te!=x.viewFrom||oe!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Wl(a,te,oe),x.viewOffset=Fn(ot(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cs(a);if(!ae&&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),Zt(x.cursorDiv),Zt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ae&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Rs(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+_i(a.display)-no(a),x.top)}),y.visible=Da(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Da(a.display,a.doc,x));if(!$a(a,y))break;La(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)){La(a),Rs(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 ae(yt){var Lt=yt.nextSibling;return Re&&De&&a.display.currentWheelTarget==yt?yt.style.display="none":yt.parentNode.removeChild(yt),Lt}for(var ue=b.view,he=b.viewFrom,be=0;be<ue.length;be++){var Ce=ue[be];if(!Ce.hidden)if(!Ce.node||Ce.node.parentNode!=te){var Ke=Pn(a,Ce,he,x);te.insertBefore(Ke,oe)}else{for(;oe!=Ce.node;)oe=ae(oe);var je=E&&y!=null&&y<=he&&Ce.lineNumber;Ce.changes&&(He(Ce.changes,"gutter")>-1&&(je=!1),so(a,Ce,he,x)),je&&(Zt(Ce.lineNumber),Ce.lineNumber.appendChild(document.createTextNode(mt(a.options,he)))),oe=Ce.node.nextSibling}he+=Ce.size}for(;oe;)oe=ae(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 Fs(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 ae=x[oe].alignable;if(ae)for(var ue=0;ue<ae.length;ue++)ae[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=mt(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ue("div",[Ue("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 Ns(a){var y=a.gutters,x=a.gutterSpecs;Zt(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],te=E.className,oe=E.style,ae=y.appendChild(Ue("div",null,"CodeMirror-gutter "+te));oe&&(ae.style.cssText=oe),te=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){Ns(a.display),Si(a),Fs(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ue("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ue("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=bt("div",null,"CodeMirror-code"),E.selectionDiv=Ue("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ue("div",null,"CodeMirror-cursors"),E.measure=Ue("div",null,"CodeMirror-measure"),E.lineMeasure=Ue("div",null,"CodeMirror-measure"),E.lineSpace=bt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var te=bt("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ue("div",[te],null,"position: relative"),E.sizer=Ue("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ue("div",null,null,"position: absolute; height: "+ft+"px; width: 1px;"),E.gutters=Ue("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ue("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ue("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),ge&&ye<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Re&&!(se&&Pe)&&(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),Ns(E),x.init(E)}var Aa=0,Fi=null;ge?Fi=-.53:se?Fi=15:we?Fi=-.7:$e&&(Fi=-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*=Fi,y.y*=Fi,y}function _s(a,y){var x=Os(y),b=x.x,E=x.y,te=a.display,oe=te.scroller,ae=oe.scrollWidth>oe.clientWidth,ue=oe.scrollHeight>oe.clientHeight;if(b&&ae||E&&ue){if(E&&De&&Re){e:for(var he=y.target,be=te.view;he!=oe;he=he.parentNode)for(var Ce=0;Ce<be.length;Ce++)if(be[Ce].node==he){a.display.currentWheelTarget=he;break e}}if(b&&!se&&!fe&&Fi!=null){E&&ue&&$o(a,Math.max(0,oe.scrollTop+E*Fi)),ko(a,Math.max(0,oe.scrollLeft+b*Fi)),(!E||E&&ue)&&sn(y),te.wheelStartX=null;return}if(E&&Fi!=null){var Ke=E*Fi,je=a.doc.scrollTop,yt=je+te.wrapper.clientHeight;Ke<0?je=Math.max(0,je+Ke-50):yt=Math.min(a.doc.height,yt+Ke+50),es(a,{top:je,bottom:yt})}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 Lt=oe.scrollLeft-te.wheelStartX,zt=oe.scrollTop-te.wheelStartY,en=zt&&te.wheelDY&&zt/te.wheelDY||Lt&&te.wheelDX&&Lt/te.wheelDX;te.wheelStartX=te.wheelStartY=null,en&&(Fi=(Fi*Aa+en)/(Aa+1),++Aa)}},200)):(te.wheelDX+=b,te.wheelDY+=E))}}var Ii=function(a,y){this.ranges=a,this.primIndex=y};Ii.prototype.primary=function(){return this.ranges[this.primIndex]},Ii.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(!Ut(x.anchor,b.anchor)||!Ut(x.head,b.head))return!1}return!0},Ii.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new mr(nn(this.ranges[y].anchor),nn(this.ranges[y].head));return new Ii(a,this.primIndex)},Ii.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ii.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(gt(y,b.from())>=0&&gt(a,b.to())<=0)return x}return-1};var mr=function(a,y){this.anchor=a,this.head=y};mr.prototype.from=function(){return Nt(this.anchor,this.head)},mr.prototype.to=function(){return on(this.anchor,this.head)},mr.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(Ke,je){return gt(Ke.from(),je.from())}),x=He(y,E);for(var te=1;te<y.length;te++){var oe=y[te],ae=y[te-1],ue=gt(ae.to(),oe.from());if(b&&!oe.empty()?ue>0:ue>=0){var he=Nt(ae.from(),oe.from()),be=on(ae.to(),oe.to()),Ce=ae.empty()?oe.from()==oe.head:ae.from()==ae.head;te<=x&&--x,y.splice(--te,2,new mr(Ce?be:he,Ce?he:be))}}return new Ii(y,x)}function po(a,y){return new Ii([new mr(a,y||a)],0)}function vo(a){return a.text?_e(a.from.line+a.text.length-1,ke(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Ws(a,y){if(gt(a,y.from)<0)return a;if(gt(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),_e(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 mr(Ws(E.anchor,y),Ws(E.head,y)))}return Ki(a.cm,x,a.sel.primIndex)}function Hs(a,y,x){return a.line==y.line?_e(x.line,a.ch-y.ch+x.ch):_e(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=_e(a.first,0),te=E,oe=0;oe<y.length;oe++){var ae=y[oe],ue=Hs(ae.from,E,te),he=Hs(vo(ae),E,te);if(E=ae.to,te=he,x=="around"){var be=a.sel.ranges[oe],Ce=gt(be.head,be.anchor)<0;b[oe]=new mr(Ce?he:ue,Ce?ue:he)}else b[oe]=new mr(ue,ue)}return new Ii(b,a.sel.primIndex)}function os(a){a.doc.mode=$n(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&&Si(a)}function zs(a,y){return y.from.ch==0&&y.to.ch==0&&ke(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(ln){return x?x[ln]:null}function te(ln,tn,dn){Ar(ln,tn,dn,b),Nr(ln,"change",ln,y)}function oe(ln,tn){for(var dn=[],Cn=ln;Cn<tn;++Cn)dn.push(new Qn(he[Cn],E(Cn),b));return dn}var ae=y.from,ue=y.to,he=y.text,be=ot(a,ae.line),Ce=ot(a,ue.line),Ke=ke(he),je=E(he.length-1),yt=ue.line-ae.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 Lt=oe(0,he.length-1);te(Ce,Ce.text,je),yt&&a.remove(ae.line,yt),Lt.length&&a.insert(ae.line,Lt)}else if(be==Ce)if(he.length==1)te(be,be.text.slice(0,ae.ch)+Ke+be.text.slice(ue.ch),je);else{var zt=oe(1,he.length-1);zt.push(new Qn(Ke+be.text.slice(ue.ch),je,b)),te(be,be.text.slice(0,ae.ch)+he[0],E(0)),a.insert(ae.line+1,zt)}else if(he.length==1)te(be,be.text.slice(0,ae.ch)+he[0]+Ce.text.slice(ue.ch),E(0)),a.remove(ae.line+1,yt);else{te(be,be.text.slice(0,ae.ch)+he[0],E(0)),te(Ce,Ke+Ce.text.slice(ue.ch),je);var en=oe(1,he.length-1);yt>1&&a.remove(ae.line+1,yt-1),a.insert(ae.line+1,en)}Nr(a,"change",a,y)}function mo(a,y,x){function b(E,te,oe){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var ue=E.linked[ae];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||_n(a),a.options.mode=y.modeOption,Si(a)}function Gs(a){(a.doc.direction=="rtl"?ze:it)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Pi(a,function(){Gs(a),Si(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:nn(y.from),to:vo(y),text:qt(a,y.from,y.to)};return Vs(a,x,y.from.line,y.to.line+1),mo(a,function(b){return Vs(b,x,y.from.line,y.to.line+1)},!0),x}function js(a){for(;a.length;){var y=ke(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return js(a.done),ke(a.done);if(a.done.length&&!ke(a.done).ranges)return ke(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ke(a.done)}function Us(a,y,x,b){var E=a.history;E.undone.length=0;var te=+new Date,oe,ae;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)))ae=ke(oe.changes),gt(y.from,y.to)==0&&gt(y.from,ae.to)==0?ae.to=vo(y):oe.changes.push(ss(a,y));else{var ue=ke(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,ae||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,ke(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=ke(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vs(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=Tr(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 ae=0;ae<oe.length;++ae){for(var ue=oe[ae],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 No(a,y,x){for(var b=[],E=0;E<a.length;++E){var te=a[E];if(te.ranges){b.push(x?Ii.prototype.deepCopy.call(te):te);continue}var oe=te.changes,ae=[];b.push({changes:ae});for(var ue=0;ue<oe.length;++ue){var he=oe[ue],be=void 0;if(ae.push({from:he.from,to:he.to,text:he.text}),y)for(var Ce in he)(be=Ce.match(/^spans_(\d+)$/))&&He(y,Number(be[1]))>-1&&(ke(ae)[Ce]=he[Ce],delete he[Ce])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var te=gt(y,E)<0;te!=gt(x,E)<0?(E=y,y=x):te!=gt(y,x)<0&&(y=x)}return new mr(E,y)}else return new mr(x||y,y)}function Ra(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),pi(a,new Ii([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);pi(a,oe,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,pi(a,Ki(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){pi(a,po(y,x),b)}function du(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 mr(Ie(a,E[te].anchor),Ie(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=ke(b);E&&E.ranges?(b[b.length-1]=y,Fa(a,y,x)):pi(a,y,x)}function pi(a,y,x){Fa(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Fa(a,y,x){(Ot(a,"beforeSelectionChange")||a.cm&&Ot(a.cm,"beforeSelectionChange"))&&(y=du(a,y,x));var b=x&&x.bias||(gt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Fo(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,rn(a.cm)),Nr(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],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[te],ue=Ia(a,oe.anchor,ae&&ae.anchor,x,b),he=Ia(a,oe.head,ae&&ae.head,x,b);(E||ue!=oe.anchor||he!=oe.head)&&(E||(E=y.ranges.slice(0,te)),E[te]=new mr(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 ae=te.markedSpans[oe],ue=ae.marker,he="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,be="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((ae.from==null||(he?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(be?ae.to>=y.ch:ae.to>y.ch))){if(E&&(Qt(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(te.markedSpans){--oe;continue}else break;if(!ue.atomic)continue;if(x){var Ce=ue.find(b<0?1:-1),Ke=void 0;if((b<0?be:he)&&(Ce=el(a,Ce,-b,Ce&&Ce.line==y.line?te:null)),Ce&&Ce.line==y.line&&(Ke=gt(Ce,x))&&(b<0?Ke<0:Ke>0))return Oo(a,Ce,y,b,E)}var je=ue.find(b<0?-1:1);return(b<0?he:be)&&(je=el(a,je,b,je.line==y.line?te:null)),je?Oo(a,je,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,_e(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Ie(a,_e(y.line-1)):null:x>0&&y.ch==(b||ot(a,y.line)).text.length?y.line<a.first+a.size-1?_e(y.line+1,0):null:new _e(y.line,y.ch+x)}function tl(a){a.setSelection(_e(a.firstLine(),0),_e(a.lastLine()),xe)}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,ae){E&&(b.from=Ie(a,E)),te&&(b.to=Ie(a,te)),oe&&(b.text=oe),ae!==void 0&&(b.origin=ae)}),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 _o(a,y,x){if(a.cm){if(!a.cm.curOp)return ni(a.cm,_o)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Ot(a,"beforeChange")||a.cm&&Ot(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=fr&&!x&&Gr(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]==""&&gt(y.from,y.to)==0)){var x=is(a,y);Us(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Tr(a,y));var b=[];mo(a,function(E,te){!te&&He(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,Tr(E,y))})}}function Na(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,te,oe=a.sel,ae=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,he=0;he<ae.length&&(te=ae[he],!(x?te.ranges&&!te.equals(a.sel):!te.ranges));he++);if(he!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(te=ae.pop(),te.ranges){if(Ba(te,ue),x&&!te.equals(a.sel)){pi(a,te,{clearRedo:!1});return}oe=te}else if(b){ae.push(te);return}else break;var be=[];Ba(oe,ue),ue.push({changes:be,generation:E.generation}),E.generation=te.generation||++E.maxGeneration;for(var Ce=Ot(a,"beforeChange")||a.cm&&Ot(a.cm,"beforeChange"),Ke=function(Lt){var zt=te.changes[Lt];if(zt.origin=y,Ce&&!nl(a,zt,!1))return ae.length=0,{};be.push(ss(a,zt));var en=Lt?is(a,zt):ke(ae);oa(a,zt,en,Ks(a,zt)),!Lt&&a.cm&&a.cm.scrollIntoView({from:zt.from,to:vo(zt)});var ln=[];mo(a,function(tn,dn){!dn&&He(ln,tn.history)==-1&&(sl(tn.history,zt),ln.push(tn.history)),oa(tn,zt,null,Ks(tn,zt))})},je=te.changes.length-1;je>=0;--je){var yt=Ke(je);if(yt)return yt.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ii(Ye(a.sel.ranges,function(E){return new mr(_e(E.anchor.line+y,E.anchor.ch),_e(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Si(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 ni(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:_e(a.first,0),to:_e(y.to.line+E,y.to.ch),text:[ke(y.text)],origin:y.origin}}var te=a.lastLine();y.to.line>te&&(y={from:y.from,to:_e(te,ot(a,te).text.length),text:[y.text[0]],origin:y.origin}),y.removed=qt(a,y.from,y.to),x||(x=is(a,y)),a.cm?fu(a.cm,y,b):as(a,y,b),Fa(a,x,xe),a.cantEdit&&Ia(a,_e(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,te=y.from,oe=y.to,ae=!1,ue=te.line;a.options.lineWrapping||(ue=Ee($t(ot(b,te.line))),b.iter(ue,oe.line+1,function(je){if(je==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&rn(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ue,te.line+y.text.length,function(je){var yt=br(je);yt>E.maxLineLength&&(E.maxLine=je,E.maxLineLength=yt,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),Lr(b,te.line),na(a,400);var he=y.text.length-(oe.line-te.line)-1;y.full?Si(a):te.line==oe.line&&y.text.length==1&&!zs(a.doc,y)?ho(a,te.line,"text"):Si(a,te.line,oe.line+1,he);var be=Ot(a,"changes"),Ce=Ot(a,"change");if(Ce||be){var Ke={from:te,to:oe,text:y.text,removed:y.removed,origin:y.origin};Ce&&Nr(a,"change",a,Ke),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Ke)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var te;b||(b=x),gt(b,x)<0&&(te=[b,x],x=te[0],b=te[1]),typeof y=="string"&&(y=a.splitLines(y)),_o(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 ae=0;ae<te.ranges.length;ae++)ol(te.ranges[ae].anchor,y,x,b),ol(te.ranges[ae].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=_e(he.from.line+b,he.from.ch),he.to=_e(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,Vt(a,y)):E=Ee(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,jr(E),Nr(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 ae=[];this.collapse(ae),this.children=[new sa(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],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,ae=oe;ae<E.lines.length;){var ue=new sa(E.lines.slice(ae,ae+=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=He(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=Ee(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);jn(x,Math.max(0,x.height-te)),a&&(Pi(a,function(){ll(a,x,-te),ho(a,b,"widget")}),Nr(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&&(Kt(this.doc,b)||jn(b,b.height+E),x&&Pi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Nr(x,"lineWidgetChanged",x,a,Ee(b))}))},Gt(ua);function ll(a,y,x){Fn(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 ae=oe.widgets||(oe.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=oe,te&&!Kt(a,oe)){var ue=Fn(oe)<a.scrollTop;jn(oe,oe.height+gi(E)),ue&&qa(te,E.height),te.curOp.forceUpdate=!0}return!0}),te&&Nr(te,"lineWidgetAdded",te,E,typeof y=="number"?y:Ee(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&&Lo(a),Ot(this,"clear")){var x=this.find();x&&Nr(this,"clear",x.from,x.to)}for(var b=null,E=null,te=0;te<this.lines.length;++te){var oe=this.lines[te],ae=pr(oe.markedSpans,this);a&&!this.collapsed?ho(a,Ee(oe),"text"):a&&(ae.to!=null&&(E=Ee(oe)),ae.from!=null&&(b=Ee(oe))),oe.markedSpans=wr(oe.markedSpans,ae),ae.from==null&&this.collapsed&&!Kt(this.doc,oe)&&a&&jn(oe,Ai(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var he=$t(this.lines[ue]),be=br(he);be>a.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Si(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&&Nr(a,"markerCleared",a,this,b,E),y&&Do(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=pr(te.markedSpans,this);if(oe.from!=null&&(x=_e(y?te:Ee(te),oe.from),a==-1))return x;if(oe.to!=null&&(b=_e(y?te:Ee(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=Ee(y.line),oe=qi(b,te);if(oe&&(Ko(oe),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!Kt(x.doc,E)&&x.height!=null){var ae=x.height;x.height=null;var ue=gi(x)-ae;ue&&jn(E,E.height+ue)}Nr(b,"markerChanged",b,a)})},go.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||He(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},go.prototype.detachLine=function(a){if(this.lines.splice(He(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Gt(go);function Ho(a,y,x,b,E){if(b&&b.shared)return vu(a,y,x,b,E);if(a.cm&&!a.cm.curOp)return ni(a.cm,Ho)(a,y,x,b,E);var te=new go(a,E),oe=gt(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=bt("span",[te.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(hn(a,y.line,y,x,te)||y.line!=x.line&&hn(a,x.line,y,x,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");Jn()}te.addToHistory&&Us(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,ue=a.cm,he;if(a.iter(ae,x.line+1,function(Ce){ue&&te.collapsed&&!ue.options.lineWrapping&&$t(Ce)==ue.display.maxLine&&(he=!0),te.collapsed&&ae!=y.line&&jn(Ce,0),lr(Ce,new sr(te,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),te.collapsed&&a.iter(y.line,x.line+1,function(Ce){Kt(a,Ce)&&jn(Ce,0)}),te.clearOnEnter&&Et(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(Mr(),(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)Si(ue,y.line,x.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var be=y.line;be<=x.line;be++)ho(ue,be,"text");te.atomic&&qs(ue.doc),Nr(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();Nr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Gt(ca);function vu(a,y,x,b,E){b=dt(b),b.shared=!1;var te=[Ho(a,y,x,b,E)],oe=te[0],ae=b.widgetNode;return mo(a,function(ue){ae&&(b.widgetNode=ae.cloneNode(!0)),te.push(Ho(ue,Ie(ue,y),Ie(ue,x),b,E));for(var he=0;he<ue.linked.length;++he)if(ue.linked[he].isParent)return;oe=ke(te)}),new ca(te,oe)}function cl(a){return a.findMarks(_e(a.first,0),a.clipPos(_e(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(gt(te,oe)){var ae=Ho(a,te,oe,b.primary,b.primary.type);b.markers.push(ae),ae.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 ae=E.markers[oe];He(te,ae.doc)==-1&&(ae.parent=null,E.markers.splice(oe--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,ki=function(a,y,x,b,E){if(!(this instanceof ki))return new ki(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new Qn("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var te=_e(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}),pi(this,po(te),xe)};ki.prototype=ee(la.prototype,{constructor:ki,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=Sn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:ri(function(a){var y=_e(this.first,0),x=this.first+this.size-1;_o(this,{from:y,to:_e(x,ot(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),pi(this,po(y),xe)}),replaceRange:function(a,y,x,b){y=Ie(this,y),x=x?Ie(this,x):y,Wo(this,a,y,x,b)},getRange:function(a,y,x){var b=qt(this,Ie(this,a),Ie(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 Ee(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=ot(this,a)),$t(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Ie(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:ri(function(a,y,x){Xs(this,Ie(this,typeof a=="number"?_e(a,y||0):a),null,x)}),setSelection:ri(function(a,y,x){Xs(this,Ie(this,a),Ie(this,y||a),x)}),extendSelection:ri(function(a,y,x){Ra(this,Ie(this,a),y&&Ie(this,y),x)}),extendSelections:ri(function(a,y){Ys(this,Yt(this,a),y)}),extendSelectionsBy:ri(function(a,y){var x=Ye(this.sel.ranges,a);Ys(this,Yt(this,x),y)}),setSelections:ri(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new mr(Ie(this,a[E].anchor),Ie(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),pi(this,Ki(this.cm,b,y),x)}}),addSelection:ri(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new mr(Ie(this,a),Ie(this,y||a))),pi(this,Ki(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=qt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=qt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ri(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 ae=y&&y!="end"&&ou(this,b,y),ue=b.length-1;ue>=0;ue--)_o(this,b[ue]);ae?Js(this,ae):this.cm&&Fo(this.cm)}),undo:ri(function(){Na(this,"undo")}),redo:ri(function(){Na(this,"redo")}),undoSelection:ri(function(){Na(this,"undo",!0)}),redoSelection:ri(function(){Na(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:No(this.history.done),undone:No(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=No(a.done.slice(0),null,!0),y.undone=No(a.undone.slice(0),null,!0)},setGutterMarker:ri(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:ri(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=Ee(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:ri(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(lt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ri(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(lt(x));if(!oe)return!1;var ae=oe.index+oe[0].length;b[E]=te.slice(0,oe.index)+(!oe.index||ae==te.length?"":" ")+te.slice(ae)||null}else return!1;return!0})}),addLineWidget:ri(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ho(this,Ie(this,a),Ie(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=Ie(this,a),Ho(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Ie(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=Ie(this,a),y=Ie(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 ae=0;ae<oe.length;ae++){var ue=oe[ae];!(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}),Ie(this,_e(x,y))},indexFromPos:function(a){a=Ie(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 ki(Sn(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 ki(Sn(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 Or&&(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=No(this.history.done,b),a.history.undone=No(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):ir(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ri(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))})}),ki.prototype.eachLine=ki.prototype.iter;var hl=0;function bu(a){var y=this;if(dl(y),!(nt(y,a)||li(y.display,a))){sn(a),ge&&(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,ae=function(){++oe==E&&ni(y,function(){x=Ie(y.doc,x);var je={from:x,to:x,text:y.doc.splitLines(te.filter(function(yt){return yt!=null}).join(y.doc.lineSeparator())),origin:"paste"};_o(y.doc,je),Js(y.doc,po(Ie(y.doc,x),Ie(y.doc,vo(je))))})()},ue=function(je,yt){if(y.options.allowDropFileTypes&&He(y.options.allowDropFileTypes,je.type)==-1){ae();return}var Lt=new FileReader;Lt.onerror=function(){return ae()},Lt.onload=function(){var zt=Lt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(zt)){ae();return}te[yt]=zt,ae()},Lt.readAsText(je)},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 be=a.dataTransfer.getData("Text");if(be){var Ce;if(y.state.draggingText&&!y.state.draggingText.copy&&(Ce=y.listSelections()),Fa(y.doc,po(x,x)),Ce)for(var Ke=0;Ke<Ce.length;++Ke)Wo(y.doc,"",Ce[Ke].anchor,Ce[Ke].head,"drag");y.replaceSelection(be,"around","paste"),y.display.input.focus()}}catch(je){}}}}function xu(a,y){if(ge&&(!a.state.draggingText||+new Date-hl<100)){mn(y);return}if(!(nt(a,y)||li(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!$e)){var x=Ue("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",fe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),fe&&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=Ue("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Je(a.display.dragCursor,b)}}function dl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function fl(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;Et(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,fl(ku)},100))}),Et(window,"blur",function(){return fl(Ro)})}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 da=1;da<=12;da++)yo[da+111]=yo[da+63235]="F"+da;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=De?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 ae=y[oe];if(/^(cmd|meta|m)$/i.test(ae))te=!0;else if(/^a(lt)?$/i.test(ae))x=!0;else if(/^(c|ctrl|control)$/i.test(ae))b=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),te&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Lu(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=Ye(x.split(" "),Eu),te=0;te<E.length;te++){var oe=void 0,ae=void 0;te==E.length-1?(ae=E.join(" "),oe=b):(ae=E.slice(0,te+1).join(" "),oe="...");var ue=y[ae];if(!ue)y[ae]=oe;else if(ue!=oe)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var he in y)a[he]=y[he];return a}function zo(a,y,x,b){y=_a(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),(st?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(st?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(fe&&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 _a(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&&gt(te.from,ke(b).to)<=0;){var oe=b.pop();if(gt(oe.from,te.from)<0){te.from=oe.from;break}}b.push(te)}Pi(a,function(){for(var ae=b.length-1;ae>=0;ae--)Wo(a.doc,"",b[ae].from,b[ae].to,"+delete");Fo(a)})}function cs(a,y,x){var b=wt(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 _e(y.line,b,x<0?"after":"before")}function ds(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var te=Xt(x,y.doc.direction);if(te){var oe=E<0?ke(te):te[0],ae=E<0==(oe.level==1),ue=ae?"after":"before",he;if(oe.level>0||y.doc.direction=="rtl"){var be=uo(y,x);he=E<0?x.text.length-1:0;var Ce=Wi(y,be,he).top;he=Ct(function(Ke){return Wi(y,be,Ke).top==Ce},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 _e(b,he,ue)}}return new _e(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=Xt(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=It(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 ae=function(en,ln){return cs(y,en instanceof _e?en.ch:en,ln)},ue,he=function(en){return a.options.lineWrapping?(ue=ue||uo(a,y),Vr(a,y,ue,en)):{begin:0,end:y.text.length}},be=he(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||oe.level==1){var Ce=oe.level==1==b<0,Ke=ae(x,Ce?1:-1);if(Ke!=null&&(Ce?Ke<=oe.to&&Ke<=be.end:Ke>=oe.from&&Ke>=be.begin)){var je=Ce?"before":"after";return new _e(x.line,Ke,je)}}var yt=function(en,ln,tn){for(var dn=function(Br,ii){return ii?new _e(x.line,ae(Br,1),"before"):new _e(x.line,Br,"after")};en>=0&&en<E.length;en+=ln){var Cn=E[en],vn=ln>0==(Cn.level!=1),Gn=vn?tn.begin:ae(tn.end,-1);if(Cn.from<=Gn&&Gn<Cn.to||(Gn=vn?Cn.from:ae(Cn.to,-1),tn.begin<=Gn&&Gn<tn.end))return dn(Gn,vn)}},Lt=yt(te+b,b,be);if(Lt)return Lt;var zt=b>0?be.end:ae(be.begin,-1);return zt!=null&&!(b>0&&zt==y.text.length)&&(Lt=yt(b>0?0:E.length-1,b,he(zt)),Lt)?Lt:null}var fa={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),xe)},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:_e(y.head.line+1,0)}:{from:y.head,to:_e(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:_e(y.from().line,0),to:Ie(a.doc,_e(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:_e(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(_e(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(_e(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")},Se)},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")},Se)},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},Se)},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(ct(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 _e(E.line,E.ch-1)),E.ch>0)E=new _e(E.line,E.ch+1),a.replaceRange(te.charAt(E.ch-1)+te.charAt(E.ch-2),_e(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 _e(E.line,1),a.replaceRange(te.charAt(0)+a.doc.lineSeparator()+oe.charAt(oe.length-1),_e(E.line-1,oe.length-1),E,"+transpose"))}}x.push(new mr(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);Fo(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=$t(x);return b!=x&&(y=Ee(b)),ds(!0,a,b,y,1)}function Mu(a,y){var x=ot(a.doc,y),b=xn(x);return b!=x&&(y=Ee(b)),ds(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=ot(a.doc,x.line),E=Xt(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 _e(x.line,oe?0:te,x.sticky)}return x}function Wa(a,y,x){if(typeof y=="string"&&(y=fa[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"&&Nr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(sn(x),Xa(a)),!!E}function wl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Wa(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Wa(a,b)}):pa(a,x,y,function(b){return Wa(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Wa(a,b,!0)})}var fs=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Le(),!nt(y,a))){ge&&ye<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);fe&&(fs=b?x:null,!b&&x==88&&!Nn&&(De?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),se&&!De&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Bu(y)}}function Bu(a){var y=a.display.lineDiv;ze(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(it(y,"CodeMirror-crosshair"),kt(document,"keyup",x),kt(document,"mouseover",x))}Et(document,"keyup",x),Et(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),nt(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(li(y.display,a)||nt(y,a)||a.ctrlKey&&!a.altKey||De&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(fe&&x==fs){fs=null,sn(a);return}if(!(fe&&(!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 Ru=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+Ru>a&&gt(y,this.pos)==0&&x==this.button};var va,ma;function Fu(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(!(nt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,li(x,a)){Re||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=Co(y,a),E=Un(a),te=b?Fu(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):nr(a)==x.scroller&&sn(a):E==2?(b&&Ra(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(qe?y.display.input.onContextMenu(a):Ls(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=fa[oe]),!oe)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=oe(a,x)!=ut}finally{a.state.suppressEdits=!1}return ae})}function Nu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var te=tt?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=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){ge?setTimeout(St(Es,a),0):a.curOp.focus=Le();var E=Nu(a,x,b),te=a.doc.sel,oe;a.options.dragDrop&&zr&&!a.isReadOnly()&&x=="single"&&(oe=te.contains(y))>-1&&(gt((oe=te.ranges[oe]).from(),y)<0||y.xRel>0)&&(gt(oe.to(),y)>0||y.xRel<0)?_u(a,b,y,E):Wu(a,b,y,E)}function _u(a,y,x,b){var E=a.display,te=!1,oe=ni(a,function(he){Re&&(E.scroller.draggable=!1),a.state.draggingText=!1,kt(E.wrapper.ownerDocument,"mouseup",oe),kt(E.wrapper.ownerDocument,"mousemove",ae),kt(E.scroller,"dragstart",ue),kt(E.scroller,"drop",oe),te||(sn(he),b.addNew||Ra(a.doc,x,null,null,b.extend),Re&&!$e||ge&&ye==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(he){te=te||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ue=function(){return te=!0};Re&&(E.scroller.draggable=!0),a.state.draggingText=oe,oe.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Et(E.wrapper.ownerDocument,"mouseup",oe),Et(E.wrapper.ownerDocument,"mousemove",ae),Et(E.scroller,"dragstart",ue),Et(E.scroller,"drop",oe),Ls(a),setTimeout(function(){return E.input.focus()},20)}function Ll(a,y,x){if(x=="char")return new mr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new mr(_e(y.line,0),Ie(a.doc,_e(y.line+1,0)));var b=x(a,y);return new mr(b.from,b.to)}function Wu(a,y,x,b){var E=a.display,te=a.doc;sn(y);var oe,ae,ue=te.sel,he=ue.ranges;if(b.addNew&&!b.extend?(ae=te.sel.contains(x),ae>-1?oe=he[ae]:oe=new mr(x,x)):(oe=te.sel.primary(),ae=te.sel.primIndex),b.unit=="rectangle")b.addNew||(oe=new mr(x,x)),x=Co(a,y,!0,!0),ae=-1;else{var be=Ll(a,x,b.unit);b.extend?oe=ls(oe,be.anchor,be.head,b.extend):oe=be}b.addNew?ae==-1?(ae=he.length,pi(te,Ki(a,he.concat([oe]),ae),{scroll:!1,origin:"*mouse"})):he.length>1&&he[ae].empty()&&b.unit=="char"&&!b.extend?(pi(te,Ki(a,he.slice(0,ae).concat(he.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),ue=te.sel):us(te,ae,oe,Be):(ae=0,pi(te,new Ii([oe],0),Be),ue=te.sel);var Ce=x;function Ke(tn){if(gt(Ce,tn)!=0)if(Ce=tn,b.unit=="rectangle"){for(var dn=[],Cn=a.options.tabSize,vn=pe(ot(te,x.line).text,x.ch,Cn),Gn=pe(ot(te,tn.line).text,tn.ch,Cn),Br=Math.min(vn,Gn),ii=Math.max(vn,Gn),_r=Math.min(x.line,tn.line),Bi=Math.min(a.lastLine(),Math.max(x.line,tn.line));_r<=Bi;_r++){var Ei=ot(te,_r).text,Qr=Qe(Ei,Br,Cn);Br==ii?dn.push(new mr(_e(_r,Qr),_e(_r,Qr))):Ei.length>Qr&&dn.push(new mr(_e(_r,Qr),_e(_r,Qe(Ei,ii,Cn))))}dn.length||dn.push(new mr(x,x)),pi(te,Ki(a,ue.ranges.slice(0,ae).concat(dn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(tn)}else{var Li=oe,ci=Ll(a,tn,b.unit),ei=Li.anchor,qr;gt(ci.anchor,ei)>0?(qr=ci.head,ei=Nt(Li.from(),ci.anchor)):(qr=ci.anchor,ei=on(Li.to(),ci.head));var Hr=ue.ranges.slice(0);Hr[ae]=Hu(a,new mr(Ie(te,ei),qr)),pi(te,Ki(a,Hr,ae),Be)}}var je=E.wrapper.getBoundingClientRect(),yt=0;function Lt(tn){var dn=++yt,Cn=Co(a,tn,!0,b.unit=="rectangle");if(Cn)if(gt(Cn,Ce)!=0){a.curOp.focus=Le(),Ke(Cn);var vn=Da(E,te);(Cn.line>=vn.to||Cn.line<vn.from)&&setTimeout(ni(a,function(){yt==dn&&Lt(tn)}),150)}else{var Gn=tn.clientY<je.top?-20:tn.clientY>je.bottom?20:0;Gn&&setTimeout(ni(a,function(){yt==dn&&(E.scroller.scrollTop+=Gn,Lt(tn))}),50)}}function zt(tn){a.state.selectingText=!1,yt=1/0,tn&&(sn(tn),E.input.focus()),kt(E.wrapper.ownerDocument,"mousemove",en),kt(E.wrapper.ownerDocument,"mouseup",ln),te.history.lastSelOrigin=null}var en=ni(a,function(tn){tn.buttons===0||!Un(tn)?zt(tn):Lt(tn)}),ln=ni(a,zt);a.state.selectingText=ln,Et(E.wrapper.ownerDocument,"mousemove",en),Et(E.wrapper.ownerDocument,"mouseup",ln)}function Hu(a,y){var x=y.anchor,b=y.head,E=ot(a.doc,x.line);if(gt(x,b)==0&&x.sticky==b.sticky)return y;var te=Xt(E);if(!te)return y;var oe=It(te,x.ch,x.sticky),ae=te[oe];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var ue=oe+(ae.from==x.ch==(ae.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 be=It(te,b.ch,b.sticky),Ce=be-oe||(b.ch-x.ch)*(ae.level==1?-1:1);be==ue-1||be==ue?he=Ce<0:he=Ce>0}var Ke=te[ue+(he?-1:0)],je=he==(Ke.level==1),yt=je?Ke.from:Ke.to,Lt=je?"after":"before";return x.ch==yt&&x.sticky==Lt?y:new mr(new _e(x.line,yt,Lt),b)}function Dl(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(Ke){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&sn(y);var oe=a.display,ae=oe.lineDiv.getBoundingClientRect();if(te>ae.bottom||!Ot(a,x))return un(y);te-=ae.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 be=Me(a.doc,te),Ce=a.display.gutterSpecs[ue];return Qt(a,x,a,be,Ce.className,y),un(y)}}}function vs(a,y){return Dl(a,y,"gutterClick",!0)}function Ml(a,y){li(a.display,y)||zu(a,y)||nt(a,y,"contextmenu")||qe||a.display.input.onContextMenu(y)}function zu(a,y){return Ot(a,"gutterContextMenu")?Dl(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={},Ha={};function Zu(a){var y=a.optionHandlers;function x(b,E,te,oe){a.defaults[b]=E,te&&(y[b]=oe?function(ae,ue,he){he!=Go&&te(ae,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),Si(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 be=ue.text.indexOf(E,he);if(be==-1)break;he=be+E.length,te.push(_e(oe,be))}oe++});for(var ae=te.length-1;ae>=0;ae--)Wo(b.doc,E,te[ae],_e(te[ae].line,te[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,te){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),te!=Go&&b.refresh()}),x("specialCharPlaceholder",zi,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Pe?"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",!at),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ra(b)},!0),x("keyMap","default",function(b,E,te){var oe=_a(E),ae=te!=Go&&_a(te);ae&&ae.detach&&ae.detach(b,oe),oe.attach&&oe.attach(b,ae||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"&&(Ro(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?Et:kt;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?(ze(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(it(a.display.wrapper,"CodeMirror-wrap"),_n(a)),Ya(a),Si(a),wo(a),setTimeout(function(){return Io(a)},100)}function Or(a,y){var x=this;if(!(this instanceof Or))return new Or(a,y);this.options=y=y?dt(y):{},dt(Al,y,!1);var b=y.value;typeof b=="string"?b=new ki(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Or.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&&!Pe&&te.input.focus(),ge&&ye<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Uu(this),Cu(),Lo(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Pe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Ro(this);for(var oe in Ha)Ha.hasOwnProperty(oe)&&Ha[oe](this,y[oe],Go);Is(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ms.length;++ae)ms[ae](this);Do(this),Re&&y.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Or.defaults=Al,Or.optionHandlers=Ha;function Uu(a){var y=a.display;Et(y.scroller,"mousedown",ni(a,El)),ge&&ye<11?Et(y.scroller,"dblclick",ni(a,function(ue){if(!nt(a,ue)){var he=Co(a,ue);if(!(!he||vs(a,ue)||li(a.display,ue))){sn(ue);var be=a.findWordAt(he);Ra(a.doc,be.anchor,be.head)}}})):Et(y.scroller,"dblclick",function(ue){return nt(a,ue)||sn(ue)}),Et(y.scroller,"contextmenu",function(ue){return Ml(a,ue)}),Et(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 be=he.left-ue.left,Ce=he.top-ue.top;return be*be+Ce*Ce>20*20}Et(y.scroller,"touchstart",function(ue){if(!nt(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)}}),Et(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Et(y.scroller,"touchend",function(ue){var he=y.activeTouch;if(he&&!li(y,ue)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),Ce;!he.prev||oe(he,he.prev)?Ce=new mr(be,be):!he.prev.prev||oe(he,he.prev.prev)?Ce=a.findWordAt(be):Ce=new mr(_e(be.line,0),Ie(a.doc,_e(be.line+1,0))),a.setSelection(Ce.anchor,Ce.head),a.focus(),sn(ue)}E()}),Et(y.scroller,"touchcancel",E),Et(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),ko(a,y.scroller.scrollLeft,!0),Qt(a,"scroll",a))}),Et(y.scroller,"mousewheel",function(ue){return _s(a,ue)}),Et(y.scroller,"DOMMouseScroll",function(ue){return _s(a,ue)}),Et(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){nt(a,ue)||mn(ue)},over:function(ue){nt(a,ue)||(wu(a,ue),mn(ue))},start:function(ue){return xu(a,ue)},drop:ni(a,bu),leave:function(ue){nt(a,ue)||dl(a)}};var ae=y.input.getField();Et(ae,"keyup",function(ue){return Sl.call(a,ue)}),Et(ae,"keydown",ni(a,Cl)),Et(ae,"keypress",ni(a,kl)),Et(ae,"focus",function(ue){return Ja(a,ue)}),Et(ae,"blur",function(ue){return Ro(a,ue)})}var ms=[];Or.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=cr(a,y).state:x="prev");var oe=a.options.tabSize,ae=ot(E,y),ue=pe(ae.text,null,oe);ae.stateAfter&&(ae.stateAfter=null);var he=ae.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(ae.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(te,ae.text.slice(he.length),ae.text),be==ut||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe(ot(E,y-1).text,null,oe):be=0:x=="add"?be=ue+a.options.indentUnit:x=="subtract"?be=ue-a.options.indentUnit:typeof x=="number"&&(be=ue+x),be=Math.max(0,be);var Ce="",Ke=0;if(a.options.indentWithTabs)for(var je=Math.floor(be/oe);je;--je)Ke+=oe,Ce+=" ";if(Ke<be&&(Ce+=ct(be-Ke)),Ce!=he)return Wo(E,Ce,_e(y,0),_e(y,he.length),"+input"),ae.stateAfter=null,!0;for(var yt=0;yt<E.sel.ranges.length;yt++){var Lt=E.sel.ranges[yt];if(Lt.head.line==y&&Lt.head.ch<he.length){var zt=_e(y,he.length);us(E,yt,new mr(zt,zt));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,ae=E=="paste"||a.state.pasteIncoming>oe,ue=ir(y),he=null;if(ae&&b.ranges.length>1)if(Yi&&Yi.text.join(`
`)==y){if(b.ranges.length%Yi.text.length==0){he=[];for(var be=0;be<Yi.text.length;be++)he.push(te.splitLines(Yi.text[be]))}}else ue.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(he=Ye(ue,function(en){return[en]}));for(var Ce=a.curOp.updateInput,Ke=b.ranges.length-1;Ke>=0;Ke--){var je=b.ranges[Ke],yt=je.from(),Lt=je.to();je.empty()&&(x&&x>0?yt=_e(yt.line,yt.ch-x):a.state.overwrite&&!ae?Lt=_e(Lt.line,Math.min(ot(te,Lt.line).text.length,Lt.ch+ke(ue).length)):ae&&Yi&&Yi.lineWise&&Yi.text.join(`
`)==ue.join(`
`)&&(yt=Lt=_e(yt.line,0)));var zt={from:yt,to:Lt,text:he?he[Ke%he.length]:ue,origin:E||(ae?"paste":a.state.cutIncoming>oe?"cut":"+input")};_o(a.doc,zt),Nr(a,"inputRead",a,zt)}y&&!ae&&Bl(a,y),Fo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ce),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 ae=0;ae<te.electricChars.length;ae++)if(y.indexOf(te.electricChars.charAt(ae))>-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&&Nr(a,"electricInput",a,E.head.line)}}}function Rl(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:_e(E,0),head:_e(E+1,0)};x.push(te),y.push(a.getRange(te.anchor,te.head))}return{text:y,ranges:x}}function Fl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Il(){var a=Ue("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ue("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Re?a.style.width="1000px":a.setAttribute("wrap","off"),We&&(a.style.border="1px solid black"),Fl(a),y}function Vu(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)&&ni(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"](_a(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.");Xe(this.state.overlays,{mode:te,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(oe){return oe.priority}),this.state.modeGen++,Si(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++,Si(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 ae=E[oe];if(ae.empty())ae.head.line>te&&(ga(this,ae.head.line,b,!0),te=ae.head.line,oe==this.doc.sel.primIndex&&Fo(this));else{var ue=ae.from(),he=ae.to(),be=Math.max(te,ue.line);te=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Ce=be;Ce<te;++Ce)ga(this,Ce,b);var Ke=this.doc.sel.ranges;ue.ch==0&&E.length==Ke.length&&Ke[oe].from().ch>0&&us(this.doc,oe,new mr(ue,Ke[oe].to()),xe)}}}),getTokenAt:function(b,E){return hr(this,b,E)},getLineTokens:function(b,E){return hr(this,_e(b),E,!0)},getTokenTypeAt:function(b){b=Ie(this.doc,b);var E=Tn(this,ot(this.doc,b.line)),te=0,oe=(E.length-1)/2,ae=b.ch,ue;if(ae==0)ue=E[2];else for(;;){var he=te+oe>>1;if((he?E[he*2-1]:0)>=ae)oe=he;else if(E[he*2+1]<ae)te=he+1;else{ue=E[he*2+2];break}}var be=ue?ue.indexOf("overlay "):-1;return be<0?ue:be==0?null:ue.slice(0,be-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var te=[];if(!x.hasOwnProperty(E))return te;var oe=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")oe[ae[E]]&&te.push(oe[ae[E]]);else if(ae[E])for(var ue=0;ue<ae[E].length;ue++){var he=oe[ae[E][ue]];he&&te.push(he)}else ae.helperType&&oe[ae.helperType]?te.push(oe[ae.helperType]):oe[ae.name]&&te.push(oe[ae.name]);for(var be=0;be<oe._global.length;be++){var Ce=oe._global[be];Ce.pred(ae,this)&&He(te,Ce.val)==-1&&te.push(Ce.val)}return te},getStateAfter:function(b,E){var te=this.doc;return b=Vt(te,b==null?te.first+te.size-1:b),cr(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=Ie(this.doc,b):te=b?oe.from():oe.to(),Ci(this,te,E||"page")},charCoords:function(b,E){return Bo(this,Ie(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ui(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Me(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,te){var oe=!1,ae;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),ae=ot(this.doc,b)}else ae=b;return Po(this,ae,{top:0,left:0},E||"page",te||oe).top+(oe?this.doc.height-Fn(ae):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Vi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,te,oe,ae){var ue=this.display;b=Ci(this,Ie(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),oe=="over")he=b.top;else if(oe=="above"||oe=="near"){var Ce=Math.max(ue.wrapper.clientHeight,this.doc.height),Ke=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(oe=="above"||b.bottom+E.offsetHeight>Ce)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Ce&&(he=b.bottom),be+E.offsetWidth>Ke&&(be=Ke-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",ae=="right"?(be=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?be=0:ae=="middle"&&(be=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),te&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:yi(Cl),triggerOnKeyPress:yi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:yi(El),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:yi(function(b){Bl(this,b)}),findPosH:function(b,E,te,oe){var ae=1;E<0&&(ae=-1,E=-E);for(var ue=Ie(this.doc,b),he=0;he<E&&(ue=ys(this.doc,ue,ae,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()},Se)}),deleteH:yi(function(b,E){var te=this.doc.sel,oe=this.doc;te.somethingSelected()?oe.replaceSelection("",null,"+delete"):Zo(this,function(ae){var ue=ys(oe,ae.head,b,E,!1);return b<0?{from:ue,to:ae.head}:{from:ae.head,to:ue}})}),findPosV:function(b,E,te,oe){var ae=1,ue=oe;E<0&&(ae=-1,E=-E);for(var he=Ie(this.doc,b),be=0;be<E;++be){var Ce=Ci(this,he,"div");if(ue==null?ue=Ce.left:Ce.left=ue,he=Nl(this,Ce,ae,te),he.hitSide)break}return he},moveV:yi(function(b,E){var te=this,oe=this.doc,ae=[],ue=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(be){if(ue)return b<0?be.from():be.to();var Ce=Ci(te,be.head,"div");be.goalColumn!=null&&(Ce.left=be.goalColumn),ae.push(Ce.left);var Ke=Nl(te,Ce,b,E);return E=="page"&&be==oe.sel.primary()&&qa(te,Bo(te,Ke,"div").top-Ce.top),Ke},Se),ae.length)for(var he=0;he<oe.sel.ranges.length;he++)oe.sel.ranges[he].goalColumn=ae[he]}),findWordAt:function(b){var E=this.doc,te=ot(E,b.line).text,oe=b.ch,ae=b.ch;if(te){var ue=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==te.length)&&oe?--oe:++ae;for(var he=te.charAt(oe),be=le(he,ue)?function(Ce){return le(Ce,ue)}:/\s/.test(he)?function(Ce){return/\s/.test(Ce)}:function(Ce){return!/\s/.test(Ce)&&!le(Ce)};oe>0&&be(te.charAt(oe-1));)--oe;for(;ae<te.length&&be(te.charAt(ae));)++ae}return new mr(_e(b.line,oe),_e(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ze(this.display.cursorDiv,"CodeMirror-overwrite"):it(this.display.cursorDiv,"CodeMirror-overwrite"),Qt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Le()},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:_e(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 ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(ue){if(ue.widgets){for(var he=0;he<ue.widgets.length;he++)if(ue.widgets[he].noHScroll){ho(te,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,Qt(this,"refresh",this)}),operation:function(b){return Pi(this,b)},startOperation:function(){return Lo(this)},endOperation:function(){return Do(this)},refresh:yi(function(){var b=this.display.cachedTextHeight;Si(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,Nr(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}},Gt(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,ae=ot(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function he(){var ln=y.line+ue;return ln<a.first||ln>=a.first+a.size?!1:(y=new _e(ln,y.ch,y.sticky),ae=ot(a,ln))}function be(ln){var tn;if(b=="codepoint"){var dn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(dn)?tn=null:tn=new _e(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(dn>=55296&&dn<56320?2:1))),-x)}else E?tn=Du(a.cm,ae,y,x):tn=hs(ae,y,x);if(tn==null)if(!ln&&he())y=ds(E,a.cm,ae,y.line,ue);else return!1;else y=tn;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var Ce=null,Ke=b=="group",je=a.cm&&a.cm.getHelper(y,"wordChars"),yt=!0;!(x<0&&!be(!yt));yt=!1){var Lt=ae.text.charAt(y.ch)||`
`,zt=le(Lt,je)?"w":Ke&&Lt==`
`?"n":!Ke||/\s/.test(Lt)?null:"p";if(Ke&&!yt&&!zt&&(zt="s"),Ce&&Ce!=zt){x<0&&(x=1,be(),y.sticky="after");break}if(zt&&(Ce=zt),x>0&&!be(!yt))break}var en=Ia(a,y,te,oe,!0);return Ut(te,en)&&(en.hitSide=!0),en}function Nl(a,y,x,b){var E=a.doc,te=y.left,oe;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(ae-.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=ui(a,te,oe),!!he.outside;){if(x<0?oe<=0:oe>=E.height){he.hitSide=!0;break}oe+=x*5}return he}var Sr=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};Sr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Fl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function te(ae){for(var ue=ae.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Et(E,"paste",function(ae){!te(ae)||nt(b,ae)||Pl(ae,b)||ye<=11&&setTimeout(ni(b,function(){return y.updateFromDOM()}),20)}),Et(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),Et(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),Et(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Et(E,"touchstart",function(){return x.forceCompositionEnd()}),Et(E,"input",function(){y.composing||y.readFromDOMSoon()});function oe(ae){if(!(!te(ae)||nt(b,ae))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Rl(b);za({lineWise:!0,text:ue.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,xe),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var he=Yi.text.join(`
`);if(ae.clipboardData.setData("Text",he),ae.clipboardData.getData("Text")==he){ae.preventDefault();return}}var be=Il(),Ce=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),Ce.value=Yi.text.join(`
`);var Ke=document.activeElement;pt(Ce),setTimeout(function(){b.display.lineSpace.removeChild(be),Ke.focus(),Ke==E&&x.showPrimarySelection()},50)}}Et(E,"copy",oe),Et(E,"cut",oe)},Sr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Sr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},Sr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Sr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Sr.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&&gt(Nt(te,oe),b)==0&&gt(on(te,oe),E)==0)){var ae=y.display.view,ue=b.line>=y.display.viewFrom&&Ol(y,b)||{node:ae[0].measure.map[2],offset:0},he=E.line<y.display.viewTo&&Ol(y,E);if(!he){var be=ae[ae.length-1].measure,Ce=be.maps?be.maps[be.maps.length-1]:be.map;he={node:Ce[Ce.length-1],offset:Ce[Ce.length-2]-Ce[Ce.length-3]}}if(!ue||!he){a.removeAllRanges();return}var Ke=a.rangeCount&&a.getRangeAt(0),je;try{je=Ae(ue.node,ue.offset,he.offset,he.node)}catch(yt){}je&&(!se&&y.state.focused?(a.collapse(ue.node,ue.offset),je.collapsed||(a.removeAllRanges(),a.addRange(je))):(a.removeAllRanges(),a.addRange(je)),Ke&&a.anchorNode==null?a.addRange(Ke):se&&this.startGracePeriod()),this.rememberSelection()}},Sr.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)},Sr.prototype.showMultipleSelections=function(a){Je(this.cm.display.cursorDiv,a.cursors),Je(this.cm.display.selectionDiv,a.selection)},Sr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Sr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ze(this.div,y)},Sr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Sr.prototype.blur=function(){this.div.blur()},Sr.prototype.getField=function(){return this.div},Sr.prototype.supportsTouch=function(){return!0},Sr.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)},Sr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Sr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Te&&we&&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(){pi(y.doc,po(x,b),xe),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Sr.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=_e(b.line-1,ot(a.doc,b.line-1).length)),E.ch==ot(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=_e(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var te,oe,ae;b.line==y.viewFrom||(te=So(a,b.line))==0?(oe=Ee(y.view[0].line),ae=y.view[0].node):(oe=Ee(y.view[te].line),ae=y.view[te-1].node.nextSibling);var ue=So(a,E.line),he,be;if(ue==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=Ee(y.view[ue+1].line)-1,be=y.view[ue+1].node.previousSibling),!ae)return!1;for(var Ce=a.doc.splitLines(Yu(a,ae,be,oe,he)),Ke=qt(a.doc,_e(oe,0),_e(he,ot(a.doc,he).text.length));Ce.length>1&&Ke.length>1;)if(ke(Ce)==ke(Ke))Ce.pop(),Ke.pop(),he--;else if(Ce[0]==Ke[0])Ce.shift(),Ke.shift(),oe++;else break;for(var je=0,yt=0,Lt=Ce[0],zt=Ke[0],en=Math.min(Lt.length,zt.length);je<en&&Lt.charCodeAt(je)==zt.charCodeAt(je);)++je;for(var ln=ke(Ce),tn=ke(Ke),dn=Math.min(ln.length-(Ce.length==1?je:0),tn.length-(Ke.length==1?je:0));yt<dn&&ln.charCodeAt(ln.length-yt-1)==tn.charCodeAt(tn.length-yt-1);)++yt;if(Ce.length==1&&Ke.length==1&&oe==b.line)for(;je&&je>b.ch&&ln.charCodeAt(ln.length-yt-1)==tn.charCodeAt(tn.length-yt-1);)je--,yt++;Ce[Ce.length-1]=ln.slice(0,ln.length-yt).replace(/^\u200b+/,""),Ce[0]=Ce[0].slice(je).replace(/\u200b+$/,"");var Cn=_e(oe,je),vn=_e(he,Ke.length?ke(Ke).length-yt:0);if(Ce.length>1||Ce[0]||gt(Cn,vn))return Wo(a.doc,Ce,Cn,vn,"+input"),!0},Sr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Sr.prototype.reset=function(){this.forceCompositionEnd()},Sr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Sr.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))},Sr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return Si(a.cm)})},Sr.prototype.setUneditable=function(a){a.contentEditable="false"},Sr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||ni(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Sr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Sr.prototype.onContextMenu=function(){},Sr.prototype.resetPosition=function(){},Sr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=qi(a,y.line);if(!x||x.hidden)return null;var b=ot(a.doc,y.line),E=Ao(x,b,y.line),te=Xt(b,a.doc.direction),oe="left";if(te){var ae=It(te,y.ch);oe=ae%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,ae=a.doc.lineSeparator(),ue=!1;function he(je){return function(yt){return yt.id==je}}function be(){oe&&(te+=ae,ue&&(te+=ae),oe=ue=!1)}function Ce(je){je&&(be(),te+=je)}function Ke(je){if(je.nodeType==1){var yt=je.getAttribute("cm-text");if(yt){Ce(yt);return}var Lt=je.getAttribute("cm-marker"),zt;if(Lt){var en=a.findMarks(_e(b,0),_e(E+1,0),he(+Lt));en.length&&(zt=en[0].find(0))&&Ce(qt(a.doc,zt.from,zt.to).join(ae));return}if(je.getAttribute("contenteditable")=="false")return;var ln=/^(pre|div|p|li|table|br)$/i.test(je.nodeName);if(!/^br$/i.test(je.nodeName)&&je.textContent.length==0)return;ln&&be();for(var tn=0;tn<je.childNodes.length;tn++)Ke(je.childNodes[tn]);/^(pre|p)$/i.test(je.nodeName)&&(ue=!0),ln&&(oe=!0)}else je.nodeType==3&&Ce(je.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ke(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(_e(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||!Ze(b,y))return jo(_e(Ee(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var te=a.rest?ke(a.rest):a.line;return jo(_e(Ee(te),te.text.length),E)}var oe=y.nodeType==3?y:null,ae=y;for(!oe&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(oe=y.firstChild,x&&(x=oe.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var ue=a.measure,he=ue.maps;function be(zt,en,ln){for(var tn=-1;tn<(he?he.length:0);tn++)for(var dn=tn<0?ue.map:he[tn],Cn=0;Cn<dn.length;Cn+=3){var vn=dn[Cn+2];if(vn==zt||vn==en){var Gn=Ee(tn<0?a.line:a.rest[tn]),Br=dn[Cn]+ln;return(ln<0||vn!=zt)&&(Br=dn[Cn+(ln?1:0)]),_e(Gn,Br)}}}var Ce=be(oe,ae,x);if(Ce)return jo(Ce,E);for(var Ke=ae.nextSibling,je=oe?oe.nodeValue.length-x:0;Ke;Ke=Ke.nextSibling){if(Ce=be(Ke,Ke.firstChild,0),Ce)return jo(_e(Ce.line,Ce.ch-je),E);je+=Ke.textContent.length}for(var yt=ae.previousSibling,Lt=x;yt;yt=yt.previousSibling){if(Ce=be(yt,yt.firstChild,-1),Ce)return jo(_e(Ce.line,Ce.ch+Lt),E);Lt+=yt.textContent.length}}var Kr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ce,this.hasSelection=!1,this.composing=null};Kr.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),We&&(E.style.width="0px"),Et(E,"input",function(){ge&&ye>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Et(E,"paste",function(oe){nt(b,oe)||Pl(oe,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function te(oe){if(!nt(b,oe)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Rl(b);za({lineWise:!0,text:ae.text}),oe.type=="cut"?b.setSelections(ae.ranges,null,xe):(x.prevInput="",E.value=ae.text.join(`
`),pt(E))}else return;oe.type=="cut"&&(b.state.cutIncoming=+new Date)}}Et(E,"cut",te),Et(E,"copy",te),Et(a.scroller,"paste",function(oe){if(!(li(a,oe)||nt(b,oe))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=oe.clipboardData,E.dispatchEvent(ae)}}),Et(a.lineSpace,"selectstart",function(oe){li(a,oe)||sn(oe)}),Et(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"})}}),Et(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Kr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Kr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Kr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=Ci(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},Kr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Je(x.cursorDiv,a.cursors),Je(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Kr.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&&pt(this.textarea),ge&&ye>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",ge&&ye>=9&&(this.hasSelection=null))}},Kr.prototype.getField=function(){return this.textarea},Kr.prototype.supportsTouch=function(){return!1},Kr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Pe||Le()!=this.textarea))try{this.textarea.focus()}catch(a){}},Kr.prototype.blur=function(){this.textarea.blur()},Kr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Kr.prototype.receivedFocus=function(){this.slowPoll()},Kr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Kr.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)},Kr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Rr(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(ge&&ye>=9&&this.hasSelection===E||De&&/[\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,ae=Math.min(b.length,E.length);oe<ae&&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},Kr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Kr.prototype.onKeyPress=function(){ge&&ye>=9&&(this.hasSelection=null),this.fastPoll()},Kr.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||fe)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(te)==-1&&ni(x,pi)(x.doc,po(te),xe);var ue=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px;
z-index: 1000; background: `+(ge?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ce;Re&&(Ce=window.scrollY),b.input.focus(),Re&&window.scrollTo(null,Ce),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=je,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Ke(){if(E.selectionStart!=null){var Lt=x.somethingSelected(),zt="\u200B"+(Lt?E.value:"");E.value="\u21DA",E.value=zt,y.prevInput=Lt?"":"\u200B",E.selectionStart=1,E.selectionEnd=zt.length,b.selForContextMenu=x.doc.sel}}function je(){if(y.contextMenuPending==je&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ue,ge&&ye<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=oe),E.selectionStart!=null)){(!ge||ge&&ye<9)&&Ke();var Lt=0,zt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?ni(x,tl)(x):Lt++<10?b.detectingSelectAll=setTimeout(zt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(zt,200)}}if(ge&&ye>=9&&Ke(),qe){mn(a);var yt=function(){kt(window,"mouseup",yt),setTimeout(je,20)};Et(window,"mouseup",yt)}else setTimeout(je,50)},Kr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Kr.prototype.setUneditable=function(){},Kr.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=Le();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(Et(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&&(kt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Or(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return ae}function Qu(a){a.off=kt,a.on=Et,a.wheelEventPixels=iu,a.Doc=ki,a.splitLines=ir,a.countColumn=pe,a.findColumn=Qe,a.isWordChar=re,a.Pass=ut,a.signal=Qt,a.Line=Qn,a.changeEnd=vo,a.scrollbarModel=Ps,a.Pos=_e,a.cmpPos=gt,a.modes=kr,a.mimeModes=an,a.resolveMode=En,a.getMode=$n,a.modeExtensions=or,a.extendMode=yr,a.copyState=Zn,a.startState=Er,a.innerMode=On,a.commands=fa,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=zo,a.normalizeKeyMap=Lu,a.StringStream=Wt,a.SharedTextMarker=ca,a.TextMarker=go,a.LineWidget=ua,a.e_preventDefault=sn,a.e_stopPropagation=Mn,a.e_stop=mn,a.addClass=ze,a.contains=Ze,a.rmClass=it,a.keyNames=yo}Zu(Or),Vu(Or);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in ki.prototype)ki.prototype.hasOwnProperty(Ga)&&He(qu,Ga)<0&&(Or.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(ki.prototype[Ga]));return Gt(ki),Or.inputStyles={textarea:Kr,contenteditable:Sr},Or.defineMode=function(a){!Or.defaults.mode&&a!="null"&&(Or.defaults.mode=a),fn.apply(this,arguments)},Or.defineMIME=gn,Or.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Or.defineMIME("text/plain","null"),Or.defineExtension=function(a,y){Or.prototype[a]=y},Or.defineDocExtension=function(a,y){ki.prototype[a]=y},Or.fromTextArea=Ju,Qu(Or),Or.version="5.58.2",Or})},25419:function(At,Bt,de){(function(se){se(de(89780),de(15525),de(98101))})(function(se){"use strict";se.defineMode("markdown",function(et,Fe){var Ne=se.getMode(et,"text/html"),ge=Ne.name=="null";function ye(pe){if(se.findModeByName){var ce=se.findModeByName(pe);ce&&(pe=ce.mime||ce.mimes[0])}var He=se.getMode(et,pe);return He.name=="null"?null:He}Fe.highlightFormatting===void 0&&(Fe.highlightFormatting=!1),Fe.maxBlockquoteDepth===void 0&&(Fe.maxBlockquoteDepth=0),Fe.taskLists===void 0&&(Fe.taskLists=!1),Fe.strikethrough===void 0&&(Fe.strikethrough=!1),Fe.emoji===void 0&&(Fe.emoji=!1),Fe.fencedCodeBlockHighlighting===void 0&&(Fe.fencedCodeBlockHighlighting=!0),Fe.fencedCodeBlockDefaultMode===void 0&&(Fe.fencedCodeBlockDefaultMode="text/plain"),Fe.xml===void 0&&(Fe.xml=!0),Fe.tokenTypeOverrides===void 0&&(Fe.tokenTypeOverrides={});var Re={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 Ge in Re)Re.hasOwnProperty(Ge)&&Fe.tokenTypeOverrides[Ge]&&(Re[Ge]=Fe.tokenTypeOverrides[Ge]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,$e=/^\[(x| )\](?=\s)/i,ve=Fe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,rt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,We=/^[^#!\[\]*_\\<>` "'(~:]+/,Te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Pe=/^\s*\[[^\]]+?\]:.*$/,De=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,tt=" ";function at(pe,ce,He){return ce.f=ce.inline=He,He(pe,ce)}function ht(pe,ce,He){return ce.f=ce.block=He,He(pe,ce)}function st(pe){return!pe||!/\S/.test(pe.string)}function qe(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==it){var ce=ge;if(!ce){var He=se.innerMode(Ne,pe.htmlState);ce=He.mode.name=="xml"&&He.state.tagStart===null&&!He.state.context&&He.state.tokenize.isInText}ce&&(pe.f=bt,pe.block=lt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function lt(pe,ce){var He=pe.column()===ce.indentation,ft=st(ce.prevLine.stream),ut=ce.indentedCode,xe=ce.prevLine.hr,Be=ce.list!==!1,Se=(ce.listStack[ce.listStack.length-1]||0)+3;ce.indentedCode=!1;var Qe=ce.indentation;if(ce.indentationDiff===null&&(ce.indentationDiff=ce.indentation,Be)){for(ce.list=null;Qe<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=Qe-ce.listStack[ce.listStack.length-1])}var Ve=!ft&&!xe&&!ce.prevLine.header&&(!Be||!ut)&&!ce.prevLine.fencedCodeEnd,ct=(ce.list===!1||xe||ft)&&ce.indentation<=Se&&pe.match(we),ke=null;if(ce.indentationDiff>=4&&(ut||ce.prevLine.fencedCodeEnd||ce.prevLine.header||ft))return pe.skipToEnd(),ce.indentedCode=!0,Re.code;if(pe.eatSpace())return null;if(He&&ce.indentation<=Se&&(ke=pe.match(ve))&&ke[1].length<=6)return ce.quote=0,ce.header=ke[1].length,ce.thisLine.header=!0,Fe.highlightFormatting&&(ce.formatting="header"),ce.f=ce.inline,Je(ce);if(ce.indentation<=Se&&pe.eat(">"))return ce.quote=He?1:ce.quote+1,Fe.highlightFormatting&&(ce.formatting="quote"),pe.eatSpace(),Je(ce);if(!ct&&!ce.setext&&He&&ce.indentation<=Se&&(ke=pe.match(fe))){var Ye=ke[1]?"ol":"ul";return ce.indentation=Qe+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,Fe.taskLists&&pe.match($e,!1)&&(ce.taskList=!0),ce.f=ce.inline,Fe.highlightFormatting&&(ce.formatting=["list","list-"+Ye]),Je(ce)}else{if(He&&ce.indentation<=Se&&(ke=pe.match(Te,!0)))return ce.quote=0,ce.fencedEndRE=new RegExp(ke[1]+"+ *$"),ce.localMode=Fe.fencedCodeBlockHighlighting&&ye(ke[2]||Fe.fencedCodeBlockDefaultMode),ce.localMode&&(ce.localState=se.startState(ce.localMode)),ce.f=ce.block=Zt,Fe.highlightFormatting&&(ce.formatting="code-block"),ce.code=-1,Je(ce);if(ce.setext||(!Ve||!Be)&&!ce.quote&&ce.list===!1&&!ce.code&&!ct&&!Pe.test(pe.string)&&(ke=pe.lookAhead(1))&&(ke=ke.match(rt)))return ce.setext?(ce.header=ce.setext,ce.setext=0,pe.skipToEnd(),Fe.highlightFormatting&&(ce.formatting="header")):(ce.header=ke[0].charAt(0)=="="?1:2,ce.setext=ce.header),ce.thisLine.header=!0,ce.f=ce.inline,Je(ce);if(ct)return pe.skipToEnd(),ce.hr=!0,ce.thisLine.hr=!0,Re.hr;if(pe.peek()==="[")return at(pe,ce,Pt)}return at(pe,ce,ce.inline)}function it(pe,ce){var He=Ne.token(pe,ce.htmlState);if(!ge){var ft=se.innerMode(Ne,ce.htmlState);(ft.mode.name=="xml"&&ft.state.tagStart===null&&!ft.state.context&&ft.state.tokenize.isInText||ce.md_inside&&pe.current().indexOf(">")>-1)&&(ce.f=bt,ce.block=lt,ce.htmlState=null)}return He}function Zt(pe,ce){var He=ce.listStack[ce.listStack.length-1]||0,ft=ce.indentation<He,ut=He+3;if(ce.fencedEndRE&&ce.indentation<=ut&&(ft||pe.match(ce.fencedEndRE))){Fe.highlightFormatting&&(ce.formatting="code-block");var xe;return ft||(xe=Je(ce)),ce.localMode=ce.localState=null,ce.block=lt,ce.f=bt,ce.fencedEndRE=null,ce.code=0,ce.thisLine.fencedCodeEnd=!0,ft?ht(pe,ce,ce.block):xe}else return ce.localMode?ce.localMode.token(pe,ce.localState):(pe.skipToEnd(),Re.code)}function Je(pe){var ce=[];if(pe.formatting){ce.push(Re.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var He=0;He<pe.formatting.length;He++)ce.push(Re.formatting+"-"+pe.formatting[He]),pe.formatting[He]==="header"&&ce.push(Re.formatting+"-"+pe.formatting[He]+"-"+pe.header),pe.formatting[He]==="quote"&&(!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=pe.quote?ce.push(Re.formatting+"-"+pe.formatting[He]+"-"+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(Re.linkHref,"url"):(pe.strong&&ce.push(Re.strong),pe.em&&ce.push(Re.em),pe.strikethrough&&ce.push(Re.strikethrough),pe.emoji&&ce.push(Re.emoji),pe.linkText&&ce.push(Re.linkText),pe.code&&ce.push(Re.code),pe.image&&ce.push(Re.image),pe.imageAltText&&ce.push(Re.imageAltText,"link"),pe.imageMarker&&ce.push(Re.imageMarker)),pe.header&&ce.push(Re.header,Re.header+"-"+pe.header),pe.quote&&(ce.push(Re.quote),!Fe.maxBlockquoteDepth||Fe.maxBlockquoteDepth>=pe.quote?ce.push(Re.quote+"-"+pe.quote):ce.push(Re.quote+"-"+Fe.maxBlockquoteDepth)),pe.list!==!1){var ft=(pe.listStack.length-1)%3;ft?ft===1?ce.push(Re.list2):ce.push(Re.list3):ce.push(Re.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 Ue(pe,ce){if(pe.match(We,!0))return Je(ce)}function bt(pe,ce){var He=ce.text(pe,ce);if(typeof He!="undefined")return He;if(ce.list)return ce.list=null,Je(ce);if(ce.taskList){var ft=pe.match($e,!0)[1]===" ";return ft?ce.taskOpen=!0:ce.taskClosed=!0,Fe.highlightFormatting&&(ce.formatting="task"),ce.taskList=!1,Je(ce)}if(ce.taskOpen=!1,ce.taskClosed=!1,ce.header&&pe.match(/^#+$/,!0))return Fe.highlightFormatting&&(ce.formatting="header"),Je(ce);var ut=pe.next();if(ce.linkTitle){ce.linkTitle=!1;var xe=ut;ut==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Be="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(pe.match(new RegExp(Be),!0))return Re.linkHref}if(ut==="`"){var Se=ce.formatting;Fe.highlightFormatting&&(ce.formatting="code"),pe.eatWhile("`");var Qe=pe.current().length;if(ce.code==0&&(!ce.quote||Qe==1))return ce.code=Qe,Je(ce);if(Qe==ce.code){var Ve=Je(ce);return ce.code=0,Ve}else return ce.formatting=Se,Je(ce)}else if(ce.code)return Je(ce);if(ut==="\\"&&(pe.next(),Fe.highlightFormatting)){var ct=Je(ce),ke=Re.formatting+"-escape";return ct?ct+" "+ke:ke}if(ut==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ce.imageMarker=!0,ce.image=!0,Fe.highlightFormatting&&(ce.formatting="image"),Je(ce);if(ut==="["&&ce.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ce.imageMarker=!1,ce.imageAltText=!0,Fe.highlightFormatting&&(ce.formatting="image"),Je(ce);if(ut==="]"&&ce.imageAltText){Fe.highlightFormatting&&(ce.formatting="image");var ct=Je(ce);return ce.imageAltText=!1,ce.image=!1,ce.inline=ce.f=Ze,ct}if(ut==="["&&!ce.image)return ce.linkText&&pe.match(/^.*?\]/)||(ce.linkText=!0,Fe.highlightFormatting&&(ce.formatting="link")),Je(ce);if(ut==="]"&&ce.linkText){Fe.highlightFormatting&&(ce.formatting="link");var ct=Je(ce);return ce.linkText=!1,ce.inline=ce.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ze:bt,ct}if(ut==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Ae,Fe.highlightFormatting&&(ce.formatting="link");var ct=Je(ce);return ct?ct+=" ":ct="",ct+Re.linkInline}if(ut==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Ae,Fe.highlightFormatting&&(ce.formatting="link");var ct=Je(ce);return ct?ct+=" ":ct="",ct+Re.linkEmail}if(Fe.xml&&ut==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ye=pe.string.indexOf(">",pe.pos);if(Ye!=-1){var Xe=pe.string.substring(pe.start,Ye);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Xe)&&(ce.md_inside=!0)}return pe.backUp(1),ce.htmlState=se.startState(Ne),ht(pe,ce,it)}if(Fe.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)&&(!De.test(z)||/\s/.test(ee)||De.test(ee)),le=!/\s/.test(ee)&&(!De.test(ee)||/\s/.test(z)||De.test(z)),ne=null,me=null;if(ie%2&&(!ce.em&&re&&(ut==="*"||!le||De.test(ee))?ne=!0:ce.em==ut&&le&&(ut==="*"||!re||De.test(z))&&(ne=!1)),ie>1&&(!ce.strong&&re&&(ut==="*"||!le||De.test(ee))?me=!0:ce.strong==ut&&le&&(ut==="*"||!re||De.test(z))&&(me=!1)),me!=null||ne!=null){Fe.highlightFormatting&&(ce.formatting=ne==null?"strong":me==null?"em":"strong em"),ne===!0&&(ce.em=ut),me===!0&&(ce.strong=ut);var Ve=Je(ce);return ne===!1&&(ce.em=!1),me===!1&&(ce.strong=!1),Ve}}else if(ut===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Je(ce);pe.backUp(1)}if(Fe.strikethrough){if(ut==="~"&&pe.eatWhile(ut)){if(ce.strikethrough){Fe.highlightFormatting&&(ce.formatting="strikethrough");var Ve=Je(ce);return ce.strikethrough=!1,Ve}else if(pe.match(/^[^\s]/,!1))return ce.strikethrough=!0,Fe.highlightFormatting&&(ce.formatting="strikethrough"),Je(ce)}else if(ut===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Je(ce);pe.backUp(2)}}if(Fe.emoji&&ut===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ce.emoji=!0,Fe.highlightFormatting&&(ce.formatting="emoji");var Oe=Je(ce);return ce.emoji=!1,Oe}return ut===" "&&(pe.match(/^ +$/,!1)?ce.trailingSpace++:ce.trailingSpace&&(ce.trailingSpaceNewLine=!0)),Je(ce)}function Ae(pe,ce){var He=pe.next();if(He===">"){ce.f=ce.inline=bt,Fe.highlightFormatting&&(ce.formatting="link");var ft=Je(ce);return ft?ft+=" ":ft="",ft+Re.linkInline}return pe.match(/^[^>]+/,!0),Re.linkInline}function Ze(pe,ce){if(pe.eatSpace())return null;var He=pe.next();return He==="("||He==="["?(ce.f=ce.inline=ze(He==="("?")":"]"),Fe.highlightFormatting&&(ce.formatting="link-string"),ce.linkHref=!0,Je(ce)):"error"}var Le={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ze(pe){return function(ce,He){var ft=ce.next();if(ft===pe){He.f=He.inline=bt,Fe.highlightFormatting&&(He.formatting="link-string");var ut=Je(He);return He.linkHref=!1,ut}return ce.match(Le[pe]),He.linkHref=!0,Je(He)}}function Pt(pe,ce){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ce.f=pt,pe.next(),Fe.highlightFormatting&&(ce.formatting="link"),ce.linkText=!0,Je(ce)):at(pe,ce,bt)}function pt(pe,ce){if(pe.match(/^\]:/,!0)){ce.f=ce.inline=St,Fe.highlightFormatting&&(ce.formatting="link");var He=Je(ce);return ce.linkText=!1,He}return pe.match(/^([^\]\\]|\\.)+/,!0),Re.linkText}function St(pe,ce){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ce.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ce.f=ce.inline=bt,Re.linkHref+" url")}var dt={startState:function(){return{f:lt,prevLine:{stream:null},thisLine:{stream:null},block:lt,htmlState:null,indentation:0,inline:bt,text:Ue,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&se.copyState(Ne,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?se.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,ce){if(ce.formatting=!1,pe!=ce.thisLine.stream){if(ce.header=0,ce.hr=!1,pe.match(/^\s*$/,!0))return qe(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!=it)){var He=pe.match(/^\s*/,!0)[0].replace(/\t/g,tt).length;if(ce.indentation=He,ce.indentationDiff=null,He>0)return null}}return ce.f(pe,ce)},innerMode:function(pe){return pe.block==it?{state:pe.htmlState,mode:Ne}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:dt}},indent:function(pe,ce,He){return pe.block==it&&Ne.indent?Ne.indent(pe.htmlState,ce,He):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ce,He):se.Pass},blankLine:qe,getType:Je,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return dt},"xml"),se.defineMIME("text/markdown","markdown"),se.defineMIME("text/x-markdown","markdown")})},98101:function(At,Bt,de){(function(se){se(de(89780))})(function(se){"use strict";se.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var et=0;et<se.modeInfo.length;et++){var Fe=se.modeInfo[et];Fe.mimes&&(Fe.mime=Fe.mimes[0])}se.findModeByMIME=function(Ne){Ne=Ne.toLowerCase();for(var ge=0;ge<se.modeInfo.length;ge++){var ye=se.modeInfo[ge];if(ye.mime==Ne)return ye;if(ye.mimes){for(var Re=0;Re<ye.mimes.length;Re++)if(ye.mimes[Re]==Ne)return ye}}if(/\+xml$/.test(Ne))return se.findModeByMIME("application/xml");if(/\+json$/.test(Ne))return se.findModeByMIME("application/json")},se.findModeByExtension=function(Ne){Ne=Ne.toLowerCase();for(var ge=0;ge<se.modeInfo.length;ge++){var ye=se.modeInfo[ge];if(ye.ext){for(var Re=0;Re<ye.ext.length;Re++)if(ye.ext[Re]==Ne)return ye}}},se.findModeByFileName=function(Ne){for(var ge=0;ge<se.modeInfo.length;ge++){var ye=se.modeInfo[ge];if(ye.file&&ye.file.test(Ne))return ye}var Re=Ne.lastIndexOf("."),Ge=Re>-1&&Ne.substring(Re+1,Ne.length);if(Ge)return se.findModeByExtension(Ge)},se.findModeByName=function(Ne){Ne=Ne.toLowerCase();for(var ge=0;ge<se.modeInfo.length;ge++){var ye=se.modeInfo[ge];if(ye.name.toLowerCase()==Ne)return ye;if(ye.alias){for(var Re=0;Re<ye.alias.length;Re++)if(ye.alias[Re].toLowerCase()==Ne)return ye}}}})},67549:function(At,Bt,de){(function(se){se(de(89780))})(function(se){"use strict";se.defineMode("stex",function(et,Fe){"use strict";function Ne(We,Te){We.cmdState.push(Te)}function ge(We){return We.cmdState.length>0?We.cmdState[We.cmdState.length-1]:null}function ye(We){var Te=We.cmdState.pop();Te&&Te.closeBracket()}function Re(We){for(var Te=We.cmdState,Pe=Te.length-1;Pe>=0;Pe--){var De=Te[Pe];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Ge(We,Te,Pe){return function(){this.name=We,this.bracketNo=0,this.style=Te,this.styles=Pe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=Ge("importmodule","tag",["string","builtin"]),we.documentclass=Ge("documentclass","tag",["","atom"]),we.usepackage=Ge("usepackage","tag",["atom"]),we.begin=Ge("begin","tag",["atom"]),we.end=Ge("end","tag",["atom"]),we.label=Ge("label","tag",["atom"]),we.ref=Ge("ref","tag",["atom"]),we.eqref=Ge("eqref","tag",["atom"]),we.cite=Ge("cite","tag",["atom"]),we.bibitem=Ge("bibitem","tag",["atom"]),we.Bibitem=Ge("Bibitem","tag",["atom"]),we.RBibitem=Ge("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(We,Te){We.f=Te}function $e(We,Te){var Pe;if(We.match(/^\\[a-zA-Z@]+/)){var De=We.current().slice(1);return Pe=we.hasOwnProperty(De)?we[De]:we.DEFAULT,Pe=new Pe,Ne(Te,Pe),fe(Te,rt),Pe.style}if(We.match(/^\\[$&%#{}_]/)||We.match(/^\\[,;!\/\\]/))return"tag";if(We.match("\\["))return fe(Te,function(at,ht){return ve(at,ht,"\\]")}),"keyword";if(We.match("\\("))return fe(Te,function(at,ht){return ve(at,ht,"\\)")}),"keyword";if(We.match("$$"))return fe(Te,function(at,ht){return ve(at,ht,"$$")}),"keyword";if(We.match("$"))return fe(Te,function(at,ht){return ve(at,ht,"$")}),"keyword";var tt=We.next();if(tt=="%")return We.skipToEnd(),"comment";if(tt=="}"||tt=="]"){if(Pe=ge(Te),Pe)Pe.closeBracket(tt),fe(Te,rt);else return"error";return"bracket"}else return tt=="{"||tt=="["?(Pe=we.DEFAULT,Pe=new Pe,Ne(Te,Pe),"bracket"):/\d/.test(tt)?(We.eatWhile(/[\w.%]/),"atom"):(We.eatWhile(/[\w\-_]/),Pe=Re(Te),Pe.name=="begin"&&(Pe.argument=We.current()),Pe.styleIdentifier())}function ve(We,Te,Pe){if(We.eatSpace())return null;if(Pe&&We.match(Pe))return fe(Te,$e),"keyword";if(We.match(/^\\[a-zA-Z@]+/))return"tag";if(We.match(/^[a-zA-Z]+/))return"variable-2";if(We.match(/^\\[$&%#{}_]/)||We.match(/^\\[,;!\/]/)||We.match(/^[\^_&]/))return"tag";if(We.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(We.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=We.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(We.skipToEnd(),"comment"):"error"}function rt(We,Te){var Pe=We.peek(),De;return Pe=="{"||Pe=="["?(De=ge(Te),De.openBracket(Pe),We.eat(Pe),fe(Te,$e),"bracket"):/[ \t\r]/.test(Pe)?(We.eat(Pe),null):(fe(Te,$e),ye(Te),$e(We,Te))}return{startState:function(){var We=Fe.inMathMode?function(Te,Pe){return ve(Te,Pe)}:$e;return{cmdState:[],f:We}},copyState:function(We){return{cmdState:We.cmdState.slice(),f:We.f}},token:function(We,Te){return Te.f(We,Te)},blankLine:function(We){We.f=$e,We.cmdState.length=0},lineComment:"%"}}),se.defineMIME("text/x-stex","stex"),se.defineMIME("text/x-latex","stex")})},15525:function(At,Bt,de){(function(se){se(de(89780))})(function(se){"use strict";var et={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Fe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};se.defineMode("xml",function(Ne,ge){var ye=Ne.indentUnit,Re={},Ge=ge.htmlMode?et:Fe;for(var we in Ge)Re[we]=Ge[we];for(var we in ge)Re[we]=ge[we];var fe,$e;function ve(Ae,Ze){function Le(pt){return Ze.tokenize=pt,pt(Ae,Ze)}var ze=Ae.next();if(ze=="<")return Ae.eat("!")?Ae.eat("[")?Ae.match("CDATA[")?Le(Te("atom","]]>")):null:Ae.match("--")?Le(Te("comment","-->")):Ae.match("DOCTYPE",!0,!0)?(Ae.eatWhile(/[\w\._\-]/),Le(Pe(1))):null:Ae.eat("?")?(Ae.eatWhile(/[\w\._\-]/),Ze.tokenize=Te("meta","?>"),"meta"):(fe=Ae.eat("/")?"closeTag":"openTag",Ze.tokenize=rt,"tag bracket");if(ze=="&"){var Pt;return Ae.eat("#")?Ae.eat("x")?Pt=Ae.eatWhile(/[a-fA-F\d]/)&&Ae.eat(";"):Pt=Ae.eatWhile(/[\d]/)&&Ae.eat(";"):Pt=Ae.eatWhile(/[\w\.\-:]/)&&Ae.eat(";"),Pt?"atom":"error"}else return Ae.eatWhile(/[^&<]/),null}ve.isInText=!0;function rt(Ae,Ze){var Le=Ae.next();if(Le==">"||Le=="/"&&Ae.eat(">"))return Ze.tokenize=ve,fe=Le==">"?"endTag":"selfcloseTag","tag bracket";if(Le=="=")return fe="equals",null;if(Le=="<"){Ze.tokenize=ve,Ze.state=ht,Ze.tagName=Ze.tagStart=null;var ze=Ze.tokenize(Ae,Ze);return ze?ze+" tag error":"tag error"}else return/[\'\"]/.test(Le)?(Ze.tokenize=We(Le),Ze.stringStartCol=Ae.column(),Ze.tokenize(Ae,Ze)):(Ae.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function We(Ae){var Ze=function(Le,ze){for(;!Le.eol();)if(Le.next()==Ae){ze.tokenize=rt;break}return"string"};return Ze.isInAttribute=!0,Ze}function Te(Ae,Ze){return function(Le,ze){for(;!Le.eol();){if(Le.match(Ze)){ze.tokenize=ve;break}Le.next()}return Ae}}function Pe(Ae){return function(Ze,Le){for(var ze;(ze=Ze.next())!=null;){if(ze=="<")return Le.tokenize=Pe(Ae+1),Le.tokenize(Ze,Le);if(ze==">")if(Ae==1){Le.tokenize=ve;break}else return Le.tokenize=Pe(Ae-1),Le.tokenize(Ze,Le)}return"meta"}}function De(Ae,Ze,Le){this.prev=Ae.context,this.tagName=Ze,this.indent=Ae.indented,this.startOfLine=Le,(Re.doNotIndent.hasOwnProperty(Ze)||Ae.context&&Ae.context.noIndent)&&(this.noIndent=!0)}function tt(Ae){Ae.context&&(Ae.context=Ae.context.prev)}function at(Ae,Ze){for(var Le;;){if(!Ae.context||(Le=Ae.context.tagName,!Re.contextGrabbers.hasOwnProperty(Le)||!Re.contextGrabbers[Le].hasOwnProperty(Ze)))return;tt(Ae)}}function ht(Ae,Ze,Le){return Ae=="openTag"?(Le.tagStart=Ze.column(),st):Ae=="closeTag"?qe:ht}function st(Ae,Ze,Le){return Ae=="word"?(Le.tagName=Ze.current(),$e="tag",Zt):Re.allowMissingTagName&&Ae=="endTag"?($e="tag bracket",Zt(Ae,Ze,Le)):($e="error",st)}function qe(Ae,Ze,Le){if(Ae=="word"){var ze=Ze.current();return Le.context&&Le.context.tagName!=ze&&Re.implicitlyClosed.hasOwnProperty(Le.context.tagName)&&tt(Le),Le.context&&Le.context.tagName==ze||Re.matchClosing===!1?($e="tag",lt):($e="tag error",it)}else return Re.allowMissingTagName&&Ae=="endTag"?($e="tag bracket",lt(Ae,Ze,Le)):($e="error",it)}function lt(Ae,Ze,Le){return Ae!="endTag"?($e="error",lt):(tt(Le),ht)}function it(Ae,Ze,Le){return $e="error",lt(Ae,Ze,Le)}function Zt(Ae,Ze,Le){if(Ae=="word")return $e="attribute",Je;if(Ae=="endTag"||Ae=="selfcloseTag"){var ze=Le.tagName,Pt=Le.tagStart;return Le.tagName=Le.tagStart=null,Ae=="selfcloseTag"||Re.autoSelfClosers.hasOwnProperty(ze)?at(Le,ze):(at(Le,ze),Le.context=new De(Le,ze,Pt==Le.indented)),ht}return $e="error",Zt}function Je(Ae,Ze,Le){return Ae=="equals"?Ue:(Re.allowMissing||($e="error"),Zt(Ae,Ze,Le))}function Ue(Ae,Ze,Le){return Ae=="string"?bt:Ae=="word"&&Re.allowUnquoted?($e="string",Zt):($e="error",Zt(Ae,Ze,Le))}function bt(Ae,Ze,Le){return Ae=="string"?bt:Zt(Ae,Ze,Le)}return{startState:function(Ae){var Ze={tokenize:ve,state:ht,indented:Ae||0,tagName:null,tagStart:null,context:null};return Ae!=null&&(Ze.baseIndent=Ae),Ze},token:function(Ae,Ze){if(!Ze.tagName&&Ae.sol()&&(Ze.indented=Ae.indentation()),Ae.eatSpace())return null;fe=null;var Le=Ze.tokenize(Ae,Ze);return(Le||fe)&&Le!="comment"&&($e=null,Ze.state=Ze.state(fe||Le,Ae,Ze),$e&&(Le=$e=="error"?Le+" error":$e)),Le},indent:function(Ae,Ze,Le){var ze=Ae.context;if(Ae.tokenize.isInAttribute)return Ae.tagStart==Ae.indented?Ae.stringStartCol+1:Ae.indented+ye;if(ze&&ze.noIndent)return se.Pass;if(Ae.tokenize!=rt&&Ae.tokenize!=ve)return Le?Le.match(/^(\s*)/)[0].length:0;if(Ae.tagName)return Re.multilineTagIndentPastTag!==!1?Ae.tagStart+Ae.tagName.length+2:Ae.tagStart+ye*(Re.multilineTagIndentFactor||1);if(Re.alignCDATA&&/<!\[CDATA\[/.test(Ze))return 0;var Pt=Ze&&/^<(\/)?([\w_:\.-]*)/.exec(Ze);if(Pt&&Pt[1])for(;ze;)if(ze.tagName==Pt[2]){ze=ze.prev;break}else if(Re.implicitlyClosed.hasOwnProperty(ze.tagName))ze=ze.prev;else break;else if(Pt)for(;ze;){var pt=Re.contextGrabbers[ze.tagName];if(pt&&pt.hasOwnProperty(Pt[2]))ze=ze.prev;else break}for(;ze&&ze.prev&&!ze.startOfLine;)ze=ze.prev;return ze?ze.indent+ye:Ae.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Re.htmlMode?"html":"xml",helperType:Re.htmlMode?"html":"xml",skipAttribute:function(Ae){Ae.state==Ue&&(Ae.state=Zt)},xmlCurrentTag:function(Ae){return Ae.tagName?{name:Ae.tagName,close:Ae.type=="closeTag"}:null},xmlCurrentContext:function(Ae){for(var Ze=[],Le=Ae.context;Le;Le=Le.prev)Le.tagName&&Ze.push(Le.tagName);return Ze.reverse()}}}),se.defineMIME("text/xml","xml"),se.defineMIME("application/xml","xml"),se.mimeModes.hasOwnProperty("text/html")||se.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(At,Bt,de){"use strict";de.d(Bt,{hP:function(){return Xe}});var se=function(ie,ee){return(se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var le in re)Object.prototype.hasOwnProperty.call(re,le)&&(z[le]=re[le])})(ie,ee)};function et(ie,ee){function z(){this.constructor=ie}se(ie,ee),ie.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}function Fe(ie,ee,z,re){return new(z||(z=Promise))(function(le,ne){function me(Ct){try{wt(re.next(Ct))}catch(vt){ne(vt)}}function Oe(Ct){try{wt(re.throw(Ct))}catch(vt){ne(vt)}}function wt(Ct){var vt;Ct.done?le(Ct.value):(vt=Ct.value,vt instanceof z?vt:new z(function(xt){xt(vt)})).then(me,Oe)}wt((re=re.apply(ie,ee||[])).next())})}function Ne(ie,ee){var z,re,le,ne,me={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:Oe(0),throw:Oe(1),return:Oe(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Oe(wt){return function(Ct){return function(vt){if(z)throw new TypeError("Generator is already executing.");for(;me;)try{if(z=1,re&&(le=2&vt[0]?re.return:vt[0]?re.throw||((le=re.return)&&le.call(re),0):re.next)&&!(le=le.call(re,vt[1])).done)return le;switch(re=0,le&&(vt=[2&vt[0],le.value]),vt[0]){case 0:case 1:le=vt;break;case 4:return me.label++,{value:vt[1],done:!1};case 5:me.label++,re=vt[1],vt=[0];continue;case 7:vt=me.ops.pop(),me.trys.pop();continue;default:if(le=me.trys,!((le=le.length>0&&le[le.length-1])||vt[0]!==6&&vt[0]!==2)){me=0;continue}if(vt[0]===3&&(!le||vt[1]>le[0]&&vt[1]<le[3])){me.label=vt[1];break}if(vt[0]===6&&me.label<le[1]){me.label=le[1],le=vt;break}if(le&&me.label<le[2]){me.label=le[2],me.ops.push(vt);break}le[2]&&me.ops.pop(),me.trys.pop();continue}vt=ee.call(ie,me)}catch(xt){vt=[6,xt],re=0}finally{z=le=0}if(5&vt[0])throw vt[1];return{value:vt[0]?vt[1]:void 0,done:!0}}([wt,Ct])}}}function ge(){for(var ie=0,ee=0,z=arguments.length;ee<z;ee++)ie+=arguments[ee].length;var re=Array(ie),le=0;for(ee=0;ee<z;ee++)for(var ne=arguments[ee],me=0,Oe=ne.length;me<Oe;me++,le++)re[le]=ne[me];return re}var ye=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,le=z;re<le.length;re++){var ne=le[re],me=ne[0],Oe=ne[1];ee.setAttribute(me,Oe)}},ie.createRect=function(ee,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",ee.toString()),le.setAttribute("height",z.toString()),re&&ie.setAttributes(le,re),le},ie.createLine=function(ee,z,re,le,ne){var me=document.createElementNS("http://www.w3.org/2000/svg","line");return me.setAttribute("x1",ee.toString()),me.setAttribute("y1",z.toString()),me.setAttribute("x2",re.toString()),me.setAttribute("y2",le.toString()),ne&&ie.setAttributes(me,ne),me},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 le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(ee/2).toString()),le.setAttribute("cy",(z/2).toString()),le.setAttribute("rx",(ee/2).toString()),le.setAttribute("ry",(z/2).toString()),re&&ie.setAttributes(le,re),le},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,le,ne,me,Oe){var wt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ie.setAttributes(wt,[["id",ee],["orient",z],["markerWidth",re.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",me.toString()]]),wt.appendChild(Oe),wt},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}(),Re=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}(),Ge=function(){function ie(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ie.prototype.rasterize=function(ee,z,re){var le=this;return new Promise(function(ne){var me=re!==void 0?re:document.createElement("canvas");ee===null&&(le.markersOnly=!0,le.naturalSize=!1);var Oe=document.createElementNS("http://www.w3.org/2000/svg","svg");Oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Oe.setAttribute("width",z.width.baseVal.valueAsString),Oe.setAttribute("height",z.height.baseVal.valueAsString),Oe.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),Oe.innerHTML=z.innerHTML,le.naturalSize===!0?(Oe.width.baseVal.value=ee.naturalWidth,Oe.height.baseVal.value=ee.naturalHeight):le.width!==void 0&&le.height!==void 0&&(Oe.width.baseVal.value=le.width,Oe.height.baseVal.value=le.height),me.width=Oe.width.baseVal.value,me.height=Oe.height.baseVal.value;var wt=Oe.outerHTML,Ct=me.getContext("2d");le.markersOnly!==!0&&Ct.drawImage(ee,0,0,me.width,me.height);var vt=window.URL,xt=new Image(me.width,me.height);xt.setAttribute("crossOrigin","anonymous");var It=new Blob([wt],{type:"image/svg+xml"}),Rt=vt.createObjectURL(It);xt.onload=function(){Ct.drawImage(xt,0,0),vt.revokeObjectURL(Rt);var Xt=me.toDataURL(le.imageType,le.imageQuality);ne(Xt)},xt.src=Rt})},ie}(),we=function(){},fe=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 $e("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new $e("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ve("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ve("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}(),$e=function(ie,ee){this.selector=ie,this.style=ee},ve=function(ie,ee){this.localName=ie,this.style=ee},rt=function(){function ie(ee,z,re,le,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ee,this.displayMode=z,this.markerItems=re,this.uiStyleSettings=le,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 me=document.createElement("div");me.className=""+z.toolbarButtonStyleClass.name,me.setAttribute("data-type-name",ne.typeName),me.innerHTML=ne.icon,me.addEventListener("click",function(){z.markerToolbarButtonClicked(me,ne)}),z.buttons.push(me),z.markerButtons.push(me)}),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 le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<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(le,'<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 le=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){le.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 ve("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 ve("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("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 ve("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new $e("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new $e("."+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}(),We=function(){function ie(ee,z,re,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=ee,this.displayMode=z,this.uiStyleSettings=re,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ie.prototype.addStyles=function(){var ee;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
background-color: `+((ee=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ee!==void 0?ee:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("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 ve("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new $e("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new $e("."+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,le=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 me;ne.uiStyleSettings=le.uiStyleSettings;var Oe=document.createElement("div");Oe.className=le.toolboxButtonStyleClass.name+" "+((me=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&me!==void 0?me:le.toolboxButtonStyleColorsClass.name),Oe.innerHTML=ne.icon,Oe.title=ne.title,Oe.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(Oe),le.buttonRow.appendChild(Oe)}),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 le=ee.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),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,me){var Oe,wt;ne.className=z.toolboxButtonStyleClass.name+" "+(me===re?""+((Oe=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Oe!==void 0?Oe:z.toolboxActiveButtonStyleColorsClass.name):""+((wt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&wt!==void 0?wt:z.toolboxButtonStyleColorsClass.name))})},ie}(),Te=function(ie,ee){this.title=ie,this.icon=ee},Pe=function(ie){function ee(z,re,le,ne){var me=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 me.colors=[],me.addTransparent=!1,me.colorBoxes=[],me.colors=re,me.currentColor=le,me.setCurrentColor=me.setCurrentColor.bind(me),me.getColorBox=me.getColorBox.bind(me),me}return et(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(le){var ne=z.getColorBox(le);re.appendChild(ne),z.colorBoxes.push(ne)}),re},ee.prototype.getColorBox=function(z){var re=this,le=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-le,me=document.createElement("div");me.style.display="inline-block",me.style.boxSizing="content-box",me.style.width=ne-2+"px",me.style.height=ne-2+"px",me.style.padding="1px",me.style.marginRight="2px",me.style.marginBottom="2px",me.style.borderWidth="2px",me.style.borderStyle="solid",me.style.borderRadius=(ne+2)/2+"px",me.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",me.addEventListener("click",function(){re.setCurrentColor(z,me)});var Oe=document.createElement("div");return Oe.style.display="inline-block",Oe.style.width=ne-2+"px",Oe.style.height=ne-2+"px",Oe.style.backgroundColor=z,Oe.style.borderRadius=ne/2+"px",z==="transparent"&&(Oe.style.fill=this.uiStyleSettings.toolboxAccentColor,Oe.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>`),me.appendChild(Oe),me},ee.prototype.setCurrentColor=function(z,re){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},ee}(Te),De=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}(),tt=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}(),at=function(){function ie(){this.GRIP_SIZE=10,this.visual=ye.createGroup(),this.visual.appendChild(ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ye.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}(),ht=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}(),st=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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(ye.createTransform()),ne.setupControlBox(),ne}return et(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=ye.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 le=this.unrotatePoint(z);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.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 me=this.container.transform.baseVal.getItem(0);me.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(me,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,le=this.manipulationStartWidth,ne=this.manipulationStartTop,me=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=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,me=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:me=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=re,this.width=le):(this.left=re+le,this.width=-le),me>=0?(this.top=ne,this.height=me):(this.top=ne+me,this.height=-me),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(),le=ye.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},ee.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var le=ye.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.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=ye.createGroup();var z=ye.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ye.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=ye.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 tt,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 at;return z.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(z.visual),z},ee.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,le=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,me=(this.height+this.CB_DISTANCE)/2-z/2,Oe=this.height+this.CB_DISTANCE-z/2,wt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,le),this.positionGrip(this.controlGrips.topCenter.visual,ne,le),this.positionGrip(this.controlGrips.topRight.visual,wt,le),this.positionGrip(this.controlGrips.centerLeft.visual,re,me),this.positionGrip(this.controlGrips.centerRight.visual,wt,me),this.positionGrip(this.controlGrips.bottomLeft.visual,re,Oe),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Oe),this.positionGrip(this.controlGrips.bottomRight.visual,wt,Oe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,le-3*this.CB_DISTANCE)},ee.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),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:ht.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ht.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(ht.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ht.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},ee.prototype.scale=function(z,re){ie.prototype.scale.call(this,z,re);var le=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:le.x*z,y:le.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},ee}(De),qe=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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 et(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=ye.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),ye.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&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ye.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}(st),lt=function(ie){function ee(z,re,le,ne){var me=ie.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return me.widths=[],me.widthBoxes=[],me.widths=re,me.currentWidth=le,me.setCurrentWidth=me.setCurrentWidth.bind(me),me}return et(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(le){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=le===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(le,ne)}),re.appendChild(ne);var me=document.createElement("div");me.innerText=le.toString(),me.style.marginRight="5px",ne.appendChild(me);var Oe=document.createElement("div");Oe.style.minHeight="20px",Oe.style.flexGrow="2",Oe.style.display="flex",Oe.style.alignItems="center";var wt=document.createElement("hr");wt.style.minWidth="20px",wt.style.border="0px",wt.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,wt.style.flexGrow="2",Oe.appendChild(wt),ne.appendChild(Oe),z.widthBoxes.push(ne)}),re},ee.prototype.setCurrentWidth=function(z,re){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ee}(Te),it=function(ie){function ee(z,re,le,ne){var me=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 me.styles=[],me.styleBoxes=[],me.styles=re,me.currentStyle=le,me.setCurrentStyle=me.setCurrentStyle.bind(me),me}return et(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(le){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=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(le,ne)}),re.appendChild(ne);var me=document.createElement("div");me.style.minHeight="20px",me.style.flexGrow="2",me.style.overflow="hidden";var Oe=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
</svg>`;me.innerHTML=Oe,ne.appendChild(me),z.styleBoxes.push(ne)}),re},ee.prototype.setCurrentStyle=function(z,re){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ee}(Te),Zt=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||this;return ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Pe("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new lt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return et(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}(qe),Je=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"},Ue=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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 et(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=ye.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 at;return z.visual.transform.baseVal.appendItem(ye.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,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),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}(De),bt=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Pe("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new lt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return et(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=ye.createGroup(),this.selectorLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ye.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()),ye.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ye.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}(Ue),Ae=function(ie){function ee(z,re,le,ne){var me=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 me.fonts=[],me.fontBoxes=[],me.fonts=re,me.currentFont=le,me.setCurrentFont=me.setCurrentFont.bind(me),me}return et(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(le){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=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(le,ne)}),re.appendChild(ne);var me=document.createElement("div");me.style.display="flex",me.style.minHeight="20px",me.style.flexGrow="2",me.style.fontFamily=le,me.style.overflow="hidden";var Oe=document.createElement("div");Oe.style.whiteSpace="nowrap",Oe.style.overflow="hidden",Oe.style.textOverflow="ellipsis",Oe.innerHTML="The quick brown fox jumps over the lazy dog",me.appendChild(Oe),ne.appendChild(me),z.fontBoxes.push(ne)}),re},ee.prototype.setCurrentFont=function(z,re){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ee}(Te),Ze=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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=le.defaultColor,ne.fontFamily=le.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 Pe("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Ae("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return et(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(le){le===z&&(re=!0)}),re},ee.prototype.createVisual=function(){this.visual=ye.createGroup(),this.bgRectangle=ye.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ye.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.textElement.transform.baseVal.appendItem(ye.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(ye.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 le=(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(le,ne)}return re},ee.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),le=0,ne=0;return re.width>0&&re.height>0&&(le=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:le,y:ne}},ee.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),le=this.getTextPosition(re);le.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.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&&(ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.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 le=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(le)),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}),le=this.textElement.getBBox(),ne={x:le.width*z,y:le.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&&ye.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&&ye.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}(st),Le=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=le.defaultColor,ne.lineWidth=le.defaultStrokeWidth,ne.pixelRatio=le.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 Pe("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new lt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return et(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=ye.createGroup(),this.drawingImage=ye.createImage(),this.visual.appendChild(this.drawingImage);var z=ye.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),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.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],le=re[0],ne=re[1],me=re[2],Oe=re[3],wt=!1,Ct=0;Ct<this.canvasElement.height;Ct++)for(var vt=0;vt<this.canvasElement.width;vt++)z.data[Ct*this.canvasElement.width*4+4*vt+3]>0&&(wt=!0,Ct<ne&&(ne=Ct),vt<le&&(le=vt),Ct>Oe&&(Oe=Ct),vt>me&&(me=vt));if(wt){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(me-le)/this.pixelRatio,this.height=(Oe-ne)/this.pixelRatio;var xt=document.createElement("canvas");xt.width=me-le,xt.height=Oe-ne,xt.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,me-le,Oe-ne),0,0),this.drawingImgUrl=xt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ee.prototype.setDrawingImage=function(){ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ye.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}(st),ze=function(ie){function ee(z,re,le){var ne=ie.call(this,z,le||'<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 et(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 le=function(Oe){var wt="both";switch(Oe){case 0:wt="both";break;case 1:wt="start";break;case 2:wt="end";break;case 3:wt="none"}var Ct=document.createElement("div");if(Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=wt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){z.setCurrentType(wt,Ct)}),re.appendChild(Ct),wt==="both"||wt==="start"){var vt=document.createElement("div");vt.style.display="flex",vt.style.alignItems="center",vt.style.minHeight="20px",vt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,vt.style.marginLeft="5px",Ct.appendChild(vt)}var xt=document.createElement("div");xt.style.display="flex",xt.style.alignItems="center",xt.style.minHeight="20px",xt.style.flexGrow="2";var It=document.createElement("hr");if(It.style.minWidth="20px",It.style.border="0px",It.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),It.style.flexGrow="2",xt.appendChild(It),Ct.appendChild(xt),wt==="both"||wt==="end"){var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.alignItems="center",Rt.style.minHeight="20px",Rt.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>`,Rt.style.marginRight="5px",Ct.appendChild(Rt)}ne.typeBoxes.push(Ct)},ne=this,me=0;me<4;me++)le(me);return re},ee.prototype.setCurrentType=function(z,re){var le=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ee}(Te),Pt=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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 ze("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return et(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 le=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+le/2)+","+(re+ne/2)},ee.prototype.createTips=function(){this.arrow1=ye.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ye.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ye.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",ye.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ye.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 le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,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}(bt),pt=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||this;return ne.fillColor=le.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Pe("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return et(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}(qe),St=function(ie){function ee(z,re,le,ne){var me=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 me.opacities=[],me.opacityBoxes=[],me.opacities=re,me.currentOpacity=le,me.setCurrentOpacity=me.setCurrentOpacity.bind(me),me}return et(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(le){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=le===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(le,ne)}),re.appendChild(ne);var me=document.createElement("div");me.innerText=100*le+"%",ne.appendChild(me),z.opacityBoxes.push(ne)}),re},ee.prototype.setCurrentOpacity=function(z,re){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ee}(Te),dt=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=le.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=le.defaultHighlightOpacity,ne.fillPanel=new Pe("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new St("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return et(ee,ie),ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ye.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}(pt),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>',He=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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=le.defaultStrokeColor,ne.bgColor=le.defaultFillColor,ne.fontFamily=le.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 Pe("Text color",le.defaultColorSet,ne.color,pe),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Pe("Fill color",le.defaultColorSet,ne.bgColor,ce),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Ae("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new at,ne.tipGrip.visual.transform.baseVal.appendItem(ye.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return et(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(){ye.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ye.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&&(ye.setAttributes(this.bgRectangle,[["fill",z]]),ye.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),le=this.height/5;z&&(this.tipPosition={x:re+le/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))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+le,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+le}):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))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+le}):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))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-le},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-le})},ee.prototype.resize=function(z){ie.prototype.resize.call(this,z),this.positionTip()},ee.prototype.positionTip=function(){ye.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}(Ze),ft=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.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 Pe("Line color",ge(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Pe("Fill color",ge(le.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new lt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new St("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return et(ee,ie),ee.prototype.ownsTarget=function(z){return!(!ie.prototype.ownsTarget.call(this,z)&&z!==this.visual)},ee.prototype.createVisual=function(){this.visual=ye.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),ye.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&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ee.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ye.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}(st),ut=function(ie){function ee(z,re,le){return ie.call(this,z,re,le)||this}return et(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=ye.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(ye.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ye.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(ye.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&&(ye.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()]]),ye.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 le=this.tip2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,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}(bt),xe=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||this;return ne.strokePanel.colors=le.defaultColorSet,ne.fillColor="transparent",ne}return et(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}(ft),Be=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}(),Se=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Pe("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new lt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return et(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=ye.createGroup(),this.selectorCurve=ye.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ye.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()),ye.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ee.prototype.setupControlBox=function(){ie.prototype.setupControlBox.call(this),this.curveControlLine1=ye.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ye.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}(Ue),Qe=function(ie){function ee(z,re,le){var ne=ie.call(this,z,re,le)||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=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.textColor=le.defaultStrokeColor,ne.fontFamily=le.defaultFontFamily,ne.fontSize=le.defaultCaptionFontSize,ne.captionText=le.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 Pe("Line color",ge(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Pe("Fill color",ge(le.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new lt("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new it("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Ae("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Pe("Text color",le.defaultColorSet,ne.textColor,pe),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return et(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=ye.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ye.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ye.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=ye.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),ye.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')"]]),ye.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&&ye.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&&ye.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),ye.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&&ye.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},ee.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ye.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},ee.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ye.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ee.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ye.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}(st),Ve=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}(),ct=function(ie){function ee(z,re,le){var ne=ie.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=le,ne}return et(ee,ie),ee}(Ve),ke=function(ie){function ee(z,re,le){le===void 0&&(le=!1);var ne=ie.call(this,z,le)||this;return ne.marker=re,ne}return et(ee,ie),ee}(Ve),Ye=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}(),Xe=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 Je,this._isOpen=!1,this.undoRedoManager=new Be,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 Ye,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ie.instanceCounter++,this.styles=new fe(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[Zt,Le,Pt,Ze,xe,ft,dt,He,ut,pt,bt,Se,Qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Zt,Le,Pt,Ze,ft,dt,He]},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Zt,Le,Pt,Ze,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 le=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});le!==void 0&&z._availableMarkerTypes.push(le)}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(),Re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ie.prototype.show=function(){var ee=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Ve(ee))})},ie.prototype.render=function(){return Fe(this,void 0,void 0,function(){var ee;return Ne(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(ee=new Ge).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(le){var ne=new Ve(z,!0);le(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(le){return le(new Ve(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,le=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,le),this._isResizing=!1},ie.prototype.scaleMarkers=function(ee,z){var re,le=this;this._currentMarker&&this._currentMarker instanceof Ze?this._currentMarker.scale(ee,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==le._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=ye.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 rt(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 We(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(le){var ne=new ke(ee,ee._currentMarker,!0);le(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(le){return le(new ke(ee,re))})}}},ie.prototype.clear=function(){var ee=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(me){var Oe=new ke(ee,void 0,!0);me(Oe),Oe.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(me){var Oe=le.markers[me];le.setCurrentMarker(le.markers[me]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(wt){return wt(new ke(ee,Oe))})},le=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 le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Ve(ee))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new Ve(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 Ve(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 Ve(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 Fe(this,void 0,void 0,function(){var ee,z,re=this;return Ne(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return ee=le.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new ct(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 le=z._availableMarkerTypes.find(function(me){return me.typeName===re.typeName});if(le!==void 0){var ne=z.addNewMarker(le);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 Ve(z))})},ie.prototype.addNewMarker=function(ee){var z=ye.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(le){return le.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(le){return le(new ke(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 Le&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Le):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new ke(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 ke(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 ke(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 ke(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){Re.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 Ve(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 Ve(ee))}))},ie.instanceCounter=0,ie}()},66042:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return Ze}});var se=de(27247),et=de(11913),Fe=de(43403),Ne=de(34280),ge=de(59301),ye=ge.createContext(null),Re=ge.createContext({}),Ge=ye,we=de(74430),fe=de(32855),$e=de(92310),ve=de.n($e),rt=de(77900),We=de(10228),Te=de(26112),Pe=de(43079),De=de(8654),tt=["prefixCls","className","containerRef"],at=function(ze){var Pt=ze.prefixCls,pt=ze.className,St=ze.containerRef,dt=(0,Pe.Z)(ze,tt),pe=ge.useContext(Re),ce=pe.panel,He=(0,De.x1)(ce,St);return ge.createElement("div",(0,fe.Z)({className:ve()("".concat(Pt,"-content"),pt),role:"dialog",ref:He},(0,Te.Z)(ze,{aria:!0}),{"aria-modal":"true"},dt))},ht=at,st=de(48736);function qe(Le){return typeof Le=="string"&&String(Number(Le))===Le?((0,st.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Le)):Le}function lt(Le){warning(!("wrapperClassName"in Le),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Le.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var it={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Zt(Le,ze){var Pt,pt,St,dt=Le.prefixCls,pe=Le.open,ce=Le.placement,He=Le.inline,ft=Le.push,ut=Le.forceRender,xe=Le.autoFocus,Be=Le.keyboard,Se=Le.classNames,Qe=Le.rootClassName,Ve=Le.rootStyle,ct=Le.zIndex,ke=Le.className,Ye=Le.id,Xe=Le.style,ie=Le.motion,ee=Le.width,z=Le.height,re=Le.children,le=Le.mask,ne=Le.maskClosable,me=Le.maskMotion,Oe=Le.maskClassName,wt=Le.maskStyle,Ct=Le.afterOpenChange,vt=Le.onClose,xt=Le.onMouseEnter,It=Le.onMouseOver,Rt=Le.onMouseLeave,Xt=Le.onClick,Jt=Le.onKeyDown,Et=Le.onKeyUp,Ft=Le.styles,kt=Le.drawerRender,Qt=ge.useRef(),nt=ge.useRef(),rn=ge.useRef();ge.useImperativeHandle(ze,function(){return Qt.current});var Ot=function(rr){var Vn=rr.keyCode,kr=rr.shiftKey;switch(Vn){case We.Z.TAB:{if(Vn===We.Z.TAB){if(!kr&&document.activeElement===rn.current){var an;(an=nt.current)===null||an===void 0||an.focus({preventScroll:!0})}else if(kr&&document.activeElement===nt.current){var fn;(fn=rn.current)===null||fn===void 0||fn.focus({preventScroll:!0})}}break}case We.Z.ESC:{vt&&Be&&(rr.stopPropagation(),vt(rr));break}}};ge.useEffect(function(){if(pe&&xe){var Nn;(Nn=Qt.current)===null||Nn===void 0||Nn.focus({preventScroll:!0})}},[pe]);var Gt=ge.useState(!1),sn=(0,et.Z)(Gt,2),Mn=sn[0],un=sn[1],mn=ge.useContext(Ge),nr;typeof ft=="boolean"?nr=ft?{}:{distance:0}:nr=ft||{};var Un=(Pt=(pt=(St=nr)===null||St===void 0?void 0:St.distance)!==null&&pt!==void 0?pt:mn==null?void 0:mn.pushDistance)!==null&&Pt!==void 0?Pt:180,zr=ge.useMemo(function(){return{pushDistance:Un,push:function(){un(!0)},pull:function(){un(!1)}}},[Un]);ge.useEffect(function(){if(pe){var Nn;mn==null||(Nn=mn.push)===null||Nn===void 0||Nn.call(mn)}else{var rr;mn==null||(rr=mn.pull)===null||rr===void 0||rr.call(mn)}},[pe]),ge.useEffect(function(){return function(){var Nn;mn==null||(Nn=mn.pull)===null||Nn===void 0||Nn.call(mn)}},[]);var Wr=le&&ge.createElement(rt.default,(0,fe.Z)({key:"mask"},me,{visible:pe}),function(Nn,rr){var Vn=Nn.className,kr=Nn.style;return ge.createElement("div",{className:ve()("".concat(dt,"-mask"),Vn,Se==null?void 0:Se.mask,Oe),style:(0,se.Z)((0,se.Z)((0,se.Z)({},kr),wt),Ft==null?void 0:Ft.mask),onClick:ne&&pe?vt:void 0,ref:rr})}),xr=typeof ie=="function"?ie(ce):ie,gr={};if(Mn&&Un)switch(ce){case"top":gr.transform="translateY(".concat(Un,"px)");break;case"bottom":gr.transform="translateY(".concat(-Un,"px)");break;case"left":gr.transform="translateX(".concat(Un,"px)");break;default:gr.transform="translateX(".concat(-Un,"px)");break}ce==="left"||ce==="right"?gr.width=qe(ee):gr.height=qe(z);var Hn={onMouseEnter:xt,onMouseOver:It,onMouseLeave:Rt,onClick:Xt,onKeyDown:Jt,onKeyUp:Et},ir=ge.createElement(rt.default,(0,fe.Z)({key:"panel"},xr,{visible:pe,forceRender:ut,onVisibleChanged:function(rr){Ct==null||Ct(rr)},removeOnLeave:!1,leavedClassName:"".concat(dt,"-content-wrapper-hidden")}),function(Nn,rr){var Vn=Nn.className,kr=Nn.style,an=ge.createElement(ht,(0,fe.Z)({id:Ye,containerRef:rr,prefixCls:dt,className:ve()(ke,Se==null?void 0:Se.content),style:(0,se.Z)((0,se.Z)({},Xe),Ft==null?void 0:Ft.content)},(0,Te.Z)(Le,{aria:!0}),Hn),re);return ge.createElement("div",(0,fe.Z)({className:ve()("".concat(dt,"-content-wrapper"),Se==null?void 0:Se.wrapper,Vn),style:(0,se.Z)((0,se.Z)((0,se.Z)({},gr),kr),Ft==null?void 0:Ft.wrapper)},(0,Te.Z)(Le,{data:!0})),kt?kt(an):an)}),Rr=(0,se.Z)({},Ve);return ct&&(Rr.zIndex=ct),ge.createElement(Ge.Provider,{value:zr},ge.createElement("div",{className:ve()(dt,"".concat(dt,"-").concat(ce),Qe,(0,we.Z)((0,we.Z)({},"".concat(dt,"-open"),pe),"".concat(dt,"-inline"),He)),style:Rr,tabIndex:-1,ref:Qt,onKeyDown:Ot},Wr,ge.createElement("div",{tabIndex:0,ref:nt,style:it,"aria-hidden":"true","data-sentinel":"start"}),ir,ge.createElement("div",{tabIndex:0,ref:rn,style:it,"aria-hidden":"true","data-sentinel":"end"})))}var Je=ge.forwardRef(Zt),Ue=Je,bt=function(ze){var Pt=ze.open,pt=Pt===void 0?!1:Pt,St=ze.prefixCls,dt=St===void 0?"rc-drawer":St,pe=ze.placement,ce=pe===void 0?"right":pe,He=ze.autoFocus,ft=He===void 0?!0:He,ut=ze.keyboard,xe=ut===void 0?!0:ut,Be=ze.width,Se=Be===void 0?378:Be,Qe=ze.mask,Ve=Qe===void 0?!0:Qe,ct=ze.maskClosable,ke=ct===void 0?!0:ct,Ye=ze.getContainer,Xe=ze.forceRender,ie=ze.afterOpenChange,ee=ze.destroyOnClose,z=ze.onMouseEnter,re=ze.onMouseOver,le=ze.onMouseLeave,ne=ze.onClick,me=ze.onKeyDown,Oe=ze.onKeyUp,wt=ze.panelRef,Ct=ge.useState(!1),vt=(0,et.Z)(Ct,2),xt=vt[0],It=vt[1],Rt=ge.useState(!1),Xt=(0,et.Z)(Rt,2),Jt=Xt[0],Et=Xt[1];(0,Ne.Z)(function(){Et(!0)},[]);var Ft=Jt?pt:!1,kt=ge.useRef(),Qt=ge.useRef();(0,Ne.Z)(function(){Ft&&(Qt.current=document.activeElement)},[Ft]);var nt=function(Mn){var un;if(It(Mn),ie==null||ie(Mn),!Mn&&Qt.current&&!((un=kt.current)!==null&&un!==void 0&&un.contains(Qt.current))){var mn;(mn=Qt.current)===null||mn===void 0||mn.focus({preventScroll:!0})}},rn=ge.useMemo(function(){return{panel:wt}},[wt]);if(!Xe&&!xt&&!Ft&&ee)return null;var Ot={onMouseEnter:z,onMouseOver:re,onMouseLeave:le,onClick:ne,onKeyDown:me,onKeyUp:Oe},Gt=(0,se.Z)((0,se.Z)({},ze),{},{open:Ft,prefixCls:dt,placement:ce,autoFocus:ft,keyboard:xe,width:Se,mask:Ve,maskClosable:ke,inline:Ye===!1,afterOpenChange:nt,ref:kt},Ot);return ge.createElement(Re.Provider,{value:rn},ge.createElement(Fe.Z,{open:Ft||Xe||xt,autoDestroy:!1,getContainer:Ye,autoLock:Ve&&(Ft||xt)},ge.createElement(Ue,Gt)))},Ae=bt,Ze=Ae},25930:function(At,Bt,de){"use strict";de.d(Bt,{Cd:function(){return bt}});var se=de(32855),et=de(27247),Fe=de(43079),Ne=de(59301),ge=de(92310),ye=de.n(ge),Re={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ge=function(){var Le=(0,Ne.useRef)([]),ze=(0,Ne.useRef)(null);return(0,Ne.useEffect)(function(){var Pt=Date.now(),pt=!1;Le.current.forEach(function(St){if(St){pt=!0;var dt=St.style;dt.transitionDuration=".3s, .3s, .3s, .06s",ze.current&&Pt-ze.current<100&&(dt.transitionDuration="0s, 0s")}}),pt&&(ze.current=Date.now())}),Le.current},we=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],fe=function(Le){var ze=(0,et.Z)((0,et.Z)({},Re),Le),Pt=ze.className,pt=ze.percent,St=ze.prefixCls,dt=ze.strokeColor,pe=ze.strokeLinecap,ce=ze.strokeWidth,He=ze.style,ft=ze.trailColor,ut=ze.trailWidth,xe=ze.transition,Be=(0,Fe.Z)(ze,we);delete Be.gapPosition;var Se=Array.isArray(pt)?pt:[pt],Qe=Array.isArray(dt)?dt:[dt],Ve=Ge(),ct=ce/2,ke=100-ce/2,Ye="M ".concat(pe==="round"?ct:0,",").concat(ct,`
L `).concat(pe==="round"?ke:100,",").concat(ct),Xe="0 0 100 ".concat(ce),ie=0;return Ne.createElement("svg",(0,se.Z)({className:ye()("".concat(St,"-line"),Pt),viewBox:Xe,preserveAspectRatio:"none",style:He},Be),Ne.createElement("path",{className:"".concat(St,"-line-trail"),d:Ye,strokeLinecap:pe,stroke:ft,strokeWidth:ut||ce,fillOpacity:"0"}),Se.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 le={strokeDasharray:"".concat(ee*re,"px, 100px"),strokeDashoffset:"-".concat(ie,"px"),transition:xe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ne=Qe[z]||Qe[Qe.length-1];return ie+=ee,Ne.createElement("path",{key:z,className:"".concat(St,"-line-path"),d:Ye,strokeLinecap:pe,stroke:ne,strokeWidth:ce,fillOpacity:"0",ref:function(Oe){Ve[z]=Oe},style:le})}))},$e=fe,ve=de(34666),rt=de(11913),We=de(47273),Te=0,Pe=(0,We.Z)();function De(){var Ze;return Pe?(Ze=Te,Te+=1):Ze="TEST_OR_SSR",Ze}var tt=function(Ze){var Le=Ne.useState(),ze=(0,rt.Z)(Le,2),Pt=ze[0],pt=ze[1];return Ne.useEffect(function(){pt("rc_progress_".concat(De()))},[]),Ze||Pt},at=function(Le){var ze=Le.bg,Pt=Le.children;return Ne.createElement("div",{style:{width:"100%",height:"100%",background:ze}},Pt)};function ht(Ze,Le){return Object.keys(Ze).map(function(ze){var Pt=parseFloat(ze),pt="".concat(Math.floor(Pt*Le),"%");return"".concat(Ze[ze]," ").concat(pt)})}var st=Ne.forwardRef(function(Ze,Le){var ze=Ze.prefixCls,Pt=Ze.color,pt=Ze.gradientId,St=Ze.radius,dt=Ze.style,pe=Ze.ptg,ce=Ze.strokeLinecap,He=Ze.strokeWidth,ft=Ze.size,ut=Ze.gapDegree,xe=Pt&&(0,ve.Z)(Pt)==="object",Be=xe?"#FFF":void 0,Se=ft/2,Qe=Ne.createElement("circle",{className:"".concat(ze,"-circle-path"),r:St,cx:Se,cy:Se,stroke:Be,strokeLinecap:ce,strokeWidth:He,opacity:pe===0?0:1,style:dt,ref:Le});if(!xe)return Qe;var Ve="".concat(pt,"-conic"),ct=ut?"".concat(180+ut/2,"deg"):"0deg",ke=ht(Pt,(360-ut)/360),Ye=ht(Pt,1),Xe="conic-gradient(from ".concat(ct,", ").concat(ke.join(", "),")"),ie="linear-gradient(to ".concat(ut?"bottom":"top",", ").concat(Ye.join(", "),")");return Ne.createElement(Ne.Fragment,null,Ne.createElement("mask",{id:Ve},Qe),Ne.createElement("foreignObject",{x:0,y:0,width:ft,height:ft,mask:"url(#".concat(Ve,")")},Ne.createElement(at,{bg:ie},Ne.createElement(at,{bg:Xe}))))}),qe=st,lt=100,it=function(Le,ze,Pt,pt,St,dt,pe,ce,He,ft){var ut=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,xe=Pt/100*360*((360-dt)/360),Be=dt===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Se=(100-pt)/100*ze;He==="round"&&pt!==100&&(Se+=ft/2,Se>=ze&&(Se=ze-.01));var Qe=lt/2;return{stroke:typeof ce=="string"?ce:void 0,strokeDasharray:"".concat(ze,"px ").concat(Le),strokeDashoffset:Se+ut,transform:"rotate(".concat(St+xe+Be,"deg)"),transformOrigin:"".concat(Qe,"px ").concat(Qe,"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}},Zt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Je(Ze){var Le=Ze!=null?Ze:[];return Array.isArray(Le)?Le:[Le]}var Ue=function(Le){var ze=(0,et.Z)((0,et.Z)({},Re),Le),Pt=ze.id,pt=ze.prefixCls,St=ze.steps,dt=ze.strokeWidth,pe=ze.trailWidth,ce=ze.gapDegree,He=ce===void 0?0:ce,ft=ze.gapPosition,ut=ze.trailColor,xe=ze.strokeLinecap,Be=ze.style,Se=ze.className,Qe=ze.strokeColor,Ve=ze.percent,ct=(0,Fe.Z)(ze,Zt),ke=lt/2,Ye=tt(Pt),Xe="".concat(Ye,"-gradient"),ie=ke-dt/2,ee=Math.PI*2*ie,z=He>0?90+He/2:-90,re=ee*((360-He)/360),le=(0,ve.Z)(St)==="object"?St:{count:St,gap:2},ne=le.count,me=le.gap,Oe=Je(Ve),wt=Je(Qe),Ct=wt.find(function(Et){return Et&&(0,ve.Z)(Et)==="object"}),vt=Ct&&(0,ve.Z)(Ct)==="object",xt=vt?"butt":xe,It=it(ee,re,0,100,z,He,ft,ut,xt,dt),Rt=Ge(),Xt=function(){var Ft=0;return Oe.map(function(kt,Qt){var nt=wt[Qt]||wt[wt.length-1],rn=it(ee,re,Ft,kt,z,He,ft,nt,xt,dt);return Ft+=kt,Ne.createElement(qe,{key:Qt,color:nt,ptg:kt,radius:ie,prefixCls:pt,gradientId:Xe,style:rn,strokeLinecap:xt,strokeWidth:dt,gapDegree:He,ref:function(Gt){Rt[Qt]=Gt},size:lt})}).reverse()},Jt=function(){var Ft=Math.round(ne*(Oe[0]/100)),kt=100/ne,Qt=0;return new Array(ne).fill(null).map(function(nt,rn){var Ot=rn<=Ft-1?wt[0]:ut,Gt=Ot&&(0,ve.Z)(Ot)==="object"?"url(#".concat(Xe,")"):void 0,sn=it(ee,re,Qt,kt,z,He,ft,Ot,"butt",dt,me);return Qt+=(re-sn.strokeDashoffset+me)*100/re,Ne.createElement("circle",{key:rn,className:"".concat(pt,"-circle-path"),r:ie,cx:ke,cy:ke,stroke:Gt,strokeWidth:dt,opacity:1,style:sn,ref:function(un){Rt[rn]=un}})})};return Ne.createElement("svg",(0,se.Z)({className:ye()("".concat(pt,"-circle"),Se),viewBox:"0 0 ".concat(lt," ").concat(lt),style:Be,id:Pt,role:"presentation"},ct),!ne&&Ne.createElement("circle",{className:"".concat(pt,"-circle-trail"),r:ie,cx:ke,cy:ke,stroke:ut,strokeLinecap:xt,strokeWidth:pe||dt,style:It}),ne?Jt():Xt())},bt=Ue,Ae={Line:$e,Circle:bt}},6551:function(At,Bt,de){"use strict";de.d(Bt,{ZP:function(){return Re}});var se=de(11913),et=de(59301),Fe=de(47273),Ne=0,ge=(0,Fe.Z)();function ye(){var Ge;return ge?(Ge=Ne,Ne+=1):Ge="TEST_OR_SSR",Ge}function Re(Ge){var we=et.useState(),fe=(0,se.Z)(we,2),$e=fe[0],ve=fe[1];return et.useEffect(function(){ve("rc_select_".concat(ye()))},[]),Ge||$e}},37463:function(At,Bt,de){"use strict";de.d(Bt,{Ac:function(){return nt},Xo:function(){return Ot},Wx:function(){return sn},ZP:function(){return jn},lk:function(){return ht}});var se=de(32855),et=de(3300),Fe=de(74430),Ne=de(27247),ge=de(11913),ye=de(43079),Re=de(34666),Ge=de(18929),we=de(48736),fe=de(59301),$e=de(92310),ve=de.n($e),rt=de(34280),We=de(49658),Te=de(8654),Pe=function(Me){var Mt=Me.className,mt=Me.customizeIcon,_e=Me.customizeIconProps,gt=Me.children,Ut=Me.onMouseDown,nn=Me.onClick,on=typeof mt=="function"?mt(_e):mt;return fe.createElement("span",{className:Mt,onMouseDown:function(Vt){Vt.preventDefault(),Ut==null||Ut(Vt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:nn,"aria-hidden":!0},on!==void 0?on:fe.createElement("span",{className:ve()(Mt.split(/\s+/).map(function(Nt){return"".concat(Nt,"-icon")}))},gt))},De=Pe,tt=function(Me,Mt,mt,_e,gt){var Ut=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,nn=arguments.length>6?arguments[6]:void 0,on=arguments.length>7?arguments[7]:void 0,Nt=fe.useMemo(function(){if((0,Re.Z)(_e)==="object")return _e.clearIcon;if(gt)return gt},[_e,gt]),Vt=fe.useMemo(function(){return!!(!Ut&&_e&&(mt.length||nn)&&!(on==="combobox"&&nn===""))},[_e,Ut,mt.length,nn,on]);return{allowClear:Vt,clearIcon:fe.createElement(De,{className:"".concat(Me,"-clear"),onMouseDown:Mt,customizeIcon:Nt},"\xD7")}},at=fe.createContext(null);function ht(){return fe.useContext(at)}function st(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Me=fe.useState(!1),Mt=(0,ge.Z)(Me,2),mt=Mt[0],_e=Mt[1],gt=fe.useRef(null),Ut=function(){window.clearTimeout(gt.current)};fe.useEffect(function(){return Ut},[]);var nn=function(Nt,Vt){Ut(),gt.current=window.setTimeout(function(){_e(Nt),Vt&&Vt()},Ee)};return[mt,nn,Ut]}function qe(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Me=fe.useRef(null),Mt=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Mt.current)}},[]);function mt(_e){(_e||Me.current===null)&&(Me.current=_e),window.clearTimeout(Mt.current),Mt.current=window.setTimeout(function(){Me.current=null},Ee)}return[function(){return Me.current},mt]}function lt(Ee,Me,Mt,mt){var _e=fe.useRef(null);_e.current={open:Me,triggerOpen:Mt,customizedTrigger:mt},fe.useEffect(function(){function gt(Ut){var nn;if(!((nn=_e.current)!==null&&nn!==void 0&&nn.customizedTrigger)){var on=Ut.target;on.shadowRoot&&Ut.composed&&(on=Ut.composedPath()[0]||on),_e.current.open&&Ee().filter(function(Nt){return Nt}).every(function(Nt){return!Nt.contains(on)&&Nt!==on})&&_e.current.triggerOpen(!1)}}return window.addEventListener("mousedown",gt),function(){return window.removeEventListener("mousedown",gt)}},[])}var it=de(10228);function Zt(Ee){return Ee&&![it.Z.ESC,it.Z.SHIFT,it.Z.BACKSPACE,it.Z.TAB,it.Z.WIN_KEY,it.Z.ALT,it.Z.META,it.Z.WIN_KEY_RIGHT,it.Z.CTRL,it.Z.SEMICOLON,it.Z.EQUALS,it.Z.CAPS_LOCK,it.Z.CONTEXT_MENU,it.Z.F1,it.Z.F2,it.Z.F3,it.Z.F4,it.Z.F5,it.Z.F6,it.Z.F7,it.Z.F8,it.Z.F9,it.Z.F10,it.Z.F11,it.Z.F12].includes(Ee)}var Je=de(26112),Ue=de(11780);function bt(Ee,Me,Mt){var mt=(0,Ne.Z)((0,Ne.Z)({},Ee),Mt?Me:{});return Object.keys(Me).forEach(function(_e){var gt=Me[_e];typeof gt=="function"&&(mt[_e]=function(){for(var Ut,nn=arguments.length,on=new Array(nn),Nt=0;Nt<nn;Nt++)on[Nt]=arguments[Nt];return gt.apply(void 0,on),(Ut=Ee[_e])===null||Ut===void 0?void 0:Ut.call.apply(Ut,[Ee].concat(on))})}),mt}var Ae=bt,Ze=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Le=function(Me,Mt){var mt=Me.prefixCls,_e=Me.id,gt=Me.inputElement,Ut=Me.autoFocus,nn=Me.autoComplete,on=Me.editable,Nt=Me.activeDescendantId,Vt=Me.value,Ie=Me.open,yn=Me.attrs,Yt=(0,ye.Z)(Me,Ze),pn=gt||fe.createElement("input",null),cn=pn,bn=cn.ref,Tn=cn.props;return(0,we.Kp)(!("maxLength"in pn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),pn=fe.cloneElement(pn,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({type:"search"},Ae(Yt,Tn,!0)),{},{id:_e,ref:(0,Te.sQ)(Mt,bn),autoComplete:nn||"off",autoFocus:Ut,className:ve()("".concat(mt,"-selection-search-input"),Tn==null?void 0:Tn.className),role:"combobox","aria-expanded":Ie||!1,"aria-haspopup":"listbox","aria-owns":"".concat(_e,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(_e,"_list"),"aria-activedescendant":Ie?Nt:void 0},yn),{},{value:on?Vt:"",readOnly:!on,unselectable:on?null:"on",style:(0,Ne.Z)((0,Ne.Z)({},Tn.style),{},{opacity:on?null:0})})),pn},ze=fe.forwardRef(Le),Pt=ze;function pt(Ee){return Array.isArray(Ee)?Ee:Ee!==void 0?[Ee]:[]}var St=typeof window!="undefined"&&window.document&&window.document.documentElement,dt=St;function pe(Ee){return Ee!=null}function ce(Ee){return!Ee&&Ee!==0}function He(Ee){return["string","number"].includes((0,Re.Z)(Ee))}function ft(Ee){var Me=void 0;return Ee&&(He(Ee.title)?Me=Ee.title.toString():He(Ee.label)&&(Me=Ee.label.toString())),Me}function ut(Ee,Me){dt?fe.useLayoutEffect(Ee,Me):fe.useEffect(Ee,Me)}function xe(Ee){var Me;return(Me=Ee.key)!==null&&Me!==void 0?Me:Ee.value}var Be=function(Me){Me.preventDefault(),Me.stopPropagation()},Se=function(Me){var Mt=Me.id,mt=Me.prefixCls,_e=Me.values,gt=Me.open,Ut=Me.searchValue,nn=Me.autoClearSearchValue,on=Me.inputRef,Nt=Me.placeholder,Vt=Me.disabled,Ie=Me.mode,yn=Me.showSearch,Yt=Me.autoFocus,pn=Me.autoComplete,cn=Me.activeDescendantId,bn=Me.tabIndex,Tn=Me.removeIcon,cr=Me.maxTagCount,Bn=Me.maxTagTextLength,Ln=Me.maxTagPlaceholder,er=Ln===void 0?function(hn){return"+ ".concat(hn.length," ...")}:Ln,An=Me.tagRender,hr=Me.onToggleOpen,Ir=Me.onRemove,ar=Me.onInputChange,dr=Me.onInputPaste,Lr=Me.onInputKeyDown,fr=Me.onInputMouseDown,Xn=Me.onInputCompositionStart,Mr=Me.onInputCompositionEnd,Jn=Me.onInputBlur,sr=fe.useRef(null),pr=(0,fe.useState)(0),wr=(0,ge.Z)(pr,2),lr=wr[0],Kn=wr[1],zn=(0,fe.useState)(!1),Tr=(0,ge.Z)(zn,2),Zr=Tr[0],Gr=Tr[1],Yn="".concat(mt,"-selection"),ai=gt||Ie==="multiple"&&nn===!1||Ie==="tags"?Ut:"",tr=Ie==="tags"||Ie==="multiple"&&nn===!1||yn&&(gt||Zr);ut(function(){Kn(sr.current.scrollWidth)},[ai]);var si=function($t,xn,_t,Dt,jt){return fe.createElement("span",{title:ft($t),className:ve()("".concat(Yn,"-item"),(0,Fe.Z)({},"".concat(Yn,"-item-disabled"),_t))},fe.createElement("span",{className:"".concat(Yn,"-item-content")},xn),Dt&&fe.createElement(De,{className:"".concat(Yn,"-item-remove"),onMouseDown:Be,onClick:jt,customizeIcon:Tn},"\xD7"))},ti=function($t,xn,_t,Dt,jt,Kt){var Dn=function(br){Be(br),hr(!gt)};return fe.createElement("span",{onMouseDown:Dn},An({label:xn,value:$t,disabled:_t,closable:Dt,onClose:jt,isMaxTag:!!Kt}))},Fr=function($t){var xn=$t.disabled,_t=$t.label,Dt=$t.value,jt=!Vt&&!xn,Kt=_t;if(typeof Bn=="number"&&(typeof _t=="string"||typeof _t=="number")){var Dn=String(Kt);Dn.length>Bn&&(Kt="".concat(Dn.slice(0,Bn),"..."))}var Fn=function(_n){_n&&_n.stopPropagation(),Ir($t)};return typeof An=="function"?ti(Dt,Kt,xn,jt,Fn):si($t,Kt,xn,jt,Fn)},Rn=function($t){if(!_e.length)return null;var xn=typeof er=="function"?er($t):er;return typeof An=="function"?ti(void 0,xn,!1,!1,void 0,!0):si({title:xn},xn,!1)},Tt=fe.createElement("div",{className:"".concat(Yn,"-search"),style:{width:lr},onFocus:function(){Gr(!0)},onBlur:function(){Gr(!1)}},fe.createElement(Pt,{ref:on,open:gt,prefixCls:mt,id:Mt,inputElement:null,disabled:Vt,autoFocus:Yt,autoComplete:pn,editable:tr,activeDescendantId:cn,value:ai,onKeyDown:Lr,onMouseDown:fr,onChange:ar,onPaste:dr,onCompositionStart:Xn,onCompositionEnd:Mr,onBlur:Jn,tabIndex:bn,attrs:(0,Je.Z)(Me,!0)}),fe.createElement("span",{ref:sr,className:"".concat(Yn,"-search-mirror"),"aria-hidden":!0},ai,"\xA0")),Ht=fe.createElement(Ue.Z,{prefixCls:"".concat(Yn,"-overflow"),data:_e,renderItem:Fr,renderRest:Rn,suffix:Tt,itemKey:xe,maxCount:cr});return fe.createElement("span",{className:"".concat(Yn,"-wrap")},Ht,!_e.length&&!ai&&fe.createElement("span",{className:"".concat(Yn,"-placeholder")},Nt))},Qe=Se,Ve=function(Me){var Mt=Me.inputElement,mt=Me.prefixCls,_e=Me.id,gt=Me.inputRef,Ut=Me.disabled,nn=Me.autoFocus,on=Me.autoComplete,Nt=Me.activeDescendantId,Vt=Me.mode,Ie=Me.open,yn=Me.values,Yt=Me.placeholder,pn=Me.tabIndex,cn=Me.showSearch,bn=Me.searchValue,Tn=Me.activeValue,cr=Me.maxLength,Bn=Me.onInputKeyDown,Ln=Me.onInputMouseDown,er=Me.onInputChange,An=Me.onInputPaste,hr=Me.onInputCompositionStart,Ir=Me.onInputCompositionEnd,ar=Me.onInputBlur,dr=Me.title,Lr=fe.useState(!1),fr=(0,ge.Z)(Lr,2),Xn=fr[0],Mr=fr[1],Jn=Vt==="combobox",sr=Jn||cn,pr=yn[0],wr=bn||"";Jn&&Tn&&!Xn&&(wr=Tn),fe.useEffect(function(){Jn&&Mr(!1)},[Jn,Tn]);var lr=Vt!=="combobox"&&!Ie&&!cn?!1:!!wr,Kn=dr===void 0?ft(pr):dr,zn=fe.useMemo(function(){return pr?null:fe.createElement("span",{className:"".concat(mt,"-selection-placeholder"),style:lr?{visibility:"hidden"}:void 0},Yt)},[pr,lr,Yt,mt]);return fe.createElement("span",{className:"".concat(mt,"-selection-wrap")},fe.createElement("span",{className:"".concat(mt,"-selection-search")},fe.createElement(Pt,{ref:gt,prefixCls:mt,id:_e,open:Ie,inputElement:Mt,disabled:Ut,autoFocus:nn,autoComplete:on,editable:sr,activeDescendantId:Nt,value:wr,onKeyDown:Bn,onMouseDown:Ln,onChange:function(Zr){Mr(!0),er(Zr)},onPaste:An,onCompositionStart:hr,onCompositionEnd:Ir,onBlur:ar,tabIndex:pn,attrs:(0,Je.Z)(Me,!0),maxLength:Jn?cr:void 0})),!Jn&&pr?fe.createElement("span",{className:"".concat(mt,"-selection-item"),title:Kn,style:lr?{visibility:"hidden"}:void 0},pr.label):null,zn)},ct=Ve,ke=function(Me,Mt){var mt=(0,fe.useRef)(null),_e=(0,fe.useRef)(!1),gt=Me.prefixCls,Ut=Me.open,nn=Me.mode,on=Me.showSearch,Nt=Me.tokenWithEnter,Vt=Me.disabled,Ie=Me.prefix,yn=Me.autoClearSearchValue,Yt=Me.onSearch,pn=Me.onSearchSubmit,cn=Me.onToggleOpen,bn=Me.onInputKeyDown,Tn=Me.onInputBlur,cr=Me.domRef;fe.useImperativeHandle(Mt,function(){return{focus:function(Kn){mt.current.focus(Kn)},blur:function(){mt.current.blur()}}});var Bn=qe(0),Ln=(0,ge.Z)(Bn,2),er=Ln[0],An=Ln[1],hr=function(Kn){var zn=Kn.which,Tr=mt.current instanceof HTMLTextAreaElement;!Tr&&Ut&&(zn===it.Z.UP||zn===it.Z.DOWN)&&Kn.preventDefault(),bn&&bn(Kn),zn===it.Z.ENTER&&nn==="tags"&&!_e.current&&!Ut&&(pn==null||pn(Kn.target.value)),!(Tr&&!Ut&&~[it.Z.UP,it.Z.DOWN,it.Z.LEFT,it.Z.RIGHT].indexOf(zn))&&Zt(zn)&&cn(!0)},Ir=function(){An(!0)},ar=(0,fe.useRef)(null),dr=function(Kn){Yt(Kn,!0,_e.current)!==!1&&cn(!0)},Lr=function(){_e.current=!0},fr=function(Kn){_e.current=!1,nn!=="combobox"&&dr(Kn.target.value)},Xn=function(Kn){var zn=Kn.target.value;if(Nt&&ar.current&&/[\r\n]/.test(ar.current)){var Tr=ar.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zn=zn.replace(Tr,ar.current)}ar.current=null,dr(zn)},Mr=function(Kn){var zn=Kn.clipboardData,Tr=zn==null?void 0:zn.getData("text");ar.current=Tr||""},Jn=function(Kn){var zn=Kn.target;if(zn!==mt.current){var Tr=document.body.style.msTouchAction!==void 0;Tr?setTimeout(function(){mt.current.focus()}):mt.current.focus()}},sr=function(Kn){var zn=er();Kn.target!==mt.current&&!zn&&!(nn==="combobox"&&Vt)&&Kn.preventDefault(),(nn!=="combobox"&&(!on||!zn)||!Ut)&&(Ut&&yn!==!1&&Yt("",!0,!1),cn())},pr={inputRef:mt,onInputKeyDown:hr,onInputMouseDown:Ir,onInputChange:Xn,onInputPaste:Mr,onInputCompositionStart:Lr,onInputCompositionEnd:fr,onInputBlur:Tn},wr=nn==="multiple"||nn==="tags"?fe.createElement(Qe,(0,se.Z)({},Me,pr)):fe.createElement(ct,(0,se.Z)({},Me,pr));return fe.createElement("div",{ref:cr,className:"".concat(gt,"-selector"),onClick:Jn,onMouseDown:sr},Ie&&fe.createElement("div",{className:"".concat(gt,"-prefix")},Ie),wr)},Ye=fe.forwardRef(ke),Xe=Ye,ie=de(65030),ee=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Me){var Mt=Me===!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(Me,Mt){var mt=Me.prefixCls,_e=Me.disabled,gt=Me.visible,Ut=Me.children,nn=Me.popupElement,on=Me.animation,Nt=Me.transitionName,Vt=Me.dropdownStyle,Ie=Me.dropdownClassName,yn=Me.direction,Yt=yn===void 0?"ltr":yn,pn=Me.placement,cn=Me.builtinPlacements,bn=Me.dropdownMatchSelectWidth,Tn=Me.dropdownRender,cr=Me.dropdownAlign,Bn=Me.getPopupContainer,Ln=Me.empty,er=Me.getTriggerDOMNode,An=Me.onPopupVisibleChange,hr=Me.onPopupMouseEnter,Ir=(0,ye.Z)(Me,ee),ar="".concat(mt,"-dropdown"),dr=nn;Tn&&(dr=Tn(nn));var Lr=fe.useMemo(function(){return cn||z(bn)},[cn,bn]),fr=on?"".concat(ar,"-").concat(on):Nt,Xn=typeof bn=="number",Mr=fe.useMemo(function(){return Xn?null:bn===!1?"minWidth":"width"},[bn,Xn]),Jn=Vt;Xn&&(Jn=(0,Ne.Z)((0,Ne.Z)({},Jn),{},{width:bn}));var sr=fe.useRef(null);return fe.useImperativeHandle(Mt,function(){return{getPopupElement:function(){var wr;return(wr=sr.current)===null||wr===void 0?void 0:wr.popupElement}}}),fe.createElement(ie.Z,(0,se.Z)({},Ir,{showAction:An?["click"]:[],hideAction:An?["click"]:[],popupPlacement:pn||(Yt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Lr,prefixCls:ar,popupTransitionName:fr,popup:fe.createElement("div",{onMouseEnter:hr},dr),ref:sr,stretch:Mr,popupAlign:cr,popupVisible:gt,getPopupContainer:Bn,popupClassName:ve()(Ie,(0,Fe.Z)({},"".concat(ar,"-empty"),Ln)),popupStyle:Jn,getTriggerDOMNode:er,onPopupVisibleChange:An}),Ut)},le=fe.forwardRef(re),ne=le,me=de(40954);function Oe(Ee,Me){var Mt=Ee.key,mt;return"value"in Ee&&(mt=Ee.value),Mt!=null?Mt:mt!==void 0?mt:"rc-index-key-".concat(Me)}function wt(Ee){return typeof Ee!="undefined"&&!Number.isNaN(Ee)}function Ct(Ee,Me){var Mt=Ee||{},mt=Mt.label,_e=Mt.value,gt=Mt.options,Ut=Mt.groupLabel,nn=mt||(Me?"children":"label");return{label:nn,value:_e||"value",options:gt||"options",groupLabel:Ut||nn}}function vt(Ee){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Mt=Me.fieldNames,mt=Me.childrenAsData,_e=[],gt=Ct(Mt,!1),Ut=gt.label,nn=gt.value,on=gt.options,Nt=gt.groupLabel;function Vt(Ie,yn){Array.isArray(Ie)&&Ie.forEach(function(Yt){if(yn||!(on in Yt)){var pn=Yt[nn];_e.push({key:Oe(Yt,_e.length),groupOption:yn,data:Yt,label:Yt[Ut],value:pn})}else{var cn=Yt[Nt];cn===void 0&&mt&&(cn=Yt.label),_e.push({key:Oe(Yt,_e.length),group:!0,data:Yt,label:cn}),Vt(Yt[on],!0)}})}return Vt(Ee,!1),_e}function xt(Ee){var Me=(0,Ne.Z)({},Ee);return"props"in Me||Object.defineProperty(Me,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Me}}),Me}var It=function(Me,Mt,mt){if(!Mt||!Mt.length)return null;var _e=!1,gt=function nn(on,Nt){var Vt=(0,me.Z)(Nt),Ie=Vt[0],yn=Vt.slice(1);if(!Ie)return[on];var Yt=on.split(Ie);return _e=_e||Yt.length>1,Yt.reduce(function(pn,cn){return[].concat((0,et.Z)(pn),(0,et.Z)(nn(cn,yn)))},[]).filter(Boolean)},Ut=gt(Me,Mt);return _e?typeof mt!="undefined"?Ut.slice(0,mt):Ut:null},Rt=fe.createContext(null),Xt=Rt;function Jt(Ee){var Me=Ee.visible,Mt=Ee.values;if(!Me)return null;var mt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Mt.slice(0,mt).map(function(_e){var gt=_e.label,Ut=_e.value;return["number","string"].includes((0,Re.Z)(gt))?gt:Ut}).join(", ")),Mt.length>mt?", ...":null)}var Et=["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"],Ft=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],kt=function(Me){return Me==="tags"||Me==="multiple"},Qt=fe.forwardRef(function(Ee,Me){var Mt,mt=Ee.id,_e=Ee.prefixCls,gt=Ee.className,Ut=Ee.showSearch,nn=Ee.tagRender,on=Ee.direction,Nt=Ee.omitDomProps,Vt=Ee.displayValues,Ie=Ee.onDisplayValuesChange,yn=Ee.emptyOptions,Yt=Ee.notFoundContent,pn=Yt===void 0?"Not Found":Yt,cn=Ee.onClear,bn=Ee.mode,Tn=Ee.disabled,cr=Ee.loading,Bn=Ee.getInputElement,Ln=Ee.getRawInputElement,er=Ee.open,An=Ee.defaultOpen,hr=Ee.onDropdownVisibleChange,Ir=Ee.activeValue,ar=Ee.onActiveValueChange,dr=Ee.activeDescendantId,Lr=Ee.searchValue,fr=Ee.autoClearSearchValue,Xn=Ee.onSearch,Mr=Ee.onSearchSplit,Jn=Ee.tokenSeparators,sr=Ee.allowClear,pr=Ee.prefix,wr=Ee.suffixIcon,lr=Ee.clearIcon,Kn=Ee.OptionList,zn=Ee.animation,Tr=Ee.transitionName,Zr=Ee.dropdownStyle,Gr=Ee.dropdownClassName,Yn=Ee.dropdownMatchSelectWidth,ai=Ee.dropdownRender,tr=Ee.dropdownAlign,si=Ee.placement,ti=Ee.builtinPlacements,Fr=Ee.getPopupContainer,Rn=Ee.showAction,Tt=Rn===void 0?[]:Rn,Ht=Ee.onFocus,hn=Ee.onBlur,$t=Ee.onKeyUp,xn=Ee.onKeyDown,_t=Ee.onMouseDown,Dt=(0,ye.Z)(Ee,Et),jt=kt(bn),Kt=(Ut!==void 0?Ut:jt)||bn==="combobox",Dn=(0,Ne.Z)({},Dt);Ft.forEach(function(qn){delete Dn[qn]}),Nt==null||Nt.forEach(function(qn){delete Dn[qn]});var Fn=fe.useState(!1),br=(0,ge.Z)(Fn,2),_n=br[0],Qn=br[1];fe.useEffect(function(){Qn((0,We.Z)())},[]);var Ar=fe.useRef(null),jr=fe.useRef(null),vr=fe.useRef(null),Yr=fe.useRef(null),Dr=fe.useRef(null),hi=fe.useRef(!1),zi=st(),Ni=(0,ge.Z)(zi,3),xi=Ni[0],mi=Ni[1],Cr=Ni[2];fe.useImperativeHandle(Me,function(){var qn,Wn;return{focus:(qn=Yr.current)===null||qn===void 0?void 0:qn.focus,blur:(Wn=Yr.current)===null||Wn===void 0?void 0:Wn.blur,scrollTo:function(fi){var Vr;return(Vr=Dr.current)===null||Vr===void 0?void 0:Vr.scrollTo(fi)},nativeElement:Ar.current||jr.current}});var wi=fe.useMemo(function(){var qn;if(bn!=="combobox")return Lr;var Wn=(qn=Vt[0])===null||qn===void 0?void 0:qn.value;return typeof Wn=="string"||typeof Wn=="number"?String(Wn):""},[Lr,bn,Vt]),eo=bn==="combobox"&&typeof Bn=="function"&&Bn()||null,Xr=typeof Ln=="function"&&Ln(),Oi=(0,Te.x1)(jr,Xr==null||(Mt=Xr.props)===null||Mt===void 0?void 0:Mt.ref),Xi=fe.useState(!1),di=(0,ge.Z)(Xi,2),ao=di[0],Ri=di[1];(0,rt.Z)(function(){Ri(!0)},[]);var Nr=(0,Ge.Z)(!1,{defaultValue:An,value:er}),to=(0,ge.Z)(Nr,2),so=to[0],Zi=to[1],Jr=ao?so:!1,xo=!pn&&yn;(Tn||xo&&Jr&&bn==="combobox")&&(Jr=!1);var lo=xo?!1:Jr,wn=fe.useCallback(function(qn){var Wn=qn!==void 0?qn:!Jr;Tn||(Zi(Wn),Jr!==Wn&&(hr==null||hr(Wn)))},[Tn,Jr,Zi,hr]),In=fe.useMemo(function(){return(Jn||[]).some(function(qn){return[`
`,`\r
`].includes(qn)})},[Jn]),kn=fe.useContext(Xt)||{},Pn=kn.maxCount,ur=kn.rawValues,Pr=function(Wn,ui,fi){if(!(jt&&wt(Pn)&&(ur==null?void 0:ur.size)>=Pn)){var Vr=!0,$r=Wn;ar==null||ar(null);var Ui=It(Wn,Jn,wt(Pn)?Pn-ur.size:void 0),Hi=fi?null:Ui;return bn!=="combobox"&&Hi&&($r="",Mr==null||Mr(Hi),wn(!1),Vr=!1),Xn&&wi!==$r&&Xn($r,{source:ui?"typing":"effect"}),Vr}},Gi=function(Wn){!Wn||!Wn.trim()||Xn(Wn,{source:"submit"})};fe.useEffect(function(){!Jr&&!jt&&bn!=="combobox"&&Pr("",!1,!1)},[Jr]),fe.useEffect(function(){so&&Tn&&Zi(!1),Tn&&!hi.current&&mi(!1)},[Tn]);var gi=qe(),li=(0,ge.Z)(gi,2),Ur=li[0],_i=li[1],Ji=fe.useRef(!1),Mi=function(Wn){var ui=Ur(),fi=Wn.key,Vr=fi==="Enter";if(Vr&&(bn!=="combobox"&&Wn.preventDefault(),Jr||wn(!0)),_i(!!wi),fi==="Backspace"&&!ui&&jt&&!wi&&Vt.length){for(var $r=(0,et.Z)(Vt),Ui=null,Hi=$r.length-1;Hi>=0;Hi-=1){var ro=$r[Hi];if(!ro.disabled){$r.splice(Hi,1),Ui=ro;break}}Ui&&Ie($r,{type:"remove",values:[Ui]})}for(var Ti=arguments.length,Ai=new Array(Ti>1?Ti-1:0),Vi=1;Vi<Ti;Vi++)Ai[Vi-1]=arguments[Vi];if(Jr&&(!Vr||!Ji.current)){var co;Vr&&(Ji.current=!0),(co=Dr.current)===null||co===void 0||co.onKeyDown.apply(co,[Wn].concat(Ai))}xn==null||xn.apply(void 0,[Wn].concat(Ai))},Qi=function(Wn){for(var ui=arguments.length,fi=new Array(ui>1?ui-1:0),Vr=1;Vr<ui;Vr++)fi[Vr-1]=arguments[Vr];if(Jr){var $r;($r=Dr.current)===null||$r===void 0||$r.onKeyUp.apply($r,[Wn].concat(fi))}Wn.key==="Enter"&&(Ji.current=!1),$t==null||$t.apply(void 0,[Wn].concat(fi))},no=function(Wn){var ui=Vt.filter(function(fi){return fi!==Wn});Ie(ui,{type:"remove",values:[Wn]})},ji=function(){Ji.current=!1},Ao=fe.useRef(!1),ja=function(){mi(!0),Tn||(Ht&&!Ao.current&&Ht.apply(void 0,arguments),Tt.includes("focus")&&wn(!0)),Ao.current=!0},ya=function(){hi.current=!0,mi(!1,function(){Ao.current=!1,hi.current=!1,wn(!1)}),!Tn&&(wi&&(bn==="tags"?Xn(wi,{source:"submit"}):bn==="multiple"&&Xn("",{source:"blur"})),hn&&hn.apply(void 0,arguments))},qi=[];fe.useEffect(function(){return function(){qi.forEach(function(qn){return clearTimeout(qn)}),qi.splice(0,qi.length)}},[]);var uo=function(Wn){var ui,fi=Wn.target,Vr=(ui=vr.current)===null||ui===void 0?void 0:ui.getPopupElement();if(Vr&&Vr.contains(fi)){var $r=setTimeout(function(){var Ti=qi.indexOf($r);if(Ti!==-1&&qi.splice(Ti,1),Cr(),!_n&&!Vr.contains(document.activeElement)){var Ai;(Ai=Yr.current)===null||Ai===void 0||Ai.focus()}});qi.push($r)}for(var Ui=arguments.length,Hi=new Array(Ui>1?Ui-1:0),ro=1;ro<Ui;ro++)Hi[ro-1]=arguments[ro];_t==null||_t.apply(void 0,[Wn].concat(Hi))},Wi=fe.useState({}),ba=(0,ge.Z)(Wi,2),xa=ba[1];function Ua(){xa({})}var wa;Xr&&(wa=function(Wn){wn(Wn)}),lt(function(){var qn;return[Ar.current,(qn=vr.current)===null||qn===void 0?void 0:qn.getPopupElement()]},lo,wn,!!Xr);var Va=fe.useMemo(function(){return(0,Ne.Z)((0,Ne.Z)({},Ee),{},{notFoundContent:pn,open:Jr,triggerOpen:lo,id:mt,showSearch:Kt,multiple:jt,toggleOpen:wn})},[Ee,pn,lo,Jr,mt,Kt,jt,wn]),Ko=!!wr||cr,Yo;Ko&&(Yo=fe.createElement(De,{className:ve()("".concat(_e,"-arrow"),(0,Fe.Z)({},"".concat(_e,"-arrow-loading"),cr)),customizeIcon:wr,customizeIconProps:{loading:cr,searchValue:wi,open:Jr,focused:xi,showSearch:Kt}}));var wo=function(){var Wn;cn==null||cn(),(Wn=Yr.current)===null||Wn===void 0||Wn.focus(),Ie([],{type:"clear",values:Vt}),Pr("",!1,!1)},Xo=tt(_e,wo,Vt,sr,lr,Tn,wi,bn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Po=fe.createElement(Kn,{ref:Dr}),Sa=ve()(_e,gt,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat(_e,"-focused"),xi),"".concat(_e,"-multiple"),jt),"".concat(_e,"-single"),!jt),"".concat(_e,"-allow-clear"),sr),"".concat(_e,"-show-arrow"),Ko),"".concat(_e,"-disabled"),Tn),"".concat(_e,"-loading"),cr),"".concat(_e,"-open"),Jr),"".concat(_e,"-customize-input"),eo),"".concat(_e,"-show-search"),Kt)),Bo=fe.createElement(ne,{ref:vr,disabled:Tn,prefixCls:_e,visible:lo,popupElement:Po,animation:zn,transitionName:Tr,dropdownStyle:Zr,dropdownClassName:Gr,direction:on,dropdownMatchSelectWidth:Yn,dropdownRender:ai,dropdownAlign:tr,placement:si,builtinPlacements:ti,getPopupContainer:Fr,empty:yn,getTriggerDOMNode:function(Wn){return jr.current||Wn},onPopupVisibleChange:wa,onPopupMouseEnter:Ua},Xr?fe.cloneElement(Xr,{ref:Oi}):fe.createElement(Xe,(0,se.Z)({},Ee,{domRef:jr,prefixCls:_e,inputElement:eo,ref:Yr,id:mt,prefix:pr,showSearch:Kt,autoClearSearchValue:fr,mode:bn,activeDescendantId:dr,tagRender:nn,values:Vt,open:Jr,onToggleOpen:wn,activeValue:Ir,searchValue:wi,onSearch:Pr,onSearchSubmit:Gi,onRemove:no,tokenWithEnter:In,onInputBlur:ji}))),Ci;return Xr?Ci=Bo:Ci=fe.createElement("div",(0,se.Z)({className:Sa},Dn,{ref:Ar,onMouseDown:uo,onKeyDown:Mi,onKeyUp:Qi,onFocus:ja,onBlur:ya}),fe.createElement(Jt,{visible:xi&&!Jr,values:Vt}),Bo,Yo,Ca&&Jo),fe.createElement(at.Provider,{value:Va},Ci)}),nt=Qt,rn=function(){return null};rn.isSelectOptGroup=!0;var Ot=rn,Gt=function(){return null};Gt.isSelectOption=!0;var sn=Gt,Mn=de(80547),un=de(2738),mn=de(6790);function nr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Un=["disabled","title","children","style","className"];function zr(Ee){return typeof Ee=="string"||typeof Ee=="number"}var Wr=function(Me,Mt){var mt=ht(),_e=mt.prefixCls,gt=mt.id,Ut=mt.open,nn=mt.multiple,on=mt.mode,Nt=mt.searchValue,Vt=mt.toggleOpen,Ie=mt.notFoundContent,yn=mt.onPopupScroll,Yt=fe.useContext(Xt),pn=Yt.maxCount,cn=Yt.flattenOptions,bn=Yt.onActiveValue,Tn=Yt.defaultActiveFirstOption,cr=Yt.onSelect,Bn=Yt.menuItemSelectedIcon,Ln=Yt.rawValues,er=Yt.fieldNames,An=Yt.virtual,hr=Yt.direction,Ir=Yt.listHeight,ar=Yt.listItemHeight,dr=Yt.optionRender,Lr="".concat(_e,"-item"),fr=(0,Mn.Z)(function(){return cn},[Ut,cn],function(Rn,Tt){return Tt[0]&&Rn[1]!==Tt[1]}),Xn=fe.useRef(null),Mr=fe.useMemo(function(){return nn&&wt(pn)&&(Ln==null?void 0:Ln.size)>=pn},[nn,pn,Ln==null?void 0:Ln.size]),Jn=function(Tt){Tt.preventDefault()},sr=function(Tt){var Ht;(Ht=Xn.current)===null||Ht===void 0||Ht.scrollTo(typeof Tt=="number"?{index:Tt}:Tt)},pr=fe.useCallback(function(Rn){return on==="combobox"?!1:Ln.has(Rn)},[on,(0,et.Z)(Ln).toString(),Ln.size]),wr=function(Tt){for(var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,hn=fr.length,$t=0;$t<hn;$t+=1){var xn=(Tt+$t*Ht+hn)%hn,_t=fr[xn]||{},Dt=_t.group,jt=_t.data;if(!Dt&&!(jt!=null&&jt.disabled)&&(pr(jt.value)||!Mr))return xn}return-1},lr=fe.useState(function(){return wr(0)}),Kn=(0,ge.Z)(lr,2),zn=Kn[0],Tr=Kn[1],Zr=function(Tt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Tr(Tt);var hn={source:Ht?"keyboard":"mouse"},$t=fr[Tt];if(!$t){bn(null,-1,hn);return}bn($t.value,Tt,hn)};(0,fe.useEffect)(function(){Zr(Tn!==!1?wr(0):-1)},[fr.length,Nt]);var Gr=fe.useCallback(function(Rn){return on==="combobox"?String(Rn).toLowerCase()===Nt.toLowerCase():Ln.has(Rn)},[on,Nt,(0,et.Z)(Ln).toString(),Ln.size]);(0,fe.useEffect)(function(){var Rn=setTimeout(function(){if(!nn&&Ut&&Ln.size===1){var Ht=Array.from(Ln)[0],hn=fr.findIndex(function($t){var xn=$t.data;return Nt?String(xn.value).startsWith(Nt):xn.value===Ht});hn!==-1&&(Zr(hn),sr(hn))}});if(Ut){var Tt;(Tt=Xn.current)===null||Tt===void 0||Tt.scrollTo(void 0)}return function(){return clearTimeout(Rn)}},[Ut,Nt]);var Yn=function(Tt){Tt!==void 0&&cr(Tt,{selected:!Ln.has(Tt)}),nn||Vt(!1)};if(fe.useImperativeHandle(Mt,function(){return{onKeyDown:function(Tt){var Ht=Tt.which,hn=Tt.ctrlKey;switch(Ht){case it.Z.N:case it.Z.P:case it.Z.UP:case it.Z.DOWN:{var $t=0;if(Ht===it.Z.UP?$t=-1:Ht===it.Z.DOWN?$t=1:nr()&&hn&&(Ht===it.Z.N?$t=1:Ht===it.Z.P&&($t=-1)),$t!==0){var xn=wr(zn+$t,$t);sr(xn),Zr(xn,!0)}break}case it.Z.TAB:case it.Z.ENTER:{var _t,Dt=fr[zn];Dt&&!(Dt!=null&&(_t=Dt.data)!==null&&_t!==void 0&&_t.disabled)&&!Mr?Yn(Dt.value):Yn(void 0),Ut&&Tt.preventDefault();break}case it.Z.ESC:Vt(!1),Ut&&Tt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Tt){sr(Tt)}}}),fr.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(gt,"_list"),className:"".concat(Lr,"-empty"),onMouseDown:Jn},Ie);var ai=Object.keys(er).map(function(Rn){return er[Rn]}),tr=function(Tt){return Tt.label};function si(Rn,Tt){var Ht=Rn.group;return{role:Ht?"presentation":"option",id:"".concat(gt,"_list_").concat(Tt)}}var ti=function(Tt){var Ht=fr[Tt];if(!Ht)return null;var hn=Ht.data||{},$t=hn.value,xn=Ht.group,_t=(0,Je.Z)(hn,!0),Dt=tr(Ht);return Ht?fe.createElement("div",(0,se.Z)({"aria-label":typeof Dt=="string"&&!xn?Dt:null},_t,{key:Tt},si(Ht,Tt),{"aria-selected":Gr($t)}),$t):null},Fr={role:"listbox",id:"".concat(gt,"_list")};return fe.createElement(fe.Fragment,null,An&&fe.createElement("div",(0,se.Z)({},Fr,{style:{height:0,width:0,overflow:"hidden"}}),ti(zn-1),ti(zn),ti(zn+1)),fe.createElement(mn.Z,{itemKey:"key",ref:Xn,data:fr,height:Ir,itemHeight:ar,fullHeight:!1,onMouseDown:Jn,onScroll:yn,virtual:An,direction:hr,innerProps:An?null:Fr},function(Rn,Tt){var Ht=Rn.group,hn=Rn.groupOption,$t=Rn.data,xn=Rn.label,_t=Rn.value,Dt=$t.key;if(Ht){var jt,Kt=(jt=$t.title)!==null&&jt!==void 0?jt:zr(xn)?xn.toString():void 0;return fe.createElement("div",{className:ve()(Lr,"".concat(Lr,"-group"),$t.className),title:Kt},xn!==void 0?xn:Dt)}var Dn=$t.disabled,Fn=$t.title,br=$t.children,_n=$t.style,Qn=$t.className,Ar=(0,ye.Z)($t,Un),jr=(0,un.Z)(Ar,ai),vr=pr(_t),Yr=Dn||!vr&&Mr,Dr="".concat(Lr,"-option"),hi=ve()(Lr,Dr,Qn,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat(Dr,"-grouped"),hn),"".concat(Dr,"-active"),zn===Tt&&!Yr),"".concat(Dr,"-disabled"),Yr),"".concat(Dr,"-selected"),vr)),zi=tr(Rn),Ni=!Bn||typeof Bn=="function"||vr,xi=typeof zi=="number"?zi:zi||_t,mi=zr(xi)?xi.toString():void 0;return Fn!==void 0&&(mi=Fn),fe.createElement("div",(0,se.Z)({},(0,Je.Z)(jr),An?{}:si(Rn,Tt),{"aria-selected":Gr(_t),className:hi,title:mi,onMouseMove:function(){zn===Tt||Yr||Zr(Tt)},onClick:function(){Yr||Yn(_t)},style:_n}),fe.createElement("div",{className:"".concat(Dr,"-content")},typeof dr=="function"?dr(Rn,{index:Tt}):xi),fe.isValidElement(Bn)||vr,Ni&&fe.createElement(De,{className:"".concat(Lr,"-option-state"),customizeIcon:Bn,customizeIconProps:{value:_t,disabled:Yr,isSelected:vr}},vr?"\u2713":null))}))},xr=fe.forwardRef(Wr),gr=xr,Hn=function(Ee,Me){var Mt=fe.useRef({values:new Map,options:new Map}),mt=fe.useMemo(function(){var gt=Mt.current,Ut=gt.values,nn=gt.options,on=Ee.map(function(Ie){if(Ie.label===void 0){var yn;return(0,Ne.Z)((0,Ne.Z)({},Ie),{},{label:(yn=Ut.get(Ie.value))===null||yn===void 0?void 0:yn.label})}return Ie}),Nt=new Map,Vt=new Map;return on.forEach(function(Ie){Nt.set(Ie.value,Ie),Vt.set(Ie.value,Me.get(Ie.value)||nn.get(Ie.value))}),Mt.current.values=Nt,Mt.current.options=Vt,on},[Ee,Me]),_e=fe.useCallback(function(gt){return Me.get(gt)||Mt.current.options.get(gt)},[Me]);return[mt,_e]};function ir(Ee,Me){return pt(Ee).join("").toUpperCase().includes(Me)}var Rr=function(Ee,Me,Mt,mt,_e){return fe.useMemo(function(){if(!Mt||mt===!1)return Ee;var gt=Me.options,Ut=Me.label,nn=Me.value,on=[],Nt=typeof mt=="function",Vt=Mt.toUpperCase(),Ie=Nt?mt:function(Yt,pn){return _e?ir(pn[_e],Vt):pn[gt]?ir(pn[Ut!=="children"?Ut:"label"],Vt):ir(pn[nn],Vt)},yn=Nt?function(Yt){return xt(Yt)}:function(Yt){return Yt};return Ee.forEach(function(Yt){if(Yt[gt]){var pn=Ie(Mt,yn(Yt));if(pn)on.push(Yt);else{var cn=Yt[gt].filter(function(bn){return Ie(Mt,yn(bn))});cn.length&&on.push((0,Ne.Z)((0,Ne.Z)({},Yt),{},(0,Fe.Z)({},gt,cn)))}return}Ie(Mt,yn(Yt))&&on.push(Yt)}),on},[Ee,mt,_e,Mt,Me])},Nn=de(6551),rr=de(11592),Vn=["children","value"],kr=["children"];function an(Ee){var Me=Ee,Mt=Me.key,mt=Me.props,_e=mt.children,gt=mt.value,Ut=(0,ye.Z)(mt,Vn);return(0,Ne.Z)({key:Mt,value:gt!==void 0?gt:Mt,children:_e},Ut)}function fn(Ee){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,rr.Z)(Ee).map(function(Mt,mt){if(!fe.isValidElement(Mt)||!Mt.type)return null;var _e=Mt,gt=_e.type.isSelectOptGroup,Ut=_e.key,nn=_e.props,on=nn.children,Nt=(0,ye.Z)(nn,kr);return Me||!gt?an(Mt):(0,Ne.Z)((0,Ne.Z)({key:"__RC_SELECT_GRP__".concat(Ut===null?mt:Ut,"__"),label:Ut},Nt),{},{options:fn(on)})}).filter(function(Mt){return Mt})}var gn=function(Me,Mt,mt,_e,gt){return fe.useMemo(function(){var Ut=Me,nn=!Me;nn&&(Ut=fn(Mt));var on=new Map,Nt=new Map,Vt=function(Yt,pn,cn){cn&&typeof cn=="string"&&Yt.set(pn[cn],pn)},Ie=function yn(Yt){for(var pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,cn=0;cn<Yt.length;cn+=1){var bn=Yt[cn];!bn[mt.options]||pn?(on.set(bn[mt.value],bn),Vt(Nt,bn,mt.label),Vt(Nt,bn,_e),Vt(Nt,bn,gt)):yn(bn[mt.options],!0)}};return Ie(Ut),{options:Ut,valueOptions:on,labelOptions:Nt}},[Me,Mt,mt,_e,gt])},En=gn;function $n(Ee){var Me=fe.useRef();Me.current=Ee;var Mt=fe.useCallback(function(){return Me.current.apply(Me,arguments)},[]);return Mt}function or(Ee){var Me=Ee.mode,Mt=Ee.options,mt=Ee.children,_e=Ee.backfill,gt=Ee.allowClear,Ut=Ee.placeholder,nn=Ee.getInputElement,on=Ee.showSearch,Nt=Ee.onSearch,Vt=Ee.defaultOpen,Ie=Ee.autoFocus,yn=Ee.labelInValue,Yt=Ee.value,pn=Ee.inputValue,cn=Ee.optionLabelProp,bn=isMultiple(Me),Tn=on!==void 0?on:bn||Me==="combobox",cr=Mt||convertChildrenToData(mt);if(warning(Me!=="tags"||cr.every(function(An){return!An.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Me==="tags"||Me==="combobox"){var Bn=cr.some(function(An){return An.options?An.options.some(function(hr){return typeof("value"in hr?hr.value:hr.key)=="number"}):typeof("value"in An?An.value:An.key)=="number"});warning(!Bn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Me!=="combobox"||!cn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Me==="combobox"||!_e,"`backfill` only works with `combobox` mode."),warning(Me==="combobox"||!nn,"`getInputElement` only work with `combobox` mode."),noteOnce(Me!=="combobox"||!nn||!gt||!Ut,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Nt&&!Tn&&Me!=="combobox"&&Me!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Vt||Ie,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Yt!=null){var Ln=toArray(Yt);warning(!yn||Ln.every(function(An){return _typeof(An)==="object"&&("key"in An||"value"in An)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!bn||Array.isArray(Yt),"`value` should be array when `mode` is `multiple` or `tags`")}if(mt){var er=null;toNodeArray(mt).some(function(An){if(!React.isValidElement(An)||!An.type)return!1;var hr=An,Ir=hr.type;if(Ir.isSelectOption)return!1;if(Ir.isSelectOptGroup){var ar=toNodeArray(An.props.children).every(function(dr){return!React.isValidElement(dr)||!An.type||dr.type.isSelectOption?!0:(er=dr.type,!1)});return!ar}return er=Ir,!0}),er&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(er.displayName||er.name||er,"`.")),warning(pn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yr(Ee,Me){if(Ee){var Mt=function mt(_e){for(var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ut=0;Ut<_e.length;Ut++){var nn=_e[Ut];if(nn[Me==null?void 0:Me.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!gt&&Array.isArray(nn[Me==null?void 0:Me.options])&&mt(nn[Me==null?void 0:Me.options],!0))break}};Mt(Ee)}}var Zn=null,On=["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"],Er=["inputValue"];function Wt(Ee){return!Ee||(0,Re.Z)(Ee)!=="object"}var ot=fe.forwardRef(function(Ee,Me){var Mt=Ee.id,mt=Ee.mode,_e=Ee.prefixCls,gt=_e===void 0?"rc-select":_e,Ut=Ee.backfill,nn=Ee.fieldNames,on=Ee.inputValue,Nt=Ee.searchValue,Vt=Ee.onSearch,Ie=Ee.autoClearSearchValue,yn=Ie===void 0?!0:Ie,Yt=Ee.onSelect,pn=Ee.onDeselect,cn=Ee.dropdownMatchSelectWidth,bn=cn===void 0?!0:cn,Tn=Ee.filterOption,cr=Ee.filterSort,Bn=Ee.optionFilterProp,Ln=Ee.optionLabelProp,er=Ee.options,An=Ee.optionRender,hr=Ee.children,Ir=Ee.defaultActiveFirstOption,ar=Ee.menuItemSelectedIcon,dr=Ee.virtual,Lr=Ee.direction,fr=Ee.listHeight,Xn=fr===void 0?200:fr,Mr=Ee.listItemHeight,Jn=Mr===void 0?20:Mr,sr=Ee.labelRender,pr=Ee.value,wr=Ee.defaultValue,lr=Ee.labelInValue,Kn=Ee.onChange,zn=Ee.maxCount,Tr=(0,ye.Z)(Ee,On),Zr=(0,Nn.ZP)(Mt),Gr=kt(mt),Yn=!!(!er&&hr),ai=fe.useMemo(function(){return Tn===void 0&&mt==="combobox"?!1:Tn},[Tn,mt]),tr=fe.useMemo(function(){return Ct(nn,Yn)},[JSON.stringify(nn),Yn]),si=(0,Ge.Z)("",{value:Nt!==void 0?Nt:on,postState:function(In){return In||""}}),ti=(0,ge.Z)(si,2),Fr=ti[0],Rn=ti[1],Tt=En(er,hr,tr,Bn,Ln),Ht=Tt.valueOptions,hn=Tt.labelOptions,$t=Tt.options,xn=fe.useCallback(function(wn){var In=pt(wn);return In.map(function(kn){var Pn,ur,Pr,Gi,gi;if(Wt(kn))Pn=kn;else{var li;Pr=kn.key,ur=kn.label,Pn=(li=kn.value)!==null&&li!==void 0?li:Pr}var Ur=Ht.get(Pn);if(Ur){var _i;if(ur===void 0&&(ur=Ur==null?void 0:Ur[Ln||tr.label]),Pr===void 0&&(Pr=(_i=Ur==null?void 0:Ur.key)!==null&&_i!==void 0?_i:Pn),Gi=Ur==null?void 0:Ur.disabled,gi=Ur==null?void 0:Ur.title,0)var Ji}return{label:ur,value:Pn,key:Pr,disabled:Gi,title:gi}})},[tr,Ln,Ht]),_t=(0,Ge.Z)(wr,{value:pr}),Dt=(0,ge.Z)(_t,2),jt=Dt[0],Kt=Dt[1],Dn=fe.useMemo(function(){var wn,In=Gr&&jt===null?[]:jt,kn=xn(In);return mt==="combobox"&&ce((wn=kn[0])===null||wn===void 0?void 0:wn.value)?[]:kn},[jt,xn,mt,Gr]),Fn=Hn(Dn,Ht),br=(0,ge.Z)(Fn,2),_n=br[0],Qn=br[1],Ar=fe.useMemo(function(){if(!mt&&_n.length===1){var wn=_n[0];if(wn.value===null&&(wn.label===null||wn.label===void 0))return[]}return _n.map(function(In){var kn;return(0,Ne.Z)((0,Ne.Z)({},In),{},{label:(kn=typeof sr=="function"?sr(In):In.label)!==null&&kn!==void 0?kn:In.value})})},[mt,_n,sr]),jr=fe.useMemo(function(){return new Set(_n.map(function(wn){return wn.value}))},[_n]);fe.useEffect(function(){if(mt==="combobox"){var wn,In=(wn=_n[0])===null||wn===void 0?void 0:wn.value;Rn(pe(In)?String(In):"")}},[_n]);var vr=$n(function(wn,In){var kn=In!=null?In:wn;return(0,Fe.Z)((0,Fe.Z)({},tr.value,wn),tr.label,kn)}),Yr=fe.useMemo(function(){if(mt!=="tags")return $t;var wn=(0,et.Z)($t),In=function(Pn){return Ht.has(Pn)};return(0,et.Z)(_n).sort(function(kn,Pn){return kn.value<Pn.value?-1:1}).forEach(function(kn){var Pn=kn.value;In(Pn)||wn.push(vr(Pn,kn.label))}),wn},[vr,$t,Ht,_n,mt]),Dr=Rr(Yr,tr,Fr,ai,Bn),hi=fe.useMemo(function(){return mt!=="tags"||!Fr||Dr.some(function(wn){return wn[Bn||"value"]===Fr})||Dr.some(function(wn){return wn[tr.value]===Fr})?Dr:[vr(Fr)].concat((0,et.Z)(Dr))},[vr,Bn,mt,Dr,Fr,tr]),zi=function wn(In){var kn=(0,et.Z)(In).sort(function(Pn,ur){return cr(Pn,ur,{searchValue:Fr})});return kn.map(function(Pn){return Array.isArray(Pn.options)?(0,Ne.Z)((0,Ne.Z)({},Pn),{},{options:Pn.options.length>0?wn(Pn.options):Pn.options}):Pn})},Ni=fe.useMemo(function(){return cr?zi(hi):hi},[hi,cr,Fr]),xi=fe.useMemo(function(){return vt(Ni,{fieldNames:tr,childrenAsData:Yn})},[Ni,tr,Yn]),mi=function(In){var kn=xn(In);if(Kt(kn),Kn&&(kn.length!==_n.length||kn.some(function(Pr,Gi){var gi;return((gi=_n[Gi])===null||gi===void 0?void 0:gi.value)!==(Pr==null?void 0:Pr.value)}))){var Pn=lr?kn:kn.map(function(Pr){return Pr.value}),ur=kn.map(function(Pr){return xt(Qn(Pr.value))});Kn(Gr?Pn:Pn[0],Gr?ur:ur[0])}},Cr=fe.useState(null),wi=(0,ge.Z)(Cr,2),eo=wi[0],Xr=wi[1],Oi=fe.useState(0),Xi=(0,ge.Z)(Oi,2),di=Xi[0],ao=Xi[1],Ri=Ir!==void 0?Ir:mt!=="combobox",Nr=fe.useCallback(function(wn,In){var kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Pn=kn.source,ur=Pn===void 0?"keyboard":Pn;ao(In),Ut&&mt==="combobox"&&wn!==null&&ur==="keyboard"&&Xr(String(wn))},[Ut,mt]),to=function(In,kn,Pn){var ur=function(){var no,ji=Qn(In);return[lr?{label:ji==null?void 0:ji[tr.label],value:In,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:In}:In,xt(ji)]};if(kn&&Yt){var Pr=ur(),Gi=(0,ge.Z)(Pr,2),gi=Gi[0],li=Gi[1];Yt(gi,li)}else if(!kn&&pn&&Pn!=="clear"){var Ur=ur(),_i=(0,ge.Z)(Ur,2),Ji=_i[0],Mi=_i[1];pn(Ji,Mi)}},so=$n(function(wn,In){var kn,Pn=Gr?In.selected:!0;Pn?kn=Gr?[].concat((0,et.Z)(_n),[wn]):[wn]:kn=_n.filter(function(ur){return ur.value!==wn}),mi(kn),to(wn,Pn),mt==="combobox"?Xr(""):(!kt||yn)&&(Rn(""),Xr(""))}),Zi=function(In,kn){mi(In);var Pn=kn.type,ur=kn.values;(Pn==="remove"||Pn==="clear")&&ur.forEach(function(Pr){to(Pr.value,!1,Pn)})},Jr=function(In,kn){if(Rn(In),Xr(null),kn.source==="submit"){var Pn=(In||"").trim();if(Pn){var ur=Array.from(new Set([].concat((0,et.Z)(jr),[Pn])));mi(ur),to(Pn,!0),Rn("")}return}kn.source!=="blur"&&(mt==="combobox"&&mi(In),Vt==null||Vt(In))},xo=function(In){var kn=In;mt!=="tags"&&(kn=In.map(function(ur){var Pr=hn.get(ur);return Pr==null?void 0:Pr.value}).filter(function(ur){return ur!==void 0}));var Pn=Array.from(new Set([].concat((0,et.Z)(jr),(0,et.Z)(kn))));mi(Pn),Pn.forEach(function(ur){to(ur,!0)})},lo=fe.useMemo(function(){var wn=dr!==!1&&bn!==!1;return(0,Ne.Z)((0,Ne.Z)({},Tt),{},{flattenOptions:xi,onActiveValue:Nr,defaultActiveFirstOption:Ri,onSelect:so,menuItemSelectedIcon:ar,rawValues:jr,fieldNames:tr,virtual:wn,direction:Lr,listHeight:Xn,listItemHeight:Jn,childrenAsData:Yn,maxCount:zn,optionRender:An})},[zn,Tt,xi,Nr,Ri,so,ar,jr,tr,dr,bn,Lr,Xn,Jn,Yn,An]);return fe.createElement(Xt.Provider,{value:lo},fe.createElement(nt,(0,se.Z)({},Tr,{id:Zr,prefixCls:gt,ref:Me,omitDomProps:Er,mode:mt,displayValues:Ar,onDisplayValuesChange:Zi,direction:Lr,searchValue:Fr,onSearch:Jr,autoClearSearchValue:yn,onSearchSplit:xo,dropdownMatchSelectWidth:bn,OptionList:gr,emptyOptions:!xi.length,activeValue:eo,activeDescendantId:"".concat(Zr,"_list_").concat(di)})))}),qt=ot;qt.Option=sn,qt.OptGroup=Ot;var Sn=qt,jn=Sn},63158:function(At,Bt,de){"use strict";var se=de(32855),et=de(74430),Fe=de(11913),Ne=de(43079),ge=de(59301),ye=de(92310),Re=de.n(ye),Ge=de(18929),we=de(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],$e=ge.forwardRef(function(ve,rt){var We,Te=ve.prefixCls,Pe=Te===void 0?"rc-switch":Te,De=ve.className,tt=ve.checked,at=ve.defaultChecked,ht=ve.disabled,st=ve.loadingIcon,qe=ve.checkedChildren,lt=ve.unCheckedChildren,it=ve.onClick,Zt=ve.onChange,Je=ve.onKeyDown,Ue=(0,Ne.Z)(ve,fe),bt=(0,Ge.Z)(!1,{value:tt,defaultValue:at}),Ae=(0,Fe.Z)(bt,2),Ze=Ae[0],Le=Ae[1];function ze(dt,pe){var ce=Ze;return ht||(ce=dt,Le(ce),Zt==null||Zt(ce,pe)),ce}function Pt(dt){dt.which===we.Z.LEFT?ze(!1,dt):dt.which===we.Z.RIGHT&&ze(!0,dt),Je==null||Je(dt)}function pt(dt){var pe=ze(!Ze,dt);it==null||it(pe,dt)}var St=Re()(Pe,De,(We={},(0,et.Z)(We,"".concat(Pe,"-checked"),Ze),(0,et.Z)(We,"".concat(Pe,"-disabled"),ht),We));return ge.createElement("button",(0,se.Z)({},Ue,{type:"button",role:"switch","aria-checked":Ze,disabled:ht,className:St,ref:rt,onKeyDown:Pt,onClick:pt}),st,ge.createElement("span",{className:"".concat(Pe,"-inner")},ge.createElement("span",{className:"".concat(Pe,"-inner-checked")},qe),ge.createElement("span",{className:"".concat(Pe,"-inner-unchecked")},lt)))});$e.displayName="Switch",Bt.Z=$e},22711:function(At,Bt,de){"use strict";de.r(Bt),de.d(Bt,{ResizableTextArea:function(){return Ae},default:function(){return Pt}});var se=de(32855),et=de(74430),Fe=de(27247),Ne=de(3300),ge=de(11913),ye=de(43079),Re=de(92310),Ge=de.n(Re),we=de(36901),fe=de(66003),$e=de(30292),ve=de(18929),rt=de(59301),We=de(34666),Te=de(29301),Pe=de(34280),De=de(16089),tt=`
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;
`,at=["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"],ht={},st;function qe(pt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=pt.getAttribute("id")||pt.getAttribute("data-reactid")||pt.getAttribute("name");if(St&&ht[dt])return ht[dt];var pe=window.getComputedStyle(pt),ce=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),He=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),ft=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),ut=at.map(function(Be){return"".concat(Be,":").concat(pe.getPropertyValue(Be))}).join(";"),xe={sizingStyle:ut,paddingSize:He,borderSize:ft,boxSizing:ce};return St&&dt&&(ht[dt]=xe),xe}function lt(pt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;st||(st=document.createElement("textarea"),st.setAttribute("tab-index","-1"),st.setAttribute("aria-hidden","true"),st.setAttribute("name","hiddenTextarea"),document.body.appendChild(st)),pt.getAttribute("wrap")?st.setAttribute("wrap",pt.getAttribute("wrap")):st.removeAttribute("wrap");var ce=qe(pt,St),He=ce.paddingSize,ft=ce.borderSize,ut=ce.boxSizing,xe=ce.sizingStyle;st.setAttribute("style","".concat(xe,";").concat(tt)),st.value=pt.value||pt.placeholder||"";var Be=void 0,Se=void 0,Qe,Ve=st.scrollHeight;if(ut==="border-box"?Ve+=ft:ut==="content-box"&&(Ve-=He),dt!==null||pe!==null){st.value=" ";var ct=st.scrollHeight-He;dt!==null&&(Be=ct*dt,ut==="border-box"&&(Be=Be+He+ft),Ve=Math.max(Be,Ve)),pe!==null&&(Se=ct*pe,ut==="border-box"&&(Se=Se+He+ft),Qe=Ve>Se?"":"hidden",Ve=Math.min(Se,Ve))}var ke={height:Ve,overflowY:Qe,resize:"none"};return Be&&(ke.minHeight=Be),Se&&(ke.maxHeight=Se),ke}var it=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Zt=0,Je=1,Ue=2,bt=rt.forwardRef(function(pt,St){var dt=pt,pe=dt.prefixCls,ce=dt.defaultValue,He=dt.value,ft=dt.autoSize,ut=dt.onResize,xe=dt.className,Be=dt.style,Se=dt.disabled,Qe=dt.onChange,Ve=dt.onInternalAutoSize,ct=(0,ye.Z)(dt,it),ke=(0,ve.Z)(ce,{value:He,postState:function(sn){return sn!=null?sn:""}}),Ye=(0,ge.Z)(ke,2),Xe=Ye[0],ie=Ye[1],ee=function(sn){ie(sn.target.value),Qe==null||Qe(sn)},z=rt.useRef();rt.useImperativeHandle(St,function(){return{textArea:z.current}});var re=rt.useMemo(function(){return ft&&(0,We.Z)(ft)==="object"?[ft.minRows,ft.maxRows]:[]},[ft]),le=(0,ge.Z)(re,2),ne=le[0],me=le[1],Oe=!!ft,wt=function(){try{if(document.activeElement===z.current){var sn=z.current,Mn=sn.selectionStart,un=sn.selectionEnd,mn=sn.scrollTop;z.current.setSelectionRange(Mn,un),z.current.scrollTop=mn}}catch(nr){}},Ct=rt.useState(Ue),vt=(0,ge.Z)(Ct,2),xt=vt[0],It=vt[1],Rt=rt.useState(),Xt=(0,ge.Z)(Rt,2),Jt=Xt[0],Et=Xt[1],Ft=function(){It(Zt)};(0,Pe.Z)(function(){Oe&&Ft()},[He,ne,me,Oe]),(0,Pe.Z)(function(){if(xt===Zt)It(Je);else if(xt===Je){var Gt=lt(z.current,!1,ne,me);It(Ue),Et(Gt)}else wt()},[xt]);var kt=rt.useRef(),Qt=function(){De.Z.cancel(kt.current)},nt=function(sn){xt===Ue&&(ut==null||ut(sn),ft&&(Qt(),kt.current=(0,De.Z)(function(){Ft()})))};rt.useEffect(function(){return Qt},[]);var rn=Oe?Jt:null,Ot=(0,Fe.Z)((0,Fe.Z)({},Be),rn);return(xt===Zt||xt===Je)&&(Ot.overflowY="hidden",Ot.overflowX="hidden"),rt.createElement(Te.Z,{onResize:nt,disabled:!(ft||ut)},rt.createElement("textarea",(0,se.Z)({},ct,{ref:z,style:Ot,className:Ge()(pe,xe,(0,et.Z)({},"".concat(pe,"-disabled"),Se)),disabled:Se,value:Xe,onChange:ee})))}),Ae=bt,Ze=["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"],Le=rt.forwardRef(function(pt,St){var dt,pe=pt.defaultValue,ce=pt.value,He=pt.onFocus,ft=pt.onBlur,ut=pt.onChange,xe=pt.allowClear,Be=pt.maxLength,Se=pt.onCompositionStart,Qe=pt.onCompositionEnd,Ve=pt.suffix,ct=pt.prefixCls,ke=ct===void 0?"rc-textarea":ct,Ye=pt.showCount,Xe=pt.count,ie=pt.className,ee=pt.style,z=pt.disabled,re=pt.hidden,le=pt.classNames,ne=pt.styles,me=pt.onResize,Oe=pt.onClear,wt=pt.onPressEnter,Ct=pt.readOnly,vt=pt.autoSize,xt=pt.onKeyDown,It=(0,ye.Z)(pt,Ze),Rt=(0,ve.Z)(pe,{value:ce,defaultValue:pe}),Xt=(0,ge.Z)(Rt,2),Jt=Xt[0],Et=Xt[1],Ft=Jt==null?"":String(Jt),kt=rt.useState(!1),Qt=(0,ge.Z)(kt,2),nt=Qt[0],rn=Qt[1],Ot=rt.useRef(!1),Gt=rt.useState(null),sn=(0,ge.Z)(Gt,2),Mn=sn[0],un=sn[1],mn=(0,rt.useRef)(null),nr=(0,rt.useRef)(null),Un=function(){var qt;return(qt=nr.current)===null||qt===void 0?void 0:qt.textArea},zr=function(){Un().focus()};(0,rt.useImperativeHandle)(St,function(){var ot;return{resizableTextArea:nr.current,focus:zr,blur:function(){Un().blur()},nativeElement:((ot=mn.current)===null||ot===void 0?void 0:ot.nativeElement)||Un()}}),(0,rt.useEffect)(function(){rn(function(ot){return!z&&ot})},[z]);var Wr=rt.useState(null),xr=(0,ge.Z)(Wr,2),gr=xr[0],Hn=xr[1];rt.useEffect(function(){if(gr){var ot;(ot=Un()).setSelectionRange.apply(ot,(0,Ne.Z)(gr))}},[gr]);var ir=(0,fe.Z)(Xe,Ye),Rr=(dt=ir.max)!==null&&dt!==void 0?dt:Be,Nn=Number(Rr)>0,rr=ir.strategy(Ft),Vn=!!Rr&&rr>Rr,kr=function(qt,Sn){var jn=Sn;!Ot.current&&ir.exceedFormatter&&ir.max&&ir.strategy(Sn)>ir.max&&(jn=ir.exceedFormatter(Sn,{max:ir.max}),Sn!==jn&&Hn([Un().selectionStart||0,Un().selectionEnd||0])),Et(jn),(0,$e.rJ)(qt.currentTarget,qt,ut,jn)},an=function(qt){Ot.current=!0,Se==null||Se(qt)},fn=function(qt){Ot.current=!1,kr(qt,qt.currentTarget.value),Qe==null||Qe(qt)},gn=function(qt){kr(qt,qt.target.value)},En=function(qt){qt.key==="Enter"&&wt&&wt(qt),xt==null||xt(qt)},$n=function(qt){rn(!0),He==null||He(qt)},or=function(qt){rn(!1),ft==null||ft(qt)},yr=function(qt){Et(""),zr(),(0,$e.rJ)(Un(),qt,ut)},Zn=Ve,On;ir.show&&(ir.showFormatter?On=ir.showFormatter({value:Ft,count:rr,maxLength:Rr}):On="".concat(rr).concat(Nn?" / ".concat(Rr):""),Zn=rt.createElement(rt.Fragment,null,Zn,rt.createElement("span",{className:Ge()("".concat(ke,"-data-count"),le==null?void 0:le.count),style:ne==null?void 0:ne.count},On)));var Er=function(qt){var Sn;me==null||me(qt),(Sn=Un())!==null&&Sn!==void 0&&Sn.style.height&&un(!0)},Wt=!vt&&!Ye&&!xe;return rt.createElement(we.BaseInput,{ref:mn,value:Ft,allowClear:xe,handleReset:yr,suffix:Zn,prefixCls:ke,classNames:(0,Fe.Z)((0,Fe.Z)({},le),{},{affixWrapper:Ge()(le==null?void 0:le.affixWrapper,(0,et.Z)((0,et.Z)({},"".concat(ke,"-show-count"),Ye),"".concat(ke,"-textarea-allow-clear"),xe))}),disabled:z,focused:nt,className:Ge()(ie,Vn&&"".concat(ke,"-out-of-range")),style:(0,Fe.Z)((0,Fe.Z)({},ee),Mn&&!Wt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof On=="string"?On:void 0}},hidden:re,readOnly:Ct,onClear:Oe},rt.createElement(Ae,(0,se.Z)({},It,{autoSize:vt,maxLength:Be,onKeyDown:En,onChange:gn,onFocus:$n,onBlur:or,onCompositionStart:an,onCompositionEnd:fn,className:Ge()(le==null?void 0:le.textarea),style:(0,Fe.Z)((0,Fe.Z)({},ne==null?void 0:ne.textarea),{},{resize:ee==null?void 0:ee.resize}),disabled:z,prefixCls:ke,onResize:Er,ref:nr,readOnly:Ct})))}),ze=Le,Pt=ze},90472:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return pt}});var se=de(32855),et=de(33377),Fe=de(93912),Ne=de(83383),ge=de(18881),ye=de(85461),Re=de(74430),Ge=de(59301),we=de(27247),fe=de(43079),$e=de(34666),ve=de(13932),rt=de(68702),We=de(3300),Te=de(92310),Pe=de.n(Te),De=de(26112),tt=de(48736),at=function(St,dt){if(St&&dt){var pe=Array.isArray(dt)?dt:dt.split(","),ce=St.name||"",He=St.type||"",ft=He.replace(/\/.*$/,"");return pe.some(function(ut){var xe=ut.trim();if(/^\*(\/\*)?$/.test(ut))return!0;if(xe.charAt(0)==="."){var Be=ce.toLowerCase(),Se=xe.toLowerCase(),Qe=[Se];return(Se===".jpg"||Se===".jpeg")&&(Qe=[".jpg",".jpeg"]),Qe.some(function(Ve){return Be.endsWith(Ve)})}return/\/\*$/.test(xe)?ft===xe.replace(/\/.*$/,""):He===xe?!0:/^\w+$/.test(xe)?((0,tt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(xe,"'.Skip for check.")),!0):!1})}return!0};function ht(St,dt){var pe="cannot ".concat(St.method," ").concat(St.action," ").concat(dt.status,"'"),ce=new Error(pe);return ce.status=dt.status,ce.method=St.method,ce.url=St.action,ce}function st(St){var dt=St.responseText||St.response;if(!dt)return dt;try{return JSON.parse(dt)}catch(pe){return dt}}function qe(St){var dt=new XMLHttpRequest;St.onProgress&&dt.upload&&(dt.upload.onprogress=function(ft){ft.total>0&&(ft.percent=ft.loaded/ft.total*100),St.onProgress(ft)});var pe=new FormData;St.data&&Object.keys(St.data).forEach(function(He){var ft=St.data[He];if(Array.isArray(ft)){ft.forEach(function(ut){pe.append("".concat(He,"[]"),ut)});return}pe.append(He,ft)}),St.file instanceof Blob?pe.append(St.filename,St.file,St.file.name):pe.append(St.filename,St.file),dt.onerror=function(ft){St.onError(ft)},dt.onload=function(){return dt.status<200||dt.status>=300?St.onError(ht(St,dt),st(dt)):St.onSuccess(st(dt),dt)},dt.open(St.method,St.action,!0),St.withCredentials&&"withCredentials"in dt&&(dt.withCredentials=!0);var ce=St.headers||{};return ce["X-Requested-With"]!==null&&dt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ce).forEach(function(He){ce[He]!==null&&dt.setRequestHeader(He,ce[He])}),dt.send(pe),{abort:function(){dt.abort()}}}var lt=function(){var St=(0,rt.Z)((0,ve.Z)().mark(function dt(pe,ce){var He,ft,ut,xe,Be,Se,Qe,Ve;return(0,ve.Z)().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:Se=function(){return Se=(0,rt.Z)((0,ve.Z)().mark(function Xe(ie){return(0,ve.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",new Promise(function(re){ie.file(function(le){ce(le)?(ie.fullPath&&!le.webkitRelativePath&&(Object.defineProperties(le,{webkitRelativePath:{writable:!0}}),le.webkitRelativePath=ie.fullPath.replace(/^\//,""),Object.defineProperties(le,{webkitRelativePath:{writable:!1}})),re(le)):re(null)})}));case 1:case"end":return z.stop()}},Xe)})),Se.apply(this,arguments)},Be=function(Xe){return Se.apply(this,arguments)},xe=function(){return xe=(0,rt.Z)((0,ve.Z)().mark(function Xe(ie){var ee,z,re,le,ne;return(0,ve.Z)().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:ee=ie.createReader(),z=[];case 2:return Oe.next=5,new Promise(function(wt){ee.readEntries(wt,function(){return wt([])})});case 5:if(re=Oe.sent,le=re.length,le){Oe.next=9;break}return Oe.abrupt("break",12);case 9:for(ne=0;ne<le;ne++)z.push(re[ne]);Oe.next=2;break;case 12:return Oe.abrupt("return",z);case 13:case"end":return Oe.stop()}},Xe)})),xe.apply(this,arguments)},ut=function(Xe){return xe.apply(this,arguments)},He=[],ft=[],pe.forEach(function(Ye){return ft.push(Ye.webkitGetAsEntry())}),Qe=function(){var Ye=(0,rt.Z)((0,ve.Z)().mark(function Xe(ie,ee){var z,re;return(0,ve.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,Be(ie);case 6:z=ne.sent,z&&He.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,ft.push.apply(ft,(0,We.Z)(re));case 15:case"end":return ne.stop()}},Xe)}));return function(ie,ee){return Ye.apply(this,arguments)}}(),Ve=0;case 9:if(!(Ve<ft.length)){ke.next=15;break}return ke.next=12,Qe(ft[Ve]);case 12:Ve++,ke.next=9;break;case 15:return ke.abrupt("return",He);case 16:case"end":return ke.stop()}},dt)}));return function(pe,ce){return St.apply(this,arguments)}}(),it=lt,Zt=+new Date,Je=0;function Ue(){return"rc-upload-".concat(Zt,"-").concat(++Je)}var bt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ae=function(St){(0,ge.Z)(pe,St);var dt=(0,ye.Z)(pe);function pe(){var ce;(0,et.Z)(this,pe);for(var He=arguments.length,ft=new Array(He),ut=0;ut<He;ut++)ft[ut]=arguments[ut];return ce=dt.call.apply(dt,[this].concat(ft)),(0,Re.Z)((0,Ne.Z)(ce),"state",{uid:Ue()}),(0,Re.Z)((0,Ne.Z)(ce),"reqs",{}),(0,Re.Z)((0,Ne.Z)(ce),"fileInput",void 0),(0,Re.Z)((0,Ne.Z)(ce),"_isMounted",void 0),(0,Re.Z)((0,Ne.Z)(ce),"onChange",function(xe){var Be=ce.props,Se=Be.accept,Qe=Be.directory,Ve=xe.target.files,ct=(0,We.Z)(Ve).filter(function(ke){return!Qe||at(ke,Se)});ce.uploadFiles(ct),ce.reset()}),(0,Re.Z)((0,Ne.Z)(ce),"onClick",function(xe){var Be=ce.fileInput;if(Be){var Se=xe.target,Qe=ce.props.onClick;if(Se&&Se.tagName==="BUTTON"){var Ve=Be.parentNode;Ve.focus(),Se.blur()}Be.click(),Qe&&Qe(xe)}}),(0,Re.Z)((0,Ne.Z)(ce),"onKeyDown",function(xe){xe.key==="Enter"&&ce.onClick(xe)}),(0,Re.Z)((0,Ne.Z)(ce),"onFileDrop",function(){var xe=(0,rt.Z)((0,ve.Z)().mark(function Be(Se){var Qe,Ve,ct;return(0,ve.Z)().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(Qe=ce.props.multiple,Se.preventDefault(),Se.type!=="dragover"){Ye.next=4;break}return Ye.abrupt("return");case 4:if(!ce.props.directory){Ye.next=11;break}return Ye.next=7,it(Array.prototype.slice.call(Se.dataTransfer.items),function(Xe){return at(Xe,ce.props.accept)});case 7:Ve=Ye.sent,ce.uploadFiles(Ve),Ye.next=14;break;case 11:ct=(0,We.Z)(Se.dataTransfer.files).filter(function(Xe){return at(Xe,ce.props.accept)}),Qe===!1&&(ct=ct.slice(0,1)),ce.uploadFiles(ct);case 14:case"end":return Ye.stop()}},Be)}));return function(Be){return xe.apply(this,arguments)}}()),(0,Re.Z)((0,Ne.Z)(ce),"uploadFiles",function(xe){var Be=(0,We.Z)(xe),Se=Be.map(function(Qe){return Qe.uid=Ue(),ce.processFile(Qe,Be)});Promise.all(Se).then(function(Qe){var Ve=ce.props.onBatchStart;Ve==null||Ve(Qe.map(function(ct){var ke=ct.origin,Ye=ct.parsedFile;return{file:ke,parsedFile:Ye}})),Qe.filter(function(ct){return ct.parsedFile!==null}).forEach(function(ct){ce.post(ct)})})}),(0,Re.Z)((0,Ne.Z)(ce),"processFile",function(){var xe=(0,rt.Z)((0,ve.Z)().mark(function Be(Se,Qe){var Ve,ct,ke,Ye,Xe,ie,ee,z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(Ve=ce.props.beforeUpload,ct=Se,!Ve){ne.next=14;break}return ne.prev=3,ne.next=6,Ve(Se,Qe);case 6:ct=ne.sent,ne.next=12;break;case 9:ne.prev=9,ne.t0=ne.catch(3),ct=!1;case 12:if(ct!==!1){ne.next=14;break}return ne.abrupt("return",{origin:Se,parsedFile:null,action:null,data:null});case 14:if(ke=ce.props.action,typeof ke!="function"){ne.next=21;break}return ne.next=18,ke(Se);case 18:Ye=ne.sent,ne.next=22;break;case 21:Ye=ke;case 22:if(Xe=ce.props.data,typeof Xe!="function"){ne.next=29;break}return ne.next=26,Xe(Se);case 26:ie=ne.sent,ne.next=30;break;case 29:ie=Xe;case 30:return ee=((0,$e.Z)(ct)==="object"||typeof ct=="string")&&ct?ct:Se,ee instanceof File?z=ee:z=new File([ee],Se.name,{type:Se.type}),re=z,re.uid=Se.uid,ne.abrupt("return",{origin:Se,data:ie,parsedFile:re,action:Ye});case 35:case"end":return ne.stop()}},Be,null,[[3,9]])}));return function(Be,Se){return xe.apply(this,arguments)}}()),(0,Re.Z)((0,Ne.Z)(ce),"saveFileInput",function(xe){ce.fileInput=xe}),ce}return(0,Fe.Z)(pe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(He){var ft=this,ut=He.data,xe=He.origin,Be=He.action,Se=He.parsedFile;if(this._isMounted){var Qe=this.props,Ve=Qe.onStart,ct=Qe.customRequest,ke=Qe.name,Ye=Qe.headers,Xe=Qe.withCredentials,ie=Qe.method,ee=xe.uid,z=ct||qe,re={action:Be,filename:ke,data:ut,file:Se,headers:Ye,withCredentials:Xe,method:ie||"post",onProgress:function(ne){var me=ft.props.onProgress;me==null||me(ne,Se)},onSuccess:function(ne,me){var Oe=ft.props.onSuccess;Oe==null||Oe(ne,Se,me),delete ft.reqs[ee]},onError:function(ne,me){var Oe=ft.props.onError;Oe==null||Oe(ne,me,Se),delete ft.reqs[ee]}};Ve(xe),this.reqs[ee]=z(re)}}},{key:"reset",value:function(){this.setState({uid:Ue()})}},{key:"abort",value:function(He){var ft=this.reqs;if(He){var ut=He.uid?He.uid:He;ft[ut]&&ft[ut].abort&&ft[ut].abort(),delete ft[ut]}else Object.keys(ft).forEach(function(xe){ft[xe]&&ft[xe].abort&&ft[xe].abort(),delete ft[xe]})}},{key:"render",value:function(){var He=this.props,ft=He.component,ut=He.prefixCls,xe=He.className,Be=He.classNames,Se=Be===void 0?{}:Be,Qe=He.disabled,Ve=He.id,ct=He.name,ke=He.style,Ye=He.styles,Xe=Ye===void 0?{}:Ye,ie=He.multiple,ee=He.accept,z=He.capture,re=He.children,le=He.directory,ne=He.openFileDialogOnClick,me=He.onMouseEnter,Oe=He.onMouseLeave,wt=He.hasControlInside,Ct=(0,fe.Z)(He,bt),vt=Pe()((0,Re.Z)((0,Re.Z)((0,Re.Z)({},ut,!0),"".concat(ut,"-disabled"),Qe),xe,xe)),xt=le?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},It=Qe?{}:{onClick:ne?this.onClick:function(){},onKeyDown:ne?this.onKeyDown:function(){},onMouseEnter:me,onMouseLeave:Oe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:wt?void 0:"0"};return Ge.createElement(ft,(0,se.Z)({},It,{className:vt,role:wt?void 0:"button",style:ke}),Ge.createElement("input",(0,se.Z)({},(0,De.Z)(Ct,{aria:!0,data:!0}),{id:Ve,name:ct,disabled:Qe,type:"file",ref:this.saveFileInput,onClick:function(Xt){return Xt.stopPropagation()},key:this.state.uid,style:(0,we.Z)({display:"none"},Xe.input),className:Se.input,accept:ee},xt,{multiple:ie,onChange:this.onChange},z!=null?{capture:z}:{})),re)}}]),pe}(Ge.Component),Ze=Ae;function Le(){}var ze=function(St){(0,ge.Z)(pe,St);var dt=(0,ye.Z)(pe);function pe(){var ce;(0,et.Z)(this,pe);for(var He=arguments.length,ft=new Array(He),ut=0;ut<He;ut++)ft[ut]=arguments[ut];return ce=dt.call.apply(dt,[this].concat(ft)),(0,Re.Z)((0,Ne.Z)(ce),"uploader",void 0),(0,Re.Z)((0,Ne.Z)(ce),"saveUploader",function(xe){ce.uploader=xe}),ce}return(0,Fe.Z)(pe,[{key:"abort",value:function(He){this.uploader.abort(He)}},{key:"render",value:function(){return Ge.createElement(Ze,(0,se.Z)({},this.props,{ref:this.saveUploader}))}}]),pe}(Ge.Component);(0,Re.Z)(ze,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Le,onError:Le,onSuccess:Le,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Pt=ze,pt=Pt},6790:function(At,Bt,de){"use strict";de.d(Bt,{Z:function(){return Xe}});var se=de(32855),et=de(34666),Fe=de(27247),Ne=de(74430),ge=de(11913),ye=de(43079),Re=de(92310),Ge=de.n(Re),we=de(29301),fe=de(70425),$e=de(34280),ve=de(59301),rt=de(4676),We=ve.forwardRef(function(ie,ee){var z=ie.height,re=ie.offsetY,le=ie.offsetX,ne=ie.children,me=ie.prefixCls,Oe=ie.onInnerResize,wt=ie.innerProps,Ct=ie.rtl,vt=ie.extra,xt={},It={display:"flex",flexDirection:"column"};return re!==void 0&&(xt={height:z,position:"relative",overflow:"hidden"},It=(0,Fe.Z)((0,Fe.Z)({},It),{},(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({transform:"translateY(".concat(re,"px)")},Ct?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:xt},ve.createElement(we.Z,{onResize:function(Xt){var Jt=Xt.offsetHeight;Jt&&Oe&&Oe()}},ve.createElement("div",(0,se.Z)({style:It,className:Ge()((0,Ne.Z)({},"".concat(me,"-holder-inner"),me)),ref:ee},wt),ne,vt)))});We.displayName="Filler";var Te=We;function Pe(ie){var ee=ie.children,z=ie.setRef,re=ve.useCallback(function(le){z(le)},[]);return ve.cloneElement(ee,{ref:re})}function De(ie,ee,z,re,le,ne,me,Oe){var wt=Oe.getKey;return ie.slice(ee,z+1).map(function(Ct,vt){var xt=ee+vt,It=me(Ct,xt,{style:{width:re},offsetX:le}),Rt=wt(Ct);return ve.createElement(Pe,{key:Rt,setRef:function(Jt){return ne(Ct,Jt)}},It)})}function tt(ie,ee,z,re){var le=z-ie,ne=ee-z,me=Math.min(le,ne)*2;if(re<=me){var Oe=Math.floor(re/2);return re%2?z+Oe+1:z-Oe}return le>ne?z-(re-ne):z+(re-le)}function at(ie,ee,z){var re=ie.length,le=ee.length,ne,me;if(re===0&&le===0)return null;re<le?(ne=ie,me=ee):(ne=ee,me=ie);var Oe={__EMPTY_ITEM__:!0};function wt(Xt){return Xt!==void 0?z(Xt):Oe}for(var Ct=null,vt=Math.abs(re-le)!==1,xt=0;xt<me.length;xt+=1){var It=wt(ne[xt]),Rt=wt(me[xt]);if(It!==Rt){Ct=xt,vt=vt||It!==wt(me[xt+1]);break}}return Ct===null?null:{index:Ct,multiple:vt}}function ht(ie,ee,z){var re=ve.useState(ie),le=(0,ge.Z)(re,2),ne=le[0],me=le[1],Oe=ve.useState(null),wt=(0,ge.Z)(Oe,2),Ct=wt[0],vt=wt[1];return ve.useEffect(function(){var xt=at(ne||[],ie||[],ee);(xt==null?void 0:xt.index)!==void 0&&(z==null||z(xt.index),vt(ie[xt.index])),me(ie)},[ie]),[Ct]}var st=de(16089),qe=(typeof navigator=="undefined"?"undefined":(0,et.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),lt=qe,it=function(ie,ee,z,re){var le=(0,ve.useRef)(!1),ne=(0,ve.useRef)(null);function me(){clearTimeout(ne.current),le.current=!0,ne.current=setTimeout(function(){le.current=!1},50)}var Oe=(0,ve.useRef)({top:ie,bottom:ee,left:z,right:re});return Oe.current.top=ie,Oe.current.bottom=ee,Oe.current.left=z,Oe.current.right=re,function(wt,Ct){var vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xt=wt?Ct<0&&Oe.current.left||Ct>0&&Oe.current.right:Ct<0&&Oe.current.top||Ct>0&&Oe.current.bottom;return vt&&xt?(clearTimeout(ne.current),le.current=!1):(!xt||le.current)&&me(),!le.current&&xt}};function Zt(ie,ee,z,re,le,ne,me){var Oe=(0,ve.useRef)(0),wt=(0,ve.useRef)(null),Ct=(0,ve.useRef)(null),vt=(0,ve.useRef)(!1),xt=it(ee,z,re,le);function It(kt,Qt){if(st.Z.cancel(wt.current),!xt(!1,Qt)){var nt=kt;if(!nt._virtualHandled)nt._virtualHandled=!0;else return;Oe.current+=Qt,Ct.current=Qt,lt||nt.preventDefault(),wt.current=(0,st.Z)(function(){var rn=vt.current?10:1;me(Oe.current*rn,!1),Oe.current=0})}}function Rt(kt,Qt){me(Qt,!0),lt||kt.preventDefault()}var Xt=(0,ve.useRef)(null),Jt=(0,ve.useRef)(null);function Et(kt){if(ie){st.Z.cancel(Jt.current),Jt.current=(0,st.Z)(function(){Xt.current=null},2);var Qt=kt.deltaX,nt=kt.deltaY,rn=kt.shiftKey,Ot=Qt,Gt=nt;(Xt.current==="sx"||!Xt.current&&rn&&nt&&!Qt)&&(Ot=nt,Gt=0,Xt.current="sx");var sn=Math.abs(Ot),Mn=Math.abs(Gt);Xt.current===null&&(Xt.current=ne&&sn>Mn?"x":"y"),Xt.current==="y"?It(kt,Gt):Rt(kt,Ot)}}function Ft(kt){ie&&(vt.current=kt.detail===Ct.current)}return[Et,Ft]}function Je(ie,ee,z,re){var le=ve.useMemo(function(){return[new Map,[]]},[ie,z.id,re]),ne=(0,ge.Z)(le,2),me=ne[0],Oe=ne[1],wt=function(vt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vt,It=me.get(vt),Rt=me.get(xt);if(It===void 0||Rt===void 0)for(var Xt=ie.length,Jt=Oe.length;Jt<Xt;Jt+=1){var Et,Ft=ie[Jt],kt=ee(Ft);me.set(kt,Jt);var Qt=(Et=z.get(kt))!==null&&Et!==void 0?Et:re;if(Oe[Jt]=(Oe[Jt-1]||0)+Qt,kt===vt&&(It=Jt),kt===xt&&(Rt=Jt),It!==void 0&&Rt!==void 0)break}return{top:Oe[It-1]||0,bottom:Oe[Rt]}};return wt}var Ue=de(33377),bt=de(93912),Ae=function(){function ie(){(0,Ue.Z)(this,ie),(0,Ne.Z)(this,"maps",void 0),(0,Ne.Z)(this,"id",0),(0,Ne.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,bt.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}(),Ze=Ae;function Le(ie){var ee=parseFloat(ie);return isNaN(ee)?0:ee}function ze(ie,ee,z){var re=ve.useState(0),le=(0,ge.Z)(re,2),ne=le[0],me=le[1],Oe=(0,ve.useRef)(new Map),wt=(0,ve.useRef)(new Ze),Ct=(0,ve.useRef)(0);function vt(){Ct.current+=1}function xt(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;vt();var Xt=function(){var Ft=!1;Oe.current.forEach(function(kt,Qt){if(kt&&kt.offsetParent){var nt=kt.offsetHeight,rn=getComputedStyle(kt),Ot=rn.marginTop,Gt=rn.marginBottom,sn=Le(Ot),Mn=Le(Gt),un=nt+sn+Mn;wt.current.get(Qt)!==un&&(wt.current.set(Qt,un),Ft=!0)}}),Ft&&me(function(kt){return kt+1})};if(Rt)Xt();else{Ct.current+=1;var Jt=Ct.current;Promise.resolve().then(function(){Jt===Ct.current&&Xt()})}}function It(Rt,Xt){var Jt=ie(Rt),Et=Oe.current.get(Jt);Xt?(Oe.current.set(Jt,Xt),xt()):Oe.current.delete(Jt),!Et!=!Xt&&(Xt?ee==null||ee(Rt):z==null||z(Rt))}return(0,ve.useEffect)(function(){return vt},[]),[It,xt,wt.current,ne]}var Pt=14/15;function pt(ie,ee,z){var re=(0,ve.useRef)(!1),le=(0,ve.useRef)(0),ne=(0,ve.useRef)(0),me=(0,ve.useRef)(null),Oe=(0,ve.useRef)(null),wt,Ct=function(Rt){if(re.current){var Xt=Math.ceil(Rt.touches[0].pageX),Jt=Math.ceil(Rt.touches[0].pageY),Et=le.current-Xt,Ft=ne.current-Jt,kt=Math.abs(Et)>Math.abs(Ft);kt?le.current=Xt:ne.current=Jt;var Qt=z(kt,kt?Et:Ft,!1,Rt);Qt&&Rt.preventDefault(),clearInterval(Oe.current),Qt&&(Oe.current=setInterval(function(){kt?Et*=Pt:Ft*=Pt;var nt=Math.floor(kt?Et:Ft);(!z(kt,nt,!0)||Math.abs(nt)<=.1)&&clearInterval(Oe.current)},16))}},vt=function(){re.current=!1,wt()},xt=function(Rt){wt(),Rt.touches.length===1&&!re.current&&(re.current=!0,le.current=Math.ceil(Rt.touches[0].pageX),ne.current=Math.ceil(Rt.touches[0].pageY),me.current=Rt.target,me.current.addEventListener("touchmove",Ct,{passive:!1}),me.current.addEventListener("touchend",vt,{passive:!0}))};wt=function(){me.current&&(me.current.removeEventListener("touchmove",Ct),me.current.removeEventListener("touchend",vt))},(0,$e.Z)(function(){return ie&&ee.current.addEventListener("touchstart",xt,{passive:!0}),function(){var It;(It=ee.current)===null||It===void 0||It.removeEventListener("touchstart",xt),wt(),clearInterval(Oe.current)}},[ie])}function St(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){ve.useEffect(function(){var re=ee.current;if(ie&&re){var le=!1,ne,me,Oe=function(){st.Z.cancel(ne)},wt=function It(){Oe(),ne=(0,st.Z)(function(){z(me),It()})},Ct=function(Rt){if(!(Rt.target.draggable||Rt.button!==0)){var Xt=Rt;Xt._virtualHandled||(Xt._virtualHandled=!0,le=!0)}},vt=function(){le=!1,Oe()},xt=function(Rt){if(le){var Xt=dt(Rt,!1),Jt=re.getBoundingClientRect(),Et=Jt.top,Ft=Jt.bottom;if(Xt<=Et){var kt=Et-Xt;me=-St(kt),wt()}else if(Xt>=Ft){var Qt=Xt-Ft;me=St(Qt),wt()}else Oe()}};return re.addEventListener("mousedown",Ct),re.ownerDocument.addEventListener("mouseup",vt),re.ownerDocument.addEventListener("mousemove",xt),function(){re.removeEventListener("mousedown",Ct),re.ownerDocument.removeEventListener("mouseup",vt),re.ownerDocument.removeEventListener("mousemove",xt),Oe()}}},[ie])}var ce=10;function He(ie,ee,z,re,le,ne,me,Oe){var wt=ve.useRef(),Ct=ve.useState(null),vt=(0,ge.Z)(Ct,2),xt=vt[0],It=vt[1];return(0,$e.Z)(function(){if(xt&&xt.times<ce){if(!ie.current){It(function(ir){return(0,Fe.Z)({},ir)});return}ne();var Rt=xt.targetAlign,Xt=xt.originAlign,Jt=xt.index,Et=xt.offset,Ft=ie.current.clientHeight,kt=!1,Qt=Rt,nt=null;if(Ft){for(var rn=Rt||Xt,Ot=0,Gt=0,sn=0,Mn=Math.min(ee.length-1,Jt),un=0;un<=Mn;un+=1){var mn=le(ee[un]);Gt=Ot;var nr=z.get(mn);sn=Gt+(nr===void 0?re:nr),Ot=sn}for(var Un=rn==="top"?Et:Ft-Et,zr=Mn;zr>=0;zr-=1){var Wr=le(ee[zr]),xr=z.get(Wr);if(xr===void 0){kt=!0;break}if(Un-=xr,Un<=0)break}switch(rn){case"top":nt=Gt-Et;break;case"bottom":nt=sn-Ft+Et;break;default:{var gr=ie.current.scrollTop,Hn=gr+Ft;Gt<gr?Qt="top":sn>Hn&&(Qt="bottom")}}nt!==null&&me(nt),nt!==xt.lastTop&&(kt=!0)}kt&&It((0,Fe.Z)((0,Fe.Z)({},xt),{},{times:xt.times+1,targetAlign:Qt,lastTop:nt}))}},[xt,ie.current]),function(Rt){if(Rt==null){Oe();return}if(st.Z.cancel(wt.current),typeof Rt=="number")me(Rt);else if(Rt&&(0,et.Z)(Rt)==="object"){var Xt,Jt=Rt.align;"index"in Rt?Xt=Rt.index:Xt=ee.findIndex(function(kt){return le(kt)===Rt.key});var Et=Rt.offset,Ft=Et===void 0?0:Et;It({times:0,index:Xt,offset:Ft,originAlign:Jt})}}}var ft=ve.forwardRef(function(ie,ee){var z=ie.prefixCls,re=ie.rtl,le=ie.scrollOffset,ne=ie.scrollRange,me=ie.onStartMove,Oe=ie.onStopMove,wt=ie.onScroll,Ct=ie.horizontal,vt=ie.spinSize,xt=ie.containerSize,It=ie.style,Rt=ie.thumbStyle,Xt=ie.showScrollBar,Jt=ve.useState(!1),Et=(0,ge.Z)(Jt,2),Ft=Et[0],kt=Et[1],Qt=ve.useState(null),nt=(0,ge.Z)(Qt,2),rn=nt[0],Ot=nt[1],Gt=ve.useState(null),sn=(0,ge.Z)(Gt,2),Mn=sn[0],un=sn[1],mn=!re,nr=ve.useRef(),Un=ve.useRef(),zr=ve.useState(Xt),Wr=(0,ge.Z)(zr,2),xr=Wr[0],gr=Wr[1],Hn=ve.useRef(),ir=function(){Xt===!0||Xt===!1||(clearTimeout(Hn.current),gr(!0),Hn.current=setTimeout(function(){gr(!1)},3e3))},Rr=ne-xt||0,Nn=xt-vt||0,rr=ve.useMemo(function(){if(le===0||Rr===0)return 0;var yr=le/Rr;return yr*Nn},[le,Rr,Nn]),Vn=function(Zn){Zn.stopPropagation(),Zn.preventDefault()},kr=ve.useRef({top:rr,dragging:Ft,pageY:rn,startTop:Mn});kr.current={top:rr,dragging:Ft,pageY:rn,startTop:Mn};var an=function(Zn){kt(!0),Ot(dt(Zn,Ct)),un(kr.current.top),me(),Zn.stopPropagation(),Zn.preventDefault()};ve.useEffect(function(){var yr=function(Wt){Wt.preventDefault()},Zn=nr.current,On=Un.current;return Zn.addEventListener("touchstart",yr,{passive:!1}),On.addEventListener("touchstart",an,{passive:!1}),function(){Zn.removeEventListener("touchstart",yr),On.removeEventListener("touchstart",an)}},[]);var fn=ve.useRef();fn.current=Rr;var gn=ve.useRef();gn.current=Nn,ve.useEffect(function(){if(Ft){var yr,Zn=function(Wt){var ot=kr.current,qt=ot.dragging,Sn=ot.pageY,jn=ot.startTop;st.Z.cancel(yr);var Ee=nr.current.getBoundingClientRect(),Me=xt/(Ct?Ee.width:Ee.height);if(qt){var Mt=(dt(Wt,Ct)-Sn)*Me,mt=jn;!mn&&Ct?mt-=Mt:mt+=Mt;var _e=fn.current,gt=gn.current,Ut=gt?mt/gt:0,nn=Math.ceil(Ut*_e);nn=Math.max(nn,0),nn=Math.min(nn,_e),yr=(0,st.Z)(function(){wt(nn,Ct)})}},On=function(){kt(!1),Oe()};return window.addEventListener("mousemove",Zn,{passive:!0}),window.addEventListener("touchmove",Zn,{passive:!0}),window.addEventListener("mouseup",On,{passive:!0}),window.addEventListener("touchend",On,{passive:!0}),function(){window.removeEventListener("mousemove",Zn),window.removeEventListener("touchmove",Zn),window.removeEventListener("mouseup",On),window.removeEventListener("touchend",On),st.Z.cancel(yr)}}},[Ft]),ve.useEffect(function(){return ir(),function(){clearTimeout(Hn.current)}},[le]),ve.useImperativeHandle(ee,function(){return{delayHidden:ir}});var En="".concat(z,"-scrollbar"),$n={position:"absolute",visibility:xr?null:"hidden"},or={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ct?(Object.assign($n,{height:8,left:0,right:0,bottom:0}),Object.assign(or,(0,Ne.Z)({height:"100%",width:vt},mn?"left":"right",rr))):(Object.assign($n,(0,Ne.Z)({width:8,top:0,bottom:0},mn?"right":"left",0)),Object.assign(or,{width:"100%",height:vt,top:rr})),ve.createElement("div",{ref:nr,className:Ge()(En,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(En,"-horizontal"),Ct),"".concat(En,"-vertical"),!Ct),"".concat(En,"-visible"),xr)),style:(0,Fe.Z)((0,Fe.Z)({},$n),It),onMouseDown:Vn,onMouseMove:ir},ve.createElement("div",{ref:Un,className:Ge()("".concat(En,"-thumb"),(0,Ne.Z)({},"".concat(En,"-thumb-moving"),Ft)),style:(0,Fe.Z)((0,Fe.Z)({},or),Rt),onMouseDown:an}))}),ut=ft,xe=20;function Be(){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,xe),Math.floor(z)}var Se=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Qe=[],Ve={overflowY:"auto",overflowAnchor:"none"};function ct(ie,ee){var z=ie.prefixCls,re=z===void 0?"rc-virtual-list":z,le=ie.className,ne=ie.height,me=ie.itemHeight,Oe=ie.fullHeight,wt=Oe===void 0?!0:Oe,Ct=ie.style,vt=ie.data,xt=ie.children,It=ie.itemKey,Rt=ie.virtual,Xt=ie.direction,Jt=ie.scrollWidth,Et=ie.component,Ft=Et===void 0?"div":Et,kt=ie.onScroll,Qt=ie.onVirtualScroll,nt=ie.onVisibleChange,rn=ie.innerProps,Ot=ie.extraRender,Gt=ie.styles,sn=ie.showScrollBar,Mn=sn===void 0?"optional":sn,un=(0,ye.Z)(ie,Se),mn=ve.useCallback(function(Tt){return typeof It=="function"?It(Tt):Tt==null?void 0:Tt[It]},[It]),nr=ze(mn,null,null),Un=(0,ge.Z)(nr,4),zr=Un[0],Wr=Un[1],xr=Un[2],gr=Un[3],Hn=!!(Rt!==!1&&ne&&me),ir=ve.useMemo(function(){return Object.values(xr.maps).reduce(function(Tt,Ht){return Tt+Ht},0)},[xr.id,xr.maps]),Rr=Hn&&vt&&(Math.max(me*vt.length,ir)>ne||!!Jt),Nn=Xt==="rtl",rr=Ge()(re,(0,Ne.Z)({},"".concat(re,"-rtl"),Nn),le),Vn=vt||Qe,kr=(0,ve.useRef)(),an=(0,ve.useRef)(),fn=(0,ve.useRef)(),gn=(0,ve.useState)(0),En=(0,ge.Z)(gn,2),$n=En[0],or=En[1],yr=(0,ve.useState)(0),Zn=(0,ge.Z)(yr,2),On=Zn[0],Er=Zn[1],Wt=(0,ve.useState)(!1),ot=(0,ge.Z)(Wt,2),qt=ot[0],Sn=ot[1],jn=function(){Sn(!0)},Ee=function(){Sn(!1)},Me={getKey:mn};function Mt(Tt){or(function(Ht){var hn;typeof Tt=="function"?hn=Tt(Ht):hn=Tt;var $t=Ir(hn);return kr.current.scrollTop=$t,$t})}var mt=(0,ve.useRef)({start:0,end:Vn.length}),_e=(0,ve.useRef)(),gt=ht(Vn,mn),Ut=(0,ge.Z)(gt,1),nn=Ut[0];_e.current=nn;var on=ve.useMemo(function(){if(!Hn)return{scrollHeight:void 0,start:0,end:Vn.length-1,offset:void 0};if(!Rr){var Tt;return{scrollHeight:((Tt=an.current)===null||Tt===void 0?void 0:Tt.offsetHeight)||0,start:0,end:Vn.length-1,offset:void 0}}for(var Ht=0,hn,$t,xn,_t=Vn.length,Dt=0;Dt<_t;Dt+=1){var jt=Vn[Dt],Kt=mn(jt),Dn=xr.get(Kt),Fn=Ht+(Dn===void 0?me:Dn);Fn>=$n&&hn===void 0&&(hn=Dt,$t=Ht),Fn>$n+ne&&xn===void 0&&(xn=Dt),Ht=Fn}return hn===void 0&&(hn=0,$t=0,xn=Math.ceil(ne/me)),xn===void 0&&(xn=Vn.length-1),xn=Math.min(xn+1,Vn.length-1),{scrollHeight:Ht,start:hn,end:xn,offset:$t}},[Rr,Hn,$n,Vn,gr,ne]),Nt=on.scrollHeight,Vt=on.start,Ie=on.end,yn=on.offset;mt.current.start=Vt,mt.current.end=Ie,ve.useLayoutEffect(function(){var Tt=xr.getRecord();if(Tt.size===1){var Ht=Array.from(Tt.keys())[0],hn=Tt.get(Ht),$t=Vn[Vt];if($t&&hn===void 0){var xn=mn($t);if(xn===Ht){var _t=xr.get(Ht),Dt=_t-me;Mt(function(jt){return jt+Dt})}}}xr.resetRecord()},[Nt]);var Yt=ve.useState({width:0,height:ne}),pn=(0,ge.Z)(Yt,2),cn=pn[0],bn=pn[1],Tn=function(Ht){bn({width:Ht.offsetWidth,height:Ht.offsetHeight})},cr=(0,ve.useRef)(),Bn=(0,ve.useRef)(),Ln=ve.useMemo(function(){return Be(cn.width,Jt)},[cn.width,Jt]),er=ve.useMemo(function(){return Be(cn.height,Nt)},[cn.height,Nt]),An=Nt-ne,hr=(0,ve.useRef)(An);hr.current=An;function Ir(Tt){var Ht=Tt;return Number.isNaN(hr.current)||(Ht=Math.min(Ht,hr.current)),Ht=Math.max(Ht,0),Ht}var ar=$n<=0,dr=$n>=An,Lr=On<=0,fr=On>=Jt,Xn=it(ar,dr,Lr,fr),Mr=function(){return{x:Nn?-On:On,y:$n}},Jn=(0,ve.useRef)(Mr()),sr=(0,fe.zX)(function(Tt){if(Qt){var Ht=(0,Fe.Z)((0,Fe.Z)({},Mr()),Tt);(Jn.current.x!==Ht.x||Jn.current.y!==Ht.y)&&(Qt(Ht),Jn.current=Ht)}});function pr(Tt,Ht){var hn=Tt;Ht?((0,rt.flushSync)(function(){Er(hn)}),sr()):Mt(hn)}function wr(Tt){var Ht=Tt.currentTarget.scrollTop;Ht!==$n&&Mt(Ht),kt==null||kt(Tt),sr()}var lr=function(Ht){var hn=Ht,$t=Jt?Jt-cn.width:0;return hn=Math.max(hn,0),hn=Math.min(hn,$t),hn},Kn=(0,fe.zX)(function(Tt,Ht){Ht?((0,rt.flushSync)(function(){Er(function(hn){var $t=hn+(Nn?-Tt:Tt);return lr($t)})}),sr()):Mt(function(hn){var $t=hn+Tt;return $t})}),zn=Zt(Hn,ar,dr,Lr,fr,!!Jt,Kn),Tr=(0,ge.Z)(zn,2),Zr=Tr[0],Gr=Tr[1];pt(Hn,kr,function(Tt,Ht,hn,$t){var xn=$t;return Xn(Tt,Ht,hn)?!1:!xn||!xn._virtualHandled?(xn&&(xn._virtualHandled=!0),Zr({preventDefault:function(){},deltaX:Tt?Ht:0,deltaY:Tt?0:Ht}),!0):!1}),pe(Rr,kr,function(Tt){Mt(function(Ht){return Ht+Tt})}),(0,$e.Z)(function(){function Tt(hn){var $t=ar&&hn.detail<0,xn=dr&&hn.detail>0;Hn&&!$t&&!xn&&hn.preventDefault()}var Ht=kr.current;return Ht.addEventListener("wheel",Zr,{passive:!1}),Ht.addEventListener("DOMMouseScroll",Gr,{passive:!0}),Ht.addEventListener("MozMousePixelScroll",Tt,{passive:!1}),function(){Ht.removeEventListener("wheel",Zr),Ht.removeEventListener("DOMMouseScroll",Gr),Ht.removeEventListener("MozMousePixelScroll",Tt)}},[Hn,ar,dr]),(0,$e.Z)(function(){if(Jt){var Tt=lr(On);Er(Tt),sr({x:Tt})}},[cn.width,Jt]);var Yn=function(){var Ht,hn;(Ht=cr.current)===null||Ht===void 0||Ht.delayHidden(),(hn=Bn.current)===null||hn===void 0||hn.delayHidden()},ai=He(kr,Vn,xr,me,mn,function(){return Wr(!0)},Mt,Yn);ve.useImperativeHandle(ee,function(){return{nativeElement:fn.current,getScrollInfo:Mr,scrollTo:function(Ht){function hn($t){return $t&&(0,et.Z)($t)==="object"&&("left"in $t||"top"in $t)}hn(Ht)?(Ht.left!==void 0&&Er(lr(Ht.left)),ai(Ht.top)):ai(Ht)}}}),(0,$e.Z)(function(){if(nt){var Tt=Vn.slice(Vt,Ie+1);nt(Tt,Vn)}},[Vt,Ie,Vn]);var tr=Je(Vn,mn,xr,me),si=Ot==null?void 0:Ot({start:Vt,end:Ie,virtual:Rr,offsetX:On,offsetY:yn,rtl:Nn,getSize:tr}),ti=De(Vn,Vt,Ie,Jt,On,zr,xt,Me),Fr=null;ne&&(Fr=(0,Fe.Z)((0,Ne.Z)({},wt?"height":"maxHeight",ne),Ve),Hn&&(Fr.overflowY="hidden",Jt&&(Fr.overflowX="hidden"),qt&&(Fr.pointerEvents="none")));var Rn={};return Nn&&(Rn.dir="rtl"),ve.createElement("div",(0,se.Z)({ref:fn,style:(0,Fe.Z)((0,Fe.Z)({},Ct),{},{position:"relative"}),className:rr},Rn,un),ve.createElement(we.Z,{onResize:Tn},ve.createElement(Ft,{className:"".concat(re,"-holder"),style:Fr,ref:kr,onScroll:wr,onMouseEnter:Yn},ve.createElement(Te,{prefixCls:re,height:Nt,offsetX:On,offsetY:yn,scrollWidth:Jt,onInnerResize:Wr,ref:an,innerProps:rn,rtl:Nn,extra:si},ti))),Rr&&Nt>ne&&ve.createElement(ut,{ref:cr,prefixCls:re,scrollOffset:$n,scrollRange:Nt,rtl:Nn,onScroll:pr,onStartMove:jn,onStopMove:Ee,spinSize:er,containerSize:cn.height,style:Gt==null?void 0:Gt.verticalScrollBar,thumbStyle:Gt==null?void 0:Gt.verticalScrollBarThumb,showScrollBar:Mn}),Rr&&Jt>cn.width&&ve.createElement(ut,{ref:Bn,prefixCls:re,scrollOffset:On,scrollRange:Jt,rtl:Nn,onScroll:pr,onStartMove:jn,onStopMove:Ee,spinSize:Ln,containerSize:cn.width,horizontal:!0,style:Gt==null?void 0:Gt.horizontalScrollBar,thumbStyle:Gt==null?void 0:Gt.horizontalScrollBarThumb,showScrollBar:Mn}))}var ke=ve.forwardRef(ct);ke.displayName="List";var Ye=ke,Xe=Ye},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,Bt,de){"use strict";de.d(Bt,{Z:function(){return Ge}});const se=we=>typeof we=="object"&&we!=null&&we.nodeType===1,et=(we,fe)=>(!fe||we!=="hidden")&&we!=="visible"&&we!=="clip",Fe=(we,fe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const $e=getComputedStyle(we,null);return et($e.overflowY,fe)||et($e.overflowX,fe)||(ve=>{const rt=(We=>{if(!We.ownerDocument||!We.ownerDocument.defaultView)return null;try{return We.ownerDocument.defaultView.frameElement}catch(Te){return null}})(ve);return!!rt&&(rt.clientHeight<ve.scrollHeight||rt.clientWidth<ve.scrollWidth)})(we)}return!1},Ne=(we,fe,$e,ve,rt,We,Te,Pe)=>We<we&&Te>fe||We>we&&Te<fe?0:We<=we&&Pe<=$e||Te>=fe&&Pe>=$e?We-we-ve:Te>fe&&Pe<$e||We<we&&Pe>$e?Te-fe+rt:0,ge=we=>{const fe=we.parentElement;return fe==null?we.getRootNode().host||null:fe},ye=(we,fe)=>{var $e,ve,rt,We;if(typeof document=="undefined")return[];const{scrollMode:Te,block:Pe,inline:De,boundary:tt,skipOverflowHiddenElements:at}=fe,ht=typeof tt=="function"?tt:ut=>ut!==tt;if(!se(we))throw new TypeError("Invalid target");const st=document.scrollingElement||document.documentElement,qe=[];let lt=we;for(;se(lt)&&ht(lt);){if(lt=ge(lt),lt===st){qe.push(lt);break}lt!=null&&lt===document.body&&Fe(lt)&&!Fe(document.documentElement)||lt!=null&&Fe(lt,at)&&qe.push(lt)}const it=(ve=($e=window.visualViewport)==null?void 0:$e.width)!=null?ve:innerWidth,Zt=(We=(rt=window.visualViewport)==null?void 0:rt.height)!=null?We:innerHeight,{scrollX:Je,scrollY:Ue}=window,{height:bt,width:Ae,top:Ze,right:Le,bottom:ze,left:Pt}=we.getBoundingClientRect(),{top:pt,right:St,bottom:dt,left:pe}=(ut=>{const xe=window.getComputedStyle(ut);return{top:parseFloat(xe.scrollMarginTop)||0,right:parseFloat(xe.scrollMarginRight)||0,bottom:parseFloat(xe.scrollMarginBottom)||0,left:parseFloat(xe.scrollMarginLeft)||0}})(we);let ce=Pe==="start"||Pe==="nearest"?Ze-pt:Pe==="end"?ze+dt:Ze+bt/2-pt+dt,He=De==="center"?Pt+Ae/2-pe+St:De==="end"?Le+St:Pt-pe;const ft=[];for(let ut=0;ut<qe.length;ut++){const xe=qe[ut],{height:Be,width:Se,top:Qe,right:Ve,bottom:ct,left:ke}=xe.getBoundingClientRect();if(Te==="if-needed"&&Ze>=0&&Pt>=0&&ze<=Zt&&Le<=it&&(xe===st&&!Fe(xe)||Ze>=Qe&&ze<=ct&&Pt>=ke&&Le<=Ve))return ft;const Ye=getComputedStyle(xe),Xe=parseInt(Ye.borderLeftWidth,10),ie=parseInt(Ye.borderTopWidth,10),ee=parseInt(Ye.borderRightWidth,10),z=parseInt(Ye.borderBottomWidth,10);let re=0,le=0;const ne="offsetWidth"in xe?xe.offsetWidth-xe.clientWidth-Xe-ee:0,me="offsetHeight"in xe?xe.offsetHeight-xe.clientHeight-ie-z:0,Oe="offsetWidth"in xe?xe.offsetWidth===0?0:Se/xe.offsetWidth:0,wt="offsetHeight"in xe?xe.offsetHeight===0?0:Be/xe.offsetHeight:0;if(st===xe)re=Pe==="start"?ce:Pe==="end"?ce-Zt:Pe==="nearest"?Ne(Ue,Ue+Zt,Zt,ie,z,Ue+ce,Ue+ce+bt,bt):ce-Zt/2,le=De==="start"?He:De==="center"?He-it/2:De==="end"?He-it:Ne(Je,Je+it,it,Xe,ee,Je+He,Je+He+Ae,Ae),re=Math.max(0,re+Ue),le=Math.max(0,le+Je);else{re=Pe==="start"?ce-Qe-ie:Pe==="end"?ce-ct+z+me:Pe==="nearest"?Ne(Qe,ct,Be,ie,z+me,ce,ce+bt,bt):ce-(Qe+Be/2)+me/2,le=De==="start"?He-ke-Xe:De==="center"?He-(ke+Se/2)+ne/2:De==="end"?He-Ve+ee+ne:Ne(ke,Ve,Se,Xe,ee+ne,He,He+Ae,Ae);const{scrollLeft:Ct,scrollTop:vt}=xe;re=wt===0?0:Math.max(0,Math.min(vt+re/wt,xe.scrollHeight-Be/wt+me)),le=Oe===0?0:Math.max(0,Math.min(Ct+le/Oe,xe.scrollWidth-Se/Oe+ne)),ce+=vt-re,He+=Ct-le}ft.push({el:xe,top:re,left:le})}return ft},Re=we=>we===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(we)?we:{block:"start",inline:"nearest"};function Ge(we,fe){if(!we.isConnected||!(rt=>{let We=rt;for(;We&&We.parentNode;){if(We.parentNode===document)return!0;We=We.parentNode instanceof ShadowRoot?We.parentNode.host:We.parentNode}return!1})(we))return;const $e=(rt=>{const We=window.getComputedStyle(rt);return{top:parseFloat(We.scrollMarginTop)||0,right:parseFloat(We.scrollMarginRight)||0,bottom:parseFloat(We.scrollMarginBottom)||0,left:parseFloat(We.scrollMarginLeft)||0}})(we);if((rt=>typeof rt=="object"&&typeof rt.behavior=="function")(fe))return fe.behavior(ye(we,fe));const ve=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:rt,top:We,left:Te}of ye(we,Re(fe))){const Pe=We-$e.top+$e.bottom,De=Te-$e.left+$e.right;rt.scroll({top:Pe,left:De,behavior:ve})}}}}]);