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__User__Detail__Topics__Ex...

1105 lines
691 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[7043],{45559:function(){"use strict"},96408:function(Ut,Qt){"use strict";Qt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},93510:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Ut={},Qt="5.0",fe={},te=null,tt=!1,We=!1,Je=null,pe=!1,je=null,Fe=null,Ye=0;Ye<arguments.length;Ye++){var Se=arguments[Ye];if(Se!==null)switch(typeof Se){case"number":Qt=Se.toFixed(1);break;case"string":Se.match(new RegExp("^[0-9]\\.[0-9]+$"))?Qt=Se:Je=Se;break;case"object":typeof Se.is3D!="undefined"?te=Se:fe=Se;break;case"boolean":tt=Se,We=!0;break}}te===null&&(te={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},fe.material_id!==void 0&&!We&&(tt=!0)),Je!==null&&fe.id===void 0&&(fe.id=Je);var he="",Ee="",ve=!1,rt=null,Ve=null,Ae=null,Pe=!1,we=null,$e=null,at=null,ct=null,ut=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var ze=function(He){return parseFloat(He)>4?parseFloat(He):5};Ut.setHTML5Codebase=function(He,it){Fe=He,Ct(He,it)},Ut.setJavaCodebase=Ut.setJavaCodebaseVersion=Ut.isCompiledInstalled=Ut.setPreCompiledScriptPath=Ut.setPreCompiledResourcePath=function(){},Ut.setHTML5CodebaseVersion=function(He,it){var ft=parseFloat(He);if(ft!==NaN&&ft<5){console.log("The GeoGebra HTML5 codebase version "+ft+" is deprecated. Using version latest instead.");return}je=He,de(He,it)},Ut.getHTML5CodebaseVersion=function(){return Ve},Ut.getParameters=function(){return fe},Ut.setFontsCSSURL=function(He){ct=He},Ut.setGiacJSURL=function(He){},Ut.setJNLPFile=function(He){he=He},Ut.setJNLPBaseDir=function(He){},Ut.inject=function(){function He(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var it="auto",ft=fe.id,vn,Pt=!1,Me=0;Me<arguments.length;Me++){var be=arguments[Me];typeof be=="string"?(be=be.toLowerCase(),be.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?it=be:ft=arguments[Me]):typeof be=="boolean"?Pt=be:be instanceof HTMLElement&&(vn=be)}Re();function Re(){if(!pe){setTimeout(Re,200);return}it=Rt(it);var lt=vn||document.getElementById(ft);if(!lt){console.log("possibly bug on ajax loading? ");return}if(Ut.removeExistingApplet(lt,!1),fe.width===void 0&&lt.clientWidth&&(fe.width=lt.clientWidth),fe.height===void 0&&lt.clientHeight&&(fe.height=lt.clientHeight),!(fe.width&&fe.height)&&it==="html5"&&(delete fe.width,delete fe.height),rt=it,it==="screenshot")Ze(lt,fe);else{var Le=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?Le=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(Le=(!wt()||He())&&pt()),Le?(rt="screenshot",pn(lt,fe,Pt,it)):nt(lt,fe,Pt)}}};function wt(){try{return window.self!==window.top}catch(He){return!0}}function pt(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Ut.getViews=function(){return te},Ut.isJavaInstalled=function(){return!1};var sn=function(He){var it=function(Me){var be=JSON.parse(Me),Re=function(Ue){return Ue.type=="G"||Ue.type=="E"},lt=be.elements?be.elements.filter(Re)[0]:be;if(!lt||!lt.url){ft();return}fe.fileName=lt.url,Ce(lt.settings||{}),te.is3D=!0;var Le="https://www.geogebra.org/images/";Ut.setPreviewImage(we||lt.previewUrl,Le+"GeoGebra_loading.png",Le+"applet_play.png"),He()},ft=function(){fe.onError&&fe.onError(),on("Error: Fetching material (id "+fe.material_id+") failed.",fe)},vn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Pt="/materials/"+fe.material_id+"?scope=basic";Ke("https://"+vn+"/api/proxy.php?path="+encodeURIComponent(Pt),it,ft)};function Ce(He){var it=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ft){He[ft]=!!He[ft]}),it.forEach(function(ft){fe[ft]===void 0&&He[ft]!==void 0&&(fe[ft]=He[ft])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Ke(He,it,ft){var vn=new XMLHttpRequest;vn.open("GET",He),vn.onload=function(){it(vn.responseText)},vn.onerror=ft,vn.send()}Ut.isHTML5Installed=function(){return!0},Ut.getLoadedAppletType=function(){return rt},Ut.setPreviewImage=function(He,it,ft){we=He,$e=it,at=ft},Ut.removeExistingApplet=function(He,it){var ft;typeof He=="string"&&(He=document.getElementById(He)),rt=null;var vn=null;for(ft=0;ft<He.childNodes.length;ft++){var Pt=He.childNodes[ft],Me=Pt.className;Me==="applet_screenshot"?it?(Pt.style.display="block",rt="screenshot"):Pt.style.display="none":Me!=="applet_scaler prerender"&&(He.removeChild(Pt),vn=Me&&Me.indexOf("appletParameters")!=-1?Pt.id:null,ft--)}var be=fe.id!==void 0?fe.id:vn,Re=window[be];Re&&typeof Re.getBase64=="function"&&(Re.remove(),window[be]=null)},Ut.refreshHitPoints=function(){if(ze(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var He=Ut.getAppletObject();return He&&typeof He.recalculateEnvironments=="function"?(He.recalculateEnvironments(),!0):!1},Ut.startAnimation=function(){var He=Ut.getAppletObject();return He&&typeof He.startAnimation=="function"?(He.startAnimation(),!0):!1},Ut.stopAnimation=function(){var He=Ut.getAppletObject();return He&&typeof He.stopAnimation=="function"?(He.stopAnimation(),!0):!1},Ut.getAppletObject=function(){var He=fe.id!==void 0?fe.id:"ggbApplet";return window[He]},Ut.resize=function(){};var ot=function(He,it,ft){var vn=document.createElement("param");vn.setAttribute("name",it),vn.setAttribute("value",ft),He.appendChild(vn)},_e=function(He){return He&&He!=="false"},nt=function(He,it,ft){ze(Ve)<=4.2&&(ft=!0);var vn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ve||ggbHTML5LoadedCodebaseIsWebSimple&&!Pe)&&(vn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Pt=document.createElement("div");Pt.classList.add("appletParameters","notranslate");var Me=it.width,be=it.height;if(it.disableAutoScale=it.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():it.disableAutoScale,it.width!==void 0)if(ze(Ve)<=4.4)_e(it.showToolBar)&&(it.height-=7),_e(it.showAlgebraInput)&&(it.height-=37),it.width<605&&_e(it.showToolBar)&&(it.width=605,Me=605);else{var Re=100;(_e(it.showToolBar)||_e(it.showMenuBar))&&(it.hasOwnProperty("customToolBar")&&(it.customToolbar=it.customToolBar),Re=_e(it.showMenuBar)?245:155),Me<Re&&(it.width=Re,Me=Re)}Pt.style.border="none",Pt.style.display="inline-block";for(var lt in it)it.hasOwnProperty(lt)&&lt!=="appletOnLoad"&&Pt.setAttribute("data-param-"+lt,it[lt]);ct&&Pt.setAttribute("data-param-fontscssurl",ct),Ut.resize=function(){GGBAppletUtils.responsiveResize(He,it)},window.addEventListener("resize",function(ee){Ut.resize()});var Le=typeof it.appletOnLoad=="function"?it.appletOnLoad:function(){};if(!ft&&it.width!==void 0){it.hasOwnProperty("showSplash")||Pt.setAttribute("data-param-showSplash","false");var Ue=He.querySelector(".applet_scaler.prerender"),Xe=Ue!==null;if(Xe)var et=Ue.querySelector(".ggb_preview");else{var et=bn(Me,be,it.borderColor,!1);Ue=document.createElement("div"),Ue.className="applet_scaler",Ue.style.position="relative",Ue.style.display="block",Ue.style.width=Me+"px",Ue.style.height=be+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ue,"66%"),ze(Ve)>=5?(it.appletOnLoad=function(ee){var oe=He.querySelector(".ggb_preview");oe&&oe.parentNode.removeChild(oe),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ue),window.GGBT_wsf_view&&$(window).trigger("resize"),Le(ee)},Xe||Ue.appendChild(et)):Pt.appendChild(et),Ue.appendChild(Pt),Xe||He.appendChild(Ue),setTimeout(function(){Ut.resize()},1)}else{var gt=document.createElement("div");gt.className="applet_scaler",gt.style.position="relative",gt.style.display="block",gt.appendChild(Pt),He.appendChild(gt),it.appletOnLoad=function(ee){Ut.resize(),Le(ee)}}function xt(ee,oe){oe&&typeof oe.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ee,oe.appletOnLoad):renderGGBElement(ee),on("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",oe)}function Dt(ee,oe){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ee,params:oe}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ue){xt(ue.article,ue.params)}),html5AppletsToProcess=null)},ze(Ve)<5&&(ee.className+=" geogebraweb")):xt(ee,oe)}if(vn){scriptLoadStarted=!0;for(var Nt=0;Nt<Pt.childNodes.length;Nt++){var gn=Pt.childNodes[Nt].tagName;gn==="TABLE"&&(Pt.removeChild(Pt.childNodes[Nt]),Nt--)}if(ggbHTML5LoadedScript!==null){var Jt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Jt!=null&&Jt.parentNode.removeChild(Jt)}var le=document.createElement("script"),ne=function(){Dt(Pt,it)};le.src=Ee+Ae,ggbHTML5LoadedCodebaseIsWebSimple=Pe,ggbHTML5LoadedCodebaseVersion=Ve,ggbHTML5LoadedScript=le.src,on("GeoGebra HTML5 codebase loaded: '"+Ee+"'.",it),!Fe&&(!je||je=="5.0")?(Pe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ne()):Ee.requirejs?__webpack_require__.e(3861).then(function(){var ee=[__webpack_require__(40341)];ne.apply(null,ee)}.bind(this)).catch(__webpack_require__.oe):(le.onload=ne,He.appendChild(le))}else Dt(Pt,it);it.height=be,it.width=Me},Ze=function(He,it,ft){var vn=bn(it.width,it.height,it.borderColor,ft),Pt=document.createElement("div");Pt.style.position="relative",Pt.style.display="block",Pt.style.width=it.width+"px",Pt.style.height=it.height+"px",Pt.className="applet_screenshot applet_scaler"+(ft?" applet_screenshot_play":""),Pt.appendChild(vn);var Me=GGBAppletUtils.getScale(it,He,ft);ft?(He.appendChild(Ft()),window.GGBT_wsf_view||(He.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Pt,"66%"),He.appendChild(Pt),Me!==1&&!isNaN(Me)&&(GGBAppletUtils.scaleElement(Pt,Me),Pt.style.width=it.width+"px",Pt.style.height=it.height+"px",Pt.parentNode.style.width=it.width*Me+"px",Pt.parentNode.style.height=it.height*Me+"px"),Ut.resize=function(){dt(He,vn,Pt,ft)},window.addEventListener("resize",function(be){Ut.resize()}),Ut.resize()};function dt(He,it,ft,vn){if(He.contains(it)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(He.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(He)}var Pt=GGBAppletUtils.getScale(fe,He,vn);ft.parentNode!==null&&(!isNaN(Pt)&&Pt!==1?(GGBAppletUtils.scaleElement(ft,Pt),ft.parentNode.style.width=fe.width*Pt+"px",ft.parentNode.style.height=fe.height*Pt+"px"):(GGBAppletUtils.scaleElement(ft,1),ft.parentNode.style.width=fe.width+"px",ft.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(He),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Ut.onExitFullscreen=function(He,it){it.appendChild(He)};var pn=function(He,it,ft,vn){Ze(He,it,!0);for(var Pt=function(){var Re=[];for(be=0;be<He.childNodes.length;be++)Re.push(He.childNodes[be]);if(window.GGBT_wsf_view){var lt=window.GGBT_wsf_view.renderFullScreen(He,it.id),Le=document.getElementById("fullscreencontainer"),Ue=jQuery(He).find(".fullscreencontent");Ue.length>0?(lt.remove(),Ue.attr("id","fullscreencontent").show(),jQuery(Le).append(Ue),window.dispatchEvent(new Event("resize"))):nt(lt,it,!1),window.GGBT_wsf_view.launchFullScreen(Le)}else rt=vn,nt(He,it,!1);if(!window.GGBT_wsf_view)for(be=0;be<Re.length;be++)He.removeChild(Re[be])},Me=He.getElementsByClassName("ggb_preview_play"),be=0;be<Me.length;be++)Me[be].addEventListener("click",Pt,!1),Me[be].addEventListener("ontouchstart",Pt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(He),pt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ft=function(){var He=document.createElement("div");if(He.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var it='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',ft=document.createElement("style");ft.styleSheet?ft.styleSheet.cssText=it:ft.appendChild(document.createTextNode(it)),document.getElementsByTagName("head")[0].appendChild(ft)}return He},bn=function(He,it,ft,vn){var Pt=document.createElement("div");Pt.className="ggb_preview",Pt.style.position="absolute",Pt.style.zIndex="90",Pt.style.width=He-2+"px",Pt.style.height=it-2+"px",Pt.style.top="0px",Pt.style.left="0px",Pt.style.overflow="hidden",Pt.style.backgroundColor="white";var Me="lightgrey";ft!==void 0&&(ft==="none"?Me="transparent":Me=ft),Pt.style.border="1px solid "+Me;var be=document.createElement("img");if(be.style.position="relative",be.style.zIndex="1000",be.style.top="-1px",be.style.left="-1px",we!==null&&be.setAttribute("src",we),be.style.opacity=.7,$e!==null){var Re,lt,Le;if(!vn){Re=document.createElement("img"),Re.style.position="absolute",Re.style.zIndex="1001",Re.style.opacity=1,be.style.opacity=.3,lt=360,lt>He/4*3&&(lt=He/4*3),Le=lt/5.8,Re.setAttribute("src",$e),Re.setAttribute("width",lt),Re.setAttribute("height",Le);var Ue=(He-lt)/2,Xe=(it-Le)/2;Re.style.left=Ue+"px",Re.style.top=Xe+"px",Pt.appendChild(Re)}}return Pt.appendChild(be),Pt},Rt=function(He){return He=He.toLowerCase(),He==="html5"||He==="screenshot"?He:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(He,it){if(Ve=He,it){Ct(Ve,!0);return}var ft=!tt;if(ft){var vn=ze(Ve);!isNaN(vn)&&vn<4.4&&(ft=!1)}var Pt,Me;window.location.protocol.substr(0,4)==="http"?Pt=window.location.protocol:Pt="http:";var be=Ve.indexOf("//");be>0?Me=Ve:be===0?Me=Pt+Ve:Me="https://www.geogebra.org/apps/5.2.814.0/";for(var Re in me)if(Ve.slice(me[Re].length*-1)===me[Re]||Ve.slice((me[Re].length+1)*-1)===me[Re]+"/"){Ct(Me,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ft&&!te.is3D&&!te.AV&&!te.SV&&!te.CV&&!te.EV2&&!te.CP&&!te.PC&&!te.DA&&!te.FI&&!te.PV&&!_e(fe.showToolBar)&&!_e(fe.showMenuBar)&&!_e(fe.showAlgebraInput)&&!_e(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?Me+="webSimple/":Me+="web3d/",Ct(Me,!1)},Ct=function(He,it){if(He.requirejs){Ee=He;return}He.slice(-1)!=="/"&&(He+="/"),Ee=He,it===null&&(it=He.indexOf("http")===-1),ve=it,Ae="web.nocache.js",Pe=!1;var ft=Ee.split("/");ft.length>1&&(!it&&ft[ft.length-2]==="webSimple"?(Ae="webSimple.nocache.js",Pe=!0):me.indexOf(ft[ft.length-2])>=0&&(Ae=ft[ft.length-2]+".nocache.js")),ft=He.split("/"),Ve=ft[ft.length-3],Ve.substr(0,4)==="test"?Ve=Ve.substr(4,1)+"."+Ve.substr(5,1):(Ve.substr(0,3)==="war"||Ve.substr(0,4)==="beta")&&(Ve="5.0");var vn=parseFloat(Ve);vn!==NaN&&vn<5&&He.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+vn+" is deprecated. Using version latest instead."),de("5.0",it))},on=function(He,it){window.console&&window.console.log&&(!it||typeof it.showLogging=="undefined"||it.showLogging&&it.showLogging!=="false")&&console.log(He)};fe.material_id!==void 0?sn(Bt):Bt();function Bt(){var He=Qt;je!==null?He=je:parseFloat(He)<5&&(He="5.0"),de(He,!1),Fe!==null&&Ct(Fe,ve),pe=!0}return Ut},GGBAppletUtils=function(){"use strict";function Ut(){return window.GGBT_wsf_edit!==void 0}function Qt(pe,je){je!=1?(pe.style.transformOrigin="0% 0% 0px",pe.style.webkitTransformOrigin="0% 0% 0px",pe.style.transform="scale("+je+","+je+")",pe.style.webkitTransform="scale("+je+","+je+")",pe.style.maxWidth="initial",pe.querySelector(".ggb_preview")!==null&&(pe.querySelector(".ggb_preview").style.maxWidth="initial"),pe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(pe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),pe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(pe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(pe.style.transform="none",pe.style.webkitTransform="none")}function fe(pe,je,Fe,Ye,Se,he){var Ee=null;if(he!=null&&he!="")for(var ve=pe.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+he+" ")>-1){Ee=ve;break}else ve=ve.parentNode;var rt=0,Ve=0,Ae=0,Pe=0,we=0,$e=0,at=0;if(Ee)rt=Ee.offsetWidth,Ve=Math.max(Ye?Ee.offsetWidth:0,Ee.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(rt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ve=Math.min(window.innerHeight,document.documentElement.clientHeight),Ae=rt):(rt=window.innerWidth,Ve=window.innerHeight,Ae=window.innerWidth),pe){var ct=pe.getBoundingClientRect();ct.left>0&&ct.left<=rt&&(Se===void 0||!Se)&&(document.dir==="rtl"?(we=rt-ct.width-ct.left,$e=Ae<=480?10:30):($e=ct.left,we=Ae<=480?10:30),Pe=$e+we)}if(pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ut=pe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pe=40,at=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Pe=0,at=40)}}return pe&&((Fe===void 0||!Fe)&&je>0&&je+Pe<rt?rt=je:rt-=Pe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Fe===void 0||!Fe)&&(Ve-=at)),{width:rt,height:Ve}}function te(pe,je,Fe,Ye,Se){if(pe.isScreenshoGenerator)return 1;var he=Ye!==void 0&&Ye,Ee=pe.noScaleMargin!=null&&pe.noScaleMargin,ve=function(ut){return ut&&ut!=="false"},rt=ve(pe.autoHeight),Ve=fe(je,pe.width,Fe,rt,he&&window.GGBT_wsf_view||Ee,Se),Ae=parseInt(Ve.width),Pe=pe.width,we=pe.height;if(Pe===void 0){var $e=je.querySelector(".appletParameters");$e&&(Pe=$e.offsetWidth,we=$e.offsetHeight)}var at=Ae/Pe,ct=he?1:Ve.height/we;return Fe!==void 0&&!Fe&&(at=Math.min(1,at),ct=Math.min(1,ct)),Math.min(at,ct)}function tt(pe,je,Fe){var Ye=1,Se,he=!1;if(pe.hasOwnProperty("allowUpscale")&&(he=pe.allowUpscale),pe.hasOwnProperty("scale")&&(Ye=parseFloat(pe.scale),(isNaN(Ye)||Ye===null||Ye===0)&&(Ye=1),Ye>1&&(he=!0)),je&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(he=!0),!(pe.hasOwnProperty("disableAutoScale")&&pe.disableAutoScale))Se=te(pe,je,he,Fe,pe.scaleContainerClass);else return Ye;return he&&(!pe.hasOwnProperty("scale")||Ye===1)?Se:Math.min(Ye,Se)}function We(pe){var je=Math.min(window.innerWidth,document.documentElement.clientWidth),Fe=Math.min(window.innerHeight,document.documentElement.clientHeight),Ye=pe.getBoundingClientRect(),Se=(je-Ye.width)/2,he=(Fe-Ye.height)/2;he<0&&(he=0),pe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Se<40?pe.style.left="40px":pe.style.left=Se+"px",pe.style.top=he+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(he<40?pe.style.top="40px":pe.style.top=he+"px",pe.style.left=Se+"px")}function Je(pe,je){var Fe=pe.querySelector(".appletParameters");if(Fe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(je.id!==Fe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(pe)}if(Fe.parentElement&&/fullscreen/.test(Fe.parentElement.className))return;var Ye=tt(je,pe);Ut()&&Fe.setAttribute("data-param-scale",Ye);for(var Se=null,he=0;he<pe.childNodes.length;he++)if(pe.childNodes[he].className!==void 0&&pe.childNodes[he].className.match(/^applet_scaler/)){Se=pe.childNodes[he];break}if(Se!==null&&Se.querySelector(".noscale")!==null)return;var Ee=je.id!==void 0?je.id:"ggbApplet",ve=window[Ee];(ve==null||!ve.recalculateEnvironments)&&Se!==null&&!Se.className.match(/fullscreen/)&&(Se.parentNode.style.transform="",!isNaN(Ye)&&Ye!==1?(Se.parentNode.style.width=je.width*Ye+"px",Se.parentNode.style.height=je.height*Ye+"px",Qt(Se,Ye)):(Qt(Se,1),Se.parentNode.style.width=je.width+"px",Se.parentNode.style.height=je.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&We(pe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Fe).parents(".content-added-content"))}}return{responsiveResize:Je,isFlexibleWorksheetEditor:Ut,positionCenter:We,getScale:tt,scaleElement:Qt}}();__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 Ut=n.location.search;return Ut.indexOf(J)!=-1||Ut.indexOf(K)!=-1}function q(Ut,Qt){}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(Ut){var Qt=s[L].bindings;s[L].bindings=function(){for(var fe=Qt?Qt():{},te=Ut[webModule.__softPermutationId],tt=O;tt<te.length;tt++){var We=te[tt];fe[We[O]]=We[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Ut=o.createElement(Q);if(Ut.id=L,Ut.style.cssText=R+S,Ut.tabIndex=-1,o.body.appendChild(Ut),t=Ut.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Qt=document.compatMode==U?V:W;t.write(Qt+X),t.close()}}}function w(Ut){function Qt(te){function tt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var We=tt();if(We){te();return}function Je(){if(!We){if(!tt())return;We=!0,te(),o.removeEventListener&&o.removeEventListener(Z,Je,!1),pe&&clearInterval(pe)}}o.addEventListener&&o.addEventListener(Z,Je,!1);var pe=setInterval(function(){Je()},$)}function fe(te){var tt=u(),We=tt.body,Je=tt.createElement(_);Je.language=ab,Je.crossOrigin=W,Je.src=te,webModule.__errFn&&(Je.onerror=function(){webModule.__errFn(L,new Error(bb+te))}),We.appendChild(Je)}Qt(function(){fe(Ut)})}webModule.__startLoadingFragment=function(Ut){return C(Ut)},webModule.__installRunAsyncCode=function(Ut){var Qt=u(),fe=Qt.body,te=Qt.createElement(_);te.language=ab,te.text=Ut,fe.appendChild(te),fe.removeChild(te)};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(Ut){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Ut){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Ut){var Qt=c[Ut];return Qt==null?null:Qt},r=d,webModule.__errFn=e}function B(){function Ut(pe){var je=pe.lastIndexOf(rb);je==-1&&(je=pe.length);var Fe=pe.indexOf(sb);Fe==-1&&(Fe=pe.length);var Ye=pe.lastIndexOf(tb,Math.min(Fe,je));return Ye>=O?pe.substring(O,Ye+P):W}function Qt(pe){if(!pe.match(/^\w+:\/\//)){var je=o.createElement(ub);je.src=pe+vb,pe=Ut(je.src)}return pe}function fe(){var pe=__gwt_getMetaProperty(wb);return pe!=null?pe:W}function te(){for(var pe=o.getElementsByTagName(_),je=O;je<pe.length;++je)if(pe[je].src.indexOf(xb)!=-1)return Ut(pe[je].src);return W}function tt(){var pe=o.getElementsByTagName(yb);return pe.length>O?pe[pe.length-P].href:W}function We(){var pe=o.location;return pe.href==pe.protocol+zb+pe.host+pe.pathname+pe.search+pe.hash}var Je=fe();return Je==W&&(Je=te()),Je==W&&(Je=tt()),Je==W&&We()&&(Je=Ut(o.location.href)),Je=Qt(Je),Je}function C(Ut){return Ut.match(/^\//)||Ut.match(/^[a-zA-Z]+:\/\//)?Ut:webModule.__moduleBase+Ut}function D(){var Ut=[],Qt=O,fe=[],te=[];function tt(pe){var je=te[pe](),Fe=fe[pe];if(je in Fe)return je;var Ye=[];for(var Se in Fe)Ye[Fe[Se]]=Se;throw r&&r(pe,Ye,je),null}if(__gwt_isKnownPropertyValue=function(pe,je){return je in fe[pe]},webModule.__getPropMap=function(){var pe={};for(var je in fe)fe.hasOwnProperty(je)&&(pe[je]=tt(je));return pe},webModule.__computePropValue=tt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var We;try{We=Cb;var Je=We.indexOf(Db);Je!=-1&&(Qt=parseInt(We.substring(Je+P),$),We=We.substring(O,Je))}catch(pe){}return webModule.__softPermutationId=Qt,C(We+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},28735:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Ax:function(){return Je},Ds:function(){return pe},KI:function(){return Fe},SI:function(){return We},f1:function(){return tt}});var te=fe(74128);function tt(Ye){let Se=!0;if(Ye.length>0){for(let he=0;he<Ye.length;he++)if(Ye[he].compile_success==0||!Ye[he].compile_success){Se=!1;break}}else Se=!1;return Se}function We(Ye,Se=""){let he=[];for(let Ee=0;Ee<Ye.length;Ee++){let ve=Ye[Ee],rt=Se?`${Se}/${ve.name}`:`${ve.name}`;he.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:rt})}return he}function Je(Ye,Se,he){for(let Ee=0;Ee<Ye.length;Ee++){let ve=Ye[Ee];if(ve.key===Se){ve.children=he;break}ve.children&&Je(ve.children,Se,he)}return Ye}function pe(Ye,Se,he){let Ee;return function(){let ve=this,rt=arguments,Ve=function(){Ee=null,he||Ye.apply(ve,rt)},Ae=he&&!Ee;clearTimeout(Ee),Ee=setTimeout(Ve,Se),Ae&&Ye.apply(ve,rt)}}const je=!0,Fe=te.Z.API_SERVER},20633:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return Se}});var te=fe(59301),tt=fe(37568),We=fe(96599),Je=fe(6767),pe={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},je=fe(62772);const{TextArea:Fe}=tt.default;class Ye extends te.Component{constructor(Ee){super(Ee),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Ee,onAnswerChange:ve,addChildAnswer:rt,exerciseIsPublish:Ve,answers:Ae,activeOptionErrorIndex:Pe,flex:we="0 0 1000px"}=this.props;console.log("----",Ae);let{inputVisible:$e,EditInputIndex:at}=this.state;return te.createElement("div",{className:pe.flex},te.createElement("div",{className:`${pe.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Ee+1,"):"),te.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},Ae==null?void 0:Ae.map((ct,ut)=>te.createElement(te.Fragment,null,at!==ut?(ct==null?void 0:ct.length)>0?te.createElement(We.default,{className:"edit-tag",key:ct,closable:!(Ee===0&&ut===0),onClose:ze=>{ze.preventDefault(),(Ae==null?void 0:Ae.length)===1&&ut===0?this.props.deleteChildAnswermain(Ee,ut):this.props.deleteChildAnswer(Ee,ut)}},te.createElement("span",{onDoubleClick:ze=>{this.setState({EditInputIndex:ut}),ze.preventDefault()}},ct)):te.createElement(tt.default,{defaultValue:ct,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:ze=>{if(ze.target.value.replaceAll(" ","").length<=0){Je.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}ve(Ee,ut,ze.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):te.createElement(tt.default,{defaultValue:ct,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:ze=>{if(ze.target.value.replaceAll(" ","").length<=0){Je.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}ve(Ee,ut,ze.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!$e&&te.createElement(We.default,{className:"site-tag-plus",onClick:()=>{rt(Ee),this.setState({inputVisible:!0})}},te.createElement(je.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var Se=Ye},97805:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return Ve}});var te=fe(59301),tt=fe(25374),We=Object.defineProperty,Je=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Se=(Ae,Pe,we)=>Pe in Ae?We(Ae,Pe,{enumerable:!0,configurable:!0,writable:!0,value:we}):Ae[Pe]=we,he=(Ae,Pe)=>{for(var we in Pe||(Pe={}))Fe.call(Pe,we)&&Se(Ae,we,Pe[we]);if(je)for(var we of je(Pe))Ye.call(Pe,we)&&Se(Ae,we,Pe[we]);return Ae},Ee=(Ae,Pe)=>Je(Ae,pe(Pe)),ve=(Ae,Pe,we)=>Se(Ae,typeof Pe!="symbol"?Pe+"":Pe,we);const rt="\u2581";class Ve extends te.Component{constructor(){super(...arguments),ve(this,"getChCountBeforeCursor",(Pe,we)=>{const $e=we.line;let at=0;for(let ut=0;ut<$e;ut++)at+=Pe.getLine(ut).split(rt).length-1;const ct=Pe.getLine($e).substring(0,we.ch);return at+=ct.split(rt).length-1,at}),ve(this,"onCMBeforeChange",(Pe,we)=>{const $e=Pe.getRange(we.from,we.to);let at=0;if(we.text.forEach(ct=>{at+=ct.split(rt).length-1}),$e&&$e.indexOf(rt)!=-1){const ct=$e.split(rt).length-1,ut=this.getChCountBeforeCursor(Pe,we.from);console.log(`\u5220\u9664${ct}\u4E2A\uFF0C \u4E4B\u524D\u6709${ut}\u4E2A\uFF0C\u65B0\u589E${at}\u4E2A`),this.props.deleteEmptyDisabled?we.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ut,ct,at)}else if(at){const ct=this.getChCountBeforeCursor(Pe,we.from);console.log(`\u65B0\u589E${at}\u4E2A\uFF0C\u4E4B\u524D\u6709${ct}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ct,0,at)}})}render(){return te.createElement(tt.Z,Ee(he({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},53464:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return Jt}});var te=fe(59301),tt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},We=fe(92310),Je=fe.n(We),pe=fe(29787);var je=function(le,ne){return(je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var ue in oe)Object.prototype.hasOwnProperty.call(oe,ue)&&(ee[ue]=oe[ue])})(le,ne)};function Fe(le,ne){function ee(){this.constructor=le}je(le,ne),le.prototype=ne===null?Object.create(ne):(ee.prototype=ne.prototype,new ee)}function Ye(le,ne,ee,oe){return new(ee||(ee=Promise))(function(ue,ie){function ye(kt){try{yt(oe.next(kt))}catch(Oe){ie(Oe)}}function vt(kt){try{yt(oe.throw(kt))}catch(Oe){ie(Oe)}}function yt(kt){var Oe;kt.done?ue(kt.value):(Oe=kt.value,Oe instanceof ee?Oe:new ee(function($t){$t(Oe)})).then(ye,vt)}yt((oe=oe.apply(le,ne||[])).next())})}function Se(le,ne){var ee,oe,ue,ie,ye={label:0,sent:function(){if(1&ue[0])throw ue[1];return ue[1]},trys:[],ops:[]};return ie={next:vt(0),throw:vt(1),return:vt(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function vt(yt){return function(kt){return function(Oe){if(ee)throw new TypeError("Generator is already executing.");for(;ye;)try{if(ee=1,oe&&(ue=2&Oe[0]?oe.return:Oe[0]?oe.throw||((ue=oe.return)&&ue.call(oe),0):oe.next)&&!(ue=ue.call(oe,Oe[1])).done)return ue;switch(oe=0,ue&&(Oe=[2&Oe[0],ue.value]),Oe[0]){case 0:case 1:ue=Oe;break;case 4:return ye.label++,{value:Oe[1],done:!1};case 5:ye.label++,oe=Oe[1],Oe=[0];continue;case 7:Oe=ye.ops.pop(),ye.trys.pop();continue;default:if(ue=ye.trys,!((ue=ue.length>0&&ue[ue.length-1])||Oe[0]!==6&&Oe[0]!==2)){ye=0;continue}if(Oe[0]===3&&(!ue||Oe[1]>ue[0]&&Oe[1]<ue[3])){ye.label=Oe[1];break}if(Oe[0]===6&&ye.label<ue[1]){ye.label=ue[1],ue=Oe;break}if(ue&&ye.label<ue[2]){ye.label=ue[2],ye.ops.push(Oe);break}ue[2]&&ye.ops.pop(),ye.trys.pop();continue}Oe=ne.call(le,ye)}catch($t){Oe=[6,$t],oe=0}finally{ee=ue=0}if(5&Oe[0])throw Oe[1];return{value:Oe[0]?Oe[1]:void 0,done:!0}}([yt,kt])}}}function he(){for(var le=0,ne=0,ee=arguments.length;ne<ee;ne++)le+=arguments[ne].length;var oe=Array(le),ue=0;for(ne=0;ne<ee;ne++)for(var ie=arguments[ne],ye=0,vt=ie.length;ye<vt;ye++,ue++)oe[ue]=ie[ye];return oe}var Ee=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(ne,ee){for(var oe=0,ue=ee;oe<ue.length;oe++){var ie=ue[oe],ye=ie[0],vt=ie[1];ne.setAttribute(ye,vt)}},le.createRect=function(ne,ee,oe){var ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return ue.setAttribute("width",ne.toString()),ue.setAttribute("height",ee.toString()),oe&&le.setAttributes(ue,oe),ue},le.createLine=function(ne,ee,oe,ue,ie){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",ne.toString()),ye.setAttribute("y1",ee.toString()),ye.setAttribute("x2",oe.toString()),ye.setAttribute("y2",ue.toString()),ie&&le.setAttributes(ye,ie),ye},le.createPolygon=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",ne),ee&&le.setAttributes(oe,ee),oe},le.createCircle=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(ne/2).toString()),oe.setAttribute("cy",(ne/2).toString()),oe.setAttribute("r",ne.toString()),ee&&le.setAttributes(oe,ee),oe},le.createEllipse=function(ne,ee,oe){var ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ue.setAttribute("cx",(ne/2).toString()),ue.setAttribute("cy",(ee/2).toString()),ue.setAttribute("rx",(ne/2).toString()),ue.setAttribute("ry",(ee/2).toString()),oe&&le.setAttributes(ue,oe),ue},le.createGroup=function(ne){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return ne&&le.setAttributes(ee,ne),ee},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(ne,ee,oe,ue,ie,ye,vt){var yt=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(yt,[["id",ne],["orient",ee],["markerWidth",oe.toString()],["markerHeight",ue.toString()],["refX",ie.toString()],["refY",ye.toString()]]),yt.appendChild(vt),yt},le.createText=function(ne){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),ne&&le.setAttributes(ee,ne),ee},le.createTSpan=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=ne,ee&&le.setAttributes(oe,ee),oe},le.createImage=function(ne){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return ne&&le.setAttributes(ee,ne),ee},le.createPoint=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=ne,oe.y=ee,oe},le.createPath=function(ne,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",ne),ee&&le.setAttributes(oe,ee),oe},le}(),ve=function(){function le(){}return le.addKey=function(ne){le.key=ne},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),rt=function(){function le(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return le.prototype.rasterize=function(ne,ee,oe){var ue=this;return new Promise(function(ie){var ye=oe!==void 0?oe:document.createElement("canvas");ne===null&&(ue.markersOnly=!0,ue.naturalSize=!1);var vt=document.createElementNS("http://www.w3.org/2000/svg","svg");vt.setAttribute("xmlns","http://www.w3.org/2000/svg"),vt.setAttribute("width",ee.width.baseVal.valueAsString),vt.setAttribute("height",ee.height.baseVal.valueAsString),vt.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),vt.innerHTML=ee.innerHTML,ue.naturalSize===!0?(vt.width.baseVal.value=ne.naturalWidth,vt.height.baseVal.value=ne.naturalHeight):ue.width!==void 0&&ue.height!==void 0&&(vt.width.baseVal.value=ue.width,vt.height.baseVal.value=ue.height),ye.width=vt.width.baseVal.value,ye.height=vt.height.baseVal.value;var yt=vt.outerHTML,kt=ye.getContext("2d");ue.markersOnly!==!0&&kt.drawImage(ne,0,0,ye.width,ye.height);var Oe=window.URL,$t=new Image(ye.width,ye.height);$t.setAttribute("crossOrigin","anonymous");var _t=new Blob([yt],{type:"image/svg+xml"}),Gt=Oe.createObjectURL(_t);$t.onload=function(){kt.drawImage($t,0,0),Oe.revokeObjectURL(Gt);var xn=ye.toDataURL(ue.imageType,ue.imageQuality);ie(xn)},$t.src=Gt})},le}(),Ve=function(){},Ae=function(){function le(ne){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ne+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(ne){return this.styleSheet===void 0&&this.addStyleSheet(),ne.name=""+this.classNamePrefix+ne.localName,this.classes.push(ne),this.styleSheet.sheet.insertRule("."+ne.name+" {"+ne.style+"}",this.styleSheet.sheet.cssRules.length),ne},le.prototype.addRule=function(ne){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ne),this.styleSheet.sheet.insertRule(ne.selector+" {"+ne.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var ne;this.styleSheet=document.createElement("style"),((ne=this.styleSheetRoot)!==null&&ne!==void 0?ne:document.head).appendChild(this.styleSheet),this.addRule(new Pe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Pe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Pe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new we("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new we("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},le.prototype.removeStyleSheet=function(){var ne;this.styleSheet&&(((ne=this.styleSheetRoot)!==null&&ne!==void 0?ne:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),Pe=function(le,ne){this.selector=le,this.style=ne},we=function(le,ne){this.localName=le,this.style=ne},$e=function(){function le(ne,ee,oe,ue,ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ne,this.displayMode=ee,this.markerItems=oe,this.uiStyleSettings=ue,this.styles=ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return le.prototype.show=function(ne){var ee=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ne,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(oe,'<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(ie){var ye=document.createElement("div");ye.className=""+ee.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",ie.typeName),ye.innerHTML=ie.icon,ye.addEventListener("click",function(){ee.markerToolbarButtonClicked(ye,ie)}),ee.buttons.push(ye),ee.markerButtons.push(ye)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ue=document.createElement("div");ue.className=this.toolbarBlockStyleClass.name,ue.style.whiteSpace="nowrap",ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ue),this.addActionButton(ue,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(ue,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},le.prototype.addButtonClickListener=function(ne){this.buttonClickListeners.push(ne)},le.prototype.removeButtonClickListener=function(ne){this.buttonClickListeners.indexOf(ne)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ne),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ne=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ee=0;ee<this.markerButtons.length;ee++)ee<ne||ee===ne&&this.markerButtons.length-1===ne?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===ne&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},le.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},le.prototype.resetButtonStyles=function(){var ne=this;this.buttons.forEach(function(ee){ee.className=ee.className.replace(ne.uiStyleSettings.toolbarButtonStyleColorsClassName?ne.uiStyleSettings.toolbarButtonStyleColorsClassName:ne.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(ne.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ne.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ne.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(ne.uiStyleSettings.toolbarButtonStyleColorsClassName?ne.uiStyleSettings.toolbarButtonStyleColorsClassName:ne.toolbarButtonStyleColorsClass.name)})},le.prototype.addActionButton=function(ne,ee,oe){var ue=this,ie=document.createElement("div");switch(ie.className=""+this.toolbarButtonStyleClass.name,ie.innerHTML=ee,ie.setAttribute("data-action",oe),ie.addEventListener("click",function(){ue.actionToolbarButtonClicked(ie,oe)}),oe){case"select":ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ie.style.fill=this.uiStyleSettings.closeButtonColor}ne.appendChild(ie),this.buttons.push(ie)},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new we("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 we("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new we("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new we("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 we("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var ne=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new we("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ne)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ne)+`px;
padding: `+ne+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new we("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new we("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Pe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Pe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},le.prototype.markerToolbarButtonClicked=function(ne,ee){this.setActiveButton(ne),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(ne,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(ne){this.resetButtonStyles(),ne.className=ne.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ne.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(ne){var ee=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===ne});ee&&this.setActiveButton(ee)},le.prototype.setCurrentMarker=function(ne){var ee=this;this.currentMarker=ne,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){ee.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},le}(),at=function(){function le(ne,ee,oe,ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=ne,this.displayMode=ee,this.uiStyleSettings=oe,this.styles=ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var ne;this.toolboxStyleClass=this.styles.addClass(new we("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 we("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new we("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new we("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new we("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 we("toolbox-panel-row_colors",`
background-color: `+((ne=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ne!==void 0?ne:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new we("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
padding: `+ee+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new we("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new we("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Pe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Pe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},le.prototype.show=function(ne){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ne,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(ne){var ee,oe,ue=this;this.panels=ne,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ie){var ye;ie.uiStyleSettings=ue.uiStyleSettings;var vt=document.createElement("div");vt.className=ue.toolboxButtonStyleClass.name+" "+((ye=ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:ue.toolboxButtonStyleColorsClass.name),vt.innerHTML=ie.icon,vt.title=ie.title,vt.addEventListener("click",function(){ue.panelButtonClick(ie)}),ue.panelButtons.push(vt),ue.buttonRow.appendChild(vt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(ne){var ee=this,oe=-1;if(ne!==this.activePanel){oe=this.panels.indexOf(ne),this.panelRow.innerHTML="";var ue=ne.getUi();ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ue),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=ne}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ie,ye){var vt,yt;ie.className=ee.toolboxButtonStyleClass.name+" "+(ye===oe?""+((vt=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&vt!==void 0?vt:ee.toolboxActiveButtonStyleColorsClass.name):""+((yt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&yt!==void 0?yt:ee.toolboxButtonStyleColorsClass.name))})},le}(),ct=function(le,ne){this.title=le,this.icon=ne},ut=function(le){function ne(ee,oe,ue,ie){var ye=le.call(this,ee,ie||'<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 ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=oe,ye.currentColor=ue,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return Fe(ne,le),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(ue){var ie=ee.getColorBox(ue);oe.appendChild(ie),ee.colorBoxes.push(ie)}),oe},ne.prototype.getColorBox=function(ee){var oe=this,ue=this.uiStyleSettings.toolbarHeight/4,ie=this.uiStyleSettings.toolbarHeight-ue,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=ie-2+"px",ye.style.height=ie-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(ie+2)/2+"px",ye.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){oe.setCurrentColor(ee,ye)});var vt=document.createElement("div");return vt.style.display="inline-block",vt.style.width=ie-2+"px",vt.style.height=ie-2+"px",vt.style.backgroundColor=ee,vt.style.borderRadius=ie/2+"px",ee==="transparent"&&(vt.style.fill=this.uiStyleSettings.toolboxAccentColor,vt.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>`),ye.appendChild(vt),ye},ne.prototype.setCurrentColor=function(ee,oe){var ue=this;this.currentColor=ee,this.colorBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},ne}(ct),ze=function(){function le(ne,ee,oe){this._state="new",this._isSelected=!1,this._container=ne,this._overlayContainer=ee,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(ne){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(ne,ee){},le.prototype.dblClick=function(ne,ee){},le.prototype.manipulate=function(ne){},le.prototype.pointerUp=function(ne){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(ne){this.container.childNodes.length>0?this.container.insertBefore(ne,this.container.childNodes[0]):this.container.appendChild(ne)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(ne){this._state=ne.state,this.notes=ne.notes},le.prototype.scale=function(ne,ee){},le.prototype.colorChanged=function(ne){this.onColorChanged&&this.onColorChanged(ne),this.stateChanged()},le.prototype.fillColorChanged=function(ne){this.onFillColorChanged&&this.onFillColorChanged(ne),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ne=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ne.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ne)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),wt=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(ne){return this.topLeft.ownsTarget(ne)?this.topLeft:this.topCenter.ownsTarget(ne)?this.topCenter:this.topRight.ownsTarget(ne)?this.topRight:this.centerLeft.ownsTarget(ne)?this.centerLeft:this.centerRight.ownsTarget(ne)?this.centerRight:this.bottomLeft.ownsTarget(ne)?this.bottomLeft:this.bottomCenter.ownsTarget(ne)?this.bottomCenter:this.bottomRight.ownsTarget(ne)?this.bottomRight:void 0},le}(),pt=function(){function le(){this.GRIP_SIZE=10,this.visual=Ee.createGroup(),this.visual.appendChild(Ee.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ee.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(ne){return ne===this.visual||ne===this.visual.childNodes[0]||ne===this.visual.childNodes[1]},le}(),sn=function(){function le(){}return le.toITransformMatrix=function(ne){return{a:ne.a,b:ne.b,c:ne.c,d:ne.d,e:ne.e,f:ne.f}},le.toSVGMatrix=function(ne,ee){return ne.a=ee.a,ne.b=ee.b,ne.c=ee.c,ne.d=ee.d,ne.e=ee.e,ne.f=ee.f,ne},le}(),Ce=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.left=0,ie.top=0,ie.width=0,ie.height=0,ie.defaultSize={x:50,y:20},ie.offsetX=0,ie.offsetY=0,ie.rotationAngle=0,ie.CB_DISTANCE=10,ie._suppressMarkerCreateEvent=!1,ie.container.transform.baseVal.appendItem(Ee.createTransform()),ie.setupControlBox(),ie}return Fe(ne,le),Object.defineProperty(ne.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"visual",{get:function(){return this._visual},set:function(ee){this._visual=ee;var oe=Ee.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),ne.prototype.ownsTarget=function(ee){return!!le.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ue=this.unrotatePoint(ee);if(this.manipulationStartX=ue.x,this.manipulationStartY=ue.y,this.offsetX=ue.x-this.left,this.offsetY=ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ie.x-this.width/2,this.top=ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ne.prototype.pointerUp=function(ee){var oe=this.state;le.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ne.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},ne.prototype.manipulate=function(ee){var oe=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(ee)},ne.prototype.resize=function(ee){var oe=this.manipulationStartLeft,ue=this.manipulationStartWidth,ie=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+ee.x-this.manipulationStartX,ue=this.manipulationStartWidth+this.manipulationStartLeft-oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ue=this.manipulationStartWidth+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ie=this.manipulationStartTop+ee.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+ee.y-this.manipulationStartY}ue>=0?(this.left=oe,this.width=ue):(this.left=oe+ue,this.width=-ue),ye>=0?(this.top=ie,this.height=ye):(this.top=ie+ye,this.height=-ye),this.setSize()},ne.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ne.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var oe=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},ne.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},ne.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM(),ue=Ee.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(oe)).x,y:ue.y}},ne.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM();oe=oe.inverse();var ue=Ee.createPoint(ee.x,ee.y);return{x:(ue=ue.matrixTransform(oe)).x,y:ue.y}},ne.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ne.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},ne.prototype.setupControlBox=function(){this.controlBox=Ee.createGroup();var ee=Ee.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=Ee.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=Ee.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 wt,this.addControlGrips(),this.controlBox.style.display="none"},ne.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},ne.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()},ne.prototype.createGrip=function(){var ee=new pt;return ee.visual.transform.baseVal.appendItem(Ee.createTransform()),this.controlBox.appendChild(ee.visual),ee},ne.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,oe=-ee/2,ue=oe,ie=(this.width+this.CB_DISTANCE)/2-ee/2,ye=(this.height+this.CB_DISTANCE)/2-ee/2,vt=this.height+this.CB_DISTANCE-ee/2,yt=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,ue),this.positionGrip(this.controlGrips.topCenter.visual,ie,ue),this.positionGrip(this.controlGrips.topRight.visual,yt,ue),this.positionGrip(this.controlGrips.centerLeft.visual,oe,ye),this.positionGrip(this.controlGrips.centerRight.visual,yt,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,vt),this.positionGrip(this.controlGrips.bottomCenter.visual,ie,vt),this.positionGrip(this.controlGrips.bottomRight.visual,yt,vt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ie,ue-3*this.CB_DISTANCE)},ne.prototype.positionGrip=function(ee,oe,ue){var ie=ee.transform.baseVal.getItem(0);ie.setTranslate(oe,ue),ee.transform.baseVal.replaceItem(ie,0)},ne.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ne.prototype.showControlBox=function(){this.controlBox.style.display=""},ne.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:sn.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:sn.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},ne.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(sn.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(sn.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe);var ue=this.rotatePoint({x:this.left,y:this.top}),ie=this.unrotatePoint({x:ue.x*ee,y:ue.y*oe});this.left=ie.x,this.top=ie.y,this.width=this.width*ee,this.height=this.height*oe,this.adjustControlBox()},ne}(ze),Ke=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},ne.prototype.createVisual=function(){this.visual=Ee.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)},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},ne.prototype.setSize=function(){le.prototype.setSize.call(this),Ee.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ne.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize()},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Ee.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},ne.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Ee.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Ee.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Ee.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ne.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},ne.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize()},ne.title="Rectangle marker",ne}(Ce),ot=function(le){function ne(ee,oe,ue,ie){var ye=le.call(this,ee,ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=oe,ye.currentWidth=ue,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return Fe(ne,le),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(ue){var ie=document.createElement("div");ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=ue===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){ee.setCurrentWidth(ue,ie)}),oe.appendChild(ie);var ye=document.createElement("div");ye.innerText=ue.toString(),ye.style.marginRight="5px",ie.appendChild(ye);var vt=document.createElement("div");vt.style.minHeight="20px",vt.style.flexGrow="2",vt.style.display="flex",vt.style.alignItems="center";var yt=document.createElement("hr");yt.style.minWidth="20px",yt.style.border="0px",yt.style.borderTop=ue+"px solid "+ee.uiStyleSettings.toolboxColor,yt.style.flexGrow="2",vt.appendChild(yt),ie.appendChild(vt),ee.widthBoxes.push(ie)}),oe},ne.prototype.setCurrentWidth=function(ee,oe){var ue=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ne}(ct),_e=function(le){function ne(ee,oe,ue,ie){var ye=le.call(this,ee,ie||'<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 ye.styles=[],ye.styleBoxes=[],ye.styles=oe,ye.currentStyle=ue,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return Fe(ne,le),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(ue){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/ee.styles.length-5+"%",ie.style.borderColor=ue===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){ee.setCurrentStyle(ue,ie)}),oe.appendChild(ie);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var vt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ue!==""?'stroke-dasharray="'+ue+'"':"")+` />
</svg>`;ye.innerHTML=vt,ie.appendChild(ye),ee.styleBoxes.push(ie)}),oe},ne.prototype.setCurrentStyle=function(ee,oe){var ue=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ne}(ct),nt=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.strokeColor=ue.defaultColor,ie.strokeWidth=ue.defaultStrokeWidth,ie.strokeDasharray=ue.defaultStrokeDasharray,ie.strokePanel=new ut("Line color",ue.defaultColorSet,ue.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ot("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new _e("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Fe(ne,le),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.typeName="FrameMarker",ne.title="Frame marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ne}(Ke),Ze=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"},dt=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.x1=0,ie.y1=0,ie.x2=0,ie.y2=0,ie.defaultLength=50,ie.manipulationStartX=0,ie.manipulationStartY=0,ie.manipulationStartX1=0,ie.manipulationStartY1=0,ie.manipulationStartX2=0,ie.manipulationStartY2=0,ie.setupControlBox(),ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!!le.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ne.prototype.pointerUp=function(ee){var oe=this.state;le.prototype.pointerUp.call(this,ee),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ne.prototype.adjustVisual=function(){},ne.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},ne.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},ne.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ne.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},ne.prototype.setupControlBox=function(){this.controlBox=Ee.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ne.prototype.adjustControlBox=function(){this.positionGrips()},ne.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ne.prototype.createGrip=function(){var ee=new pt;return ee.visual.transform.baseVal.appendItem(Ee.createTransform()),this.controlBox.appendChild(ee.visual),ee},ne.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},ne.prototype.positionGrip=function(ee,oe,ue){var ie=ee.transform.baseVal.getItem(0);ie.setTranslate(oe,ue),ee.transform.baseVal.replaceItem(ie,0)},ne.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},ne.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.x1=this.x1*ee,this.y1=this.y1*oe,this.x2=this.x2*ee,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},ne}(ze),pn=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.strokeColor=ue.defaultColor,ie.strokeWidth=ue.defaultStrokeWidth,ie.strokeDasharray=ue.defaultStrokeDasharray,ie.strokePanel=new ut("Line color",ue.defaultColorSet,ue.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ot("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new _e("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},ne.prototype.createVisual=function(){this.visual=Ee.createGroup(),this.selectorLine=Ee.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ee.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)},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ne.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()),Ee.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ee.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ee.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.createVisual(),this.adjustVisual()},ne.typeName="LineMarker",ne.title="Line marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ne}(dt),Ft=function(le){function ne(ee,oe,ue,ie){var ye=le.call(this,ee,ie||'<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 ye.fonts=[],ye.fontBoxes=[],ye.fonts=oe,ye.currentFont=ue,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return Fe(ne,le),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(ue){var ie=document.createElement("div");ie.style.display="inline-block",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/ee.fonts.length-5+"%",ie.style.borderColor=ue===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){ee.setCurrentFont(ue,ie)}),oe.appendChild(ie);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=ue,ye.style.overflow="hidden";var vt=document.createElement("div");vt.style.whiteSpace="nowrap",vt.style.overflow="hidden",vt.style.textOverflow="ellipsis",vt.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(vt),ie.appendChild(ye),ee.fontBoxes.push(ie)}),oe},ne.prototype.setCurrentFont=function(ee,oe){var ue=this;this.currentFont=ee,this.fontBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ne}(ct),bn=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.color="transparent",ie.padding=5,ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ie.text=ie.DEFAULT_TEXT,ie.isMoved=!1,ie.color=ue.defaultColor,ie.fontFamily=ue.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setColor=ie.setColor.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.renderText=ie.renderText.bind(ie),ie.sizeText=ie.sizeText.bind(ie),ie.textEditDivClicked=ie.textEditDivClicked.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.setSize=ie.setSize.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.colorPanel=new ut("Color",ue.defaultColorSet,ue.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.fontFamilyPanel=new Ft("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){if(le.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(ue){ue===ee&&(oe=!0)}),oe},ne.prototype.createVisual=function(){this.visual=Ee.createGroup(),this.bgRectangle=Ee.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ee.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ee.createTransform()),this.textElement.transform.baseVal.appendItem(Ee.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.renderText=function(){var ee=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(oe){ee.textElement.appendChild(Ee.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ne.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),oe=1;if(ee.width>0&&ee.height>0){var ue=(1*this.width-this.width*this.padding*2/100)/ee.width,ie=(1*this.height-this.height*this.padding*2/100)/ee.height;oe=Math.min(ue,ie)}return oe},ne.prototype.getTextPosition=function(ee){var oe=this.textElement.getBBox(),ue=0,ie=0;return oe.width>0&&oe.height>0&&(ue=(this.width-oe.width*ee)/2,ie=this.height/2-oe.height*ee/2),{x:ue,y:ie}},ne.prototype.sizeText=function(){var ee=this.textElement.getBBox(),oe=this.getTextScale(),ue=this.getTextPosition(oe);ue.y-=ee.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ue.x+"px, "+ue.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ue.x,ue.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},ne.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},ne.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},ne.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ee.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ee.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ne.prototype.pointerUp=function(ee){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,ee),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ne.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,ee.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var ue=oe.clipboardData.getData("text"),ie=window.getSelection();if(!ie.rangeCount)return!1;ie.deleteFromDocument(),ie.getRangeAt(0).insertNode(document.createTextNode(ue)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ne.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ee=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ue=this.textElement.getBBox(),ie={x:ue.width*ee,y:ue.height*ee};oe.x-=ie.x/2,oe.y-=ie.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.x+"px",this.textEditor.style.fontSize=Math.max(16*ee,12)+"px",this.textElement.style.display="none"}},ne.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ne.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ne.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},ne.prototype.dblClick=function(ee,oe){le.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},ne.prototype.setColor=function(ee){this.textElement&&Ee.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},ne.prototype.setFont=function(ee){this.textElement&&Ee.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ne.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ne.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize(),this.sizeText(),this.positionTextEditor()},ne.typeName="TextMarker",ne.title="Text marker",ne.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>',ne}(Ce),Rt=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.color="transparent",ie.lineWidth=3,ie.drawing=!1,ie.pixelRatio=1,ie.color=ue.defaultColor,ie.lineWidth=ue.defaultStrokeWidth,ie.pixelRatio=ue.freehandPixelRatio,ie.setColor=ie.setColor.bind(ie),ie.addCanvas=ie.addCanvas.bind(ie),ie.finishCreation=ie.finishCreation.bind(ie),ie.setLineWidth=ie.setLineWidth.bind(ie),ie.colorPanel=new ut("Color",ue.defaultColorSet,ue.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.lineWidthPanel=new ot("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ie.lineWidthPanel.onWidthChanged=ie.setLineWidth,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},ne.prototype.createVisual=function(){this.visual=Ee.createGroup(),this.drawingImage=Ee.createImage(),this.visual.appendChild(this.drawingImage);var ee=Ee.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},ne.prototype.pointerDown=function(ee,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(ee.x,ee.y),this.drawing=!0):le.prototype.pointerDown.call(this,ee,oe)},ne.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){le.prototype.resize.call(this,ee),Ee.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ee.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ne.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,ee)},ne.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)},ne.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},ne.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},ne.prototype.finishCreation=function(){for(var ee=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ue=oe[0],ie=oe[1],ye=oe[2],vt=oe[3],yt=!1,kt=0;kt<this.canvasElement.height;kt++)for(var Oe=0;Oe<this.canvasElement.width;Oe++)ee.data[kt*this.canvasElement.width*4+4*Oe+3]>0&&(yt=!0,kt<ie&&(ie=kt),Oe<ue&&(ue=Oe),kt>vt&&(vt=kt),Oe>ye&&(ye=Oe));if(yt){this.left=ue/this.pixelRatio,this.top=ie/this.pixelRatio,this.width=(ye-ue)/this.pixelRatio,this.height=(vt-ie)/this.pixelRatio;var $t=document.createElement("canvas");$t.width=ye-ue,$t.height=vt-ie,$t.getContext("2d").putImageData(this.canvasContext.getImageData(ue,ie,ye-ue,vt-ie),0,0),this.drawingImgUrl=$t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ne.prototype.setDrawingImage=function(){Ee.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ee.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ne.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},ne.prototype.setLineWidth=function(ee){this.lineWidth=ee},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){this.createVisual(),le.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setDrawingImage()},ne.typeName="FreehandMarker",ne.title="Freehand marker",ne.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>',ne}(Ce),me=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,ue||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ie.typeBoxes=[],ie.currentType=oe,ie.setCurrentType=ie.setCurrentType.bind(ie),ie}return Fe(ne,le),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var ue=function(vt){var yt="both";switch(vt){case 0:yt="both";break;case 1:yt="start";break;case 2:yt="end";break;case 3:yt="none"}var kt=document.createElement("div");if(kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=yt===ie.currentType?ie.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){ee.setCurrentType(yt,kt)}),oe.appendChild(kt),yt==="both"||yt==="start"){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.alignItems="center",Oe.style.minHeight="20px",Oe.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="`+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Oe.style.marginLeft="5px",kt.appendChild(Oe)}var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.style.flexGrow="2";var _t=document.createElement("hr");if(_t.style.minWidth="20px",_t.style.border="0px",_t.style.borderTop="3px solid "+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee"),_t.style.flexGrow="2",$t.appendChild(_t),kt.appendChild($t),yt==="both"||yt==="end"){var Gt=document.createElement("div");Gt.style.display="flex",Gt.style.alignItems="center",Gt.style.minHeight="20px",Gt.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="`+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Gt.style.marginRight="5px",kt.appendChild(Gt)}ie.typeBoxes.push(kt)},ie=this,ye=0;ye<4;ye++)ue(ye);return oe},ne.prototype.setCurrentType=function(ee,oe){var ue=this;this.currentType=ee,this.typeBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?ue.uiStyleSettings!==void 0?ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ne}(ct),de=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.arrowType="end",ie.arrowBaseHeight=10,ie.arrowBaseWidth=10,ie.getArrowPoints=ie.getArrowPoints.bind(ie),ie.setArrowType=ie.setArrowType.bind(ie),ie.arrowTypePanel=new me("Arrow type","end"),ie.arrowTypePanel.onArrowTypeChanged=ie.setArrowType,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},ne.prototype.getArrowPoints=function(ee,oe){var ue=this.arrowBaseWidth+2*this.strokeWidth,ie=this.arrowBaseHeight+2*this.strokeWidth;return ee-ue/2+","+(oe+ie/2)+" "+ee+","+(oe-ie/2)+" "+(ee+ue/2)+","+(oe+ie/2)},ne.prototype.createTips=function(){this.arrow1=Ee.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ee.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ee.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ee.createTransform()),this.visual.appendChild(this.arrow2)},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},ne.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Ee.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ee.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var ue=this.arrow2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ue,0)}},ne.prototype.setArrowType=function(ee){this.arrowType=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.arrowType=oe.arrowType,this.createTips(),this.adjustVisual()},ne.typeName="ArrowMarker",ne.title="Arrow marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ne}(pn),Ct=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.fillColor=ue.defaultFillColor,ie.strokeWidth=0,ie.fillPanel=new ut("Color",ue.defaultColorSet,ue.defaultFillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie}return Fe(ne,le),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.typeName="CoverMarker",ne.title="Cover marker",ne.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ne}(Ke),on=function(le){function ne(ee,oe,ue,ie){var ye=le.call(this,ee,ie||'<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 ye.opacities=[],ye.opacityBoxes=[],ye.opacities=oe,ye.currentOpacity=ue,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return Fe(ne,le),ne.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(ue){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="center",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=ue===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){ee.setCurrentOpacity(ue,ie)}),oe.appendChild(ie);var ye=document.createElement("div");ye.innerText=100*ue+"%",ie.appendChild(ye),ee.opacityBoxes.push(ie)}),oe},ne.prototype.setCurrentOpacity=function(ee,oe){var ue=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ie){ie.style.borderColor=ie===oe?ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ne}(ct),Bt=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.setOpacity=ie.setOpacity.bind(ie),ie.fillColor=ue.defaultHighlightColor,ie.strokeWidth=0,ie.opacity=ue.defaultHighlightOpacity,ie.fillPanel=new ut("Color",ue.defaultColorSet,ie.fillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie.opacityPanel=new on("Opacity",ue.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return Fe(ne,le),ne.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Ee.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.typeName="HighlightMarker",ne.title="Highlight marker",ne.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>',ne}(Ct),He='<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>',it='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ft=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.bgColor="transparent",ie.tipPosition={x:0,y:0},ie.tipBase1Position={x:0,y:0},ie.tipBase2Position={x:0,y:0},ie.tipMoving=!1,ie.color=ue.defaultStrokeColor,ie.bgColor=ue.defaultFillColor,ie.fontFamily=ue.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setBgColor=ie.setBgColor.bind(ie),ie.getTipPoints=ie.getTipPoints.bind(ie),ie.positionTip=ie.positionTip.bind(ie),ie.setTipPoints=ie.setTipPoints.bind(ie),ie.colorPanel=new ut("Text color",ue.defaultColorSet,ie.color,He),ie.colorPanel.onColorChanged=ie.setColor,ie.bgColorPanel=new ut("Fill color",ue.defaultColorSet,ie.bgColor,it),ie.bgColorPanel.onColorChanged=ie.setBgColor,ie.fontFamilyPanel=new Ft("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.tipGrip=new pt,ie.tipGrip.visual.transform.baseVal.appendItem(Ee.createTransform()),ie.controlBox.appendChild(ie.tipGrip.visual),ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return le.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},ne.prototype.createTip=function(){Ee.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ee.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ne.prototype.pointerDown=function(ee,oe){this.state==="new"&&le.prototype.pointerDown.call(this,ee,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,ee,oe)},ne.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,ee);else{var oe=this.state==="creating";le.prototype.pointerUp.call(this,ee),this.setTipPoints(oe),this.positionTip()}},ne.prototype.manipulate=function(ee){if(this.tipMoving){var oe=this.unrotatePoint(ee);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,ee)},ne.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(Ee.setAttributes(this.bgRectangle,[["fill",ee]]),Ee.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},ne.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},ne.prototype.setTipPoints=function(ee){ee===void 0&&(ee=!1);var oe=Math.min(this.height/2,15),ue=this.height/5;ee&&(this.tipPosition={x:oe+ue/2,y:this.height+20});var ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+ue,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-ue,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ue=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-ue,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-ue},this.tipBase2Position={x:this.width,y:this.height-oe}):ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ue=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-ue})},ne.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.positionTip()},ne.prototype.positionTip=function(){Ee.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,0)},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ne.prototype.select=function(){this.positionTip(),le.prototype.select.call(this)},ne.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,le.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.tipPosition={x:this.tipPosition.x*ee,y:this.tipPosition.y*oe},this.positionTip()},ne.typeName="CalloutMarker",ne.title="Callout marker",ne.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>',ne}(bn),vn=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.strokeColor=ue.defaultColor,ie.strokeWidth=ue.defaultStrokeWidth,ie.strokeDasharray=ue.defaultStrokeDasharray,ie.fillColor=ue.defaultFillColor,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.setOpacity=ie.setOpacity.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.strokePanel=new ut("Line color",he(ue.defaultColorSet,["transparent"]),ue.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new ut("Fill color",he(ue.defaultColorSet,["transparent"]),ie.fillColor,it),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new ot("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new _e("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.opacityPanel=new on("Opacity",ue.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},ne.prototype.createVisual=function(){this.visual=Ee.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)},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},ne.prototype.setSize=function(){le.prototype.setSize.call(this),Ee.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},ne.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize()},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&Ee.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},ne.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&Ee.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&Ee.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&Ee.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ne.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&Ee.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize()},ne.typeName="EllipseMarker",ne.title="Ellipse marker",ne.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>',ne}(Ce),Pt=function(le){function ne(ee,oe,ue){return le.call(this,ee,oe,ue)||this}return Fe(ne,le),Object.defineProperty(ne.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},ne.prototype.createTips=function(){this.tip1=Ee.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(Ee.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ee.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(Ee.createTransform()),this.visual.appendChild(this.tip2)},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},ne.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ee.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()]]),Ee.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var ue=this.tip2.transform.baseVal.getItem(0);ue.setRotate(ee+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ue,0)}},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee),this.createTips(),this.adjustVisual()},ne.typeName="MeasurementMarker",ne.title="Measurement marker",ne.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>',ne}(pn),Me=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.strokePanel.colors=ue.defaultColorSet,ie.fillColor="transparent",ie}return Fe(ne,le),Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=le.prototype.getState.call(this);return ee.typeName=ne.typeName,ee},ne.typeName="EllipseFrameMarker",ne.title="Ellipse frame marker",ne.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>',ne}(vn),be=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(ne){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ne)||(this.undoStack.push(ne),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ne)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(ne){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ne)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var ne=this.undoStack.pop();return ne!==void 0&&this.redoStack.push(ne),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),Re=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.curveX=0,ie.curveY=0,ie.manipulationStartCurveX=0,ie.manipulationStartCurveY=0,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.positionGrips=ie.positionGrips.bind(ie),ie.addControlGrips=ie.addControlGrips.bind(ie),ie.adjustVisual=ie.adjustVisual.bind(ie),ie.setupControlBox=ie.setupControlBox.bind(ie),ie.resize=ie.resize.bind(ie),ie.strokeColor=ue.defaultColor,ie.strokeWidth=ue.defaultStrokeWidth,ie.strokeDasharray=ue.defaultStrokeDasharray,ie.strokePanel=new ut("Line color",ue.defaultColorSet,ue.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ot("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new _e("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},ne.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ne.prototype.createVisual=function(){this.visual=Ee.createGroup(),this.selectorCurve=Ee.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ee.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)},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},ne.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ee.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ee.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ee.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ne.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=Ee.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ee.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)},ne.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},ne.prototype.positionGrips=function(){le.prototype.positionGrips.call(this);var ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},ne.prototype.manipulate=function(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),le.prototype.manipulate.call(this,ee)},ne.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),le.prototype.resize.call(this,ee),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},ne.prototype.scale=function(ee,oe){this.curveX=this.curveX*ee,this.curveY=this.curveY*oe,le.prototype.scale.call(this,ee,oe)},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return ee.typeName=ne.typeName,ee},ne.prototype.restoreState=function(ee){le.prototype.restoreState.call(this,ee);var oe=ee;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.curveY,this.createVisual(),this.adjustVisual()},ne.typeName="CurveMarker",ne.title="Curve marker",ne.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>',ne}(dt),lt=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,oe,ue)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.textColor="transparent",ie.fontSize="1rem",ie.isMoved=!1,ie.captionText="Caption",ie.PADDING=5,ie.captionBoxWidth=0,ie.captionBoxHeight=0,ie.strokeColor=ue.defaultColor,ie.strokeWidth=ue.defaultStrokeWidth,ie.strokeDasharray=ue.defaultStrokeDasharray,ie.fillColor=ue.defaultFillColor,ie.textColor=ue.defaultStrokeColor,ie.fontFamily=ue.defaultFontFamily,ie.fontSize=ue.defaultCaptionFontSize,ie.captionText=ue.defaultCaptionText,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.sizeCaption=ie.sizeCaption.bind(ie),ie.setCaptionText=ie.setCaptionText.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.finishTextEditing=ie.finishTextEditing.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.setTextColor=ie.setTextColor.bind(ie),ie.strokePanel=new ut("Line color",he(ue.defaultColorSet,["transparent"]),ie.strokeColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new ut("Fill color",he(ue.defaultColorSet,["transparent"]),ie.fillColor,it),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new ot("Line width",ue.defaultStrokeWidths,ue.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new _e("Line style",ue.defaultStrokeDasharrays,ue.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.fontFamilyPanel=new Ft("Font",ue.defaultFontFamilies,ue.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.textColorPanel=new ut("Text color",ue.defaultColorSet,ie.textColor,He),ie.textColorPanel.onColorChanged=ie.setTextColor,ie}return Fe(ne,le),ne.prototype.ownsTarget=function(ee){return!(!le.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},ne.prototype.createVisual=function(){this.visual=Ee.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ee.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ee.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=Ee.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()},ne.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},ne.prototype.pointerDown=function(ee,oe){le.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},ne.prototype.manipulate=function(ee){le.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},ne.prototype.resize=function(ee){le.prototype.resize.call(this,ee),this.setSize()},ne.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ee.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')"]]),Ee.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')"]])},ne.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ne.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"))},ne.prototype.finishTextEditing=function(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ne.prototype.setFont=function(ee){this.captionElement&&Ee.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ne.prototype.setTextColor=function(ee){this.captionElement&&Ee.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ne.prototype.setSize=function(){le.prototype.setSize.call(this),Ee.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ne.prototype.pointerUp=function(ee){le.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ne.prototype.dblClick=function(ee,oe){le.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},ne.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&Ee.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},ne.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&Ee.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},ne.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&Ee.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ne.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&Ee.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ne.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ne.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},le.prototype.getState.call(this));return ee.typeName=this.typeName,ee},ne.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),le.prototype.restoreState.call(this,ee),this.setSize()},ne.prototype.scale=function(ee,oe){le.prototype.scale.call(this,ee,oe),this.setSize()},ne.typeName="CaptionFrameMarker",ne.title="Caption frame marker",ne.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>',ne}(Ce),Le=function(){function le(ne,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ne,this.cancelable=ee}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),Ue=function(le){function ne(ee,oe,ue){var ie=le.call(this,ee,!1)||this;return ie.dataUrl=oe,ie.state=ue,ie}return Fe(ne,le),ne}(Le),Xe=function(le){function ne(ee,oe,ue){ue===void 0&&(ue=!1);var ie=le.call(this,ee,ue)||this;return ie.marker=oe,ie}return Fe(ne,le),ne}(Le),et=function(){function le(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return le.prototype.addEventListener=function(ne,ee){this[ne].push(ee)},le.prototype.removeEventListener=function(ne,ee){var oe=this[ne].indexOf(ee);oe>-1&&this[ne].splice(oe,1)},le}(),gt=function(){function le(ne){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ze,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 et,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new Ae(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ne,this.targetRoot=document.body,this.width=ne.clientWidth,this.height=ne.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[nt,Rt,de,bn,Me,vn,Bt,ft,Pt,Ct,pn,Re,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[nt,Rt,de,bn,vn,Bt,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[nt,Rt,de,bn,Bt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ne){var ee=this;this._availableMarkerTypes.splice(0),ne.forEach(function(oe){if(typeof oe=="string"){var ue=ee.ALL_MARKER_TYPES.find(function(ie){return ie.typeName===oe});ue!==void 0&&ee._availableMarkerTypes.push(ue)}else ee._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ne){this._zoomLevel=ne,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var ne=this;this.styles.styleSheetRoot===void 0&&Ve.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ve.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new Le(ne))})},le.prototype.render=function(){return Ye(this,void 0,void 0,function(){var ne;return Se(this,function(ee){switch(ee.label){case 0:return this.setCurrentMarker(),(ne=new rt).naturalSize=this.renderAtNaturalSize,ne.imageType=this.renderImageType,ne.imageQuality=this.renderImageQuality,ne.markersOnly=this.renderMarkersOnly,ne.width=this.renderWidth,ne.height=this.renderHeight,[4,ne.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ee.sent(),[4,ne.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},le.prototype.close=function(ne){var ee=this;if(ne===void 0&&(ne=!1),this.isOpen){var oe=!1;ne||this.eventListeners.beforeclose.forEach(function(ue){var ie=new Le(ee,!0);ue(ie),ie.defaultPrevented&&(oe=!0)}),oe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ue){return ue(new Le(ee))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var ne,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];(ne=this._availableMarkerTypes).push.apply(ne,ee)},le.prototype.addRenderEventListener=function(ne){this.addEventListener("render",function(ee){ne(ee.dataUrl,ee.state)})},le.prototype.removeRenderEventListener=function(ne){},le.prototype.addCloseEventListener=function(ne){this.addEventListener("close",function(){ne()})},le.prototype.removeCloseEventListener=function(ne){},le.prototype.setupResizeObserver=function(){var ne=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ne.resize(ne.target.clientWidth,ne.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ne.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},le.prototype.onPopupTargetResize=function(){var ne=1*this.target.clientWidth/this.target.clientHeight,ee=this.editorCanvas.clientWidth/ne>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ne:this.editorCanvas.clientWidth,oe=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ne;this.resize(ee,oe)},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.prototype.resize=function(ne,ee){this._isResizing=!0;var oe=ne/this.imageWidth,ue=ee/this.imageHeight;this.imageWidth=Math.round(ne),this.imageHeight=Math.round(ee),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(oe,ue),this._isResizing=!1},le.prototype.scaleMarkers=function(ne,ee){var oe,ue=this;this._currentMarker&&this._currentMarker instanceof bn?this._currentMarker.scale(ne,ee):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ie){ie!==ue._currentMarker&&ie.scale(ne,ee)}),oe!==void 0&&this.setCurrentMarker(oe)},le.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},le.prototype.setTopLeft=function(){var ne=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=ne.left-ee.left,this.top=ne.top-ee.top},le.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},le.prototype.addDefs=function(){for(var ne,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];this.defs=Ee.createDefs(),this.addDefsToImage(),(ne=this.defs).append.apply(ne,ee)},le.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},le.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},le.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},le.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},le.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},le.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},le.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},le.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var ne=document.createElement("a");ne.href="https://markerjs.com/",ne.target="_blank",ne.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>',ne.title="Powered by marker.js",ne.style.display="grid",ne.style.alignItems="center",ne.style.justifyItems="center",ne.style.padding="3px",ne.style.width="20px",ne.style.height="20px",this.logoUI.appendChild(ne),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},le.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var ne=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=ne+"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 $e(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 at(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},le.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.removeMarker=function(ne){this.markerImage.removeChild(ne.container),this.markers.indexOf(ne)>-1&&this.markers.splice(this.markers.indexOf(ne),1),ne.dispose()},le.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},le.prototype.toolbarButtonClicked=function(ne,ee){if(ne==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(ne==="action")switch(ee){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},le.prototype.deleteSelectedMarker=function(){var ne=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ue){var ie=new Xe(ne,ne._currentMarker,!0);ue(ie),ie.defaultPrevented&&(ee=!0)}),!ee){var oe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ue){return ue(new Xe(ne,oe))})}}},le.prototype.clear=function(){var ne=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var vt=new Xe(ne,void 0,!0);ye(vt),vt.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var oe=function(ye){var vt=ue.markers[ye];ue.setCurrentMarker(ue.markers[ye]),ue._currentMarker.dispose(),ue.markerImage.removeChild(ue._currentMarker.container),ue.markers.splice(ue.markers.indexOf(ue._currentMarker),1),ue.eventListeners.markerdelete.forEach(function(yt){return yt(new Xe(ne,vt))})},ue=this,ie=this.markers.length-1;ie>=0;ie--)oe(ie);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var ne;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=(ne=this._currentMarker.notes)!==null&&ne!==void 0?ne:"",this.overlayContainer.appendChild(this.notesArea))},le.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var ne=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ee=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===ee.width&&oe.height===ee.height){var ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ie){return ie(new Le(ne))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ie){return ie(new Le(ne))})}},le.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},le.prototype.undoStep=function(){var ne=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new Le(ne))}))},le.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},le.prototype.redoStep=function(){var ne=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new Le(ne))}))},le.prototype.stepZoom=function(){var ne=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ne<this.zoomSteps.length-1?this.zoomSteps[ne+1]:this.zoomSteps[0]},le.prototype.panTo=function(ne){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ne.x,top:this.prevPanPoint.y-ne.y}),this.prevPanPoint=ne},le.prototype.startRenderAndClose=function(){return Ye(this,void 0,void 0,function(){var ne,ee,oe=this;return Se(this,function(ue){switch(ue.label){case 0:return[4,this.render()];case 1:return ne=ue.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(ie){return ie(new Ue(oe,ne,ee))}),this.close(!0),[2]}})})},le.prototype.getState=function(ne){ne===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return ee.markers.push(oe.getState())}),ee},le.prototype.restoreState=function(ne){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ne.markers.forEach(function(oe){var ue=ee._availableMarkerTypes.find(function(ye){return ye.typeName===oe.typeName});if(ue!==void 0){var ie=ee.addNewMarker(ue);ie.restoreState(oe),ee.markers.push(ie)}}),ne.width&&ne.height&&(ne.width!==this.imageWidth||ne.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ne.width,this.imageHeight/ne.height),this.eventListeners.restorestate.forEach(function(oe){return oe(new Le(ee))})},le.prototype.addNewMarker=function(ne){var ee=Ee.createGroup();return this.markerImage.appendChild(ee),new ne(ee,this.overlayContainer,this.settings)},le.prototype.createNewMarker=function(ne){var ee,oe=this;(ee=typeof ne=="string"?this._availableMarkerTypes.find(function(ue){return ue.typeName===ne}):ne)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ue){return ue(new Xe(oe,oe._currentMarker))}))},le.prototype.markerCreated=function(ne){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ne),this.setCurrentMarker(ne),ne instanceof Rt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Rt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new Xe(ee,ee._currentMarker))})},le.prototype.colorChanged=function(ne){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ne,this.settings.defaultStrokeColor=ne)},le.prototype.fillColorChanged=function(ne){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ne)},le.prototype.markerStateChanged=function(ne){var ee=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new Xe(ee,ne))})},le.prototype.setCurrentMarker=function(ne){var ee=this;this._currentMarker!==ne&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(oe){return oe(new Xe(ee,ee._currentMarker))})),this._currentMarker=ne,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(oe){return oe(new Xe(ee,ee._currentMarker))}))},le.prototype.onPointerDown=function(ne){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ne.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ee=this.markers.find(function(oe){return oe.ownsTarget(ne.target)});ee!==void 0?(this.setCurrentMarker(ee),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ne.clientX,ne.clientY),ne.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ne.clientX,y:ne.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ne.clientX,ne.clientY))},le.prototype.onDblClick=function(ne){if(this._isFocused||this.focus(),this.mode==="select"){var ee=this.markers.find(function(oe){return oe.ownsTarget(ne.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ne.clientX,ne.clientY),ne.target):this.setCurrentMarker()}},le.prototype.onPointerMove=function(ne){this.touchPoints!==1&&ne.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ne.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ne.clientX,ne.clientY)):this.zoomLevel>1&&this.panTo({x:ne.clientX,y:ne.clientY}))},le.prototype.onPointerUp=function(ne){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ne.clientX,ne.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(ne){this._currentMarker===void 0||this.notesArea!==void 0||ne.key!=="Delete"&&ne.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(ne,ee){var oe=this.markerImage.getBoundingClientRect();return{x:(ne-oe.left)/this.zoomLevel,y:(ee-oe.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ne=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ne+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},le.prototype.addLicenseKey=function(ne){ve.addKey(ne)},le.prototype.addEventListener=function(ne,ee){this.eventListeners.addEventListener(ne,ee)},le.prototype.removeEventListener=function(ne,ee){this.eventListeners.removeEventListener(ne,ee)},le.prototype.renderState=function(ne){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ne),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var ne=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ee){return ee(new Le(ne))}))},le.prototype.blur=function(){var ne=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ee){return ee(new Le(ne))}))},le.instanceCounter=0,le}(),xt=fe(38147),Dt=fe(65862),Nt=(le,ne,ee)=>new Promise((oe,ue)=>{var ie=yt=>{try{vt(ee.next(yt))}catch(kt){ue(kt)}},ye=yt=>{try{vt(ee.throw(yt))}catch(kt){ue(kt)}},vt=yt=>yt.done?oe(yt.value):Promise.resolve(yt.value).then(ie,ye);vt((ee=ee.apply(le,ne)).next())}),Jt=({data:le,className:ne,fullWidth:ee,style:oe={},onClose:ue,onOk:ie,showFullTools:ye,noAssociationId:vt})=>{const yt=(0,te.useRef)(null),kt=(0,te.useRef)(null),Oe=(0,te.useRef)(null),$t=(0,te.useRef)(null),[_t,Gt]=(0,te.useState)(!1),[xn,Zn]=(0,te.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,te.useEffect)(()=>(Oe.current||(Oe.current=document.createElement("style"),document.head.appendChild(Oe.current)),le!=null&&le.visible?(document.body.setAttribute("data-custom","y-hidden"),Oe.current.innerHTML=" html { overflow-y: hidden; }",le!=null&&le.src&&jt()):(document.body.removeAttribute("data-custom"),Oe.current&&(document.head.removeChild(Oe.current),Oe.current=null)),()=>{document.body.removeAttribute("data-custom"),Oe.current&&(document.head.removeChild(Oe.current),Oe.current=null)}),[le==null?void 0:le.visible]);const jt=()=>Nt(void 0,null,function*(){Gt(!0),Zn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ki=yield(0,Dt.ZJ)(le==null?void 0:le.src);yt.current.src="",yt.current.src=ki,yt.current.onload=function(){si()},Gt(!1),Zn("")}),Rn=ki=>Nt(void 0,null,function*(){Gt(!0),Zn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const gi=yield(0,xt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:le.title,file:ki.dataUrl}});gi!=null&&gi.id&&!vt?(yield(0,xt.ZP)(`/api/attachments/${le.id}/add_subitem.json`,{method:"post",body:{subitem_id:gi==null?void 0:gi.id,settings:JSON.stringify(ki.state)}})).status===0&&ie():gi!=null&&gi.id&&ie(gi),Gt(!1),Zn("")}),Ei=()=>{const ki=document.querySelector('a[href="https://markerjs.com/"]');ki&&ki.parentNode&&(ki.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(Ai=>{const Bi=document.querySelector(Ai.name);Bi&&Bi.setAttribute("title",Ai.title)})},si=()=>{kt.current=new gt(yt.current),kt.current.targetRoot=$t.current,kt.current.addEventListener("render",Rn),kt.current.addEventListener("beforeclose",ue),ye&&(kt.current.availableMarkerTypes=kt.current.ALL_MARKER_TYPES,kt.current.uiStyleSettings.redoButtonVisible=!0,kt.current.uiStyleSettings.notesButtonVisible=!0,kt.current.uiStyleSettings.zoomButtonVisible=!0,kt.current.uiStyleSettings.zoomOutButtonVisible=!0,kt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=kt.current.uiStyleSettings,kt.current.show(),le!=null&&le.snapshotData&&kt.current.restoreState(le.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ei()},300)};return te.createElement(te.Fragment,null,(le==null?void 0:le.visible)&&te.createElement(pe.Z,{spinning:_t,tip:xn,style:{position:"absolute",width:"100vw"}},te.createElement("div",{ref:$t,className:Je()(tt.imageDimensions,ne,ee?tt.fullWidth:""),style:oe},te.createElement("img",{className:tt.img,ref:yt}))))}},99298:function(Ut,Qt,fe){"use strict";var te=fe(59301),tt=fe(77019),We=fe(5269),Je=fe(20554),pe=fe(7939),je=fe(95097),Fe=fe(96408),Ye=fe(48136),Se=fe(59301);const he=(0,te.forwardRef)(({callback:Ee,showSaveButton:ve,value:rt=""},Ve)=>{const Ae=(0,te.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 "}]}]}],we=[{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}`}]}]}],$e=ut=>{Ae.current.setValue(Ae.current.getValue()+" "+ut.value+" ")},at=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Se.createElement(tt.Z,{className:Fe.Z.lists,gutter:[10,10]},Pe.map((ut,ze)=>Se.createElement(We.Z,{flex:"110px",className:Fe.Z.item},Se.createElement("div",null,Se.createElement(je.Z,{value:`$$${ut.value}$$`}),ut.name),Se.createElement("div",{className:Fe.Z.children},ut.children.map((wt,pt)=>Se.createElement("div",{key:pt},Se.createElement("h1",null,wt.name),Se.createElement(tt.Z,{gutter:[10,10]},wt.data.map((sn,Ce)=>Se.createElement(We.Z,{key:Ce,onClick:()=>$e(sn),className:Fe.Z.diamond},Se.createElement(je.Z,{value:"`$$"+sn.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Se.createElement(tt.Z,{className:Fe.Z.lists,gutter:[10,10]},we.map((ut,ze)=>Se.createElement(We.Z,{flex:"110px",className:Fe.Z.item},Se.createElement("div",null,Se.createElement(je.Z,{value:"`$$"+ut.value+"$$`"}),ut.name),Se.createElement("div",{className:Fe.Z.children},ut.children.map((wt,pt)=>Se.createElement("div",{key:pt},wt.name&&Se.createElement("h1",null,wt.name),Se.createElement(tt.Z,{gutter:[10,10]},wt.data.map((sn,Ce)=>Se.createElement(We.Z,{key:Ce,onClick:()=>$e(sn),className:Fe.Z.diamond},Se.createElement(je.Z,{value:"`$$"+sn.value+"$$`"}))))))))))}],ct=()=>{var ut=document.createElement("div");ut.innerHTML=Ae.current.getValue();var ze=ut.innerText;return Ee&&Ee(ze),ze};return(0,te.useImperativeHandle)(Ve,()=>({getData:ct})),Se.createElement("div",{className:Fe.Z.mathWrap},Se.createElement(Je.default,{defaultActiveKey:"1",items:at}),Se.createElement("math-field",{locale:"zh_cn",className:Fe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Ae,style:{width:800,marginTop:30,fontSize:18}},rt||""),ve&&Se.createElement("div",{className:Fe.Z.button},Se.createElement(pe.ZP,{size:"large",onClick:ct,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Qt.Z=he},2524:function(Ut,Qt,fe){"use strict";var te=fe(59301),tt=fe(93314),We=fe(7939),Je=Object.defineProperty,pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,he=(Ve,Ae,Pe)=>Ae in Ve?Je(Ve,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Ve[Ae]=Pe,Ee=(Ve,Ae)=>{for(var Pe in Ae||(Ae={}))Ye.call(Ae,Pe)&&he(Ve,Pe,Ae[Pe]);if(Fe)for(var Pe of Fe(Ae))Se.call(Ae,Pe)&&he(Ve,Pe,Ae[Pe]);return Ve},ve=(Ve,Ae)=>pe(Ve,je(Ae));const rt=({img:Ve,buttonProps:Ae={},styles:Pe={},customText:we,ButtonText:$e,ButtonClick:at,Buttonclass:ct,ButtonTwo:ut,imgStyles:ze,loading:wt=!1,className:pt=""})=>te.createElement("section",{className:`tc animated fadeIn ${pt}`,style:Ee({color:"#999",margin:"100px auto",visibility:wt?"hidden":"visible"},Pe)},te.createElement("img",{src:Ve||tt,style:ve(Ee({},ze),{pointerEvents:"none",userSelect:"none"})}),te.createElement("p",{className:"mt20 font14"},we||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),$e&&te.createElement(We.ZP,Ee({className:ct,onClick:at},Ae),$e),ut&&ut);Qt.Z=rt},52918:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return ct}});var te=fe(59301),tt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},We=fe(7939),Je=fe(70557),pe=fe(50258),je=fe(25399),Fe=fe(65862),Ye=fe(87513),Se=fe(2524),he=fe(74128),Ee=fe(7310),ve=fe(59301),rt=Object.defineProperty,Ve=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,we=(ut,ze,wt)=>ze in ut?rt(ut,ze,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ut[ze]=wt,$e=(ut,ze)=>{for(var wt in ze||(ze={}))Ae.call(ze,wt)&&we(ut,wt,ze[wt]);if(Ve)for(var wt of Ve(ze))Pe.call(ze,wt)&&we(ut,wt,ze[wt]);return ut},at=(ut,ze,wt)=>new Promise((pt,sn)=>{var Ce=_e=>{try{ot(wt.next(_e))}catch(nt){sn(nt)}},Ke=_e=>{try{ot(wt.throw(_e))}catch(nt){sn(nt)}},ot=_e=>_e.done?pt(_e.value):Promise.resolve(_e.value).then(Ce,Ke);ot((wt=wt.apply(ut,ze)).next())}),ct=({editOffice:ut="view",data:ze,issaver:wt,onSaver:pt,theme:sn,type:Ce,filename:Ke,monacoEditor:ot,className:_e,style:nt,close:Ze,onClose:dt,hasMask:pn,disabledDownload:Ft,onImgDimensions:bn,showNodata:Rt,recordInfo:me})=>{const[de,Ct]=(0,te.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[on,Bt]=(0,te.useState)(""),[He,it]=(0,te.useState)(),ft=window.ENV==="build"?"/react/build":"",vn=location.host.startsWith("localhost")?he.Z.PROXY_SERVER:he.Z.API_SERVER,Me=10*(1024*1024),be=(0,te.useRef)();ze!=null&&ze.startsWith("/api")&&Ce!=="txt"&&(ze=he.Z.API_SERVER+ze);const Re=et=>et.substring(et.lastIndexOf("/")+1).split(".").pop();Ke&&ot&&(ot.filename=Ke),(0,te.useEffect)(()=>{var et,gt;const xt=(gt=(et=document.cookie)==null?void 0:et.replace(/\s/g,""))==null?void 0:gt.split(";");xt==null||xt.map(Dt=>{let Nt=Dt.split("=");Nt[0]==="_educoder_session"&&Bt(Nt[1])})},[]),(0,te.useEffect)(()=>{Ce==="office"&&(ze.indexOf("bigfilescdn.")>-1||ze.indexOf("bigfiles1")>-1?it({url:ze,fileType:Re(ze),model:ze.indexOf("model=edit")?"edit":"view"}):Le())},[Ce,ze]);function lt(et){return at(this,null,function*(){et.data.type==="pdfdata"&&(pt(et.data.data),window.removeEventListener("message",lt,!1)),console.log("mess---:",et.data)})}const Le=()=>at(void 0,null,function*(){console.log("data:",ze);let et=ze;ze.startsWith("http")||(et=location.origin+et);let gt=new URL(et).pathname.split("/").pop();const xt=yield(0,Ye.gJ)({attachment_id:gt});xt.url=vn+xt.url,it(xt)}),Ue=()=>{if(ze.startsWith("http")||ze.startsWith("blob:")){Xe();return}(0,Fe.Sv)(Ke||"educoder",ze,Ke)},Xe=()=>{me&&(0,Ee.fc)({id:me==null?void 0:me.id,watch_type:1,course_id:me==null?void 0:me.course_id}),(0,Fe.Nd)(Ke||"educoder",decodeURIComponent(ze))};return ve.createElement("div",{style:$e({},nt||{}),className:`${pn&&tt.bgBlack} ${Ce?tt.wrp:"hide"}`},Ze&&ve.createElement("div",{className:tt.close,ref:be},!!bn&&ve.createElement(je.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>be.current},ve.createElement("span",{onClick:()=>{dt(),bn()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ft&&ve.createElement(je.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>be.current},ve.createElement("span",{onClick:Xe},ve.createElement("i",{className:"icon-quxiaozhiding"}))),wt&&ve.createElement(je.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>be.current},ve.createElement("span",{className:"",onClick:()=>{const et=document.getElementById("pdfiframe");window.addEventListener("message",lt,!1),setTimeout(()=>{et.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(je.Z,{title:"\u5173\u95ED",getPopupContainer:()=>be.current},ve.createElement("span",{className:"",onClick:()=>{dt()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${tt[_e]} ${_e} ${tt.monaco} ${Ce==="txt"?"show":"hide"}`},Ce==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(pe.ZP,$e({},ot)))),Ce==="audio"&&ve.createElement("audio",{src:`${(ze==null?void 0:ze.indexOf("http://"))>-1||(ze==null?void 0:ze.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ze}`,autoPlay:!0}),Ce==="video"&&ve.createElement(ve.Fragment,null,(ze==null?void 0:ze.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${ze}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ze}`,autoPlay:!0})),Ce==="office"&&He&&ve.createElement("iframe",{src:`${ft}/office.html?key=${He.key}&url=${btoa(He.url)}&callbackUrl=${vn+(He.callbackUrl||"")}&fileType=${He.fileType}&title=${He.title||""}&model=${ut}&officeServer=${he.Z.ONLYOFFICE}&disabledDownload=${!!Ft}`}),Ce==="html"&&ve.createElement("iframe",{src:ze+"&disposition=inline"}),Ce==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${ft}/js/pdf/index.html?filename=${Ke||"educoder.pdf"}&url=${encodeURIComponent(ze)}&disabledDownload=${!!Ft}&model=${ut}`}),Ce==="image"&&ve.createElement("img",{src:`${(ze==null?void 0:ze.indexOf("http://"))>-1||(ze==null?void 0:ze.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ze}`}),(Ce==="other"||Ce==="download")&&ve.createElement(ve.Fragment,null,Rt?ve.createElement(Se.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(We.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ue,disabled:Ft},"\u4E0B\u8F7D")}):ve.createElement(We.ZP,{type:"primary",size:"middle",onClick:Ue,disabled:Ft},ve.createElement(Je.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ce==="flowChart"&&ve.createElement("div",{className:"embed"},ve.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${ze||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},95097:function(Ut,Qt,fe){"use strict";fe.d(Qt,{z:function(){return ot},Z:function(){return _e}});var te=fe(59301),tt=fe(48850),We=fe(49142),Je=fe(64018),pe=fe(80360),je=fe(74128),Fe=fe(65862),Ye=fe(15342),Se=fe(44104),he=fe(7939),Ee=fe(1012),ve=fe(52918),rt=fe(59301),Ae=({html:nt})=>{const Ze=(0,te.useRef)(null),dt=(0,te.useRef)(null),pn=`.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,te.useEffect)(()=>{const Ft=Ze.current.attachShadow({mode:"open"});dt.current=document.createElement("div"),dt.current.className="markdown-body",dt.current.innerHTML=nt,Ft.appendChild(dt.current);const bn=document.createElement("style");return bn.textContent=pn,Ft.appendChild(bn),()=>{Ft.innerHTML=""}},[]),(0,te.useEffect)(()=>{dt.current&&(dt.current.innerHTML=nt)},[nt]),rt.createElement("div",{ref:Ze})};function Pe(nt){const Ze=["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"],dt=new RegExp(`\\b(${Ze.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return nt.replace(dt,"").trim()}var we={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},$e=Object.defineProperty,at=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ze=(nt,Ze,dt)=>Ze in nt?$e(nt,Ze,{enumerable:!0,configurable:!0,writable:!0,value:dt}):nt[Ze]=dt,wt=(nt,Ze)=>{for(var dt in Ze||(Ze={}))ct.call(Ze,dt)&&ze(nt,dt,Ze[dt]);if(at)for(var dt of at(Ze))ut.call(Ze,dt)&&ze(nt,dt,Ze[dt]);return nt};const pt="@\u2581\u2581@",sn="@\u2581@",Ce=/<pre[^>]*>/g;function Ke(nt){let Ze=document.createElement("div");return Ze.innerHTML=nt,Ze.childNodes.length===0?"":Ze.childNodes[0].nodeValue}const ot=(nt,Ze)=>{nt=nt||"";const dt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ft=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,bn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ze?nt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(dt,(Rt,me,de,Ct,on,Bt,He)=>{const it=me||Ct||Bt,ft=de||on||He||"?";return je.Z.API_SERVER+"/api/attachments/"+it+ft+"&t="+(0,Fe.Jn)(it,Date.now())+(Rt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(nt=nt.replace(bn,(Rt,me,de,Ct,on,Bt,He)=>{const it=me||Ct||Bt,ft=de||on||He||"?";return je.Z.API_SERVER+"/attachments/download/"+it+ft+"&t="+(0,Fe.Jn)(it,Date.now())+(Rt.indexOf(")")>-1?")":"&")}).replace(dt,(Rt,me,de,Ct,on,Bt,He)=>{const it=me||Ct||Bt,ft=de||on||He||"?";return je.Z.API_SERVER+"/api/attachments/"+it+ft+"&t="+(0,Fe.Jn)(it,Date.now())+(Rt.indexOf(")")>-1?")":"&")}).replace(pn,(Rt,me,de,Ct,on)=>{const Bt=me||Ct,He=de||on||"";return'"'+je.Z.API_SERVER+"/api/attachments/"+Bt+He+Bt+He+"&t="+(0,Fe.Jn)(Bt,Date.now())}).replace(Ft,(Rt,me,de,Ct,on)=>{const Bt=me||Ct,He=de||on||"";return"("+je.Z.API_SERVER+"/files/uploads/"+Bt+He+Bt+He+"&t="+(0,Fe.Jn)(Bt,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,`
`),nt)};var _e=({value:nt="",edit:Ze=!1,className:dt,showTextOnly:pn,showLines:Ft,style:bn={},stylesPrev:Rt={},highlightKeywords:me,showProgramFill:de,isProgramFill:Ct,disabledFill:on=!1,programFillValue:Bt,openEditor:He=()=>{},onFillChange:it=Pt=>{},onFillBlur:ft=()=>{},onFillFocus:vn=()=>{}})=>{let Pt=Pe(String(nt||""));const Me=(0,te.useRef)(),be=(0,te.useRef)(),[Re,lt]=(0,te.useState)(""),[Le,Ue]=(0,te.useState)("office"),[Xe,et]=(0,te.useState)([]),gt=(0,te.useRef)("a"+(0,Ee.Z)()),xt={},Dt=Oe=>/<style[\s\S]*?>/i.test(Oe||""),Nt=(Oe,$t,_t)=>{const Gt=document.createElement(Oe===sn?"input":"textarea");Gt.style.width="100%",Gt.style.height=Oe===sn?"40px":"151px",Gt.rows=5,Gt.spellcheck=!1,Gt.name="edu-program-fill",Gt.placeholder="\u8BF7\u8F93\u5165",Gt.dataset.id=$t;const xn=Object.keys(xt).length;return xt[xn]=Gt,`<span class="edu-program-fill-wrap ${Oe===sn?"":"show"}" style="width:${Oe===sn?"600px":"100%"}" title=${_t||""}><span>${Gt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function gn(Oe){return Oe=Oe.replace(/!\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(/\[.*?\]\(.*?\)/g,""),Oe=Oe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Oe=Oe.replace(/<embed.*?>/g,""),Oe=Oe.replace(/<img.*?>/g,""),Oe=Oe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Oe=Oe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Oe=Oe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Oe=Oe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Oe}const Jt=Oe=>!pn&&Dt(Pt)?Oe:Oe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function($t,_t){let Gt=_t.replace(/(\n|\r)/g,"").split("}"),xn=[];return Gt.map(Zn=>{Zn!=""&&xn.push(`.${gt.current} ${Zn}`)}),`<style>${xn.join("}")}</style>`}),le=(0,te.useMemo)(()=>{try{const Gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,xn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Zn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,jt=/\(\/attachments\/download\//g;Pt=Pt.replace(jt,"("+je.Z.API_SERVER+"/attachments/download/").replace(Gt,"("+je.Z.API_SERVER+"/api/attachments/").replace(xn,'"'+je.Z.API_SERVER+"/api/attachments/").replace(Zn,'"'+je.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Me.current.style.display="none"}catch(Gt){}if(de){let Gt=-1;return Pt=Pt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(xn,Zn,jt){var Rn;return++Gt,Nt(xn,Gt,(Rn=Bt==null?void 0:Bt[Gt])==null?void 0:Rn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Jt(Pt||"")}</pre>`}let Oe=Jt(Pt);Oe=(0,We.ZP)(Oe);const $t=(0,We.ez)();Pt.match(/\[TOC\]/)&&(Oe=Oe.replace("<p>[TOC]</p>",(0,We.Qv)()),(0,We.Iy)()),Oe=Oe.replace(/(__special_katext_id_\d+__)/g,(Gt,xn)=>{const{type:Zn,expression:jt}=$t[xn];return(0,Ye.renderToString)(Ke(jt)||"",{displayMode:Zn==="block",throwOnError:!1,output:"html"})}),Oe=Oe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,We.AL)();const _t=document.createElement("div");if(_t.innerHTML=Oe,pn)return _t.innerText;if(me){const Gt=me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ue(_t,Gt),_t.innerHTML}return setTimeout(()=>vt(),500),_t.innerHTML},[Pt,me]);(0,te.useEffect)(()=>{ie.current&&ie.current.querySelectorAll(["input","textarea"]).forEach($t=>{$t.oninput=ne,$t.onblur=ee,$t.onfocus=oe})},[Xe]),(0,te.useEffect)(()=>{var Oe,$t,_t,Gt,xn;if(Bt!=null&&Bt.length)try{const Zn=ie.current.querySelectorAll(".edu-program-fill-score"),jt=ie.current.querySelectorAll('[name="edu-program-fill"]');for(const[Rn,Ei]of jt.entries())Ei.value=((Oe=Bt==null?void 0:Bt[Rn])==null?void 0:Oe.value)||"",(($t=Bt==null?void 0:Bt[Rn])==null?void 0:$t.type)==="warning"?Ei.className="program-fill-warning":((_t=Bt==null?void 0:Bt[Rn])==null?void 0:_t.type)==="success"?Ei.className="program-fill-success":Ei.className="";for(const[Rn,Ei]of Zn.entries())Ei.innerHTML=(Gt=Bt==null?void 0:Bt[Rn])!=null&&Gt.score?`${(xn=Bt==null?void 0:Bt[Rn])==null?void 0:xn.score}\u5206`:"";et(Bt)}catch(Zn){console.log(Zn,"error")}},[Bt]);const ne=Oe=>{Xe[Oe.target.dataset.id]=Xe[Oe.target.dataset.id]||{},Xe[Oe.target.dataset.id].value=Oe.target.value,et([...Xe]),it(Xe,Oe.target.dataset.id)},ee=Oe=>{Xe[Oe.target.dataset.id]=Xe[Oe.target.dataset.id]||{},Xe[Oe.target.dataset.id].value=Oe.target.value,et([...Xe]),ft(Xe,Oe.target.dataset.id)},oe=Oe=>{Xe[Oe.target.dataset.id]=Xe[Oe.target.dataset.id]||{},Xe[Oe.target.dataset.id].value=Oe.target.value,et([...Xe]),vn(Xe,Oe.target.dataset.id)};function ue(Oe,$t){return Oe.childNodes.forEach(_t=>{var Gt;if(_t.childNodes.length>0)ue(_t,$t);else if(_t.nodeName!=="IMG")if(_t.innerHTML)_t.innerHTML=(Gt=_t.innerHTML)==null?void 0:Gt.replace(new RegExp($t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const xn=document.createElement("span");xn.innerHTML=_t.textContent.replace(new RegExp($t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),_t.replaceWith(xn)}})}const ie=(0,te.useRef)();We.jb.WebkitLineClamp=Ft,Ft&&(bn=wt(wt({},bn),We.jb));function ye(Oe){let $t=Oe.target;if($t.tagName.toUpperCase()==="A"){let _t=$t.getAttribute("href");if(_t.indexOf("office")>-1)Oe.preventDefault(),lt(_t),Ue("office");else if(_t.indexOf("application/pdf")>-1)Oe.preventDefault(),lt(_t),Ue("pdf");else if(_t.indexOf("text/html")>-1)Oe.preventDefault(),lt(_t),Ue("html");else if(_t.startsWith("#")){Oe.preventDefault();let Gt=document.getElementById(_t.replace("#",""));Gt&&Gt.scrollIntoView(!0)}}}const vt=()=>{var Oe;const $t=(Oe=ie.current)==null?void 0:Oe.querySelectorAll("video");$t==null||$t.forEach(_t=>{if(_t.oncontextmenu=()=>!1,_t.src.indexOf(".m3u8")>-1&&!_t.canPlayType("application/vnd.apple.mpegurl")){if(pe.ZP.isSupported()){var Gt=new pe.ZP;Gt.loadSource(_t.src),Gt.attachMedia(_t)}}})};(0,te.useEffect)(()=>{if(ie.current&&le&&le.match(Ce)&&window.PR.prettyPrint(),ie.current)return ie.current.addEventListener("click",ye),()=>{var Oe;(Oe=ie.current)==null||Oe.removeEventListener("click",ye),(0,We.AL)(),(0,We.Iy)()}},[le,ie.current,ye]);const yt=Oe=>{Oe.target.nodeName==="IMG"&&Oe.target.className.indexOf("draw-flowchart")>-1?(Me.current.style.zIndex=1,Me.current.style.display="flex",Me.current.style.width=Oe.target.clientWidth+"px",Me.current.style.height=Oe.target.clientHeight+"px",Me.current.style.top=Oe.target.offsetTop+"px",Me.current.style.left=Oe.target.offsetLeft+"px",Oe.target.id&&(be.current=Oe.target.id)):Me.current.style.display="none"},kt=()=>{Me.current.style.display="none"};return(0,te.useEffect)(()=>{var Oe;const $t=_t=>{_t.preventDefault(),_t.clipboardData.setData("text",window.getSelection().toString())};return(Oe=ie.current)==null||Oe.addEventListener("copy",$t),()=>{var _t;(_t=ie.current)==null||_t.removeEventListener("copy",$t)}},[ie.current]),te.createElement("div",{style:{position:"relative"},onMouseLeave:kt},pn&&te.createElement("div",{ref:ie,className:`${we.mdBody} `},le),!pn&&!Dt(le)&&te.createElement("div",{ref:ie,style:wt({},bn),onMouseOver:yt,className:`${dt||""} ${on?"disabled-fill":""} markdown-body ${we.mdBody} ${gt.current}`,dangerouslySetInnerHTML:{__html:le}}),!pn&&Dt(le)&&te.createElement(Ae,{html:le}),te.createElement("div",{ref:Me,className:`${we.button} ${Ze?"":we.previewFlowChart}`},te.createElement(Se.Z,null,te.createElement(he.ZP,{onClick:()=>{Ze?He(be.current):(lt(be.current),Ue("flowChart"))}},Ze?"\u7F16\u8F91":"\u9884\u89C8"))),te.createElement(ve.Z,{close:!0,data:Re,type:Re!=null&&Re.length?Le:"",style:wt({},Rt),onClose:()=>lt("")}))}},60537:function(Ut,Qt,fe){"use strict";fe.d(Qt,{h:function(){return ut},Z:function(){return ct}});var te=fe(59301),tt=fe(82326),We=fe(28284),Je=fe(7939),pe=fe(89780),je=fe.n(pe),Fe=fe(45559),Ye=Object.defineProperty,Se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Ve=(ze,wt,pt)=>wt in ze?Ye(ze,wt,{enumerable:!0,configurable:!0,writable:!0,value:pt}):ze[wt]=pt,Ae=(ze,wt)=>{for(var pt in wt||(wt={}))ve.call(wt,pt)&&Ve(ze,pt,wt[pt]);if(Ee)for(var pt of Ee(wt))rt.call(wt,pt)&&Ve(ze,pt,wt[pt]);return ze},Pe=(ze,wt)=>Se(ze,he(wt));const we=tt.default.Option,$e={labelCol:{span:4},wrapperCol:{span:20}},at={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var ct=({callback:ze,onCancel:wt})=>{const[pt,sn]=(0,te.useState)("python");function Ce(ot){sn(at[ot][1])}function Ke(ot){ze(ot)}return te.createElement(We.default,Pe(Ae({},$e),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ke,style:{width:500}}),te.createElement(We.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},te.createElement(tt.default,{getPopupContainer:ot=>ot.parentNode,onChange:Ce},Object.keys(at).map(ot=>te.createElement(we,{key:ot,value:ot},at[ot][0])))),te.createElement(We.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},te.createElement(ut,{mode:pt})),te.createElement("div",{className:"flex-container flex-end"},te.createElement(Je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Je.ZP,{type:"ghost",onClick:wt},"\u53D6\u6D88")))};function ut({value:ze,onChange:wt,mode:pt,options:sn={}}){const Ce=(0,te.useRef)(),[Ke,ot]=(0,te.useState)();return(0,te.useEffect)(()=>{if(Ke){let _e=function(nt){const Ze=nt.getValue();wt&&wt(Ze)};return Ke.on("change",_e),()=>{Ke.off("change",_e)}}},[Ke,wt]),(0,te.useEffect)(()=>{Ke&&Ke.setOption("mode",pt)},[Ke,pt]),(0,te.useEffect)(()=>{Ke&&(ze!==Ke.getValue()||ze==="")&&setTimeout(()=>{Ke.setValue(ze||"")},300)},[Ke,ze]),(0,te.useEffect)(()=>{if(Ce.current&&!Ke){const _e=je().fromTextArea(Ce.current,Ae({mode:pt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},sn));ot(_e)}},[Ce.current,Ke]),te.createElement("div",{className:"my-codemirror-container"},te.createElement("textarea",{ref:Ce}))}},25374:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return Ni}});var te=fe(59301),tt=fe(65582),We=fe(89780),Je=fe.n(We),pe=fe(76374),je=fe(45559),Fe=fe(6313),Ye=fe(25717),Se=fe(99498),he=fe(25419),Ee=fe(67549),ve=fe(95097),rt=({value:en="",className:Ln,showTextOnly:Yn,showLines:Dn,style:pi={}})=>{const mi=(0,te.useMemo)(()=>"",[en]);return te.createElement(te.Fragment,null,te.createElement("div",{dangerouslySetInnerHTML:{__html:mi}}))},Ve=Object.defineProperty,Ae=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ct=(en,Ln,Yn)=>Ln in en?Ve(en,Ln,{enumerable:!0,configurable:!0,writable:!0,value:Yn}):en[Ln]=Yn,ut=(en,Ln)=>{for(var Yn in Ln||(Ln={}))$e.call(Ln,Yn)&&ct(en,Yn,Ln[Yn]);if(we)for(var Yn of we(Ln))at.call(Ln,Yn)&&ct(en,Yn,Ln[Yn]);return en},ze=(en,Ln)=>Ae(en,Pe(Ln));let wt=[{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 pt({onActionCallback:en,title:Ln,icon:Yn,actionName:Dn,className:pi="",children:mi}){function Ti(){en(Dn)}return te.createElement("a",{title:Ln,className:pi,onClick:Ti},te.createElement("i",{className:`${Yn}`}),mi)}var sn=({watch:en,showNullButton:Ln,showNullProgramButton:Yn,onActionCallback:Dn,fullScreen:pi,insertTemp:mi,hidetoolBar:Ti,extraUse:ui})=>{const oi=[...wt,{title:`${en?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${en?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return te.createElement("ul",{className:"markdown-toolbar-container"},!Ti&&oi.map((Ci,Yt)=>te.createElement("li",{key:Yt},Ci.actionName?te.createElement(pt,ze(ut({},Ci),{onActionCallback:Dn})):te.createElement("span",{className:"v-line"}))),Ln?te.createElement("li",null,te.createElement(pt,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Dn},te.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Yn?te.createElement(te.Fragment,null,te.createElement("li",null,te.createElement(pt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Dn},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),te.createElement("li",null,te.createElement(pt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Dn},te.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,mi&&te.createElement("li",null,te.createElement(pt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${mi}`,onActionCallback:Dn},te.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ui&&te.createElement("li",null,ui),te.createElement("li",{className:"btn-full-screen"},te.createElement(pt,{icon:`${pi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:pi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Dn})))},Ce=fe(57261),Ke=fe(28284),ot=fe(37568),_e=fe(7939),nt=Object.defineProperty,Ze=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,pn=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Rt=(en,Ln,Yn)=>Ln in en?nt(en,Ln,{enumerable:!0,configurable:!0,writable:!0,value:Yn}):en[Ln]=Yn,me=(en,Ln)=>{for(var Yn in Ln||(Ln={}))Ft.call(Ln,Yn)&&Rt(en,Yn,Ln[Yn]);if(pn)for(var Yn of pn(Ln))bn.call(Ln,Yn)&&Rt(en,Yn,Ln[Yn]);return en},de=(en,Ln)=>Ze(en,dt(Ln));const Ct={labelCol:{span:4},wrapperCol:{span:20}};var on=({callback:en,onCancel:Ln})=>{function Yn(Dn){en(Dn)}return te.createElement(Ke.default,de(me({},Ct),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Yn,style:{width:500}}),te.createElement(Ke.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},te.createElement(ot.default,null)),te.createElement(Ke.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},te.createElement(ot.default,null)),te.createElement("div",{className:"flex-container flex-end"},te.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(_e.ZP,{type:"ghost",onClick:Ln},"\u53D6\u6D88")))},Bt=fe(60537),He=fe(45053),it=fe(62957),ft=fe(77019),vn=fe(53464),Pt=fe(59301),Me=({callback:en,onCancel:Ln})=>{const Yn=document.createElement("canvas"),Dn=Yn.getContext("2d");Yn.width=1e3,Yn.height=800,Dn.fillStyle="#ffffff",Dn.fillRect(0,0,Yn.width,Yn.height);const pi=Yn.toDataURL("image/png");return Pt.createElement(it.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Pt.createElement(ft.Z,{style:{height:"100vh"}},Pt.createElement(vn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:pi,visible:!0,title:String(Date.now())},onOk:mi=>{en({src:mi.url})},onClose:Ln})))},be=fe(30641),Re=fe(5269),lt=fe(6767),Le={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},Ue=fe(59301),et=(0,te.forwardRef)(({onCancel:en,editImgId:Ln,callback:Yn},Dn)=>{let pi=(0,te.useRef)(),mi=(0,te.useRef)(),Ti=(0,te.useRef)(),ui=(0,te.useRef)(!1);const oi=(0,te.useRef)(!1);console.log("ref:",Dn);const[Ci,Yt]=(0,te.useState)(0),[st,un]=(0,te.useState)("100vh");return(0,te.useEffect)(()=>{Yt(1)},[]),(0,te.useImperativeHandle)(Dn,()=>({setHeight:un})),Ue.createElement("div",{ref:oi,className:"body-overflow-initial"},Ue.createElement(be.Z,{width:"100vw",height:st,footer:null,closable:!0,placement:"bottom",open:!!Ci,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Le.drawerWrap}`,onClose:()=>{window.saveDrawData(Gn=>{Yn({src:`/api/attachments/${Gn}`,id:Gn})})},title:Ue.createElement(ft.Z,{align:"middle"},Ue.createElement(Re.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ue.createElement(Re.Z,{onClick:()=>{un(st==="60px"?"100vh":"60px")}},Ue.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),Ue.createElement(Re.Z,{onClick:()=>{window.saveDrawData(Gn=>{if(Gn===null){lt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}lt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Yn({src:`/api/attachments/${Gn}`,id:Gn,disabledClose:!0})})}},Ue.createElement(_e.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},Ue.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Ln||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:mi})))}),gt=fe(74128),xt=fe(47889),Dt=fe(71051);const Nt=xt.ZP.Group,gn={margin:"0 8px"};var Jt=({callback:en,onCancel:Ln})=>{function Yn(Dn){en(Dn)}return te.createElement(Ke.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Yn},te.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},te.createElement("span",{style:gn},"\u5355\u5143\u683C\u6570\uFF1A"),te.createElement("span",{style:gn},"\u884C\u6570"),te.createElement(Ke.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},te.createElement(Dt.Z,null)),te.createElement("span",{style:gn},"\u5217\u6570"),te.createElement(Ke.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},te.createElement(Dt.Z,null))),te.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},te.createElement("span",{style:gn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),te.createElement(Ke.default.Item,{name:"align"},te.createElement(Nt,null,te.createElement(xt.ZP,{value:"default"},te.createElement("i",{className:"fa fa-align-justify"})),te.createElement(xt.ZP,{value:"left"},te.createElement("i",{className:"fa fa-align-left"})),te.createElement(xt.ZP,{value:"center"},te.createElement("i",{className:"fa fa-align-center"})),te.createElement(xt.ZP,{value:"right"},te.createElement("i",{className:"fa fa-align-right"}))))),te.createElement("div",{className:"flex-container flex-end"},te.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(_e.ZP,{type:"ghost",onClick:Ln},"\u53D6\u6D88")))},le=fe(71411),ne=fe(93510),ee=fe.n(ne),ue=(0,te.forwardRef)(({use3d:en,width:Ln,height:Yn,callback:Dn,showSaveButton:pi},mi)=>{const Ti=(0,te.useRef)(),ui=(0,te.useRef)(),[oi,Ci]=(0,te.useState)(!1),Yt=(0,te.useRef)({id:Ti,appName:"graphing",width:Ln||1e3,height:Yn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,te.useEffect)(()=>{ui.current=new(ee())(Yt.current,!0),window.onload=function(){ui.current.inject("applet_container")}},[]);const st=()=>{var un=window.ggbApplet.getPNGBase64(1,!0,72);return Dn&&Dn(un),un};return(0,te.useEffect)(()=>{Yt.current.appName=oi?"3D":"graphing",ui.current.inject("applet_container")},[oi]),(0,te.useEffect)(()=>{Ci(en)},[en]),(0,te.useImperativeHandle)(mi,()=>({getImgData:st})),te.createElement(te.Fragment,null,te.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Ti}),te.createElement(ft.Z,{align:"middle"},te.createElement(Re.Z,{flex:1},te.createElement(le.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:oi,onChange:un=>Ci(un)})),te.createElement(Re.Z,null,te.createElement(_e.ZP,{size:"large",onClick:st,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ie=fe(99298);const ye="link",vt="upload-image",yt="add-flowchart",kt="draw-image",Oe="add-flowchart",$t="code-block",_t="add-table",Gt="------------",xn={default:Gt,left:`:${Gt}`,center:`:${Gt}:`,right:`${Gt}:`};var Zn=fe(31103),jt=fe(65862);function Rn(){}let Ei=0;const si=1e4,ki="\u2581",gi="@\u2581\u2581@",Ai="@\u2581@",Bi=`
**\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`,ri=["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 Si(en){return/^\d+$/.test(en)?`${en}px`:en}const ti=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",vi={[ti+"-B"]:"bold",[ti+"-I"]:"italic"},wi={[ye]:"\u6DFB\u52A0\u94FE\u63A5",[$t]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[vt]:"\u6DFB\u52A0\u56FE\u7247",[kt]:"\u6DFB\u52A0\u753B\u56FE",[yt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[_t]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ni=({defaultValue:en="",onChange:Ln,width:Yn="100%",height:Dn=400,miniToolbar:pi=!1,isFocus:mi=!1,watch:Ti,insertTemp:ui,mode:oi="markdown",id:Ci="markdown-editor-id",showResizeBar:Yt=!1,noStorage:st=!1,showNullButton:un=!1,showNullProgramButton:Gn=!1,hidetoolBar:di=!1,fullScreen:De=!1,onBlur:Ne,onCMBeforeChange:It,onFullScreen:Et,className:Ge="",disablePaste:At=!1,disabled:tn=!1,disabledFill:qt=!1,placeholder:cn="",values:Kt="",extraUse:dn,onAddBlank:Mt})=>{const[mt,hn]=(0,te.useState)(null),[Te,Ie]=(0,te.useState)(en),[ge,St]=(0,te.useState)(Ti),[Bn,rn]=(0,te.useState)(De),[bt,ht]=(0,te.useState)(""),[ke,nn]=(0,te.useState)(0),[En,Pn]=(0,te.useState)(Dn),[jn,Qn]=(0,te.useState)(!1),[an,Nn]=(0,te.useState)(0),[qn,Vn]=(0,te.useState)(0),Xt=(0,te.useRef)(),wn=(0,te.useRef)(),Fn=(0,te.useRef)(),Wn=(0,te.useRef)(),zn=(0,te.useRef)(),Hn=(0,te.useRef)(),Un=(0,tt.useDispatch)();(0,te.useEffect)(()=>{const Wt=window.scrollY||window.pageYOffset;Ie(Kt),mt==null||mt.setValue(Kt),window.scrollTo(0,Wt)},[Kt]),(0,te.useEffect)(()=>{Et==null||Et(Bn)},[Bn]),(0,te.useEffect)(()=>{if(Xt.current){let Wt=function(mn,yn){var $n;if(At){yn.preventDefault();return}const Pi=yn.clipboardData;if(Pi){const bi=Pi.types.toString(),_i=Pi.items;if(bi==="Files"||Pi.types.indexOf("Files")>-1){if(yn.preventDefault(),oi=="stex")return;try{let Ii=_i[1];(($n=_i[0])==null?void 0:$n.kind)==="file"&&(Ii=_i[0]);const Ri=Ii.getAsFile(),ji=Ri.name.split(".").pop();(0,He.I)(Ri,zi=>{var Zi,qi,gr;zi.id?((Zi=Ri==null?void 0:Ri.type)==null?void 0:Zi.indexOf("image"))>-1?Ht.replaceSelection(`<img width="100%" src="/api/attachments/${zi.id}?type=${zi.content_type})" alt="" />`):((qi=Ri==null?void 0:Ri.type)==null?void 0:qi.indexOf("video"))>-1?Ht.replaceSelection(`<video width="100%" controls src="/api/attachments/${zi.id}"></video>`):((gr=Ri==null?void 0:Ri.type)==null?void 0:gr.indexOf("pdf"))>-1?Ht.replaceSelection(`<a href="/api/attachments/${zi.id}?type=${Ri.type}&disposition=inline" target="_blank">${Ri.name}</a>`):ri.includes(ji)?Ht.replaceSelection(`<a href="/api/attachments/${zi.id}?type=office&disposition=inline" target="_blank">${Ri.name}</a>`):Ht.replaceSelection(`[${Ri.name}](/api/attachments/${zi.id}?type=${zi.content_type})`):(zi==null?void 0:zi.status)===401&&(document.location.href="/user/login")})}catch(Ii){lt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ht=Je().fromTextArea(Xt.current,{mode:oi,lineNumbers:!pi,lineWrapping:!0,value:en,autoCloseTags:!0,autoCloseBrackets:!0});return Ht.on("keyup",function(mn,yn){yn.keyCode===8&&(mn.getValue()==""?Ht.setOption("placeholder",cn):Ht.setOption("placeholder",null))}),Ht.on("keydown",function(mn,yn){if(yn.keyCode===8){var $n=Tn(mn);$n&&yn.preventDefault()}}),mi&&Ht.focus(),Ht.on("paste",Wt),tn&&Ht.on("beforeChange",function(mn,yn){(yn.origin==="paste"||yn.origin==="+input")&&yn.cancel()}),hn(Ht),()=>{Ht.off("paste",Wt)}}},[]);const ni=(0,te.useCallback)(()=>{if(wn.current)try{}catch(Wt){console.log(Wt,"---- to set md editor body height")}},[En,wn,Bn]);(0,te.useEffect)(()=>{function Wt(){let Ht=new pe.Z(mn=>{for(let yn of mn)(yn.target.offsetHeight>0||yn.target.offsetWidth>0)&&(ni(),mt.setSize("100%","100%"),mt.refresh())});return Ht.observe(Xt.current.parentElement),Ht}if(mt){const Ht=Wt();return()=>{var mn,yn;(mn=Xt.current)!=null&&mn.parentElement&&Ht.unobserve((yn=Xt.current)==null?void 0:yn.parentElement)}}},[mt,ni]),(0,te.useEffect)(()=>{if(mt){let Wt=[];for(const[Ht,mn]of Object.entries(vi)){let yn={[Ht]:()=>{fi(mn)}};Wt.push(yn),mt.addKeyMap(yn)}return()=>{for(let Ht of Wt)mt.removeKeyMap(Ht)}}},[mt]),(0,te.useEffect)(()=>{De!==Bn&&rn(De)},[De]),(0,Zn.Z)(()=>{if(!st&&ke>0){let Wt=new Date().getTime(),Ht=window.sessionStorage.getItem(Ci);Wt>=ke+si&&(!Ht||Ht!==Te)&&(window.sessionStorage.setItem(Ci,Te),Qn(!0))}},si),(0,te.useEffect)(()=>{St(Ti)},[mt,Ti]),(0,te.useEffect)(()=>{mt&&mi&&mt.focus()},[mt,mi]),(0,te.useEffect)(()=>{if(ge&&mt){let Wt=function(mn){let yn=mn.target;if(Wn.current){let $n=yn.scrollTop/yn.scrollHeight;Wn.current.scrollTop=Wn.current.scrollHeight*$n}};const Ht=mt.getScrollerElement();return Ht.addEventListener("scroll",Wt),()=>{Ht.removeEventListener("scroll",Wt)}}},[mt,ge]),(0,te.useEffect)(()=>{if(mt&&It){let Wt=function(Ht,mn){It(Ht,mn)};return mt.on("beforeChange",Wt),()=>{mt.off("beforeChange",Wt)}}},[mt,It]),(0,te.useEffect)(()=>{if(mt&&Ne){let Wt=function(){Ne(mt.getValue())};return mt.on("blur",Wt),()=>{mt.off("blur",Wt)}}},[mt,Ne]);function Tn(Wt,Ht){var mn=Wt.getDoc(),yn=mn.getCursor(),$n=mn.getLine(yn.line),Pi=$n.charAt(yn.ch-1),bi=$n.lastIndexOf("@\u2581@",yn.ch),_i=$n.lastIndexOf("@\u2581\u2581@",yn.ch),Ii=bi>_i?bi:_i,Ri=bi>_i?3:4;if(gi.indexOf(Pi)===-1)return null;if(console.log("change1:",Ht,Wt,$n,yn,Ii,bi,_i,Pi),Ii>=0&&yn.ch-Ii<5){var ji=Ii+Ri;return mn.replaceRange("",{line:yn.line,ch:Ii},{line:yn.line,ch:ji}),{line:yn.line,ch:ji}}return null}(0,te.useEffect)(()=>{if(mt){let Wt=function(Ht,mn){const yn=Ht.getValue();Ie(yn),nn(new Date().getTime()),Ht.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ln&&(Gn?Ln(yn,zt(yn)):Ln(yn))};return mt.on("change",Wt),()=>{mt.off("change",Wt)}}},[mt,Ln]),(0,te.useEffect)(()=>{if(mt)if(en==null)mt.setValue(""),Ie("");else{const Wt=window.scrollY||window.pageYOffset;en!==mt.getValue()&&(mt.setValue(en),Ie(en),mt.setCursor(tn?1:mt.lineCount(),0),window.scrollTo(0,Wt))}},[mt,en]);const fi=(0,te.useCallback)(Wt=>{const Ht=mt.getCursor(),mn=mt.getSelection();let yn=mn.split(`
`);switch(Wt){case"bold":return mt.replaceSelection("**"+mn+"**"),mn===""&&mt.setCursor(Ht.line,Ht.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+mn+"*"),mn===""&&mt.setCursor(Ht.line,Ht.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+mn+"`"),mn===""&&mt.setCursor(Ht.line,Ht.ch+1),mt.focus();case"inline-latex":return(0,jt.Ye)(Un)?void 0:(ht("inline-latex"),mt.focus());case"latex":return mt.replaceSelection("```latex\n"+mn+"\n```"),mt.setCursor(Ht.line+1,mn.length+1),mt.focus();case"line-break":return mt.replaceSelection(`<br/>
`),mt.focus();case"list-ul":return mn===""?mt.replaceSelection("- "+mn):mt.replaceSelection(yn.map($n=>$n===""?"":`- ${$n}`).join(`
`)),mt.focus();case"list-ol":return mn===""?mt.replaceSelection("1. "+mn):mt.replaceSelection(yn.map(($n,Pi)=>$n===""?"":`${Pi+1}. ${$n}`).join(`
`)),mt.focus();case"add-null-ch":Mt==null||Mt();return;case"add-signal":return mn===""&&mt.setCursor(Ht.line,Ht.ch),mt.replaceSelection(Ai),mt.focus();case"add-multiple":return mn===""&&mt.setCursor(Ht.line,Ht.ch),mt.replaceSelection(gi),mt.focus();case"inster-template-1":return mn===""&&mt.setCursor(Ht.line,Ht.ch),mt.replaceSelection(Bi),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return St(!ge),mt.focus();case"trigger-full-screen":return rn(!Bn),mt.focus();case ye:ht(ye);return;case $t:ht($t);return;case vt:ht(vt);return;case kt:ht(kt);return;case"maths-latex":if((0,jt.Ye)(Un))return;ht("maths-latex");return;case yt:zn.current="",sessionStorage.removeItem("file_id"),ht(yt);return;case _t:ht(_t);return;default:throw new Error}},[mt,ge,Bn]),_n=(0,te.useCallback)((Wt,Ht)=>{var mn,yn,$n,Pi,bi,_i;Wt!=null&&Wt.disabledClose||ht("");const{src:Ii,alt:Ri,id:ji}=Wt||{};switch(bt){case ye:const{title:Ar,link:pr}=Wt;return mt.replaceSelection(`[${Ar}](${pr})`),mt.focus();case $t:const{language:lr,content:Wr}=Wt;return mt.replaceSelection(["```"+lr,Wr,"```"].join(`
`)),mt.focus();case"maths-latex":for(var zi=atob(Wt),Zi=new Uint8Array(zi.length),qi=0;qi<zi.length;qi++)Zi[qi]=zi.charCodeAt(qi);var gr=new Blob([Zi],{type:"image/png"});(0,He.I)(gr,yr=>{yr.id?mt.replaceSelection(`![,](/api/attachments/${yr.id}?type=${yr.content_type})`):(yr==null?void 0:yr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,jt.Ye)(Un))return;mt.replaceSelection("`$$"+Wt+"$$`");break;case Oe:if(!ji)return;mt.getValue().indexOf(Ii)===-1?mt.replaceSelection(`<center><img id="${ji}" width="80%" src="${Ii}" class="draw-flowchart" alt="${Ri||""}" /></center>`):document.getElementById(ji).src=gt.Z.API_SERVER+Ii+"?t="+Date.now();break;case vt:case kt:const Mi=Ht,jr=($n=(yn=(mn=Mi==null?void 0:Mi.name)==null?void 0:mn.split("."))==null?void 0:yn.pop)==null?void 0:$n.call(yn);return((Pi=Mi==null?void 0:Mi.type)==null?void 0:Pi.indexOf("image"))>-1||!(Mi!=null&&Mi.type)?Mi!=null&&Mi.align||Mi!=null&&Mi.width?mt.replaceSelection(`<p style="text-align:${Mi.align||"initial"}"><img width="${Mi.width?Mi.width+"%":"initial"}" src="${Ii}" alt="${Ri||""}" /></p>`):mt.replaceSelection(`<img width="100%" src="${Ii}" alt="${Ri||""}" />`):((bi=Mi==null?void 0:Mi.type)==null?void 0:bi.indexOf("video"))>-1?mt.replaceSelection(`<video width="100%" controls src="${Ii}"></video>`):((_i=Mi==null?void 0:Mi.type)==null?void 0:_i.indexOf("pdf"))>-1?mt.replaceSelection(`<a href="${Ii}?type=${Mi.type}&disposition=inline" target="_blank">${Mi.name}</a>`):ri.includes(jr)?mt.replaceSelection(`<a href="${Ii}?type=office&disposition=inline" target="_blank">${Mi.name}</a>`):mt.replaceSelection(`[${Mi.name}](${Ii})`),mt.focus();case _t:const{row:Xi,col:Cr,align:qr}=Wt;let Sr=`
`;for(let yr=0;yr<Xi;yr++){let sr=[],Wi=[];for(let rr=0;rr<Cr;rr++)yr===1&&Wi.push(xn[qr]),sr.push(" ");yr===1&&(Sr+=`| ${Wi.join(" | ")} |
`),Sr+=`| ${sr.join(Cr===1?"":" | ")} |
`}return mt.replaceSelection(Sr+`
`),mt.focus();default:throw new Error}},[mt,bt]),ln=(0,te.useMemo)(()=>{switch(bt){case ye:return te.createElement(on,{callback:_n,onCancel:Kn});case $t:return te.createElement(Bt.Z,{callback:_n,onCancel:Kn});case vt:return te.createElement(He.Z,{callback:_n,onCancel:Kn});case yt:return te.createElement(et,{editImgId:zn.current,callback:_n,onCancel:Kn});case _t:return te.createElement(Jt,{callback:_n,onCancel:Kn});case"maths-latex":return te.createElement(ue,{showSaveButton:!0,callback:_n});case"inline-latex":return te.createElement(ie.Z,{showSaveButton:!0,callback:_n});default:return null}},[bt]);function Kn(){ht("")}(0,te.useEffect)(()=>{if(Fn.current){let Wt=function(bi){$n=!0,Pi=bi.pageY},Ht=function(){$n=!1},mn=function(bi){if($n){let _i=bi.pageY-Pi;_i<0&&(_i=0),_i>300&&(_i=300);let Ii=Dn+_i+"px";Pn(Ii)}},yn=Fn.current,$n=!1,Pi=0;return yn.addEventListener("mousedown",Wt),document.addEventListener("mousemove",mn),document.addEventListener("mouseup",Ht),()=>{yn.removeEventListener("mousedown",Wt),document.removeEventListener("mousemove",mn),document.removeEventListener("mouseup",Ht)}}},[mt,Fn]),(0,te.useEffect)(()=>{Pn(Dn)},[Dn]);const Xn=Si(Yn),Li=Si(En),On={width:Xn,height:Li},Lt=(0,te.useMemo)(()=>{if(ke){let Wt=new Date(ke),Ht=Wt.getHours(),mn=Wt.getMinutes(),yn=Wt.getSeconds();return Ht=Ht<10?"0"+Ht:Ht,mn=mn<10?"0"+mn:mn,yn=yn<10?"0"+yn:yn,`${Ht}:${mn}:${yn}`}return 0},[ke]),zt=Wt=>{const Ht=[];if(Gn){let mn=-1;Wt=Wt.replace(/(@▁▁@|@▁@)/g,function(yn,$n,Pi){Ht.push({multiLine:yn!==Ai})})}return Ht};function Vt(){window.sessionStorage.removeItem(Ci),Qn(!1),nn(0)}function Ot(){Qn(!1),nn(0),mt.setValue(window.sessionStorage.getItem(Ci))}(0,te.useEffect)(()=>{wi[bt]&&bt!==kt&&bt!==yt&&setTimeout(()=>{const Wt=document.getElementsByClassName("markdown-popup-form")[0],Ht=window.innerWidth/2-Wt.offsetWidth/2,mn=window.innerHeight/2-Wt.offsetHeight/2;Nn(Ht),Vn(mn)},0)},[bt]);const kn=Wt=>{Wt.preventDefault();const Ht=Wt.clientX-an,mn=Wt.clientY-qn;document.body.onmousemove=yn=>{let $n=yn.clientX-Ht,Pi=yn.clientY-mn;const bi=document.getElementsByClassName("markdown-popup-form")[0],_i=window.innerWidth-bi.offsetWidth,Ii=window.innerHeight-bi.offsetHeight;$n=Math.max(0,Math.min($n,_i)),Pi=Math.max(0,Math.min(Pi,Ii)),li(yn.clientX,yn.clientY,Ht,mn)&&(Nn($n),Vn(Pi))},document.body.onmouseup=function(){document.body.onmousemove=null}},li=(Wt,Ht,mn,yn)=>{const $n=document.body.clientHeight,Pi=document.body.clientWidth;return Wt<20&&mn>Wt||Wt>Pi-20&&mn<Wt||Ht<20&&yn>Ht||Ht>$n-20&&yn<Ht?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return te.createElement(te.Fragment,null,te.createElement("div",{className:"markdown-editor-wrapper",ref:wn},te.createElement("div",{className:`markdown-editor-container ${Ge} ${ge?"on-preview":""} ${pi?"mini":""} ${Bn?"full-screen":""}`,style:On},te.createElement(sn,{insertTemp:ui,watch:ge,fullScreen:Bn,showNullButton:un,showNullProgramButton:Gn,onActionCallback:fi,hidetoolBar:di,extraUse:dn}),te.createElement("div",{className:"markdown-editor-body"},te.createElement("div",{className:"codemirror-container"},te.createElement("textarea",{ref:Xt,placeholder:cn})),ge?te.createElement("div",{ref:Wn,className:"preview-container"},oi==="stex"&&te.createElement(rt,{value:Te}),oi!=="stex"&&te.createElement(ve.Z,{edit:!0,disabledFill:qt,showProgramFill:Gn,value:Te,openEditor:Wt=>{var Ht;zn.current=Wt,(Ht=Hn.current)==null||Ht.setHeight("100vh"),setTimeout(()=>{ht("add-flowchart")},150)}})):null))),Yt?te.createElement("a",{ref:Fn,className:"editor-resize"}):null,bt===kt&&te.createElement(Me,{callback:_n,onCancel:Kn}),bt===yt&&te.createElement(et,{ref:Hn,editImgId:zn.current,callback:_n,onCancel:Kn}),te.createElement(Ce.Z,null,wi[bt]&&bt!==kt&&bt!==yt?te.createElement(it.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:an,top:qn},title:te.createElement("div",{style:{cursor:"move"},onMouseDown:kn},wi[bt]),open:!0,onCancel:Kn,footer:null,destroyOnClose:!0,width:bt===yt?"1200px":null,height:bt===yt?"80vh":null,className:"markdown-popup-form"},ln):null))}},45053:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return wt},I:function(){return sn}});var te=fe(28284),tt=fe(6767),We=fe(37568),Je=fe(44104),pe=fe(71051),je=fe(47889),Fe=fe(7939),Ye=fe(28735),Se=fe(59301),he=fe(59301),Ee=Object.defineProperty,ve=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,we=(Ce,Ke,ot)=>Ke in Ce?Ee(Ce,Ke,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Ce[Ke]=ot,$e=(Ce,Ke)=>{for(var ot in Ke||(Ke={}))Ae.call(Ke,ot)&&we(Ce,ot,Ke[ot]);if(Ve)for(var ot of Ve(Ke))Pe.call(Ke,ot)&&we(Ce,ot,Ke[ot]);return Ce},at=(Ce,Ke)=>ve(Ce,rt(Ke));const{useForm:ct}=te.default,ut={width:280,marginRight:10},ze={labelCol:{span:5},wrapperCol:{span:19}};var wt=({callback:Ce,onCancel:Ke})=>{const[ot]=ct();let _e=(0,Se.useRef)();function nt(pn){_e.current.width=ot.getFieldValue("width"),_e.current.align=ot.getFieldValue("align"),Ce(pn,_e.current)}function Ze(pn,Ft){if(pn.status===-1){tt.ZP.error(pn.message);return}ot.setFieldsValue({src:`/api/attachments/${pn.id}`,type:Ft.type})}function dt(pn){let Ft=pn.target.files[0];_e.current=Ft,sn(Ft,Ze)}return he.createElement(te.default,at($e({form:ot},ze),{className:"upload-image-panel",onFinish:nt,style:{width:470,overflow:"hidden"}}),he.createElement(te.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},he.createElement("div",{className:"flex-container"},he.createElement(te.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},he.createElement(We.default,{style:ut})),he.createElement(pt,{onFileChange:dt}))),he.createElement(te.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},he.createElement(We.default,{style:{width:264}})),he.createElement(te.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},he.createElement(Je.Z,null,he.createElement(te.default.Item,{name:"width",style:{margin:0}},he.createElement(pe.Z,{style:{width:264}})),he.createElement("span",{className:"ml8"},"%"))),he.createElement(te.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},he.createElement(je.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),he.createElement("aside",null,he.createElement(te.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},he.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),he.createElement(Fe.ZP,{type:"default",onClick:Ke},"\u53D6\u6D88"))))};function pt({onFileChange:Ce}){return he.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",he.createElement("input",{type:"file",onChange:Ce}))}function sn(Ce,Ke){if(!Ce)throw new String("\u6CA1\u6709\u6587\u4EF6");let ot=new FormData;ot.append("editormd-image-file",Ce),ot.append("file_param_name","editormd-image-file"),ot.append("byxhr","true");var _e=new window.XMLHttpRequest;_e.withCredentials=!0,_e.addEventListener("load",function(nt){Ke(JSON.parse(nt.target.responseText),Ce)},!1),_e.addEventListener("error",function(nt){console.error(nt)},!1),_e.open("POST",`${Ye.KI}/api/attachments.json`),_e.send(ot)}},57261:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return We}});var te=fe(59301),tt=fe(4676);class We extends te.Component{constructor(pe){super(pe);const je=window.document;this.node=je.createElement("div"),je.body.appendChild(this.node)}render(){const{children:pe}=this.props;return(0,tt.createPortal)(pe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},50258:function(Ut,Qt,fe){"use strict";fe.d(Qt,{SV:function(){return Me},ZP:function(){return Pt}});var te=fe(59301),tt=fe(76374);const We={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"]},Je={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"]},pe={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std",content:["using namespace std"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},je={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},Fe={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 Ye=fe(53184),Se=fe.n(Ye),he=(be,Re,lt)=>new Promise((Le,Ue)=>{var Xe=xt=>{try{gt(lt.next(xt))}catch(Dt){Ue(Dt)}},et=xt=>{try{gt(lt.throw(xt))}catch(Dt){Ue(Dt)}},gt=xt=>xt.done?Le(xt.value):Promise.resolve(xt.value).then(Xe,et);gt((lt=lt.apply(be,Re)).next())});const Ee={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=(be,Re,lt,Le)=>{const Ue=Re.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:lt.lineNumber,endColumn:lt.column});return Array.from(new Set(Ue.match(/\b\w{2,}\b/g)||[])).map(et=>({label:et,kind:be.languages.CompletionItemKind.Text,insertText:et,range:Le}))},rt=(be,Re,lt,Le)=>{be.languages.registerCompletionItemProvider(Re,{provideCompletionItems(Ue,Xe){const et=Ue.getWordUntilPosition(Xe),gt={startLineNumber:Xe.lineNumber,endLineNumber:Xe.lineNumber,startColumn:et.startColumn,endColumn:et.endColumn},xt=Ue.getLineContent(Xe.lineNumber).substring(et.startColumn-2,et.endColumn);return{suggestions:[...ve(be,Ue,Xe,gt),...lt.map(Nt=>({label:Nt,kind:be.languages.CompletionItemKind.Keyword,documentation:Nt,insertText:Nt,insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:gt})),...Le.map(Nt=>({label:Nt.label,kind:be.languages.CompletionItemKind.Snippet,documentation:Nt.content,insertText:xt.startsWith("#")?Nt.content.replace(/#/,""):Nt.content,insertTextRules:be.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:gt}))]}}})};var Ve=be=>{Ee.languages.forEach(Re=>{be.languages.registerDocumentFormattingEditProvider(Re,{provideDocumentFormattingEdits(lt){return he(this,null,function*(){const Le=Se()(lt.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:lt.getFullModelRange(),text:Le}]})}})}),rt(be,"java",Je.keywords,Je.quickKey),rt(be,"cpp",pe.keywords,pe.quickKey),rt(be,"c",We.keywords,[]),rt(be,"python",je.keywords,je.quickKey),rt(be,"scala",Fe.keywords,Fe.quickKey)};const Ae="\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,we=(be,Re,lt)=>Re in be?Pe(be,Re,{enumerable:!0,configurable:!0,writable:!0,value:lt}):be[Re]=lt,$e=(be,Re,lt)=>we(be,typeof Re!="symbol"?Re+"":Re,lt);const at=class Os{constructor(Re,lt,Le){this.placeholder=Re,this.editor=lt,this.monaco=Le,lt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Os.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)}};$e(at,"ID","editor.widget.placeholderHint");var ut=at,ze=fe(96236),wt=fe(6767),pt=fe(25399),sn=fe(89392),Ce=fe(77254),Ke=fe(56102),ot=Object.defineProperty,_e=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,Ft=(be,Re,lt)=>Re in be?ot(be,Re,{enumerable:!0,configurable:!0,writable:!0,value:lt}):be[Re]=lt,bn=(be,Re)=>{for(var lt in Re||(Re={}))dt.call(Re,lt)&&Ft(be,lt,Re[lt]);if(Ze)for(var lt of Ze(Re))pn.call(Re,lt)&&Ft(be,lt,Re[lt]);return be},Rt=(be,Re)=>_e(be,nt(Re)),me=(be,Re)=>{var lt={};for(var Le in be)dt.call(be,Le)&&Re.indexOf(Le)<0&&(lt[Le]=be[Le]);if(be!=null&&Ze)for(var Le of Ze(be))Re.indexOf(Le)<0&&pn.call(be,Le)&&(lt[Le]=be[Le]);return lt},de=(be,Re,lt)=>new Promise((Le,Ue)=>{var Xe=xt=>{try{gt(lt.next(xt))}catch(Dt){Ue(Dt)}},et=xt=>{try{gt(lt.throw(xt))}catch(Dt){Ue(Dt)}},gt=xt=>xt.done?Le(xt.value):Promise.resolve(xt.value).then(Xe,et);gt((lt=lt.apply(be,Re)).next())});function Ct(be){return/^\d+$/.test(be)?`${be}px`:be}function on(){}let Bt=!1;const He={"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 it(be=[]){let Re=be;if(Array.isArray(be)){for(let lt=0;lt<be.length;lt++){let Le=He[be[lt]];if(Le)return Le}return Re[0]}return He[Re]||Re}let ft=null;const vn=()=>de(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(be){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",be)}});var Pt=be=>{var Re=be,{width:lt="100%",height:Le="100%",value:Ue,language:Xe="javascript",style:et={},options:gt={},overrideServices:xt={},theme:Dt="vs-dark",onEditBlur:Nt,isCopy:gn=!1,onSave:Jt,autoHeight:le=!1,forbidCopy:ne=!1,onChange:ee=on,editorDidMount:oe=on,onFocus:ue=on,onBreakPoint:ie=on,breakPointValue:ye=[],filename:vt="educoder.txt",errorLine:yt,errorContent:kt="",highlightLine:Oe,openBreakPoint:$t=!1,placeholder:_t="",showMiniMap:Gt=!0}=Re,xn=me(Re,["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 Zn=(0,te.useRef)(),jt=(0,te.useRef)({}),Rn=(0,te.useRef)(),Ei=(0,te.useRef)(),si=(0,te.useRef)([]),ki=(0,te.useRef)(!1),gi=(0,te.useRef)(),Ai=(0,te.useRef)(),Bi=(0,te.useRef)(!1),[ri,Si]=(0,te.useState)(!1);function yi(){let Yt;return Zn.current&&(Yt=new tt.Z(st=>{for(let un of st)(un.target.offsetHeight>0||un.target.offsetWidth>0)&&jt.current.instance.layout()}),Yt.observe(Zn.current)),Yt}function ti(){wt.ZP.warning({content:decodeURIComponent(Ae),key:"monaco-editor-tip"})}const vi=()=>{let Yt=jt.current.instance;if(Ue!=null&&Yt&&ri){const st=Yt.getModel();st&&Ue!==st.getValue()&&(Bt=!0,st.setValue(Ue),Yt.layout(),Bt=!1)}};(0,te.useEffect)(()=>{const Yt=Ce.Z.subscribe("formatDocument",st=>{var un;let Gn=jt.current.instance;(un=Gn==null?void 0:Gn.getAction)==null||un.call(Gn,"editor.action.formatDocument").run()});return window.updateMonacoValue=st=>{ee(st)},Yt},[]),(0,te.useEffect)(()=>{var Yt;let st=jt.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{vi()},500),Ue&&(Ue!=null&&Ue.length)&&((Yt=st==null?void 0:st.updateOptions)==null||Yt.call(st,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ue.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ue,ri,jt.current]),(0,te.useEffect)(()=>{if(yt&&jt.current&&jt.current.instance){let st=jt.current.instance;st.changeViewZones(function(un){var Gn=document.createElement("div");Gn.style.padding="10px 20px",Gn.style.width="calc(100% - 20px)",Gn.className="my-error-line-wrp",Gn.innerHTML=kt,un.addZone({afterLineNumber:yt||11,heightInLines:3,domNode:Gn})});var Yt={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}};st.addOverlayWidget(Yt),st.revealPositionInCenter({lineNumber:20,column:1})}},[yt,jt.current,ri]);const wi=(Yt="",st)=>{if(!Yt||Yt.trim()==="")return!0;const Gn=jt.current.instance.getModel().getLineTokens(st);let di=!1;for(let De=0;De<2;De++)Gn.getStandardTokenType(De)===1&&(di=!0);return di};(0,te.useEffect)(()=>{var Yt;const st=(Yt=jt.current)==null?void 0:Yt.instance;if(st&&ri&&ne){const un=st.onDidBlurEditorWidget(()=>{Bi.current=!1}),Gn=st.onDidFocusEditorText(()=>{Bi.current=!0});return()=>{un.dispose(),Gn.dispose()}}},[jt.current,ri,ne]),(0,te.useEffect)(()=>{var Yt;if((Yt=jt.current)!=null&&Yt.instance&&ri&&$t){let st=jt.current.instance,un=st.getModel();if(!un)return;(()=>{var Kt;let dn=[],Mt=[];const mt=un.getAllDecorations();for(let Te of mt)Te.options.className==="highlighted-line"&&(dn.push((Kt=Te==null?void 0:Te.range)==null?void 0:Kt.startLineNumber),Mt.push(Te==null?void 0:Te.id));if(Oe===dn[0])return;un.deltaDecorations(Mt,[]);const hn=un.getLineCount();Oe&&Oe<=hn&&(st.deltaDecorations([],[{range:new ft.Range(Oe,1,Oe,un.getLineMaxColumn(Oe)),options:{isWholeLine:!0,className:"highlighted-line"}}]),st.revealLineInCenter(Oe))})();const di=(Kt=!1)=>{var dn;let Mt=[],mt=[];const hn=un.getAllDecorations();for(let Te of hn)Te.options.linesDecorationsClassName==="breakpoints-select"&&(Mt.push((dn=Te==null?void 0:Te.range)==null?void 0:dn.startLineNumber),mt.push(Te==null?void 0:Te.id));if(Kt)return{lines:Mt,ids:mt};ie(Mt)},De=Kt=>de(void 0,null,function*(){let dn={range:new ft.Range(Kt,1,Kt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield un.deltaDecorations([],[dn]),di()}),Ne=Kt=>de(void 0,null,function*(){let dn=[];const Mt=st.getLineDecorations(Kt);for(let mt of Mt)mt.options.linesDecorationsClassName==="breakpoints-select"&&dn.push(mt.id);yield un.deltaDecorations(dn,[]),di()}),It=Kt=>{let dn=st.getLineDecorations(Kt);for(let Mt of dn)if(Mt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,sn.isEqual)(ye,di(!0).lines)){un.deltaDecorations(di(!0).ids,[]);const Kt=ye.map(dn=>({range:new ft.Range(dn,1,dn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));un.deltaDecorations([],Kt)}const Et=st.onDidChangeModelContent(Kt=>{let dn=st.getPosition();if(dn){let Mt=dn.lineNumber;clearTimeout(Ai.current),Ai.current=setTimeout(()=>{wi(un.getLineContent(Mt),Mt)?Ne(Mt):It(Mt)?(Ne(Mt),De(Mt)):di()},100)}}),Ge=st.onMouseDown(Kt=>{var dn,Mt,mt;if(Kt.target.detail&&((mt=(Mt=(dn=Kt.target)==null?void 0:dn.element)==null?void 0:Mt.className)!=null&&mt.includes("line-numbers"))){let hn=Kt.target.position.lineNumber;if(wi(un.getLineContent(hn),hn))return;It(hn)?Ne(hn):De(hn)}}),At=Kt=>{let dn={range:new ft.Range(Kt,1,Kt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};si.current=st.deltaDecorations(si.current,[dn])},tn=()=>{si.current=st.deltaDecorations(si.current,[])},qt=st.onMouseMove(Kt=>{var dn,Mt,mt;if(tn(),Kt.target.detail&&((mt=(Mt=(dn=Kt.target)==null?void 0:dn.element)==null?void 0:Mt.className)!=null&&mt.includes("line-numbers"))){let hn=Kt.target.position.lineNumber;if(wi(un.getLineContent(hn),hn))return;At(hn)}}),cn=st.onMouseLeave(()=>{tn()});return()=>{Et.dispose(),Ge.dispose(),qt.dispose(),cn.dispose()}}},[jt.current,ri,ye,Oe,$t,Xe]),(0,te.useEffect)(()=>{var Yt;(Yt=jt.current)!=null&&Yt.instance&&$t&&jt.current.instance.setPosition({lineNumber:0,column:0})},[Oe]);function Ni(){let Yt=jt.current.instance;if(Yt){const st=Yt.getSelection(),un=jt.current.pastePos||{},Gn=new ft.Range(un.startLineNumber||st.endLineNumber,un.startColumn||st.endColumn,un.endLineNumber||st.endLineNumber,un.endColumn||st.endColumn);setTimeout(()=>{Yt.executeEdits("",[{range:Gn,text:""}])},300)}}function en(Yt){(window.navigator.platform.match("Mac")?Yt.metaKey:Yt.ctrlKey)&&Yt.keyCode==83&&(Yt.preventDefault(),Jt())}const Ln=()=>{if(le&&jt.current.instance){const Yt=jt.current.instance.getContentHeight();oi(Yt<Le?Le:Yt)}else oi(Le)};function Yn(Yt){var st=document.createEvent("MouseEvents");st.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Yt.dispatchEvent(st)}const Dn=Yt=>{if(!Bi.current)return;const{keyCode:st,ctrlKey:un,metaKey:Gn,target:di,type:De}=Yt;return(De==="paste"||(st===67||st===86)&&(Gn||un))&&di.nodeName==="TEXTAREA"&&(ti(),Yt.preventDefault()),!1};function pi(Yt,st){var un=window.URL||window.webkitURL||window,Gn=new Blob([st]),di=document.createElementNS("http://www.w3.org/1999/xhtml","a");di.href=un.createObjectURL(Gn),di.download=Yt,Yn(di)}(0,te.useEffect)(()=>{Ln()},[Ln]),(0,te.useEffect)(()=>{Zn.current&&!ri&&Promise.all([fe.e(8909),fe.e(2460)]).then(fe.bind(fe,71448)).then(Yt=>{try{ft=Yt,jt.current.instance=ft.editor.create(Zn.current,{value:Ue,language:it(Xe),theme:Dt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Gt||!1}},xt);const st=jt.current.instance;let di=[...ze.BH._menuItems].find(Et=>Et[0]._debugName=="EditorContext")[1],De=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ne=(Et,Ge)=>{var At,tn;let qt=Et._first;do Ge.includes((tn=(At=qt.element)==null?void 0:At.command)==null?void 0:tn.id)&&Et._remove(qt);while(qt=qt.next)};if(oe(st,ft),setTimeout(()=>{Ln(),jt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{pi(vt||"educoder.txt",st.getValue())}})},500),jt.current.subscription=st.onDidChangeModelContent(Et=>{ki.current?clearTimeout(gi.current):(Ln(),ee(st.getValue(),Et)),gi.current=setTimeout(()=>{ki.current=!1},500)}),window.Monaco||Ve(ft,it(Xe)),ne&&(Ne(di,De),Zn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Dn),window.removeEventListener("paste",Dn),window.addEventListener("keydown",Dn),window.addEventListener("paste",Dn)),window.Monaco=ft,Nt&&st.onDidBlurEditorWidget(()=>{Nt(st.getValue())}),ue&&st.onDidFocusEditorText(()=>{ne&&vn(),ue(st.getValue())}),ne){vn();try{st.onDidPaste(Et=>{const Ge=st.getSelection(),At=jt.current.pastePos||{},tn=new ft.Range(At.startLineNumber||Ge.endLineNumber,At.startColumn||Ge.endColumn,At.endLineNumber||Ge.endLineNumber,At.endColumn||Ge.endColumn);st.executeEdits("",[{range:Et.range,text:""}])})}catch(Et){}}let It=yi();return _t&&typeof _t=="string"&&new ut(_t,st,ft),Si(!0),()=>{const Et=jt.current.instance;Et.dispose();const Ge=Et.getModel();Ge&&Ge.dispose(),jt.current.subscription&&jt.current.subscription.dispose(),It.unobserve(Zn.current)}}catch(st){}})},[]),(0,te.useEffect)(()=>{if(jt.current.instance&&ri)return document.addEventListener("keydown",en,!1),()=>{document.removeEventListener("keydown",en)}},[Jt,ri]),(0,te.useEffect)(()=>{let Yt=jt.current.instance;if(Yt&&ri){let st=it(Xe);ft.editor.setModelLanguage(Yt.getModel(),st)}},[Xe,ri]),(0,te.useEffect)(()=>{jt.current.instance&&ri&&ft.editor.setTheme(Dt)},[Dt,ri]),(0,te.useEffect)(()=>{let Yt=jt.current.instance;Rn.current=gt,Yt&&ri&&(Yt.updateOptions(bn({},gt)),setTimeout(()=>{Yt.getModel().updateOptions(bn({},gt))},200))},[JSON.stringify(gt),ri]),(0,te.useEffect)(()=>{let Yt=jt.current.instance;Yt&&ri&&Yt.layout()},[lt,Le,ri]);const[mi,Ti]=(0,te.useState)(Ct(lt)),[ui,oi]=(0,te.useState)(Ct(Le)),Ci=Rt(bn({},et),{width:mi,height:ui,position:"relative"});return te.createElement("div",{className:"my-monaco-editor",ref:Zn,style:Ci,onFocus:()=>{ne&&vn()}},gn&&te.createElement(Ke.CopyToClipboard,{text:Ue,onCopy:()=>wt.ZP.success("\u590D\u5236\u6210\u529F")},te.createElement(pt.Z,{title:"\u590D\u5236\u4EE3\u7801"},te.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},te.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Me({width:be="100%",height:Re="100%",original:lt,modified:Le,language:Ue,options:Xe={}}){const et=(0,te.useRef)(),[gt,xt]=(0,te.useState)(null);function Dt(le){let ne;return et.current&&(ne=new tt.Z(ee=>{for(let oe of ee)(oe.target.offsetHeight>0||oe.target.offsetWidth>0)&&le.layout()}),ne.observe(et.current)),ne}(0,te.useEffect)(()=>(et.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(le=>{ft=le;const ne=ft.editor.createDiffEditor(et.current,Rt(bn({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},Xe),{wordWrap:!0}));xt(ne);let ee=Dt(ne);return()=>{ne.dispose();const oe=ne.getModel();oe&&oe.dispose(),ee.unobserve(et.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,te.useEffect)(()=>{gt&&gt.setModel({original:ft.editor.createModel(lt,Ue),modified:ft.editor.createModel(Le,Ue)})},[lt,Le,Ue,gt]);const Nt=Ct(be),gn=Ct(Re),Jt={width:Nt,height:gn};return te.createElement("div",{className:"my-diff-editor",ref:et,style:Jt})}},31103:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return tt}});var te=fe(59301);function tt(We,Je){const pe=(0,te.useRef)();(0,te.useEffect)(()=>{pe.current=We}),(0,te.useEffect)(()=>{function je(){pe.current()}if(Je!==null){let Fe=setInterval(je,Je);return()=>clearInterval(Fe)}},[Je])}},35924:function(Ut,Qt,fe){"use strict";fe.r(Qt),fe.d(Qt,{default:function(){return hn}});var te=fe(59301),tt=fe(65582),We=fe(93041),Je=fe(24404),pe=fe(28284),je=fe(6767),Fe=fe(37285),Ye=fe(91882),Se=fe(77019),he=fe(5269),Ee=fe(25399),ve=fe(37568),rt=fe(7939),Ve=fe(32134),Ae=fe(43150),Pe=fe(62957),we=fe(62673),$e=fe(71051),at=fe(87513),ct=fe(25374),ut=fe(95097),ze={flex_box_center:"flex_box_center___T9vjl",flex_space_between:"flex_space_between___zZP1J",flex_box_vertical_center:"flex_box_vertical_center___vbIhw",flex_box_center_end:"flex_box_center_end___SjRau",flex_box_column:"flex_box_column___Ic_zi",wrap:"wrap___GtXAk",modal:"modal___mDuC3",titleWrap:"titleWrap___EzCZh",required:"required___KgfdI",title:"title___TMgfc",colorGray:"colorGray___xNVTs",choiceWrap:"choiceWrap___Rv9ug",answer:"answer___hVpls",activeAnswer:"activeAnswer___oJoq9",deleteIcon:"deleteIcon___bkn4b",addIcon:"addIcon___S2pDY",editorWrap:"editorWrap___BOx_r",htmlWrap:"htmlWrap___ERVlQ",radio:"radio___lrt5b",color333:"color333___pz3OT",color999:"color999___jtQ7e",questionType:"questionType___qUnUb",questionChoices:"questionChoices___n36qp"},wt=Object.defineProperty,pt=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Ke=(Te,Ie,ge)=>Ie in Te?wt(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,ot=(Te,Ie)=>{for(var ge in Ie||(Ie={}))sn.call(Ie,ge)&&Ke(Te,ge,Ie[ge]);if(pt)for(var ge of pt(Ie))Ce.call(Ie,ge)&&Ke(Te,ge,Ie[ge]);return Te},_e=(Te,Ie)=>{var ge={};for(var St in Te)sn.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&pt)for(var St of pt(Te))Ie.indexOf(St)<0&&Ce.call(Te,St)&&(ge[St]=Te[St]);return ge},nt=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const Ze=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],dt=(Te,Ie)=>{var ge=Te,{problemset:St,globalSetting:Bn,loading:rn,dispatch:bt,onRef:ht=()=>{},editData:ke}=ge,nn=_e(ge,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[En,Pn]=(0,te.useState)([]),[jn,Qn]=(0,te.useState)(),[an,Nn]=(0,te.useState)([]),[qn,Vn]=(0,te.useState)(""),[Xt,wn]=(0,te.useState)(5),[Fn,Wn]=(0,te.useState)(!1),zn=(0,tt.useParams)();(0,te.useEffect)(()=>{Pn(["","","",""])},[]),(0,te.useEffect)(()=>{if(!(ke!=null&&ke.question_choices)){Wn(!0);return}Vn(ke==null?void 0:ke.question_title),wn(parseInt(ke==null?void 0:ke.question_score)),Pn(ke==null?void 0:ke.question_choices.map(ln=>ln.choice_text));const _n=[];ke==null||ke.standard_answer.map((ln,Kn)=>{_n.push(ln-1)}),Nn(_n)},[ke]),(0,te.useImperativeHandle)(Ie,()=>({onSave:Hn,isEdit:Fn}));const Hn=()=>nt(void 0,null,function*(){if(!qn)return je.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const _n=En.findIndex(Xn=>!Xn);if(_n>-1)return je.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Ze[_n]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!an.length)return je.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(an.length<1)return je.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const ln=En.map((Xn,Li)=>({choice_text:Xn,is_answer:an.includes(Li)?Li+1:0}));let Kn;ke.question_id?Kn=yield bt({type:"exercise/editExerciseQuestion",payload:{id:ke.question_id,question_title:qn,question_type:1,question_score:"5.0",question_choices:ln.map(Xn=>Xn.choice_text),standard_answers:ln.filter(Xn=>Xn.is_answer).map(Xn=>Xn.is_answer)}}):Kn=yield bt({type:"exercise/addExerciseQuestion",payload:{categoryId:zn.categoryId,question_title:qn,question_type:1,question_score:"5.0",question_choices:ln.map(Xn=>Xn.choice_text),standard_answers:ln.filter(Xn=>Xn.is_answer).map(Xn=>Xn.is_answer)}}),Kn.status===0&&(je.ZP.success("\u4FDD\u5B58\u6210\u529F"),Wn(!1),bt({type:"exercise/editExercise",payload:ot({},zn)}))}),Un=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],ni=_n=>nt(void 0,null,function*(){switch(_n.id){case"del":let ln;Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return nt(this,null,function*(){yield(0,at.Fl)({id:ke.question_id}),bt({type:"exercise/editExercise",payload:ot({},zn)})})}});break;case"up":case"down":yield bt({type:"exercise/exeriseMoveUpDown",payload:{id:ke.question_id,opr:_n.id}}),bt({type:"exercise/editExercise",payload:ot({},zn)});break;case"edit":Wn(!0);break}}),Tn=()=>{var _n;return te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},ke.key,"\u3001\u591A\u9009\u9898"),"\uFF08",ke.question_score,"\u5206\uFF09"),!ke.hideAction&&Un.map(function(ln,Kn){return ln.id==="up"&&ke.key===1||ln.id==="down"&&ke.key===ke.len?null:te.createElement(Ee.Z,{key:Kn,placement:"bottom",title:ln.name},te.createElement("span",{onClick:()=>ni(ln),className:ln.icon}))})),te.createElement("div",{className:"mt5"},te.createElement(ut.Z,{value:ke.question_title})),te.createElement("div",{className:ze.questionChoices},(_n=ke==null?void 0:ke.question_choices)==null?void 0:_n.map(function(ln,Kn){return te.createElement(Se.Z,null,te.createElement(he.Z,null,te.createElement(we.default,{key:Kn,checked:ke.standard_answer.includes(Kn+1),disabled:!0},Ze[Kn],".")),te.createElement(he.Z,{flex:"1"},te.createElement("span",{className:"c-black font14"},te.createElement(ut.Z,{value:ln.choice_text}))))})))},fi=()=>te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),te.createElement("p",{className:ze.titleWrap},te.createElement("span",{className:ze.required},"*"),te.createElement("span",{className:ze.title},"\u9898\u5E72\uFF1A")),te.createElement(ct.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:qn,onChange:_n=>Vn(_n)}),En.map((_n,ln)=>te.createElement("div",{className:ze.choiceWrap,key:ln},te.createElement(Ee.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},te.createElement("div",{className:`${ze.answer} ${an.includes(ln)?ze.activeAnswer:""}`,onClick:()=>{an.includes(ln)?Nn(an.filter(Kn=>Kn!==ln)):Nn([...an,ln])}},Ze[ln])),te.createElement("div",{className:ze.editorWrap},jn===ln?te.createElement(ct.Z,{id:`single-question-option-${ln}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:_n,onChange:Kn=>{En[ln]=Kn,Pn(En)}}):te.createElement("div",{className:ze.htmlWrap,onClick:()=>Qn(ln)},te.createElement(ut.Z,{value:_n}))),ln>1&&te.createElement(Ee.Z,{title:"\u5220\u9664"},te.createElement("i",{className:`${ze.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>Pn(En.filter((Kn,Xn)=>Xn!==ln))})),ln<7&&ln===En.length-1&&te.createElement(Ee.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},te.createElement("i",{className:`${ze.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Pn([...En,""])})))),te.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement($e.Z,{value:Xt,max:1e4,min:-1,onChange:_n=>{wn(_n)}})," \u5206"),te.createElement("aside",{className:"tr"},ke.question_id&&te.createElement(rt.ZP,{type:"default",onClick:()=>Wn(!1)},"\u53D6\u6D88"),te.createElement(rt.ZP,{className:"ml20",type:"primary",onClick:()=>Hn()},"\u4FDD\u5B58")));return te.createElement("section",{className:ze.wrap},!Fn&&Tn(),Fn&&fi())};var pn=(0,tt.connect)(({problemset:Te,loading:Ie,globalSetting:ge})=>({problemset:Te,globalSetting:ge,loading:Ie.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(dt)),Ft=fe(47889),bn=Object.defineProperty,Rt=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Ct=(Te,Ie,ge)=>Ie in Te?bn(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,on=(Te,Ie)=>{for(var ge in Ie||(Ie={}))me.call(Ie,ge)&&Ct(Te,ge,Ie[ge]);if(Rt)for(var ge of Rt(Ie))de.call(Ie,ge)&&Ct(Te,ge,Ie[ge]);return Te},Bt=(Te,Ie)=>{var ge={};for(var St in Te)me.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&Rt)for(var St of Rt(Te))Ie.indexOf(St)<0&&de.call(Te,St)&&(ge[St]=Te[St]);return ge},He=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const it=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ft=(Te,Ie)=>{var ge=Te,{problemset:St,globalSetting:Bn,loading:rn,dispatch:bt,onRef:ht=()=>{},editData:ke}=ge,nn=Bt(ge,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[En,Pn]=(0,te.useState)([]),[jn,Qn]=(0,te.useState)(),[an,Nn]=(0,te.useState)([]),[qn,Vn]=(0,te.useState)(""),[Xt,wn]=(0,te.useState)(0),[Fn,Wn]=(0,te.useState)(!1),zn=(0,tt.useParams)();(0,te.useEffect)(()=>{Pn(["","","",""])},[]),(0,te.useEffect)(()=>{if(!(ke!=null&&ke.question_choices)){Wn(!0);return}Vn(ke==null?void 0:ke.question_title),wn(parseInt(ke==null?void 0:ke.question_score)),Pn(ke==null?void 0:ke.question_choices.map(ln=>ln.choice_text));const _n=[];ke==null||ke.standard_answer.map((ln,Kn)=>{_n.push(ln-1)}),Nn(_n)},[ke]),(0,te.useImperativeHandle)(Ie,()=>({onSave:Hn,isEdit:Fn}));const Hn=()=>He(void 0,null,function*(){if(!qn)return je.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const _n=En.findIndex(Xn=>!Xn);if(_n>-1)return je.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${it[_n]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!an.length)return je.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(an.length<1)return je.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const ln=En.map((Xn,Li)=>({choice_text:Xn,is_answer:an.includes(Li)?Li+1:0}));let Kn;ke.question_id?Kn=yield(0,Ae.Kc)({id:ke.question_id,question_title:qn,question_type:1,question_score:Xt,question_choices:ln.map(Xn=>Xn.choice_text),standard_answers:ln.filter(Xn=>Xn.is_answer).map(Xn=>Xn.is_answer)}):Kn=yield(0,Ae.iV)({exercise_bank_id:zn.topicId,question_title:qn,question_type:1,question_score:"5.0",question_choices:ln.map(Xn=>Xn.choice_text),standard_answers:ln.filter(Xn=>Xn.is_answer).map(Xn=>Xn.is_answer)}),Kn.status===0&&(je.ZP.success("\u4FDD\u5B58\u6210\u529F"),Wn(!1)),yield bt({type:"polls/getExerciseBanks",payload:on({},zn)})}),Un=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],ni=_n=>He(void 0,null,function*(){switch(_n.id){case"del":let ln;Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return He(this,null,function*(){yield(0,Ae.x$)({pollsId:ke.question_id}),bt({type:"polls/getExerciseBanks",payload:on({},zn)})})}});break;case"up":case"down":yield(0,Ae.W)({exerciseId:ke==null?void 0:ke.question_id,opr:_n.id}),bt({type:"polls/getExerciseBanks",payload:on({},zn)});break;case"edit":Wn(!0);break}}),Tn=()=>{var _n;return te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},ke.key,"\u3001\u5355\u9009\u9898"),"\uFF08",ke.question_score,"\u5206\uFF09"),!ke.hideAction&&Un.map(function(ln,Kn){return ln.id==="up"&&ke.key===1||ln.id==="down"&&ke.key===ke.len?null:te.createElement(Ee.Z,{key:Kn,placement:"bottom",title:ln.name},te.createElement("span",{onClick:()=>ni(ln),className:ln.icon}))})),te.createElement("div",{className:"mt5"},te.createElement(ut.Z,{value:ke.question_title})),te.createElement("div",{className:ze.questionChoices},(_n=ke==null?void 0:ke.question_choices)==null?void 0:_n.map(function(ln,Kn){return te.createElement(Se.Z,null,te.createElement(he.Z,null,te.createElement(Ft.ZP,{key:Kn,checked:ke.standard_answer.includes(Kn+1),disabled:!0},it[Kn],".")),te.createElement(he.Z,{flex:"1"},te.createElement("span",{className:"c-black font14"},te.createElement(ut.Z,{value:ln.choice_text}))))})))},fi=()=>te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),te.createElement("p",{className:ze.titleWrap},te.createElement("span",{className:ze.required},"*"),te.createElement("span",{className:ze.title},"\u9898\u5E72\uFF1A")),te.createElement(ct.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:qn,onChange:_n=>Vn(_n)}),En.map((_n,ln)=>te.createElement("div",{className:ze.choiceWrap,key:ln},te.createElement(Ee.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},te.createElement("div",{className:`${ze.answer} ${an.includes(ln)?ze.activeAnswer:""}`,onClick:()=>{an.includes(ln)?Nn(an.filter(Kn=>Kn!==ln)):Nn([...an,ln])}},it[ln])),te.createElement("div",{className:ze.editorWrap},jn===ln?te.createElement(ct.Z,{id:`single-question-option-${ln}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:_n,onChange:Kn=>{En[ln]=Kn,Pn(En)}}):te.createElement("div",{className:ze.htmlWrap,onClick:()=>Qn(ln)},te.createElement(ut.Z,{value:_n}))),ln>1&&te.createElement(Ee.Z,{title:"\u5220\u9664"},te.createElement("i",{className:`${ze.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>Pn(En.filter((Kn,Xn)=>Xn!==ln))})),ln<7&&ln===En.length-1&&te.createElement(Ee.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},te.createElement("i",{className:`${ze.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Pn([...En,""])})))),te.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement($e.Z,{value:Xt,max:1e4,min:-1,onChange:_n=>{wn(_n)}})," \u5206"),te.createElement("aside",{className:"tr"},ke.question_id&&te.createElement(rt.ZP,{type:"default",onClick:()=>Wn(!1)},"\u53D6\u6D88"),te.createElement(rt.ZP,{className:"ml20",type:"primary",onClick:()=>Hn()},"\u4FDD\u5B58")));return te.createElement("section",{className:ze.wrap},!Fn&&Tn(),Fn&&fi())};var vn=(0,tt.connect)(({problemset:Te,loading:Ie,globalSetting:ge})=>({problemset:Te,globalSetting:ge,loading:Ie.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(ft)),Pt=Object.defineProperty,Me=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,lt=(Te,Ie,ge)=>Ie in Te?Pt(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,Le=(Te,Ie)=>{for(var ge in Ie||(Ie={}))be.call(Ie,ge)&&lt(Te,ge,Ie[ge]);if(Me)for(var ge of Me(Ie))Re.call(Ie,ge)&&lt(Te,ge,Ie[ge]);return Te},Ue=(Te,Ie)=>{var ge={};for(var St in Te)be.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&Me)for(var St of Me(Te))Ie.indexOf(St)<0&&Re.call(Te,St)&&(ge[St]=Te[St]);return ge},Xe=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const et=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],gt=(Te,Ie)=>{var ge=Te,{problemset:St,globalSetting:Bn,loading:rn,dispatch:bt,onRef:ht=()=>{},editData:ke}=ge,nn=Ue(ge,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[En,Pn]=(0,te.useState)(),[jn,Qn]=(0,te.useState)(""),[an,Nn]=(0,te.useState)(!1),[qn,Vn]=(0,te.useState)(5),Xt=(0,tt.useParams)();(0,te.useEffect)(()=>{if(!(ke!=null&&ke.question_choices)){Nn(!0);return}Qn(ke==null?void 0:ke.question_title),Vn(ke==null?void 0:ke.question_score),Pn(ke.standard_answer[0]+"")},[ke]),(0,te.useImperativeHandle)(Ie,()=>({onSave:wn,isEdit:an}));const wn=()=>Xe(void 0,null,function*(){if(!jn)return je.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!En)return je.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;const Un=[{choice_text:"\u6B63\u786E",is_answer:En==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:En==="2"?2:0}];let ni;return ke.question_id?ni=yield(0,Ae.Kc)({id:ke.question_id,question_title:jn,question_type:2,question_score:qn,question_choices:Un.map(Tn=>Tn.choice_text),standard_answers:Un.filter(Tn=>Tn.is_answer).map(Tn=>Tn.is_answer)}):ni=yield(0,Ae.iV)({exercise_bank_id:Xt.topicId,question_title:jn,question_type:2,question_score:qn,question_choices:Un.map(Tn=>Tn.choice_text),standard_answers:Un.filter(Tn=>Tn.is_answer).map(Tn=>Tn.is_answer)}),ni.status===0&&(je.ZP.success("\u4FDD\u5B58\u6210\u529F"),Nn(!1)),bt({type:"polls/getExerciseBanks",payload:Le({},Xt)}),{name:jn,choices:Un}}),Fn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Wn=Un=>Xe(void 0,null,function*(){switch(Un.id){case"del":let ni;Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Xe(this,null,function*(){yield(0,Ae.x$)({pollsId:ke.question_id}),bt({type:"polls/getExerciseBanks",payload:Le({},Xt)})})}});break;case"up":case"down":yield(0,Ae.W)({exerciseId:ke==null?void 0:ke.question_id,opr:Un.id}),bt({type:"polls/getExerciseBanks",payload:Le({},Xt)});break;case"edit":Nn(!0);break}}),zn=()=>{var Un;return te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},ke.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",ke.question_score,"\u5206\uFF09"),!ke.hideAction&&Fn.map(function(ni,Tn){return ni.id==="up"&&ke.key===1||ni.id==="down"&&ke.key===ke.len?null:te.createElement(Ee.Z,{key:Tn,placement:"bottom",title:ni.name},te.createElement("span",{onClick:()=>Wn(ni),className:ni.icon}))})),te.createElement("div",{className:"mt5"},ke.question_title),te.createElement("div",{className:ze.questionChoices},(Un=ke==null?void 0:ke.question_choices)==null?void 0:Un.map(function(ni,Tn){return te.createElement(Ft.ZP,{key:Tn,checked:ke.standard_answer.includes(Tn+1),disabled:!0},et[Tn],". ",te.createElement("span",{className:"c-black font14"},ni.choice_text))})))},Hn=()=>te.createElement("aside",null,te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),te.createElement("p",{className:ze.titleWrap},te.createElement("span",{className:ze.required},"*"),te.createElement("span",{className:ze.title},"\u9898\u5E72\uFF1A")),te.createElement(ct.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:jn,onChange:Un=>Qn(Un)}),te.createElement("p",{className:ze.titleWrap},te.createElement("span",{className:ze.required},"*"),te.createElement("span",{className:ze.title},"\u7B54\u6848\u9009\u9879\uFF1A",te.createElement("span",{className:ze.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),te.createElement(Ft.ZP.Group,{buttonStyle:"solid",value:En,onChange:Un=>Pn(Un.target.value)},te.createElement(Ft.ZP.Button,{value:"1",className:`${ze.radio} mr40`},"\u6B63\u786E"),te.createElement(Ft.ZP.Button,{value:"2",className:ze.radio},"\u9519\u8BEF")),te.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement($e.Z,{value:qn,max:1e4,min:-1,onChange:Un=>{Vn(Un)}})," \u5206"),te.createElement("aside",{className:"tr"},ke.question_id&&te.createElement(rt.ZP,{type:"default",onClick:()=>Nn(!1)},"\u53D6\u6D88"),te.createElement(rt.ZP,{className:"ml20",type:"primary",onClick:()=>wn()},"\u4FDD\u5B58")));return te.createElement("section",{className:ze.wrap},!an&&zn(),an&&Hn())};var xt=(0,tt.connect)(({problemset:Te,loading:Ie,globalSetting:ge})=>({problemset:Te,globalSetting:ge,loading:Ie.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(gt)),Dt=fe(97805),Nt=fe(20633),gn=fe(65862),Jt=Object.defineProperty,le=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(Te,Ie,ge)=>Ie in Te?Jt(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,ue=(Te,Ie)=>{for(var ge in Ie||(Ie={}))ne.call(Ie,ge)&&oe(Te,ge,Ie[ge]);if(le)for(var ge of le(Ie))ee.call(Ie,ge)&&oe(Te,ge,Ie[ge]);return Te},ie=(Te,Ie)=>{var ge={};for(var St in Te)ne.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&le)for(var St of le(Te))Ie.indexOf(St)<0&&ee.call(Te,St)&&(ge[St]=Te[St]);return ge},ye=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const vt=null,yt=(Te,Ie)=>{var ge=Te,{problemset:St,globalSetting:Bn,loading:rn,dispatch:bt,editData:ht}=ge,ke=ie(ge,["problemset","globalSetting","loading","dispatch","editData"]);const[nn,En]=(0,te.useState)(""),[Pn,jn]=(0,te.useState)(""),[Qn,an]=(0,te.useState)([]),[Nn,qn]=(0,te.useState)(""),[Vn,Xt]=(0,te.useState)(),[wn,Fn]=(0,te.useState)(!1),[Wn,zn]=(0,te.useState)(5),[Hn,Un]=(0,te.useState)(!1),ni=(0,tt.useParams)();(0,te.useEffect)(()=>{if(!(ht!=null&&ht.question_title)){Un(!0);return}En(ht==null?void 0:ht.question_title),Xt(ht==null?void 0:ht.is_ordered),zn(ht==null?void 0:ht.question_score);const Vt=ht==null?void 0:ht.standard_answer.map(Ot=>Ot.answer_text);an(Vt)},[St.editData]),(0,te.useEffect)(()=>{Fn(!1)},[Hn]),(0,te.useImperativeHandle)(Ie,()=>({onSave:Tn,isEdit:Hn}));const Tn=()=>ye(void 0,null,function*(){let Vt=[],Ot=!1;if(Qn.forEach((li,Wt)=>{Vt.push({choice_id:Wt+1,answer_text:[]}),li.forEach((Ht,mn)=>{Vt[Wt].answer_text.push(Ht),(!Ht||!(0,gn.eR)(Ht,1e4))&&(qn(`${Wt}-${mn}`),je.ZP.info(Ht?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Ot=!0)})}),Ot)return!1;let kn;return ht.question_id?kn=yield(0,Ae.Kc)({id:ht.question_id,question_title:nn,question_type:3,question_score:Wn,is_ordered:Vn,standard_answers:Vt}):kn=yield(0,Ae.iV)({exercise_bank_id:ni.topicId,question_title:nn,question_type:3,question_score:Wn,is_ordered:Vn,standard_answers:Vt}),kn.status===0&&(je.ZP.success("\u4FDD\u5B58\u6210\u529F"),Un(!1)),bt({type:"polls/getExerciseBanks",payload:ue({},ni)}),{name:nn,analysis:Pn,standard_answers:Vt,is_ordered:Vn}}),fi=(Vt,Ot,kn)=>{const li=Qn.slice();if(Ot&&li.splice(Vt,Ot),kn&&wn)for(let Wt=0;Wt<kn;Wt++)li.splice(Vt+Wt,0,[""]);Fn(!0),an(li)},_n=(Vt,Ot,kn)=>{qn("");let li=Qn.slice();li[Vt][Ot]=kn,an(li)},ln=Vt=>{let Ot=Qn.slice();Ot[Vt]=[...Ot[Vt],""],an(Ot)},Kn=(Vt,Ot)=>{let kn=Qn.slice();if(!kn[Vt][Ot]){kn[Vt]=kn[Vt].filter((li,Wt)=>Wt!==Ot),an(kn);return}Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ze.modal,onOk:()=>{kn[Vt]=kn[Vt].filter((li,Wt)=>Wt!==Ot),an(kn)}})},Xn=Vt=>{Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:ze.modal,onOk:()=>{let Ot=Qn.slice();Ot=Qn.filter((kn,li)=>Vt!==li),an(Ot)}})},Li=()=>te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),te.createElement("div",null,te.createElement(Dt.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:nn,onChange:Vt=>En(Vt),showNullButton:!0,onPlaceholderChange:fi})),te.createElement("div",{className:"mt20"},Qn.map((Vt,Ot)=>te.createElement(Nt.Z,{key:Ot,answers:Vt,index:Ot,is_md:!0,activeOptionErrorIndex:Nn,onAnswerChange:_n,addChildAnswer:ln,deleteChildAnswer:Kn,deleteChildAnswermain:Xn}))),te.createElement("div",{className:"mt20"},Qn.length>1&&te.createElement("span",null,te.createElement(we.default,{checked:Vn,onChange:Vt=>Xt(Vt.target.checked),className:`${ze.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),te.createElement("span",{className:`${ze.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement($e.Z,{value:Wn,max:1e4,min:-1,onChange:Vt=>{zn(Vt)}})," \u5206"),te.createElement("aside",{className:"tr"},ht.question_id&&te.createElement(rt.ZP,{type:"default",onClick:()=>Un(!1)},"\u53D6\u6D88"),te.createElement(rt.ZP,{className:"ml20",type:"primary",onClick:()=>Tn()},"\u4FDD\u5B58"))),On=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Lt=Vt=>ye(void 0,null,function*(){switch(Vt.id){case"del":let Ot;Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return ye(this,null,function*(){yield(0,Ae.x$)({pollsId:ht.question_id}),bt({type:"polls/getExerciseBanks",payload:ue({},ni)})})}});break;case"up":case"down":yield(0,Ae.W)({exerciseId:ht==null?void 0:ht.question_id,opr:Vt.id}),bt({type:"polls/getExerciseBanks",payload:ue({},ni)});break;case"edit":Un(!0);break}}),zt=()=>{var Vt;return te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},ht.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",ht.question_score,"\u5206\uFF09"),!ht.hideAction&&On.map(function(Ot,kn){return Ot.id==="up"&&ht.key===1||Ot.id==="down"&&ht.key===ht.len?null:te.createElement(Ee.Z,{key:kn,placement:"bottom",title:Ot.name},te.createElement("span",{onClick:()=>Lt(Ot),className:Ot.icon}))})),te.createElement("div",{className:"mt5"},ht.question_title),te.createElement("div",{className:ze.questionChoices},(Vt=ht==null?void 0:ht.standard_answer)==null?void 0:Vt.map(function(Ot,kn){return te.createElement(Se.Z,null,te.createElement(he.Z,null,"\u7B54\u6848\uFF08\u586B\u7A7A",Ot.choice_id,"\uFF09\uFF1A"),te.createElement(he.Z,{flex:"1"},te.createElement(ve.default,{key:kn,checked:ht.standard_answer.includes(kn),disabled:!0,value:Ot.answer_text})))})))};return te.createElement("section",{className:ze.wrap},!Hn&&zt(),Hn&&Li())};var kt=(0,tt.connect)(({problemset:Te,loading:Ie,globalSetting:ge})=>({problemset:Te,globalSetting:ge,loading:Ie.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(yt)),Oe=Object.defineProperty,$t=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,xn=(Te,Ie,ge)=>Ie in Te?Oe(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,Zn=(Te,Ie)=>{for(var ge in Ie||(Ie={}))_t.call(Ie,ge)&&xn(Te,ge,Ie[ge]);if($t)for(var ge of $t(Ie))Gt.call(Ie,ge)&&xn(Te,ge,Ie[ge]);return Te},jt=(Te,Ie)=>{var ge={};for(var St in Te)_t.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&$t)for(var St of $t(Te))Ie.indexOf(St)<0&&Gt.call(Te,St)&&(ge[St]=Te[St]);return ge},Rn=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const Ei=null,si=(Te,Ie)=>{var ge=Te,{problemset:St,globalSetting:Bn,loading:rn,dispatch:bt,onRef:ht=()=>{},editData:ke}=ge,nn=jt(ge,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[En,Pn]=(0,te.useState)(""),[jn,Qn]=(0,te.useState)(""),[an,Nn]=(0,te.useState)(""),[qn,Vn]=(0,te.useState)(5),[Xt,wn]=(0,te.useState)(!1),Fn=(0,tt.useParams)();(0,te.useEffect)(()=>{var Tn;if(!(ke!=null&&ke.question_title)){wn(!0);return}Pn(ke==null?void 0:ke.question_title),Nn((Tn=ke==null?void 0:ke.standard_answer)==null?void 0:Tn[0]),Vn(ke==null?void 0:ke.question_score)},[St.editData]),(0,te.useImperativeHandle)(Ie,()=>({onSave:Wn,isEdit:Xt}));const Wn=()=>Rn(void 0,null,function*(){if(!En)return je.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;let Tn;return ke.question_id?Tn=yield(0,Ae.Kc)({id:ke.question_id,question_title:En,question_type:4,question_score:qn,standard_answers:[an]}):Tn=yield(0,Ae.iV)({exercise_bank_id:Fn.topicId,question_title:En,question_type:4,question_score:qn,standard_answers:[an]}),Tn.status===0&&(je.ZP.success("\u4FDD\u5B58\u6210\u529F"),wn(!1),bt({type:"polls/getExerciseBanks",payload:Zn({},Fn)})),{name:En,answer_texts:[an],analysis:jn}}),zn=()=>te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),te.createElement(ct.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:En,onChange:Tn=>Pn(Tn)}),te.createElement("p",{className:ze.titleWrap},te.createElement("span",{className:ze.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),te.createElement(ct.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:an,onChange:Tn=>Nn(Tn)}),te.createElement("p",{className:""},"\u5206\u503C\uFF1A",te.createElement($e.Z,{value:qn,max:1e4,min:-1,onChange:Tn=>{Vn(Tn)}})," \u5206"),te.createElement("aside",{className:"tr"},ke.question_id&&te.createElement(rt.ZP,{type:"default",onClick:()=>wn(!1)},"\u53D6\u6D88"),te.createElement(rt.ZP,{className:"ml20",type:"primary",onClick:()=>Wn()},"\u4FDD\u5B58"))),Hn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Un=Tn=>Rn(void 0,null,function*(){switch(Tn.id){case"del":let fi;Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Rn(this,null,function*(){yield(0,Ae.x$)({pollsId:ke.question_id}),bt({type:"polls/getExerciseBanks",payload:Zn({},Fn)})})}});break;case"up":case"down":yield(0,Ae.W)({exerciseId:ke==null?void 0:ke.question_id,opr:Tn.id}),bt({type:"polls/getExerciseBanks",payload:Zn({},Fn)});break;case"edit":wn(!0);break}}),ni=()=>te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},ke.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",ke.question_score,"\u5206\uFF09"),!ke.hideAction&&Hn.map(function(Tn,fi){return Tn.id==="up"&&ke.key===1||Tn.id==="down"&&ke.key===ke.len?null:te.createElement(Ee.Z,{key:fi,placement:"bottom",title:Tn.name},te.createElement("span",{onClick:()=>Un(Tn),className:Tn.icon}))})),te.createElement("div",{className:"mt5"},ke.question_title),te.createElement("div",{className:ze.questionChoices},te.createElement("p",null,te.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),te.createElement(ut.Z,{value:an})));return te.createElement("section",{className:ze.wrap},!Xt&&ni(),Xt&&zn())};var ki=(0,tt.connect)(({problemset:Te,loading:Ie,globalSetting:ge})=>({problemset:Te,globalSetting:ge,loading:Ie.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(si)),gi=Object.defineProperty,Ai=Object.getOwnPropertySymbols,Bi=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,Si=(Te,Ie,ge)=>Ie in Te?gi(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,yi=(Te,Ie)=>{for(var ge in Ie||(Ie={}))Bi.call(Ie,ge)&&Si(Te,ge,Ie[ge]);if(Ai)for(var ge of Ai(Ie))ri.call(Ie,ge)&&Si(Te,ge,Ie[ge]);return Te},ti=(Te,Ie)=>{var ge={};for(var St in Te)Bi.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&Ai)for(var St of Ai(Te))Ie.indexOf(St)<0&&ri.call(Te,St)&&(ge[St]=Te[St]);return ge},vi=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const wi=null,Ni=(Te,Ie)=>{var ge=Te,{problemset:St,globalSetting:Bn,loading:rn,dispatch:bt,editData:ht}=ge,ke=ti(ge,["problemset","globalSetting","loading","dispatch","editData"]);const[nn,En]=(0,te.useState)(""),[Pn,jn]=(0,te.useState)(""),[Qn,an]=(0,te.useState)(""),[Nn,qn]=(0,te.useState)([]),[Vn,Xt]=(0,te.useState)(""),[wn,Fn]=(0,te.useState)(),[Wn,zn]=(0,te.useState)(!1),[Hn,Un]=(0,te.useState)([]),[ni,Tn]=(0,te.useState)(!1),fi=(0,tt.useParams)();(0,te.useEffect)(()=>{var On;ht.edit&&Tn(!0),En(ht.shixun_name),jn(ht.question_title);const Lt=[];(On=ht.shixun)==null||On.map(zt=>{Lt.push(zt.challenge_score)}),Un(Lt)},[ht]),(0,te.useEffect)(()=>{zn(!1)},[ni]),(0,te.useImperativeHandle)(Ie,()=>({onSave:_n,isEdit:ni}));const _n=()=>vi(void 0,null,function*(){let On=[];if(!1)return!1;let zt;return ht.question_id?zt=yield(0,Ae.Kc)({id:ht.question_id,question_title:Pn,shixun_name:nn,shixun_id:ht.shixun_id,question_type:5,question_scores:Hn}):zt=yield(0,Ae.iV)({exercise_bank_id:fi.topicId,question_title:Pn,shixun_name:nn,shixun_id:ht.shixun_id,question_type:5,question_scores:Hn}),zt.status===0&&(je.ZP.success("\u4FDD\u5B58\u6210\u529F"),Tn(!1)),yield bt({type:"polls/getExerciseBanks",payload:yi({},fi)}),{name:Pn,analysis:Qn,standard_answers:On,is_ordered:wn}}),ln=()=>{var On;return te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),te.createElement("div",{className:"mt10"},te.createElement(ve.default,{defaultValue:nn,onChange:Lt=>{En(Lt.target.value)}})),te.createElement("div",{className:"mt10"},te.createElement(ct.Z,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:Pn,onChange:Lt=>{jn(Lt)}})),te.createElement("div",{className:"mt20"},(On=ht.shixun)==null?void 0:On.map((Lt,zt)=>te.createElement(Se.Z,{gutter:[20,20]},te.createElement(he.Z,{flex:"1"},zt+1,".",Lt.challenge_name),te.createElement(he.Z,null,te.createElement($e.Z,{defaultValue:Hn[zt],onChange:Vt=>{Hn[zt]=Vt,Un(Hn),console.log("srore:L",Hn[zt])}}))))),te.createElement("div",{className:"mt20"},Nn.length>1&&te.createElement("span",null,te.createElement(we.default,{checked:wn,onChange:Lt=>Fn(Lt.target.checked),className:`${ze.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),te.createElement("span",{className:`${ze.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),te.createElement("aside",{className:"tr"},!(ht!=null&&ht.edit)&&te.createElement(rt.ZP,{type:"default",onClick:()=>Tn(!1)},"\u53D6\u6D88"),te.createElement(rt.ZP,{className:"ml20",type:"primary",onClick:()=>_n()},"\u4FDD\u5B58")))},Kn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Xn=On=>vi(void 0,null,function*(){switch(On.id){case"del":let Lt;Pe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return vi(this,null,function*(){yield(0,Ae.x$)({pollsId:ht.question_id}),bt({type:"polls/getExerciseBanks",payload:yi({},fi)})})}});break;case"up":case"down":yield(0,Ae.W)({exerciseId:ht==null?void 0:ht.question_id,opr:On.id}),bt({type:"polls/getExerciseBanks",payload:yi({},fi)});break;case"edit":Tn(!0);break}}),Li=()=>{var On;return te.createElement("aside",null,te.createElement("div",{className:ze.questionType},te.createElement("div",null,te.createElement("span",{className:"font16 c-blue"},ht.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",ht.question_score,"\u5206\uFF09"),te.createElement("div",{className:"tr"},te.createElement(tt.Link,{target:"_blank",to:`/shixuns/${ht.shixun_identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),!ht.hideAction&&Kn.map(function(Lt,zt){return Lt.id==="up"&&ht.key===1||Lt.id==="down"&&ht.key===ht.len?null:te.createElement(Ee.Z,{key:zt,placement:"bottom",title:Lt.name},te.createElement("span",{onClick:()=>Xn(Lt),className:Lt.icon}))}))),te.createElement("div",{className:"font16"},ht.shixun_name),te.createElement("div",{className:"mt30"}),(On=ht.shixun)==null?void 0:On.map(function(Lt,zt){return te.createElement("div",{key:zt},"\u7B2C",zt+1,"\u5173 ",te.createElement("span",{className:"ml10"},Lt.challenge_name)," ",te.createElement("span",{className:"ml10"},Lt.challenge_score))}))};return te.createElement("section",{className:ze.wrap},!ni&&Li(),ni&&ln())};var en=(0,tt.connect)(({problemset:Te,loading:Ie,globalSetting:ge})=>({problemset:Te,globalSetting:ge,loading:Ie.effects}),null,null,{forwardRef:!0})((0,te.forwardRef)(Ni)),Ln=fe(30641),Yn=fe(13747),Dn={flex_box_center:"flex_box_center___hUmFx",flex_space_between:"flex_space_between___ZQWRF",flex_box_vertical_center:"flex_box_vertical_center___NvFWH",flex_box_center_end:"flex_box_center_end___VzfH9",flex_box_column:"flex_box_column___jzLHY",wrp:"wrp___tA5YW",drawer:"drawer___aMsAr",menu:"menu___EdF6h",actived:"actived___rUgO6",actived2:"actived2___ENpPA",listItem:"listItem___Ixzli",info:"info___KHkuz",title:"title___pDJPn",titleLeft:"titleLeft___UBBKz",titleRight:"titleRight___WrCz9",search:"search___AEwRm",description:"description___CYPQc",menuCourse:"menuCourse___gwZ0E"},pi=Object.defineProperty,mi=Object.getOwnPropertySymbols,Ti=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,oi=(Te,Ie,ge)=>Ie in Te?pi(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,Ci=(Te,Ie)=>{for(var ge in Ie||(Ie={}))Ti.call(Ie,ge)&&oi(Te,ge,Ie[ge]);if(mi)for(var ge of mi(Ie))ui.call(Ie,ge)&&oi(Te,ge,Ie[ge]);return Te},Yt=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const{Search:st}=ve.default,un=[{id:"type",name:"\u7B5B\u9009",children:[{name:"\u5168\u90E8\u5B9E\u8BAD",id:"all",type:"type"},{name:"\u6211\u7684\u5B9E\u8BAD",id:"mine",type:"type"}]},{id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]}],Gn=({classroomList:Te,loading:Ie,dispatch:ge,callback:St})=>{var Bn;const rn=(0,tt.useParams)(),bt=(0,tt.useLocation)(),{actionTabs:ht}=Te,[ke]=pe.default.useForm(),{shixunLists:nn}=Te,[En,Pn]=(0,te.useState)([]),[jn,Qn]=(0,te.useState)({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"publish_time",no_jupyter:1});return(0,te.useEffect)(()=>{ge({type:"classroomList/getShixunLists",payload:Ci({},jn)})},[rn.categoryId]),(0,te.useEffect)(()=>{Pn([])},[Te.actionTabs.key]),Te.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:te.createElement(Ln.Z,{title:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",placement:"bottom",height:"100%",closable:!1,open:Te.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",rootClassName:Dn.drawer,footer:te.createElement("div",{className:"tc"},te.createElement(rt.ZP,{size:"middle",onClick:()=>{ge({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8}},"\u53D6\u6D88"),te.createElement(rt.ZP,{size:"middle",onClick:()=>Yt(void 0,null,function*(){var an;En.length>1?je.ZP.error("\u53EA\u80FD\u9009\u62E9\u4E00\u4E2A\u5B9E\u8DF5\u9879\u76EE"):En.length===0?je.ZP.error("\u8BF7\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE"):(St&&St((an=nn==null?void 0:nn.shixun_list)==null?void 0:an.filter(Nn=>Nn.id===En[0])[0]),ge({type:"classroomList/setActionTabs",payload:{key:""}}))}),type:"primary"},"\u786E\u5B9A"))},te.createElement("section",{className:"tc"},te.createElement(st,{placeholder:"\u5B9E\u8BAD\u4FE1\u606F/\u9662\u6821\u540D\u79F0/\u521B\u5EFA\u8005",enterButton:"\u641C\u7D22",size:"middle",className:Dn.search,onSearch:an=>{jn.keyword=an,ge({type:"classroomList/getShixunLists",payload:Ci({},jn)})}})),te.createElement("section",{className:"edu-container"},un.map(function(an,Nn){var qn;return te.createElement("ul",{className:Dn.menu,key:Nn},te.createElement("li",null,an.name),(qn=an==null?void 0:an.children)==null?void 0:qn.map(function(Vn,Xt){return te.createElement("li",{key:Xt,className:jn[an.id]==Vn.id?Dn.actived:"",onClick:()=>{jn[an.id]=Vn.id,Qn(Ci({},jn)),ge({type:"classroomList/getShixunLists",payload:Ci({},jn)})}},te.createElement("strong",null,Vn.name))}))}),(Bn=nn==null?void 0:nn.shixun_list)==null?void 0:Bn.map(function(an,Nn){return te.createElement("div",{className:Dn.listItem,key:Nn},te.createElement(we.default,{checked:En.includes(an.id),value:an.id,onChange:qn=>{let Vn=En.indexOf(an.id);En.indexOf(an.id)>-1?Pn(En.filter(Xt=>Xt!==an.id)):Pn(En.concat(an.id))}}),te.createElement("div",{className:Dn.info},te.createElement("div",{className:Dn.title},te.createElement("div",{className:Dn.titleLeft},te.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:an.title}}))),te.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},te.createElement("span",{className:Dn.description,dangerouslySetInnerHTML:{__html:an.description}})),te.createElement("div",{className:" mt15"},an.challenge_names.map(function(qn,Vn){return te.createElement("span",{key:Vn,className:"mr30"},"\u7B2C",Vn+1,"\u5173 ",qn," ")})),te.createElement(Fe.Z,{dashed:!0}),te.createElement("div",{className:"c-light-black mt20"},te.createElement("span",null,an.author_name),te.createElement("span",{className:"ml15 mr15"},"|"),te.createElement("span",null,an.author_school_name),te.createElement("span",{className:"ml15 mr15"},"|"),te.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570:",an.level),te.createElement("span",{className:"ml15 mr15"},"|"),te.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570:"),te.createElement("span",null,an.study_count))))}),te.createElement("p",null)),te.createElement("div",{className:"tc"},te.createElement(Yn.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showQuickJumper:!0,total:nn==null?void 0:nn.shixuns_count,onChange:an=>{jn.page=an,Pn([]),ge({type:"classroomList/getShixunLists",payload:Ci({},jn)})}})))};var di=(0,tt.connect)(({classroomList:Te,loading:Ie})=>({classroomList:Te,loading:Ie}))(Gn),De={flex_box_center:"flex_box_center___SQWFF",flex_space_between:"flex_space_between___CnFKV",flex_box_vertical_center:"flex_box_vertical_center___pIPP9",flex_box_center_end:"flex_box_center_end___wiYA8",flex_box_column:"flex_box_column___elCPc",bg:"bg___EaPuT",containerTitle:"containerTitle___ixpkx",containerDesc:"containerDesc___r2R0u",listItem:"listItem___jvD98",info:"info___dCwGz",title:"title___UW6TT",titleLeft:"titleLeft___MquHc",titleRight:"titleRight___aWhE3",acitons:"acitons___yle7y"},Ne=Object.defineProperty,It=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,At=(Te,Ie,ge)=>Ie in Te?Ne(Te,Ie,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Te[Ie]=ge,tn=(Te,Ie)=>{for(var ge in Ie||(Ie={}))Et.call(Ie,ge)&&At(Te,ge,Ie[ge]);if(It)for(var ge of It(Ie))Ge.call(Ie,ge)&&At(Te,ge,Ie[ge]);return Te},qt=(Te,Ie)=>{var ge={};for(var St in Te)Et.call(Te,St)&&Ie.indexOf(St)<0&&(ge[St]=Te[St]);if(Te!=null&&It)for(var St of It(Te))Ie.indexOf(St)<0&&Ge.call(Te,St)&&(ge[St]=Te[St]);return ge},cn=(Te,Ie,ge)=>new Promise((St,Bn)=>{var rn=ke=>{try{ht(ge.next(ke))}catch(nn){Bn(nn)}},bt=ke=>{try{ht(ge.throw(ke))}catch(nn){Bn(nn)}},ht=ke=>ke.done?St(ke.value):Promise.resolve(ke.value).then(rn,bt);ht((ge=ge.apply(Te,Ie)).next())});const{SubMenu:Kt}=We.default,{Content:dn,Sider:Mt}=Je.default,mt=Te=>{var Ie=Te,{polls:ge,globalSetting:St,loading:Bn,user:rn,dispatch:bt}=Ie,ht=qt(Ie,["polls","globalSetting","loading","user","dispatch"]),ke,nn,En,Pn,jn,Qn,an,Nn,qn,Vn,Xt,wn,Fn,Wn,zn,Hn,Un,ni,Tn,fi,_n,ln,Kn,Xn,Li,On,Lt,zt,Vt,Ot,kn,li,Wt,Ht,mn,yn,$n,Pi,bi,_i,Ii,Ri,ji,zi,Zi,qi,gr,Ar,pr,lr,Wr,Mi,jr,Xi,Cr,qr;const Sr=(0,tt.useParams)(),yr=(0,tt.useLocation)(),{userInfo:sr}=rn,[Wi]=pe.default.useForm(),[rr,Vr]=(0,te.useState)([]),[Fr,Ki]=(0,te.useState)(!1),oo=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],Nr=(0,te.useRef)();(0,te.useEffect)(()=>{var An,hi,Oi,_r,ur,tr;(An=ge.exerciseBanks)!=null&&An.exercise_questions&&(Vr([...(hi=ge.exerciseBanks)==null?void 0:hi.exercise_questions]),Wi.setFieldsValue({exercise_name:(_r=(Oi=ge.exerciseBanks)==null?void 0:Oi.exercise)==null?void 0:_r.exercise_name,exercise_description:(tr=(ur=ge.exerciseBanks)==null?void 0:ur.exercise)==null?void 0:tr.exercise_description}))},[ge.exerciseBanks]),(0,te.useEffect)(()=>{bt({type:"polls/getExerciseBanks",payload:tn({},Sr)})},[Sr.categoryId]);const ei=()=>cn(void 0,null,function*(){var An,hi;yield Wi.validateFields();const Oi=Wi.getFieldValue();Oi.is_md=!0,Oi.topicId=(hi=(An=ge.exerciseBanks)==null?void 0:An.exercise)==null?void 0:hi.id,Ki(!1),yield(0,Ae.hO)(tn({},Oi)),bt({type:"polls/getExerciseBanks",payload:tn({},Sr)})}),ci=An=>cn(void 0,null,function*(){const hi=yield Nr==null?void 0:Nr.current;if(hi!=null&&hi.isEdit){je.ZP.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}An===5?bt({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):Vr([...rr,{question_type:An}])}),ai=function(){return rr==null?void 0:rr.map(function(An,hi){if(An.key=hi+1,An.len=rr.length,An.question_type===0)return te.createElement("aside",null,te.createElement(vn,{ref:Nr,editData:An}),te.createElement(Fe.Z,null));if(An.question_type===1)return te.createElement("aside",null,te.createElement(pn,{ref:Nr,editData:An}),te.createElement(Fe.Z,null));if(An.question_type===2)return te.createElement("aside",null,te.createElement(xt,{ref:Nr,editData:An}),te.createElement(Fe.Z,null));if(An.question_type===3)return te.createElement("aside",null,te.createElement(kt,{editData:An}),te.createElement(Fe.Z,null));if(An.question_type===4)return te.createElement("aside",null,te.createElement(ki,{editData:An}),te.createElement(Fe.Z,null));if(An.question_type===5)return te.createElement("aside",null,te.createElement(en,{editData:An}),te.createElement(Fe.Z,null))})};return te.createElement("section",{className:"edu-container"},te.createElement("section",{className:"animated fadeIn"},te.createElement("aside",{className:"mt10"},sr&&te.createElement(Ye.Z,{separator:">"},te.createElement(Ye.Z.Item,null,te.createElement(tt.Link,{to:`/users/${sr.login}/topics/personal`},"\u6211\u7684\u9898\u5E93")),te.createElement(Ye.Z.Item,null,te.createElement(tt.Link,{to:`/users/${sr==null?void 0:sr.login}/topics/${Sr.topicId}/${Sr.topictype}/exercise/detail`},"\u8BE6\u60C5")),te.createElement(Ye.Z.Item,null,"\u7F16\u8F91"))),te.createElement("aside",{className:[De.title,"mt20"].join(" ")},te.createElement(Se.Z,{style:{width:"100%"},align:"middle"},te.createElement(he.Z,{flex:"1"},te.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u8BD5\u5377"),te.createElement(gn.VV,{status:[(nn=(ke=ge.exerciseBanks)==null?void 0:ke.exercise)!=null&&nn.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),te.createElement(he.Z,null,te.createElement(tt.Link,{className:"font16 c-light-black",to:`/users/${sr.login}/topics/personal`},"\u8FD4\u56DE"))))),te.createElement("section",{className:[De.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},!Fr&&te.createElement("aside",null,te.createElement("div",{className:De.containerDesc},te.createElement("div",null,(Pn=(En=ge.exerciseBanks)==null?void 0:En.exercise)==null?void 0:Pn.exercise_name),te.createElement("div",null,te.createElement(Ee.Z,{title:"\u7F16\u8F91"},te.createElement("span",{onClick:()=>Ki(!0),className:"iconfont c-green ml30 icon-bianjishijuan3x"})))),te.createElement("div",{className:"c-light-black"},(Qn=(jn=ge.exerciseBanks)==null?void 0:jn.exercise)==null?void 0:Qn.exercise_description)),Fr&&te.createElement(pe.default,{layout:"vertical",form:Wi},te.createElement(pe.default.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},te.createElement(ve.default,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),te.createElement(pe.default.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},te.createElement(ve.default.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),te.createElement(pe.default.Item,{className:"tr"},te.createElement(rt.ZP,{type:"primary",onClick:()=>{ei()}},"\u4FDD\u5B58")))),te.createElement("p",{className:"mt10",style:{display:"flex"}},te.createElement("span",{className:"fl",style:{flex:"1"}},!!((Nn=(an=ge.exerciseBanks)==null?void 0:an.exercise_types)!=null&&Nn.q_singles)&&te.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(Vn=(qn=ge.exerciseBanks)==null?void 0:qn.exercise_types)==null?void 0:Vn.q_singles,"\u9898\uFF0C\u5171",(wn=(Xt=ge.exerciseBanks)==null?void 0:Xt.exercise_types)==null?void 0:wn.q_singles_scores,"\u5206"),!!((Wn=(Fn=ge.exerciseBanks)==null?void 0:Fn.exercise_types)!=null&&Wn.q_doubles)&&te.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(Hn=(zn=ge.exerciseBanks)==null?void 0:zn.exercise_types)==null?void 0:Hn.q_doubles,"\u9898\uFF0C\u5171",(ni=(Un=ge.exerciseBanks)==null?void 0:Un.exercise_types)==null?void 0:ni.q_doubles_scores,"\u5206"),!!((fi=(Tn=ge.exerciseBanks)==null?void 0:Tn.exercise_types)!=null&&fi.q_judges)&&te.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(ln=(_n=ge.exerciseBanks)==null?void 0:_n.exercise_types)==null?void 0:ln.q_judges,"\u9898\uFF0C\u5171",(Xn=(Kn=ge.exerciseBanks)==null?void 0:Kn.exercise_types)==null?void 0:Xn.q_judges_scores,"\u5206"),!!((On=(Li=ge.exerciseBanks)==null?void 0:Li.exercise_types)!=null&&On.q_nulls)&&te.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(zt=(Lt=ge.exerciseBanks)==null?void 0:Lt.exercise_types)==null?void 0:zt.q_nulls,"\u9898\uFF0C\u5171",(Ot=(Vt=ge.exerciseBanks)==null?void 0:Vt.exercise_types)==null?void 0:Ot.q_nulls_scores,"\u5206"),!!((li=(kn=ge.exerciseBanks)==null?void 0:kn.exercise_types)!=null&&li.q_mains)&&te.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(Ht=(Wt=ge.exerciseBanks)==null?void 0:Wt.exercise_types)==null?void 0:Ht.q_mains,"\u9898\uFF0C\u5171",(yn=(mn=ge.exerciseBanks)==null?void 0:mn.exercise_types)==null?void 0:yn.q_mains_scores,"\u5206"),!!((Pi=($n=ge.exerciseBanks)==null?void 0:$n.exercise_types)!=null&&Pi.q_shixuns)&&te.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(_i=(bi=ge.exerciseBanks)==null?void 0:bi.exercise_types)==null?void 0:_i.q_shixuns,"\u9898\uFF0C\u5171",(Ri=(Ii=ge.exerciseBanks)==null?void 0:Ii.exercise_types)==null?void 0:Ri.q_shixuns_scores,"\u5206"),!!((zi=(ji=ge.exerciseBanks)==null?void 0:ji.exercise_types)!=null&&zi.q_pros)&&te.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(qi=(Zi=ge.exerciseBanks)==null?void 0:Zi.exercise_types)==null?void 0:qi.q_pros,"\u9898\uFF0C\u5171",(Ar=(gr=ge.exerciseBanks)==null?void 0:gr.exercise_types)==null?void 0:Ar.q_pros_scores,"\u5206")),te.createElement("span",{className:"fr"},!!((lr=(pr=ge.exerciseBanks)==null?void 0:pr.exercise_types)!=null&&lr.q_counts)&&te.createElement("span",null,"\u5408\u8BA1 ",te.createElement("span",{className:"color-blue"},(Mi=(Wr=ge.exerciseBanks)==null?void 0:Wr.exercise_types)==null?void 0:Mi.q_counts)," \u9898\uFF0C \u5171 ",te.createElement("span",{className:`${((Xi=(jr=ge.exerciseBanks)==null?void 0:jr.exercise_types)==null?void 0:Xi.q_scores)>100?"color-red font-bd":"color-orange"}`},(qr=(Cr=ge.exerciseBanks)==null?void 0:Cr.exercise_types)==null?void 0:qr.q_scores)," \u5206"))),rr!=""&&te.createElement("section",{className:[De.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},ai()),te.createElement("section",{style:{display:"flex"},className:[De.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},te.createElement("div",{style:{flex:"1"}},oo.map(function(An,hi){return te.createElement(rt.ZP,{className:"mr20",type:"primary",onClick:()=>ci(An.id)},te.createElement(Ve.Z,{className:"mr5"}),An.name)}))),te.createElement(di,{callback:An=>{rr.push({shixun:An.challenge_names.map(hi=>({challenge_name:hi,challenge_score:5})),shixun_name:An.title,shixun_id:An.id,question_type:5,edit:!0}),Vr([...rr])}}))};var hn=(0,tt.connect)(({polls:Te,loading:Ie,user:ge,globalSetting:St})=>({polls:Te,globalSetting:St,user:ge,loading:Ie.effects}))(mt)},49142:function(Ut,Qt,fe){"use strict";fe.d(Qt,{AL:function(){return ut},Iy:function(){return Ee},Qv:function(){return Ve},ez:function(){return ct},jb:function(){return ve}});var te=fe(32834),tt=fe.n(te),We=fe(11690),Je=fe.n(We);let pe=1;function je(Ce,Ke){const ot=Ce.match(/^(\s+)(?:```)/);if(ot===null)return Ke;const _e=ot[1];return Ke.split(`
`).map(nt=>{const Ze=nt.match(/^\s+/);if(Ze===null)return nt;const[dt]=Ze;return dt.length>=_e.length?nt.slice(_e.length):nt}).join(`
`)}let Fe=[],Ye=["<ul>"];const Se=new(tt()).Renderer,he=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ee(){Fe.length=0,Ye=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function rt(Ce,Ke,ot,_e){if(Ke>=Ce.length||Ce[Ke].level<=ot)return Ke;var nt=Ce[Ke];_e.push("<li><a href='#"+pe+nt.anchor+"'>"+nt.text+"</a>"),Ke++;var Ze=[];return Ke=rt(Ce,Ke,nt.level,Ze),Ze.length>0&&(_e.push("<ul>"),Ze.forEach(function(dt){_e.push(dt)}),_e.push("</ul>")),_e.push("</li>"),Ke=rt(Ce,Ke,ot,_e),Ke}function Ve(){return rt(Fe,0,0,Ye),Ye.push("</ul>"),Ye.join("")}const Ae={heading(Ce){const Ke=he.exec(Ce);if(pe+=1,Ke)return{type:"heading",raw:Ke[0],depth:Ke[1].length,text:Ke[2]}},fences(Ce){const Ke=this.rules.block.fences.exec(Ce);if(Ke){const ot=Ke[0];let _e=je(ot,Ke[3]||"");const nt=Ke[2]?Ke[2].trim():Ke[2];if(["latex","katex","math"].indexOf(nt)>=0){const Ze=$e(),dt=_e;_e=Ze,at[Ze]={type:"block",expression:dt}}return{type:"code",raw:ot,lang:nt,text:_e}}}},Pe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let we=0;const $e=()=>`__special_katext_id_${we++}__`;let at={};function ct(){return at}function ut(){we=0,at={}}function ze(Ce){return Ce=Ce.replace(Pe,(Ke,ot)=>{const _e=$e();return at[_e]={type:"inline",expression:ot},_e}),Ce}const wt=Se.listitem;Se.listitem=function(Ce){return wt(ze(Ce))};const pt=Se.paragraph;Se.paragraph=function(Ce){return pt(ze(Ce))};const sn=Se.tablecell;Se.tablecell=function(Ce,Ke){return sn(ze(Ce),Ke)},Se.code=function(Ce,Ke,ot){const _e=(Ke||"").match(/\S*/)[0];return _e?["latex","katex","math"].indexOf(_e)>=0?`<p class='editormd-tex'>${Ce}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ke}">${ot?Ce:(0,We.escape)(Ce,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ot?Ce:(0,We.escape)(Ce,!0))+"</code></pre>"},Se.heading=function(Ce,Ke,ot){let _e=this.options.headerPrefix+ot.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Fe.push({anchor:_e,level:Ke,text:Ce}),"<h"+Ke+' id="'+pe+_e+'">'+Ce+"</h"+Ke+">"},tt().setOptions({silent:!0,gfm:!0,pedantic:!1}),tt().use({tokenizer:Ae,renderer:Se}),Qt.ZP=tt()},99498:function(Ut,Qt,fe){(function(te){te(fe(89780))})(function(te){te.defineOption("placeholder","",function(Ye,Se,he){var Ee=he&&he!=te.Init;if(Se&&!Ee)Ye.on("blur",pe),Ye.on("change",je),Ye.on("swapDoc",je),te.on(Ye.getInputField(),"compositionupdate",Ye.state.placeholderCompose=function(){Je(Ye)}),je(Ye);else if(!Se&&Ee){Ye.off("blur",pe),Ye.off("change",je),Ye.off("swapDoc",je),te.off(Ye.getInputField(),"compositionupdate",Ye.state.placeholderCompose),tt(Ye);var ve=Ye.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Se&&!Ye.hasFocus()&&pe(Ye)});function tt(Ye){Ye.state.placeholder&&(Ye.state.placeholder.parentNode.removeChild(Ye.state.placeholder),Ye.state.placeholder=null)}function We(Ye){tt(Ye);var Se=Ye.state.placeholder=document.createElement("pre");Se.style.cssText="height: 0; overflow: visible",Se.style.direction=Ye.getOption("direction"),Se.className="CodeMirror-placeholder CodeMirror-line-like";var he=Ye.getOption("placeholder");typeof he=="string"&&(he=document.createTextNode(he)),Se.appendChild(he),Ye.display.lineSpace.insertBefore(Se,Ye.display.lineSpace.firstChild)}function Je(Ye){setTimeout(function(){var Se=!1,he=Ye.getInputField();he.nodeName=="TEXTAREA"?Se=!he.value:Ye.lineCount()==1&&(Se=!/[^\u200b]/.test(he.querySelector(".CodeMirror-line").textContent)),Se?We(Ye):tt(Ye)},20)}function pe(Ye){Fe(Ye)&&We(Ye)}function je(Ye){var Se=Ye.getWrapperElement(),he=Fe(Ye);Se.className=Se.className.replace(" CodeMirror-empty","")+(he?" CodeMirror-empty":""),he?We(Ye):tt(Ye)}function Fe(Ye){return Ye.lineCount()===1&&Ye.getLine(0)===""}})},25717:function(Ut,Qt,fe){(function(te){te(fe(89780))})(function(te){var tt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},We=te.Pos;te.defineOption("autoCloseBrackets",!1,function(Ae,Pe,we){we&&we!=te.Init&&(Ae.removeKeyMap(pe),Ae.state.closeBrackets=null),Pe&&(je(Je(Pe,"pairs")),Ae.state.closeBrackets=Pe,Ae.addKeyMap(pe))});function Je(Ae,Pe){return Pe=="pairs"&&typeof Ae=="string"?Ae:typeof Ae=="object"&&Ae[Pe]!=null?Ae[Pe]:tt[Pe]}var pe={Backspace:Se,Enter:he};function je(Ae){for(var Pe=0;Pe<Ae.length;Pe++){var we=Ae.charAt(Pe),$e="'"+we+"'";pe[$e]||(pe[$e]=Fe(we))}}je(tt.pairs+"`");function Fe(Ae){return function(Pe){return ve(Pe,Ae)}}function Ye(Ae){var Pe=Ae.state.closeBrackets;if(!Pe||Pe.override)return Pe;var we=Ae.getModeAt(Ae.getCursor());return we.closeBrackets||Pe}function Se(Ae){var Pe=Ye(Ae);if(!Pe||Ae.getOption("disableInput"))return te.Pass;for(var we=Je(Pe,"pairs"),$e=Ae.listSelections(),at=0;at<$e.length;at++){if(!$e[at].empty())return te.Pass;var ct=rt(Ae,$e[at].head);if(!ct||we.indexOf(ct)%2!=0)return te.Pass}for(var at=$e.length-1;at>=0;at--){var ut=$e[at].head;Ae.replaceRange("",We(ut.line,ut.ch-1),We(ut.line,ut.ch+1),"+delete")}}function he(Ae){var Pe=Ye(Ae),we=Pe&&Je(Pe,"explode");if(!we||Ae.getOption("disableInput"))return te.Pass;for(var $e=Ae.listSelections(),at=0;at<$e.length;at++){if(!$e[at].empty())return te.Pass;var ct=rt(Ae,$e[at].head);if(!ct||we.indexOf(ct)%2!=0)return te.Pass}Ae.operation(function(){var ut=Ae.lineSeparator()||`
`;Ae.replaceSelection(ut+ut,null),Ae.execCommand("goCharLeft"),$e=Ae.listSelections();for(var ze=0;ze<$e.length;ze++){var wt=$e[ze].head.line;Ae.indentLine(wt,null,!0),Ae.indentLine(wt+1,null,!0)}})}function Ee(Ae){var Pe=te.cmpPos(Ae.anchor,Ae.head)>0;return{anchor:new We(Ae.anchor.line,Ae.anchor.ch+(Pe?-1:1)),head:new We(Ae.head.line,Ae.head.ch+(Pe?1:-1))}}function ve(Ae,Pe){var we=Ye(Ae);if(!we||Ae.getOption("disableInput"))return te.Pass;var $e=Je(we,"pairs"),at=$e.indexOf(Pe);if(at==-1)return te.Pass;for(var ct=Je(we,"closeBefore"),ut=Je(we,"triples"),ze=$e.charAt(at+1)==Pe,wt=Ae.listSelections(),pt=at%2==0,sn,Ce=0;Ce<wt.length;Ce++){var Ke=wt[Ce],ot=Ke.head,_e,nt=Ae.getRange(ot,We(ot.line,ot.ch+1));if(pt&&!Ke.empty())_e="surround";else if((ze||!pt)&&nt==Pe)ze&&Ve(Ae,ot)?_e="both":ut.indexOf(Pe)>=0&&Ae.getRange(ot,We(ot.line,ot.ch+3))==Pe+Pe+Pe?_e="skipThree":_e="skip";else if(ze&&ot.ch>1&&ut.indexOf(Pe)>=0&&Ae.getRange(We(ot.line,ot.ch-2),ot)==Pe+Pe){if(ot.ch>2&&/\bstring/.test(Ae.getTokenTypeAt(We(ot.line,ot.ch-2))))return te.Pass;_e="addFour"}else if(ze){var Ze=ot.ch==0?" ":Ae.getRange(We(ot.line,ot.ch-1),ot);if(!te.isWordChar(nt)&&Ze!=Pe&&!te.isWordChar(Ze))_e="both";else return te.Pass}else if(pt&&(nt.length===0||/\s/.test(nt)||ct.indexOf(nt)>-1))_e="both";else return te.Pass;if(!sn)sn=_e;else if(sn!=_e)return te.Pass}var dt=at%2?$e.charAt(at-1):Pe,pn=at%2?Pe:$e.charAt(at+1);Ae.operation(function(){if(sn=="skip")Ae.execCommand("goCharRight");else if(sn=="skipThree")for(var Ft=0;Ft<3;Ft++)Ae.execCommand("goCharRight");else if(sn=="surround"){for(var bn=Ae.getSelections(),Ft=0;Ft<bn.length;Ft++)bn[Ft]=dt+bn[Ft]+pn;Ae.replaceSelections(bn,"around"),bn=Ae.listSelections().slice();for(var Ft=0;Ft<bn.length;Ft++)bn[Ft]=Ee(bn[Ft]);Ae.setSelections(bn)}else sn=="both"?(Ae.replaceSelection(dt+pn,null),Ae.triggerElectric(dt+pn),Ae.execCommand("goCharLeft")):sn=="addFour"&&(Ae.replaceSelection(dt+dt+dt+dt,"before"),Ae.execCommand("goCharRight"))})}function rt(Ae,Pe){var we=Ae.getRange(We(Pe.line,Pe.ch-1),We(Pe.line,Pe.ch+1));return we.length==2?we:null}function Ve(Ae,Pe){var we=Ae.getTokenAt(We(Pe.line,Pe.ch+1));return/\bstring/.test(we.type)&&we.start==Pe.ch&&(Pe.ch==0||!/\bstring/.test(Ae.getTokenTypeAt(Pe)))}})},6313:function(Ut,Qt,fe){(function(te){te(fe(89780),fe(32855))})(function(te){te.defineOption("autoCloseTags",!1,function(Se,he,Ee){if(Ee!=te.Init&&Ee&&Se.removeKeyMap("autoCloseTags"),!!he){var ve={name:"autoCloseTags"};(typeof he!="object"||he.whenClosing!==!1)&&(ve["'/'"]=function(rt){return je(rt)}),(typeof he!="object"||he.whenOpening!==!1)&&(ve["'>'"]=function(rt){return Je(rt)}),Se.addKeyMap(ve)}});var tt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],We=["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 Je(Se){if(Se.getOption("disableInput"))return te.Pass;for(var he=Se.listSelections(),Ee=[],ve=Se.getOption("autoCloseTags"),rt=0;rt<he.length;rt++){if(!he[rt].empty())return te.Pass;var Ve=he[rt].head,Ae=Se.getTokenAt(Ve),Pe=te.innerMode(Se.getMode(),Ae.state),we=Pe.state,$e=Pe.mode.xmlCurrentTag&&Pe.mode.xmlCurrentTag(we),at=$e&&$e.name;if(!at)return te.Pass;var ct=Pe.mode.configuration=="html",ut=typeof ve=="object"&&ve.dontCloseTags||ct&&tt,ze=typeof ve=="object"&&ve.indentTags||ct&&We;Ae.end>Ve.ch&&(at=at.slice(0,at.length-Ae.end+Ve.ch));var wt=at.toLowerCase();if(!at||Ae.type=="string"&&(Ae.end!=Ve.ch||!/[\"\']/.test(Ae.string.charAt(Ae.string.length-1))||Ae.string.length==1)||Ae.type=="tag"&&$e.close||Ae.string.indexOf("/")==Ve.ch-Ae.start-1||ut&&Fe(ut,wt)>-1||Ye(Se,Pe.mode.xmlCurrentContext&&Pe.mode.xmlCurrentContext(we)||[],at,Ve,!0))return te.Pass;var pt=typeof ve=="object"&&ve.emptyTags;if(pt&&Fe(pt,at)>-1){Ee[rt]={text:"/>",newPos:te.Pos(Ve.line,Ve.ch+2)};continue}var sn=ze&&Fe(ze,wt)>-1;Ee[rt]={indent:sn,text:">"+(sn?`
`:"")+"</"+at+">",newPos:sn?te.Pos(Ve.line+1,0):te.Pos(Ve.line,Ve.ch+1)}}for(var Ce=typeof ve=="object"&&ve.dontIndentOnAutoClose,rt=he.length-1;rt>=0;rt--){var Ke=Ee[rt];Se.replaceRange(Ke.text,he[rt].head,he[rt].anchor,"+insert");var ot=Se.listSelections().slice(0);ot[rt]={head:Ke.newPos,anchor:Ke.newPos},Se.setSelections(ot),!Ce&&Ke.indent&&(Se.indentLine(Ke.newPos.line,null,!0),Se.indentLine(Ke.newPos.line+1,null,!0))}}function pe(Se,he){for(var Ee=Se.listSelections(),ve=[],rt=he?"/":"</",Ve=Se.getOption("autoCloseTags"),Ae=typeof Ve=="object"&&Ve.dontIndentOnSlash,Pe=0;Pe<Ee.length;Pe++){if(!Ee[Pe].empty())return te.Pass;var we=Ee[Pe].head,$e=Se.getTokenAt(we),at=te.innerMode(Se.getMode(),$e.state),ct=at.state;if(he&&($e.type=="string"||$e.string.charAt(0)!="<"||$e.start!=we.ch-1))return te.Pass;var ut,ze=at.mode.name!="xml"&&Se.getMode().name=="htmlmixed";if(ze&&at.mode.name=="javascript")ut=rt+"script";else if(ze&&at.mode.name=="css")ut=rt+"style";else{var wt=at.mode.xmlCurrentContext&&at.mode.xmlCurrentContext(ct);if(!wt||wt.length&&Ye(Se,wt,wt[wt.length-1],we))return te.Pass;ut=rt+wt[wt.length-1]}Se.getLine(we.line).charAt($e.end)!=">"&&(ut+=">"),ve[Pe]=ut}if(Se.replaceSelections(ve),Ee=Se.listSelections(),!Ae)for(var Pe=0;Pe<Ee.length;Pe++)(Pe==Ee.length-1||Ee[Pe].head.line<Ee[Pe+1].head.line)&&Se.indentLine(Ee[Pe].head.line)}function je(Se){return Se.getOption("disableInput")?te.Pass:pe(Se,!0)}te.commands.closeTag=function(Se){return pe(Se)};function Fe(Se,he){if(Se.indexOf)return Se.indexOf(he);for(var Ee=0,ve=Se.length;Ee<ve;++Ee)if(Se[Ee]==he)return Ee;return-1}function Ye(Se,he,Ee,ve,rt){if(!te.scanForClosingTag)return!1;var Ve=Math.min(Se.lastLine()+1,ve.line+500),Ae=te.scanForClosingTag(Se,ve,null,Ve);if(!Ae||Ae.tag!=Ee)return!1;for(var Pe=rt?1:0,we=he.length-1;we>=0&&he[we]==Ee;we--)++Pe;ve=Ae.to;for(var we=1;we<Pe;we++){var $e=te.scanForClosingTag(Se,ve,null,Ve);if(!$e||$e.tag!=Ee)return!1;ve=$e.to}return!0}})},32855:function(Ut,Qt,fe){(function(te){te(fe(89780))})(function(te){"use strict";var tt=te.Pos;function We(we,$e){return we.line-$e.line||we.ch-$e.ch}var Je="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",pe=Je+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",je=new RegExp("<(/?)(["+Je+"]["+pe+"]*)","g");function Fe(we,$e,at,ct){this.line=$e,this.ch=at,this.cm=we,this.text=we.getLine($e),this.min=ct?Math.max(ct.from,we.firstLine()):we.firstLine(),this.max=ct?Math.min(ct.to-1,we.lastLine()):we.lastLine()}function Ye(we,$e){var at=we.cm.getTokenTypeAt(tt(we.line,$e));return at&&/\btag\b/.test(at)}function Se(we){if(!(we.line>=we.max))return we.ch=0,we.text=we.cm.getLine(++we.line),!0}function he(we){if(!(we.line<=we.min))return we.text=we.cm.getLine(--we.line),we.ch=we.text.length,!0}function Ee(we){for(;;){var $e=we.text.indexOf(">",we.ch);if($e==-1){if(Se(we))continue;return}if(!Ye(we,$e+1)){we.ch=$e+1;continue}var at=we.text.lastIndexOf("/",$e),ct=at>-1&&!/\S/.test(we.text.slice(at+1,$e));return we.ch=$e+1,ct?"selfClose":"regular"}}function ve(we){for(;;){var $e=we.ch?we.text.lastIndexOf("<",we.ch-1):-1;if($e==-1){if(he(we))continue;return}if(!Ye(we,$e+1)){we.ch=$e;continue}je.lastIndex=$e,we.ch=$e;var at=je.exec(we.text);if(at&&at.index==$e)return at}}function rt(we){for(;;){je.lastIndex=we.ch;var $e=je.exec(we.text);if(!$e){if(Se(we))continue;return}if(!Ye(we,$e.index+1)){we.ch=$e.index+1;continue}return we.ch=$e.index+$e[0].length,$e}}function Ve(we){for(;;){var $e=we.ch?we.text.lastIndexOf(">",we.ch-1):-1;if($e==-1){if(he(we))continue;return}if(!Ye(we,$e+1)){we.ch=$e;continue}var at=we.text.lastIndexOf("/",$e),ct=at>-1&&!/\S/.test(we.text.slice(at+1,$e));return we.ch=$e+1,ct?"selfClose":"regular"}}function Ae(we,$e){for(var at=[];;){var ct=rt(we),ut,ze=we.line,wt=we.ch-(ct?ct[0].length:0);if(!ct||!(ut=Ee(we)))return;if(ut!="selfClose")if(ct[1]){for(var pt=at.length-1;pt>=0;--pt)if(at[pt]==ct[2]){at.length=pt;break}if(pt<0&&(!$e||$e==ct[2]))return{tag:ct[2],from:tt(ze,wt),to:tt(we.line,we.ch)}}else at.push(ct[2])}}function Pe(we,$e){for(var at=[];;){var ct=Ve(we);if(!ct)return;if(ct=="selfClose"){ve(we);continue}var ut=we.line,ze=we.ch,wt=ve(we);if(!wt)return;if(wt[1])at.push(wt[2]);else{for(var pt=at.length-1;pt>=0;--pt)if(at[pt]==wt[2]){at.length=pt;break}if(pt<0&&(!$e||$e==wt[2]))return{tag:wt[2],from:tt(we.line,we.ch),to:tt(ut,ze)}}}}te.registerHelper("fold","xml",function(we,$e){for(var at=new Fe(we,$e.line,0);;){var ct=rt(at);if(!ct||at.line!=$e.line)return;var ut=Ee(at);if(!ut)return;if(!ct[1]&&ut!="selfClose"){var ze=tt(at.line,at.ch),wt=Ae(at,ct[2]);return wt&&We(wt.from,ze)>0?{from:ze,to:wt.from}:null}}}),te.findMatchingTag=function(we,$e,at){var ct=new Fe(we,$e.line,$e.ch,at);if(!(ct.text.indexOf(">")==-1&&ct.text.indexOf("<")==-1)){var ut=Ee(ct),ze=ut&&tt(ct.line,ct.ch),wt=ut&&ve(ct);if(!(!ut||!wt||We(ct,$e)>0)){var pt={from:tt(ct.line,ct.ch),to:ze,tag:wt[2]};return ut=="selfClose"?{open:pt,close:null,at:"open"}:wt[1]?{open:Pe(ct,wt[2]),close:pt,at:"close"}:(ct=new Fe(we,ze.line,ze.ch,at),{open:pt,close:Ae(ct,wt[2]),at:"open"})}}},te.findEnclosingTag=function(we,$e,at,ct){for(var ut=new Fe(we,$e.line,$e.ch,at);;){var ze=Pe(ut,ct);if(!ze)break;var wt=new Fe(we,$e.line,$e.ch,at),pt=Ae(wt,ze.tag);if(pt)return{open:ze,close:pt}}},te.scanForClosingTag=function(we,$e,at,ct){var ut=new Fe(we,$e.line,$e.ch,ct?{from:0,to:ct}:null);return Ae(ut,at)}})},89780:function(Ut){(function(Qt,fe){Ut.exports=fe()})(this,function(){"use strict";var Qt=navigator.userAgent,fe=navigator.platform,te=/gecko\/\d/i.test(Qt),tt=/MSIE \d/.test(Qt),We=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qt),Je=/Edge\/(\d+)/.exec(Qt),pe=tt||We||Je,je=pe&&(tt?document.documentMode||6:+(Je||We)[1]),Fe=!Je&&/WebKit\//.test(Qt),Ye=Fe&&/Qt\/\d+\.\d+/.test(Qt),Se=!Je&&/Chrome\//.test(Qt),he=/Opera\//.test(Qt),Ee=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Qt),rt=/PhantomJS/.test(Qt),Ve=!Je&&/AppleWebKit/.test(Qt)&&/Mobile\/\w+/.test(Qt),Ae=/Android/.test(Qt),Pe=Ve||Ae||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Qt),we=Ve||/Mac/.test(fe),$e=/\bCrOS\b/.test(Qt),at=/win/i.test(fe),ct=he&&Qt.match(/Version\/(\d*\.\d*)/);ct&&(ct=Number(ct[1])),ct&&ct>=15&&(he=!1,Fe=!0);var ut=we&&(Ye||he&&(ct==null||ct<12.11)),ze=te||pe&&je>=9;function wt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var pt=function(a,y){var x=a.className,b=wt(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 sn(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ce(a,y){return sn(a).appendChild(y)}function Ke(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var z=0;z<y.length;++z)E.appendChild(y[z]);return E}function ot(a,y,x,b){var E=Ke(a,y,x,b);return E.setAttribute("role","presentation"),E}var _e;document.createRange?_e=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:_e=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 nt(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 Ze(){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 dt(a,y){var x=a.className;wt(y).test(x)||(a.className+=(x?" ":"")+y)}function pn(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!wt(x[b]).test(y)&&(y+=" "+x[b]);return y}var Ft=function(a){a.select()};Ve?Ft=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:pe&&(Ft=function(a){try{a.select()}catch(y){}});function bn(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function Rt(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 me(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var z=b||0,re=E||0;;){var ae=a.indexOf(" ",z);if(ae<0||ae>=y)return re+(y-z);re+=ae-z,re+=x-re%x,z=ae+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=bn(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.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 Ct(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var on=50,Bt={toString:function(){return"CodeMirror.Pass"}},He={scroll:!1},it={origin:"*mouse"},ft={origin:"+move"};function vn(a,y,x){for(var b=0,E=0;;){var z=a.indexOf(" ",b);z==-1&&(z=a.length);var re=z-b;if(z==a.length||E+re>=y)return b+Math.min(re,y-E);if(E+=z-b,E+=x-E%x,b=z+1,E>=y)return b}}var Pt=[""];function Me(a){for(;Pt.length<=a;)Pt.push(be(Pt)+" ");return Pt[a]}function be(a){return a[a.length-1]}function Re(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function lt(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function Le(){}function Ue(a,y){var x;return Object.create?x=Object.create(a):(Le.prototype=a,x=new Le),y&&Rt(y,x),x}var Xe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Xe.test(a))}function gt(a,y){return y?y.source.indexOf("\\w")>-1&&et(a)?!0:y.test(a):et(a)}function xt(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var Dt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Nt(a){return a.charCodeAt(0)>=768&&Dt.test(a)}function gn(a,y,x){for(;(x<0?y>0:y<a.length)&&Nt(a.charAt(y));)y+=x;return y}function Jt(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,z=b<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:x;a(z)?x=z:y=z+b}}function le(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,z=0;z<a.length;++z){var re=a[z];(re.from<x&&re.to>y||y==x&&re.to==y)&&(b(Math.max(re.from,y),Math.min(re.to,x),re.level==1?"rtl":"ltr",z),E=!0)}E||b(y,x,"ltr")}var ne=null;function ee(a,y,x){var b;ne=null;for(var E=0;E<a.length;++E){var z=a[E];if(z.from<y&&z.to>y)return E;z.to==y&&(z.from!=z.to&&x=="before"?b=E:ne=E),z.from==y&&(z.from!=z.to&&x!="before"?b=E:ne=E)}return b!=null?b:ne}var oe=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(ce){return ce<=247?a.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?y.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,ae=/[1n]/;function se(ce,xe,Be){this.level=ce,this.from=xe,this.to=Be}return function(ce,xe){var Be=xe=="ltr"?"L":"R";if(ce.length==0||xe=="ltr"&&!b.test(ce))return!1;for(var Qe=ce.length,qe=[],Tt=0;Tt<Qe;++Tt)qe.push(x(ce.charCodeAt(Tt)));for(var Zt=0,fn=Be;Zt<Qe;++Zt){var Cn=qe[Zt];Cn=="m"?qe[Zt]=fn:fn=Cn}for(var Mn=0,Sn=Be;Mn<Qe;++Mn){var In=qe[Mn];In=="1"&&Sn=="r"?qe[Mn]="n":z.test(In)&&(Sn=In,In=="r"&&(qe[Mn]="R"))}for(var ii=1,Jn=qe[0];ii<Qe-1;++ii){var Di=qe[ii];Di=="+"&&Jn=="1"&&qe[ii+1]=="1"?qe[ii]="1":Di==","&&Jn==qe[ii+1]&&(Jn=="1"||Jn=="n")&&(qe[ii]=Jn),Jn=Di}for(var Vi=0;Vi<Qe;++Vi){var fr=qe[Vi];if(fr==",")qe[Vi]="N";else if(fr=="%"){var Yi=void 0;for(Yi=Vi+1;Yi<Qe&&qe[Yi]=="%";++Yi);for(var Hr=Vi&&qe[Vi-1]=="!"||Yi<Qe&&qe[Yi]=="1"?"1":"N",Pr=Vi;Pr<Yi;++Pr)qe[Pr]=Hr;Vi=Yi-1}}for(var nr=0,Tr=Be;nr<Qe;++nr){var mr=qe[nr];Tr=="L"&&mr=="1"?qe[nr]="L":z.test(mr)&&(Tr=mr)}for(var ar=0;ar<Qe;++ar)if(E.test(qe[ar])){var ir=void 0;for(ir=ar+1;ir<Qe&&E.test(qe[ir]);++ir);for(var Ji=(ar?qe[ar-1]:Be)=="L",Mr=(ir<Qe?qe[ir]:Be)=="L",Vo=Ji==Mr?Ji?"L":"R":Be,xo=ar;xo<ir;++xo)qe[xo]=Vo;ar=ir-1}for(var wr=[],ro,hr=0;hr<Qe;)if(re.test(qe[hr])){var bl=hr;for(++hr;hr<Qe&&re.test(qe[hr]);++hr);wr.push(new se(0,bl,hr))}else{var uo=hr,Bo=wr.length,Lo=xe=="rtl"?1:0;for(++hr;hr<Qe&&qe[hr]!="L";++hr);for(var kr=uo;kr<hr;)if(ae.test(qe[kr])){uo<kr&&(wr.splice(Bo,0,new se(1,uo,kr)),Bo+=Lo);var Uo=kr;for(++kr;kr<hr&&ae.test(qe[kr]);++kr);wr.splice(Bo,0,new se(2,Uo,kr)),Bo+=Lo,uo=kr}else++kr;uo<hr&&wr.splice(Bo,0,new se(1,uo,hr))}return xe=="ltr"&&(wr[0].level==1&&(ro=ce.match(/^\s+/))&&(wr[0].from=ro[0].length,wr.unshift(new se(0,0,ro[0].length))),be(wr).level==1&&(ro=ce.match(/\s+$/))&&(be(wr).to-=ro[0].length,wr.push(new se(0,Qe-ro[0].length,Qe)))),xe=="rtl"?wr.reverse():wr}}();function ue(a,y){var x=a.order;return x==null&&(x=a.order=oe(a.text,y)),x}var ie=[],ye=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]||ie).concat(x)}};function vt(a,y){return a._handlers&&a._handlers[y]||ie}function yt(a,y,x){if(a.removeEventListener)a.removeEventListener(y,x,!1);else if(a.detachEvent)a.detachEvent("on"+y,x);else{var b=a._handlers,E=b&&b[y];if(E){var z=Ct(E,x);z>-1&&(b[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function kt(a,y){var x=vt(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 Oe(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),kt(a,x||y.type,a,y),jt(y)||y.codemirrorIgnore}function $t(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)Ct(x,y[b])==-1&&x.push(y[b])}function _t(a,y){return vt(a,y).length>0}function Gt(a){a.prototype.on=function(y,x){ye(this,y,x)},a.prototype.off=function(y,x){yt(this,y,x)}}function xn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Zn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function jt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Rn(a){xn(a),Zn(a)}function Ei(a){return a.target||a.srcElement}function si(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),we&&a.ctrlKey&&y==1&&(y=3),y}var ki=function(){if(pe&&je<9)return!1;var a=Ke("div");return"draggable"in a||"dragDrop"in a}(),gi;function Ai(a){if(gi==null){var y=Ke("span","\u200B");Ce(a,Ke("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(gi=y.offsetWidth<=1&&y.offsetHeight>2&&!(pe&&je<8))}var x=gi?Ke("span","\u200B"):Ke("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Bi;function ri(a){if(Bi!=null)return Bi;var y=Ce(a,document.createTextNode("A\u062EA")),x=_e(y,0,1).getBoundingClientRect(),b=_e(y,1,2).getBoundingClientRect();return sn(a),!x||x.left==x.right?!1:Bi=b.right-x.right<3}var Si=`
b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(`
`,y);E==-1&&(E=a.length);var z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(x.push(z.slice(0,re)),y+=re+1):(x.push(z),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},yi=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},ti=function(){var a=Ke("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),vi=null;function wi(a){if(vi!=null)return vi;var y=Ce(a,Ke("span","x")),x=y.getBoundingClientRect(),b=_e(y,0,1).getBoundingClientRect();return vi=Math.abs(x.left-b.left)>1}var Ni={},en={};function Ln(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Ni[a]=y}function Yn(a,y){en[a]=y}function Dn(a){if(typeof a=="string"&&en.hasOwnProperty(a))a=en[a];else if(a&&typeof a.name=="string"&&en.hasOwnProperty(a.name)){var y=en[a.name];typeof y=="string"&&(y={name:y}),a=Ue(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Dn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Dn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function pi(a,y){y=Dn(y);var x=Ni[y.name];if(!x)return pi(a,"text/plain");var b=x(a,y);if(mi.hasOwnProperty(y.name)){var E=mi[y.name];for(var z in E)E.hasOwnProperty(z)&&(b.hasOwnProperty(z)&&(b["_"+z]=b[z]),b[z]=E[z])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)b[re]=y.modeProps[re];return b}var mi={};function Ti(a,y){var x=mi.hasOwnProperty(a)?mi[a]:mi[a]={};Rt(y,x)}function ui(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 oi(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 Ci(a,y,x){return a.startState?a.startState(y,x):!0}var Yt=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};Yt.prototype.eol=function(){return this.pos>=this.string.length},Yt.prototype.sol=function(){return this.pos==this.lineStart},Yt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Yt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Yt.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},Yt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Yt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Yt.prototype.skipToEnd=function(){this.pos=this.string.length},Yt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Yt.prototype.backUp=function(a){this.pos-=a},Yt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},Yt.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},Yt.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(re){return x?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var z=this.string.slice(this.pos).match(a);return z&&z.index>0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},Yt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Yt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Yt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Yt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function st(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],z=E.chunkSize();if(y<z){x=E;break}y-=z}return x.lines[y]}function un(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(z){var re=z.text;E==x.line&&(re=re.slice(0,x.ch)),E==y.line&&(re=re.slice(y.ch)),b.push(re),++E}),b}function Gn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function di(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function De(a){if(a.parent==null)return null;for(var y=a.parent,x=Ct(y.lines,a),b=y.parent;b;y=b,b=b.parent)for(var E=0;b.children[E]!=y;++E)x+=b.children[E].chunkSize();return x+y.first}function Ne(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],z=E.height;if(y<z){a=E;continue e}y-=z,x+=E.chunkSize()}return x}while(!a.lines);for(var re=0;re<a.lines.length;++re){var ae=a.lines[re],se=ae.height;if(y<se)break;y-=se}return x+re}function It(a,y){return y>=a.first&&y<a.first+a.size}function Et(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Ge(a,y,x){if(x===void 0&&(x=null),!(this instanceof Ge))return new Ge(a,y,x);this.line=a,this.ch=y,this.sticky=x}function At(a,y){return a.line-y.line||a.ch-y.ch}function tn(a,y){return a.sticky==y.sticky&&At(a,y)==0}function qt(a){return Ge(a.line,a.ch)}function cn(a,y){return At(a,y)<0?y:a}function Kt(a,y){return At(a,y)<0?a:y}function dn(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Mt(a,y){if(y.line<a.first)return Ge(a.first,0);var x=a.first+a.size-1;return y.line>x?Ge(x,st(a,x).text.length):mt(y,st(a,y.line).text.length)}function mt(a,y){var x=a.ch;return x==null||x>y?Ge(a.line,y):x<0?Ge(a.line,0):a}function hn(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Mt(a,y[b]);return x}var Te=function(a,y){this.state=a,this.lookAhead=y},Ie=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};Ie.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Ie.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}},Ie.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ie.fromSaved=function(a,y,x){return y instanceof Te?new Ie(a,ui(a.mode,y.state),x,y.lookAhead):new Ie(a,ui(a.mode,y),x)},Ie.prototype.save=function(a){var y=a!==!1?ui(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Te(y,this.maxLookAhead):y};function ge(a,y,x,b){var E=[a.state.modeGen],z={};Pn(a,y.text,a.doc.mode,x,function(ce,xe){return E.push(ce,xe)},z,b);for(var re=x.state,ae=function(ce){x.baseTokens=E;var xe=a.state.overlays[ce],Be=1,Qe=0;x.state=!0,Pn(a,y.text,xe.mode,x,function(qe,Tt){for(var Zt=Be;Qe<qe;){var fn=E[Be];fn>qe&&E.splice(Be,1,qe,E[Be+1],fn),Be+=2,Qe=Math.min(qe,fn)}if(Tt)if(xe.opaque)E.splice(Zt,Be-Zt,qe,"overlay "+Tt),Be=Zt+2;else for(;Zt<Be;Zt+=2){var Cn=E[Zt+1];E[Zt+1]=(Cn?Cn+" ":"")+"overlay "+Tt}},z),x.state=re,x.baseTokens=null,x.baseTokenPos=1},se=0;se<a.state.overlays.length;++se)ae(se);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function St(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Bn(a,De(y)),E=y.text.length>a.options.maxHighlightLength&&ui(a.doc.mode,b.state),z=ge(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Bn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new Ie(b,!0,y);var z=jn(a,y,x),re=z>b.first&&st(b,z-1).stateAfter,ae=re?Ie.fromSaved(b,re,z):new Ie(b,Ci(b.mode),z);return b.iter(z,y,function(se){rn(a,se.text,ae);var ce=ae.line;se.stateAfter=ce==y-1||ce%5==0||ce>=E.viewFrom&&ce<E.viewTo?ae.save():null,ae.nextLine()}),x&&(b.modeFrontier=ae.line),ae}function rn(a,y,x,b){var E=a.doc.mode,z=new Yt(y,a.options.tabSize,x);for(z.start=z.pos=b||0,y==""&&bt(E,x.state);!z.eol();)ht(E,z,x.state),z.start=z.pos}function bt(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=oi(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function ht(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=oi(a,x).mode);var z=a.token(y,x);if(y.pos>y.start)return z}throw new Error("Mode "+a.name+" failed to advance stream.")}var ke=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function nn(a,y,x,b){var E=a.doc,z=E.mode,re;y=Mt(E,y);var ae=st(E,y.line),se=Bn(a,y.line,x),ce=new Yt(ae.text,a.options.tabSize,se),xe;for(b&&(xe=[]);(b||ce.pos<y.ch)&&!ce.eol();)ce.start=ce.pos,re=ht(z,ce,se.state),b&&xe.push(new ke(ce,re,ui(E.mode,se.state)));return b?xe:new ke(ce,re,se.state)}function En(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 Pn(a,y,x,b,E,z,re){var ae=x.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var se=0,ce=null,xe=new Yt(y,a.options.tabSize,b),Be,Qe=a.options.addModeClass&&[null];for(y==""&&En(bt(x,b.state),z);!xe.eol();){if(xe.pos>a.options.maxHighlightLength?(ae=!1,re&&rn(a,y,b,xe.pos),xe.pos=y.length,Be=null):Be=En(ht(x,xe,b.state,Qe),z),Qe){var qe=Qe[0].name;qe&&(Be="m-"+(Be?qe+" "+Be:qe))}if(!ae||ce!=Be){for(;se<xe.start;)se=Math.min(xe.start,se+5e3),E(se,ce);ce=Be}xe.start=xe.pos}for(;se<xe.pos;){var Tt=Math.min(xe.pos,se+5e3);E(Tt,ce),se=Tt}}function jn(a,y,x){for(var b,E,z=a.doc,re=x?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>re;--ae){if(ae<=z.first)return z.first;var se=st(z,ae-1),ce=se.stateAfter;if(ce&&(!x||ae+(ce instanceof Te?ce.lookAhead:0)<=z.modeFrontier))return ae;var xe=me(se.text,null,a.options.tabSize);(E==null||b>xe)&&(E=ae-1,b=xe)}return E}function Qn(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=st(a,b).stateAfter;if(E&&(!(E instanceof Te)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var an=!1,Nn=!1;function qn(){an=!0}function Vn(){Nn=!0}function Xt(a,y,x){this.marker=a,this.from=y,this.to=x}function wn(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Fn(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function Wn(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function zn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||!z.marker.insertLeft)){var se=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(b||(b=[])).push(new Xt(re,z.from,se?null:z.to))}}return b}function Hn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(ae||z.from==y&&re.type=="bookmark"&&(!x||z.marker.insertLeft)){var se=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(b||(b=[])).push(new Xt(re,se?null:z.from-y,z.to==null?null:z.to-y))}}return b}function Un(a,y){if(y.full)return null;var x=It(a,y.from.line)&&st(a,y.from.line).markedSpans,b=It(a,y.to.line)&&st(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,z=y.to.ch,re=At(y.from,y.to)==0,ae=zn(x,E,re),se=Hn(b,z,re),ce=y.text.length==1,xe=be(y.text).length+(ce?E:0);if(ae)for(var Be=0;Be<ae.length;++Be){var Qe=ae[Be];if(Qe.to==null){var qe=wn(se,Qe.marker);qe?ce&&(Qe.to=qe.to==null?null:qe.to+xe):Qe.to=E}}if(se)for(var Tt=0;Tt<se.length;++Tt){var Zt=se[Tt];if(Zt.to!=null&&(Zt.to+=xe),Zt.from==null){var fn=wn(ae,Zt.marker);fn||(Zt.from=xe,ce&&(ae||(ae=[])).push(Zt))}else Zt.from+=xe,ce&&(ae||(ae=[])).push(Zt)}ae&&(ae=ni(ae)),se&&se!=ae&&(se=ni(se));var Cn=[ae];if(!ce){var Mn=y.text.length-2,Sn;if(Mn>0&&ae)for(var In=0;In<ae.length;++In)ae[In].to==null&&(Sn||(Sn=[])).push(new Xt(ae[In].marker,null,null));for(var ii=0;ii<Mn;++ii)Cn.push(Sn);Cn.push(se)}return Cn}function ni(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 Tn(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(qe){if(qe.markedSpans)for(var Tt=0;Tt<qe.markedSpans.length;++Tt){var Zt=qe.markedSpans[Tt].marker;Zt.readOnly&&(!b||Ct(b,Zt)==-1)&&(b||(b=[])).push(Zt)}}),!b)return null;for(var E=[{from:y,to:x}],z=0;z<b.length;++z)for(var re=b[z],ae=re.find(0),se=0;se<E.length;++se){var ce=E[se];if(!(At(ce.to,ae.from)<0||At(ce.from,ae.to)>0)){var xe=[se,1],Be=At(ce.from,ae.from),Qe=At(ce.to,ae.to);(Be<0||!re.inclusiveLeft&&!Be)&&xe.push({from:ce.from,to:ae.from}),(Qe>0||!re.inclusiveRight&&!Qe)&&xe.push({from:ae.to,to:ce.to}),E.splice.apply(E,xe),se+=xe.length-3}}return E}function fi(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function _n(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function ln(a){return a.inclusiveLeft?-1:0}function Kn(a){return a.inclusiveRight?1:0}function Xn(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),z=At(b.from,E.from)||ln(a)-ln(y);if(z)return-z;var re=At(b.to,E.to)||Kn(a)-Kn(y);return re||y.id-a.id}function Li(a,y){var x=Nn&&a.markedSpans,b;if(x)for(var E=void 0,z=0;z<x.length;++z)E=x[z],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||Xn(b,E.marker)<0)&&(b=E.marker);return b}function On(a){return Li(a,!0)}function Lt(a){return Li(a,!1)}function zt(a,y){var x=Nn&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var z=x[E];z.marker.collapsed&&(z.from==null||z.from<y)&&(z.to==null||z.to>y)&&(!b||Xn(b,z.marker)<0)&&(b=z.marker)}return b}function Vt(a,y,x,b,E){var z=st(a,y),re=Nn&&z.markedSpans;if(re)for(var ae=0;ae<re.length;++ae){var se=re[ae];if(se.marker.collapsed){var ce=se.marker.find(0),xe=At(ce.from,x)||ln(se.marker)-ln(E),Be=At(ce.to,b)||Kn(se.marker)-Kn(E);if(!(xe>=0&&Be<=0||xe<=0&&Be>=0)&&(xe<=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?At(ce.to,x)>=0:At(ce.to,x)>0)||xe>=0&&(se.marker.inclusiveRight&&E.inclusiveLeft?At(ce.from,b)<=0:At(ce.from,b)<0)))return!0}}}function Ot(a){for(var y;y=On(a);)a=y.find(-1,!0).line;return a}function kn(a){for(var y;y=Lt(a);)a=y.find(1,!0).line;return a}function li(a){for(var y,x;y=Lt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function Wt(a,y){var x=st(a,y),b=Ot(x);return x==b?y:De(b)}function Ht(a,y){if(y>a.lastLine())return y;var x=st(a,y),b;if(!mn(a,x))return y;for(;b=Lt(x);)x=b.find(1,!0).line;return De(x)+1}function mn(a,y){var x=Nn&&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&&yn(a,y,b))return!0}}}function yn(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return yn(a,b.line,wn(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,z=0;z<y.markedSpans.length;++z)if(E=y.markedSpans[z],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&yn(a,y,E))return!0}function $n(a){a=Ot(a);for(var y=0,x=a.parent,b=0;b<x.lines.length;++b){var E=x.lines[b];if(E==a)break;y+=E.height}for(var z=x.parent;z;x=z,z=x.parent)for(var re=0;re<z.children.length;++re){var ae=z.children[re];if(ae==x)break;y+=ae.height}return y}function Pi(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=On(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Lt(b);){var z=x.find(0,!0);y-=b.text.length-z.from.ch,b=z.to.line,y+=b.text.length-z.to.ch}return y}function bi(a){var y=a.display,x=a.doc;y.maxLine=st(x,x.first),y.maxLineLength=Pi(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=Pi(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var _i=function(a,y,x){this.text=a,_n(this,y),this.height=x?x(this):1};_i.prototype.lineNo=function(){return De(this)},Gt(_i);function Ii(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),fi(a),_n(a,x);var E=b?b(a):1;E!=a.height&&di(a,E)}function Ri(a){a.parent=null,fi(a)}var ji={},zi={};function Zi(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?zi:ji;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function qi(a,y){var x=ot("span",null,null,Fe?"padding-right: .1px":null),b={pre:ot("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var z=E?y.rest[E-1]:y.line,re=void 0;b.pos=0,b.addToken=Ar,ri(a.display.measure)&&(re=ue(z,a.doc.direction))&&(b.addToken=lr(b.addToken,re)),b.map=[];var ae=y!=a.display.externalMeasured&&De(z);Mi(z,b,St(a,z,ae)),z.styleClasses&&(z.styleClasses.bgClass&&(b.bgClass=pn(z.styleClasses.bgClass,b.bgClass||"")),z.styleClasses.textClass&&(b.textClass=pn(z.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(Ai(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(Fe){var se=b.content.lastChild;(/\bcm-tab\b/.test(se.className)||se.querySelector&&se.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return kt(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=pn(b.pre.className,b.textClass||"")),b}function gr(a){var y=Ke("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Ar(a,y,x,b,E,z,re){if(y){var ae=a.splitSpaces?pr(y,a.trailingSpace):y,se=a.cm.state.specialChars,ce=!1,xe;if(!se.test(y))a.col+=y.length,xe=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,xe),pe&&je<9&&(ce=!0),a.pos+=y.length;else{xe=document.createDocumentFragment();for(var Be=0;;){se.lastIndex=Be;var Qe=se.exec(y),qe=Qe?Qe.index-Be:y.length-Be;if(qe){var Tt=document.createTextNode(ae.slice(Be,Be+qe));pe&&je<9?xe.appendChild(Ke("span",[Tt])):xe.appendChild(Tt),a.map.push(a.pos,a.pos+qe,Tt),a.col+=qe,a.pos+=qe}if(!Qe)break;Be+=qe+1;var Zt=void 0;if(Qe[0]==" "){var fn=a.cm.options.tabSize,Cn=fn-a.col%fn;Zt=xe.appendChild(Ke("span",Me(Cn),"cm-tab")),Zt.setAttribute("role","presentation"),Zt.setAttribute("cm-text"," "),a.col+=Cn}else Qe[0]=="\r"||Qe[0]==`
`?(Zt=xe.appendChild(Ke("span",Qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Zt.setAttribute("cm-text",Qe[0]),a.col+=1):(Zt=a.cm.options.specialCharPlaceholder(Qe[0]),Zt.setAttribute("cm-text",Qe[0]),pe&&je<9?xe.appendChild(Ke("span",[Zt])):xe.appendChild(Zt),a.col+=1);a.map.push(a.pos,a.pos+1,Zt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||ce||z||re){var Mn=x||"";b&&(Mn+=b),E&&(Mn+=E);var Sn=Ke("span",[xe],Mn,z);if(re)for(var In in re)re.hasOwnProperty(In)&&In!="style"&&In!="class"&&Sn.setAttribute(In,re[In]);return a.content.appendChild(Sn)}a.content.appendChild(xe)}}function pr(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var z=a.charAt(E);z==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(z="\xA0"),b+=z,x=z==" "}return b}function lr(a,y){return function(x,b,E,z,re,ae,se){E=E?E+" cm-force-border":"cm-force-border";for(var ce=x.pos,xe=ce+b.length;;){for(var Be=void 0,Qe=0;Qe<y.length&&(Be=y[Qe],!(Be.to>ce&&Be.from<=ce));Qe++);if(Be.to>=xe)return a(x,b,E,z,re,ae,se);a(x,b.slice(0,Be.to-ce),E,z,null,ae,se),z=null,b=b.slice(Be.to-ce),ce=Be.to}}}function Wr(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 Mi(a,y,x){var b=a.markedSpans,E=a.text,z=0;if(!b){for(var re=1;re<x.length;re+=2)y.addToken(y,E.slice(z,z=x[re]),Zi(x[re+1],y.cm.options));return}for(var ae=E.length,se=0,ce=1,xe="",Be,Qe,qe=0,Tt,Zt,fn,Cn,Mn;;){if(qe==se){Tt=Zt=fn=Qe="",Mn=null,Cn=null,qe=1/0;for(var Sn=[],In=void 0,ii=0;ii<b.length;++ii){var Jn=b[ii],Di=Jn.marker;if(Di.type=="bookmark"&&Jn.from==se&&Di.widgetNode)Sn.push(Di);else if(Jn.from<=se&&(Jn.to==null||Jn.to>se||Di.collapsed&&Jn.to==se&&Jn.from==se)){if(Jn.to!=null&&Jn.to!=se&&qe>Jn.to&&(qe=Jn.to,Zt=""),Di.className&&(Tt+=" "+Di.className),Di.css&&(Qe=(Qe?Qe+";":"")+Di.css),Di.startStyle&&Jn.from==se&&(fn+=" "+Di.startStyle),Di.endStyle&&Jn.to==qe&&(In||(In=[])).push(Di.endStyle,Jn.to),Di.title&&((Mn||(Mn={})).title=Di.title),Di.attributes)for(var Vi in Di.attributes)(Mn||(Mn={}))[Vi]=Di.attributes[Vi];Di.collapsed&&(!Cn||Xn(Cn.marker,Di)<0)&&(Cn=Jn)}else Jn.from>se&&qe>Jn.from&&(qe=Jn.from)}if(In)for(var fr=0;fr<In.length;fr+=2)In[fr+1]==qe&&(Zt+=" "+In[fr]);if(!Cn||Cn.from==se)for(var Yi=0;Yi<Sn.length;++Yi)Wr(y,0,Sn[Yi]);if(Cn&&(Cn.from||0)==se){if(Wr(y,(Cn.to==null?ae+1:Cn.to)-se,Cn.marker,Cn.from==null),Cn.to==null)return;Cn.to==se&&(Cn=!1)}}if(se>=ae)break;for(var Hr=Math.min(ae,qe);;){if(xe){var Pr=se+xe.length;if(!Cn){var nr=Pr>Hr?xe.slice(0,Hr-se):xe;y.addToken(y,nr,Be?Be+Tt:Tt,fn,se+nr.length==qe?Zt:"",Qe,Mn)}if(Pr>=Hr){xe=xe.slice(Hr-se),se=Hr;break}se=Pr,fn=""}xe=E.slice(z,z=x[ce++]),Be=Zi(x[ce++],y.cm.options)}}}function jr(a,y,x){this.line=y,this.rest=li(y),this.size=this.rest?De(be(this.rest))-x+1:1,this.node=this.text=null,this.hidden=mn(a,y)}function Xi(a,y,x){for(var b=[],E,z=y;z<x;z=E){var re=new jr(a.doc,st(a.doc,z),z);E=z+re.size,b.push(re)}return b}var Cr=null;function qr(a){Cr?Cr.ops.push(a):a.ownsGroup=Cr={ops:[a],delayedCallbacks:[]}}function Sr(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 yr(a,y){var x=a.ownsGroup;if(x)try{Sr(x)}finally{Cr=null,y(x)}}var sr=null;function Wi(a,y){var x=vt(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Cr?E=Cr.delayedCallbacks:sr?E=sr:(E=sr=[],setTimeout(rr,0));for(var z=function(ae){E.push(function(){return x[ae].apply(null,b)})},re=0;re<x.length;++re)z(re)}}function rr(){var a=sr;sr=null;for(var y=0;y<a.length;++y)a[y]()}function Vr(a,y,x,b){for(var E=0;E<y.changes.length;E++){var z=y.changes[E];z=="text"?Nr(a,y):z=="gutter"?ci(a,y,x,b):z=="class"?ei(a,y):z=="widget"&&ai(a,y,b)}y.changes=null}function Fr(a){return a.node==a.text&&(a.node=Ke("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),pe&&je<8&&(a.node.style.zIndex=2)),a.node}function Ki(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=Fr(y);y.background=b.insertBefore(Ke("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function oo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):qi(a,y)}function Nr(a,y){var x=y.text.className,b=oo(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,ei(a,y)):x&&(y.text.className=x)}function ei(a,y){Ki(a,y),y.line.wrapClass?Fr(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 ci(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=Fr(y);y.gutterBackground=Ke("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var z=y.line.gutterMarkers;if(a.options.lineNumbers||z){var re=Fr(y),ae=y.gutter=Ke("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),re.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(Ke("div",Et(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=a.display.gutterSpecs[se].className,xe=z.hasOwnProperty(ce)&&z[ce];xe&&ae.appendChild(Ke("div",[xe],"CodeMirror-gutter-elt","left: "+b.gutterLeft[ce]+"px; width: "+b.gutterWidth[ce]+"px"))}}}function ai(a,y,x){y.alignable&&(y.alignable=null);for(var b=wt("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);hi(a,y,x)}function An(a,y,x,b){var E=oo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),ei(a,y),ci(a,y,x,b),hi(a,y,b),y.node}function hi(a,y,x){if(Oi(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Oi(a,y.rest[b],y,x,!1)}function Oi(a,y,x,b,E){if(y.widgets)for(var z=Fr(x),re=0,ae=y.widgets;re<ae.length;++re){var se=ae[re],ce=Ke("div",[se.node],"CodeMirror-linewidget"+(se.className?" "+se.className:""));se.handleMouseEvents||ce.setAttribute("cm-ignore-events","true"),_r(se,ce,x,b),a.display.input.setUneditable(ce),E&&se.above?z.insertBefore(ce,x.gutter||x.text):z.appendChild(ce),Wi(se,"redraw")}}function _r(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 ur(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!nt(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;"),Ce(y.display.measure,Ke("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function tr(a,y){for(var x=Ei(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 Qi(a){return a.lineSpace.offsetTop}function Ur(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function to(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ce(a.measure,Ke("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 Ir(a){return on-a.display.nativeBarWidth}function no(a){return a.display.scroller.clientWidth-Ir(a)-a.display.barWidth}function ao(a){return a.display.scroller.clientHeight-Ir(a)-a.display.barHeight}function Xr(a,y,x){var b=a.options.lineWrapping,E=b&&no(a);if(!y.measure.heights||b&&y.measure.width!=E){var z=y.measure.heights=[];if(b){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),ae=0;ae<re.length-1;ae++){var se=re[ae],ce=re[ae+1];Math.abs(se.bottom-ce.bottom)>2&&z.push((se.bottom+ce.top)/2-x.top)}}z.push(x.bottom-x.top)}}function Po(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(De(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=Ot(y);var x=De(y),b=a.display.externalMeasured=new jr(a.doc,y,x);b.lineN=x;var E=b.built=qi(a,b);return b.text=E.pre,Ce(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Kr(a,co(a,y),x,b)}function io(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 co(a,y){var x=De(y),b=io(a,x);b&&!b.text?b=null:b&&b.changes&&(Vr(a,b,x,fo(a)),a.curOp.forceUpdate=!0),b||(b=ja(a,y));var E=Po(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Kr(a,y,x,b,E){y.before&&(x=-1);var z=x+(b||""),re;return y.cache.hasOwnProperty(z)?re=y.cache[z]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Xr(a,y.view,y.rect),y.hasHeights=!0),re=wa(a,y,x,b),re.bogus||(y.cache[z]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,z,re,ae,se,ce=0;ce<a.length;ce+=3)if(ae=a[ce],se=a[ce+1],y<ae?(E=0,z=1,re="left"):y<se?(E=y-ae,z=E+1):(ce==a.length-3||y==se&&a[ce+3]>y)&&(z=se-ae,E=z-1,y>=se&&(re="right")),E!=null){if(b=a[ce+2],ae==se&&x==(b.insertLeft?"left":"right")&&(re=x),x=="left"&&E==0)for(;ce&&a[ce-2]==a[ce-3]&&a[ce-1].insertLeft;)b=a[(ce-=3)+2],re="left";if(x=="right"&&E==se-ae)for(;ce<a.length-3&&a[ce+3]==a[ce+4]&&!a[ce+5].insertLeft;)b=a[(ce+=3)+2],re="right";break}return{node:b,start:E,end:z,collapse:re,coverStart:ae,coverEnd:se}}function Va(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),z=E.node,re=E.start,ae=E.end,se=E.collapse,ce;if(z.nodeType==3){for(var xe=0;xe<4;xe++){for(;re&&Nt(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+ae<E.coverEnd&&Nt(y.line.text.charAt(E.coverStart+ae));)++ae;if(pe&&je<9&&re==0&&ae==E.coverEnd-E.coverStart?ce=z.parentNode.getBoundingClientRect():ce=Va(_e(z,re,ae).getClientRects(),b),ce.left||ce.right||re==0)break;ae=re,re=re-1,se="right"}pe&&je<11&&(ce=Ua(a.display.measure,ce))}else{re>0&&(se=b="right");var Be;a.options.lineWrapping&&(Be=z.getClientRects()).length>1?ce=Be[b=="right"?Be.length-1:0]:ce=z.getBoundingClientRect()}if(pe&&je<9&&!re&&(!ce||!ce.left&&!ce.right)){var Qe=z.parentNode.getClientRects()[0];Qe?ce={left:Qe.left,right:Qe.left+Qr(a.display),top:Qe.top,bottom:Qe.bottom}:ce=ba}for(var qe=ce.top-y.rect.top,Tt=ce.bottom-y.rect.top,Zt=(qe+Tt)/2,fn=y.view.measure.heights,Cn=0;Cn<fn.length-1&&!(Zt<fn[Cn]);Cn++);var Mn=Cn?fn[Cn-1]:0,Sn=fn[Cn],In={left:(se=="right"?ce.right:ce.left)-y.rect.left,right:(se=="left"?ce.left:ce.right)-y.rect.left,top:Mn,bottom:Sn};return!ce.left&&!ce.right&&(In.bogus=!0),a.options.singleCursorHeightPerLine||(In.rtop=qe,In.rbottom=Tt),In}function Ua(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!wi(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,sn(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 qo(){return Se&&Ae?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return Se&&Ae?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=ur(a.widgets[x]));return y}function To(a,y,x,b,E){if(!E){var z=Xo(y);x.top+=z,x.bottom+=z}if(b=="line")return x;b||(b="local");var re=$n(y);if(b=="local"?re+=Qi(a.display):re-=a.display.viewOffset,b=="page"||b=="window"){var ae=a.display.lineSpace.getBoundingClientRect();re+=ae.top+(b=="window"?0:Ca());var se=ae.left+(b=="window"?0:qo());x.left+=se,x.right+=se}return x.top+=re,x.bottom+=re,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=qo(),E-=Ca();else if(x=="local"||!x){var z=a.display.sizer.getBoundingClientRect();b+=z.left,E+=z.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:b-re.left,top:E-re.top}}function Mo(a,y,x,b,E){return b||(b=st(a.doc,y.line)),To(a,b,ya(a,b,y.ch,E),x)}function Dr(a,y,x,b,E,z){b=b||st(a.doc,y.line),E||(E=co(a,b));function re(Tt,Zt){var fn=Kr(a,E,Tt,Zt?"right":"left",z);return Zt?fn.left=fn.right:fn.right=fn.left,To(a,b,fn,x)}var ae=ue(b,a.doc.direction),se=y.ch,ce=y.sticky;if(se>=b.text.length?(se=b.text.length,ce="before"):se<=0&&(se=0,ce="after"),!ae)return re(ce=="before"?se-1:se,ce=="before");function xe(Tt,Zt,fn){var Cn=ae[Zt],Mn=Cn.level==1;return re(fn?Tt-1:Tt,Mn!=fn)}var Be=ee(ae,se,ce),Qe=ne,qe=xe(se,Be,ce=="before");return Qe!=null&&(qe.other=xe(se,Qe,ce!="before")),qe}function Fi(a,y){var x=0;y=Mt(a.doc,y),a.options.lineWrapping||(x=Qr(a.display)*y.ch);var b=st(a.doc,y.line),E=$n(b)+Qi(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function xi(a,y,x,b,E){var z=Ge(a,y,x);return z.xRel=E,b&&(z.outside=b),z}function vr(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return xi(b.first,0,null,-1,-1);var E=Ne(b,x),z=b.first+b.size-1;if(E>z)return xi(b.first+b.size-1,st(b,z).text.length,null,1,1);y<0&&(y=0);for(var re=st(b,E);;){var ae=Jr(a,re,E,y,x),se=zt(re,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!se)return ae;var ce=se.find(1);if(ce.line==E)return ce;re=st(b,E=ce.line)}}function br(a,y,x,b){b-=Xo(y);var E=y.text.length,z=Jt(function(re){return Kr(a,x,re-1).bottom<=b},E,0);return E=Jt(function(re){return Kr(a,x,re).top>b},z,E),{begin:z,end:E}}function $i(a,y,x,b){x||(x=co(a,y));var E=To(a,y,Kr(a,x,b),"line").top;return br(a,y,x,E)}function or(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Jr(a,y,x,b,E){E-=$n(y);var z=co(a,y),re=Xo(y),ae=0,se=y.text.length,ce=!0,xe=ue(y,a.doc.direction);if(xe){var Be=(a.options.lineWrapping?lo:Yr)(a,y,x,z,xe,b,E);ce=Be.level!=1,ae=ce?Be.from:Be.to-1,se=ce?Be.to:Be.from-1}var Qe=null,qe=null,Tt=Jt(function(ii){var Jn=Kr(a,z,ii);return Jn.top+=re,Jn.bottom+=re,or(Jn,b,E,!1)?(Jn.top<=E&&Jn.left<=b&&(Qe=ii,qe=Jn),!0):!1},ae,se),Zt,fn,Cn=!1;if(qe){var Mn=b-qe.left<qe.right-b,Sn=Mn==ce;Tt=Qe+(Sn?0:1),fn=Sn?"after":"before",Zt=Mn?qe.left:qe.right}else{!ce&&(Tt==se||Tt==ae)&&Tt++,fn=Tt==0?"after":Tt==y.text.length?"before":Kr(a,z,Tt-(ce?1:0)).bottom+re<=E==ce?"after":"before";var In=Dr(a,Ge(x,Tt,fn),"line",y,z);Zt=In.left,Cn=E<In.top?-1:E>=In.bottom?1:0}return Tt=gn(y.text,Tt,1),xi(x,Tt,fn,Cn,b-Zt)}function Yr(a,y,x,b,E,z,re){var ae=Jt(function(Be){var Qe=E[Be],qe=Qe.level!=1;return or(Dr(a,Ge(x,qe?Qe.to:Qe.from,qe?"before":"after"),"line",y,b),z,re,!0)},0,E.length-1),se=E[ae];if(ae>0){var ce=se.level!=1,xe=Dr(a,Ge(x,ce?se.from:se.to,ce?"after":"before"),"line",y,b);or(xe,z,re,!0)&&xe.top>re&&(se=E[ae-1])}return se}function lo(a,y,x,b,E,z,re){var ae=br(a,y,b,re),se=ae.begin,ce=ae.end;/\s/.test(y.text.charAt(ce-1))&&ce--;for(var xe=null,Be=null,Qe=0;Qe<E.length;Qe++){var qe=E[Qe];if(!(qe.from>=ce||qe.to<=se)){var Tt=qe.level!=1,Zt=Kr(a,b,Tt?Math.min(ce,qe.to)-1:Math.max(se,qe.from)).right,fn=Zt<z?z-Zt+1e9:Zt-z;(!xe||Be>fn)&&(xe=qe,Be=fn)}}return xe||(xe=E[E.length-1]),xe.from<se&&(xe={from:se,to:xe.to,level:xe.level}),xe.to>ce&&(xe={from:xe.from,to:ce,level:xe.level}),xe}var Rr;function Or(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Rr==null){Rr=Ke("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Rr.appendChild(document.createTextNode("x")),Rr.appendChild(Ke("br"));Rr.appendChild(document.createTextNode("x"))}Ce(a.measure,Rr);var x=Rr.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),sn(a.measure),x||1}function Qr(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ke("span","xxxxxxxxxx"),x=Ke("pre",[y],"CodeMirror-line-like");Ce(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function fo(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var ae=a.display.gutterSpecs[re].className;x[ae]=z.offsetLeft+z.clientLeft+E,b[ae]=z.clientWidth}return{fixedPos: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 wl(a){var y=Or(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Qr(a.display)-3);return function(E){if(mn(a.doc,E))return 0;var z=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(z+=E.widgets[re].height);return x?z+(Math.ceil(E.text.length/b)||1)*y:z+y}}function Ya(a){var y=a.doc,x=wl(a);y.iter(function(b){var E=x(b);E!=b.height&&di(b,E)})}function Co(a,y,x,b){var E=a.display;if(!x&&Ei(y).getAttribute("cm-not-content")=="true")return null;var z,re,ae=E.lineSpace.getBoundingClientRect();try{z=y.clientX-ae.left,re=y.clientY-ae.top}catch(Be){return null}var se=vr(a,z,re),ce;if(b&&se.xRel>0&&(ce=st(a.doc,se.line).text).length==se.ch){var xe=me(ce,ce.length,a.options.tabSize)-ce.length;se=Ge(se.line,Math.max(0,Math.round((z-to(a.display).left)/Qr(a.display))-xe))}return se}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 Br(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)Nn&&Wt(a.doc,y)<E.viewTo&&po(a);else if(x<=E.viewFrom)Nn&&Ht(a.doc,x+b)>E.viewFrom?po(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)po(a);else if(y<=E.viewFrom){var z=Ea(a,x,x+b,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=b):po(a)}else if(x>=E.viewTo){var re=Ea(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):po(a)}else{var ae=Ea(a,y,y,-1),se=Ea(a,x,x+b,1);ae&&se?(E.view=E.view.slice(0,ae.index).concat(Xi(a,ae.lineN,se.lineN)).concat(E.view.slice(se.index)),E.viewTo+=b):po(a)}var ce=E.externalMeasured;ce&&(x<ce.lineN?ce.lineN+=b:y<ce.lineN+ce.size&&(E.externalMeasured=null))}function ho(a,y,x){a.curOp.viewChanged=!0;var b=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(b.externalMeasured=null),!(y<b.viewFrom||y>=b.viewTo)){var z=b.view[So(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);Ct(re,x)==-1&&re.push(x)}}}function po(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Ea(a,y,x,b){var E=So(a,y),z,re=a.display.view;if(!Nn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,se=0;se<E;se++)ae+=re[se].size;if(ae!=y){if(b>0){if(E==re.length-1)return null;z=ae+re[E].size-y,E++}else z=ae-y;y+=z,x+=z}for(;Wt(a.doc,x)!=x;){if(E==(b<0?0:re.length-1))return null;x+=b*re[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function zs(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Xi(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Xi(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(Xi(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,So(a,x)))),b.viewTo=x}function Cl(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 Jo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Sl(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),z=b.selection=document.createDocumentFragment(),re=0;re<x.sel.ranges.length;re++)if(!(!y&&re==x.sel.primIndex)){var ae=x.sel.ranges[re];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var se=ae.empty();(se||a.options.showCursorWhenSelecting)&&El(a,ae.head,E),se||Hs(a,ae,z)}}return b}function El(a,y,x){var b=Dr(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ke("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var z=x.appendChild(Ke("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=b.other.left+"px",z.style.top=b.other.top+"px",z.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function ka(a,y){return a.top-y.top||a.left-y.left}function Hs(a,y,x){var b=a.display,E=a.doc,z=document.createDocumentFragment(),re=to(a.display),ae=re.left,se=Math.max(b.sizerWidth,no(a)-b.sizer.offsetLeft)-re.right,ce=E.direction=="ltr";function xe(Sn,In,ii,Jn){In<0&&(In=0),In=Math.round(In),Jn=Math.round(Jn),z.appendChild(Ke("div",null,"CodeMirror-selected","position: absolute; left: "+Sn+`px;
top: `+In+"px; width: "+(ii==null?se-Sn:ii)+`px;
height: `+(Jn-In)+"px"))}function Be(Sn,In,ii){var Jn=st(E,Sn),Di=Jn.text.length,Vi,fr;function Yi(nr,Tr){return Mo(a,Ge(Sn,nr),"div",Jn,Tr)}function Hr(nr,Tr,mr){var ar=$i(a,Jn,null,nr),ir=Tr=="ltr"==(mr=="after")?"left":"right",Ji=mr=="after"?ar.begin:ar.end-(/\s/.test(Jn.text.charAt(ar.end-1))?2:1);return Yi(Ji,ir)[ir]}var Pr=ue(Jn,E.direction);return le(Pr,In||0,ii==null?Di:ii,function(nr,Tr,mr,ar){var ir=mr=="ltr",Ji=Yi(nr,ir?"left":"right"),Mr=Yi(Tr-1,ir?"right":"left"),Vo=In==null&&nr==0,xo=ii==null&&Tr==Di,wr=ar==0,ro=!Pr||ar==Pr.length-1;if(Mr.top-Ji.top<=3){var hr=(ce?Vo:xo)&&wr,bl=(ce?xo:Vo)&&ro,uo=hr?ae:(ir?Ji:Mr).left,Bo=bl?se:(ir?Mr:Ji).right;xe(uo,Ji.top,Bo-uo,Ji.bottom)}else{var Lo,kr,Uo,xl;ir?(Lo=ce&&Vo&&wr?ae:Ji.left,kr=ce?se:Hr(nr,mr,"before"),Uo=ce?ae:Hr(Tr,mr,"after"),xl=ce&&xo&&ro?se:Mr.right):(Lo=ce?Hr(nr,mr,"before"):ae,kr=!ce&&Vo&&wr?se:Ji.right,Uo=!ce&&xo&&ro?ae:Mr.left,xl=ce?Hr(Tr,mr,"after"):se),xe(Lo,Ji.top,kr-Lo,Ji.bottom),Ji.bottom<Mr.top&&xe(ae,Ji.bottom,null,Mr.top),xe(Uo,Mr.top,xl-Uo,Mr.bottom)}(!Vi||ka(Ji,Vi)<0)&&(Vi=Ji),ka(Mr,Vi)<0&&(Vi=Mr),(!fr||ka(Ji,fr)<0)&&(fr=Ji),ka(Mr,fr)<0&&(fr=Mr)}),{start:Vi,end:fr}}var Qe=y.from(),qe=y.to();if(Qe.line==qe.line)Be(Qe.line,Qe.ch,qe.ch);else{var Tt=st(E,Qe.line),Zt=st(E,qe.line),fn=Ot(Tt)==Ot(Zt),Cn=Be(Qe.line,Qe.ch,fn?Tt.text.length+1:null).end,Mn=Be(qe.line,fn?0:null,qe.ch).start;fn&&(Cn.top<Mn.top-2?(xe(Cn.right,Cn.top,null,Cn.bottom),xe(ae,Mn.top,Mn.left,Mn.bottom)):xe(Cn.right,Cn.top,Mn.left-Cn.right,Cn.bottom)),Cn.bottom<Mn.top&&xe(ae,Cn.bottom,null,Mn.top)}x.appendChild(z)}function qa(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()||Fo(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function kl(a){a.state.focused||(a.display.input.focus(),Xa(a))}function Al(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Fo(a))},100)}function Xa(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(kt(a,"focus",a,y),a.state.focused=!0,dt(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Fe&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),qa(a))}function Fo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(kt(a,"blur",a,y),a.state.focused=!1,pt(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Aa(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b<y.view.length;b++){var E=y.view[b],z=a.options.lineWrapping,re=void 0,ae=0;if(!E.hidden){if(pe&&je<8){var se=E.node.offsetTop+E.node.offsetHeight;re=se-x,x=se}else{var ce=E.node.getBoundingClientRect();re=ce.bottom-ce.top,!z&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-ce.left-1)}var xe=E.line.height-re;if((xe>.005||xe<-.005)&&(di(E.line,re),Dl(E.line),E.rest))for(var Be=0;Be<E.rest.length;Be++)Dl(E.rest[Be]);if(ae>a.display.sizerWidth){var Qe=Math.ceil(ae/Qr(a.display));Qe>a.display.maxLineLength&&(a.display.maxLineLength=Qe,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Dl(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-Qi(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,z=Ne(y,b),re=Ne(y,E);if(x&&x.ensure){var ae=x.ensure.from.line,se=x.ensure.to.line;ae<z?(z=ae,re=Ne(y,$n(st(y,ae))+a.wrapper.clientHeight)):Math.min(se,y.lastLine())>=re&&(z=Ne(y,$n(st(y,se))-a.wrapper.clientHeight),re=se)}return{from:z,to:Math.max(re,z+1)}}function Ws(a,y){if(!Oe(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 z=Ke("div","\u200B",null,`position: absolute;
top: `+(y.top-x.viewOffset-Qi(a.display))+`px;
height: `+(y.bottom-y.top+Ir(a)+x.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function Zs(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ge(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ge(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,ae=Dr(a,y),se=!x||x==y?ae:Dr(a,x);E={left:Math.min(ae.left,se.left),top:Math.min(ae.top,se.top)-b,right:Math.max(ae.left,se.left),bottom:Math.max(ae.bottom,se.bottom)+b};var ce=Ja(a,E),xe=a.doc.scrollTop,Be=a.doc.scrollLeft;if(ce.scrollTop!=null&&($o(a,ce.scrollTop),Math.abs(a.doc.scrollTop-xe)>1&&(re=!0)),ce.scrollLeft!=null&&(Eo(a,ce.scrollLeft),Math.abs(a.doc.scrollLeft-Be)>1&&(re=!0)),!re)break}return E}function Gs(a,y){var x=Ja(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&Eo(a,x.scrollLeft)}function Ja(a,y){var x=a.display,b=Or(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,z=ao(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var ae=a.doc.height+Ur(x),se=y.top<b,ce=y.bottom>ae-b;if(y.top<E)re.scrollTop=se?0:y.top;else if(y.bottom>E+z){var xe=Math.min(y.top,(ce?ae:y.bottom)-z);xe!=E&&(re.scrollTop=xe)}var Be=a.options.fixedGutter?0:x.gutters.offsetWidth,Qe=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Be,qe=no(a)-x.gutters.offsetWidth,Tt=y.right-y.left>qe;return Tt&&(y.right=y.left+qe),y.left<10?re.scrollLeft=0:y.left<Qe?re.scrollLeft=Math.max(0,y.left+Be-(Tt?0:10)):y.right>qe+Qe-3&&(re.scrollLeft=y.right+(Tt?0:10)-qe),re}function Qa(a,y){y!=null&&(Ba(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function No(a){Ba(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)&&Ba(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function js(a,y){Ba(a),a.curOp.scrollToPos=y}function Ba(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=Fi(a,y.from),b=Fi(a,y.to);Bl(a,x,b,y.margin)}}function Bl(a,y,x,b){var E=Ja(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||(te||el(a,{top:y}),Ll(a,y,!0),te&&el(a),na(a,100))}function Ll(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 Eo(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,Nl(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+Ur(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+Ir(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=Ke("div",[Ke("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ke("div",[Ke("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),ye(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),ye(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,pe&&je<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var z=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=we&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),z=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.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 _o(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Pl(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&Aa(a),Pl(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Pl(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 Tl={native:ko,null:ta};function Ml(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&pt(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Tl[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),ye(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"?Eo(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&dt(a.display.wrapper,a.display.scrollbars.addClass)}var Vs=0;function Ao(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:++Vs},qr(a.curOp)}function Do(a){var y=a.curOp;y&&yr(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Us(x)})}function Us(a){for(var y=a.ops,x=0;x<y.length;x++)Ks(y[x]);for(var b=0;b<y.length;b++)Ys(y[b]);for(var E=0;E<y.length;E++)qs(y[E]);for(var z=0;z<y.length;z++)Xs(y[z]);for(var re=0;re<y.length;re++)Js(y[re])}function Ks(a){var y=a.cm,x=y.display;$s(y),a.updateMaxLine&&bi(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 La(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Ys(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function qs(a){var y=a.cm,x=y.display;a.updatedDisplay&&Aa(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+Ir(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-no(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Xs(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&Eo(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Ze();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&_o(y,a.barMeasure),a.updatedDisplay&&nl(y,a.barMeasure),a.selectionChanged&&qa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&kl(a.cm)}function Js(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Fl(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ll(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&Eo(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zs(y,Mt(b,a.scrollToPos.from),Mt(b,a.scrollToPos.to),a.scrollToPos.margin);Ws(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var ae=0;ae<z.length;++ae)z[ae].lines.length||kt(z[ae],"hide");if(re)for(var se=0;se<re.length;++se)re[se].lines.length&&kt(re[se],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&kt(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function zr(a,y){if(a.curOp)return y();Ao(a);try{return y()}finally{Do(a)}}function cr(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Ao(a);try{return y.apply(a,arguments)}finally{Do(a)}}}function Er(a){return function(){if(this.curOp)return a.apply(this,arguments);Ao(this);try{return a.apply(this,arguments)}finally{Do(this)}}}function dr(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Ao(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,bn(Qs,a))}function Qs(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Bn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(z){if(b.line>=a.display.viewFrom){var re=z.styles,ae=z.text.length>a.options.maxHighlightLength?ui(y.mode,b.state):null,se=ge(a,z,b,!0);ae&&(b.state=ae),z.styles=se.styles;var ce=z.styleClasses,xe=se.classes;xe?z.styleClasses=xe:ce&&(z.styleClasses=null);for(var Be=!re||re.length!=z.styles.length||ce!=xe&&(!ce||!xe||ce.bgClass!=xe.bgClass||ce.textClass!=xe.textClass),Qe=0;!Be&&Qe<re.length;++Qe)Be=re[Qe]!=z.styles[Qe];Be&&E.push(b.line),z.stateAfter=b.save(),b.nextLine()}else z.text.length<=a.options.maxHighlightLength&&rn(a,z.text,b),z.stateAfter=b.line%5==0?b.save():null,b.nextLine();if(+new Date>x)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&zr(a,function(){for(var z=0;z<E.length;z++)ho(a,E[z],"text")})}}var La=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=no(a),this.force=x,this.dims=fo(a),this.events=[]};La.prototype.signal=function(a,y){_t(a,y)&&this.events.push(arguments)},La.prototype.finish=function(){for(var a=0;a<this.events.length;a++)kt.apply(null,this.events[a])};function $s(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Ir(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Ir(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ze();if(!y||!nt(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&nt(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==Ze())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&nt(document.body,a.anchorNode)&&nt(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 po(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&&Cl(a)==0)return!1;_l(a)&&(po(a),y.dims=fo(a));var E=b.first+b.size,z=Math.max(y.visible.from-a.options.viewportMargin,b.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<z&&z-x.viewFrom<20&&(z=Math.max(b.first,x.viewFrom)),x.viewTo>re&&x.viewTo-re<20&&(re=Math.min(E,x.viewTo)),Nn&&(z=Wt(a.doc,z),re=Ht(a.doc,re));var ae=z!=x.viewFrom||re!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;zs(a,z,re),x.viewOffset=$n(st(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var se=Cl(a);if(!ae&&se==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var ce=eu(a);return se>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),se>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(ce),sn(x.cursorDiv),sn(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 Fl(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==no(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Ur(a.display)-ao(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;Aa(a);var E=ea(a);Jo(a),_o(a,E),nl(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function el(a,y){var x=new La(a,y);if($a(a,x)){Aa(a),Fl(a,x);var b=ea(a);Jo(a),_o(a,b),nl(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,z=b.lineDiv,re=z.firstChild;function ae(Tt){var Zt=Tt.nextSibling;return Fe&&we&&a.display.currentWheelTarget==Tt?Tt.style.display="none":Tt.parentNode.removeChild(Tt),Zt}for(var se=b.view,ce=b.viewFrom,xe=0;xe<se.length;xe++){var Be=se[xe];if(!Be.hidden)if(!Be.node||Be.node.parentNode!=z){var Qe=An(a,Be,ce,x);z.insertBefore(Qe,re)}else{for(;re!=Be.node;)re=ae(re);var qe=E&&y!=null&&y<=ce&&Be.lineNumber;Be.changes&&(Ct(Be.changes,"gutter")>-1&&(qe=!1),Vr(a,Be,ce,x)),qe&&(sn(Be.lineNumber),Be.lineNumber.appendChild(document.createTextNode(Et(a.options,ce)))),re=Be.node.nextSibling}ce+=Be.size}for(;re;)re=ae(re)}function tl(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function nl(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Ir(a)+"px"}function Nl(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,z=b+"px",re=0;re<x.length;re++)if(!x[re].hidden){a.options.fixedGutter&&(x[re].gutter&&(x[re].gutter.style.left=z),x[re].gutterBackground&&(x[re].gutterBackground.style.left=z));var ae=x[re].alignable;if(ae)for(var se=0;se<ae.length;se++)ae[se].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function _l(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Et(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ke("div",[Ke("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=E.firstChild.offsetWidth,re=E.offsetWidth-z;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(z,b.lineGutter.offsetWidth-re)+1,b.lineNumWidth=b.lineNumInnerWidth+re,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",tl(a.display),!0}return!1}function il(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var z=a[E],re=null;if(typeof z!="string"&&(re=z.style,z=z.className),z=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:z,style:re})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function Il(a){var y=a.gutters,x=a.gutterSpecs;sn(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],z=E.className,re=E.style,ae=y.appendChild(Ke("div",null,"CodeMirror-gutter "+z));re&&(ae.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",tl(a)}function ia(a){Il(a.display),Br(a),Nl(a)}function iu(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ke("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ke("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=ot("div",null,"CodeMirror-code"),E.selectionDiv=Ke("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ke("div",null,"CodeMirror-cursors"),E.measure=Ke("div",null,"CodeMirror-measure"),E.lineMeasure=Ke("div",null,"CodeMirror-measure"),E.lineSpace=ot("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=ot("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ke("div",[z],null,"position: relative"),E.sizer=Ke("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ke("div",null,null,"position: absolute; height: "+on+"px; width: 1px;"),E.gutters=Ke("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ke("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ke("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),pe&&je<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Fe&&!(te&&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=il(b.gutters,b.lineNumbers),Il(E),x.init(E)}var Pa=0,Zr=null;pe?Zr=-.53:te?Zr=15:Se?Zr=-.7:Ee&&(Zr=-1/3);function Rl(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 ru(a){var y=Rl(a);return y.x*=Zr,y.y*=Zr,y}function Ol(a,y){var x=Rl(y),b=x.x,E=x.y,z=a.display,re=z.scroller,ae=re.scrollWidth>re.clientWidth,se=re.scrollHeight>re.clientHeight;if(b&&ae||E&&se){if(E&&we&&Fe){e:for(var ce=y.target,xe=z.view;ce!=re;ce=ce.parentNode)for(var Be=0;Be<xe.length;Be++)if(xe[Be].node==ce){a.display.currentWheelTarget=ce;break e}}if(b&&!te&&!he&&Zr!=null){E&&se&&$o(a,Math.max(0,re.scrollTop+E*Zr)),Eo(a,Math.max(0,re.scrollLeft+b*Zr)),(!E||E&&se)&&xn(y),z.wheelStartX=null;return}if(E&&Zr!=null){var Qe=E*Zr,qe=a.doc.scrollTop,Tt=qe+z.wrapper.clientHeight;Qe<0?qe=Math.max(0,qe+Qe-50):Tt=Math.min(a.doc.height,Tt+Qe+50),el(a,{top:qe,bottom:Tt})}Pa<20&&(z.wheelStartX==null?(z.wheelStartX=re.scrollLeft,z.wheelStartY=re.scrollTop,z.wheelDX=b,z.wheelDY=E,setTimeout(function(){if(z.wheelStartX!=null){var Zt=re.scrollLeft-z.wheelStartX,fn=re.scrollTop-z.wheelStartY,Cn=fn&&z.wheelDY&&fn/z.wheelDY||Zt&&z.wheelDX&&Zt/z.wheelDX;z.wheelStartX=z.wheelStartY=null,Cn&&(Zr=(Zr*Pa+Cn)/(Pa+1),++Pa)}},200)):(z.wheelDX+=b,z.wheelDY+=E))}}var Gr=function(a,y){this.ranges=a,this.primIndex=y};Gr.prototype.primary=function(){return this.ranges[this.primIndex]},Gr.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(!tn(x.anchor,b.anchor)||!tn(x.head,b.head))return!1}return!0},Gr.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Hi(qt(this.ranges[y].anchor),qt(this.ranges[y].head));return new Gr(a,this.primIndex)},Gr.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Gr.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(At(y,b.from())>=0&&At(a,b.to())<=0)return x}return-1};var Hi=function(a,y){this.anchor=a,this.head=y};Hi.prototype.from=function(){return Kt(this.anchor,this.head)},Hi.prototype.to=function(){return cn(this.anchor,this.head)},Hi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $r(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Qe,qe){return At(Qe.from(),qe.from())}),x=Ct(y,E);for(var z=1;z<y.length;z++){var re=y[z],ae=y[z-1],se=At(ae.to(),re.from());if(b&&!re.empty()?se>0:se>=0){var ce=Kt(ae.from(),re.from()),xe=cn(ae.to(),re.to()),Be=ae.empty()?re.from()==re.head:ae.from()==ae.head;z<=x&&--x,y.splice(--z,2,new Hi(Be?xe:ce,Be?ce:xe))}}return new Gr(y,x)}function vo(a,y){return new Gr([new Hi(a,y||a)],0)}function mo(a){return a.text?Ge(a.from.line+a.text.length-1,be(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function zl(a,y){if(At(a,y.from)<0)return a;if(At(a,y.to)<=0)return mo(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+=mo(y).ch-y.to.ch),Ge(x,b)}function rl(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new Hi(zl(E.anchor,y),zl(E.head,y)))}return $r(a.cm,x,a.sel.primIndex)}function Hl(a,y,x){return a.line==y.line?Ge(x.line,a.ch-y.ch+x.ch):Ge(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=Ge(a.first,0),z=E,re=0;re<y.length;re++){var ae=y[re],se=Hl(ae.from,E,z),ce=Hl(mo(ae),E,z);if(E=ae.to,z=ce,x=="around"){var xe=a.sel.ranges[re],Be=At(xe.head,xe.anchor)<0;b[re]=new Hi(Be?ce:se,Be?se:ce)}else b[re]=new Hi(se,se)}return new Gr(b,a.sel.primIndex)}function ol(a){a.doc.mode=pi(a.options,a.doc.modeOption),ra(a)}function ra(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&&Br(a)}function Wl(a,y){return y.from.ch==0&&y.to.ch==0&&be(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function al(a,y,x,b){function E(Mn){return x?x[Mn]:null}function z(Mn,Sn,In){Ii(Mn,Sn,In,b),Wi(Mn,"change",Mn,y)}function re(Mn,Sn){for(var In=[],ii=Mn;ii<Sn;++ii)In.push(new _i(ce[ii],E(ii),b));return In}var ae=y.from,se=y.to,ce=y.text,xe=st(a,ae.line),Be=st(a,se.line),Qe=be(ce),qe=E(ce.length-1),Tt=se.line-ae.line;if(y.full)a.insert(0,re(0,ce.length)),a.remove(ce.length,a.size-ce.length);else if(Wl(a,y)){var Zt=re(0,ce.length-1);z(Be,Be.text,qe),Tt&&a.remove(ae.line,Tt),Zt.length&&a.insert(ae.line,Zt)}else if(xe==Be)if(ce.length==1)z(xe,xe.text.slice(0,ae.ch)+Qe+xe.text.slice(se.ch),qe);else{var fn=re(1,ce.length-1);fn.push(new _i(Qe+xe.text.slice(se.ch),qe,b)),z(xe,xe.text.slice(0,ae.ch)+ce[0],E(0)),a.insert(ae.line+1,fn)}else if(ce.length==1)z(xe,xe.text.slice(0,ae.ch)+ce[0]+Be.text.slice(se.ch),E(0)),a.remove(ae.line+1,Tt);else{z(xe,xe.text.slice(0,ae.ch)+ce[0],E(0)),z(Be,Qe+Be.text.slice(se.ch),qe);var Cn=re(1,ce.length-1);Tt>1&&a.remove(ae.line+1,Tt-1),a.insert(ae.line+1,Cn)}Wi(a,"change",a,y)}function go(a,y,x){function b(E,z,re){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var se=E.linked[ae];if(se.doc!=z){var ce=re&&se.sharedHist;x&&!ce||(y(se.doc,ce),b(se.doc,E,ce))}}}b(a,null,!0)}function Zl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),ol(a),Gl(a),a.options.lineWrapping||bi(a),a.options.mode=y.modeOption,Br(a)}function Gl(a){(a.doc.direction=="rtl"?dt:pt)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){zr(a,function(){Gl(a),Br(a)})}function Ta(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ll(a,y){var x={from:qt(y.from),to:mo(y),text:un(a,y.from,y.to)};return Ul(a,x,y.from.line,y.to.line+1),go(a,function(b){return Ul(b,x,y.from.line,y.to.line+1)},!0),x}function jl(a){for(;a.length;){var y=be(a);if(y.ranges)a.pop();else break}}function lu(a,y){if(y)return jl(a.done),be(a.done);if(a.done.length&&!be(a.done).ranges)return be(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),be(a.done)}function Vl(a,y,x,b){var E=a.history;E.undone.length=0;var z=+new Date,re,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=lu(E,E.lastOp==b)))ae=be(re.changes),At(y.from,y.to)==0&&At(y.from,ae.to)==0?ae.to=mo(y):re.changes.push(ll(a,y));else{var se=be(E.done);for((!se||!se.ranges)&&Ma(a.sel,E.done),re={changes:[ll(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=z,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||kt(a,"historyAdded")}function su(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,z=b&&b.origin;x==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||su(a,z,be(E.done),y))?E.done[E.done.length-1]=y:Ma(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=x,b&&b.clearRedo!==!1&&jl(E.undone)}function Ma(a,y){var x=be(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Ul(a,y,x,b){var E=y["spans_"+a.id],z=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[z]=re.markedSpans),++z})}function cu(a){if(!a)return null;for(var y,x=0;x<a.length;++x)a[x].marker.explicitlyCleared?y||(y=a.slice(0,x)):y&&y.push(a[x]);return y?y.length?y:null:a}function du(a,y){var x=y["spans_"+a.id];if(!x)return null;for(var b=[],E=0;E<y.text.length;++E)b.push(cu(x[E]));return b}function Kl(a,y){var x=du(a,y),b=Un(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var z=x[E],re=b[E];if(z&&re)e:for(var ae=0;ae<re.length;++ae){for(var se=re[ae],ce=0;ce<z.length;++ce)if(z[ce].marker==se.marker)continue e;z.push(se)}else re&&(x[E]=re)}return x}function Io(a,y,x){for(var b=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){b.push(x?Gr.prototype.deepCopy.call(z):z);continue}var re=z.changes,ae=[];b.push({changes:ae});for(var se=0;se<re.length;++se){var ce=re[se],xe=void 0;if(ae.push({from:ce.from,to:ce.to,text:ce.text}),y)for(var Be in ce)(xe=Be.match(/^spans_(\d+)$/))&&Ct(y,Number(xe[1]))>-1&&(be(ae)[Be]=ce[Be],delete ce[Be])}}return b}function sl(a,y,x,b){if(b){var E=a.anchor;if(x){var z=At(y,E)<0;z!=At(x,E)<0?(E=y,y=x):z!=At(y,x)<0&&(y=x)}return new Hi(E,y)}else return new Hi(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),xr(a,new Gr([sl(a.sel.primary(),y,x,E)],0),b)}function Yl(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),z=0;z<a.sel.ranges.length;z++)b[z]=sl(a.sel.ranges[z],y[z],null,E);var re=$r(a.cm,b,a.sel.primIndex);xr(a,re,x)}function ul(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,xr(a,$r(a.cm,E,a.sel.primIndex),b)}function ql(a,y,x,b){xr(a,vo(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var z=0;z<E.length;z++)this.ranges[z]=new Hi(Mt(a,E[z].anchor),Mt(a,E[z].head))},origin:x&&x.origin};return kt(a,"beforeSelectionChange",a,b),a.cm&&kt(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?$r(a.cm,b.ranges,b.ranges.length-1):y}function Xl(a,y,x){var b=a.history.done,E=be(b);E&&E.ranges?(b[b.length-1]=y,Na(a,y,x)):xr(a,y,x)}function xr(a,y,x){Na(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Na(a,y,x){(_t(a,"beforeSelectionChange")||a.cm&&_t(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(At(y.primary().head,a.sel.primary().head)<0?-1:1);Jl(a,$l(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&No(a.cm)}function Jl(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,$t(a.cm)),Wi(a,"cursorActivity",a))}function Ql(a){Jl(a,$l(a,a.sel,null,!1))}function $l(a,y,x,b){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],se=_a(a,re.anchor,ae&&ae.anchor,x,b),ce=_a(a,re.head,ae&&ae.head,x,b);(E||se!=re.anchor||ce!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new Hi(se,ce))}return E?$r(a.cm,E,y.primIndex):y}function Ro(a,y,x,b,E){var z=st(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var ae=z.markedSpans[re],se=ae.marker,ce="selectLeft"in se?!se.selectLeft:se.inclusiveLeft,xe="selectRight"in se?!se.selectRight:se.inclusiveRight;if((ae.from==null||(ce?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(xe?ae.to>=y.ch:ae.to>y.ch))){if(E&&(kt(se,"beforeCursorEnter"),se.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!se.atomic)continue;if(x){var Be=se.find(b<0?1:-1),Qe=void 0;if((b<0?xe:ce)&&(Be=es(a,Be,-b,Be&&Be.line==y.line?z:null)),Be&&Be.line==y.line&&(Qe=At(Be,x))&&(b<0?Qe<0:Qe>0))return Ro(a,Be,y,b,E)}var qe=se.find(b<0?-1:1);return(b<0?ce:xe)&&(qe=es(a,qe,b,qe.line==y.line?z:null)),qe?Ro(a,qe,y,b,E):null}}return y}function _a(a,y,x,b,E){var z=b||1,re=Ro(a,y,x,z,E)||!E&&Ro(a,y,x,z,!0)||Ro(a,y,x,-z,E)||!E&&Ro(a,y,x,-z,!0);return re||(a.cantEdit=!0,Ge(a.first,0))}function es(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Mt(a,Ge(y.line-1)):null:x>0&&y.ch==(b||st(a,y.line)).text.length?y.line<a.first+a.size-1?Ge(y.line+1,0):null:new Ge(y.line,y.ch+x)}function ts(a){a.setSelection(Ge(a.firstLine(),0),Ge(a.lastLine()),He)}function ns(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,z,re,ae){E&&(b.from=Mt(a,E)),z&&(b.to=Mt(a,z)),re&&(b.text=re),ae!==void 0&&(b.origin=ae)}),kt(a,"beforeChange",a,b),a.cm&&kt(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 Oo(a,y,x){if(a.cm){if(!a.cm.curOp)return cr(a.cm,Oo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((_t(a,"beforeChange")||a.cm&&_t(a.cm,"beforeChange"))&&(y=ns(a,y,!0),!y))){var b=an&&!x&&Tn(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)is(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else is(a,y)}}function is(a,y){if(!(y.text.length==1&&y.text[0]==""&&At(y.from,y.to)==0)){var x=rl(a,y);Vl(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,Un(a,y));var b=[];go(a,function(E,z){!z&&Ct(b,E.history)==-1&&(ls(E.history,y),b.push(E.history)),oa(E,y,null,Un(E,y))})}}function Ia(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,z,re=a.sel,ae=y=="undo"?E.done:E.undone,se=y=="undo"?E.undone:E.done,ce=0;ce<ae.length&&(z=ae[ce],!(x?z.ranges&&!z.equals(a.sel):!z.ranges));ce++);if(ce!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=ae.pop(),z.ranges){if(Ma(z,se),x&&!z.equals(a.sel)){xr(a,z,{clearRedo:!1});return}re=z}else if(b){ae.push(z);return}else break;var xe=[];Ma(re,se),se.push({changes:xe,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var Be=_t(a,"beforeChange")||a.cm&&_t(a.cm,"beforeChange"),Qe=function(Zt){var fn=z.changes[Zt];if(fn.origin=y,Be&&!ns(a,fn,!1))return ae.length=0,{};xe.push(ll(a,fn));var Cn=Zt?rl(a,fn):be(ae);oa(a,fn,Cn,Kl(a,fn)),!Zt&&a.cm&&a.cm.scrollIntoView({from:fn.from,to:mo(fn)});var Mn=[];go(a,function(Sn,In){!In&&Ct(Mn,Sn.history)==-1&&(ls(Sn.history,fn),Mn.push(Sn.history)),oa(Sn,fn,null,Kl(Sn,fn))})},qe=z.changes.length-1;qe>=0;--qe){var Tt=Qe(qe);if(Tt)return Tt.v}}}}function rs(a,y){if(y!=0&&(a.first+=y,a.sel=new Gr(Re(a.sel.ranges,function(E){return new Hi(Ge(E.anchor.line+y,E.anchor.ch),Ge(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Br(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 cr(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){rs(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);rs(a,E),y={from:Ge(a.first,0),to:Ge(y.to.line+E,y.to.ch),text:[be(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:Ge(z,st(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=un(a,y.from,y.to),x||(x=rl(a,y)),a.cm?hu(a.cm,y,b):al(a,y,b),Na(a,x,He),a.cantEdit&&_a(a,Ge(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,z=y.from,re=y.to,ae=!1,se=z.line;a.options.lineWrapping||(se=De(Ot(st(b,z.line))),b.iter(se,re.line+1,function(qe){if(qe==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&$t(a),al(b,y,x,wl(a)),a.options.lineWrapping||(b.iter(se,z.line+y.text.length,function(qe){var Tt=Pi(qe);Tt>E.maxLineLength&&(E.maxLine=qe,E.maxLineLength=Tt,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),Qn(b,z.line),na(a,400);var ce=y.text.length-(re.line-z.line)-1;y.full?Br(a):z.line==re.line&&y.text.length==1&&!Wl(a.doc,y)?ho(a,z.line,"text"):Br(a,z.line,re.line+1,ce);var xe=_t(a,"changes"),Be=_t(a,"change");if(Be||xe){var Qe={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};Be&&Wi(a,"change",a,Qe),xe&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Qe)}a.display.selForContextMenu=null}function zo(a,y,x,b,E){var z;b||(b=x),At(b,x)<0&&(z=[b,x],x=z[0],b=z[1]),typeof y=="string"&&(y=a.splitLines(y)),Oo(a,{from:x,to:b,text:y,origin:E})}function os(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function as(a,y,x,b){for(var E=0;E<a.length;++E){var z=a[E],re=!0;if(z.ranges){z.copied||(z=a[E]=z.deepCopy(),z.copied=!0);for(var ae=0;ae<z.ranges.length;ae++)os(z.ranges[ae].anchor,y,x,b),os(z.ranges[ae].head,y,x,b);continue}for(var se=0;se<z.changes.length;++se){var ce=z.changes[se];if(x<ce.from.line)ce.from=Ge(ce.from.line+b,ce.from.ch),ce.to=Ge(ce.to.line+b,ce.to.ch);else if(y<=ce.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function ls(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;as(a.done,x,b,E),as(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,z=y;return typeof y=="number"?z=st(a,dn(a,y)):E=De(y),E==null?null:(b(z,E)&&a.cm&&ho(a.cm,E,x),z)}function la(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}la.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,Ri(E),Wi(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 sa(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}sa.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var z=Math.min(y,E-a),re=b.height;if(b.removeInner(a,z),this.height-=re-b.height,E==z&&(this.children.splice(x--,1),b.parent=null),(y-=z)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof la))){var ae=[];this.collapse(ae),this.children=[new la(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<=z){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,ae=re;ae<E.lines.length;){var se=new la(E.lines.slice(ae,ae+=25));E.height-=se.height,this.children.splice(++b,0,se),se.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=z}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new sa(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=Ct(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new sa(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],z=E.chunkSize();if(a<z){var re=Math.min(y,z-a);if(E.iterN(a,re,x))return!0;if((y-=re)==0)break;a=0}else a-=z}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=De(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var z=ur(this);di(x,Math.max(0,x.height-z)),a&&(zr(a,function(){ss(a,x,-z),ho(a,b,"widget")}),Wi(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=ur(this)-y;E&&(mn(this.doc,b)||di(b,b.height+E),x&&zr(x,function(){x.curOp.forceUpdate=!0,ss(x,b,E),Wi(x,"lineWidgetChanged",x,a,De(b))}))},Gt(ua);function ss(a,y,x){$n(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Qa(a,x)}function pu(a,y,x,b){var E=new ua(a,x,b),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),aa(a,y,"widget",function(re){var ae=re.widgets||(re.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!mn(a,re)){var se=$n(re)<a.scrollTop;di(re,re.height+ur(E)),se&&Qa(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Wi(z,"lineWidgetAdded",z,E,typeof y=="number"?y:De(y)),E}var us=0,yo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++us};yo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Ao(a),_t(this,"clear")){var x=this.find();x&&Wi(this,"clear",x.from,x.to)}for(var b=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],ae=wn(re.markedSpans,this);a&&!this.collapsed?ho(a,De(re),"text"):a&&(ae.to!=null&&(E=De(re)),ae.from!=null&&(b=De(re))),re.markedSpans=Fn(re.markedSpans,ae),ae.from==null&&this.collapsed&&!mn(this.doc,re)&&a&&di(re,Or(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var se=0;se<this.lines.length;++se){var ce=Ot(this.lines[se]),xe=Pi(ce);xe>a.display.maxLineLength&&(a.display.maxLine=ce,a.display.maxLineLength=xe,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&Br(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ql(a.doc)),a&&Wi(a,"markerCleared",a,this,b,E),y&&Do(a),this.parent&&this.parent.clear()}},yo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var z=this.lines[E],re=wn(z.markedSpans,this);if(re.from!=null&&(x=Ge(y?z:De(z),re.from),a==-1))return x;if(re.to!=null&&(b=Ge(y?z:De(z),re.to),a==1))return b}return x&&{from:x,to:b}},yo.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||zr(b,function(){var E=y.line,z=De(y.line),re=io(b,z);if(re&&(Ko(re),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!mn(x.doc,E)&&x.height!=null){var ae=x.height;x.height=null;var se=ur(x)-ae;se&&di(E,E.height+se)}Wi(b,"markerChanged",b,a)})},yo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Ct(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},yo.prototype.detachLine=function(a){if(this.lines.splice(Ct(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Gt(yo);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 cr(a.cm,Ho)(a,y,x,b,E);var z=new yo(a,E),re=At(y,x);if(b&&Rt(b,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=ot("span",[z.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(Vt(a,y.line,y,x,z)||y.line!=x.line&&Vt(a,x.line,y,x,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");Vn()}z.addToHistory&&Vl(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,se=a.cm,ce;if(a.iter(ae,x.line+1,function(Be){se&&z.collapsed&&!se.options.lineWrapping&&Ot(Be)==se.display.maxLine&&(ce=!0),z.collapsed&&ae!=y.line&&di(Be,0),Wn(Be,new Xt(z,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),z.collapsed&&a.iter(y.line,x.line+1,function(Be){mn(a,Be)&&di(Be,0)}),z.clearOnEnter&&ye(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(qn(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++us,z.atomic=!0),se){if(ce&&(se.curOp.updateMaxLine=!0),z.collapsed)Br(se,y.line,x.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var xe=y.line;xe<=x.line;xe++)ho(se,xe,"text");z.atomic&&Ql(se.doc),Wi(se,"markerAdded",se,z)}return z}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x<a.length;++x)a[x].parent=this};ca.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Wi(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Gt(ca);function vu(a,y,x,b,E){b=Rt(b),b.shared=!1;var z=[Ho(a,y,x,b,E)],re=z[0],ae=b.widgetNode;return go(a,function(se){ae&&(b.widgetNode=ae.cloneNode(!0)),z.push(Ho(se,Mt(se,y),Mt(se,x),b,E));for(var ce=0;ce<se.linked.length;++ce)if(se.linked[ce].isParent)return;re=be(z)}),new ca(z,re)}function cs(a){return a.findMarks(Ge(a.first,0),a.clipPos(Ge(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),z=a.clipPos(E.from),re=a.clipPos(E.to);if(At(z,re)){var ae=Ho(a,z,re,b.primary,b.primary.type);b.markers.push(ae),ae.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],z=[E.primary.doc];go(E.primary.doc,function(se){return z.push(se)});for(var re=0;re<E.markers.length;re++){var ae=E.markers[re];Ct(z,ae.doc)==-1&&(ae.parent=null,E.markers.splice(re--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Lr=function(a,y,x,b,E){if(!(this instanceof Lr))return new Lr(a,y,x,b,E);x==null&&(x=0),sa.call(this,[new la([new _i("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var z=Ge(x,0);this.sel=vo(z),this.history=new Ta(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)),al(this,{from:z,to:z,text:a}),xr(this,vo(z),He)};Lr.prototype=Ue(sa.prototype,{constructor:Lr,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=Gn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:dr(function(a){var y=Ge(this.first,0),x=this.first+this.size-1;Oo(this,{from:y,to:Ge(x,st(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Qo(this.cm,0,0),xr(this,vo(y),He)}),replaceRange:function(a,y,x,b){y=Mt(this,y),x=x?Mt(this,x):y,zo(this,a,y,x,b)},getRange:function(a,y,x){var b=un(this,Mt(this,a),Mt(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(It(this,a))return st(this,a)},getLineNumber:function(a){return De(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=st(this,a)),Ot(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Mt(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:dr(function(a,y,x){ql(this,Mt(this,typeof a=="number"?Ge(a,y||0):a),null,x)}),setSelection:dr(function(a,y,x){ql(this,Mt(this,a),Mt(this,y||a),x)}),extendSelection:dr(function(a,y,x){Fa(this,Mt(this,a),y&&Mt(this,y),x)}),extendSelections:dr(function(a,y){Yl(this,hn(this,a),y)}),extendSelectionsBy:dr(function(a,y){var x=Re(this.sel.ranges,a);Yl(this,hn(this,x),y)}),setSelections:dr(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new Hi(Mt(this,a[E].anchor),Mt(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),xr(this,$r(this.cm,b,y),x)}}),addSelection:dr(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new Hi(Mt(this,a),Mt(this,y||a))),xr(this,$r(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=un(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=un(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:dr(function(a,y,x){for(var b=[],E=this.sel,z=0;z<E.ranges.length;z++){var re=E.ranges[z];b[z]={from:re.from(),to:re.to(),text:this.splitLines(a[z]),origin:x}}for(var ae=y&&y!="end"&&ou(this,b,y),se=b.length-1;se>=0;se--)Oo(this,b[se]);ae?Xl(this,ae):this.cm&&No(this.cm)}),undo:dr(function(){Ia(this,"undo")}),redo:dr(function(){Ia(this,"redo")}),undoSelection:dr(function(){Ia(this,"undo",!0)}),redoSelection:dr(function(){Ia(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 Ta(this.history.maxGeneration),go(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:Io(this.history.done),undone:Io(this.history.undone)}},setHistory:function(a){var y=this.history=new Ta(this.history.maxGeneration);y.done=Io(a.done.slice(0),null,!0),y.undone=Io(a.undone.slice(0),null,!0)},setGutterMarker:dr(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&xt(E)&&(b.gutterMarkers=null),!0})}),clearGutter:dr(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,xt(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!It(this,a)||(y=a,a=st(this,a),!a))return null}else if(y=De(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:dr(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(wt(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:dr(function(a,y,x){return aa(this,a,y=="gutter"?"gutter":"class",function(b){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",z=b[E];if(z)if(x==null)b[E]=null;else{var re=z.match(wt(x));if(!re)return!1;var ae=re.index+re[0].length;b[E]=z.slice(0,re.index)+(!re.index||ae==z.length?"":" ")+z.slice(ae)||null}else return!1;return!0})}),addLineWidget:dr(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ho(this,Mt(this,a),Mt(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=Mt(this,a),Ho(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Mt(this,a);var y=[],x=st(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=Mt(this,a),y=Mt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var ae=0;ae<re.length;ae++){var se=re[ae];!(se.to!=null&&E==a.line&&a.ch>=se.to||se.from==null&&E!=a.line||se.from!=null&&E==y.line&&se.from>=y.ch)&&(!x||x(se.marker))&&b.push(se.marker.parent||se.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;b<x.length;++b)x[b].from!=null&&a.push(x[b].marker)}),a},posFromIndex:function(a){var y,x=this.first,b=this.lineSeparator().length;return this.iter(function(E){var z=E.text.length+b;if(z>a)return y=a,!0;a-=z,++x}),Mt(this,Ge(x,y))},indexFromPos:function(a){a=Mt(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 Lr(Gn(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 Lr(Gn(this,y,x),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(b.history=this.history),(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist}),b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(b,cs(this)),b},unlinkDoc:function(a){if(a instanceof Ui&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cs(this));break}}if(a.history==this.history){var b=[a.id];go(a,function(E){return b.push(E.id)},!0),a.history=new Ta(null),a.history.done=Io(this.history.done,b),a.history.undone=Io(this.history.undone,b)}},iterLinkedDocs:function(a){go(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):Si(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:dr(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))})}),Lr.prototype.eachLine=Lr.prototype.iter;var ds=0;function bu(a){var y=this;if(fs(y),!(Oe(y,a)||tr(y.display,a))){xn(a),pe&&(ds=+new Date);var x=Co(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,z=Array(E),re=0,ae=function(){++re==E&&cr(y,function(){x=Mt(y.doc,x);var qe={from:x,to:x,text:y.doc.splitLines(z.filter(function(Tt){return Tt!=null}).join(y.doc.lineSeparator())),origin:"paste"};Oo(y.doc,qe),Xl(y.doc,vo(Mt(y.doc,x),Mt(y.doc,mo(qe))))})()},se=function(qe,Tt){if(y.options.allowDropFileTypes&&Ct(y.options.allowDropFileTypes,qe.type)==-1){ae();return}var Zt=new FileReader;Zt.onerror=function(){return ae()},Zt.onload=function(){var fn=Zt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(fn)){ae();return}z[Tt]=fn,ae()},Zt.readAsText(qe)},ce=0;ce<b.length;ce++)se(b[ce],ce);else{if(y.state.draggingText&&y.doc.sel.contains(x)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var xe=a.dataTransfer.getData("Text");if(xe){var Be;if(y.state.draggingText&&!y.state.draggingText.copy&&(Be=y.listSelections()),Na(y.doc,vo(x,x)),Be)for(var Qe=0;Qe<Be.length;++Qe)zo(y.doc,"",Be[Qe].anchor,Be[Qe].head,"drag");y.replaceSelection(xe,"around","paste"),y.display.input.focus()}}catch(qe){}}}}function xu(a,y){if(pe&&(!a.state.draggingText||+new Date-ds<100)){Rn(y);return}if(!(Oe(a,y)||tr(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!Ee)){var x=Ke("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",he&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),he&&x.parentNode.removeChild(x)}}function wu(a,y){var x=Co(a,y);if(x){var b=document.createDocumentFragment();El(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ke("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ce(a.display.dragCursor,b)}}function fs(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hs(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),x=[],b=0;b<y.length;b++){var E=y[b].CodeMirror;E&&x.push(E)}x.length&&x[0].operation(function(){for(var z=0;z<x.length;z++)a(x[z])})}}var ps=!1;function Cu(){ps||(Su(),ps=!0)}function Su(){var a;ye(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hs(Eu)},100))}),ye(window,"blur",function(){return hs(Fo)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var bo={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"},da=0;da<10;da++)bo[da+48]=bo[da+96]=String(da);for(var Ra=65;Ra<=90;Ra++)bo[Ra]=String.fromCharCode(Ra);for(var fa=1;fa<=12;fa++)bo[fa+111]=bo[fa+63235]="F"+fa;var so={};so.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"},so.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"},so.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"},so.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"]},so.default=we?so.macDefault:so.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,z,re=0;re<y.length-1;re++){var ae=y[re];if(/^(cmd|meta|m)$/i.test(ae))z=!0;else if(/^a(lt)?$/i.test(ae))x=!0;else if(/^(c|ctrl|control)$/i.test(ae))b=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),z&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Au(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=Re(x.split(" "),ku),z=0;z<E.length;z++){var re=void 0,ae=void 0;z==E.length-1?(ae=E.join(" "),re=b):(ae=E.slice(0,z+1).join(" "),re="...");var se=y[ae];if(!se)y[ae]=re;else if(se!=re)throw new Error("Inconsistent bindings for "+ae)}delete a[x]}for(var ce in y)a[ce]=y[ce];return a}function Wo(a,y,x,b){y=Oa(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 Wo(a,y.fallthrough,x,b);for(var z=0;z<y.fallthrough.length;z++){var re=Wo(a,y.fallthrough[z],x,b);if(re)return re}}}function vs(a){var y=typeof a=="string"?a:bo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ms(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(ut?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(ut?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gs(a,y){if(he&&a.keyCode==34&&a.char)return!1;var x=bo[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ms(x,a,y))}function Oa(a){return typeof a=="string"?so[a]:a}function Zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var z=y(x[E]);b.length&&At(z.from,be(b).to)<=0;){var re=b.pop();if(At(re.from,z.from)<0){z.from=re.from;break}}b.push(z)}zr(a,function(){for(var ae=b.length-1;ae>=0;ae--)zo(a.doc,"",b[ae].from,b[ae].to,"+delete");No(a)})}function cl(a,y,x){var b=gn(a.text,y+x,x);return b<0||b>a.text.length?null:b}function dl(a,y,x){var b=cl(a,y.ch,x);return b==null?null:new Ge(y.line,b,x<0?"after":"before")}function fl(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=ue(x,y.doc.direction);if(z){var re=E<0?be(z):z[0],ae=E<0==(re.level==1),se=ae?"after":"before",ce;if(re.level>0||y.doc.direction=="rtl"){var xe=co(y,x);ce=E<0?x.text.length-1:0;var Be=Kr(y,xe,ce).top;ce=Jt(function(Qe){return Kr(y,xe,Qe).top==Be},E<0==(re.level==1)?re.from:re.to-1,ce),se=="before"&&(ce=cl(x,ce,1))}else ce=E<0?re.to:re.from;return new Ge(b,ce,se)}}return new Ge(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=ue(y,a.doc.direction);if(!E)return dl(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var z=ee(E,x.ch,x.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(b>0?re.to>x.ch:re.from<x.ch))return dl(y,x,b);var ae=function(Cn,Mn){return cl(y,Cn instanceof Ge?Cn.ch:Cn,Mn)},se,ce=function(Cn){return a.options.lineWrapping?(se=se||co(a,y),$i(a,y,se,Cn)):{begin:0,end:y.text.length}},xe=ce(x.sticky=="before"?ae(x,-1):x.ch);if(a.doc.direction=="rtl"||re.level==1){var Be=re.level==1==b<0,Qe=ae(x,Be?1:-1);if(Qe!=null&&(Be?Qe<=re.to&&Qe<=xe.end:Qe>=re.from&&Qe>=xe.begin)){var qe=Be?"before":"after";return new Ge(x.line,Qe,qe)}}var Tt=function(Cn,Mn,Sn){for(var In=function(Vi,fr){return fr?new Ge(x.line,ae(Vi,1),"before"):new Ge(x.line,Vi,"after")};Cn>=0&&Cn<E.length;Cn+=Mn){var ii=E[Cn],Jn=Mn>0==(ii.level!=1),Di=Jn?Sn.begin:ae(Sn.end,-1);if(ii.from<=Di&&Di<ii.to||(Di=Jn?ii.from:ae(ii.to,-1),Sn.begin<=Di&&Di<Sn.end))return In(Di,Jn)}},Zt=Tt(z+b,b,xe);if(Zt)return Zt;var fn=b>0?xe.end:ae(xe.begin,-1);return fn!=null&&!(b>0&&fn==y.text.length)&&(Zt=Tt(b>0?0:E.length-1,b,ce(fn)),Zt)?Zt:null}var ha={selectAll:ts,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),He)},killLine:function(a){return Zo(a,function(y){if(y.empty()){var x=st(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:Ge(y.head.line+1,0)}:{from:y.head,to:Ge(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Zo(a,function(y){return{from:Ge(y.from().line,0),to:Mt(a.doc,Ge(y.to().line+1,0))}})},delLineLeft:function(a){return Zo(a,function(y){return{from:Ge(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(Ge(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Ge(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return ys(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bs(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Bu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:x},"div")},ft)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:x},"div")},ft)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bs(a,y.head):b},ft)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],x=a.listSelections(),b=a.options.tabSize,E=0;E<x.length;E++){var z=x[E].from(),re=me(a.getLine(z.line),z.ch,b);y.push(Me(b-re%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return zr(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,z=st(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new Ge(E.line,E.ch-1)),E.ch>0)E=new Ge(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),Ge(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=st(a.doc,E.line-1).text;re&&(E=new Ge(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),Ge(E.line-1,re.length-1),E,"+transpose"))}}x.push(new Hi(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return zr(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);No(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function ys(a,y){var x=st(a.doc,y),b=Ot(x);return b!=x&&(y=De(b)),fl(!0,a,b,y,1)}function Bu(a,y){var x=st(a.doc,y),b=kn(x);return b!=x&&(y=De(b)),fl(!0,a,x,y,-1)}function bs(a,y){var x=ys(a,y.line),b=st(a.doc,x.line),E=ue(b,a.doc.direction);if(!E||E[0].level==0){var z=Math.max(x.ch,b.text.search(/\S/)),re=y.line==x.line&&y.ch<=z&&y.ch;return Ge(x.line,re?0:z,x.sticky)}return x}function za(a,y,x){if(typeof y=="string"&&(y=ha[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)!=Bt}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Lu(a,y,x){for(var b=0;b<a.state.keyMaps.length;b++){var E=Wo(y,a.state.keyMaps[b],x,a);if(E)return E}return a.options.extraKeys&&Wo(y,a.options.extraKeys,x,a)||Wo(y,a.options.keyMap,x,a)}var Pu=new de;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Pu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xs(a,E+" "+y,x,b))return!0}return xs(a,y,x,b)}function xs(a,y,x,b){var E=Lu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wi(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(xn(x),qa(a)),!!E}function ws(a,y){var x=gs(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return za(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return za(a,b)}):pa(a,x,y,function(b){return za(a,b)}):!1}function Tu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return za(a,b,!0)})}var hl=null;function Cs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ze(),!Oe(y,a))){pe&&je<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=ws(y,a);he&&(hl=b?x:null,!b&&x==88&&!ti&&(we?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),te&&!we&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Mu(y)}}function Mu(a){var y=a.display.lineDiv;dt(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(pt(y,"CodeMirror-crosshair"),yt(document,"keyup",x),yt(document,"mouseover",x))}ye(document,"keyup",x),ye(document,"mouseover",x)}function Ss(a){a.keyCode==16&&(this.doc.sel.shift=!1),Oe(this,a)}function Es(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(tr(y.display,a)||Oe(y,a)||a.ctrlKey&&!a.altKey||we&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(he&&x==hl){hl=null,xn(a);return}if(!(he&&(!a.which||a.which<10)&&ws(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Tu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=400,pl=function(a,y,x){this.time=a,this.pos=y,this.button=x};pl.prototype.compare=function(a,y,x){return this.time+Fu>a&&At(y,this.pos)==0&&x==this.button};var va,ma;function Nu(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 pl(x,a,y),va=null,"double"):(va=new pl(x,a,y),ma=null,"single")}function ks(a){var y=this,x=y.display;if(!(Oe(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,tr(x,a)){Fe||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vl(y,a)){var b=Co(y,a),E=si(a),z=b?Nu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&_u(y,E,b,z,a))&&(E==1?b?Ru(y,b,z,a):Ei(a)==x.scroller&&xn(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(ze?y.display.input.onContextMenu(a):Al(y)))}}}function _u(a,y,x,b,E){var z="Click";return b=="double"?z="Double"+z:b=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,pa(a,ms(z,E),E,function(re){if(typeof re=="string"&&(re=ha[re]),!re)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=re(a,x)!=Bt}finally{a.state.suppressEdits=!1}return ae})}function Iu(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var z=$e?x.shiftKey&&x.metaKey:x.altKey;E.unit=z?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=we?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(we?x.altKey:x.ctrlKey)),E}function Ru(a,y,x,b){pe?setTimeout(bn(kl,a),0):a.curOp.focus=Ze();var E=Iu(a,x,b),z=a.doc.sel,re;a.options.dragDrop&&ki&&!a.isReadOnly()&&x=="single"&&(re=z.contains(y))>-1&&(At((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(At(re.to(),y)>0||y.xRel<0)?Ou(a,b,y,E):zu(a,b,y,E)}function Ou(a,y,x,b){var E=a.display,z=!1,re=cr(a,function(ce){Fe&&(E.scroller.draggable=!1),a.state.draggingText=!1,yt(E.wrapper.ownerDocument,"mouseup",re),yt(E.wrapper.ownerDocument,"mousemove",ae),yt(E.scroller,"dragstart",se),yt(E.scroller,"drop",re),z||(xn(ce),b.addNew||Fa(a.doc,x,null,null,b.extend),Fe&&!Ee||pe&&je==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(ce){z=z||Math.abs(y.clientX-ce.clientX)+Math.abs(y.clientY-ce.clientY)>=10},se=function(){return z=!0};Fe&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),ye(E.wrapper.ownerDocument,"mouseup",re),ye(E.wrapper.ownerDocument,"mousemove",ae),ye(E.scroller,"dragstart",se),ye(E.scroller,"drop",re),Al(a),setTimeout(function(){return E.input.focus()},20)}function As(a,y,x){if(x=="char")return new Hi(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new Hi(Ge(y.line,0),Mt(a.doc,Ge(y.line+1,0)));var b=x(a,y);return new Hi(b.from,b.to)}function zu(a,y,x,b){var E=a.display,z=a.doc;xn(y);var re,ae,se=z.sel,ce=se.ranges;if(b.addNew&&!b.extend?(ae=z.sel.contains(x),ae>-1?re=ce[ae]:re=new Hi(x,x)):(re=z.sel.primary(),ae=z.sel.primIndex),b.unit=="rectangle")b.addNew||(re=new Hi(x,x)),x=Co(a,y,!0,!0),ae=-1;else{var xe=As(a,x,b.unit);b.extend?re=sl(re,xe.anchor,xe.head,b.extend):re=xe}b.addNew?ae==-1?(ae=ce.length,xr(z,$r(a,ce.concat([re]),ae),{scroll:!1,origin:"*mouse"})):ce.length>1&&ce[ae].empty()&&b.unit=="char"&&!b.extend?(xr(z,$r(a,ce.slice(0,ae).concat(ce.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),se=z.sel):ul(z,ae,re,it):(ae=0,xr(z,new Gr([re],0),it),se=z.sel);var Be=x;function Qe(Sn){if(At(Be,Sn)!=0)if(Be=Sn,b.unit=="rectangle"){for(var In=[],ii=a.options.tabSize,Jn=me(st(z,x.line).text,x.ch,ii),Di=me(st(z,Sn.line).text,Sn.ch,ii),Vi=Math.min(Jn,Di),fr=Math.max(Jn,Di),Yi=Math.min(x.line,Sn.line),Hr=Math.min(a.lastLine(),Math.max(x.line,Sn.line));Yi<=Hr;Yi++){var Pr=st(z,Yi).text,nr=vn(Pr,Vi,ii);Vi==fr?In.push(new Hi(Ge(Yi,nr),Ge(Yi,nr))):Pr.length>nr&&In.push(new Hi(Ge(Yi,nr),Ge(Yi,vn(Pr,fr,ii))))}In.length||In.push(new Hi(x,x)),xr(z,$r(a,se.ranges.slice(0,ae).concat(In),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(Sn)}else{var Tr=re,mr=As(a,Sn,b.unit),ar=Tr.anchor,ir;At(mr.anchor,ar)>0?(ir=mr.head,ar=Kt(Tr.from(),mr.anchor)):(ir=mr.anchor,ar=cn(Tr.to(),mr.head));var Ji=se.ranges.slice(0);Ji[ae]=Hu(a,new Hi(Mt(z,ar),ir)),xr(z,$r(a,Ji,ae),it)}}var qe=E.wrapper.getBoundingClientRect(),Tt=0;function Zt(Sn){var In=++Tt,ii=Co(a,Sn,!0,b.unit=="rectangle");if(ii)if(At(ii,Be)!=0){a.curOp.focus=Ze(),Qe(ii);var Jn=Da(E,z);(ii.line>=Jn.to||ii.line<Jn.from)&&setTimeout(cr(a,function(){Tt==In&&Zt(Sn)}),150)}else{var Di=Sn.clientY<qe.top?-20:Sn.clientY>qe.bottom?20:0;Di&&setTimeout(cr(a,function(){Tt==In&&(E.scroller.scrollTop+=Di,Zt(Sn))}),50)}}function fn(Sn){a.state.selectingText=!1,Tt=1/0,Sn&&(xn(Sn),E.input.focus()),yt(E.wrapper.ownerDocument,"mousemove",Cn),yt(E.wrapper.ownerDocument,"mouseup",Mn),z.history.lastSelOrigin=null}var Cn=cr(a,function(Sn){Sn.buttons===0||!si(Sn)?fn(Sn):Zt(Sn)}),Mn=cr(a,fn);a.state.selectingText=Mn,ye(E.wrapper.ownerDocument,"mousemove",Cn),ye(E.wrapper.ownerDocument,"mouseup",Mn)}function Hu(a,y){var x=y.anchor,b=y.head,E=st(a.doc,x.line);if(At(x,b)==0&&x.sticky==b.sticky)return y;var z=ue(E);if(!z)return y;var re=ee(z,x.ch,x.sticky),ae=z[re];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var se=re+(ae.from==x.ch==(ae.level!=1)?0:1);if(se==0||se==z.length)return y;var ce;if(b.line!=x.line)ce=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var xe=ee(z,b.ch,b.sticky),Be=xe-re||(b.ch-x.ch)*(ae.level==1?-1:1);xe==se-1||xe==se?ce=Be<0:ce=Be>0}var Qe=z[se+(ce?-1:0)],qe=ce==(Qe.level==1),Tt=qe?Qe.from:Qe.to,Zt=qe?"after":"before";return x.ch==Tt&&x.sticky==Zt?y:new Hi(new Ge(x.line,Tt,Zt),b)}function Ds(a,y,x,b){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch(Qe){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&xn(y);var re=a.display,ae=re.lineDiv.getBoundingClientRect();if(z>ae.bottom||!_t(a,x))return jt(y);z-=ae.top-re.viewOffset;for(var se=0;se<a.display.gutterSpecs.length;++se){var ce=re.gutters.childNodes[se];if(ce&&ce.getBoundingClientRect().right>=E){var xe=Ne(a.doc,z),Be=a.display.gutterSpecs[se];return kt(a,x,a,xe,Be.className,y),jt(y)}}}function vl(a,y){return Ds(a,y,"gutterClick",!0)}function Bs(a,y){tr(a.display,y)||Wu(a,y)||Oe(a,y,"contextmenu")||ze||a.display.input.onContextMenu(y)}function Wu(a,y){return _t(a,"gutterContextMenu")?Ds(a,y,"gutterContextMenu",!1):!1}function Ls(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"}},Ps={},Ha={};function Zu(a){var y=a.optionHandlers;function x(b,E,z,re){a.defaults[b]=E,z&&(y[b]=re?function(ae,se,ce){ce!=Go&&z(ae,se,ce)}:z)}a.defineOption=x,a.Init=Go,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,ol(b)},!0),x("indentUnit",2,ol,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ra(b),wo(b),Br(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var z=[],re=b.doc.first;b.doc.iter(function(se){for(var ce=0;;){var xe=se.text.indexOf(E,ce);if(xe==-1)break;ce=xe+E.length,z.push(Ge(re,xe))}re++});for(var ae=z.length-1;ae>=0;ae--)zo(b.doc,E,z[ae],Ge(z[ae].line,z[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,z){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=Go&&b.refresh()}),x("specialCharPlaceholder",gr,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){Ls(b),ia(b)},!0),x("keyMap","default",function(b,E,z){var re=Oa(E),ae=z!=Go&&Oa(z);ae&&ae.detach&&ae.detach(b,re),re.attach&&re.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=il(E,b.options.lineNumbers),ia(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 _o(b)},!0),x("scrollbarStyle","native",function(b){Ml(b),_o(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=il(b.options.gutters,E),ia(b)},!0),x("firstLineNumber",1,ia,!0),x("lineNumberFormatter",function(b){return b},ia,!0),x("showCursorWhenSelecting",!1,Jo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Fo(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,Jo,!0),x("singleCursorHeightPerLine",!0,Jo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ra,!0),x("addModeClass",!1,ra,!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,ra,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Go;if(!y!=!b){var E=a.display.dragFunctions,z=y?ye:yt;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(dt(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(pt(a.display.wrapper,"CodeMirror-wrap"),bi(a)),Ya(a),Br(a),wo(a),setTimeout(function(){return _o(a)},100)}function Ui(a,y){var x=this;if(!(this instanceof Ui))return new Ui(a,y);this.options=y=y?Rt(y):{},Rt(Ps,y,!1);var b=y.value;typeof b=="string"?b=new Lr(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Ui.inputStyles[y.inputStyle](this),z=this.display=new iu(a,b,E,y);z.wrapper.CodeMirror=this,Ls(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ml(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 de,keySeq:null,specialChars:null},y.autofocus&&!Pe&&z.input.focus(),pe&&je<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Vu(this),Cu(),Ao(this),this.curOp.forceUpdate=!0,Zl(this,b),y.autofocus&&!Pe||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Xa(x)},20):Fo(this);for(var re in Ha)Ha.hasOwnProperty(re)&&Ha[re](this,y[re],Go);_l(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<ml.length;++ae)ml[ae](this);Do(this),Fe&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}Ui.defaults=Ps,Ui.optionHandlers=Ha;function Vu(a){var y=a.display;ye(y.scroller,"mousedown",cr(a,ks)),pe&&je<11?ye(y.scroller,"dblclick",cr(a,function(se){if(!Oe(a,se)){var ce=Co(a,se);if(!(!ce||vl(a,se)||tr(a.display,se))){xn(se);var xe=a.findWordAt(ce);Fa(a.doc,xe.anchor,xe.head)}}})):ye(y.scroller,"dblclick",function(se){return Oe(a,se)||xn(se)}),ye(y.scroller,"contextmenu",function(se){return Bs(a,se)}),ye(y.input.getField(),"contextmenu",function(se){y.scroller.contains(se.target)||Bs(a,se)});var x,b={end:0};function E(){y.activeTouch&&(x=setTimeout(function(){return y.activeTouch=null},1e3),b=y.activeTouch,b.end=+new Date)}function z(se){if(se.touches.length!=1)return!1;var ce=se.touches[0];return ce.radiusX<=1&&ce.radiusY<=1}function re(se,ce){if(ce.left==null)return!0;var xe=ce.left-se.left,Be=ce.top-se.top;return xe*xe+Be*Be>20*20}ye(y.scroller,"touchstart",function(se){if(!Oe(a,se)&&!z(se)&&!vl(a,se)){y.input.ensurePolled(),clearTimeout(x);var ce=+new Date;y.activeTouch={start:ce,moved:!1,prev:ce-b.end<=300?b:null},se.touches.length==1&&(y.activeTouch.left=se.touches[0].pageX,y.activeTouch.top=se.touches[0].pageY)}}),ye(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),ye(y.scroller,"touchend",function(se){var ce=y.activeTouch;if(ce&&!tr(y,se)&&ce.left!=null&&!ce.moved&&new Date-ce.start<300){var xe=a.coordsChar(y.activeTouch,"page"),Be;!ce.prev||re(ce,ce.prev)?Be=new Hi(xe,xe):!ce.prev.prev||re(ce,ce.prev.prev)?Be=a.findWordAt(xe):Be=new Hi(Ge(xe.line,0),Mt(a.doc,Ge(xe.line+1,0))),a.setSelection(Be.anchor,Be.head),a.focus(),xn(se)}E()}),ye(y.scroller,"touchcancel",E),ye(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),Eo(a,y.scroller.scrollLeft,!0),kt(a,"scroll",a))}),ye(y.scroller,"mousewheel",function(se){return Ol(a,se)}),ye(y.scroller,"DOMMouseScroll",function(se){return Ol(a,se)}),ye(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(se){Oe(a,se)||Rn(se)},over:function(se){Oe(a,se)||(wu(a,se),Rn(se))},start:function(se){return xu(a,se)},drop:cr(a,bu),leave:function(se){Oe(a,se)||fs(a)}};var ae=y.input.getField();ye(ae,"keyup",function(se){return Ss.call(a,se)}),ye(ae,"keydown",cr(a,Cs)),ye(ae,"keypress",cr(a,Es)),ye(ae,"focus",function(se){return Xa(a,se)}),ye(ae,"blur",function(se){return Fo(a,se)})}var ml=[];Ui.defineInitHook=function(a){return ml.push(a)};function ga(a,y,x,b){var E=a.doc,z;x==null&&(x="add"),x=="smart"&&(E.mode.indent?z=Bn(a,y).state:x="prev");var re=a.options.tabSize,ae=st(E,y),se=me(ae.text,null,re);ae.stateAfter&&(ae.stateAfter=null);var ce=ae.text.match(/^\s*/)[0],xe;if(!b&&!/\S/.test(ae.text))xe=0,x="not";else if(x=="smart"&&(xe=E.mode.indent(z,ae.text.slice(ce.length),ae.text),xe==Bt||xe>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?xe=me(st(E,y-1).text,null,re):xe=0:x=="add"?xe=se+a.options.indentUnit:x=="subtract"?xe=se-a.options.indentUnit:typeof x=="number"&&(xe=se+x),xe=Math.max(0,xe);var Be="",Qe=0;if(a.options.indentWithTabs)for(var qe=Math.floor(xe/re);qe;--qe)Qe+=re,Be+=" ";if(Qe<xe&&(Be+=Me(xe-Qe)),Be!=ce)return zo(E,Be,Ge(y,0),Ge(y,ce.length),"+input"),ae.stateAfter=null,!0;for(var Tt=0;Tt<E.sel.ranges.length;Tt++){var Zt=E.sel.ranges[Tt];if(Zt.head.line==y&&Zt.head.ch<ce.length){var fn=Ge(y,ce.length);ul(E,Tt,new Hi(fn,fn));break}}}var eo=null;function Wa(a){eo=a}function gl(a,y,x,b,E){var z=a.doc;a.display.shift=!1,b||(b=z.sel);var re=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>re,se=Si(y),ce=null;if(ae&&b.ranges.length>1)if(eo&&eo.text.join(`
`)==y){if(b.ranges.length%eo.text.length==0){ce=[];for(var xe=0;xe<eo.text.length;xe++)ce.push(z.splitLines(eo.text[xe]))}}else se.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(ce=Re(se,function(Cn){return[Cn]}));for(var Be=a.curOp.updateInput,Qe=b.ranges.length-1;Qe>=0;Qe--){var qe=b.ranges[Qe],Tt=qe.from(),Zt=qe.to();qe.empty()&&(x&&x>0?Tt=Ge(Tt.line,Tt.ch-x):a.state.overwrite&&!ae?Zt=Ge(Zt.line,Math.min(st(z,Zt.line).text.length,Zt.ch+be(se).length)):ae&&eo&&eo.lineWise&&eo.text.join(`
`)==se.join(`
`)&&(Tt=Zt=Ge(Tt.line,0)));var fn={from:Tt,to:Zt,text:ce?ce[Qe%ce.length]:se,origin:E||(ae?"paste":a.state.cutIncoming>re?"cut":"+input")};Oo(a.doc,fn),Wi(a,"inputRead",a,fn)}y&&!ae&&Ms(a,y),No(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Be),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Ts(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&zr(y,function(){return gl(y,x,0,null,"paste")}),!0}function Ms(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var ae=0;ae<z.electricChars.length;ae++)if(y.indexOf(z.electricChars.charAt(ae))>-1){re=ga(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(st(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=ga(a,E.head.line,"smart"));re&&Wi(a,"electricInput",a,E.head.line)}}}function Fs(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,z={anchor:Ge(E,0),head:Ge(E+1,0)};x.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:x}}function Ns(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function _s(){var a=Ke("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ke("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Fe?a.style.width="1000px":a.setAttribute("wrap","off"),Ve&&(a.style.border="1px solid black"),Ns(a),y}function Uu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var z=this.options,re=z[b];z[b]==E&&b!="mode"||(z[b]=E,y.hasOwnProperty(b)&&cr(this,y[b])(this,E,re),kt(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"](Oa(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,z=0;z<E.length;++z)if(E[z]==b||E[z].name==b)return E.splice(z,1),!0},addOverlay:Er(function(b,E){var z=b.token?b:a.getMode(this.options,b);if(z.startState)throw new Error("Overlays may not be stateful.");lt(this.state.overlays,{mode:z,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Br(this)}),removeOverlay:Er(function(b){for(var E=this.state.overlays,z=0;z<E.length;++z){var re=E[z].modeSpec;if(re==b||typeof b=="string"&&re.name==b){E.splice(z,1),this.state.modeGen++,Br(this);return}}}),indentLine:Er(function(b,E,z){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),It(this.doc,b)&&ga(this,b,E,z)}),indentSelection:Er(function(b){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var ae=E[re];if(ae.empty())ae.head.line>z&&(ga(this,ae.head.line,b,!0),z=ae.head.line,re==this.doc.sel.primIndex&&No(this));else{var se=ae.from(),ce=ae.to(),xe=Math.max(z,se.line);z=Math.min(this.lastLine(),ce.line-(ce.ch?0:1))+1;for(var Be=xe;Be<z;++Be)ga(this,Be,b);var Qe=this.doc.sel.ranges;se.ch==0&&E.length==Qe.length&&Qe[re].from().ch>0&&ul(this.doc,re,new Hi(se,Qe[re].to()),He)}}}),getTokenAt:function(b,E){return nn(this,b,E)},getLineTokens:function(b,E){return nn(this,Ge(b),E,!0)},getTokenTypeAt:function(b){b=Mt(this.doc,b);var E=St(this,st(this.doc,b.line)),z=0,re=(E.length-1)/2,ae=b.ch,se;if(ae==0)se=E[2];else for(;;){var ce=z+re>>1;if((ce?E[ce*2-1]:0)>=ae)re=ce;else if(E[ce*2+1]<ae)z=ce+1;else{se=E[ce*2+2];break}}var xe=se?se.indexOf("overlay "):-1;return xe<0?se:xe==0?null:se.slice(0,xe-1)},getModeAt:function(b){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(b).state).mode:E},getHelper:function(b,E){return this.getHelpers(b,E)[0]},getHelpers:function(b,E){var z=[];if(!x.hasOwnProperty(E))return z;var re=x[E],ae=this.getModeAt(b);if(typeof ae[E]=="string")re[ae[E]]&&z.push(re[ae[E]]);else if(ae[E])for(var se=0;se<ae[E].length;se++){var ce=re[ae[E][se]];ce&&z.push(ce)}else ae.helperType&&re[ae.helperType]?z.push(re[ae.helperType]):re[ae.name]&&z.push(re[ae.name]);for(var xe=0;xe<re._global.length;xe++){var Be=re._global[xe];Be.pred(ae,this)&&Ct(z,Be.val)==-1&&z.push(Be.val)}return z},getStateAfter:function(b,E){var z=this.doc;return b=dn(z,b==null?z.first+z.size-1:b),Bn(this,b+1,E).state},cursorCoords:function(b,E){var z,re=this.doc.sel.primary();return b==null?z=re.head:typeof b=="object"?z=Mt(this.doc,b):z=b?re.from():re.to(),Dr(this,z,E||"page")},charCoords:function(b,E){return Mo(this,Mt(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),vr(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Ne(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,z){var re=!1,ae;if(typeof b=="number"){var se=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>se&&(b=se,re=!0),ae=st(this.doc,b)}else ae=b;return To(this,ae,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-$n(ae):0)},defaultTextHeight:function(){return Or(this.display)},defaultCharWidth:function(){return Qr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,z,re,ae){var se=this.display;b=Dr(this,Mt(this.doc,b));var ce=b.bottom,xe=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),se.sizer.appendChild(E),re=="over")ce=b.top;else if(re=="above"||re=="near"){var Be=Math.max(se.wrapper.clientHeight,this.doc.height),Qe=Math.max(se.sizer.clientWidth,se.lineSpace.clientWidth);(re=="above"||b.bottom+E.offsetHeight>Be)&&b.top>E.offsetHeight?ce=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Be&&(ce=b.bottom),xe+E.offsetWidth>Qe&&(xe=Qe-E.offsetWidth)}E.style.top=ce+"px",E.style.left=E.style.right="",ae=="right"?(xe=se.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?xe=0:ae=="middle"&&(xe=(se.sizer.clientWidth-E.offsetWidth)/2),E.style.left=xe+"px"),z&&Gs(this,{left:xe,top:ce,right:xe+E.offsetWidth,bottom:ce+E.offsetHeight})},triggerOnKeyDown:Er(Cs),triggerOnKeyPress:Er(Es),triggerOnKeyUp:Ss,triggerOnMouseDown:Er(ks),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:Er(function(b){Ms(this,b)}),findPosH:function(b,E,z,re){var ae=1;E<0&&(ae=-1,E=-E);for(var se=Mt(this.doc,b),ce=0;ce<E&&(se=yl(this.doc,se,ae,z,re),!se.hitSide);++ce);return se},moveH:Er(function(b,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?yl(z.doc,re.head,b,E,z.options.rtlMoveVisually):b<0?re.from():re.to()},ft)}),deleteH:Er(function(b,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):Zo(this,function(ae){var se=yl(re,ae.head,b,E,!1);return b<0?{from:se,to:ae.head}:{from:ae.head,to:se}})}),findPosV:function(b,E,z,re){var ae=1,se=re;E<0&&(ae=-1,E=-E);for(var ce=Mt(this.doc,b),xe=0;xe<E;++xe){var Be=Dr(this,ce,"div");if(se==null?se=Be.left:Be.left=se,ce=Is(this,Be,ae,z),ce.hitSide)break}return ce},moveV:Er(function(b,E){var z=this,re=this.doc,ae=[],se=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(xe){if(se)return b<0?xe.from():xe.to();var Be=Dr(z,xe.head,"div");xe.goalColumn!=null&&(Be.left=xe.goalColumn),ae.push(Be.left);var Qe=Is(z,Be,b,E);return E=="page"&&xe==re.sel.primary()&&Qa(z,Mo(z,Qe,"div").top-Be.top),Qe},ft),ae.length)for(var ce=0;ce<re.sel.ranges.length;ce++)re.sel.ranges[ce].goalColumn=ae[ce]}),findWordAt:function(b){var E=this.doc,z=st(E,b.line).text,re=b.ch,ae=b.ch;if(z){var se=this.getHelper(b,"wordChars");(b.sticky=="before"||ae==z.length)&&re?--re:++ae;for(var ce=z.charAt(re),xe=gt(ce,se)?function(Be){return gt(Be,se)}:/\s/.test(ce)?function(Be){return/\s/.test(Be)}:function(Be){return!/\s/.test(Be)&&!gt(Be)};re>0&&xe(z.charAt(re-1));)--re;for(;ae<z.length&&xe(z.charAt(ae));)++ae}return new Hi(Ge(b.line,re),Ge(b.line,ae))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?dt(this.display.cursorDiv,"CodeMirror-overwrite"):pt(this.display.cursorDiv,"CodeMirror-overwrite"),kt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ze()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Er(function(b,E){Qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Ir(this)-this.display.barHeight,width:b.scrollWidth-Ir(this)-this.display.barWidth,clientHeight:ao(this),clientWidth:no(this)}},scrollIntoView:Er(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:Ge(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?js(this,b):Bl(this,b.from,b.to,b.margin)}),setSize:Er(function(b,E){var z=this,re=function(se){return typeof se=="number"||/^\d+$/.test(String(se))?se+"px":se};b!=null&&(this.display.wrapper.style.width=re(b)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Yo(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(se){if(se.widgets){for(var ce=0;ce<se.widgets.length;ce++)if(se.widgets[ce].noHScroll){ho(z,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,kt(this,"refresh",this)}),operation:function(b){return zr(this,b)},startOperation:function(){return Ao(this)},endOperation:function(){return Do(this)},refresh:Er(function(){var b=this.display.cachedTextHeight;Br(this),this.curOp.forceUpdate=!0,wo(this),Qo(this,this.doc.scrollLeft,this.doc.scrollTop),tl(this.display),(b==null||Math.abs(b-Or(this.display))>.5||this.options.lineWrapping)&&Ya(this),kt(this,"refresh",this)}),swapDoc:Er(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zl(this,b),wo(this),this.display.input.reset(),Qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Wi(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,z){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=z},a.registerGlobalHelper=function(b,E,z,re){a.registerHelper(b,E,re),x[b]._global.push({pred:z,val:re})}}function yl(a,y,x,b,E){var z=y,re=x,ae=st(a,y.line),se=E&&a.direction=="rtl"?-x:x;function ce(){var Mn=y.line+se;return Mn<a.first||Mn>=a.first+a.size?!1:(y=new Ge(Mn,y.ch,y.sticky),ae=st(a,Mn))}function xe(Mn){var Sn;if(b=="codepoint"){var In=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(In)?Sn=null:Sn=new Ge(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(In>=55296&&In<56320?2:1))),-x)}else E?Sn=Du(a.cm,ae,y,x):Sn=dl(ae,y,x);if(Sn==null)if(!Mn&&ce())y=fl(E,a.cm,ae,y.line,se);else return!1;else y=Sn;return!0}if(b=="char"||b=="codepoint")xe();else if(b=="column")xe(!0);else if(b=="word"||b=="group")for(var Be=null,Qe=b=="group",qe=a.cm&&a.cm.getHelper(y,"wordChars"),Tt=!0;!(x<0&&!xe(!Tt));Tt=!1){var Zt=ae.text.charAt(y.ch)||`
`,fn=gt(Zt,qe)?"w":Qe&&Zt==`
`?"n":!Qe||/\s/.test(Zt)?null:"p";if(Qe&&!Tt&&!fn&&(fn="s"),Be&&Be!=fn){x<0&&(x=1,xe(),y.sticky="after");break}if(fn&&(Be=fn),x>0&&!xe(!Tt))break}var Cn=_a(a,y,z,re,!0);return tn(z,Cn)&&(Cn.hitSide=!0),Cn}function Is(a,y,x,b){var E=a.doc,z=y.left,re;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),se=Math.max(ae-.5*Or(a.display),3);re=(x>0?y.bottom:y.top)+x*se}else b=="line"&&(re=x>0?y.bottom+3:y.top-3);for(var ce;ce=vr(a,z,re),!!ce.outside;){if(x<0?re<=0:re>=E.height){ce.hitSide=!0;break}re+=x*5}return ce}var Gi=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Gi.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Ns(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function z(ae){for(var se=ae.target;se;se=se.parentNode){if(se==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(se.className))break}return!1}ye(E,"paste",function(ae){!z(ae)||Oe(b,ae)||Ts(ae,b)||je<=11&&setTimeout(cr(b,function(){return y.updateFromDOM()}),20)}),ye(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),ye(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),ye(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),ye(E,"touchstart",function(){return x.forceCompositionEnd()}),ye(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(ae){if(!(!z(ae)||Oe(b,ae))){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var se=Fs(b);Wa({lineWise:!0,text:se.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(se.ranges,0,He),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var ce=eo.text.join(`
`);if(ae.clipboardData.setData("Text",ce),ae.clipboardData.getData("Text")==ce){ae.preventDefault();return}}var xe=_s(),Be=xe.firstChild;b.display.lineSpace.insertBefore(xe,b.display.lineSpace.firstChild),Be.value=eo.text.join(`
`);var Qe=document.activeElement;Ft(Be),setTimeout(function(){b.display.lineSpace.removeChild(xe),Qe.focus(),Qe==E&&x.showPrimarySelection()},50)}}ye(E,"copy",re),ye(E,"cut",re)},Gi.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Gi.prototype.prepareSelection=function(){var a=Sl(this.cm,!1);return a.focus=document.activeElement==this.div,a},Gi.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Gi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Gi.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var z=Za(y,a.anchorNode,a.anchorOffset),re=Za(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&At(Kt(z,re),b)==0&&At(cn(z,re),E)==0)){var ae=y.display.view,se=b.line>=y.display.viewFrom&&Rs(y,b)||{node:ae[0].measure.map[2],offset:0},ce=E.line<y.display.viewTo&&Rs(y,E);if(!ce){var xe=ae[ae.length-1].measure,Be=xe.maps?xe.maps[xe.maps.length-1]:xe.map;ce={node:Be[Be.length-1],offset:Be[Be.length-2]-Be[Be.length-3]}}if(!se||!ce){a.removeAllRanges();return}var Qe=a.rangeCount&&a.getRangeAt(0),qe;try{qe=_e(se.node,se.offset,ce.offset,ce.node)}catch(Tt){}qe&&(!te&&y.state.focused?(a.collapse(se.node,se.offset),qe.collapsed||(a.removeAllRanges(),a.addRange(qe))):(a.removeAllRanges(),a.addRange(qe)),Qe&&a.anchorNode==null?a.addRange(Qe):te&&this.startGracePeriod()),this.rememberSelection()}},Gi.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)},Gi.prototype.showMultipleSelections=function(a){Ce(this.cm.display.cursorDiv,a.cursors),Ce(this.cm.display.selectionDiv,a.selection)},Gi.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Gi.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return nt(this.div,y)},Gi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Gi.prototype.blur=function(){this.div.blur()},Gi.prototype.getField=function(){return this.div},Gi.prototype.supportsTouch=function(){return!0},Gi.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():zr(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)},Gi.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Gi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Ae&&Se&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&zr(y,function(){xr(y.doc,vo(x,b),He),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},Gi.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=Ge(b.line-1,st(a.doc,b.line-1).length)),E.ch==st(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=Ge(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,ae;b.line==y.viewFrom||(z=So(a,b.line))==0?(re=De(y.view[0].line),ae=y.view[0].node):(re=De(y.view[z].line),ae=y.view[z-1].node.nextSibling);var se=So(a,E.line),ce,xe;if(se==y.view.length-1?(ce=y.viewTo-1,xe=y.lineDiv.lastChild):(ce=De(y.view[se+1].line)-1,xe=y.view[se+1].node.previousSibling),!ae)return!1;for(var Be=a.doc.splitLines(Yu(a,ae,xe,re,ce)),Qe=un(a.doc,Ge(re,0),Ge(ce,st(a.doc,ce).text.length));Be.length>1&&Qe.length>1;)if(be(Be)==be(Qe))Be.pop(),Qe.pop(),ce--;else if(Be[0]==Qe[0])Be.shift(),Qe.shift(),re++;else break;for(var qe=0,Tt=0,Zt=Be[0],fn=Qe[0],Cn=Math.min(Zt.length,fn.length);qe<Cn&&Zt.charCodeAt(qe)==fn.charCodeAt(qe);)++qe;for(var Mn=be(Be),Sn=be(Qe),In=Math.min(Mn.length-(Be.length==1?qe:0),Sn.length-(Qe.length==1?qe:0));Tt<In&&Mn.charCodeAt(Mn.length-Tt-1)==Sn.charCodeAt(Sn.length-Tt-1);)++Tt;if(Be.length==1&&Qe.length==1&&re==b.line)for(;qe&&qe>b.ch&&Mn.charCodeAt(Mn.length-Tt-1)==Sn.charCodeAt(Sn.length-Tt-1);)qe--,Tt++;Be[Be.length-1]=Mn.slice(0,Mn.length-Tt).replace(/^\u200b+/,""),Be[0]=Be[0].slice(qe).replace(/\u200b+$/,"");var ii=Ge(re,qe),Jn=Ge(ce,Qe.length?be(Qe).length-Tt:0);if(Be.length>1||Be[0]||At(ii,Jn))return zo(a.doc,Be,ii,Jn,"+input"),!0},Gi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Gi.prototype.reset=function(){this.forceCompositionEnd()},Gi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Gi.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))},Gi.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&zr(this.cm,function(){return Br(a.cm)})},Gi.prototype.setUneditable=function(a){a.contentEditable="false"},Gi.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||cr(this.cm,gl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Gi.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Gi.prototype.onContextMenu=function(){},Gi.prototype.resetPosition=function(){},Gi.prototype.needsContentAttribute=!0;function Rs(a,y){var x=io(a,y.line);if(!x||x.hidden)return null;var b=st(a.doc,y.line),E=Po(x,b,y.line),z=ue(b,a.doc.direction),re="left";if(z){var ae=ee(z,y.ch);re=ae%2?"right":"left"}var se=xa(E.map,y.ch,re);return se.offset=se.collapse=="right"?se.end:se.start,se}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function jo(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var z="",re=!1,ae=a.doc.lineSeparator(),se=!1;function ce(qe){return function(Tt){return Tt.id==qe}}function xe(){re&&(z+=ae,se&&(z+=ae),re=se=!1)}function Be(qe){qe&&(xe(),z+=qe)}function Qe(qe){if(qe.nodeType==1){var Tt=qe.getAttribute("cm-text");if(Tt){Be(Tt);return}var Zt=qe.getAttribute("cm-marker"),fn;if(Zt){var Cn=a.findMarks(Ge(b,0),Ge(E+1,0),ce(+Zt));Cn.length&&(fn=Cn[0].find(0))&&Be(un(a.doc,fn.from,fn.to).join(ae));return}if(qe.getAttribute("contenteditable")=="false")return;var Mn=/^(pre|div|p|li|table|br)$/i.test(qe.nodeName);if(!/^br$/i.test(qe.nodeName)&&qe.textContent.length==0)return;Mn&&xe();for(var Sn=0;Sn<qe.childNodes.length;Sn++)Qe(qe.childNodes[Sn]);/^(pre|p)$/i.test(qe.nodeName)&&(se=!0),Mn&&(re=!0)}else qe.nodeType==3&&Be(qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Qe(y),y!=x;)y=y.nextSibling,se=!1;return z}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(Ge(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var z=a.display.view[E];if(z.node==b)return qu(z,y,x)}}function qu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!nt(b,y))return jo(Ge(De(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var z=a.rest?be(a.rest):a.line;return jo(Ge(De(z),z.text.length),E)}var re=y.nodeType==3?y:null,ae=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,x&&(x=re.nodeValue.length));ae.parentNode!=b;)ae=ae.parentNode;var se=a.measure,ce=se.maps;function xe(fn,Cn,Mn){for(var Sn=-1;Sn<(ce?ce.length:0);Sn++)for(var In=Sn<0?se.map:ce[Sn],ii=0;ii<In.length;ii+=3){var Jn=In[ii+2];if(Jn==fn||Jn==Cn){var Di=De(Sn<0?a.line:a.rest[Sn]),Vi=In[ii]+Mn;return(Mn<0||Jn!=fn)&&(Vi=In[ii+(Mn?1:0)]),Ge(Di,Vi)}}}var Be=xe(re,ae,x);if(Be)return jo(Be,E);for(var Qe=ae.nextSibling,qe=re?re.nodeValue.length-x:0;Qe;Qe=Qe.nextSibling){if(Be=xe(Qe,Qe.firstChild,0),Be)return jo(Ge(Be.line,Be.ch-qe),E);qe+=Qe.textContent.length}for(var Tt=ae.previousSibling,Zt=x;Tt;Tt=Tt.previousSibling){if(Be=xe(Tt,Tt.firstChild,-1),Be)return jo(Ge(Be.line,Be.ch+Zt),E);Zt+=Tt.textContent.length}}var er=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};er.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),Ve&&(E.style.width="0px"),ye(E,"input",function(){pe&&je>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),ye(E,"paste",function(re){Oe(b,re)||Ts(re,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function z(re){if(!Oe(b,re)){if(b.somethingSelected())Wa({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Fs(b);Wa({lineWise:!0,text:ae.text}),re.type=="cut"?b.setSelections(ae.ranges,null,He):(x.prevInput="",E.value=ae.text.join(`
`),Ft(E))}else return;re.type=="cut"&&(b.state.cutIncoming=+new Date)}}ye(E,"cut",z),ye(E,"copy",z),ye(a.scroller,"paste",function(re){if(!(tr(a,re)||Oe(b,re))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=re.clipboardData,E.dispatchEvent(ae)}}),ye(a.lineSpace,"selectstart",function(re){tr(a,re)||xn(re)}),ye(E,"compositionstart",function(){var re=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:re,range:b.markText(re,b.getCursor("to"),{className:"CodeMirror-composing"})}}),ye(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},er.prototype.createField=function(a){this.wrapper=_s(),this.textarea=this.wrapper.firstChild},er.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},er.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Sl(a);if(a.options.moveInputWithCursor){var E=Dr(a,x.sel.primary().head,"div"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return b},er.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ce(x.cursorDiv,a.cursors),Ce(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},er.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&&Ft(this.textarea),pe&&je>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",pe&&je>=9&&(this.hasSelection=null))}},er.prototype.getField=function(){return this.textarea},er.prototype.supportsTouch=function(){return!1},er.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Pe||Ze()!=this.textarea))try{this.textarea.focus()}catch(a){}},er.prototype.blur=function(){this.textarea.blur()},er.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},er.prototype.receivedFocus=function(){this.slowPoll()},er.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},er.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)},er.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||yi(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(pe&&je>=9&&this.hasSelection===E||we&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!b&&(b="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,ae=Math.min(b.length,E.length);re<ae&&b.charCodeAt(re)==E.charCodeAt(re);)++re;return zr(y,function(){gl(y,E.slice(re),b.length-re,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
`)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},er.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},er.prototype.onKeyPress=function(){pe&&je>=9&&(this.hasSelection=null),this.fastPoll()},er.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=Co(x,a),re=b.scroller.scrollTop;if(!z||he)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(z)==-1&&cr(x,xr)(x.doc,vo(z),He);var se=E.style.cssText,ce=y.wrapper.style.cssText,xe=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-xe.top-5)+"px; left: "+(a.clientX-xe.left-5)+`px;
z-index: 1000; background: `+(pe?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Be;Fe&&(Be=window.scrollY),b.input.focus(),Fe&&window.scrollTo(null,Be),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=qe,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Qe(){if(E.selectionStart!=null){var Zt=x.somethingSelected(),fn="\u200B"+(Zt?E.value:"");E.value="\u21DA",E.value=fn,y.prevInput=Zt?"":"\u200B",E.selectionStart=1,E.selectionEnd=fn.length,b.selForContextMenu=x.doc.sel}}function qe(){if(y.contextMenuPending==qe&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ce,E.style.cssText=se,pe&&je<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=re),E.selectionStart!=null)){(!pe||pe&&je<9)&&Qe();var Zt=0,fn=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?cr(x,ts)(x):Zt++<10?b.detectingSelectAll=setTimeout(fn,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(fn,200)}}if(pe&&je>=9&&Qe(),ze){Rn(a);var Tt=function(){yt(window,"mouseup",Tt),setTimeout(qe,20)};ye(window,"mouseup",Tt)}else setTimeout(qe,50)},er.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},er.prototype.setUneditable=function(){},er.prototype.needsContentAttribute=!1;function Xu(a,y){if(y=y?Rt(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=Ze();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(ye(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){b(),z.submit=E,z.submit(),z.submit=re}}catch(se){}}y.finishInit=function(se){se.save=b,se.getTextArea=function(){return a},se.toTextArea=function(){se.toTextArea=isNaN,b(),a.parentNode.removeChild(se.getWrapperElement()),a.style.display="",a.form&&(yt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Ui(function(se){return a.parentNode.insertBefore(se,a.nextSibling)},y);return ae}function Ju(a){a.off=yt,a.on=ye,a.wheelEventPixels=ru,a.Doc=Lr,a.splitLines=Si,a.countColumn=me,a.findColumn=vn,a.isWordChar=et,a.Pass=Bt,a.signal=kt,a.Line=_i,a.changeEnd=mo,a.scrollbarModel=Tl,a.Pos=Ge,a.cmpPos=At,a.modes=Ni,a.mimeModes=en,a.resolveMode=Dn,a.getMode=pi,a.modeExtensions=mi,a.extendMode=Ti,a.copyState=ui,a.startState=Ci,a.innerMode=oi,a.commands=ha,a.keyMap=so,a.keyName=gs,a.isModifierKey=vs,a.lookupKey=Wo,a.normalizeKeyMap=Au,a.StringStream=Yt,a.SharedTextMarker=ca,a.TextMarker=yo,a.LineWidget=ua,a.e_preventDefault=xn,a.e_stopPropagation=Zn,a.e_stop=Rn,a.addClass=dt,a.contains=nt,a.rmClass=pt,a.keyNames=bo}Zu(Ui),Uu(Ui);var Qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Lr.prototype)Lr.prototype.hasOwnProperty(Ga)&&Ct(Qu,Ga)<0&&(Ui.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Lr.prototype[Ga]));return Gt(Lr),Ui.inputStyles={textarea:er,contenteditable:Gi},Ui.defineMode=function(a){!Ui.defaults.mode&&a!="null"&&(Ui.defaults.mode=a),Ln.apply(this,arguments)},Ui.defineMIME=Yn,Ui.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ui.defineMIME("text/plain","null"),Ui.defineExtension=function(a,y){Ui.prototype[a]=y},Ui.defineDocExtension=function(a,y){Lr.prototype[a]=y},Ui.fromTextArea=Xu,Ju(Ui),Ui.version="5.58.2",Ui})},25419:function(Ut,Qt,fe){(function(te){te(fe(89780),fe(15525),fe(98101))})(function(te){"use strict";te.defineMode("markdown",function(tt,We){var Je=te.getMode(tt,"text/html"),pe=Je.name=="null";function je(me){if(te.findModeByName){var de=te.findModeByName(me);de&&(me=de.mime||de.mimes[0])}var Ct=te.getMode(tt,me);return Ct.name=="null"?null:Ct}We.highlightFormatting===void 0&&(We.highlightFormatting=!1),We.maxBlockquoteDepth===void 0&&(We.maxBlockquoteDepth=0),We.taskLists===void 0&&(We.taskLists=!1),We.strikethrough===void 0&&(We.strikethrough=!1),We.emoji===void 0&&(We.emoji=!1),We.fencedCodeBlockHighlighting===void 0&&(We.fencedCodeBlockHighlighting=!0),We.fencedCodeBlockDefaultMode===void 0&&(We.fencedCodeBlockDefaultMode="text/plain"),We.xml===void 0&&(We.xml=!0),We.tokenTypeOverrides===void 0&&(We.tokenTypeOverrides={});var Fe={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 Ye in Fe)Fe.hasOwnProperty(Ye)&&We.tokenTypeOverrides[Ye]&&(Fe[Ye]=We.tokenTypeOverrides[Ye]);var Se=/^([*\-_])(?:\s*\1){2,}\s*$/,he=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ee=/^\[(x| )\](?=\s)/i,ve=We.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,rt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ve=/^[^#!\[\]*_\\<>` "'(~:]+/,Ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Pe=/^\s*\[[^\]]+?\]:.*$/,we=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,$e=" ";function at(me,de,Ct){return de.f=de.inline=Ct,Ct(me,de)}function ct(me,de,Ct){return de.f=de.block=Ct,Ct(me,de)}function ut(me){return!me||!/\S/.test(me.string)}function ze(me){if(me.linkTitle=!1,me.linkHref=!1,me.linkText=!1,me.em=!1,me.strong=!1,me.strikethrough=!1,me.quote=0,me.indentedCode=!1,me.f==pt){var de=pe;if(!de){var Ct=te.innerMode(Je,me.htmlState);de=Ct.mode.name=="xml"&&Ct.state.tagStart===null&&!Ct.state.context&&Ct.state.tokenize.isInText}de&&(me.f=ot,me.block=wt,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function wt(me,de){var Ct=me.column()===de.indentation,on=ut(de.prevLine.stream),Bt=de.indentedCode,He=de.prevLine.hr,it=de.list!==!1,ft=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var vn=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,it)){for(de.list=null;vn<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=vn-de.listStack[de.listStack.length-1])}var Pt=!on&&!He&&!de.prevLine.header&&(!it||!Bt)&&!de.prevLine.fencedCodeEnd,Me=(de.list===!1||He||on)&&de.indentation<=ft&&me.match(Se),be=null;if(de.indentationDiff>=4&&(Bt||de.prevLine.fencedCodeEnd||de.prevLine.header||on))return me.skipToEnd(),de.indentedCode=!0,Fe.code;if(me.eatSpace())return null;if(Ct&&de.indentation<=ft&&(be=me.match(ve))&&be[1].length<=6)return de.quote=0,de.header=be[1].length,de.thisLine.header=!0,We.highlightFormatting&&(de.formatting="header"),de.f=de.inline,Ce(de);if(de.indentation<=ft&&me.eat(">"))return de.quote=Ct?1:de.quote+1,We.highlightFormatting&&(de.formatting="quote"),me.eatSpace(),Ce(de);if(!Me&&!de.setext&&Ct&&de.indentation<=ft&&(be=me.match(he))){var Re=be[1]?"ol":"ul";return de.indentation=vn+me.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,We.taskLists&&me.match(Ee,!1)&&(de.taskList=!0),de.f=de.inline,We.highlightFormatting&&(de.formatting=["list","list-"+Re]),Ce(de)}else{if(Ct&&de.indentation<=ft&&(be=me.match(Ae,!0)))return de.quote=0,de.fencedEndRE=new RegExp(be[1]+"+ *$"),de.localMode=We.fencedCodeBlockHighlighting&&je(be[2]||We.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=te.startState(de.localMode)),de.f=de.block=sn,We.highlightFormatting&&(de.formatting="code-block"),de.code=-1,Ce(de);if(de.setext||(!Pt||!it)&&!de.quote&&de.list===!1&&!de.code&&!Me&&!Pe.test(me.string)&&(be=me.lookAhead(1))&&(be=be.match(rt)))return de.setext?(de.header=de.setext,de.setext=0,me.skipToEnd(),We.highlightFormatting&&(de.formatting="header")):(de.header=be[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,Ce(de);if(Me)return me.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,Fe.hr;if(me.peek()==="[")return at(me,de,pn)}return at(me,de,de.inline)}function pt(me,de){var Ct=Je.token(me,de.htmlState);if(!pe){var on=te.innerMode(Je,de.htmlState);(on.mode.name=="xml"&&on.state.tagStart===null&&!on.state.context&&on.state.tokenize.isInText||de.md_inside&&me.current().indexOf(">")>-1)&&(de.f=ot,de.block=wt,de.htmlState=null)}return Ct}function sn(me,de){var Ct=de.listStack[de.listStack.length-1]||0,on=de.indentation<Ct,Bt=Ct+3;if(de.fencedEndRE&&de.indentation<=Bt&&(on||me.match(de.fencedEndRE))){We.highlightFormatting&&(de.formatting="code-block");var He;return on||(He=Ce(de)),de.localMode=de.localState=null,de.block=wt,de.f=ot,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,on?ct(me,de,de.block):He}else return de.localMode?de.localMode.token(me,de.localState):(me.skipToEnd(),Fe.code)}function Ce(me){var de=[];if(me.formatting){de.push(Fe.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var Ct=0;Ct<me.formatting.length;Ct++)de.push(Fe.formatting+"-"+me.formatting[Ct]),me.formatting[Ct]==="header"&&de.push(Fe.formatting+"-"+me.formatting[Ct]+"-"+me.header),me.formatting[Ct]==="quote"&&(!We.maxBlockquoteDepth||We.maxBlockquoteDepth>=me.quote?de.push(Fe.formatting+"-"+me.formatting[Ct]+"-"+me.quote):de.push("error"))}if(me.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(me.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(me.linkHref?de.push(Fe.linkHref,"url"):(me.strong&&de.push(Fe.strong),me.em&&de.push(Fe.em),me.strikethrough&&de.push(Fe.strikethrough),me.emoji&&de.push(Fe.emoji),me.linkText&&de.push(Fe.linkText),me.code&&de.push(Fe.code),me.image&&de.push(Fe.image),me.imageAltText&&de.push(Fe.imageAltText,"link"),me.imageMarker&&de.push(Fe.imageMarker)),me.header&&de.push(Fe.header,Fe.header+"-"+me.header),me.quote&&(de.push(Fe.quote),!We.maxBlockquoteDepth||We.maxBlockquoteDepth>=me.quote?de.push(Fe.quote+"-"+me.quote):de.push(Fe.quote+"-"+We.maxBlockquoteDepth)),me.list!==!1){var on=(me.listStack.length-1)%3;on?on===1?de.push(Fe.list2):de.push(Fe.list3):de.push(Fe.list1)}return me.trailingSpaceNewLine?de.push("trailing-space-new-line"):me.trailingSpace&&de.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function Ke(me,de){if(me.match(Ve,!0))return Ce(de)}function ot(me,de){var Ct=de.text(me,de);if(typeof Ct!="undefined")return Ct;if(de.list)return de.list=null,Ce(de);if(de.taskList){var on=me.match(Ee,!0)[1]===" ";return on?de.taskOpen=!0:de.taskClosed=!0,We.highlightFormatting&&(de.formatting="task"),de.taskList=!1,Ce(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&me.match(/^#+$/,!0))return We.highlightFormatting&&(de.formatting="header"),Ce(de);var Bt=me.next();if(de.linkTitle){de.linkTitle=!1;var He=Bt;Bt==="("&&(He=")"),He=(He+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var it="^\\s*(?:[^"+He+"\\\\]+|\\\\\\\\|\\\\.)"+He;if(me.match(new RegExp(it),!0))return Fe.linkHref}if(Bt==="`"){var ft=de.formatting;We.highlightFormatting&&(de.formatting="code"),me.eatWhile("`");var vn=me.current().length;if(de.code==0&&(!de.quote||vn==1))return de.code=vn,Ce(de);if(vn==de.code){var Pt=Ce(de);return de.code=0,Pt}else return de.formatting=ft,Ce(de)}else if(de.code)return Ce(de);if(Bt==="\\"&&(me.next(),We.highlightFormatting)){var Me=Ce(de),be=Fe.formatting+"-escape";return Me?Me+" "+be:be}if(Bt==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,We.highlightFormatting&&(de.formatting="image"),Ce(de);if(Bt==="["&&de.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,We.highlightFormatting&&(de.formatting="image"),Ce(de);if(Bt==="]"&&de.imageAltText){We.highlightFormatting&&(de.formatting="image");var Me=Ce(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=nt,Me}if(Bt==="["&&!de.image)return de.linkText&&me.match(/^.*?\]/)||(de.linkText=!0,We.highlightFormatting&&(de.formatting="link")),Ce(de);if(Bt==="]"&&de.linkText){We.highlightFormatting&&(de.formatting="link");var Me=Ce(de);return de.linkText=!1,de.inline=de.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?nt:ot,Me}if(Bt==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=_e,We.highlightFormatting&&(de.formatting="link");var Me=Ce(de);return Me?Me+=" ":Me="",Me+Fe.linkInline}if(Bt==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=_e,We.highlightFormatting&&(de.formatting="link");var Me=Ce(de);return Me?Me+=" ":Me="",Me+Fe.linkEmail}if(We.xml&&Bt==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Re=me.string.indexOf(">",me.pos);if(Re!=-1){var lt=me.string.substring(me.start,Re);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(lt)&&(de.md_inside=!0)}return me.backUp(1),de.htmlState=te.startState(Je),ct(me,de,pt)}if(We.xml&&Bt==="<"&&me.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(Bt==="*"||Bt==="_"){for(var Le=1,Ue=me.pos==1?" ":me.string.charAt(me.pos-2);Le<3&&me.eat(Bt);)Le++;var Xe=me.peek()||" ",et=!/\s/.test(Xe)&&(!we.test(Xe)||/\s/.test(Ue)||we.test(Ue)),gt=!/\s/.test(Ue)&&(!we.test(Ue)||/\s/.test(Xe)||we.test(Xe)),xt=null,Dt=null;if(Le%2&&(!de.em&&et&&(Bt==="*"||!gt||we.test(Ue))?xt=!0:de.em==Bt&&gt&&(Bt==="*"||!et||we.test(Xe))&&(xt=!1)),Le>1&&(!de.strong&&et&&(Bt==="*"||!gt||we.test(Ue))?Dt=!0:de.strong==Bt&&gt&&(Bt==="*"||!et||we.test(Xe))&&(Dt=!1)),Dt!=null||xt!=null){We.highlightFormatting&&(de.formatting=xt==null?"strong":Dt==null?"em":"strong em"),xt===!0&&(de.em=Bt),Dt===!0&&(de.strong=Bt);var Pt=Ce(de);return xt===!1&&(de.em=!1),Dt===!1&&(de.strong=!1),Pt}}else if(Bt===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return Ce(de);me.backUp(1)}if(We.strikethrough){if(Bt==="~"&&me.eatWhile(Bt)){if(de.strikethrough){We.highlightFormatting&&(de.formatting="strikethrough");var Pt=Ce(de);return de.strikethrough=!1,Pt}else if(me.match(/^[^\s]/,!1))return de.strikethrough=!0,We.highlightFormatting&&(de.formatting="strikethrough"),Ce(de)}else if(Bt===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return Ce(de);me.backUp(2)}}if(We.emoji&&Bt===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,We.highlightFormatting&&(de.formatting="emoji");var Nt=Ce(de);return de.emoji=!1,Nt}return Bt===" "&&(me.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),Ce(de)}function _e(me,de){var Ct=me.next();if(Ct===">"){de.f=de.inline=ot,We.highlightFormatting&&(de.formatting="link");var on=Ce(de);return on?on+=" ":on="",on+Fe.linkInline}return me.match(/^[^>]+/,!0),Fe.linkInline}function nt(me,de){if(me.eatSpace())return null;var Ct=me.next();return Ct==="("||Ct==="["?(de.f=de.inline=dt(Ct==="("?")":"]"),We.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,Ce(de)):"error"}var Ze={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function dt(me){return function(de,Ct){var on=de.next();if(on===me){Ct.f=Ct.inline=ot,We.highlightFormatting&&(Ct.formatting="link-string");var Bt=Ce(Ct);return Ct.linkHref=!1,Bt}return de.match(Ze[me]),Ct.linkHref=!0,Ce(Ct)}}function pn(me,de){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=Ft,me.next(),We.highlightFormatting&&(de.formatting="link"),de.linkText=!0,Ce(de)):at(me,de,ot)}function Ft(me,de){if(me.match(/^\]:/,!0)){de.f=de.inline=bn,We.highlightFormatting&&(de.formatting="link");var Ct=Ce(de);return de.linkText=!1,Ct}return me.match(/^([^\]\\]|\\.)+/,!0),Fe.linkText}function bn(me,de){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?de.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=ot,Fe.linkHref+" url")}var Rt={startState:function(){return{f:wt,prevLine:{stream:null},thisLine:{stream:null},block:wt,htmlState:null,indentation:0,inline:ot,text:Ke,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(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&te.copyState(Je,me.htmlState),indentation:me.indentation,localMode:me.localMode,localState:me.localMode?te.copyState(me.localMode,me.localState):null,inline:me.inline,text:me.text,formatting:!1,linkText:me.linkText,linkTitle:me.linkTitle,linkHref:me.linkHref,code:me.code,em:me.em,strong:me.strong,strikethrough:me.strikethrough,emoji:me.emoji,header:me.header,setext:me.setext,hr:me.hr,taskList:me.taskList,list:me.list,listStack:me.listStack.slice(0),quote:me.quote,indentedCode:me.indentedCode,trailingSpace:me.trailingSpace,trailingSpaceNewLine:me.trailingSpaceNewLine,md_inside:me.md_inside,fencedEndRE:me.fencedEndRE}},token:function(me,de){if(de.formatting=!1,me!=de.thisLine.stream){if(de.header=0,de.hr=!1,me.match(/^\s*$/,!0))return ze(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:me},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=pt)){var Ct=me.match(/^\s*/,!0)[0].replace(/\t/g,$e).length;if(de.indentation=Ct,de.indentationDiff=null,Ct>0)return null}}return de.f(me,de)},innerMode:function(me){return me.block==pt?{state:me.htmlState,mode:Je}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:Rt}},indent:function(me,de,Ct){return me.block==pt&&Je.indent?Je.indent(me.htmlState,de,Ct):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,de,Ct):te.Pass},blankLine:ze,getType:Ce,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Rt},"xml"),te.defineMIME("text/markdown","markdown"),te.defineMIME("text/x-markdown","markdown")})},98101:function(Ut,Qt,fe){(function(te){te(fe(89780))})(function(te){"use strict";te.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 tt=0;tt<te.modeInfo.length;tt++){var We=te.modeInfo[tt];We.mimes&&(We.mime=We.mimes[0])}te.findModeByMIME=function(Je){Je=Je.toLowerCase();for(var pe=0;pe<te.modeInfo.length;pe++){var je=te.modeInfo[pe];if(je.mime==Je)return je;if(je.mimes){for(var Fe=0;Fe<je.mimes.length;Fe++)if(je.mimes[Fe]==Je)return je}}if(/\+xml$/.test(Je))return te.findModeByMIME("application/xml");if(/\+json$/.test(Je))return te.findModeByMIME("application/json")},te.findModeByExtension=function(Je){Je=Je.toLowerCase();for(var pe=0;pe<te.modeInfo.length;pe++){var je=te.modeInfo[pe];if(je.ext){for(var Fe=0;Fe<je.ext.length;Fe++)if(je.ext[Fe]==Je)return je}}},te.findModeByFileName=function(Je){for(var pe=0;pe<te.modeInfo.length;pe++){var je=te.modeInfo[pe];if(je.file&&je.file.test(Je))return je}var Fe=Je.lastIndexOf("."),Ye=Fe>-1&&Je.substring(Fe+1,Je.length);if(Ye)return te.findModeByExtension(Ye)},te.findModeByName=function(Je){Je=Je.toLowerCase();for(var pe=0;pe<te.modeInfo.length;pe++){var je=te.modeInfo[pe];if(je.name.toLowerCase()==Je)return je;if(je.alias){for(var Fe=0;Fe<je.alias.length;Fe++)if(je.alias[Fe].toLowerCase()==Je)return je}}}})},67549:function(Ut,Qt,fe){(function(te){te(fe(89780))})(function(te){"use strict";te.defineMode("stex",function(tt,We){"use strict";function Je(Ve,Ae){Ve.cmdState.push(Ae)}function pe(Ve){return Ve.cmdState.length>0?Ve.cmdState[Ve.cmdState.length-1]:null}function je(Ve){var Ae=Ve.cmdState.pop();Ae&&Ae.closeBracket()}function Fe(Ve){for(var Ae=Ve.cmdState,Pe=Ae.length-1;Pe>=0;Pe--){var we=Ae[Pe];if(we.name!="DEFAULT")return we}return{styleIdentifier:function(){return null}}}function Ye(Ve,Ae,Pe){return function(){this.name=Ve,this.bracketNo=0,this.style=Ae,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 Se={};Se.importmodule=Ye("importmodule","tag",["string","builtin"]),Se.documentclass=Ye("documentclass","tag",["","atom"]),Se.usepackage=Ye("usepackage","tag",["atom"]),Se.begin=Ye("begin","tag",["atom"]),Se.end=Ye("end","tag",["atom"]),Se.label=Ye("label","tag",["atom"]),Se.ref=Ye("ref","tag",["atom"]),Se.eqref=Ye("eqref","tag",["atom"]),Se.cite=Ye("cite","tag",["atom"]),Se.bibitem=Ye("bibitem","tag",["atom"]),Se.Bibitem=Ye("Bibitem","tag",["atom"]),Se.RBibitem=Ye("RBibitem","tag",["atom"]),Se.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function he(Ve,Ae){Ve.f=Ae}function Ee(Ve,Ae){var Pe;if(Ve.match(/^\\[a-zA-Z@]+/)){var we=Ve.current().slice(1);return Pe=Se.hasOwnProperty(we)?Se[we]:Se.DEFAULT,Pe=new Pe,Je(Ae,Pe),he(Ae,rt),Pe.style}if(Ve.match(/^\\[$&%#{}_]/)||Ve.match(/^\\[,;!\/\\]/))return"tag";if(Ve.match("\\["))return he(Ae,function(at,ct){return ve(at,ct,"\\]")}),"keyword";if(Ve.match("\\("))return he(Ae,function(at,ct){return ve(at,ct,"\\)")}),"keyword";if(Ve.match("$$"))return he(Ae,function(at,ct){return ve(at,ct,"$$")}),"keyword";if(Ve.match("$"))return he(Ae,function(at,ct){return ve(at,ct,"$")}),"keyword";var $e=Ve.next();if($e=="%")return Ve.skipToEnd(),"comment";if($e=="}"||$e=="]"){if(Pe=pe(Ae),Pe)Pe.closeBracket($e),he(Ae,rt);else return"error";return"bracket"}else return $e=="{"||$e=="["?(Pe=Se.DEFAULT,Pe=new Pe,Je(Ae,Pe),"bracket"):/\d/.test($e)?(Ve.eatWhile(/[\w.%]/),"atom"):(Ve.eatWhile(/[\w\-_]/),Pe=Fe(Ae),Pe.name=="begin"&&(Pe.argument=Ve.current()),Pe.styleIdentifier())}function ve(Ve,Ae,Pe){if(Ve.eatSpace())return null;if(Pe&&Ve.match(Pe))return he(Ae,Ee),"keyword";if(Ve.match(/^\\[a-zA-Z@]+/))return"tag";if(Ve.match(/^[a-zA-Z]+/))return"variable-2";if(Ve.match(/^\\[$&%#{}_]/)||Ve.match(/^\\[,;!\/]/)||Ve.match(/^[\^_&]/))return"tag";if(Ve.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ve.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var we=Ve.next();return we=="{"||we=="}"||we=="["||we=="]"||we=="("||we==")"?"bracket":we=="%"?(Ve.skipToEnd(),"comment"):"error"}function rt(Ve,Ae){var Pe=Ve.peek(),we;return Pe=="{"||Pe=="["?(we=pe(Ae),we.openBracket(Pe),Ve.eat(Pe),he(Ae,Ee),"bracket"):/[ \t\r]/.test(Pe)?(Ve.eat(Pe),null):(he(Ae,Ee),je(Ae),Ee(Ve,Ae))}return{startState:function(){var Ve=We.inMathMode?function(Ae,Pe){return ve(Ae,Pe)}:Ee;return{cmdState:[],f:Ve}},copyState:function(Ve){return{cmdState:Ve.cmdState.slice(),f:Ve.f}},token:function(Ve,Ae){return Ae.f(Ve,Ae)},blankLine:function(Ve){Ve.f=Ee,Ve.cmdState.length=0},lineComment:"%"}}),te.defineMIME("text/x-stex","stex"),te.defineMIME("text/x-latex","stex")})},15525:function(Ut,Qt,fe){(function(te){te(fe(89780))})(function(te){"use strict";var tt={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},We={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};te.defineMode("xml",function(Je,pe){var je=Je.indentUnit,Fe={},Ye=pe.htmlMode?tt:We;for(var Se in Ye)Fe[Se]=Ye[Se];for(var Se in pe)Fe[Se]=pe[Se];var he,Ee;function ve(_e,nt){function Ze(Ft){return nt.tokenize=Ft,Ft(_e,nt)}var dt=_e.next();if(dt=="<")return _e.eat("!")?_e.eat("[")?_e.match("CDATA[")?Ze(Ae("atom","]]>")):null:_e.match("--")?Ze(Ae("comment","-->")):_e.match("DOCTYPE",!0,!0)?(_e.eatWhile(/[\w\._\-]/),Ze(Pe(1))):null:_e.eat("?")?(_e.eatWhile(/[\w\._\-]/),nt.tokenize=Ae("meta","?>"),"meta"):(he=_e.eat("/")?"closeTag":"openTag",nt.tokenize=rt,"tag bracket");if(dt=="&"){var pn;return _e.eat("#")?_e.eat("x")?pn=_e.eatWhile(/[a-fA-F\d]/)&&_e.eat(";"):pn=_e.eatWhile(/[\d]/)&&_e.eat(";"):pn=_e.eatWhile(/[\w\.\-:]/)&&_e.eat(";"),pn?"atom":"error"}else return _e.eatWhile(/[^&<]/),null}ve.isInText=!0;function rt(_e,nt){var Ze=_e.next();if(Ze==">"||Ze=="/"&&_e.eat(">"))return nt.tokenize=ve,he=Ze==">"?"endTag":"selfcloseTag","tag bracket";if(Ze=="=")return he="equals",null;if(Ze=="<"){nt.tokenize=ve,nt.state=ct,nt.tagName=nt.tagStart=null;var dt=nt.tokenize(_e,nt);return dt?dt+" tag error":"tag error"}else return/[\'\"]/.test(Ze)?(nt.tokenize=Ve(Ze),nt.stringStartCol=_e.column(),nt.tokenize(_e,nt)):(_e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ve(_e){var nt=function(Ze,dt){for(;!Ze.eol();)if(Ze.next()==_e){dt.tokenize=rt;break}return"string"};return nt.isInAttribute=!0,nt}function Ae(_e,nt){return function(Ze,dt){for(;!Ze.eol();){if(Ze.match(nt)){dt.tokenize=ve;break}Ze.next()}return _e}}function Pe(_e){return function(nt,Ze){for(var dt;(dt=nt.next())!=null;){if(dt=="<")return Ze.tokenize=Pe(_e+1),Ze.tokenize(nt,Ze);if(dt==">")if(_e==1){Ze.tokenize=ve;break}else return Ze.tokenize=Pe(_e-1),Ze.tokenize(nt,Ze)}return"meta"}}function we(_e,nt,Ze){this.prev=_e.context,this.tagName=nt,this.indent=_e.indented,this.startOfLine=Ze,(Fe.doNotIndent.hasOwnProperty(nt)||_e.context&&_e.context.noIndent)&&(this.noIndent=!0)}function $e(_e){_e.context&&(_e.context=_e.context.prev)}function at(_e,nt){for(var Ze;;){if(!_e.context||(Ze=_e.context.tagName,!Fe.contextGrabbers.hasOwnProperty(Ze)||!Fe.contextGrabbers[Ze].hasOwnProperty(nt)))return;$e(_e)}}function ct(_e,nt,Ze){return _e=="openTag"?(Ze.tagStart=nt.column(),ut):_e=="closeTag"?ze:ct}function ut(_e,nt,Ze){return _e=="word"?(Ze.tagName=nt.current(),Ee="tag",sn):Fe.allowMissingTagName&&_e=="endTag"?(Ee="tag bracket",sn(_e,nt,Ze)):(Ee="error",ut)}function ze(_e,nt,Ze){if(_e=="word"){var dt=nt.current();return Ze.context&&Ze.context.tagName!=dt&&Fe.implicitlyClosed.hasOwnProperty(Ze.context.tagName)&&$e(Ze),Ze.context&&Ze.context.tagName==dt||Fe.matchClosing===!1?(Ee="tag",wt):(Ee="tag error",pt)}else return Fe.allowMissingTagName&&_e=="endTag"?(Ee="tag bracket",wt(_e,nt,Ze)):(Ee="error",pt)}function wt(_e,nt,Ze){return _e!="endTag"?(Ee="error",wt):($e(Ze),ct)}function pt(_e,nt,Ze){return Ee="error",wt(_e,nt,Ze)}function sn(_e,nt,Ze){if(_e=="word")return Ee="attribute",Ce;if(_e=="endTag"||_e=="selfcloseTag"){var dt=Ze.tagName,pn=Ze.tagStart;return Ze.tagName=Ze.tagStart=null,_e=="selfcloseTag"||Fe.autoSelfClosers.hasOwnProperty(dt)?at(Ze,dt):(at(Ze,dt),Ze.context=new we(Ze,dt,pn==Ze.indented)),ct}return Ee="error",sn}function Ce(_e,nt,Ze){return _e=="equals"?Ke:(Fe.allowMissing||(Ee="error"),sn(_e,nt,Ze))}function Ke(_e,nt,Ze){return _e=="string"?ot:_e=="word"&&Fe.allowUnquoted?(Ee="string",sn):(Ee="error",sn(_e,nt,Ze))}function ot(_e,nt,Ze){return _e=="string"?ot:sn(_e,nt,Ze)}return{startState:function(_e){var nt={tokenize:ve,state:ct,indented:_e||0,tagName:null,tagStart:null,context:null};return _e!=null&&(nt.baseIndent=_e),nt},token:function(_e,nt){if(!nt.tagName&&_e.sol()&&(nt.indented=_e.indentation()),_e.eatSpace())return null;he=null;var Ze=nt.tokenize(_e,nt);return(Ze||he)&&Ze!="comment"&&(Ee=null,nt.state=nt.state(he||Ze,_e,nt),Ee&&(Ze=Ee=="error"?Ze+" error":Ee)),Ze},indent:function(_e,nt,Ze){var dt=_e.context;if(_e.tokenize.isInAttribute)return _e.tagStart==_e.indented?_e.stringStartCol+1:_e.indented+je;if(dt&&dt.noIndent)return te.Pass;if(_e.tokenize!=rt&&_e.tokenize!=ve)return Ze?Ze.match(/^(\s*)/)[0].length:0;if(_e.tagName)return Fe.multilineTagIndentPastTag!==!1?_e.tagStart+_e.tagName.length+2:_e.tagStart+je*(Fe.multilineTagIndentFactor||1);if(Fe.alignCDATA&&/<!\[CDATA\[/.test(nt))return 0;var pn=nt&&/^<(\/)?([\w_:\.-]*)/.exec(nt);if(pn&&pn[1])for(;dt;)if(dt.tagName==pn[2]){dt=dt.prev;break}else if(Fe.implicitlyClosed.hasOwnProperty(dt.tagName))dt=dt.prev;else break;else if(pn)for(;dt;){var Ft=Fe.contextGrabbers[dt.tagName];if(Ft&&Ft.hasOwnProperty(pn[2]))dt=dt.prev;else break}for(;dt&&dt.prev&&!dt.startOfLine;)dt=dt.prev;return dt?dt.indent+je:_e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Fe.htmlMode?"html":"xml",helperType:Fe.htmlMode?"html":"xml",skipAttribute:function(_e){_e.state==Ke&&(_e.state=sn)},xmlCurrentTag:function(_e){return _e.tagName?{name:_e.tagName,close:_e.type=="closeTag"}:null},xmlCurrentContext:function(_e){for(var nt=[],Ze=_e.context;Ze;Ze=Ze.prev)Ze.tagName&&nt.push(Ze.tagName);return nt.reverse()}}}),te.defineMIME("text/xml","xml"),te.defineMIME("application/xml","xml"),te.mimeModes.hasOwnProperty("text/html")||te.defineMIME("text/html",{name:"xml",htmlMode:!0})})},66042:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return nt}});var te=fe(33885),tt=fe(42978),We=fe(43403),Je=fe(34280),pe=fe(59301),je=pe.createContext(null),Fe=pe.createContext({}),Ye=je,Se=fe(20068),he=fe(54476),Ee=fe(92310),ve=fe.n(Ee),rt=fe(77900),Ve=fe(10228),Ae=fe(26112),Pe=fe(75931),we=fe(8654),$e=["prefixCls","className","containerRef"],at=function(dt){var pn=dt.prefixCls,Ft=dt.className,bn=dt.containerRef,Rt=(0,Pe.Z)(dt,$e),me=pe.useContext(Fe),de=me.panel,Ct=(0,we.x1)(de,bn);return pe.createElement("div",(0,he.Z)({className:ve()("".concat(pn,"-content"),Ft),role:"dialog",ref:Ct},(0,Ae.Z)(dt,{aria:!0}),{"aria-modal":"true"},Rt))},ct=at,ut=fe(48736);function ze(Ze){return typeof Ze=="string"&&String(Number(Ze))===Ze?((0,ut.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ze)):Ze}function wt(Ze){warning(!("wrapperClassName"in Ze),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ze.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var pt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function sn(Ze,dt){var pn,Ft,bn,Rt=Ze.prefixCls,me=Ze.open,de=Ze.placement,Ct=Ze.inline,on=Ze.push,Bt=Ze.forceRender,He=Ze.autoFocus,it=Ze.keyboard,ft=Ze.classNames,vn=Ze.rootClassName,Pt=Ze.rootStyle,Me=Ze.zIndex,be=Ze.className,Re=Ze.id,lt=Ze.style,Le=Ze.motion,Ue=Ze.width,Xe=Ze.height,et=Ze.children,gt=Ze.mask,xt=Ze.maskClosable,Dt=Ze.maskMotion,Nt=Ze.maskClassName,gn=Ze.maskStyle,Jt=Ze.afterOpenChange,le=Ze.onClose,ne=Ze.onMouseEnter,ee=Ze.onMouseOver,oe=Ze.onMouseLeave,ue=Ze.onClick,ie=Ze.onKeyDown,ye=Ze.onKeyUp,vt=Ze.styles,yt=Ze.drawerRender,kt=pe.useRef(),Oe=pe.useRef(),$t=pe.useRef();pe.useImperativeHandle(dt,function(){return kt.current});var _t=function(vi){var wi=vi.keyCode,Ni=vi.shiftKey;switch(wi){case Ve.Z.TAB:{if(wi===Ve.Z.TAB){if(!Ni&&document.activeElement===$t.current){var en;(en=Oe.current)===null||en===void 0||en.focus({preventScroll:!0})}else if(Ni&&document.activeElement===Oe.current){var Ln;(Ln=$t.current)===null||Ln===void 0||Ln.focus({preventScroll:!0})}}break}case Ve.Z.ESC:{le&&it&&(vi.stopPropagation(),le(vi));break}}};pe.useEffect(function(){if(me&&He){var ti;(ti=kt.current)===null||ti===void 0||ti.focus({preventScroll:!0})}},[me]);var Gt=pe.useState(!1),xn=(0,tt.Z)(Gt,2),Zn=xn[0],jt=xn[1],Rn=pe.useContext(Ye),Ei;typeof on=="boolean"?Ei=on?{}:{distance:0}:Ei=on||{};var si=(pn=(Ft=(bn=Ei)===null||bn===void 0?void 0:bn.distance)!==null&&Ft!==void 0?Ft:Rn==null?void 0:Rn.pushDistance)!==null&&pn!==void 0?pn:180,ki=pe.useMemo(function(){return{pushDistance:si,push:function(){jt(!0)},pull:function(){jt(!1)}}},[si]);pe.useEffect(function(){if(me){var ti;Rn==null||(ti=Rn.push)===null||ti===void 0||ti.call(Rn)}else{var vi;Rn==null||(vi=Rn.pull)===null||vi===void 0||vi.call(Rn)}},[me]),pe.useEffect(function(){return function(){var ti;Rn==null||(ti=Rn.pull)===null||ti===void 0||ti.call(Rn)}},[]);var gi=gt&&pe.createElement(rt.default,(0,he.Z)({key:"mask"},Dt,{visible:me}),function(ti,vi){var wi=ti.className,Ni=ti.style;return pe.createElement("div",{className:ve()("".concat(Rt,"-mask"),wi,ft==null?void 0:ft.mask,Nt),style:(0,te.Z)((0,te.Z)((0,te.Z)({},Ni),gn),vt==null?void 0:vt.mask),onClick:xt&&me?le:void 0,ref:vi})}),Ai=typeof Le=="function"?Le(de):Le,Bi={};if(Zn&&si)switch(de){case"top":Bi.transform="translateY(".concat(si,"px)");break;case"bottom":Bi.transform="translateY(".concat(-si,"px)");break;case"left":Bi.transform="translateX(".concat(si,"px)");break;default:Bi.transform="translateX(".concat(-si,"px)");break}de==="left"||de==="right"?Bi.width=ze(Ue):Bi.height=ze(Xe);var ri={onMouseEnter:ne,onMouseOver:ee,onMouseLeave:oe,onClick:ue,onKeyDown:ie,onKeyUp:ye},Si=pe.createElement(rt.default,(0,he.Z)({key:"panel"},Ai,{visible:me,forceRender:Bt,onVisibleChanged:function(vi){Jt==null||Jt(vi)},removeOnLeave:!1,leavedClassName:"".concat(Rt,"-content-wrapper-hidden")}),function(ti,vi){var wi=ti.className,Ni=ti.style,en=pe.createElement(ct,(0,he.Z)({id:Re,containerRef:vi,prefixCls:Rt,className:ve()(be,ft==null?void 0:ft.content),style:(0,te.Z)((0,te.Z)({},lt),vt==null?void 0:vt.content)},(0,Ae.Z)(Ze,{aria:!0}),ri),et);return pe.createElement("div",(0,he.Z)({className:ve()("".concat(Rt,"-content-wrapper"),ft==null?void 0:ft.wrapper,wi),style:(0,te.Z)((0,te.Z)((0,te.Z)({},Bi),Ni),vt==null?void 0:vt.wrapper)},(0,Ae.Z)(Ze,{data:!0})),yt?yt(en):en)}),yi=(0,te.Z)({},Pt);return Me&&(yi.zIndex=Me),pe.createElement(Ye.Provider,{value:ki},pe.createElement("div",{className:ve()(Rt,"".concat(Rt,"-").concat(de),vn,(0,Se.Z)((0,Se.Z)({},"".concat(Rt,"-open"),me),"".concat(Rt,"-inline"),Ct)),style:yi,tabIndex:-1,ref:kt,onKeyDown:_t},gi,pe.createElement("div",{tabIndex:0,ref:Oe,style:pt,"aria-hidden":"true","data-sentinel":"start"}),Si,pe.createElement("div",{tabIndex:0,ref:$t,style:pt,"aria-hidden":"true","data-sentinel":"end"})))}var Ce=pe.forwardRef(sn),Ke=Ce,ot=function(dt){var pn=dt.open,Ft=pn===void 0?!1:pn,bn=dt.prefixCls,Rt=bn===void 0?"rc-drawer":bn,me=dt.placement,de=me===void 0?"right":me,Ct=dt.autoFocus,on=Ct===void 0?!0:Ct,Bt=dt.keyboard,He=Bt===void 0?!0:Bt,it=dt.width,ft=it===void 0?378:it,vn=dt.mask,Pt=vn===void 0?!0:vn,Me=dt.maskClosable,be=Me===void 0?!0:Me,Re=dt.getContainer,lt=dt.forceRender,Le=dt.afterOpenChange,Ue=dt.destroyOnClose,Xe=dt.onMouseEnter,et=dt.onMouseOver,gt=dt.onMouseLeave,xt=dt.onClick,Dt=dt.onKeyDown,Nt=dt.onKeyUp,gn=dt.panelRef,Jt=pe.useState(!1),le=(0,tt.Z)(Jt,2),ne=le[0],ee=le[1],oe=pe.useState(!1),ue=(0,tt.Z)(oe,2),ie=ue[0],ye=ue[1];(0,Je.Z)(function(){ye(!0)},[]);var vt=ie?Ft:!1,yt=pe.useRef(),kt=pe.useRef();(0,Je.Z)(function(){vt&&(kt.current=document.activeElement)},[vt]);var Oe=function(Zn){var jt;if(ee(Zn),Le==null||Le(Zn),!Zn&&kt.current&&!((jt=yt.current)!==null&&jt!==void 0&&jt.contains(kt.current))){var Rn;(Rn=kt.current)===null||Rn===void 0||Rn.focus({preventScroll:!0})}},$t=pe.useMemo(function(){return{panel:gn}},[gn]);if(!lt&&!ne&&!vt&&Ue)return null;var _t={onMouseEnter:Xe,onMouseOver:et,onMouseLeave:gt,onClick:xt,onKeyDown:Dt,onKeyUp:Nt},Gt=(0,te.Z)((0,te.Z)({},dt),{},{open:vt,prefixCls:Rt,placement:de,autoFocus:on,keyboard:He,width:ft,mask:Pt,maskClosable:be,inline:Re===!1,afterOpenChange:Oe,ref:yt},_t);return pe.createElement(Fe.Provider,{value:$t},pe.createElement(We.Z,{open:vt||lt||ne,autoDestroy:!1,getContainer:Re,autoLock:Pt&&(vt||ne)},pe.createElement(Ke,Gt)))},_e=ot,nt=_e},20922:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return Pt}});var te=fe(54476),tt=fe(20068),We=fe(76190),Je=fe(42978),pe=fe(75931),je=fe(67732),Fe=fe(83652);function Ye(){return typeof BigInt=="function"}function Se(Me){return!Me&&Me!==0&&!Number.isNaN(Me)||!String(Me).trim()}function he(Me){var be=Me.trim(),Re=be.startsWith("-");Re&&(be=be.slice(1)),be=be.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),be.startsWith(".")&&(be="0".concat(be));var lt=be||"0",Le=lt.split("."),Ue=Le[0]||"0",Xe=Le[1]||"0";Ue==="0"&&Xe==="0"&&(Re=!1);var et=Re?"-":"";return{negative:Re,negativeStr:et,trimStr:lt,integerStr:Ue,decimalStr:Xe,fullStr:"".concat(et).concat(lt)}}function Ee(Me){var be=String(Me);return!Number.isNaN(Number(be))&&be.includes("e")}function ve(Me){var be=String(Me);if(Ee(Me)){var Re=Number(be.slice(be.indexOf("e-")+2)),lt=be.match(/\.(\d+)/);return lt!=null&&lt[1]&&(Re+=lt[1].length),Re}return be.includes(".")&&Ve(be)?be.length-be.indexOf(".")-1:0}function rt(Me){var be=String(Me);if(Ee(Me)){if(Me>Number.MAX_SAFE_INTEGER)return String(Ye()?BigInt(Me).toString():Number.MAX_SAFE_INTEGER);if(Me<Number.MIN_SAFE_INTEGER)return String(Ye()?BigInt(Me).toString():Number.MIN_SAFE_INTEGER);be=Me.toFixed(ve(be))}return he(be).fullStr}function Ve(Me){return typeof Me=="number"?!Number.isNaN(Me):Me?/^\s*-?\d+(\.\d+)?\s*$/.test(Me)||/^\s*-?\d+\.\s*$/.test(Me)||/^\s*-?\.\d+\s*$/.test(Me):!1}var Ae=function(){function Me(be){if((0,je.Z)(this,Me),(0,tt.Z)(this,"origin",""),(0,tt.Z)(this,"negative",void 0),(0,tt.Z)(this,"integer",void 0),(0,tt.Z)(this,"decimal",void 0),(0,tt.Z)(this,"decimalLen",void 0),(0,tt.Z)(this,"empty",void 0),(0,tt.Z)(this,"nan",void 0),Se(be)){this.empty=!0;return}if(this.origin=String(be),be==="-"||Number.isNaN(be)){this.nan=!0;return}var Re=be;if(Ee(Re)&&(Re=Number(Re)),Re=typeof Re=="string"?Re:rt(Re),Ve(Re)){var lt=he(Re);this.negative=lt.negative;var Le=lt.trimStr.split(".");this.integer=BigInt(Le[0]);var Ue=Le[1]||"0";this.decimal=BigInt(Ue),this.decimalLen=Ue.length}else this.nan=!0}return(0,Fe.Z)(Me,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Re){var lt="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Re,"0"));return BigInt(lt)}},{key:"negate",value:function(){var Re=new Me(this.toString());return Re.negative=!Re.negative,Re}},{key:"cal",value:function(Re,lt,Le){var Ue=Math.max(this.getDecimalStr().length,Re.getDecimalStr().length),Xe=this.alignDecimal(Ue),et=Re.alignDecimal(Ue),gt=lt(Xe,et).toString(),xt=Le(Ue),Dt=he(gt),Nt=Dt.negativeStr,gn=Dt.trimStr,Jt="".concat(Nt).concat(gn.padStart(xt+1,"0"));return new Me("".concat(Jt.slice(0,-xt),".").concat(Jt.slice(-xt)))}},{key:"add",value:function(Re){if(this.isInvalidate())return new Me(Re);var lt=new Me(Re);return lt.isInvalidate()?this:this.cal(lt,function(Le,Ue){return Le+Ue},function(Le){return Le})}},{key:"multi",value:function(Re){var lt=new Me(Re);return this.isInvalidate()||lt.isInvalidate()?new Me(NaN):this.cal(lt,function(Le,Ue){return Le*Ue},function(Le){return Le*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Re){return this.toString()===(Re==null?void 0:Re.toString())}},{key:"lessEquals",value:function(Re){return this.add(Re.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Re?this.isInvalidate()?"":he("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Me}(),Pe=function(){function Me(be){if((0,je.Z)(this,Me),(0,tt.Z)(this,"origin",""),(0,tt.Z)(this,"number",void 0),(0,tt.Z)(this,"empty",void 0),Se(be)){this.empty=!0;return}this.origin=String(be),this.number=Number(be)}return(0,Fe.Z)(Me,[{key:"negate",value:function(){return new Me(-this.toNumber())}},{key:"add",value:function(Re){if(this.isInvalidate())return new Me(Re);var lt=Number(Re);if(Number.isNaN(lt))return this;var Le=this.number+lt;if(Le>Number.MAX_SAFE_INTEGER)return new Me(Number.MAX_SAFE_INTEGER);if(Le<Number.MIN_SAFE_INTEGER)return new Me(Number.MIN_SAFE_INTEGER);var Ue=Math.max(ve(this.number),ve(lt));return new Me(Le.toFixed(Ue))}},{key:"multi",value:function(Re){var lt=Number(Re);if(this.isInvalidate()||Number.isNaN(lt))return new Me(NaN);var Le=this.number*lt;if(Le>Number.MAX_SAFE_INTEGER)return new Me(Number.MAX_SAFE_INTEGER);if(Le<Number.MIN_SAFE_INTEGER)return new Me(Number.MIN_SAFE_INTEGER);var Ue=Math.max(ve(this.number),ve(lt));return new Me(Le.toFixed(Ue))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Re){return this.toNumber()===(Re==null?void 0:Re.toNumber())}},{key:"lessEquals",value:function(Re){return this.add(Re.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Re?this.isInvalidate()?"":rt(this.number):this.origin}}]),Me}();function we(Me){return Ye()?new Ae(Me):new Pe(Me)}function $e(Me,be,Re){var lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Me==="")return"";var Le=he(Me),Ue=Le.negativeStr,Xe=Le.integerStr,et=Le.decimalStr,gt="".concat(be).concat(et),xt="".concat(Ue).concat(Xe);if(Re>=0){var Dt=Number(et[Re]);if(Dt>=5&&!lt){var Nt=we(Me).add("".concat(Ue,"0.").concat("0".repeat(Re)).concat(10-Dt));return $e(Nt.toString(),be,Re,lt)}return Re===0?xt:"".concat(xt).concat(be).concat(et.padEnd(Re,"0").slice(0,Re))}return gt===".0"?xt:"".concat(xt).concat(gt)}var at=we,ct=fe(92310),ut=fe.n(ct),ze=fe(36901),wt=fe(34280);function pt(Me,be){return typeof Proxy!="undefined"&&Me?new Proxy(Me,{get:function(lt,Le){if(be[Le])return be[Le];var Ue=lt[Le];return typeof Ue=="function"?Ue.bind(lt):Ue}}):Me}var sn=fe(8654),Ce=fe(59301),Ke=fe(48736);function ot(Me,be){var Re=(0,Ce.useRef)(null);function lt(){try{var Ue=Me.selectionStart,Xe=Me.selectionEnd,et=Me.value,gt=et.substring(0,Ue),xt=et.substring(Xe);Re.current={start:Ue,end:Xe,value:et,beforeTxt:gt,afterTxt:xt}}catch(Dt){}}function Le(){if(Me&&Re.current&&be)try{var Ue=Me.value,Xe=Re.current,et=Xe.beforeTxt,gt=Xe.afterTxt,xt=Xe.start,Dt=Ue.length;if(Ue.startsWith(et))Dt=et.length;else if(Ue.endsWith(gt))Dt=Ue.length-Re.current.afterTxt.length;else{var Nt=et[xt-1],gn=Ue.indexOf(Nt,xt-1);gn!==-1&&(Dt=gn+1)}Me.setSelectionRange(Dt,Dt)}catch(Jt){(0,Ke.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Jt.message))}}return[lt,Le]}var _e=fe(49658),nt=function(){var be=(0,Ce.useState)(!1),Re=(0,Je.Z)(be,2),lt=Re[0],Le=Re[1];return(0,wt.Z)(function(){Le((0,_e.Z)())},[]),lt},Ze=nt,dt=fe(16089),pn=200,Ft=600;function bn(Me){var be=Me.prefixCls,Re=Me.upNode,lt=Me.downNode,Le=Me.upDisabled,Ue=Me.downDisabled,Xe=Me.onStep,et=Ce.useRef(),gt=Ce.useRef([]),xt=Ce.useRef();xt.current=Xe;var Dt=function(){clearTimeout(et.current)},Nt=function(ie,ye){ie.preventDefault(),Dt(),xt.current(ye);function vt(){xt.current(ye),et.current=setTimeout(vt,pn)}et.current=setTimeout(vt,Ft)};Ce.useEffect(function(){return function(){Dt(),gt.current.forEach(function(ue){return dt.Z.cancel(ue)})}},[]);var gn=Ze();if(gn)return null;var Jt="".concat(be,"-handler"),le=ut()(Jt,"".concat(Jt,"-up"),(0,tt.Z)({},"".concat(Jt,"-up-disabled"),Le)),ne=ut()(Jt,"".concat(Jt,"-down"),(0,tt.Z)({},"".concat(Jt,"-down-disabled"),Ue)),ee=function(){return gt.current.push((0,dt.Z)(Dt))},oe={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return Ce.createElement("div",{className:"".concat(Jt,"-wrap")},Ce.createElement("span",(0,te.Z)({},oe,{onMouseDown:function(ie){Nt(ie,!0)},"aria-label":"Increase Value","aria-disabled":Le,className:le}),Re||Ce.createElement("span",{unselectable:"on",className:"".concat(be,"-handler-up-inner")})),Ce.createElement("span",(0,te.Z)({},oe,{onMouseDown:function(ie){Nt(ie,!1)},"aria-label":"Decrease Value","aria-disabled":Ue,className:ne}),lt||Ce.createElement("span",{unselectable:"on",className:"".concat(be,"-handler-down-inner")})))}function Rt(Me){var be=typeof Me=="number"?rt(Me):he(Me).fullStr,Re=be.includes(".");return Re?he(be.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Me+"0"}var me=fe(30292),de=function(){var Me=(0,Ce.useRef)(0),be=function(){dt.Z.cancel(Me.current)};return(0,Ce.useEffect)(function(){return be},[]),function(Re){be(),Me.current=(0,dt.Z)(function(){Re()})}},Ct=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],on=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Bt=function(be,Re){return be||Re.isEmpty()?Re.toString():Re.toNumber()},He=function(be){var Re=at(be);return Re.isInvalidate()?null:Re},it=Ce.forwardRef(function(Me,be){var Re=Me.prefixCls,lt=Me.className,Le=Me.style,Ue=Me.min,Xe=Me.max,et=Me.step,gt=et===void 0?1:et,xt=Me.defaultValue,Dt=Me.value,Nt=Me.disabled,gn=Me.readOnly,Jt=Me.upHandler,le=Me.downHandler,ne=Me.keyboard,ee=Me.changeOnWheel,oe=ee===void 0?!1:ee,ue=Me.controls,ie=ue===void 0?!0:ue,ye=Me.classNames,vt=Me.stringMode,yt=Me.parser,kt=Me.formatter,Oe=Me.precision,$t=Me.decimalSeparator,_t=Me.onChange,Gt=Me.onInput,xn=Me.onPressEnter,Zn=Me.onStep,jt=Me.changeOnBlur,Rn=jt===void 0?!0:jt,Ei=Me.domRef,si=(0,pe.Z)(Me,Ct),ki="".concat(Re,"-input"),gi=Ce.useRef(null),Ai=Ce.useState(!1),Bi=(0,Je.Z)(Ai,2),ri=Bi[0],Si=Bi[1],yi=Ce.useRef(!1),ti=Ce.useRef(!1),vi=Ce.useRef(!1),wi=Ce.useState(function(){return at(Dt!=null?Dt:xt)}),Ni=(0,Je.Z)(wi,2),en=Ni[0],Ln=Ni[1];function Yn(rn){Dt===void 0&&Ln(rn)}var Dn=Ce.useCallback(function(rn,bt){if(!bt)return Oe>=0?Oe:Math.max(ve(rn),ve(gt))},[Oe,gt]),pi=Ce.useCallback(function(rn){var bt=String(rn);if(yt)return yt(bt);var ht=bt;return $t&&(ht=ht.replace($t,".")),ht.replace(/[^\w.-]+/g,"")},[yt,$t]),mi=Ce.useRef(""),Ti=Ce.useCallback(function(rn,bt){if(kt)return kt(rn,{userTyping:bt,input:String(mi.current)});var ht=typeof rn=="number"?rt(rn):rn;if(!bt){var ke=Dn(ht,bt);if(Ve(ht)&&($t||ke>=0)){var nn=$t||".";ht=$e(ht,nn,ke)}}return ht},[kt,Dn,$t]),ui=Ce.useState(function(){var rn=xt!=null?xt:Dt;return en.isInvalidate()&&["string","number"].includes((0,We.Z)(rn))?Number.isNaN(rn)?"":rn:Ti(en.toString(),!1)}),oi=(0,Je.Z)(ui,2),Ci=oi[0],Yt=oi[1];mi.current=Ci;function st(rn,bt){Yt(Ti(rn.isInvalidate()?rn.toString(!1):rn.toString(!bt),bt))}var un=Ce.useMemo(function(){return He(Xe)},[Xe,Oe]),Gn=Ce.useMemo(function(){return He(Ue)},[Ue,Oe]),di=Ce.useMemo(function(){return!un||!en||en.isInvalidate()?!1:un.lessEquals(en)},[un,en]),De=Ce.useMemo(function(){return!Gn||!en||en.isInvalidate()?!1:en.lessEquals(Gn)},[Gn,en]),Ne=ot(gi.current,ri),It=(0,Je.Z)(Ne,2),Et=It[0],Ge=It[1],At=function(bt){return un&&!bt.lessEquals(un)?un:Gn&&!Gn.lessEquals(bt)?Gn:null},tn=function(bt){return!At(bt)},qt=function(bt,ht){var ke=bt,nn=tn(ke)||ke.isEmpty();if(!ke.isEmpty()&&!ht&&(ke=At(ke)||ke,nn=!0),!gn&&!Nt&&nn){var En=ke.toString(),Pn=Dn(En,ht);return Pn>=0&&(ke=at($e(En,".",Pn)),tn(ke)||(ke=at($e(En,".",Pn,!0)))),ke.equals(en)||(Yn(ke),_t==null||_t(ke.isEmpty()?null:Bt(vt,ke)),Dt===void 0&&st(ke,ht)),ke}return en},cn=de(),Kt=function rn(bt){if(Et(),mi.current=bt,Yt(bt),!ti.current){var ht=pi(bt),ke=at(ht);ke.isNaN()||qt(ke,!0)}Gt==null||Gt(bt),cn(function(){var nn=bt;yt||(nn=bt.replace(/。/g,".")),nn!==bt&&rn(nn)})},dn=function(){ti.current=!0},Mt=function(){ti.current=!1,Kt(gi.current.value)},mt=function(bt){Kt(bt.target.value)},hn=function(bt){var ht;if(!(bt&&di||!bt&&De)){yi.current=!1;var ke=at(vi.current?Rt(gt):gt);bt||(ke=ke.negate());var nn=(en||at(0)).add(ke.toString()),En=qt(nn,!1);Zn==null||Zn(Bt(vt,En),{offset:vi.current?Rt(gt):gt,type:bt?"up":"down"}),(ht=gi.current)===null||ht===void 0||ht.focus()}},Te=function(bt){var ht=at(pi(Ci)),ke;ht.isNaN()?ke=qt(en,bt):ke=qt(ht,bt),Dt!==void 0?st(en,!1):ke.isNaN()||st(ke,!1)},Ie=function(){yi.current=!0},ge=function(bt){var ht=bt.key,ke=bt.shiftKey;yi.current=!0,vi.current=ke,ht==="Enter"&&(ti.current||(yi.current=!1),Te(!1),xn==null||xn(bt)),ne!==!1&&!ti.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ht)&&(hn(ht==="Up"||ht==="ArrowUp"),bt.preventDefault())},St=function(){yi.current=!1,vi.current=!1};Ce.useEffect(function(){if(oe&&ri){var rn=function(ke){hn(ke.deltaY<0),ke.preventDefault()},bt=gi.current;if(bt)return bt.addEventListener("wheel",rn,{passive:!1}),function(){return bt.removeEventListener("wheel",rn)}}});var Bn=function(){Rn&&Te(!1),Si(!1),yi.current=!1};return(0,wt.o)(function(){en.isInvalidate()||st(en,!1)},[Oe,kt]),(0,wt.o)(function(){var rn=at(Dt);Ln(rn);var bt=at(pi(Ci));(!rn.equals(bt)||!yi.current||kt)&&st(rn,yi.current)},[Dt]),(0,wt.o)(function(){kt&&Ge()},[Ci]),Ce.createElement("div",{ref:Ei,className:ut()(Re,lt,(0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)({},"".concat(Re,"-focused"),ri),"".concat(Re,"-disabled"),Nt),"".concat(Re,"-readonly"),gn),"".concat(Re,"-not-a-number"),en.isNaN()),"".concat(Re,"-out-of-range"),!en.isInvalidate()&&!tn(en))),style:Le,onFocus:function(){Si(!0)},onBlur:Bn,onKeyDown:ge,onKeyUp:St,onCompositionStart:dn,onCompositionEnd:Mt,onBeforeInput:Ie},ie&&Ce.createElement(bn,{prefixCls:Re,upNode:Jt,downNode:le,upDisabled:di,downDisabled:De,onStep:hn}),Ce.createElement("div",{className:"".concat(ki,"-wrap")},Ce.createElement("input",(0,te.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ue,"aria-valuemax":Xe,"aria-valuenow":en.isInvalidate()?null:en.toString(),step:gt},si,{ref:(0,sn.sQ)(gi,be),className:ki,value:Ci,onChange:mt,disabled:Nt,readOnly:gn}))))}),ft=Ce.forwardRef(function(Me,be){var Re=Me.disabled,lt=Me.style,Le=Me.prefixCls,Ue=Le===void 0?"rc-input-number":Le,Xe=Me.value,et=Me.prefix,gt=Me.suffix,xt=Me.addonBefore,Dt=Me.addonAfter,Nt=Me.className,gn=Me.classNames,Jt=(0,pe.Z)(Me,on),le=Ce.useRef(null),ne=Ce.useRef(null),ee=Ce.useRef(null),oe=function(ie){ee.current&&(0,me.nH)(ee.current,ie)};return Ce.useImperativeHandle(be,function(){return pt(ee.current,{focus:oe,nativeElement:le.current.nativeElement||ne.current})}),Ce.createElement(ze.BaseInput,{className:Nt,triggerFocus:oe,prefixCls:Ue,value:Xe,disabled:Re,style:lt,prefix:et,suffix:gt,addonAfter:Dt,addonBefore:xt,classNames:gn,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:le},Ce.createElement(it,(0,te.Z)({prefixCls:Ue,disabled:Re,ref:ee,domRef:ne,className:gn==null?void 0:gn.input},Jt)))}),vn=ft,Pt=vn},23425:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return pt}});var te=fe(20068),tt=fe(54476),We=fe(76190),Je=fe(33885),pe=fe(42978),je=fe(92310),Fe=fe.n(je),Ye=fe(18929),Se=fe(10228),he=fe(26112),Ee=fe(48736),ve=fe(59301),rt=fe(17119),Ve=[10,20,50,100],Ae=function(Ce){var Ke=Ce.pageSizeOptions,ot=Ke===void 0?Ve:Ke,_e=Ce.locale,nt=Ce.changeSize,Ze=Ce.pageSize,dt=Ce.goButton,pn=Ce.quickGo,Ft=Ce.rootPrefixCls,bn=Ce.disabled,Rt=Ce.buildOptionText,me=Ce.showSizeChanger,de=Ce.sizeChangerRender,Ct=ve.useState(""),on=(0,pe.Z)(Ct,2),Bt=on[0],He=on[1],it=function(){return!Bt||Number.isNaN(Bt)?void 0:Number(Bt)},ft=typeof Rt=="function"?Rt:function(Xe){return"".concat(Xe," ").concat(_e.items_per_page)},vn=function(et){He(et.target.value)},Pt=function(et){dt||Bt===""||(He(""),!(et.relatedTarget&&(et.relatedTarget.className.indexOf("".concat(Ft,"-item-link"))>=0||et.relatedTarget.className.indexOf("".concat(Ft,"-item"))>=0))&&(pn==null||pn(it())))},Me=function(et){Bt!==""&&(et.keyCode===Se.Z.ENTER||et.type==="click")&&(He(""),pn==null||pn(it()))},be=function(){return ot.some(function(et){return et.toString()===Ze.toString()})?ot:ot.concat([Ze]).sort(function(et,gt){var xt=Number.isNaN(Number(et))?0:Number(et),Dt=Number.isNaN(Number(gt))?0:Number(gt);return xt-Dt})},Re="".concat(Ft,"-options");if(!me&&!pn)return null;var lt=null,Le=null,Ue=null;return me&&de&&(lt=de({disabled:bn,size:Ze,onSizeChange:function(et){nt==null||nt(Number(et))},"aria-label":_e.page_size,className:"".concat(Re,"-size-changer"),options:be().map(function(Xe){return{label:ft(Xe),value:Xe}})})),pn&&(dt&&(Ue=typeof dt=="boolean"?ve.createElement("button",{type:"button",onClick:Me,onKeyUp:Me,disabled:bn,className:"".concat(Re,"-quick-jumper-button")},_e.jump_to_confirm):ve.createElement("span",{onClick:Me,onKeyUp:Me},dt)),Le=ve.createElement("div",{className:"".concat(Re,"-quick-jumper")},_e.jump_to,ve.createElement("input",{disabled:bn,type:"text",value:Bt,onChange:vn,onKeyUp:Me,onBlur:Pt,"aria-label":_e.page}),_e.page,Ue)),ve.createElement("li",{className:Re},lt,Le)},Pe=Ae,we=function(Ce){var Ke=Ce.rootPrefixCls,ot=Ce.page,_e=Ce.active,nt=Ce.className,Ze=Ce.showTitle,dt=Ce.onClick,pn=Ce.onKeyPress,Ft=Ce.itemRender,bn="".concat(Ke,"-item"),Rt=Fe()(bn,"".concat(bn,"-").concat(ot),(0,te.Z)((0,te.Z)({},"".concat(bn,"-active"),_e),"".concat(bn,"-disabled"),!ot),nt),me=function(){dt(ot)},de=function(Bt){pn(Bt,dt,ot)},Ct=Ft(ot,"page",ve.createElement("a",{rel:"nofollow"},ot));return Ct?ve.createElement("li",{title:Ze?String(ot):null,className:Rt,onClick:me,onKeyDown:de,tabIndex:0},Ct):null},$e=we,at=function(Ce,Ke,ot){return ot};function ct(){}function ut(sn){var Ce=Number(sn);return typeof Ce=="number"&&!Number.isNaN(Ce)&&isFinite(Ce)&&Math.floor(Ce)===Ce}function ze(sn,Ce,Ke){var ot=typeof sn=="undefined"?Ce:sn;return Math.floor((Ke-1)/ot)+1}var wt=function(Ce){var Ke=Ce.prefixCls,ot=Ke===void 0?"rc-pagination":Ke,_e=Ce.selectPrefixCls,nt=_e===void 0?"rc-select":_e,Ze=Ce.className,dt=Ce.current,pn=Ce.defaultCurrent,Ft=pn===void 0?1:pn,bn=Ce.total,Rt=bn===void 0?0:bn,me=Ce.pageSize,de=Ce.defaultPageSize,Ct=de===void 0?10:de,on=Ce.onChange,Bt=on===void 0?ct:on,He=Ce.hideOnSinglePage,it=Ce.align,ft=Ce.showPrevNextJumpers,vn=ft===void 0?!0:ft,Pt=Ce.showQuickJumper,Me=Ce.showLessItems,be=Ce.showTitle,Re=be===void 0?!0:be,lt=Ce.onShowSizeChange,Le=lt===void 0?ct:lt,Ue=Ce.locale,Xe=Ue===void 0?rt.Z:Ue,et=Ce.style,gt=Ce.totalBoundaryShowSizeChanger,xt=gt===void 0?50:gt,Dt=Ce.disabled,Nt=Ce.simple,gn=Ce.showTotal,Jt=Ce.showSizeChanger,le=Jt===void 0?Rt>xt:Jt,ne=Ce.sizeChangerRender,ee=Ce.pageSizeOptions,oe=Ce.itemRender,ue=oe===void 0?at:oe,ie=Ce.jumpPrevIcon,ye=Ce.jumpNextIcon,vt=Ce.prevIcon,yt=Ce.nextIcon,kt=ve.useRef(null),Oe=(0,Ye.Z)(10,{value:me,defaultValue:Ct}),$t=(0,pe.Z)(Oe,2),_t=$t[0],Gt=$t[1],xn=(0,Ye.Z)(1,{value:dt,defaultValue:Ft,postState:function(wn){return Math.max(1,Math.min(wn,ze(void 0,_t,Rt)))}}),Zn=(0,pe.Z)(xn,2),jt=Zn[0],Rn=Zn[1],Ei=ve.useState(jt),si=(0,pe.Z)(Ei,2),ki=si[0],gi=si[1];(0,ve.useEffect)(function(){gi(jt)},[jt]);var Ai=Bt!==ct,Bi="current"in Ce,ri=Math.max(1,jt-(Me?3:5)),Si=Math.min(ze(void 0,_t,Rt),jt+(Me?3:5));function yi(Xt,wn){var Fn=Xt||ve.createElement("button",{type:"button","aria-label":wn,className:"".concat(ot,"-item-link")});return typeof Xt=="function"&&(Fn=ve.createElement(Xt,(0,Je.Z)({},Ce))),Fn}function ti(Xt){var wn=Xt.target.value,Fn=ze(void 0,_t,Rt),Wn;return wn===""?Wn=wn:Number.isNaN(Number(wn))?Wn=ki:wn>=Fn?Wn=Fn:Wn=Number(wn),Wn}function vi(Xt){return ut(Xt)&&Xt!==jt&&ut(Rt)&&Rt>0}var wi=Rt>_t?Pt:!1;function Ni(Xt){(Xt.keyCode===Se.Z.UP||Xt.keyCode===Se.Z.DOWN)&&Xt.preventDefault()}function en(Xt){var wn=ti(Xt);switch(wn!==ki&&gi(wn),Xt.keyCode){case Se.Z.ENTER:Dn(wn);break;case Se.Z.UP:Dn(wn-1);break;case Se.Z.DOWN:Dn(wn+1);break;default:break}}function Ln(Xt){Dn(ti(Xt))}function Yn(Xt){var wn=ze(Xt,_t,Rt),Fn=jt>wn&&wn!==0?wn:jt;Gt(Xt),gi(Fn),Le==null||Le(jt,Xt),Rn(Fn),Bt==null||Bt(Fn,Xt)}function Dn(Xt){if(vi(Xt)&&!Dt){var wn=ze(void 0,_t,Rt),Fn=Xt;return Xt>wn?Fn=wn:Xt<1&&(Fn=1),Fn!==ki&&gi(Fn),Rn(Fn),Bt==null||Bt(Fn,_t),Fn}return jt}var pi=jt>1,mi=jt<ze(void 0,_t,Rt);function Ti(){pi&&Dn(jt-1)}function ui(){mi&&Dn(jt+1)}function oi(){Dn(ri)}function Ci(){Dn(Si)}function Yt(Xt,wn){if(Xt.key==="Enter"||Xt.charCode===Se.Z.ENTER||Xt.keyCode===Se.Z.ENTER){for(var Fn=arguments.length,Wn=new Array(Fn>2?Fn-2:0),zn=2;zn<Fn;zn++)Wn[zn-2]=arguments[zn];wn.apply(void 0,Wn)}}function st(Xt){Yt(Xt,Ti)}function un(Xt){Yt(Xt,ui)}function Gn(Xt){Yt(Xt,oi)}function di(Xt){Yt(Xt,Ci)}function De(Xt){var wn=ue(Xt,"prev",yi(vt,"prev page"));return ve.isValidElement(wn)?ve.cloneElement(wn,{disabled:!pi}):wn}function Ne(Xt){var wn=ue(Xt,"next",yi(yt,"next page"));return ve.isValidElement(wn)?ve.cloneElement(wn,{disabled:!mi}):wn}function It(Xt){(Xt.type==="click"||Xt.keyCode===Se.Z.ENTER)&&Dn(ki)}var Et=null,Ge=(0,he.Z)(Ce,{aria:!0,data:!0}),At=gn&&ve.createElement("li",{className:"".concat(ot,"-total-text")},gn(Rt,[Rt===0?0:(jt-1)*_t+1,jt*_t>Rt?Rt:jt*_t])),tn=null,qt=ze(void 0,_t,Rt);if(He&&Rt<=_t)return null;var cn=[],Kt={rootPrefixCls:ot,onClick:Dn,onKeyPress:Yt,showTitle:Re,itemRender:ue,page:-1},dn=jt-1>0?jt-1:0,Mt=jt+1<qt?jt+1:qt,mt=Pt&&Pt.goButton,hn=(0,We.Z)(Nt)==="object"?Nt.readOnly:!Nt,Te=mt,Ie=null;Nt&&(mt&&(typeof mt=="boolean"?Te=ve.createElement("button",{type:"button",onClick:It,onKeyUp:It},Xe.jump_to_confirm):Te=ve.createElement("span",{onClick:It,onKeyUp:It},mt),Te=ve.createElement("li",{title:Re?"".concat(Xe.jump_to).concat(jt,"/").concat(qt):null,className:"".concat(ot,"-simple-pager")},Te)),Ie=ve.createElement("li",{title:Re?"".concat(jt,"/").concat(qt):null,className:"".concat(ot,"-simple-pager")},hn?ki:ve.createElement("input",{type:"text","aria-label":Xe.jump_to,value:ki,disabled:Dt,onKeyDown:Ni,onKeyUp:en,onChange:en,onBlur:Ln,size:3}),ve.createElement("span",{className:"".concat(ot,"-slash")},"/"),qt));var ge=Me?1:2;if(qt<=3+ge*2){qt||cn.push(ve.createElement($e,(0,tt.Z)({},Kt,{key:"noPager",page:1,className:"".concat(ot,"-item-disabled")})));for(var St=1;St<=qt;St+=1)cn.push(ve.createElement($e,(0,tt.Z)({},Kt,{key:St,page:St,active:jt===St})))}else{var Bn=Me?Xe.prev_3:Xe.prev_5,rn=Me?Xe.next_3:Xe.next_5,bt=ue(ri,"jump-prev",yi(ie,"prev page")),ht=ue(Si,"jump-next",yi(ye,"next page"));vn&&(Et=bt?ve.createElement("li",{title:Re?Bn:null,key:"prev",onClick:oi,tabIndex:0,onKeyDown:Gn,className:Fe()("".concat(ot,"-jump-prev"),(0,te.Z)({},"".concat(ot,"-jump-prev-custom-icon"),!!ie))},bt):null,tn=ht?ve.createElement("li",{title:Re?rn:null,key:"next",onClick:Ci,tabIndex:0,onKeyDown:di,className:Fe()("".concat(ot,"-jump-next"),(0,te.Z)({},"".concat(ot,"-jump-next-custom-icon"),!!ye))},ht):null);var ke=Math.max(1,jt-ge),nn=Math.min(jt+ge,qt);jt-1<=ge&&(nn=1+ge*2),qt-jt<=ge&&(ke=qt-ge*2);for(var En=ke;En<=nn;En+=1)cn.push(ve.createElement($e,(0,tt.Z)({},Kt,{key:En,page:En,active:jt===En})));if(jt-1>=ge*2&&jt!==3&&(cn[0]=ve.cloneElement(cn[0],{className:Fe()("".concat(ot,"-item-after-jump-prev"),cn[0].props.className)}),cn.unshift(Et)),qt-jt>=ge*2&&jt!==qt-2){var Pn=cn[cn.length-1];cn[cn.length-1]=ve.cloneElement(Pn,{className:Fe()("".concat(ot,"-item-before-jump-next"),Pn.props.className)}),cn.push(tn)}ke!==1&&cn.unshift(ve.createElement($e,(0,tt.Z)({},Kt,{key:1,page:1}))),nn!==qt&&cn.push(ve.createElement($e,(0,tt.Z)({},Kt,{key:qt,page:qt})))}var jn=De(dn);if(jn){var Qn=!pi||!qt;jn=ve.createElement("li",{title:Re?Xe.prev_page:null,onClick:Ti,tabIndex:Qn?null:0,onKeyDown:st,className:Fe()("".concat(ot,"-prev"),(0,te.Z)({},"".concat(ot,"-disabled"),Qn)),"aria-disabled":Qn},jn)}var an=Ne(Mt);if(an){var Nn,qn;Nt?(Nn=!mi,qn=pi?0:null):(Nn=!mi||!qt,qn=Nn?null:0),an=ve.createElement("li",{title:Re?Xe.next_page:null,onClick:ui,tabIndex:qn,onKeyDown:un,className:Fe()("".concat(ot,"-next"),(0,te.Z)({},"".concat(ot,"-disabled"),Nn)),"aria-disabled":Nn},an)}var Vn=Fe()(ot,Ze,(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},"".concat(ot,"-start"),it==="start"),"".concat(ot,"-center"),it==="center"),"".concat(ot,"-end"),it==="end"),"".concat(ot,"-simple"),Nt),"".concat(ot,"-disabled"),Dt));return ve.createElement("ul",(0,tt.Z)({className:Vn,style:et,ref:kt},Ge),At,jn,Nt?Ie:cn,an,ve.createElement(Pe,{locale:Xe,rootPrefixCls:ot,disabled:Dt,selectPrefixCls:nt,changeSize:Yn,pageSize:_t,pageSizeOptions:ee,quickGo:wi?Dn:null,goButton:Te,showSizeChanger:le,sizeChangerRender:ne}))},pt=wt},6551:function(Ut,Qt,fe){"use strict";fe.d(Qt,{ZP:function(){return Fe}});var te=fe(42978),tt=fe(59301),We=fe(47273),Je=0,pe=(0,We.Z)();function je(){var Ye;return pe?(Ye=Je,Je+=1):Ye="TEST_OR_SSR",Ye}function Fe(Ye){var Se=tt.useState(),he=(0,te.Z)(Se,2),Ee=he[0],ve=he[1];return tt.useEffect(function(){ve("rc_select_".concat(je()))},[]),Ye||Ee}},37463:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Ac:function(){return Oe},Xo:function(){return _t},Wx:function(){return xn},ZP:function(){return di},lk:function(){return ct}});var te=fe(54476),tt=fe(94480),We=fe(20068),Je=fe(33885),pe=fe(42978),je=fe(75931),Fe=fe(76190),Ye=fe(18929),Se=fe(48736),he=fe(59301),Ee=fe(92310),ve=fe.n(Ee),rt=fe(34280),Ve=fe(49658),Ae=fe(8654),Pe=function(Ne){var It=Ne.className,Et=Ne.customizeIcon,Ge=Ne.customizeIconProps,At=Ne.children,tn=Ne.onMouseDown,qt=Ne.onClick,cn=typeof Et=="function"?Et(Ge):Et;return he.createElement("span",{className:It,onMouseDown:function(dn){dn.preventDefault(),tn==null||tn(dn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:qt,"aria-hidden":!0},cn!==void 0?cn:he.createElement("span",{className:ve()(It.split(/\s+/).map(function(Kt){return"".concat(Kt,"-icon")}))},At))},we=Pe,$e=function(Ne,It,Et,Ge,At){var tn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,qt=arguments.length>6?arguments[6]:void 0,cn=arguments.length>7?arguments[7]:void 0,Kt=he.useMemo(function(){if((0,Fe.Z)(Ge)==="object")return Ge.clearIcon;if(At)return At},[Ge,At]),dn=he.useMemo(function(){return!!(!tn&&Ge&&(Et.length||qt)&&!(cn==="combobox"&&qt===""))},[Ge,tn,Et.length,qt,cn]);return{allowClear:dn,clearIcon:he.createElement(we,{className:"".concat(Ne,"-clear"),onMouseDown:It,customizeIcon:Kt},"\xD7")}},at=he.createContext(null);function ct(){return he.useContext(at)}function ut(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ne=he.useState(!1),It=(0,pe.Z)(Ne,2),Et=It[0],Ge=It[1],At=he.useRef(null),tn=function(){window.clearTimeout(At.current)};he.useEffect(function(){return tn},[]);var qt=function(Kt,dn){tn(),At.current=window.setTimeout(function(){Ge(Kt),dn&&dn()},De)};return[Et,qt,tn]}function ze(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ne=he.useRef(null),It=he.useRef(null);he.useEffect(function(){return function(){window.clearTimeout(It.current)}},[]);function Et(Ge){(Ge||Ne.current===null)&&(Ne.current=Ge),window.clearTimeout(It.current),It.current=window.setTimeout(function(){Ne.current=null},De)}return[function(){return Ne.current},Et]}function wt(De,Ne,It,Et){var Ge=he.useRef(null);Ge.current={open:Ne,triggerOpen:It,customizedTrigger:Et},he.useEffect(function(){function At(tn){var qt;if(!((qt=Ge.current)!==null&&qt!==void 0&&qt.customizedTrigger)){var cn=tn.target;cn.shadowRoot&&tn.composed&&(cn=tn.composedPath()[0]||cn),Ge.current.open&&De().filter(function(Kt){return Kt}).every(function(Kt){return!Kt.contains(cn)&&Kt!==cn})&&Ge.current.triggerOpen(!1)}}return window.addEventListener("mousedown",At),function(){return window.removeEventListener("mousedown",At)}},[])}var pt=fe(10228);function sn(De){return De&&![pt.Z.ESC,pt.Z.SHIFT,pt.Z.BACKSPACE,pt.Z.TAB,pt.Z.WIN_KEY,pt.Z.ALT,pt.Z.META,pt.Z.WIN_KEY_RIGHT,pt.Z.CTRL,pt.Z.SEMICOLON,pt.Z.EQUALS,pt.Z.CAPS_LOCK,pt.Z.CONTEXT_MENU,pt.Z.F1,pt.Z.F2,pt.Z.F3,pt.Z.F4,pt.Z.F5,pt.Z.F6,pt.Z.F7,pt.Z.F8,pt.Z.F9,pt.Z.F10,pt.Z.F11,pt.Z.F12].includes(De)}var Ce=fe(26112),Ke=fe(83836);function ot(De,Ne,It){var Et=(0,Je.Z)((0,Je.Z)({},De),It?Ne:{});return Object.keys(Ne).forEach(function(Ge){var At=Ne[Ge];typeof At=="function"&&(Et[Ge]=function(){for(var tn,qt=arguments.length,cn=new Array(qt),Kt=0;Kt<qt;Kt++)cn[Kt]=arguments[Kt];return At.apply(void 0,cn),(tn=De[Ge])===null||tn===void 0?void 0:tn.call.apply(tn,[De].concat(cn))})}),Et}var _e=ot,nt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ze=function(Ne,It){var Et=Ne.prefixCls,Ge=Ne.id,At=Ne.inputElement,tn=Ne.autoFocus,qt=Ne.autoComplete,cn=Ne.editable,Kt=Ne.activeDescendantId,dn=Ne.value,Mt=Ne.open,mt=Ne.attrs,hn=(0,je.Z)(Ne,nt),Te=At||he.createElement("input",null),Ie=Te,ge=Ie.ref,St=Ie.props;return(0,Se.Kp)(!("maxLength"in Te.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Te=he.cloneElement(Te,(0,Je.Z)((0,Je.Z)((0,Je.Z)({type:"search"},_e(hn,St,!0)),{},{id:Ge,ref:(0,Ae.sQ)(It,ge),autoComplete:qt||"off",autoFocus:tn,className:ve()("".concat(Et,"-selection-search-input"),St==null?void 0:St.className),role:"combobox","aria-expanded":Mt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ge,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ge,"_list"),"aria-activedescendant":Mt?Kt:void 0},mt),{},{value:cn?dn:"",readOnly:!cn,unselectable:cn?null:"on",style:(0,Je.Z)((0,Je.Z)({},St.style),{},{opacity:cn?null:0})})),Te},dt=he.forwardRef(Ze),pn=dt;function Ft(De){return Array.isArray(De)?De:De!==void 0?[De]:[]}var bn=typeof window!="undefined"&&window.document&&window.document.documentElement,Rt=bn;function me(De){return De!=null}function de(De){return!De&&De!==0}function Ct(De){return["string","number"].includes((0,Fe.Z)(De))}function on(De){var Ne=void 0;return De&&(Ct(De.title)?Ne=De.title.toString():Ct(De.label)&&(Ne=De.label.toString())),Ne}function Bt(De,Ne){Rt?he.useLayoutEffect(De,Ne):he.useEffect(De,Ne)}function He(De){var Ne;return(Ne=De.key)!==null&&Ne!==void 0?Ne:De.value}var it=function(Ne){Ne.preventDefault(),Ne.stopPropagation()},ft=function(Ne){var It=Ne.id,Et=Ne.prefixCls,Ge=Ne.values,At=Ne.open,tn=Ne.searchValue,qt=Ne.autoClearSearchValue,cn=Ne.inputRef,Kt=Ne.placeholder,dn=Ne.disabled,Mt=Ne.mode,mt=Ne.showSearch,hn=Ne.autoFocus,Te=Ne.autoComplete,Ie=Ne.activeDescendantId,ge=Ne.tabIndex,St=Ne.removeIcon,Bn=Ne.maxTagCount,rn=Ne.maxTagTextLength,bt=Ne.maxTagPlaceholder,ht=bt===void 0?function(Vt){return"+ ".concat(Vt.length," ...")}:bt,ke=Ne.tagRender,nn=Ne.onToggleOpen,En=Ne.onRemove,Pn=Ne.onInputChange,jn=Ne.onInputPaste,Qn=Ne.onInputKeyDown,an=Ne.onInputMouseDown,Nn=Ne.onInputCompositionStart,qn=Ne.onInputCompositionEnd,Vn=Ne.onInputBlur,Xt=he.useRef(null),wn=(0,he.useState)(0),Fn=(0,pe.Z)(wn,2),Wn=Fn[0],zn=Fn[1],Hn=(0,he.useState)(!1),Un=(0,pe.Z)(Hn,2),ni=Un[0],Tn=Un[1],fi="".concat(Et,"-selection"),_n=At||Mt==="multiple"&&qt===!1||Mt==="tags"?tn:"",ln=Mt==="tags"||Mt==="multiple"&&qt===!1||mt&&(At||ni);Bt(function(){zn(Xt.current.scrollWidth)},[_n]);var Kn=function(Ot,kn,li,Wt,Ht){return he.createElement("span",{title:on(Ot),className:ve()("".concat(fi,"-item"),(0,We.Z)({},"".concat(fi,"-item-disabled"),li))},he.createElement("span",{className:"".concat(fi,"-item-content")},kn),Wt&&he.createElement(we,{className:"".concat(fi,"-item-remove"),onMouseDown:it,onClick:Ht,customizeIcon:St},"\xD7"))},Xn=function(Ot,kn,li,Wt,Ht,mn){var yn=function(Pi){it(Pi),nn(!At)};return he.createElement("span",{onMouseDown:yn},ke({label:kn,value:Ot,disabled:li,closable:Wt,onClose:Ht,isMaxTag:!!mn}))},Li=function(Ot){var kn=Ot.disabled,li=Ot.label,Wt=Ot.value,Ht=!dn&&!kn,mn=li;if(typeof rn=="number"&&(typeof li=="string"||typeof li=="number")){var yn=String(mn);yn.length>rn&&(mn="".concat(yn.slice(0,rn),"..."))}var $n=function(bi){bi&&bi.stopPropagation(),En(Ot)};return typeof ke=="function"?Xn(Wt,mn,kn,Ht,$n):Kn(Ot,mn,kn,Ht,$n)},On=function(Ot){if(!Ge.length)return null;var kn=typeof ht=="function"?ht(Ot):ht;return typeof ke=="function"?Xn(void 0,kn,!1,!1,void 0,!0):Kn({title:kn},kn,!1)},Lt=he.createElement("div",{className:"".concat(fi,"-search"),style:{width:Wn},onFocus:function(){Tn(!0)},onBlur:function(){Tn(!1)}},he.createElement(pn,{ref:cn,open:At,prefixCls:Et,id:It,inputElement:null,disabled:dn,autoFocus:hn,autoComplete:Te,editable:ln,activeDescendantId:Ie,value:_n,onKeyDown:Qn,onMouseDown:an,onChange:Pn,onPaste:jn,onCompositionStart:Nn,onCompositionEnd:qn,onBlur:Vn,tabIndex:ge,attrs:(0,Ce.Z)(Ne,!0)}),he.createElement("span",{ref:Xt,className:"".concat(fi,"-search-mirror"),"aria-hidden":!0},_n,"\xA0")),zt=he.createElement(Ke.Z,{prefixCls:"".concat(fi,"-overflow"),data:Ge,renderItem:Li,renderRest:On,suffix:Lt,itemKey:He,maxCount:Bn});return he.createElement("span",{className:"".concat(fi,"-wrap")},zt,!Ge.length&&!_n&&he.createElement("span",{className:"".concat(fi,"-placeholder")},Kt))},vn=ft,Pt=function(Ne){var It=Ne.inputElement,Et=Ne.prefixCls,Ge=Ne.id,At=Ne.inputRef,tn=Ne.disabled,qt=Ne.autoFocus,cn=Ne.autoComplete,Kt=Ne.activeDescendantId,dn=Ne.mode,Mt=Ne.open,mt=Ne.values,hn=Ne.placeholder,Te=Ne.tabIndex,Ie=Ne.showSearch,ge=Ne.searchValue,St=Ne.activeValue,Bn=Ne.maxLength,rn=Ne.onInputKeyDown,bt=Ne.onInputMouseDown,ht=Ne.onInputChange,ke=Ne.onInputPaste,nn=Ne.onInputCompositionStart,En=Ne.onInputCompositionEnd,Pn=Ne.onInputBlur,jn=Ne.title,Qn=he.useState(!1),an=(0,pe.Z)(Qn,2),Nn=an[0],qn=an[1],Vn=dn==="combobox",Xt=Vn||Ie,wn=mt[0],Fn=ge||"";Vn&&St&&!Nn&&(Fn=St),he.useEffect(function(){Vn&&qn(!1)},[Vn,St]);var Wn=dn!=="combobox"&&!Mt&&!Ie?!1:!!Fn,zn=jn===void 0?on(wn):jn,Hn=he.useMemo(function(){return wn?null:he.createElement("span",{className:"".concat(Et,"-selection-placeholder"),style:Wn?{visibility:"hidden"}:void 0},hn)},[wn,Wn,hn,Et]);return he.createElement("span",{className:"".concat(Et,"-selection-wrap")},he.createElement("span",{className:"".concat(Et,"-selection-search")},he.createElement(pn,{ref:At,prefixCls:Et,id:Ge,open:Mt,inputElement:It,disabled:tn,autoFocus:qt,autoComplete:cn,editable:Xt,activeDescendantId:Kt,value:Fn,onKeyDown:rn,onMouseDown:bt,onChange:function(ni){qn(!0),ht(ni)},onPaste:ke,onCompositionStart:nn,onCompositionEnd:En,onBlur:Pn,tabIndex:Te,attrs:(0,Ce.Z)(Ne,!0),maxLength:Vn?Bn:void 0})),!Vn&&wn?he.createElement("span",{className:"".concat(Et,"-selection-item"),title:zn,style:Wn?{visibility:"hidden"}:void 0},wn.label):null,Hn)},Me=Pt,be=function(Ne,It){var Et=(0,he.useRef)(null),Ge=(0,he.useRef)(!1),At=Ne.prefixCls,tn=Ne.open,qt=Ne.mode,cn=Ne.showSearch,Kt=Ne.tokenWithEnter,dn=Ne.disabled,Mt=Ne.prefix,mt=Ne.autoClearSearchValue,hn=Ne.onSearch,Te=Ne.onSearchSubmit,Ie=Ne.onToggleOpen,ge=Ne.onInputKeyDown,St=Ne.onInputBlur,Bn=Ne.domRef;he.useImperativeHandle(It,function(){return{focus:function(zn){Et.current.focus(zn)},blur:function(){Et.current.blur()}}});var rn=ze(0),bt=(0,pe.Z)(rn,2),ht=bt[0],ke=bt[1],nn=function(zn){var Hn=zn.which,Un=Et.current instanceof HTMLTextAreaElement;!Un&&tn&&(Hn===pt.Z.UP||Hn===pt.Z.DOWN)&&zn.preventDefault(),ge&&ge(zn),Hn===pt.Z.ENTER&&qt==="tags"&&!Ge.current&&!tn&&(Te==null||Te(zn.target.value)),!(Un&&!tn&&~[pt.Z.UP,pt.Z.DOWN,pt.Z.LEFT,pt.Z.RIGHT].indexOf(Hn))&&sn(Hn)&&Ie(!0)},En=function(){ke(!0)},Pn=(0,he.useRef)(null),jn=function(zn){hn(zn,!0,Ge.current)!==!1&&Ie(!0)},Qn=function(){Ge.current=!0},an=function(zn){Ge.current=!1,qt!=="combobox"&&jn(zn.target.value)},Nn=function(zn){var Hn=zn.target.value;if(Kt&&Pn.current&&/[\r\n]/.test(Pn.current)){var Un=Pn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Hn=Hn.replace(Un,Pn.current)}Pn.current=null,jn(Hn)},qn=function(zn){var Hn=zn.clipboardData,Un=Hn==null?void 0:Hn.getData("text");Pn.current=Un||""},Vn=function(zn){var Hn=zn.target;if(Hn!==Et.current){var Un=document.body.style.msTouchAction!==void 0;Un?setTimeout(function(){Et.current.focus()}):Et.current.focus()}},Xt=function(zn){var Hn=ht();zn.target!==Et.current&&!Hn&&!(qt==="combobox"&&dn)&&zn.preventDefault(),(qt!=="combobox"&&(!cn||!Hn)||!tn)&&(tn&&mt!==!1&&hn("",!0,!1),Ie())},wn={inputRef:Et,onInputKeyDown:nn,onInputMouseDown:En,onInputChange:Nn,onInputPaste:qn,onInputCompositionStart:Qn,onInputCompositionEnd:an,onInputBlur:St},Fn=qt==="multiple"||qt==="tags"?he.createElement(vn,(0,te.Z)({},Ne,wn)):he.createElement(Me,(0,te.Z)({},Ne,wn));return he.createElement("div",{ref:Bn,className:"".concat(At,"-selector"),onClick:Vn,onMouseDown:Xt},Mt&&he.createElement("div",{className:"".concat(At,"-prefix")},Mt),Fn)},Re=he.forwardRef(be),lt=Re,Le=fe(65030),Ue=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Xe=function(Ne){var It=Ne===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:It,adjustY:1},htmlRegion:"scroll"}}},et=function(Ne,It){var Et=Ne.prefixCls,Ge=Ne.disabled,At=Ne.visible,tn=Ne.children,qt=Ne.popupElement,cn=Ne.animation,Kt=Ne.transitionName,dn=Ne.dropdownStyle,Mt=Ne.dropdownClassName,mt=Ne.direction,hn=mt===void 0?"ltr":mt,Te=Ne.placement,Ie=Ne.builtinPlacements,ge=Ne.dropdownMatchSelectWidth,St=Ne.dropdownRender,Bn=Ne.dropdownAlign,rn=Ne.getPopupContainer,bt=Ne.empty,ht=Ne.getTriggerDOMNode,ke=Ne.onPopupVisibleChange,nn=Ne.onPopupMouseEnter,En=(0,je.Z)(Ne,Ue),Pn="".concat(Et,"-dropdown"),jn=qt;St&&(jn=St(qt));var Qn=he.useMemo(function(){return Ie||Xe(ge)},[Ie,ge]),an=cn?"".concat(Pn,"-").concat(cn):Kt,Nn=typeof ge=="number",qn=he.useMemo(function(){return Nn?null:ge===!1?"minWidth":"width"},[ge,Nn]),Vn=dn;Nn&&(Vn=(0,Je.Z)((0,Je.Z)({},Vn),{},{width:ge}));var Xt=he.useRef(null);return he.useImperativeHandle(It,function(){return{getPopupElement:function(){var Fn;return(Fn=Xt.current)===null||Fn===void 0?void 0:Fn.popupElement}}}),he.createElement(Le.Z,(0,te.Z)({},En,{showAction:ke?["click"]:[],hideAction:ke?["click"]:[],popupPlacement:Te||(hn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Qn,prefixCls:Pn,popupTransitionName:an,popup:he.createElement("div",{onMouseEnter:nn},jn),ref:Xt,stretch:qn,popupAlign:Bn,popupVisible:At,getPopupContainer:rn,popupClassName:ve()(Mt,(0,We.Z)({},"".concat(Pn,"-empty"),bt)),popupStyle:Vn,getTriggerDOMNode:ht,onPopupVisibleChange:ke}),tn)},gt=he.forwardRef(et),xt=gt,Dt=fe(66712);function Nt(De,Ne){var It=De.key,Et;return"value"in De&&(Et=De.value),It!=null?It:Et!==void 0?Et:"rc-index-key-".concat(Ne)}function gn(De){return typeof De!="undefined"&&!Number.isNaN(De)}function Jt(De,Ne){var It=De||{},Et=It.label,Ge=It.value,At=It.options,tn=It.groupLabel,qt=Et||(Ne?"children":"label");return{label:qt,value:Ge||"value",options:At||"options",groupLabel:tn||qt}}function le(De){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},It=Ne.fieldNames,Et=Ne.childrenAsData,Ge=[],At=Jt(It,!1),tn=At.label,qt=At.value,cn=At.options,Kt=At.groupLabel;function dn(Mt,mt){Array.isArray(Mt)&&Mt.forEach(function(hn){if(mt||!(cn in hn)){var Te=hn[qt];Ge.push({key:Nt(hn,Ge.length),groupOption:mt,data:hn,label:hn[tn],value:Te})}else{var Ie=hn[Kt];Ie===void 0&&Et&&(Ie=hn.label),Ge.push({key:Nt(hn,Ge.length),group:!0,data:hn,label:Ie}),dn(hn[cn],!0)}})}return dn(De,!1),Ge}function ne(De){var Ne=(0,Je.Z)({},De);return"props"in Ne||Object.defineProperty(Ne,"props",{get:function(){return(0,Se.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ne}}),Ne}var ee=function(Ne,It,Et){if(!It||!It.length)return null;var Ge=!1,At=function qt(cn,Kt){var dn=(0,Dt.Z)(Kt),Mt=dn[0],mt=dn.slice(1);if(!Mt)return[cn];var hn=cn.split(Mt);return Ge=Ge||hn.length>1,hn.reduce(function(Te,Ie){return[].concat((0,tt.Z)(Te),(0,tt.Z)(qt(Ie,mt)))},[]).filter(Boolean)},tn=At(Ne,It);return Ge?typeof Et!="undefined"?tn.slice(0,Et):tn:null},oe=he.createContext(null),ue=oe;function ie(De){var Ne=De.visible,It=De.values;if(!Ne)return null;var Et=50;return he.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(It.slice(0,Et).map(function(Ge){var At=Ge.label,tn=Ge.value;return["number","string"].includes((0,Fe.Z)(At))?At:tn}).join(", ")),It.length>Et?", ...":null)}var ye=["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"],vt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],yt=function(Ne){return Ne==="tags"||Ne==="multiple"},kt=he.forwardRef(function(De,Ne){var It,Et=De.id,Ge=De.prefixCls,At=De.className,tn=De.showSearch,qt=De.tagRender,cn=De.direction,Kt=De.omitDomProps,dn=De.displayValues,Mt=De.onDisplayValuesChange,mt=De.emptyOptions,hn=De.notFoundContent,Te=hn===void 0?"Not Found":hn,Ie=De.onClear,ge=De.mode,St=De.disabled,Bn=De.loading,rn=De.getInputElement,bt=De.getRawInputElement,ht=De.open,ke=De.defaultOpen,nn=De.onDropdownVisibleChange,En=De.activeValue,Pn=De.onActiveValueChange,jn=De.activeDescendantId,Qn=De.searchValue,an=De.autoClearSearchValue,Nn=De.onSearch,qn=De.onSearchSplit,Vn=De.tokenSeparators,Xt=De.allowClear,wn=De.prefix,Fn=De.suffixIcon,Wn=De.clearIcon,zn=De.OptionList,Hn=De.animation,Un=De.transitionName,ni=De.dropdownStyle,Tn=De.dropdownClassName,fi=De.dropdownMatchSelectWidth,_n=De.dropdownRender,ln=De.dropdownAlign,Kn=De.placement,Xn=De.builtinPlacements,Li=De.getPopupContainer,On=De.showAction,Lt=On===void 0?[]:On,zt=De.onFocus,Vt=De.onBlur,Ot=De.onKeyUp,kn=De.onKeyDown,li=De.onMouseDown,Wt=(0,je.Z)(De,ye),Ht=yt(ge),mn=(tn!==void 0?tn:Ht)||ge==="combobox",yn=(0,Je.Z)({},Wt);vt.forEach(function(Fi){delete yn[Fi]}),Kt==null||Kt.forEach(function(Fi){delete yn[Fi]});var $n=he.useState(!1),Pi=(0,pe.Z)($n,2),bi=Pi[0],_i=Pi[1];he.useEffect(function(){_i((0,Ve.Z)())},[]);var Ii=he.useRef(null),Ri=he.useRef(null),ji=he.useRef(null),zi=he.useRef(null),Zi=he.useRef(null),qi=he.useRef(!1),gr=ut(),Ar=(0,pe.Z)(gr,3),pr=Ar[0],lr=Ar[1],Wr=Ar[2];he.useImperativeHandle(Ne,function(){var Fi,xi;return{focus:(Fi=zi.current)===null||Fi===void 0?void 0:Fi.focus,blur:(xi=zi.current)===null||xi===void 0?void 0:xi.blur,scrollTo:function(br){var $i;return($i=Zi.current)===null||$i===void 0?void 0:$i.scrollTo(br)},nativeElement:Ii.current||Ri.current}});var Mi=he.useMemo(function(){var Fi;if(ge!=="combobox")return Qn;var xi=(Fi=dn[0])===null||Fi===void 0?void 0:Fi.value;return typeof xi=="string"||typeof xi=="number"?String(xi):""},[Qn,ge,dn]),jr=ge==="combobox"&&typeof rn=="function"&&rn()||null,Xi=typeof bt=="function"&&bt(),Cr=(0,Ae.x1)(Ri,Xi==null||(It=Xi.props)===null||It===void 0?void 0:It.ref),qr=he.useState(!1),Sr=(0,pe.Z)(qr,2),yr=Sr[0],sr=Sr[1];(0,rt.Z)(function(){sr(!0)},[]);var Wi=(0,Ye.Z)(!1,{defaultValue:ke,value:ht}),rr=(0,pe.Z)(Wi,2),Vr=rr[0],Fr=rr[1],Ki=yr?Vr:!1,oo=!Te&&mt;(St||oo&&Ki&&ge==="combobox")&&(Ki=!1);var Nr=oo?!1:Ki,ei=he.useCallback(function(Fi){var xi=Fi!==void 0?Fi:!Ki;St||(Fr(xi),Ki!==xi&&(nn==null||nn(xi)))},[St,Ki,Fr,nn]),ci=he.useMemo(function(){return(Vn||[]).some(function(Fi){return[`
`,`\r
`].includes(Fi)})},[Vn]),ai=he.useContext(ue)||{},An=ai.maxCount,hi=ai.rawValues,Oi=function(xi,vr,br){if(!(Ht&&gn(An)&&(hi==null?void 0:hi.size)>=An)){var $i=!0,or=xi;Pn==null||Pn(null);var Jr=ee(xi,Vn,gn(An)?An-hi.size:void 0),Yr=br?null:Jr;return ge!=="combobox"&&Yr&&(or="",qn==null||qn(Yr),ei(!1),$i=!1),Nn&&Mi!==or&&Nn(or,{source:vr?"typing":"effect"}),$i}},_r=function(xi){!xi||!xi.trim()||Nn(xi,{source:"submit"})};he.useEffect(function(){!Ki&&!Ht&&ge!=="combobox"&&Oi("",!1,!1)},[Ki]),he.useEffect(function(){Vr&&St&&Fr(!1),St&&!qi.current&&lr(!1)},[St]);var ur=ze(),tr=(0,pe.Z)(ur,2),Qi=tr[0],Ur=tr[1],to=he.useRef(!1),Ir=function(xi){var vr=Qi(),br=xi.key,$i=br==="Enter";if($i&&(ge!=="combobox"&&xi.preventDefault(),Ki||ei(!0)),Ur(!!Mi),br==="Backspace"&&!vr&&Ht&&!Mi&&dn.length){for(var or=(0,tt.Z)(dn),Jr=null,Yr=or.length-1;Yr>=0;Yr-=1){var lo=or[Yr];if(!lo.disabled){or.splice(Yr,1),Jr=lo;break}}Jr&&Mt(or,{type:"remove",values:[Jr]})}for(var Rr=arguments.length,Or=new Array(Rr>1?Rr-1:0),Qr=1;Qr<Rr;Qr++)Or[Qr-1]=arguments[Qr];if(Ki&&(!$i||!to.current)){var fo;$i&&(to.current=!0),(fo=Zi.current)===null||fo===void 0||fo.onKeyDown.apply(fo,[xi].concat(Or))}kn==null||kn.apply(void 0,[xi].concat(Or))},no=function(xi){for(var vr=arguments.length,br=new Array(vr>1?vr-1:0),$i=1;$i<vr;$i++)br[$i-1]=arguments[$i];if(Ki){var or;(or=Zi.current)===null||or===void 0||or.onKeyUp.apply(or,[xi].concat(br))}xi.key==="Enter"&&(to.current=!1),Ot==null||Ot.apply(void 0,[xi].concat(br))},ao=function(xi){var vr=dn.filter(function(br){return br!==xi});Mt(vr,{type:"remove",values:[xi]})},Xr=function(){to.current=!1},Po=he.useRef(!1),ja=function(){lr(!0),St||(zt&&!Po.current&&zt.apply(void 0,arguments),Lt.includes("focus")&&ei(!0)),Po.current=!0},ya=function(){qi.current=!0,lr(!1,function(){Po.current=!1,qi.current=!1,ei(!1)}),!St&&(Mi&&(ge==="tags"?Nn(Mi,{source:"submit"}):ge==="multiple"&&Nn("",{source:"blur"})),Vt&&Vt.apply(void 0,arguments))},io=[];he.useEffect(function(){return function(){io.forEach(function(Fi){return clearTimeout(Fi)}),io.splice(0,io.length)}},[]);var co=function(xi){var vr,br=xi.target,$i=(vr=ji.current)===null||vr===void 0?void 0:vr.getPopupElement();if($i&&$i.contains(br)){var or=setTimeout(function(){var Rr=io.indexOf(or);if(Rr!==-1&&io.splice(Rr,1),Wr(),!bi&&!$i.contains(document.activeElement)){var Or;(Or=zi.current)===null||Or===void 0||Or.focus()}});io.push(or)}for(var Jr=arguments.length,Yr=new Array(Jr>1?Jr-1:0),lo=1;lo<Jr;lo++)Yr[lo-1]=arguments[lo];li==null||li.apply(void 0,[xi].concat(Yr))},Kr=he.useState({}),ba=(0,pe.Z)(Kr,2),xa=ba[1];function Va(){xa({})}var wa;Xi&&(wa=function(xi){ei(xi)}),wt(function(){var Fi;return[Ii.current,(Fi=ji.current)===null||Fi===void 0?void 0:Fi.getPopupElement()]},Nr,ei,!!Xi);var Ua=he.useMemo(function(){return(0,Je.Z)((0,Je.Z)({},De),{},{notFoundContent:Te,open:Ki,triggerOpen:Nr,id:Et,showSearch:mn,multiple:Ht,toggleOpen:ei})},[De,Te,Nr,Ki,Et,mn,Ht,ei]),Ko=!!Fn||Bn,Yo;Ko&&(Yo=he.createElement(we,{className:ve()("".concat(Ge,"-arrow"),(0,We.Z)({},"".concat(Ge,"-arrow-loading"),Bn)),customizeIcon:Fn,customizeIconProps:{loading:Bn,searchValue:Mi,open:Ki,focused:pr,showSearch:mn}}));var wo=function(){var xi;Ie==null||Ie(),(xi=zi.current)===null||xi===void 0||xi.focus(),Mt([],{type:"clear",values:dn}),Oi("",!1,!1)},qo=$e(Ge,wo,dn,Xt,Wn,St,Mi,ge),Ca=qo.allowClear,Xo=qo.clearIcon,To=he.createElement(zn,{ref:Zi}),Sa=ve()(Ge,At,(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Ge,"-focused"),pr),"".concat(Ge,"-multiple"),Ht),"".concat(Ge,"-single"),!Ht),"".concat(Ge,"-allow-clear"),Xt),"".concat(Ge,"-show-arrow"),Ko),"".concat(Ge,"-disabled"),St),"".concat(Ge,"-loading"),Bn),"".concat(Ge,"-open"),Ki),"".concat(Ge,"-customize-input"),jr),"".concat(Ge,"-show-search"),mn)),Mo=he.createElement(xt,{ref:ji,disabled:St,prefixCls:Ge,visible:Nr,popupElement:To,animation:Hn,transitionName:Un,dropdownStyle:ni,dropdownClassName:Tn,direction:cn,dropdownMatchSelectWidth:fi,dropdownRender:_n,dropdownAlign:ln,placement:Kn,builtinPlacements:Xn,getPopupContainer:Li,empty:mt,getTriggerDOMNode:function(xi){return Ri.current||xi},onPopupVisibleChange:wa,onPopupMouseEnter:Va},Xi?he.cloneElement(Xi,{ref:Cr}):he.createElement(lt,(0,te.Z)({},De,{domRef:Ri,prefixCls:Ge,inputElement:jr,ref:zi,id:Et,prefix:wn,showSearch:mn,autoClearSearchValue:an,mode:ge,activeDescendantId:jn,tagRender:qt,values:dn,open:Ki,onToggleOpen:ei,activeValue:En,searchValue:Mi,onSearch:Oi,onSearchSubmit:_r,onRemove:ao,tokenWithEnter:ci,onInputBlur:Xr}))),Dr;return Xi?Dr=Mo:Dr=he.createElement("div",(0,te.Z)({className:Sa},yn,{ref:Ii,onMouseDown:co,onKeyDown:Ir,onKeyUp:no,onFocus:ja,onBlur:ya}),he.createElement(ie,{visible:pr&&!Ki,values:dn}),Mo,Yo,Ca&&Xo),he.createElement(at.Provider,{value:Ua},Dr)}),Oe=kt,$t=function(){return null};$t.isSelectOptGroup=!0;var _t=$t,Gt=function(){return null};Gt.isSelectOption=!0;var xn=Gt,Zn=fe(80547),jt=fe(2738),Rn=fe(48911);function Ei(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var si=["disabled","title","children","style","className"];function ki(De){return typeof De=="string"||typeof De=="number"}var gi=function(Ne,It){var Et=ct(),Ge=Et.prefixCls,At=Et.id,tn=Et.open,qt=Et.multiple,cn=Et.mode,Kt=Et.searchValue,dn=Et.toggleOpen,Mt=Et.notFoundContent,mt=Et.onPopupScroll,hn=he.useContext(ue),Te=hn.maxCount,Ie=hn.flattenOptions,ge=hn.onActiveValue,St=hn.defaultActiveFirstOption,Bn=hn.onSelect,rn=hn.menuItemSelectedIcon,bt=hn.rawValues,ht=hn.fieldNames,ke=hn.virtual,nn=hn.direction,En=hn.listHeight,Pn=hn.listItemHeight,jn=hn.optionRender,Qn="".concat(Ge,"-item"),an=(0,Zn.Z)(function(){return Ie},[tn,Ie],function(On,Lt){return Lt[0]&&On[1]!==Lt[1]}),Nn=he.useRef(null),qn=he.useMemo(function(){return qt&&gn(Te)&&(bt==null?void 0:bt.size)>=Te},[qt,Te,bt==null?void 0:bt.size]),Vn=function(Lt){Lt.preventDefault()},Xt=function(Lt){var zt;(zt=Nn.current)===null||zt===void 0||zt.scrollTo(typeof Lt=="number"?{index:Lt}:Lt)},wn=he.useCallback(function(On){return cn==="combobox"?!1:bt.has(On)},[cn,(0,tt.Z)(bt).toString(),bt.size]),Fn=function(Lt){for(var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Vt=an.length,Ot=0;Ot<Vt;Ot+=1){var kn=(Lt+Ot*zt+Vt)%Vt,li=an[kn]||{},Wt=li.group,Ht=li.data;if(!Wt&&!(Ht!=null&&Ht.disabled)&&(wn(Ht.value)||!qn))return kn}return-1},Wn=he.useState(function(){return Fn(0)}),zn=(0,pe.Z)(Wn,2),Hn=zn[0],Un=zn[1],ni=function(Lt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Un(Lt);var Vt={source:zt?"keyboard":"mouse"},Ot=an[Lt];if(!Ot){ge(null,-1,Vt);return}ge(Ot.value,Lt,Vt)};(0,he.useEffect)(function(){ni(St!==!1?Fn(0):-1)},[an.length,Kt]);var Tn=he.useCallback(function(On){return cn==="combobox"?String(On).toLowerCase()===Kt.toLowerCase():bt.has(On)},[cn,Kt,(0,tt.Z)(bt).toString(),bt.size]);(0,he.useEffect)(function(){var On=setTimeout(function(){if(!qt&&tn&&bt.size===1){var zt=Array.from(bt)[0],Vt=an.findIndex(function(Ot){var kn=Ot.data;return Kt?String(kn.value).startsWith(Kt):kn.value===zt});Vt!==-1&&(ni(Vt),Xt(Vt))}});if(tn){var Lt;(Lt=Nn.current)===null||Lt===void 0||Lt.scrollTo(void 0)}return function(){return clearTimeout(On)}},[tn,Kt]);var fi=function(Lt){Lt!==void 0&&Bn(Lt,{selected:!bt.has(Lt)}),qt||dn(!1)};if(he.useImperativeHandle(It,function(){return{onKeyDown:function(Lt){var zt=Lt.which,Vt=Lt.ctrlKey;switch(zt){case pt.Z.N:case pt.Z.P:case pt.Z.UP:case pt.Z.DOWN:{var Ot=0;if(zt===pt.Z.UP?Ot=-1:zt===pt.Z.DOWN?Ot=1:Ei()&&Vt&&(zt===pt.Z.N?Ot=1:zt===pt.Z.P&&(Ot=-1)),Ot!==0){var kn=Fn(Hn+Ot,Ot);Xt(kn),ni(kn,!0)}break}case pt.Z.TAB:case pt.Z.ENTER:{var li,Wt=an[Hn];Wt&&!(Wt!=null&&(li=Wt.data)!==null&&li!==void 0&&li.disabled)&&!qn?fi(Wt.value):fi(void 0),tn&&Lt.preventDefault();break}case pt.Z.ESC:dn(!1),tn&&Lt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Lt){Xt(Lt)}}}),an.length===0)return he.createElement("div",{role:"listbox",id:"".concat(At,"_list"),className:"".concat(Qn,"-empty"),onMouseDown:Vn},Mt);var _n=Object.keys(ht).map(function(On){return ht[On]}),ln=function(Lt){return Lt.label};function Kn(On,Lt){var zt=On.group;return{role:zt?"presentation":"option",id:"".concat(At,"_list_").concat(Lt)}}var Xn=function(Lt){var zt=an[Lt];if(!zt)return null;var Vt=zt.data||{},Ot=Vt.value,kn=zt.group,li=(0,Ce.Z)(Vt,!0),Wt=ln(zt);return zt?he.createElement("div",(0,te.Z)({"aria-label":typeof Wt=="string"&&!kn?Wt:null},li,{key:Lt},Kn(zt,Lt),{"aria-selected":Tn(Ot)}),Ot):null},Li={role:"listbox",id:"".concat(At,"_list")};return he.createElement(he.Fragment,null,ke&&he.createElement("div",(0,te.Z)({},Li,{style:{height:0,width:0,overflow:"hidden"}}),Xn(Hn-1),Xn(Hn),Xn(Hn+1)),he.createElement(Rn.Z,{itemKey:"key",ref:Nn,data:an,height:En,itemHeight:Pn,fullHeight:!1,onMouseDown:Vn,onScroll:mt,virtual:ke,direction:nn,innerProps:ke?null:Li},function(On,Lt){var zt=On.group,Vt=On.groupOption,Ot=On.data,kn=On.label,li=On.value,Wt=Ot.key;if(zt){var Ht,mn=(Ht=Ot.title)!==null&&Ht!==void 0?Ht:ki(kn)?kn.toString():void 0;return he.createElement("div",{className:ve()(Qn,"".concat(Qn,"-group"),Ot.className),title:mn},kn!==void 0?kn:Wt)}var yn=Ot.disabled,$n=Ot.title,Pi=Ot.children,bi=Ot.style,_i=Ot.className,Ii=(0,je.Z)(Ot,si),Ri=(0,jt.Z)(Ii,_n),ji=wn(li),zi=yn||!ji&&qn,Zi="".concat(Qn,"-option"),qi=ve()(Qn,Zi,_i,(0,We.Z)((0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Zi,"-grouped"),Vt),"".concat(Zi,"-active"),Hn===Lt&&!zi),"".concat(Zi,"-disabled"),zi),"".concat(Zi,"-selected"),ji)),gr=ln(On),Ar=!rn||typeof rn=="function"||ji,pr=typeof gr=="number"?gr:gr||li,lr=ki(pr)?pr.toString():void 0;return $n!==void 0&&(lr=$n),he.createElement("div",(0,te.Z)({},(0,Ce.Z)(Ri),ke?{}:Kn(On,Lt),{"aria-selected":Tn(li),className:qi,title:lr,onMouseMove:function(){Hn===Lt||zi||ni(Lt)},onClick:function(){zi||fi(li)},style:bi}),he.createElement("div",{className:"".concat(Zi,"-content")},typeof jn=="function"?jn(On,{index:Lt}):pr),he.isValidElement(rn)||ji,Ar&&he.createElement(we,{className:"".concat(Qn,"-option-state"),customizeIcon:rn,customizeIconProps:{value:li,disabled:zi,isSelected:ji}},ji?"\u2713":null))}))},Ai=he.forwardRef(gi),Bi=Ai,ri=function(De,Ne){var It=he.useRef({values:new Map,options:new Map}),Et=he.useMemo(function(){var At=It.current,tn=At.values,qt=At.options,cn=De.map(function(Mt){if(Mt.label===void 0){var mt;return(0,Je.Z)((0,Je.Z)({},Mt),{},{label:(mt=tn.get(Mt.value))===null||mt===void 0?void 0:mt.label})}return Mt}),Kt=new Map,dn=new Map;return cn.forEach(function(Mt){Kt.set(Mt.value,Mt),dn.set(Mt.value,Ne.get(Mt.value)||qt.get(Mt.value))}),It.current.values=Kt,It.current.options=dn,cn},[De,Ne]),Ge=he.useCallback(function(At){return Ne.get(At)||It.current.options.get(At)},[Ne]);return[Et,Ge]};function Si(De,Ne){return Ft(De).join("").toUpperCase().includes(Ne)}var yi=function(De,Ne,It,Et,Ge){return he.useMemo(function(){if(!It||Et===!1)return De;var At=Ne.options,tn=Ne.label,qt=Ne.value,cn=[],Kt=typeof Et=="function",dn=It.toUpperCase(),Mt=Kt?Et:function(hn,Te){return Ge?Si(Te[Ge],dn):Te[At]?Si(Te[tn!=="children"?tn:"label"],dn):Si(Te[qt],dn)},mt=Kt?function(hn){return ne(hn)}:function(hn){return hn};return De.forEach(function(hn){if(hn[At]){var Te=Mt(It,mt(hn));if(Te)cn.push(hn);else{var Ie=hn[At].filter(function(ge){return Mt(It,mt(ge))});Ie.length&&cn.push((0,Je.Z)((0,Je.Z)({},hn),{},(0,We.Z)({},At,Ie)))}return}Mt(It,mt(hn))&&cn.push(hn)}),cn},[De,Et,Ge,It,Ne])},ti=fe(6551),vi=fe(11592),wi=["children","value"],Ni=["children"];function en(De){var Ne=De,It=Ne.key,Et=Ne.props,Ge=Et.children,At=Et.value,tn=(0,je.Z)(Et,wi);return(0,Je.Z)({key:It,value:At!==void 0?At:It,children:Ge},tn)}function Ln(De){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,vi.Z)(De).map(function(It,Et){if(!he.isValidElement(It)||!It.type)return null;var Ge=It,At=Ge.type.isSelectOptGroup,tn=Ge.key,qt=Ge.props,cn=qt.children,Kt=(0,je.Z)(qt,Ni);return Ne||!At?en(It):(0,Je.Z)((0,Je.Z)({key:"__RC_SELECT_GRP__".concat(tn===null?Et:tn,"__"),label:tn},Kt),{},{options:Ln(cn)})}).filter(function(It){return It})}var Yn=function(Ne,It,Et,Ge,At){return he.useMemo(function(){var tn=Ne,qt=!Ne;qt&&(tn=Ln(It));var cn=new Map,Kt=new Map,dn=function(hn,Te,Ie){Ie&&typeof Ie=="string"&&hn.set(Te[Ie],Te)},Mt=function mt(hn){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=0;Ie<hn.length;Ie+=1){var ge=hn[Ie];!ge[Et.options]||Te?(cn.set(ge[Et.value],ge),dn(Kt,ge,Et.label),dn(Kt,ge,Ge),dn(Kt,ge,At)):mt(ge[Et.options],!0)}};return Mt(tn),{options:tn,valueOptions:cn,labelOptions:Kt}},[Ne,It,Et,Ge,At])},Dn=Yn;function pi(De){var Ne=he.useRef();Ne.current=De;var It=he.useCallback(function(){return Ne.current.apply(Ne,arguments)},[]);return It}function mi(De){var Ne=De.mode,It=De.options,Et=De.children,Ge=De.backfill,At=De.allowClear,tn=De.placeholder,qt=De.getInputElement,cn=De.showSearch,Kt=De.onSearch,dn=De.defaultOpen,Mt=De.autoFocus,mt=De.labelInValue,hn=De.value,Te=De.inputValue,Ie=De.optionLabelProp,ge=isMultiple(Ne),St=cn!==void 0?cn:ge||Ne==="combobox",Bn=It||convertChildrenToData(Et);if(warning(Ne!=="tags"||Bn.every(function(ke){return!ke.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ne==="tags"||Ne==="combobox"){var rn=Bn.some(function(ke){return ke.options?ke.options.some(function(nn){return typeof("value"in nn?nn.value:nn.key)=="number"}):typeof("value"in ke?ke.value:ke.key)=="number"});warning(!rn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ne!=="combobox"||!Ie,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ne==="combobox"||!Ge,"`backfill` only works with `combobox` mode."),warning(Ne==="combobox"||!qt,"`getInputElement` only work with `combobox` mode."),noteOnce(Ne!=="combobox"||!qt||!At||!tn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Kt&&!St&&Ne!=="combobox"&&Ne!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!dn||Mt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),hn!=null){var bt=toArray(hn);warning(!mt||bt.every(function(ke){return _typeof(ke)==="object"&&("key"in ke||"value"in ke)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ge||Array.isArray(hn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Et){var ht=null;toNodeArray(Et).some(function(ke){if(!React.isValidElement(ke)||!ke.type)return!1;var nn=ke,En=nn.type;if(En.isSelectOption)return!1;if(En.isSelectOptGroup){var Pn=toNodeArray(ke.props.children).every(function(jn){return!React.isValidElement(jn)||!ke.type||jn.type.isSelectOption?!0:(ht=jn.type,!1)});return!Pn}return ht=En,!0}),ht&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ht.displayName||ht.name||ht,"`.")),warning(Te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ti(De,Ne){if(De){var It=function Et(Ge){for(var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tn=0;tn<Ge.length;tn++){var qt=Ge[tn];if(qt[Ne==null?void 0:Ne.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!At&&Array.isArray(qt[Ne==null?void 0:Ne.options])&&Et(qt[Ne==null?void 0:Ne.options],!0))break}};It(De)}}var ui=null,oi=["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"],Ci=["inputValue"];function Yt(De){return!De||(0,Fe.Z)(De)!=="object"}var st=he.forwardRef(function(De,Ne){var It=De.id,Et=De.mode,Ge=De.prefixCls,At=Ge===void 0?"rc-select":Ge,tn=De.backfill,qt=De.fieldNames,cn=De.inputValue,Kt=De.searchValue,dn=De.onSearch,Mt=De.autoClearSearchValue,mt=Mt===void 0?!0:Mt,hn=De.onSelect,Te=De.onDeselect,Ie=De.dropdownMatchSelectWidth,ge=Ie===void 0?!0:Ie,St=De.filterOption,Bn=De.filterSort,rn=De.optionFilterProp,bt=De.optionLabelProp,ht=De.options,ke=De.optionRender,nn=De.children,En=De.defaultActiveFirstOption,Pn=De.menuItemSelectedIcon,jn=De.virtual,Qn=De.direction,an=De.listHeight,Nn=an===void 0?200:an,qn=De.listItemHeight,Vn=qn===void 0?20:qn,Xt=De.labelRender,wn=De.value,Fn=De.defaultValue,Wn=De.labelInValue,zn=De.onChange,Hn=De.maxCount,Un=(0,je.Z)(De,oi),ni=(0,ti.ZP)(It),Tn=yt(Et),fi=!!(!ht&&nn),_n=he.useMemo(function(){return St===void 0&&Et==="combobox"?!1:St},[St,Et]),ln=he.useMemo(function(){return Jt(qt,fi)},[JSON.stringify(qt),fi]),Kn=(0,Ye.Z)("",{value:Kt!==void 0?Kt:cn,postState:function(ci){return ci||""}}),Xn=(0,pe.Z)(Kn,2),Li=Xn[0],On=Xn[1],Lt=Dn(ht,nn,ln,rn,bt),zt=Lt.valueOptions,Vt=Lt.labelOptions,Ot=Lt.options,kn=he.useCallback(function(ei){var ci=Ft(ei);return ci.map(function(ai){var An,hi,Oi,_r,ur;if(Yt(ai))An=ai;else{var tr;Oi=ai.key,hi=ai.label,An=(tr=ai.value)!==null&&tr!==void 0?tr:Oi}var Qi=zt.get(An);if(Qi){var Ur;if(hi===void 0&&(hi=Qi==null?void 0:Qi[bt||ln.label]),Oi===void 0&&(Oi=(Ur=Qi==null?void 0:Qi.key)!==null&&Ur!==void 0?Ur:An),_r=Qi==null?void 0:Qi.disabled,ur=Qi==null?void 0:Qi.title,0)var to}return{label:hi,value:An,key:Oi,disabled:_r,title:ur}})},[ln,bt,zt]),li=(0,Ye.Z)(Fn,{value:wn}),Wt=(0,pe.Z)(li,2),Ht=Wt[0],mn=Wt[1],yn=he.useMemo(function(){var ei,ci=Tn&&Ht===null?[]:Ht,ai=kn(ci);return Et==="combobox"&&de((ei=ai[0])===null||ei===void 0?void 0:ei.value)?[]:ai},[Ht,kn,Et,Tn]),$n=ri(yn,zt),Pi=(0,pe.Z)($n,2),bi=Pi[0],_i=Pi[1],Ii=he.useMemo(function(){if(!Et&&bi.length===1){var ei=bi[0];if(ei.value===null&&(ei.label===null||ei.label===void 0))return[]}return bi.map(function(ci){var ai;return(0,Je.Z)((0,Je.Z)({},ci),{},{label:(ai=typeof Xt=="function"?Xt(ci):ci.label)!==null&&ai!==void 0?ai:ci.value})})},[Et,bi,Xt]),Ri=he.useMemo(function(){return new Set(bi.map(function(ei){return ei.value}))},[bi]);he.useEffect(function(){if(Et==="combobox"){var ei,ci=(ei=bi[0])===null||ei===void 0?void 0:ei.value;On(me(ci)?String(ci):"")}},[bi]);var ji=pi(function(ei,ci){var ai=ci!=null?ci:ei;return(0,We.Z)((0,We.Z)({},ln.value,ei),ln.label,ai)}),zi=he.useMemo(function(){if(Et!=="tags")return Ot;var ei=(0,tt.Z)(Ot),ci=function(An){return zt.has(An)};return(0,tt.Z)(bi).sort(function(ai,An){return ai.value<An.value?-1:1}).forEach(function(ai){var An=ai.value;ci(An)||ei.push(ji(An,ai.label))}),ei},[ji,Ot,zt,bi,Et]),Zi=yi(zi,ln,Li,_n,rn),qi=he.useMemo(function(){return Et!=="tags"||!Li||Zi.some(function(ei){return ei[rn||"value"]===Li})||Zi.some(function(ei){return ei[ln.value]===Li})?Zi:[ji(Li)].concat((0,tt.Z)(Zi))},[ji,rn,Et,Zi,Li,ln]),gr=function ei(ci){var ai=(0,tt.Z)(ci).sort(function(An,hi){return Bn(An,hi,{searchValue:Li})});return ai.map(function(An){return Array.isArray(An.options)?(0,Je.Z)((0,Je.Z)({},An),{},{options:An.options.length>0?ei(An.options):An.options}):An})},Ar=he.useMemo(function(){return Bn?gr(qi):qi},[qi,Bn,Li]),pr=he.useMemo(function(){return le(Ar,{fieldNames:ln,childrenAsData:fi})},[Ar,ln,fi]),lr=function(ci){var ai=kn(ci);if(mn(ai),zn&&(ai.length!==bi.length||ai.some(function(Oi,_r){var ur;return((ur=bi[_r])===null||ur===void 0?void 0:ur.value)!==(Oi==null?void 0:Oi.value)}))){var An=Wn?ai:ai.map(function(Oi){return Oi.value}),hi=ai.map(function(Oi){return ne(_i(Oi.value))});zn(Tn?An:An[0],Tn?hi:hi[0])}},Wr=he.useState(null),Mi=(0,pe.Z)(Wr,2),jr=Mi[0],Xi=Mi[1],Cr=he.useState(0),qr=(0,pe.Z)(Cr,2),Sr=qr[0],yr=qr[1],sr=En!==void 0?En:Et!=="combobox",Wi=he.useCallback(function(ei,ci){var ai=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},An=ai.source,hi=An===void 0?"keyboard":An;yr(ci),tn&&Et==="combobox"&&ei!==null&&hi==="keyboard"&&Xi(String(ei))},[tn,Et]),rr=function(ci,ai,An){var hi=function(){var ao,Xr=_i(ci);return[Wn?{label:Xr==null?void 0:Xr[ln.label],value:ci,key:(ao=Xr==null?void 0:Xr.key)!==null&&ao!==void 0?ao:ci}:ci,ne(Xr)]};if(ai&&hn){var Oi=hi(),_r=(0,pe.Z)(Oi,2),ur=_r[0],tr=_r[1];hn(ur,tr)}else if(!ai&&Te&&An!=="clear"){var Qi=hi(),Ur=(0,pe.Z)(Qi,2),to=Ur[0],Ir=Ur[1];Te(to,Ir)}},Vr=pi(function(ei,ci){var ai,An=Tn?ci.selected:!0;An?ai=Tn?[].concat((0,tt.Z)(bi),[ei]):[ei]:ai=bi.filter(function(hi){return hi.value!==ei}),lr(ai),rr(ei,An),Et==="combobox"?Xi(""):(!yt||mt)&&(On(""),Xi(""))}),Fr=function(ci,ai){lr(ci);var An=ai.type,hi=ai.values;(An==="remove"||An==="clear")&&hi.forEach(function(Oi){rr(Oi.value,!1,An)})},Ki=function(ci,ai){if(On(ci),Xi(null),ai.source==="submit"){var An=(ci||"").trim();if(An){var hi=Array.from(new Set([].concat((0,tt.Z)(Ri),[An])));lr(hi),rr(An,!0),On("")}return}ai.source!=="blur"&&(Et==="combobox"&&lr(ci),dn==null||dn(ci))},oo=function(ci){var ai=ci;Et!=="tags"&&(ai=ci.map(function(hi){var Oi=Vt.get(hi);return Oi==null?void 0:Oi.value}).filter(function(hi){return hi!==void 0}));var An=Array.from(new Set([].concat((0,tt.Z)(Ri),(0,tt.Z)(ai))));lr(An),An.forEach(function(hi){rr(hi,!0)})},Nr=he.useMemo(function(){var ei=jn!==!1&&ge!==!1;return(0,Je.Z)((0,Je.Z)({},Lt),{},{flattenOptions:pr,onActiveValue:Wi,defaultActiveFirstOption:sr,onSelect:Vr,menuItemSelectedIcon:Pn,rawValues:Ri,fieldNames:ln,virtual:ei,direction:Qn,listHeight:Nn,listItemHeight:Vn,childrenAsData:fi,maxCount:Hn,optionRender:ke})},[Hn,Lt,pr,Wi,sr,Vr,Pn,Ri,ln,jn,ge,Qn,Nn,Vn,fi,ke]);return he.createElement(ue.Provider,{value:Nr},he.createElement(Oe,(0,te.Z)({},Un,{id:ni,prefixCls:At,ref:Ne,omitDomProps:Ci,mode:Et,displayValues:Ii,onDisplayValuesChange:Fr,direction:Qn,searchValue:Li,onSearch:Ki,autoClearSearchValue:mt,onSearchSplit:oo,dropdownMatchSelectWidth:ge,OptionList:Bi,emptyOptions:!pr.length,activeValue:jr,activeDescendantId:"".concat(ni,"_list_").concat(Sr)})))}),un=st;un.Option=xn,un.OptGroup=_t;var Gn=un,di=Gn},63158:function(Ut,Qt,fe){"use strict";var te=fe(54476),tt=fe(20068),We=fe(42978),Je=fe(75931),pe=fe(59301),je=fe(92310),Fe=fe.n(je),Ye=fe(18929),Se=fe(10228),he=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ee=pe.forwardRef(function(ve,rt){var Ve,Ae=ve.prefixCls,Pe=Ae===void 0?"rc-switch":Ae,we=ve.className,$e=ve.checked,at=ve.defaultChecked,ct=ve.disabled,ut=ve.loadingIcon,ze=ve.checkedChildren,wt=ve.unCheckedChildren,pt=ve.onClick,sn=ve.onChange,Ce=ve.onKeyDown,Ke=(0,Je.Z)(ve,he),ot=(0,Ye.Z)(!1,{value:$e,defaultValue:at}),_e=(0,We.Z)(ot,2),nt=_e[0],Ze=_e[1];function dt(Rt,me){var de=nt;return ct||(de=Rt,Ze(de),sn==null||sn(de,me)),de}function pn(Rt){Rt.which===Se.Z.LEFT?dt(!1,Rt):Rt.which===Se.Z.RIGHT&&dt(!0,Rt),Ce==null||Ce(Rt)}function Ft(Rt){var me=dt(!nt,Rt);pt==null||pt(me,Rt)}var bn=Fe()(Pe,we,(Ve={},(0,tt.Z)(Ve,"".concat(Pe,"-checked"),nt),(0,tt.Z)(Ve,"".concat(Pe,"-disabled"),ct),Ve));return pe.createElement("button",(0,te.Z)({},Ke,{type:"button",role:"switch","aria-checked":nt,disabled:ct,className:bn,ref:rt,onKeyDown:pn,onClick:Ft}),ut,pe.createElement("span",{className:"".concat(Pe,"-inner")},pe.createElement("span",{className:"".concat(Pe,"-inner-checked")},ze),pe.createElement("span",{className:"".concat(Pe,"-inner-unchecked")},wt)))});Ee.displayName="Switch",Qt.Z=Ee},22711:function(Ut,Qt,fe){"use strict";fe.r(Qt),fe.d(Qt,{ResizableTextArea:function(){return _e},default:function(){return pn}});var te=fe(54476),tt=fe(20068),We=fe(33885),Je=fe(94480),pe=fe(42978),je=fe(75931),Fe=fe(92310),Ye=fe.n(Fe),Se=fe(36901),he=fe(66003),Ee=fe(30292),ve=fe(18929),rt=fe(59301),Ve=fe(76190),Ae=fe(29301),Pe=fe(34280),we=fe(16089),$e=`
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"],ct={},ut;function ze(Ft){var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=Ft.getAttribute("id")||Ft.getAttribute("data-reactid")||Ft.getAttribute("name");if(bn&&ct[Rt])return ct[Rt];var me=window.getComputedStyle(Ft),de=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),Ct=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),on=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),Bt=at.map(function(it){return"".concat(it,":").concat(me.getPropertyValue(it))}).join(";"),He={sizingStyle:Bt,paddingSize:Ct,borderSize:on,boxSizing:de};return bn&&Rt&&(ct[Rt]=He),He}function wt(Ft){var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ut||(ut=document.createElement("textarea"),ut.setAttribute("tab-index","-1"),ut.setAttribute("aria-hidden","true"),ut.setAttribute("name","hiddenTextarea"),document.body.appendChild(ut)),Ft.getAttribute("wrap")?ut.setAttribute("wrap",Ft.getAttribute("wrap")):ut.removeAttribute("wrap");var de=ze(Ft,bn),Ct=de.paddingSize,on=de.borderSize,Bt=de.boxSizing,He=de.sizingStyle;ut.setAttribute("style","".concat(He,";").concat($e)),ut.value=Ft.value||Ft.placeholder||"";var it=void 0,ft=void 0,vn,Pt=ut.scrollHeight;if(Bt==="border-box"?Pt+=on:Bt==="content-box"&&(Pt-=Ct),Rt!==null||me!==null){ut.value=" ";var Me=ut.scrollHeight-Ct;Rt!==null&&(it=Me*Rt,Bt==="border-box"&&(it=it+Ct+on),Pt=Math.max(it,Pt)),me!==null&&(ft=Me*me,Bt==="border-box"&&(ft=ft+Ct+on),vn=Pt>ft?"":"hidden",Pt=Math.min(ft,Pt))}var be={height:Pt,overflowY:vn,resize:"none"};return it&&(be.minHeight=it),ft&&(be.maxHeight=ft),be}var pt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],sn=0,Ce=1,Ke=2,ot=rt.forwardRef(function(Ft,bn){var Rt=Ft,me=Rt.prefixCls,de=Rt.defaultValue,Ct=Rt.value,on=Rt.autoSize,Bt=Rt.onResize,He=Rt.className,it=Rt.style,ft=Rt.disabled,vn=Rt.onChange,Pt=Rt.onInternalAutoSize,Me=(0,je.Z)(Rt,pt),be=(0,ve.Z)(de,{value:Ct,postState:function(xn){return xn!=null?xn:""}}),Re=(0,pe.Z)(be,2),lt=Re[0],Le=Re[1],Ue=function(xn){Le(xn.target.value),vn==null||vn(xn)},Xe=rt.useRef();rt.useImperativeHandle(bn,function(){return{textArea:Xe.current}});var et=rt.useMemo(function(){return on&&(0,Ve.Z)(on)==="object"?[on.minRows,on.maxRows]:[]},[on]),gt=(0,pe.Z)(et,2),xt=gt[0],Dt=gt[1],Nt=!!on,gn=function(){try{if(document.activeElement===Xe.current){var xn=Xe.current,Zn=xn.selectionStart,jt=xn.selectionEnd,Rn=xn.scrollTop;Xe.current.setSelectionRange(Zn,jt),Xe.current.scrollTop=Rn}}catch(Ei){}},Jt=rt.useState(Ke),le=(0,pe.Z)(Jt,2),ne=le[0],ee=le[1],oe=rt.useState(),ue=(0,pe.Z)(oe,2),ie=ue[0],ye=ue[1],vt=function(){ee(sn)};(0,Pe.Z)(function(){Nt&&vt()},[Ct,xt,Dt,Nt]),(0,Pe.Z)(function(){if(ne===sn)ee(Ce);else if(ne===Ce){var Gt=wt(Xe.current,!1,xt,Dt);ee(Ke),ye(Gt)}else gn()},[ne]);var yt=rt.useRef(),kt=function(){we.Z.cancel(yt.current)},Oe=function(xn){ne===Ke&&(Bt==null||Bt(xn),on&&(kt(),yt.current=(0,we.Z)(function(){vt()})))};rt.useEffect(function(){return kt},[]);var $t=Nt?ie:null,_t=(0,We.Z)((0,We.Z)({},it),$t);return(ne===sn||ne===Ce)&&(_t.overflowY="hidden",_t.overflowX="hidden"),rt.createElement(Ae.Z,{onResize:Oe,disabled:!(on||Bt)},rt.createElement("textarea",(0,te.Z)({},Me,{ref:Xe,style:_t,className:Ye()(me,He,(0,tt.Z)({},"".concat(me,"-disabled"),ft)),disabled:ft,value:lt,onChange:Ue})))}),_e=ot,nt=["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"],Ze=rt.forwardRef(function(Ft,bn){var Rt,me=Ft.defaultValue,de=Ft.value,Ct=Ft.onFocus,on=Ft.onBlur,Bt=Ft.onChange,He=Ft.allowClear,it=Ft.maxLength,ft=Ft.onCompositionStart,vn=Ft.onCompositionEnd,Pt=Ft.suffix,Me=Ft.prefixCls,be=Me===void 0?"rc-textarea":Me,Re=Ft.showCount,lt=Ft.count,Le=Ft.className,Ue=Ft.style,Xe=Ft.disabled,et=Ft.hidden,gt=Ft.classNames,xt=Ft.styles,Dt=Ft.onResize,Nt=Ft.onClear,gn=Ft.onPressEnter,Jt=Ft.readOnly,le=Ft.autoSize,ne=Ft.onKeyDown,ee=(0,je.Z)(Ft,nt),oe=(0,ve.Z)(me,{value:de,defaultValue:me}),ue=(0,pe.Z)(oe,2),ie=ue[0],ye=ue[1],vt=ie==null?"":String(ie),yt=rt.useState(!1),kt=(0,pe.Z)(yt,2),Oe=kt[0],$t=kt[1],_t=rt.useRef(!1),Gt=rt.useState(null),xn=(0,pe.Z)(Gt,2),Zn=xn[0],jt=xn[1],Rn=(0,rt.useRef)(null),Ei=(0,rt.useRef)(null),si=function(){var un;return(un=Ei.current)===null||un===void 0?void 0:un.textArea},ki=function(){si().focus()};(0,rt.useImperativeHandle)(bn,function(){var st;return{resizableTextArea:Ei.current,focus:ki,blur:function(){si().blur()},nativeElement:((st=Rn.current)===null||st===void 0?void 0:st.nativeElement)||si()}}),(0,rt.useEffect)(function(){$t(function(st){return!Xe&&st})},[Xe]);var gi=rt.useState(null),Ai=(0,pe.Z)(gi,2),Bi=Ai[0],ri=Ai[1];rt.useEffect(function(){if(Bi){var st;(st=si()).setSelectionRange.apply(st,(0,Je.Z)(Bi))}},[Bi]);var Si=(0,he.Z)(lt,Re),yi=(Rt=Si.max)!==null&&Rt!==void 0?Rt:it,ti=Number(yi)>0,vi=Si.strategy(vt),wi=!!yi&&vi>yi,Ni=function(un,Gn){var di=Gn;!_t.current&&Si.exceedFormatter&&Si.max&&Si.strategy(Gn)>Si.max&&(di=Si.exceedFormatter(Gn,{max:Si.max}),Gn!==di&&ri([si().selectionStart||0,si().selectionEnd||0])),ye(di),(0,Ee.rJ)(un.currentTarget,un,Bt,di)},en=function(un){_t.current=!0,ft==null||ft(un)},Ln=function(un){_t.current=!1,Ni(un,un.currentTarget.value),vn==null||vn(un)},Yn=function(un){Ni(un,un.target.value)},Dn=function(un){un.key==="Enter"&&gn&&gn(un),ne==null||ne(un)},pi=function(un){$t(!0),Ct==null||Ct(un)},mi=function(un){$t(!1),on==null||on(un)},Ti=function(un){ye(""),ki(),(0,Ee.rJ)(si(),un,Bt)},ui=Pt,oi;Si.show&&(Si.showFormatter?oi=Si.showFormatter({value:vt,count:vi,maxLength:yi}):oi="".concat(vi).concat(ti?" / ".concat(yi):""),ui=rt.createElement(rt.Fragment,null,ui,rt.createElement("span",{className:Ye()("".concat(be,"-data-count"),gt==null?void 0:gt.count),style:xt==null?void 0:xt.count},oi)));var Ci=function(un){var Gn;Dt==null||Dt(un),(Gn=si())!==null&&Gn!==void 0&&Gn.style.height&&jt(!0)},Yt=!le&&!Re&&!He;return rt.createElement(Se.BaseInput,{ref:Rn,value:vt,allowClear:He,handleReset:Ti,suffix:ui,prefixCls:be,classNames:(0,We.Z)((0,We.Z)({},gt),{},{affixWrapper:Ye()(gt==null?void 0:gt.affixWrapper,(0,tt.Z)((0,tt.Z)({},"".concat(be,"-show-count"),Re),"".concat(be,"-textarea-allow-clear"),He))}),disabled:Xe,focused:Oe,className:Ye()(Le,wi&&"".concat(be,"-out-of-range")),style:(0,We.Z)((0,We.Z)({},Ue),Zn&&!Yt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof oi=="string"?oi:void 0}},hidden:et,readOnly:Jt,onClear:Nt},rt.createElement(_e,(0,te.Z)({},ee,{autoSize:le,maxLength:it,onKeyDown:Dn,onChange:Yn,onFocus:pi,onBlur:mi,onCompositionStart:en,onCompositionEnd:Ln,className:Ye()(gt==null?void 0:gt.textarea),style:(0,We.Z)((0,We.Z)({},xt==null?void 0:xt.textarea),{},{resize:Ue==null?void 0:Ue.resize}),disabled:Xe,prefixCls:be,onResize:Ci,ref:Ei,readOnly:Jt})))}),dt=Ze,pn=dt},48911:function(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return lt}});var te=fe(54476),tt=fe(76190),We=fe(33885),Je=fe(20068),pe=fe(42978),je=fe(75931),Fe=fe(92310),Ye=fe.n(Fe),Se=fe(29301),he=fe(70425),Ee=fe(34280),ve=fe(59301),rt=fe(4676),Ve=ve.forwardRef(function(Le,Ue){var Xe=Le.height,et=Le.offsetY,gt=Le.offsetX,xt=Le.children,Dt=Le.prefixCls,Nt=Le.onInnerResize,gn=Le.innerProps,Jt=Le.rtl,le=Le.extra,ne={},ee={display:"flex",flexDirection:"column"};return et!==void 0&&(ne={height:Xe,position:"relative",overflow:"hidden"},ee=(0,We.Z)((0,We.Z)({},ee),{},(0,Je.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)({transform:"translateY(".concat(et,"px)")},Jt?"marginRight":"marginLeft",-gt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:ne},ve.createElement(Se.Z,{onResize:function(ue){var ie=ue.offsetHeight;ie&&Nt&&Nt()}},ve.createElement("div",(0,te.Z)({style:ee,className:Ye()((0,Je.Z)({},"".concat(Dt,"-holder-inner"),Dt)),ref:Ue},gn),xt,le)))});Ve.displayName="Filler";var Ae=Ve;function Pe(Le){var Ue=Le.children,Xe=Le.setRef,et=ve.useCallback(function(gt){Xe(gt)},[]);return ve.cloneElement(Ue,{ref:et})}function we(Le,Ue,Xe,et,gt,xt,Dt,Nt){var gn=Nt.getKey;return Le.slice(Ue,Xe+1).map(function(Jt,le){var ne=Ue+le,ee=Dt(Jt,ne,{style:{width:et},offsetX:gt}),oe=gn(Jt);return ve.createElement(Pe,{key:oe,setRef:function(ie){return xt(Jt,ie)}},ee)})}function $e(Le,Ue,Xe,et){var gt=Xe-Le,xt=Ue-Xe,Dt=Math.min(gt,xt)*2;if(et<=Dt){var Nt=Math.floor(et/2);return et%2?Xe+Nt+1:Xe-Nt}return gt>xt?Xe-(et-xt):Xe+(et-gt)}function at(Le,Ue,Xe){var et=Le.length,gt=Ue.length,xt,Dt;if(et===0&&gt===0)return null;et<gt?(xt=Le,Dt=Ue):(xt=Ue,Dt=Le);var Nt={__EMPTY_ITEM__:!0};function gn(ue){return ue!==void 0?Xe(ue):Nt}for(var Jt=null,le=Math.abs(et-gt)!==1,ne=0;ne<Dt.length;ne+=1){var ee=gn(xt[ne]),oe=gn(Dt[ne]);if(ee!==oe){Jt=ne,le=le||ee!==gn(Dt[ne+1]);break}}return Jt===null?null:{index:Jt,multiple:le}}function ct(Le,Ue,Xe){var et=ve.useState(Le),gt=(0,pe.Z)(et,2),xt=gt[0],Dt=gt[1],Nt=ve.useState(null),gn=(0,pe.Z)(Nt,2),Jt=gn[0],le=gn[1];return ve.useEffect(function(){var ne=at(xt||[],Le||[],Ue);(ne==null?void 0:ne.index)!==void 0&&(Xe==null||Xe(ne.index),le(Le[ne.index])),Dt(Le)},[Le]),[Jt]}var ut=fe(16089),ze=(typeof navigator=="undefined"?"undefined":(0,tt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),wt=ze,pt=function(Le,Ue,Xe,et){var gt=(0,ve.useRef)(!1),xt=(0,ve.useRef)(null);function Dt(){clearTimeout(xt.current),gt.current=!0,xt.current=setTimeout(function(){gt.current=!1},50)}var Nt=(0,ve.useRef)({top:Le,bottom:Ue,left:Xe,right:et});return Nt.current.top=Le,Nt.current.bottom=Ue,Nt.current.left=Xe,Nt.current.right=et,function(gn,Jt){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ne=gn?Jt<0&&Nt.current.left||Jt>0&&Nt.current.right:Jt<0&&Nt.current.top||Jt>0&&Nt.current.bottom;return le&&ne?(clearTimeout(xt.current),gt.current=!1):(!ne||gt.current)&&Dt(),!gt.current&&ne}};function sn(Le,Ue,Xe,et,gt,xt,Dt){var Nt=(0,ve.useRef)(0),gn=(0,ve.useRef)(null),Jt=(0,ve.useRef)(null),le=(0,ve.useRef)(!1),ne=pt(Ue,Xe,et,gt);function ee(yt,kt){if(ut.Z.cancel(gn.current),!ne(!1,kt)){var Oe=yt;if(!Oe._virtualHandled)Oe._virtualHandled=!0;else return;Nt.current+=kt,Jt.current=kt,wt||Oe.preventDefault(),gn.current=(0,ut.Z)(function(){var $t=le.current?10:1;Dt(Nt.current*$t,!1),Nt.current=0})}}function oe(yt,kt){Dt(kt,!0),wt||yt.preventDefault()}var ue=(0,ve.useRef)(null),ie=(0,ve.useRef)(null);function ye(yt){if(Le){ut.Z.cancel(ie.current),ie.current=(0,ut.Z)(function(){ue.current=null},2);var kt=yt.deltaX,Oe=yt.deltaY,$t=yt.shiftKey,_t=kt,Gt=Oe;(ue.current==="sx"||!ue.current&&$t&&Oe&&!kt)&&(_t=Oe,Gt=0,ue.current="sx");var xn=Math.abs(_t),Zn=Math.abs(Gt);ue.current===null&&(ue.current=xt&&xn>Zn?"x":"y"),ue.current==="y"?ee(yt,Gt):oe(yt,_t)}}function vt(yt){Le&&(le.current=yt.detail===Jt.current)}return[ye,vt]}function Ce(Le,Ue,Xe,et){var gt=ve.useMemo(function(){return[new Map,[]]},[Le,Xe.id,et]),xt=(0,pe.Z)(gt,2),Dt=xt[0],Nt=xt[1],gn=function(le){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le,ee=Dt.get(le),oe=Dt.get(ne);if(ee===void 0||oe===void 0)for(var ue=Le.length,ie=Nt.length;ie<ue;ie+=1){var ye,vt=Le[ie],yt=Ue(vt);Dt.set(yt,ie);var kt=(ye=Xe.get(yt))!==null&&ye!==void 0?ye:et;if(Nt[ie]=(Nt[ie-1]||0)+kt,yt===le&&(ee=ie),yt===ne&&(oe=ie),ee!==void 0&&oe!==void 0)break}return{top:Nt[ee-1]||0,bottom:Nt[oe]}};return gn}var Ke=fe(67732),ot=fe(83652),_e=function(){function Le(){(0,Ke.Z)(this,Le),(0,Je.Z)(this,"maps",void 0),(0,Je.Z)(this,"id",0),(0,Je.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ot.Z)(Le,[{key:"set",value:function(Xe,et){this.diffRecords.set(Xe,this.maps[Xe]),this.maps[Xe]=et,this.id+=1}},{key:"get",value:function(Xe){return this.maps[Xe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Le}(),nt=_e;function Ze(Le){var Ue=parseFloat(Le);return isNaN(Ue)?0:Ue}function dt(Le,Ue,Xe){var et=ve.useState(0),gt=(0,pe.Z)(et,2),xt=gt[0],Dt=gt[1],Nt=(0,ve.useRef)(new Map),gn=(0,ve.useRef)(new nt),Jt=(0,ve.useRef)(0);function le(){Jt.current+=1}function ne(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;le();var ue=function(){var vt=!1;Nt.current.forEach(function(yt,kt){if(yt&&yt.offsetParent){var Oe=yt.offsetHeight,$t=getComputedStyle(yt),_t=$t.marginTop,Gt=$t.marginBottom,xn=Ze(_t),Zn=Ze(Gt),jt=Oe+xn+Zn;gn.current.get(kt)!==jt&&(gn.current.set(kt,jt),vt=!0)}}),vt&&Dt(function(yt){return yt+1})};if(oe)ue();else{Jt.current+=1;var ie=Jt.current;Promise.resolve().then(function(){ie===Jt.current&&ue()})}}function ee(oe,ue){var ie=Le(oe),ye=Nt.current.get(ie);ue?(Nt.current.set(ie,ue),ne()):Nt.current.delete(ie),!ye!=!ue&&(ue?Ue==null||Ue(oe):Xe==null||Xe(oe))}return(0,ve.useEffect)(function(){return le},[]),[ee,ne,gn.current,xt]}var pn=14/15;function Ft(Le,Ue,Xe){var et=(0,ve.useRef)(!1),gt=(0,ve.useRef)(0),xt=(0,ve.useRef)(0),Dt=(0,ve.useRef)(null),Nt=(0,ve.useRef)(null),gn,Jt=function(oe){if(et.current){var ue=Math.ceil(oe.touches[0].pageX),ie=Math.ceil(oe.touches[0].pageY),ye=gt.current-ue,vt=xt.current-ie,yt=Math.abs(ye)>Math.abs(vt);yt?gt.current=ue:xt.current=ie;var kt=Xe(yt,yt?ye:vt,!1,oe);kt&&oe.preventDefault(),clearInterval(Nt.current),kt&&(Nt.current=setInterval(function(){yt?ye*=pn:vt*=pn;var Oe=Math.floor(yt?ye:vt);(!Xe(yt,Oe,!0)||Math.abs(Oe)<=.1)&&clearInterval(Nt.current)},16))}},le=function(){et.current=!1,gn()},ne=function(oe){gn(),oe.touches.length===1&&!et.current&&(et.current=!0,gt.current=Math.ceil(oe.touches[0].pageX),xt.current=Math.ceil(oe.touches[0].pageY),Dt.current=oe.target,Dt.current.addEventListener("touchmove",Jt,{passive:!1}),Dt.current.addEventListener("touchend",le,{passive:!0}))};gn=function(){Dt.current&&(Dt.current.removeEventListener("touchmove",Jt),Dt.current.removeEventListener("touchend",le))},(0,Ee.Z)(function(){return Le&&Ue.current.addEventListener("touchstart",ne,{passive:!0}),function(){var ee;(ee=Ue.current)===null||ee===void 0||ee.removeEventListener("touchstart",ne),gn(),clearInterval(Nt.current)}},[Le])}function bn(Le){return Math.floor(Math.pow(Le,.5))}function Rt(Le,Ue){var Xe="touches"in Le?Le.touches[0]:Le;return Xe[Ue?"pageX":"pageY"]-window[Ue?"scrollX":"scrollY"]}function me(Le,Ue,Xe){ve.useEffect(function(){var et=Ue.current;if(Le&&et){var gt=!1,xt,Dt,Nt=function(){ut.Z.cancel(xt)},gn=function ee(){Nt(),xt=(0,ut.Z)(function(){Xe(Dt),ee()})},Jt=function(){gt=!1,Nt()},le=function(oe){if(!(oe.target.draggable||oe.button!==0)){var ue=oe;ue._virtualHandled||(ue._virtualHandled=!0,gt=!0)}},ne=function(oe){if(gt){var ue=Rt(oe,!1),ie=et.getBoundingClientRect(),ye=ie.top,vt=ie.bottom;if(ue<=ye){var yt=ye-ue;Dt=-bn(yt),gn()}else if(ue>=vt){var kt=ue-vt;Dt=bn(kt),gn()}else Nt()}};return et.addEventListener("mousedown",le),et.ownerDocument.addEventListener("mouseup",Jt),et.ownerDocument.addEventListener("mousemove",ne),et.ownerDocument.addEventListener("dragend",Jt),function(){et.removeEventListener("mousedown",le),et.ownerDocument.removeEventListener("mouseup",Jt),et.ownerDocument.removeEventListener("mousemove",ne),et.ownerDocument.removeEventListener("dragend",Jt),Nt()}}},[Le])}var de=10;function Ct(Le,Ue,Xe,et,gt,xt,Dt,Nt){var gn=ve.useRef(),Jt=ve.useState(null),le=(0,pe.Z)(Jt,2),ne=le[0],ee=le[1];return(0,Ee.Z)(function(){if(ne&&ne.times<de){if(!Le.current){ee(function(Si){return(0,We.Z)({},Si)});return}xt();var oe=ne.targetAlign,ue=ne.originAlign,ie=ne.index,ye=ne.offset,vt=Le.current.clientHeight,yt=!1,kt=oe,Oe=null;if(vt){for(var $t=oe||ue,_t=0,Gt=0,xn=0,Zn=Math.min(Ue.length-1,ie),jt=0;jt<=Zn;jt+=1){var Rn=gt(Ue[jt]);Gt=_t;var Ei=Xe.get(Rn);xn=Gt+(Ei===void 0?et:Ei),_t=xn}for(var si=$t==="top"?ye:vt-ye,ki=Zn;ki>=0;ki-=1){var gi=gt(Ue[ki]),Ai=Xe.get(gi);if(Ai===void 0){yt=!0;break}if(si-=Ai,si<=0)break}switch($t){case"top":Oe=Gt-ye;break;case"bottom":Oe=xn-vt+ye;break;default:{var Bi=Le.current.scrollTop,ri=Bi+vt;Gt<Bi?kt="top":xn>ri&&(kt="bottom")}}Oe!==null&&Dt(Oe),Oe!==ne.lastTop&&(yt=!0)}yt&&ee((0,We.Z)((0,We.Z)({},ne),{},{times:ne.times+1,targetAlign:kt,lastTop:Oe}))}},[ne,Le.current]),function(oe){if(oe==null){Nt();return}if(ut.Z.cancel(gn.current),typeof oe=="number")Dt(oe);else if(oe&&(0,tt.Z)(oe)==="object"){var ue,ie=oe.align;"index"in oe?ue=oe.index:ue=Ue.findIndex(function(yt){return gt(yt)===oe.key});var ye=oe.offset,vt=ye===void 0?0:ye;ee({times:0,index:ue,offset:vt,originAlign:ie})}}}var on=ve.forwardRef(function(Le,Ue){var Xe=Le.prefixCls,et=Le.rtl,gt=Le.scrollOffset,xt=Le.scrollRange,Dt=Le.onStartMove,Nt=Le.onStopMove,gn=Le.onScroll,Jt=Le.horizontal,le=Le.spinSize,ne=Le.containerSize,ee=Le.style,oe=Le.thumbStyle,ue=Le.showScrollBar,ie=ve.useState(!1),ye=(0,pe.Z)(ie,2),vt=ye[0],yt=ye[1],kt=ve.useState(null),Oe=(0,pe.Z)(kt,2),$t=Oe[0],_t=Oe[1],Gt=ve.useState(null),xn=(0,pe.Z)(Gt,2),Zn=xn[0],jt=xn[1],Rn=!et,Ei=ve.useRef(),si=ve.useRef(),ki=ve.useState(ue),gi=(0,pe.Z)(ki,2),Ai=gi[0],Bi=gi[1],ri=ve.useRef(),Si=function(){ue===!0||ue===!1||(clearTimeout(ri.current),Bi(!0),ri.current=setTimeout(function(){Bi(!1)},3e3))},yi=xt-ne||0,ti=ne-le||0,vi=ve.useMemo(function(){if(gt===0||yi===0)return 0;var Ti=gt/yi;return Ti*ti},[gt,yi,ti]),wi=function(ui){ui.stopPropagation(),ui.preventDefault()},Ni=ve.useRef({top:vi,dragging:vt,pageY:$t,startTop:Zn});Ni.current={top:vi,dragging:vt,pageY:$t,startTop:Zn};var en=function(ui){yt(!0),_t(Rt(ui,Jt)),jt(Ni.current.top),Dt(),ui.stopPropagation(),ui.preventDefault()};ve.useEffect(function(){var Ti=function(Yt){Yt.preventDefault()},ui=Ei.current,oi=si.current;return ui.addEventListener("touchstart",Ti,{passive:!1}),oi.addEventListener("touchstart",en,{passive:!1}),function(){ui.removeEventListener("touchstart",Ti),oi.removeEventListener("touchstart",en)}},[]);var Ln=ve.useRef();Ln.current=yi;var Yn=ve.useRef();Yn.current=ti,ve.useEffect(function(){if(vt){var Ti,ui=function(Yt){var st=Ni.current,un=st.dragging,Gn=st.pageY,di=st.startTop;ut.Z.cancel(Ti);var De=Ei.current.getBoundingClientRect(),Ne=ne/(Jt?De.width:De.height);if(un){var It=(Rt(Yt,Jt)-Gn)*Ne,Et=di;!Rn&&Jt?Et-=It:Et+=It;var Ge=Ln.current,At=Yn.current,tn=At?Et/At:0,qt=Math.ceil(tn*Ge);qt=Math.max(qt,0),qt=Math.min(qt,Ge),Ti=(0,ut.Z)(function(){gn(qt,Jt)})}},oi=function(){yt(!1),Nt()};return window.addEventListener("mousemove",ui,{passive:!0}),window.addEventListener("touchmove",ui,{passive:!0}),window.addEventListener("mouseup",oi,{passive:!0}),window.addEventListener("touchend",oi,{passive:!0}),function(){window.removeEventListener("mousemove",ui),window.removeEventListener("touchmove",ui),window.removeEventListener("mouseup",oi),window.removeEventListener("touchend",oi),ut.Z.cancel(Ti)}}},[vt]),ve.useEffect(function(){return Si(),function(){clearTimeout(ri.current)}},[gt]),ve.useImperativeHandle(Ue,function(){return{delayHidden:Si}});var Dn="".concat(Xe,"-scrollbar"),pi={position:"absolute",visibility:Ai?null:"hidden"},mi={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Jt?(Object.assign(pi,{height:8,left:0,right:0,bottom:0}),Object.assign(mi,(0,Je.Z)({height:"100%",width:le},Rn?"left":"right",vi))):(Object.assign(pi,(0,Je.Z)({width:8,top:0,bottom:0},Rn?"right":"left",0)),Object.assign(mi,{width:"100%",height:le,top:vi})),ve.createElement("div",{ref:Ei,className:Ye()(Dn,(0,Je.Z)((0,Je.Z)((0,Je.Z)({},"".concat(Dn,"-horizontal"),Jt),"".concat(Dn,"-vertical"),!Jt),"".concat(Dn,"-visible"),Ai)),style:(0,We.Z)((0,We.Z)({},pi),ee),onMouseDown:wi,onMouseMove:Si},ve.createElement("div",{ref:si,className:Ye()("".concat(Dn,"-thumb"),(0,Je.Z)({},"".concat(Dn,"-thumb-moving"),vt)),style:(0,We.Z)((0,We.Z)({},mi),oe),onMouseDown:en}))}),Bt=on,He=20;function it(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Xe=Le/Ue*Le;return isNaN(Xe)&&(Xe=0),Xe=Math.max(Xe,He),Math.floor(Xe)}var ft=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],vn=[],Pt={overflowY:"auto",overflowAnchor:"none"};function Me(Le,Ue){var Xe=Le.prefixCls,et=Xe===void 0?"rc-virtual-list":Xe,gt=Le.className,xt=Le.height,Dt=Le.itemHeight,Nt=Le.fullHeight,gn=Nt===void 0?!0:Nt,Jt=Le.style,le=Le.data,ne=Le.children,ee=Le.itemKey,oe=Le.virtual,ue=Le.direction,ie=Le.scrollWidth,ye=Le.component,vt=ye===void 0?"div":ye,yt=Le.onScroll,kt=Le.onVirtualScroll,Oe=Le.onVisibleChange,$t=Le.innerProps,_t=Le.extraRender,Gt=Le.styles,xn=Le.showScrollBar,Zn=xn===void 0?"optional":xn,jt=(0,je.Z)(Le,ft),Rn=ve.useCallback(function(Lt){return typeof ee=="function"?ee(Lt):Lt==null?void 0:Lt[ee]},[ee]),Ei=dt(Rn,null,null),si=(0,pe.Z)(Ei,4),ki=si[0],gi=si[1],Ai=si[2],Bi=si[3],ri=!!(oe!==!1&&xt&&Dt),Si=ve.useMemo(function(){return Object.values(Ai.maps).reduce(function(Lt,zt){return Lt+zt},0)},[Ai.id,Ai.maps]),yi=ri&&le&&(Math.max(Dt*le.length,Si)>xt||!!ie),ti=ue==="rtl",vi=Ye()(et,(0,Je.Z)({},"".concat(et,"-rtl"),ti),gt),wi=le||vn,Ni=(0,ve.useRef)(),en=(0,ve.useRef)(),Ln=(0,ve.useRef)(),Yn=(0,ve.useState)(0),Dn=(0,pe.Z)(Yn,2),pi=Dn[0],mi=Dn[1],Ti=(0,ve.useState)(0),ui=(0,pe.Z)(Ti,2),oi=ui[0],Ci=ui[1],Yt=(0,ve.useState)(!1),st=(0,pe.Z)(Yt,2),un=st[0],Gn=st[1],di=function(){Gn(!0)},De=function(){Gn(!1)},Ne={getKey:Rn};function It(Lt){mi(function(zt){var Vt;typeof Lt=="function"?Vt=Lt(zt):Vt=Lt;var Ot=En(Vt);return Ni.current.scrollTop=Ot,Ot})}var Et=(0,ve.useRef)({start:0,end:wi.length}),Ge=(0,ve.useRef)(),At=ct(wi,Rn),tn=(0,pe.Z)(At,1),qt=tn[0];Ge.current=qt;var cn=ve.useMemo(function(){if(!ri)return{scrollHeight:void 0,start:0,end:wi.length-1,offset:void 0};if(!yi){var Lt;return{scrollHeight:((Lt=en.current)===null||Lt===void 0?void 0:Lt.offsetHeight)||0,start:0,end:wi.length-1,offset:void 0}}for(var zt=0,Vt,Ot,kn,li=wi.length,Wt=0;Wt<li;Wt+=1){var Ht=wi[Wt],mn=Rn(Ht),yn=Ai.get(mn),$n=zt+(yn===void 0?Dt:yn);$n>=pi&&Vt===void 0&&(Vt=Wt,Ot=zt),$n>pi+xt&&kn===void 0&&(kn=Wt),zt=$n}return Vt===void 0&&(Vt=0,Ot=0,kn=Math.ceil(xt/Dt)),kn===void 0&&(kn=wi.length-1),kn=Math.min(kn+1,wi.length-1),{scrollHeight:zt,start:Vt,end:kn,offset:Ot}},[yi,ri,pi,wi,Bi,xt]),Kt=cn.scrollHeight,dn=cn.start,Mt=cn.end,mt=cn.offset;Et.current.start=dn,Et.current.end=Mt,ve.useLayoutEffect(function(){var Lt=Ai.getRecord();if(Lt.size===1){var zt=Array.from(Lt.keys())[0],Vt=Lt.get(zt),Ot=wi[dn];if(Ot&&Vt===void 0){var kn=Rn(Ot);if(kn===zt){var li=Ai.get(zt),Wt=li-Dt;It(function(Ht){return Ht+Wt})}}}Ai.resetRecord()},[Kt]);var hn=ve.useState({width:0,height:xt}),Te=(0,pe.Z)(hn,2),Ie=Te[0],ge=Te[1],St=function(zt){ge({width:zt.offsetWidth,height:zt.offsetHeight})},Bn=(0,ve.useRef)(),rn=(0,ve.useRef)(),bt=ve.useMemo(function(){return it(Ie.width,ie)},[Ie.width,ie]),ht=ve.useMemo(function(){return it(Ie.height,Kt)},[Ie.height,Kt]),ke=Kt-xt,nn=(0,ve.useRef)(ke);nn.current=ke;function En(Lt){var zt=Lt;return Number.isNaN(nn.current)||(zt=Math.min(zt,nn.current)),zt=Math.max(zt,0),zt}var Pn=pi<=0,jn=pi>=ke,Qn=oi<=0,an=oi>=ie,Nn=pt(Pn,jn,Qn,an),qn=function(){return{x:ti?-oi:oi,y:pi}},Vn=(0,ve.useRef)(qn()),Xt=(0,he.zX)(function(Lt){if(kt){var zt=(0,We.Z)((0,We.Z)({},qn()),Lt);(Vn.current.x!==zt.x||Vn.current.y!==zt.y)&&(kt(zt),Vn.current=zt)}});function wn(Lt,zt){var Vt=Lt;zt?((0,rt.flushSync)(function(){Ci(Vt)}),Xt()):It(Vt)}function Fn(Lt){var zt=Lt.currentTarget.scrollTop;zt!==pi&&It(zt),yt==null||yt(Lt),Xt()}var Wn=function(zt){var Vt=zt,Ot=ie?ie-Ie.width:0;return Vt=Math.max(Vt,0),Vt=Math.min(Vt,Ot),Vt},zn=(0,he.zX)(function(Lt,zt){zt?((0,rt.flushSync)(function(){Ci(function(Vt){var Ot=Vt+(ti?-Lt:Lt);return Wn(Ot)})}),Xt()):It(function(Vt){var Ot=Vt+Lt;return Ot})}),Hn=sn(ri,Pn,jn,Qn,an,!!ie,zn),Un=(0,pe.Z)(Hn,2),ni=Un[0],Tn=Un[1];Ft(ri,Ni,function(Lt,zt,Vt,Ot){var kn=Ot;return Nn(Lt,zt,Vt)?!1:!kn||!kn._virtualHandled?(kn&&(kn._virtualHandled=!0),ni({preventDefault:function(){},deltaX:Lt?zt:0,deltaY:Lt?0:zt}),!0):!1}),me(yi,Ni,function(Lt){It(function(zt){return zt+Lt})}),(0,Ee.Z)(function(){function Lt(Vt){var Ot=Pn&&Vt.detail<0,kn=jn&&Vt.detail>0;ri&&!Ot&&!kn&&Vt.preventDefault()}var zt=Ni.current;return zt.addEventListener("wheel",ni,{passive:!1}),zt.addEventListener("DOMMouseScroll",Tn,{passive:!0}),zt.addEventListener("MozMousePixelScroll",Lt,{passive:!1}),function(){zt.removeEventListener("wheel",ni),zt.removeEventListener("DOMMouseScroll",Tn),zt.removeEventListener("MozMousePixelScroll",Lt)}},[ri,Pn,jn]),(0,Ee.Z)(function(){if(ie){var Lt=Wn(oi);Ci(Lt),Xt({x:Lt})}},[Ie.width,ie]);var fi=function(){var zt,Vt;(zt=Bn.current)===null||zt===void 0||zt.delayHidden(),(Vt=rn.current)===null||Vt===void 0||Vt.delayHidden()},_n=Ct(Ni,wi,Ai,Dt,Rn,function(){return gi(!0)},It,fi);ve.useImperativeHandle(Ue,function(){return{nativeElement:Ln.current,getScrollInfo:qn,scrollTo:function(zt){function Vt(Ot){return Ot&&(0,tt.Z)(Ot)==="object"&&("left"in Ot||"top"in Ot)}Vt(zt)?(zt.left!==void 0&&Ci(Wn(zt.left)),_n(zt.top)):_n(zt)}}}),(0,Ee.Z)(function(){if(Oe){var Lt=wi.slice(dn,Mt+1);Oe(Lt,wi)}},[dn,Mt,wi]);var ln=Ce(wi,Rn,Ai,Dt),Kn=_t==null?void 0:_t({start:dn,end:Mt,virtual:yi,offsetX:oi,offsetY:mt,rtl:ti,getSize:ln}),Xn=we(wi,dn,Mt,ie,oi,ki,ne,Ne),Li=null;xt&&(Li=(0,We.Z)((0,Je.Z)({},gn?"height":"maxHeight",xt),Pt),ri&&(Li.overflowY="hidden",ie&&(Li.overflowX="hidden"),un&&(Li.pointerEvents="none")));var On={};return ti&&(On.dir="rtl"),ve.createElement("div",(0,te.Z)({ref:Ln,style:(0,We.Z)((0,We.Z)({},Jt),{},{position:"relative"}),className:vi},On,jt),ve.createElement(Se.Z,{onResize:St},ve.createElement(vt,{className:"".concat(et,"-holder"),style:Li,ref:Ni,onScroll:Fn,onMouseEnter:fi},ve.createElement(Ae,{prefixCls:et,height:Kt,offsetX:oi,offsetY:mt,scrollWidth:ie,onInnerResize:gi,ref:en,innerProps:$t,rtl:ti,extra:Kn},Xn))),yi&&Kt>xt&&ve.createElement(Bt,{ref:Bn,prefixCls:et,scrollOffset:pi,scrollRange:Kt,rtl:ti,onScroll:wn,onStartMove:di,onStopMove:De,spinSize:ht,containerSize:Ie.height,style:Gt==null?void 0:Gt.verticalScrollBar,thumbStyle:Gt==null?void 0:Gt.verticalScrollBarThumb,showScrollBar:Zn}),yi&&ie>Ie.width&&ve.createElement(Bt,{ref:rn,prefixCls:et,scrollOffset:oi,scrollRange:ie,rtl:ti,onScroll:wn,onStartMove:di,onStopMove:De,spinSize:bt,containerSize:Ie.width,horizontal:!0,style:Gt==null?void 0:Gt.horizontalScrollBar,thumbStyle:Gt==null?void 0:Gt.horizontalScrollBarThumb,showScrollBar:Zn}))}var be=ve.forwardRef(Me);be.displayName="List";var Re=be,lt=Re},93314:function(Ut){"use strict";Ut.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(Ut,Qt,fe){"use strict";fe.d(Qt,{Z:function(){return Ye}});const te=Se=>typeof Se=="object"&&Se!=null&&Se.nodeType===1,tt=(Se,he)=>(!he||Se!=="hidden")&&Se!=="visible"&&Se!=="clip",We=(Se,he)=>{if(Se.clientHeight<Se.scrollHeight||Se.clientWidth<Se.scrollWidth){const Ee=getComputedStyle(Se,null);return tt(Ee.overflowY,he)||tt(Ee.overflowX,he)||(ve=>{const rt=(Ve=>{if(!Ve.ownerDocument||!Ve.ownerDocument.defaultView)return null;try{return Ve.ownerDocument.defaultView.frameElement}catch(Ae){return null}})(ve);return!!rt&&(rt.clientHeight<ve.scrollHeight||rt.clientWidth<ve.scrollWidth)})(Se)}return!1},Je=(Se,he,Ee,ve,rt,Ve,Ae,Pe)=>Ve<Se&&Ae>he||Ve>Se&&Ae<he?0:Ve<=Se&&Pe<=Ee||Ae>=he&&Pe>=Ee?Ve-Se-ve:Ae>he&&Pe<Ee||Ve<Se&&Pe>Ee?Ae-he+rt:0,pe=Se=>{const he=Se.parentElement;return he==null?Se.getRootNode().host||null:he},je=(Se,he)=>{var Ee,ve,rt,Ve;if(typeof document=="undefined")return[];const{scrollMode:Ae,block:Pe,inline:we,boundary:$e,skipOverflowHiddenElements:at}=he,ct=typeof $e=="function"?$e:Bt=>Bt!==$e;if(!te(Se))throw new TypeError("Invalid target");const ut=document.scrollingElement||document.documentElement,ze=[];let wt=Se;for(;te(wt)&&ct(wt);){if(wt=pe(wt),wt===ut){ze.push(wt);break}wt!=null&&wt===document.body&&We(wt)&&!We(document.documentElement)||wt!=null&&We(wt,at)&&ze.push(wt)}const pt=(ve=(Ee=window.visualViewport)==null?void 0:Ee.width)!=null?ve:innerWidth,sn=(Ve=(rt=window.visualViewport)==null?void 0:rt.height)!=null?Ve:innerHeight,{scrollX:Ce,scrollY:Ke}=window,{height:ot,width:_e,top:nt,right:Ze,bottom:dt,left:pn}=Se.getBoundingClientRect(),{top:Ft,right:bn,bottom:Rt,left:me}=(Bt=>{const He=window.getComputedStyle(Bt);return{top:parseFloat(He.scrollMarginTop)||0,right:parseFloat(He.scrollMarginRight)||0,bottom:parseFloat(He.scrollMarginBottom)||0,left:parseFloat(He.scrollMarginLeft)||0}})(Se);let de=Pe==="start"||Pe==="nearest"?nt-Ft:Pe==="end"?dt+Rt:nt+ot/2-Ft+Rt,Ct=we==="center"?pn+_e/2-me+bn:we==="end"?Ze+bn:pn-me;const on=[];for(let Bt=0;Bt<ze.length;Bt++){const He=ze[Bt],{height:it,width:ft,top:vn,right:Pt,bottom:Me,left:be}=He.getBoundingClientRect();if(Ae==="if-needed"&&nt>=0&&pn>=0&&dt<=sn&&Ze<=pt&&(He===ut&&!We(He)||nt>=vn&&dt<=Me&&pn>=be&&Ze<=Pt))return on;const Re=getComputedStyle(He),lt=parseInt(Re.borderLeftWidth,10),Le=parseInt(Re.borderTopWidth,10),Ue=parseInt(Re.borderRightWidth,10),Xe=parseInt(Re.borderBottomWidth,10);let et=0,gt=0;const xt="offsetWidth"in He?He.offsetWidth-He.clientWidth-lt-Ue:0,Dt="offsetHeight"in He?He.offsetHeight-He.clientHeight-Le-Xe:0,Nt="offsetWidth"in He?He.offsetWidth===0?0:ft/He.offsetWidth:0,gn="offsetHeight"in He?He.offsetHeight===0?0:it/He.offsetHeight:0;if(ut===He)et=Pe==="start"?de:Pe==="end"?de-sn:Pe==="nearest"?Je(Ke,Ke+sn,sn,Le,Xe,Ke+de,Ke+de+ot,ot):de-sn/2,gt=we==="start"?Ct:we==="center"?Ct-pt/2:we==="end"?Ct-pt:Je(Ce,Ce+pt,pt,lt,Ue,Ce+Ct,Ce+Ct+_e,_e),et=Math.max(0,et+Ke),gt=Math.max(0,gt+Ce);else{et=Pe==="start"?de-vn-Le:Pe==="end"?de-Me+Xe+Dt:Pe==="nearest"?Je(vn,Me,it,Le,Xe+Dt,de,de+ot,ot):de-(vn+it/2)+Dt/2,gt=we==="start"?Ct-be-lt:we==="center"?Ct-(be+ft/2)+xt/2:we==="end"?Ct-Pt+Ue+xt:Je(be,Pt,ft,lt,Ue+xt,Ct,Ct+_e,_e);const{scrollLeft:Jt,scrollTop:le}=He;et=gn===0?0:Math.max(0,Math.min(le+et/gn,He.scrollHeight-it/gn+Dt)),gt=Nt===0?0:Math.max(0,Math.min(Jt+gt/Nt,He.scrollWidth-ft/Nt+xt)),de+=le-et,Ct+=Jt-gt}on.push({el:He,top:et,left:gt})}return on},Fe=Se=>Se===!1?{block:"end",inline:"nearest"}:(he=>he===Object(he)&&Object.keys(he).length!==0)(Se)?Se:{block:"start",inline:"nearest"};function Ye(Se,he){if(!Se.isConnected||!(rt=>{let Ve=rt;for(;Ve&&Ve.parentNode;){if(Ve.parentNode===document)return!0;Ve=Ve.parentNode instanceof ShadowRoot?Ve.parentNode.host:Ve.parentNode}return!1})(Se))return;const Ee=(rt=>{const Ve=window.getComputedStyle(rt);return{top:parseFloat(Ve.scrollMarginTop)||0,right:parseFloat(Ve.scrollMarginRight)||0,bottom:parseFloat(Ve.scrollMarginBottom)||0,left:parseFloat(Ve.scrollMarginLeft)||0}})(Se);if((rt=>typeof rt=="object"&&typeof rt.behavior=="function")(he))return he.behavior(je(Se,he));const ve=typeof he=="boolean"||he==null?void 0:he.behavior;for(const{el:rt,top:Ve,left:Ae}of je(Se,Fe(he))){const Pe=Ve-Ee.top+Ee.bottom,we=Ae-Ee.left+Ee.right;rt.scroll({top:Pe,left:we,behavior:ve})}}}}]);