You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1106 lines
704 KiB
1106 lines
704 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[1045],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(Pt,Ot){"use strict";Ot.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},77277:function(Pt,Ot){"use strict";Ot.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Pt={},Ot="5.0",fe={},ie=null,ot=!1,Ne=!1,_e=null,me=!1,ge=null,Ae=null,Ie=0;Ie<arguments.length;Ie++){var we=arguments[Ie];if(we!==null)switch(typeof we){case"number":Ot=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ot=we:_e=we;break;case"object":typeof we.is3D!="undefined"?ie=we:fe=we;break;case"boolean":ot=we,Ne=!0;break}}ie===null&&(ie={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},fe.material_id!==void 0&&!Ne&&(ot=!0)),_e!==null&&fe.id===void 0&&(fe.id=_e);var pe="",it="",ve=!1,ht=null,Oe=null,De=null,Re=!1,Le=null,st=null,ct=null,vt=null,Ue=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var ze=function(ye){return parseFloat(ye)>4?parseFloat(ye):5};Pt.setHTML5Codebase=function(ye,Pe){Ae=ye,Be(ye,Pe)},Pt.setJavaCodebase=Pt.setJavaCodebaseVersion=Pt.isCompiledInstalled=Pt.setPreCompiledScriptPath=Pt.setPreCompiledResourcePath=function(){},Pt.setHTML5CodebaseVersion=function(ye,Pe){var Te=parseFloat(ye);if(Te!==NaN&&Te<5){console.log("The GeoGebra HTML5 codebase version "+Te+" is deprecated. Using version latest instead.");return}ge=ye,ue(ye,Pe)},Pt.getHTML5CodebaseVersion=function(){return Oe},Pt.getParameters=function(){return fe},Pt.setFontsCSSURL=function(ye){vt=ye},Pt.setGiacJSURL=function(ye){},Pt.setJNLPFile=function(ye){pe=ye},Pt.setJNLPBaseDir=function(ye){},Pt.inject=function(){function ye(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Pe="auto",Te=fe.id,bt,Ke=!1,mt=0;mt<arguments.length;mt++){var ke=arguments[mt];typeof ke=="string"?(ke=ke.toLowerCase(),ke.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Pe=ke:Te=arguments[mt]):typeof ke=="boolean"?Ke=ke:ke instanceof HTMLElement&&(bt=ke)}tt();function tt(){if(!me){setTimeout(tt,200);return}Pe=$e(Pe);var ut=bt||document.getElementById(Te);if(!ut){console.log("possibly bug on ajax loading? ");return}if(Pt.removeExistingApplet(ut,!1),fe.width===void 0&&ut.clientWidth&&(fe.width=ut.clientWidth),fe.height===void 0&&ut.clientHeight&&(fe.height=ut.clientHeight),!(fe.width&&fe.height)&&Pe==="html5"&&(delete fe.width,delete fe.height),ht=Pe,Pe==="screenshot")Ce(ut,fe);else{var ae=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?ae=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(ae=(!Qe()||ye())&&Ve()),ae?(ht="screenshot",Tt(ut,fe,Ke,Pe)):Ge(ut,fe,Ke)}}};function Qe(){try{return window.self!==window.top}catch(ye){return!0}}function Ve(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pt.getViews=function(){return ie},Pt.isJavaInstalled=function(){return!1};var It=function(ye){var Pe=function(mt){var ke=JSON.parse(mt),tt=function(te){return te.type=="G"||te.type=="E"},ut=ke.elements?ke.elements.filter(tt)[0]:ke;if(!ut||!ut.url){Te();return}fe.fileName=ut.url,Ye(ut.settings||{}),ie.is3D=!0;var ae="https://www.geogebra.org/images/";Pt.setPreviewImage(Le||ut.previewUrl,ae+"GeoGebra_loading.png",ae+"applet_play.png"),ye()},Te=function(){fe.onError&&fe.onError(),rt("Error: Fetching material (id "+fe.material_id+") failed.",fe)},bt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ke="/materials/"+fe.material_id+"?scope=basic";Ze("https://"+bt+"/api/proxy.php?path="+encodeURIComponent(Ke),Pe,Te)};function Ye(ye){var Pe=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Te){ye[Te]=!!ye[Te]}),Pe.forEach(function(Te){fe[Te]===void 0&&ye[Te]!==void 0&&(fe[Te]=ye[Te])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function Ze(ye,Pe,Te){var bt=new XMLHttpRequest;bt.open("GET",ye),bt.onload=function(){Pe(bt.responseText)},bt.onerror=Te,bt.send()}Pt.isHTML5Installed=function(){return!0},Pt.getLoadedAppletType=function(){return ht},Pt.setPreviewImage=function(ye,Pe,Te){Le=ye,st=Pe,ct=Te},Pt.removeExistingApplet=function(ye,Pe){var Te;typeof ye=="string"&&(ye=document.getElementById(ye)),ht=null;var bt=null;for(Te=0;Te<ye.childNodes.length;Te++){var Ke=ye.childNodes[Te],mt=Ke.className;mt==="applet_screenshot"?Pe?(Ke.style.display="block",ht="screenshot"):Ke.style.display="none":mt!=="applet_scaler prerender"&&(ye.removeChild(Ke),bt=mt&&mt.indexOf("appletParameters")!=-1?Ke.id:null,Te--)}var ke=fe.id!==void 0?fe.id:bt,tt=window[ke];tt&&typeof tt.getBase64=="function"&&(tt.remove(),window[ke]=null)},Pt.refreshHitPoints=function(){if(ze(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ye=Pt.getAppletObject();return ye&&typeof ye.recalculateEnvironments=="function"?(ye.recalculateEnvironments(),!0):!1},Pt.startAnimation=function(){var ye=Pt.getAppletObject();return ye&&typeof ye.startAnimation=="function"?(ye.startAnimation(),!0):!1},Pt.stopAnimation=function(){var ye=Pt.getAppletObject();return ye&&typeof ye.stopAnimation=="function"?(ye.stopAnimation(),!0):!1},Pt.getAppletObject=function(){var ye=fe.id!==void 0?fe.id:"ggbApplet";return window[ye]},Pt.resize=function(){};var at=function(ye,Pe,Te){var bt=document.createElement("param");bt.setAttribute("name",Pe),bt.setAttribute("value",Te),ye.appendChild(bt)},Me=function(ye){return ye&&ye!=="false"},Ge=function(ye,Pe,Te){ze(Oe)<=4.2&&(Te=!0);var bt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Oe||ggbHTML5LoadedCodebaseIsWebSimple&&!Re)&&(bt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ke=document.createElement("div");Ke.classList.add("appletParameters","notranslate");var mt=Pe.width,ke=Pe.height;if(Pe.disableAutoScale=Pe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Pe.disableAutoScale,Pe.width!==void 0)if(ze(Oe)<=4.4)Me(Pe.showToolBar)&&(Pe.height-=7),Me(Pe.showAlgebraInput)&&(Pe.height-=37),Pe.width<605&&Me(Pe.showToolBar)&&(Pe.width=605,mt=605);else{var tt=100;(Me(Pe.showToolBar)||Me(Pe.showMenuBar))&&(Pe.hasOwnProperty("customToolBar")&&(Pe.customToolbar=Pe.customToolBar),tt=Me(Pe.showMenuBar)?245:155),mt<tt&&(Pe.width=tt,mt=tt)}Ke.style.border="none",Ke.style.display="inline-block";for(var ut in Pe)Pe.hasOwnProperty(ut)&&ut!=="appletOnLoad"&&Ke.setAttribute("data-param-"+ut,Pe[ut]);vt&&Ke.setAttribute("data-param-fontscssurl",vt),Pt.resize=function(){GGBAppletUtils.responsiveResize(ye,Pe)},window.addEventListener("resize",function(jt){Pt.resize()});var ae=typeof Pe.appletOnLoad=="function"?Pe.appletOnLoad:function(){};if(!Te&&Pe.width!==void 0){Pe.hasOwnProperty("showSplash")||Ke.setAttribute("data-param-showSplash","false");var te=ye.querySelector(".applet_scaler.prerender"),z=te!==null;if(z)var re=te.querySelector(".ggb_preview");else{var re=lt(mt,ke,Pe.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=mt+"px",te.style.height=ke+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),ze(Oe)>=5?(Pe.appletOnLoad=function(jt){var zt=ye.querySelector(".ggb_preview");zt&&zt.parentNode.removeChild(zt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),ae(jt)},z||te.appendChild(re)):Ke.appendChild(re),te.appendChild(Ke),z||ye.appendChild(te),setTimeout(function(){Pt.resize()},1)}else{var le=document.createElement("div");le.className="applet_scaler",le.style.position="relative",le.style.display="block",le.appendChild(Ke),ye.appendChild(le),Pe.appletOnLoad=function(jt){Pt.resize(),ae(jt)}}function ne(jt,zt){zt&&typeof zt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(jt,zt.appletOnLoad):renderGGBElement(jt),rt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",zt)}function be(jt,zt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:jt,params:zt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(en){ne(en.article,en.params)}),html5AppletsToProcess=null)},ze(Oe)<5&&(jt.className+=" geogebraweb")):ne(jt,zt)}if(bt){scriptLoadStarted=!0;for(var je=0;je<Ke.childNodes.length;je++){var Mt=Ke.childNodes[je].tagName;Mt==="TABLE"&&(Ke.removeChild(Ke.childNodes[je]),je--)}if(ggbHTML5LoadedScript!==null){var St=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');St!=null&&St.parentNode.removeChild(St)}var wt=document.createElement("script"),Dt=function(){be(Ke,Pe)};wt.src=it+De,ggbHTML5LoadedCodebaseIsWebSimple=Re,ggbHTML5LoadedCodebaseVersion=Oe,ggbHTML5LoadedScript=wt.src,rt("GeoGebra HTML5 codebase loaded: '"+it+"'.",Pe),!Ae&&(!ge||ge=="5.0")?(Re?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Dt()):it.requirejs?__webpack_require__.e(981).then(function(){var jt=[__webpack_require__(60981)];Dt.apply(null,jt)}.bind(this)).catch(__webpack_require__.oe):(wt.onload=Dt,ye.appendChild(wt))}else be(Ke,Pe);Pe.height=ke,Pe.width=mt},Ce=function(ye,Pe,Te){var bt=lt(Pe.width,Pe.height,Pe.borderColor,Te),Ke=document.createElement("div");Ke.style.position="relative",Ke.style.display="block",Ke.style.width=Pe.width+"px",Ke.style.height=Pe.height+"px",Ke.className="applet_screenshot applet_scaler"+(Te?" applet_screenshot_play":""),Ke.appendChild(bt);var mt=GGBAppletUtils.getScale(Pe,ye,Te);Te?(ye.appendChild(yt()),window.GGBT_wsf_view||(ye.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ke,"66%"),ye.appendChild(Ke),mt!==1&&!isNaN(mt)&&(GGBAppletUtils.scaleElement(Ke,mt),Ke.style.width=Pe.width+"px",Ke.style.height=Pe.height+"px",Ke.parentNode.style.width=Pe.width*mt+"px",Ke.parentNode.style.height=Pe.height*mt+"px"),Pt.resize=function(){He(ye,bt,Ke,Te)},window.addEventListener("resize",function(ke){Pt.resize()}),Pt.resize()};function He(ye,Pe,Te,bt){if(ye.contains(Pe)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ye.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ye)}var Ke=GGBAppletUtils.getScale(fe,ye,bt);Te.parentNode!==null&&(!isNaN(Ke)&&Ke!==1?(GGBAppletUtils.scaleElement(Te,Ke),Te.parentNode.style.width=fe.width*Ke+"px",Te.parentNode.style.height=fe.height*Ke+"px"):(GGBAppletUtils.scaleElement(Te,1),Te.parentNode.style.width=fe.width+"px",Te.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ye),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pt.onExitFullscreen=function(ye,Pe){Pe.appendChild(ye)};var Tt=function(ye,Pe,Te,bt){Ce(ye,Pe,!0);for(var Ke=function(){var tt=[];for(ke=0;ke<ye.childNodes.length;ke++)tt.push(ye.childNodes[ke]);if(window.GGBT_wsf_view){var ut=window.GGBT_wsf_view.renderFullScreen(ye,Pe.id),ae=document.getElementById("fullscreencontainer"),te=jQuery(ye).find(".fullscreencontent");te.length>0?(ut.remove(),te.attr("id","fullscreencontent").show(),jQuery(ae).append(te),window.dispatchEvent(new Event("resize"))):Ge(ut,Pe,!1),window.GGBT_wsf_view.launchFullScreen(ae)}else ht=bt,Ge(ye,Pe,!1);if(!window.GGBT_wsf_view)for(ke=0;ke<tt.length;ke++)ye.removeChild(tt[ke])},mt=ye.getElementsByClassName("ggb_preview_play"),ke=0;ke<mt.length;ke++)mt[ke].addEventListener("click",Ke,!1),mt[ke].addEventListener("ontouchstart",Ke,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ye),Ve()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},yt=function(){var ye=document.createElement("div");if(ye.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Pe='.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");}',Te=document.createElement("style");Te.styleSheet?Te.styleSheet.cssText=Pe:Te.appendChild(document.createTextNode(Pe)),document.getElementsByTagName("head")[0].appendChild(Te)}return ye},lt=function(ye,Pe,Te,bt){var Ke=document.createElement("div");Ke.className="ggb_preview",Ke.style.position="absolute",Ke.style.zIndex="90",Ke.style.width=ye-2+"px",Ke.style.height=Pe-2+"px",Ke.style.top="0px",Ke.style.left="0px",Ke.style.overflow="hidden",Ke.style.backgroundColor="white";var mt="lightgrey";Te!==void 0&&(Te==="none"?mt="transparent":mt=Te),Ke.style.border="1px solid "+mt;var ke=document.createElement("img");if(ke.style.position="relative",ke.style.zIndex="1000",ke.style.top="-1px",ke.style.left="-1px",Le!==null&&ke.setAttribute("src",Le),ke.style.opacity=.7,st!==null){var tt,ut,ae;if(!bt){tt=document.createElement("img"),tt.style.position="absolute",tt.style.zIndex="1001",tt.style.opacity=1,ke.style.opacity=.3,ut=360,ut>ye/4*3&&(ut=ye/4*3),ae=ut/5.8,tt.setAttribute("src",st),tt.setAttribute("width",ut),tt.setAttribute("height",ae);var te=(ye-ut)/2,z=(Pe-ae)/2;tt.style.left=te+"px",tt.style.top=z+"px",Ke.appendChild(tt)}}return Ke.appendChild(ke),Ke},$e=function(ye){return ye=ye.toLowerCase(),ye==="html5"||ye==="screenshot"?ye:"html5"},he=["web","webSimple","web3d","tablet","tablet3d","phone"],ue=function(ye,Pe){if(Oe=ye,Pe){Be(Oe,!0);return}var Te=!ot;if(Te){var bt=ze(Oe);!isNaN(bt)&&bt<4.4&&(Te=!1)}var Ke,mt;window.location.protocol.substr(0,4)==="http"?Ke=window.location.protocol:Ke="http:";var ke=Oe.indexOf("//");ke>0?mt=Oe:ke===0?mt=Ke+Oe:mt="https://www.geogebra.org/apps/5.2.814.0/";for(var tt in he)if(Oe.slice(he[tt].length*-1)===he[tt]||Oe.slice((he[tt].length+1)*-1)===he[tt]+"/"){Be(mt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Te&&!ie.is3D&&!ie.AV&&!ie.SV&&!ie.CV&&!ie.EV2&&!ie.CP&&!ie.PC&&!ie.DA&&!ie.FI&&!ie.PV&&!Me(fe.showToolBar)&&!Me(fe.showMenuBar)&&!Me(fe.showAlgebraInput)&&!Me(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?mt+="webSimple/":mt+="web3d/",Be(mt,!1)},Be=function(ye,Pe){if(ye.requirejs){it=ye;return}ye.slice(-1)!=="/"&&(ye+="/"),it=ye,Pe===null&&(Pe=ye.indexOf("http")===-1),ve=Pe,De="web.nocache.js",Re=!1;var Te=it.split("/");Te.length>1&&(!Pe&&Te[Te.length-2]==="webSimple"?(De="webSimple.nocache.js",Re=!0):he.indexOf(Te[Te.length-2])>=0&&(De=Te[Te.length-2]+".nocache.js")),Te=ye.split("/"),Oe=Te[Te.length-3],Oe.substr(0,4)==="test"?Oe=Oe.substr(4,1)+"."+Oe.substr(5,1):(Oe.substr(0,3)==="war"||Oe.substr(0,4)==="beta")&&(Oe="5.0");var bt=parseFloat(Oe);bt!==NaN&&bt<5&&ye.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+bt+" is deprecated. Using version latest instead."),ue("5.0",Pe))},rt=function(ye,Pe){window.console&&window.console.log&&(!Pe||typeof Pe.showLogging=="undefined"||Pe.showLogging&&Pe.showLogging!=="false")&&console.log(ye)};fe.material_id!==void 0?It(qe):qe();function qe(){var ye=Ot;ge!==null?ye=ge:parseFloat(ye)<5&&(ye="5.0"),ue(ye,!1),Ae!==null&&Be(Ae,ve),me=!0}return Pt},GGBAppletUtils=function(){"use strict";function Pt(){return window.GGBT_wsf_edit!==void 0}function Ot(me,ge){ge!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+ge+","+ge+")",me.style.webkitTransform="scale("+ge+","+ge+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function fe(me,ge,Ae,Ie,we,pe){var it=null;if(pe!=null&&pe!="")for(var ve=me.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+pe+" ")>-1){it=ve;break}else ve=ve.parentNode;var ht=0,Oe=0,De=0,Re=0,Le=0,st=0,ct=0;if(it)ht=it.offsetWidth,Oe=Math.max(Ie?it.offsetWidth:0,it.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(ht=Math.min(window.innerWidth,document.documentElement.clientWidth),Oe=Math.min(window.innerHeight,document.documentElement.clientHeight),De=ht):(ht=window.innerWidth,Oe=window.innerHeight,De=window.innerWidth),me){var vt=me.getBoundingClientRect();vt.left>0&&vt.left<=ht&&(we===void 0||!we)&&(document.dir==="rtl"?(Le=ht-vt.width-vt.left,st=De<=480?10:30):(st=vt.left,Le=De<=480?10:30),Re=st+Le)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ue=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Re=40,ct=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Re=0,ct=40)}}return me&&((Ae===void 0||!Ae)&&ge>0&&ge+Re<ht?ht=ge:ht-=Re,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ae===void 0||!Ae)&&(Oe-=ct)),{width:ht,height:Oe}}function ie(me,ge,Ae,Ie,we){if(me.isScreenshoGenerator)return 1;var pe=Ie!==void 0&&Ie,it=me.noScaleMargin!=null&&me.noScaleMargin,ve=function(Ue){return Ue&&Ue!=="false"},ht=ve(me.autoHeight),Oe=fe(ge,me.width,Ae,ht,pe&&window.GGBT_wsf_view||it,we),De=parseInt(Oe.width),Re=me.width,Le=me.height;if(Re===void 0){var st=ge.querySelector(".appletParameters");st&&(Re=st.offsetWidth,Le=st.offsetHeight)}var ct=De/Re,vt=pe?1:Oe.height/Le;return Ae!==void 0&&!Ae&&(ct=Math.min(1,ct),vt=Math.min(1,vt)),Math.min(ct,vt)}function ot(me,ge,Ae){var Ie=1,we,pe=!1;if(me.hasOwnProperty("allowUpscale")&&(pe=me.allowUpscale),me.hasOwnProperty("scale")&&(Ie=parseFloat(me.scale),(isNaN(Ie)||Ie===null||Ie===0)&&(Ie=1),Ie>1&&(pe=!0)),ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))we=ie(me,ge,pe,Ae,me.scaleContainerClass);else return Ie;return pe&&(!me.hasOwnProperty("scale")||Ie===1)?we:Math.min(Ie,we)}function Ne(me){var ge=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=me.getBoundingClientRect(),we=(ge-Ie.width)/2,pe=(Ae-Ie.height)/2;pe<0&&(pe=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?me.style.left="40px":me.style.left=we+"px",me.style.top=pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(pe<40?me.style.top="40px":me.style.top=pe+"px",me.style.left=we+"px")}function _e(me,ge){var Ae=me.querySelector(".appletParameters");if(Ae){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ge.id!==Ae.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Ae.parentElement&&/fullscreen/.test(Ae.parentElement.className))return;var Ie=ot(ge,me);Pt()&&Ae.setAttribute("data-param-scale",Ie);for(var we=null,pe=0;pe<me.childNodes.length;pe++)if(me.childNodes[pe].className!==void 0&&me.childNodes[pe].className.match(/^applet_scaler/)){we=me.childNodes[pe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var it=ge.id!==void 0?ge.id:"ggbApplet",ve=window[it];(ve==null||!ve.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Ie)&&Ie!==1?(we.parentNode.style.width=ge.width*Ie+"px",we.parentNode.style.height=ge.height*Ie+"px",Ot(we,Ie)):(Ot(we,1),we.parentNode.style.width=ge.width+"px",we.parentNode.style.height=ge.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ne(me),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ae).parents(".content-added-content"))}}return{responsiveResize:_e,isFlexibleWorksheetEditor:Pt,positionCenter:Ne,getScale:ot,scaleElement:Ot}}();__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 Pt=n.location.search;return Pt.indexOf(J)!=-1||Pt.indexOf(K)!=-1}function q(Pt,Ot){}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(Pt){var Ot=s[L].bindings;s[L].bindings=function(){for(var fe=Ot?Ot():{},ie=Pt[webModule.__softPermutationId],ot=O;ot<ie.length;ot++){var Ne=ie[ot];fe[Ne[O]]=Ne[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var Pt=o.createElement(Q);if(Pt.id=L,Pt.style.cssText=R+S,Pt.tabIndex=-1,o.body.appendChild(Pt),t=Pt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ot=document.compatMode==U?V:W;t.write(Ot+X),t.close()}}}function w(Pt){function Ot(ie){function ot(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ne=ot();if(Ne){ie();return}function _e(){if(!Ne){if(!ot())return;Ne=!0,ie(),o.removeEventListener&&o.removeEventListener(Z,_e,!1),me&&clearInterval(me)}}o.addEventListener&&o.addEventListener(Z,_e,!1);var me=setInterval(function(){_e()},$)}function fe(ie){var ot=u(),Ne=ot.body,_e=ot.createElement(_);_e.language=ab,_e.crossOrigin=W,_e.src=ie,webModule.__errFn&&(_e.onerror=function(){webModule.__errFn(L,new Error(bb+ie))}),Ne.appendChild(_e)}Ot(function(){fe(Pt)})}webModule.__startLoadingFragment=function(Pt){return C(Pt)},webModule.__installRunAsyncCode=function(Pt){var Ot=u(),fe=Ot.body,ie=Ot.createElement(_);ie.language=ab,ie.text=Pt,fe.appendChild(ie),fe.removeChild(ie)};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(Pt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pt){var Ot=c[Pt];return Ot==null?null:Ot},r=d,webModule.__errFn=e}function B(){function Pt(me){var ge=me.lastIndexOf(rb);ge==-1&&(ge=me.length);var Ae=me.indexOf(sb);Ae==-1&&(Ae=me.length);var Ie=me.lastIndexOf(tb,Math.min(Ae,ge));return Ie>=O?me.substring(O,Ie+P):W}function Ot(me){if(!me.match(/^\w+:\/\//)){var ge=o.createElement(ub);ge.src=me+vb,me=Pt(ge.src)}return me}function fe(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function ie(){for(var me=o.getElementsByTagName(_),ge=O;ge<me.length;++ge)if(me[ge].src.indexOf(xb)!=-1)return Pt(me[ge].src);return W}function ot(){var me=o.getElementsByTagName(yb);return me.length>O?me[me.length-P].href:W}function Ne(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var _e=fe();return _e==W&&(_e=ie()),_e==W&&(_e=ot()),_e==W&&Ne()&&(_e=Pt(o.location.href)),_e=Ot(_e),_e}function C(Pt){return Pt.match(/^\//)||Pt.match(/^[a-zA-Z]+:\/\//)?Pt:webModule.__moduleBase+Pt}function D(){var Pt=[],Ot=O,fe=[],ie=[];function ot(me){var ge=ie[me](),Ae=fe[me];if(ge in Ae)return ge;var Ie=[];for(var we in Ae)Ie[Ae[we]]=we;throw r&&r(me,Ie,ge),null}if(__gwt_isKnownPropertyValue=function(me,ge){return ge in fe[me]},webModule.__getPropMap=function(){var me={};for(var ge in fe)fe.hasOwnProperty(ge)&&(me[ge]=ot(ge));return me},webModule.__computePropValue=ot,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ne;try{Ne=Cb;var _e=Ne.indexOf(Db);_e!=-1&&(Ot=parseInt(Ne.substring(_e+P),$),Ne=Ne.substring(O,_e))}catch(me){}return webModule.__softPermutationId=Ot,C(Ne+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},67303:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Ax:function(){return _e},Ds:function(){return me},KI:function(){return Ae},SI:function(){return Ne},f1:function(){return ot}});var ie=fe(90524);function ot(Ie){let we=!0;if(Ie.length>0){for(let pe=0;pe<Ie.length;pe++)if(Ie[pe].compile_success==0||!Ie[pe].compile_success){we=!1;break}}else we=!1;return we}function Ne(Ie,we=""){let pe=[];for(let it=0;it<Ie.length;it++){let ve=Ie[it],ht=we?`${we}/${ve.name}`:`${ve.name}`;pe.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:ht})}return pe}function _e(Ie,we,pe){for(let it=0;it<Ie.length;it++){let ve=Ie[it];if(ve.key===we){ve.children=pe;break}ve.children&&_e(ve.children,we,pe)}return Ie}function me(Ie,we,pe){let it;return function(){let ve=this,ht=arguments,Oe=function(){it=null,pe||Ie.apply(ve,ht)},De=pe&&!it;clearTimeout(it),it=setTimeout(Oe,we),De&&Ie.apply(ve,ht)}}const ge=!0,Ae=ie.Z.API_SERVER},6077:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return it}});var ie=fe(59301),ot={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ne=fe(92310),_e=fe.n(Ne),me=fe(29787),ge=fe(2859),Ae=fe(82093),Ie=fe(49661),we=(ve,ht,Oe)=>new Promise((De,Re)=>{var Le=vt=>{try{ct(Oe.next(vt))}catch(Ue){Re(Ue)}},st=vt=>{try{ct(Oe.throw(vt))}catch(Ue){Re(Ue)}},ct=vt=>vt.done?De(vt.value):Promise.resolve(vt.value).then(Le,st);ct((Oe=Oe.apply(ve,ht)).next())}),it=({data:ve,className:ht,fullWidth:Oe,style:De={},onClose:Re,onOk:Le,showFullTools:st,noAssociationId:ct})=>{const vt=(0,ie.useRef)(null),Ue=(0,ie.useRef)(null),ze=(0,ie.useRef)(null),Qe=(0,ie.useRef)(null),[Ve,It]=(0,ie.useState)(!1),[Ye,Ze]=(0,ie.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ie.useEffect)(()=>(ze.current||(ze.current=document.createElement("style"),document.head.appendChild(ze.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),ze.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&at()):(document.body.removeAttribute("data-custom"),ze.current&&(document.head.removeChild(ze.current),ze.current=null)),()=>{document.body.removeAttribute("data-custom"),ze.current&&(document.head.removeChild(ze.current),ze.current=null)}),[ve==null?void 0:ve.visible]);const at=()=>we(void 0,null,function*(){It(!0),Ze("\u6B63\u5728\u52A0\u8F7D\u4E2D");const He=yield(0,Ie.ZJ)(ve==null?void 0:ve.src);vt.current.src="",vt.current.src=He,vt.current.onload=function(){Ce()},It(!1),Ze("")}),Me=He=>we(void 0,null,function*(){It(!0),Ze("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Tt=yield(0,Ae.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:He.dataUrl}});Tt!=null&&Tt.id&&!ct?(yield(0,Ae.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:Tt==null?void 0:Tt.id,settings:JSON.stringify(He.state)}})).status===0&&Le():Tt!=null&&Tt.id&&Le(Tt),It(!1),Ze("")}),Ge=()=>{const He=document.querySelector('a[href="https://markerjs.com/"]');He&&He.parentNode&&(He.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(yt=>{const lt=document.querySelector(yt.name);lt&<.setAttribute("title",yt.title)})},Ce=()=>{Ue.current=new ge.hP(vt.current),Ue.current.targetRoot=Qe.current,Ue.current.addEventListener("render",Me),Ue.current.addEventListener("beforeclose",Re),st&&(Ue.current.availableMarkerTypes=Ue.current.ALL_MARKER_TYPES,Ue.current.uiStyleSettings.redoButtonVisible=!0,Ue.current.uiStyleSettings.notesButtonVisible=!0,Ue.current.uiStyleSettings.zoomButtonVisible=!0,Ue.current.uiStyleSettings.zoomOutButtonVisible=!0,Ue.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ue.current.uiStyleSettings,Ue.current.show(),ve!=null&&ve.snapshotData&&Ue.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ge()},300)};return ie.createElement(ie.Fragment,null,(ve==null?void 0:ve.visible)&&ie.createElement(me.Z,{spinning:Ve,tip:Ye,style:{position:"absolute",width:"100vw"}},ie.createElement("div",{ref:Qe,className:_e()(ot.imageDimensions,ht,Oe?ot.fullWidth:""),style:De},ie.createElement("img",{className:ot.img,ref:vt}))))}},88615:function(Pt,Ot,fe){"use strict";var ie=fe(59301),ot=fe(77019),Ne=fe(5269),_e=fe(20554),me=fe(99571),ge=fe(38394),Ae=fe(21697),Ie=fe(48136),we=fe(59301);const pe=(0,ie.forwardRef)(({callback:it,showSaveButton:ve,value:ht=""},Oe)=>{const De=(0,ie.useRef)(),Re=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],Le=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],st=Ue=>{De.current.setValue(De.current.getValue()+" "+Ue.value+" ")},ct=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(ot.Z,{className:Ae.Z.lists,gutter:[10,10]},Re.map((Ue,ze)=>we.createElement(Ne.Z,{flex:"110px",className:Ae.Z.item},we.createElement("div",null,we.createElement(ge.Z,{value:`$$${Ue.value}$$`}),Ue.name),we.createElement("div",{className:Ae.Z.children},Ue.children.map((Qe,Ve)=>we.createElement("div",{key:Ve},we.createElement("h1",null,Qe.name),we.createElement(ot.Z,{gutter:[10,10]},Qe.data.map((It,Ye)=>we.createElement(Ne.Z,{key:Ye,onClick:()=>st(It),className:Ae.Z.diamond},we.createElement(ge.Z,{value:"`$$"+It.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(ot.Z,{className:Ae.Z.lists,gutter:[10,10]},Le.map((Ue,ze)=>we.createElement(Ne.Z,{flex:"110px",className:Ae.Z.item},we.createElement("div",null,we.createElement(ge.Z,{value:"`$$"+Ue.value+"$$`"}),Ue.name),we.createElement("div",{className:Ae.Z.children},Ue.children.map((Qe,Ve)=>we.createElement("div",{key:Ve},Qe.name&&we.createElement("h1",null,Qe.name),we.createElement(ot.Z,{gutter:[10,10]},Qe.data.map((It,Ye)=>we.createElement(Ne.Z,{key:Ye,onClick:()=>st(It),className:Ae.Z.diamond},we.createElement(ge.Z,{value:"`$$"+It.value+"$$`"}))))))))))}],vt=()=>{var Ue=document.createElement("div");Ue.innerHTML=De.current.getValue();var ze=Ue.innerText;return it&&it(ze),ze};return(0,ie.useImperativeHandle)(Oe,()=>({getData:vt})),we.createElement("div",{className:Ae.Z.mathWrap},we.createElement(_e.default,{defaultActiveKey:"1",items:ct}),we.createElement("math-field",{locale:"zh_cn",className:Ae.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:De,style:{width:800,marginTop:30,fontSize:18}},ht||""),ve&&we.createElement("div",{className:Ae.Z.button},we.createElement(me.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ot.Z=pe},57884:function(Pt,Ot,fe){"use strict";var ie=fe(59301),ot=fe(93314),Ne=fe(99571),_e=Object.defineProperty,me=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,pe=(Oe,De,Re)=>De in Oe?_e(Oe,De,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Oe[De]=Re,it=(Oe,De)=>{for(var Re in De||(De={}))Ie.call(De,Re)&&pe(Oe,Re,De[Re]);if(Ae)for(var Re of Ae(De))we.call(De,Re)&&pe(Oe,Re,De[Re]);return Oe},ve=(Oe,De)=>me(Oe,ge(De));const ht=({img:Oe,buttonProps:De={},styles:Re={},customText:Le,ButtonText:st,ButtonClick:ct,Buttonclass:vt,ButtonTwo:Ue,imgStyles:ze,loading:Qe=!1,className:Ve=""})=>ie.createElement("section",{className:`tc animated fadeIn ${Ve}`,style:it({color:"#999",margin:"100px auto",visibility:Qe?"hidden":"visible"},Re)},ie.createElement("img",{src:Oe||ot,style:ve(it({},ze),{pointerEvents:"none",userSelect:"none"})}),ie.createElement("p",{className:"mt20 font14"},Le||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),st&&ie.createElement(Ne.ZP,it({className:vt,onClick:ct},De),st),Ue&&Ue);Ot.Z=ht},41550:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return vt}});var ie=fe(59301),ot={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ne=fe(99571),_e=fe(70557),me=fe(51124),ge=fe(25399),Ae=fe(49661),Ie=fe(72664),we=fe(57884),pe=fe(90524),it=fe(14794),ve=fe(59301),ht=Object.defineProperty,Oe=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Le=(Ue,ze,Qe)=>ze in Ue?ht(Ue,ze,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Ue[ze]=Qe,st=(Ue,ze)=>{for(var Qe in ze||(ze={}))De.call(ze,Qe)&&Le(Ue,Qe,ze[Qe]);if(Oe)for(var Qe of Oe(ze))Re.call(ze,Qe)&&Le(Ue,Qe,ze[Qe]);return Ue},ct=(Ue,ze,Qe)=>new Promise((Ve,It)=>{var Ye=Me=>{try{at(Qe.next(Me))}catch(Ge){It(Ge)}},Ze=Me=>{try{at(Qe.throw(Me))}catch(Ge){It(Ge)}},at=Me=>Me.done?Ve(Me.value):Promise.resolve(Me.value).then(Ye,Ze);at((Qe=Qe.apply(Ue,ze)).next())}),vt=({editOffice:Ue="view",data:ze,issaver:Qe,onSaver:Ve,theme:It,type:Ye,filename:Ze,monacoEditor:at,className:Me,style:Ge,close:Ce,onClose:He,hasMask:Tt,disabledDownload:yt,onImgDimensions:lt,showNodata:$e,recordInfo:he})=>{const[ue,Be]=(0,ie.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[rt,qe]=(0,ie.useState)(""),[ye,Pe]=(0,ie.useState)(),Te=window.ENV==="build"?"/react/build":"",bt=location.host.startsWith("localhost")?pe.Z.PROXY_SERVER:pe.Z.API_SERVER,mt=10*(1024*1024),ke=(0,ie.useRef)();ze!=null&&ze.startsWith("/api")&&Ye!=="txt"&&(ze=pe.Z.API_SERVER+ze);const tt=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();Ze&&at&&(at.filename=Ze),(0,ie.useEffect)(()=>{var re,le;const ne=(le=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:le.split(";");ne==null||ne.map(be=>{let je=be.split("=");je[0]==="_educoder_session"&&qe(je[1])})},[]),(0,ie.useEffect)(()=>{Ye==="office"&&(ze.indexOf("bigfilescdn.")>-1||ze.indexOf("bigfiles1")>-1?Pe({url:ze,fileType:tt(ze),model:ze.indexOf("model=edit")?"edit":"view"}):ae())},[Ye,ze]);function ut(re){return ct(this,null,function*(){re.data.type==="pdfdata"&&(Ve(re.data.data),window.removeEventListener("message",ut,!1)),console.log("mess---:",re.data)})}const ae=()=>ct(void 0,null,function*(){console.log("data:",ze);let re=ze;ze.startsWith("http")||(re=location.origin+re);let le=new URL(re).pathname.split("/").pop();const ne=yield(0,Ie.gJ)({attachment_id:le});ne.url=bt+ne.url,Pe(ne)}),te=()=>{if(ze.startsWith("http")||ze.startsWith("blob:")){z();return}(0,Ae.Sv)(Ze||"educoder",ze,Ze)},z=()=>{he&&(0,it.fc)({id:he==null?void 0:he.id,watch_type:1,course_id:he==null?void 0:he.course_id}),(0,Ae.Nd)(Ze||"educoder",decodeURIComponent(ze))};return ve.createElement("div",{style:st({},Ge||{}),className:`${Tt&&ot.bgBlack} ${Ye?ot.wrp:"hide"}`},Ce&&ve.createElement("div",{className:ot.close,ref:ke},!!lt&&ve.createElement(ge.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ke.current},ve.createElement("span",{onClick:()=>{He(),lt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!yt&&ve.createElement(ge.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ke.current},ve.createElement("span",{onClick:z},ve.createElement("i",{className:"icon-quxiaozhiding"}))),Qe&&ve.createElement(ge.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ke.current},ve.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",ut,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(ge.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ke.current},ve.createElement("span",{className:"",onClick:()=>{He()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${ot[Me]} ${Me} ${ot.monaco} ${Ye==="txt"?"show":"hide"}`},Ye==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(me.ZP,st({},at)))),Ye==="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}),Ye==="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})),Ye==="office"&&ye&&ve.createElement("iframe",{src:`${Te}/office.html?key=${ye.key}&url=${btoa(ye.url)}&callbackUrl=${bt+(ye.callbackUrl||"")}&fileType=${ye.fileType}&title=${ye.title||""}&model=${Ue}&officeServer=${pe.Z.ONLYOFFICE}&disabledDownload=${!!yt}`}),Ye==="html"&&ve.createElement("iframe",{src:ze+"&disposition=inline"}),Ye==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${Te}/js/pdfview/index.html?filename=${Ze||"educoder.pdf"}&url=${encodeURIComponent(ze)}&disabledDownload=${!!yt}&model=${Ue}`}),Ye==="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}`}),(Ye==="other"||Ye==="download")&&ve.createElement(ve.Fragment,null,$e?ve.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Ne.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:yt},"\u4E0B\u8F7D")}):ve.createElement(Ne.ZP,{type:"primary",size:"middle",onClick:te,disabled:yt},ve.createElement(_e.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ye==="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"})))}},38394:function(Pt,Ot,fe){"use strict";fe.d(Ot,{z:function(){return at},Z:function(){return Me}});var ie=fe(59301),ot=fe(88831),Ne=fe(90290),_e=fe(64018),me=fe(81098),ge=fe(90524),Ae=fe(49661),Ie=fe(15342),we=fe(77736),pe=fe(99571),it=fe(1012),ve=fe(41550),ht=fe(59301),De=({html:Ge})=>{const Ce=(0,ie.useRef)(null),He=(0,ie.useRef)(null),Tt=`.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,ie.useEffect)(()=>{const yt=Ce.current.attachShadow({mode:"open"});He.current=document.createElement("div"),He.current.className="markdown-body",He.current.innerHTML=Ge,yt.appendChild(He.current);const lt=document.createElement("style");return lt.textContent=Tt,yt.appendChild(lt),()=>{yt.innerHTML=""}},[]),(0,ie.useEffect)(()=>{He.current&&(He.current.innerHTML=Ge)},[Ge]),ht.createElement("div",{ref:Ce})};function Re(Ge){const Ce=["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"],He=new RegExp(`\\b(${Ce.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ge.replace(He,"").trim()}var Le={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},st=Object.defineProperty,ct=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,ze=(Ge,Ce,He)=>Ce in Ge?st(Ge,Ce,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ge[Ce]=He,Qe=(Ge,Ce)=>{for(var He in Ce||(Ce={}))vt.call(Ce,He)&&ze(Ge,He,Ce[He]);if(ct)for(var He of ct(Ce))Ue.call(Ce,He)&&ze(Ge,He,Ce[He]);return Ge};const Ve="@\u2581\u2581@",It="@\u2581@",Ye=/<pre[^>]*>/g;function Ze(Ge){let Ce=document.createElement("div");return Ce.innerHTML=Ge,Ce.childNodes.length===0?"":Ce.childNodes[0].nodeValue}const at=(Ge,Ce)=>{Ge=Ge||"";const He=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Tt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,yt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,lt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ce?Ge.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(He,($e,he,ue,Be,rt,qe,ye)=>{const Pe=he||Be||qe,Te=ue||rt||ye||"?";return ge.Z.API_SERVER+"/api/attachments/"+Pe+Te+"&t="+(0,Ae.Jn)(Pe,Date.now())+($e.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ge=Ge.replace(lt,($e,he,ue,Be,rt,qe,ye)=>{const Pe=he||Be||qe,Te=ue||rt||ye||"?";return ge.Z.API_SERVER+"/attachments/download/"+Pe+Te+"&t="+(0,Ae.Jn)(Pe,Date.now())+($e.indexOf(")")>-1?")":"&")}).replace(He,($e,he,ue,Be,rt,qe,ye)=>{const Pe=he||Be||qe,Te=ue||rt||ye||"?";return ge.Z.API_SERVER+"/api/attachments/"+Pe+Te+"&t="+(0,Ae.Jn)(Pe,Date.now())+($e.indexOf(")")>-1?")":"&")}).replace(Tt,($e,he,ue,Be,rt)=>{const qe=he||Be,ye=ue||rt||"";return'"'+ge.Z.API_SERVER+"/api/attachments/"+qe+ye+qe+ye+"&t="+(0,Ae.Jn)(qe,Date.now())}).replace(yt,($e,he,ue,Be,rt)=>{const qe=he||Be,ye=ue||rt||"";return"("+ge.Z.API_SERVER+"/files/uploads/"+qe+ye+qe+ye+"&t="+(0,Ae.Jn)(qe,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,`
|
|
`),Ge)};var Me=({value:Ge="",edit:Ce=!1,className:He,showTextOnly:Tt,showLines:yt,style:lt={},stylesPrev:$e={},highlightKeywords:he,showProgramFill:ue,isProgramFill:Be,disabledFill:rt=!1,programFillValue:qe,openEditor:ye=()=>{},onFillChange:Pe=Ke=>{},onFillBlur:Te=()=>{},onFillFocus:bt=()=>{}})=>{let Ke=Re(String(Ge||""));const mt=(0,ie.useRef)(),ke=(0,ie.useRef)(),[tt,ut]=(0,ie.useState)(""),[ae,te]=(0,ie.useState)("office"),[z,re]=(0,ie.useState)([]),le=(0,ie.useRef)("a"+(0,it.Z)()),ne={},be=dt=>/<style[\s\S]*?>/i.test(dt||""),je=(dt,un,Zt)=>{const Qt=document.createElement(dt===It?"input":"textarea");Qt.style.width="100%",Qt.style.height=dt===It?"40px":"151px",Qt.rows=5,Qt.spellcheck=!1,Qt.name="edu-program-fill",Qt.placeholder="\u8BF7\u8F93\u5165",Qt.dataset.id=un;const ln=Object.keys(ne).length;return ne[ln]=Qt,`<span class="edu-program-fill-wrap ${dt===It?"":"show"}" style="width:${dt===It?"600px":"100%"}" title=${Zt||""}><span>${Qt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Mt(dt){return dt=dt.replace(/!\[.*?\]\(.*?\)/g,""),dt=dt.replace(/\[.*?\]\(.*?\)/g,""),dt=dt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),dt=dt.replace(/<embed.*?>/g,""),dt=dt.replace(/<img.*?>/g,""),dt=dt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),dt=dt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),dt=dt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),dt=dt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),dt}const St=dt=>!Tt&&be(Ke)?dt:dt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(un,Zt){let Qt=Zt.replace(/(\n|\r)/g,"").split("}"),ln=[];return Qt.map(_n=>{_n!=""&&ln.push(`.${le.current} ${_n}`)}),`<style>${ln.join("}")}</style>`}),wt=(0,ie.useMemo)(()=>{try{const Qt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,ln=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_n=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;Ke=Ke.replace(cn,"("+ge.Z.API_SERVER+"/attachments/download/").replace(Qt,"("+ge.Z.API_SERVER+"/api/attachments/").replace(ln,'"'+ge.Z.API_SERVER+"/api/attachments/").replace(_n,'"'+ge.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,`
|
|
`),mt.current.style.display="none"}catch(Qt){}if(ue){let Qt=-1;return Ke=Ke.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(ln,_n,cn){var wn;return++Qt,je(ln,Qt,(wn=qe==null?void 0:qe[Qt])==null?void 0:wn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${St(Ke||"")}</pre>`}let dt=St(Ke);dt=(0,Ne.ZP)(dt);const un=(0,Ne.ez)();Ke.match(/\[TOC\]/)&&(dt=dt.replace("<p>[TOC]</p>",(0,Ne.Qv)()),(0,Ne.Iy)()),dt=dt.replace(/(__special_katext_id_\d+__)/g,(Qt,ln)=>{const{type:_n,expression:cn}=un[ln];return(0,Ie.renderToString)(Ze(cn)||"",{displayMode:_n==="block",throwOnError:!1,output:"html"})}),dt=dt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ne.AL)();const Zt=document.createElement("div");if(Zt.innerHTML=dt,Tt)return Zt.innerText;if(he){const Qt=he.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return en(Zt,Qt),Zt.innerHTML}return setTimeout(()=>sn(),500),Zt.innerHTML},[Ke,he]);(0,ie.useEffect)(()=>{Jt.current&&Jt.current.querySelectorAll(["input","textarea"]).forEach(un=>{un.oninput=Dt,un.onblur=jt,un.onfocus=zt})},[z]),(0,ie.useEffect)(()=>{var dt,un,Zt,Qt,ln;if(qe!=null&&qe.length)try{const _n=Jt.current.querySelectorAll(".edu-program-fill-score"),cn=Jt.current.querySelectorAll('[name="edu-program-fill"]');for(const[wn,$n]of cn.entries())$n.value=((dt=qe==null?void 0:qe[wn])==null?void 0:dt.value)||"",((un=qe==null?void 0:qe[wn])==null?void 0:un.type)==="warning"?$n.className="program-fill-warning":((Zt=qe==null?void 0:qe[wn])==null?void 0:Zt.type)==="success"?$n.className="program-fill-success":$n.className="";for(const[wn,$n]of _n.entries())$n.innerHTML=(Qt=qe==null?void 0:qe[wn])!=null&&Qt.score?`${(ln=qe==null?void 0:qe[wn])==null?void 0:ln.score}\u5206`:"";re(qe)}catch(_n){console.log(_n,"error")}},[qe]);const Dt=dt=>{z[dt.target.dataset.id]=z[dt.target.dataset.id]||{},z[dt.target.dataset.id].value=dt.target.value,re([...z]),Pe(z,dt.target.dataset.id)},jt=dt=>{z[dt.target.dataset.id]=z[dt.target.dataset.id]||{},z[dt.target.dataset.id].value=dt.target.value,re([...z]),Te(z,dt.target.dataset.id)},zt=dt=>{z[dt.target.dataset.id]=z[dt.target.dataset.id]||{},z[dt.target.dataset.id].value=dt.target.value,re([...z]),bt(z,dt.target.dataset.id)};function en(dt,un){return dt.childNodes.forEach(Zt=>{var Qt;if(Zt.childNodes.length>0)en(Zt,un);else if(Zt.nodeName!=="IMG")if(Zt.innerHTML)Zt.innerHTML=(Qt=Zt.innerHTML)==null?void 0:Qt.replace(new RegExp(un,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const ln=document.createElement("span");ln.innerHTML=Zt.textContent.replace(new RegExp(un,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Zt.replaceWith(ln)}})}const Jt=(0,ie.useRef)();Ne.jb.WebkitLineClamp=yt,yt&&(lt=Qe(Qe({},lt),Ne.jb));function Bt(dt){let un=dt.target;if(un.tagName.toUpperCase()==="A"){let Zt=un.getAttribute("href");if(Zt.indexOf("office")>-1)dt.preventDefault(),ut(Zt),te("office");else if(Zt.indexOf("application/pdf")>-1)dt.preventDefault(),ut(Zt),te("pdf");else if(Zt.indexOf("text/html")>-1)dt.preventDefault(),ut(Zt),te("html");else if(Zt.startsWith("#")){dt.preventDefault();let Qt=document.getElementById(Zt.replace("#",""));Qt&&Qt.scrollIntoView(!0)}}}const sn=()=>{var dt;const un=(dt=Jt.current)==null?void 0:dt.querySelectorAll("video");un==null||un.forEach(Zt=>{if(Zt.oncontextmenu=()=>!1,Zt.src.indexOf(".m3u8")>-1&&!Zt.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var Qt=new me.ZP;Qt.loadSource(Zt.src),Qt.attachMedia(Zt)}}})};(0,ie.useEffect)(()=>{if(Jt.current&&wt&&wt.match(Ye)&&window.PR.prettyPrint(),Jt.current)return Jt.current.addEventListener("click",Bt),()=>{var dt;(dt=Jt.current)==null||dt.removeEventListener("click",Bt),(0,Ne.AL)(),(0,Ne.Iy)()}},[wt,Jt.current,Bt]);const Vt=dt=>{dt.target.nodeName==="IMG"&&dt.target.className.indexOf("draw-flowchart")>-1?(mt.current.style.zIndex=1,mt.current.style.display="flex",mt.current.style.width=dt.target.clientWidth+"px",mt.current.style.height=dt.target.clientHeight+"px",mt.current.style.top=dt.target.offsetTop+"px",mt.current.style.left=dt.target.offsetLeft+"px",dt.target.id&&(ke.current=dt.target.id)):mt.current.style.display="none"},nn=()=>{mt.current.style.display="none"};return(0,ie.useEffect)(()=>{var dt;const un=Zt=>{Zt.preventDefault(),Zt.clipboardData.setData("text",window.getSelection().toString())};return(dt=Jt.current)==null||dt.addEventListener("copy",un),()=>{var Zt;(Zt=Jt.current)==null||Zt.removeEventListener("copy",un)}},[Jt.current]),ie.createElement("div",{style:{position:"relative"},onMouseLeave:nn},Tt&&ie.createElement("div",{ref:Jt,className:`${Le.mdBody} `},wt),!Tt&&!be(wt)&&ie.createElement("div",{ref:Jt,style:Qe({},lt),onMouseOver:Vt,className:`${He||""} ${rt?"disabled-fill":""} markdown-body ${Le.mdBody} ${le.current}`,dangerouslySetInnerHTML:{__html:wt}}),!Tt&&be(wt)&&ie.createElement(De,{html:wt}),ie.createElement("div",{ref:mt,className:`${Le.button} ${Ce?"":Le.previewFlowChart}`},ie.createElement(we.Z,null,ie.createElement(pe.ZP,{onClick:()=>{Ce?ye(ke.current):(ut(ke.current),te("flowChart"))}},Ce?"\u7F16\u8F91":"\u9884\u89C8"))),ie.createElement(ve.Z,{close:!0,data:tt,type:tt!=null&&tt.length?ae:"",style:Qe({},$e),onClose:()=>ut("")}))}},44905:function(Pt,Ot,fe){"use strict";fe.d(Ot,{h:function(){return Ue}});var ie=fe(59301),ot=fe(82326),Ne=fe(28284),_e=fe(99571),me=fe(89780),ge=fe.n(me),Ae=fe(66543),Ie=fe(59598),we=Object.defineProperty,pe=Object.defineProperties,it=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,De=(ze,Qe,Ve)=>Qe in ze?we(ze,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):ze[Qe]=Ve,Re=(ze,Qe)=>{for(var Ve in Qe||(Qe={}))ht.call(Qe,Ve)&&De(ze,Ve,Qe[Ve]);if(ve)for(var Ve of ve(Qe))Oe.call(Qe,Ve)&&De(ze,Ve,Qe[Ve]);return ze},Le=(ze,Qe)=>pe(ze,it(Qe));const st=ot.default.Option,ct={labelCol:{span:4},wrapperCol:{span:20}},vt={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"]};Ot.Z=({callback:ze,onCancel:Qe})=>{const[Ve,It]=(0,ie.useState)("python");function Ye(at){It(vt[at][1])}function Ze(at){ze(at)}return ie.createElement(Ne.default,Le(Re({},ct),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),ie.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ie.createElement(ot.default,{getPopupContainer:at=>at.parentNode,onChange:Ye},Object.keys(vt).map(at=>ie.createElement(st,{key:at,value:at},vt[at][0])))),ie.createElement(Ne.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ie.createElement(Ue,{mode:Ve})),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(_e.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(_e.ZP,{type:"ghost",onClick:Qe},"\u53D6\u6D88")))};function Ue({value:ze,onChange:Qe,mode:Ve,options:It={}}){const Ye=(0,ie.useRef)(),[Ze,at]=(0,ie.useState)();return(0,ie.useEffect)(()=>{if(Ze){let Me=function(Ge){const Ce=Ge.getValue();Qe&&Qe(Ce)};return Ze.on("change",Me),()=>{Ze.off("change",Me)}}},[Ze,Qe]),(0,ie.useEffect)(()=>{Ze&&Ze.setOption("mode",Ve)},[Ze,Ve]),(0,ie.useEffect)(()=>{Ze&&(ze!==Ze.getValue()||ze==="")&&setTimeout(()=>{Ze.setValue(ze||"")},300)},[Ze,ze]),(0,ie.useEffect)(()=>{if(Ye.current&&!Ze){const Me=ge().fromTextArea(Ye.current,Re({mode:Ve,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},It));at(Me)}},[Ye.current,Ze]),ie.createElement("div",{className:"my-codemirror-container"},ie.createElement("textarea",{ref:Ye}))}},2978:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return tr}});var ie=fe(59301),ot=fe(89780),Ne=fe.n(ot),_e=fe(76374),me=fe(66543),ge=fe(6313),Ae=fe(25717),Ie=fe(99498),we=fe(25419),pe=fe(67549),it=fe(38394),ve=({value:ft="",className:gt,showTextOnly:xt,showLines:_t,style:Cn={}})=>{const mn=(0,ie.useMemo)(()=>"",[ft]);return ie.createElement(ie.Fragment,null,ie.createElement("div",{dangerouslySetInnerHTML:{__html:mn}}))},ht=Object.defineProperty,Oe=Object.defineProperties,De=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,ct=(ft,gt,xt)=>gt in ft?ht(ft,gt,{enumerable:!0,configurable:!0,writable:!0,value:xt}):ft[gt]=xt,vt=(ft,gt)=>{for(var xt in gt||(gt={}))Le.call(gt,xt)&&ct(ft,xt,gt[xt]);if(Re)for(var xt of Re(gt))st.call(gt,xt)&&ct(ft,xt,gt[xt]);return ft},Ue=(ft,gt)=>Oe(ft,De(gt));let ze=[{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 Qe({onActionCallback:ft,title:gt,icon:xt,actionName:_t,className:Cn="",children:mn}){function tn(){ft(_t)}return ie.createElement("a",{title:gt,className:Cn,onClick:tn},ie.createElement("i",{className:`${xt}`}),mn)}var Ve=({watch:ft,showNullButton:gt,showNullProgramButton:xt,onActionCallback:_t,fullScreen:Cn,insertTemp:mn,hidetoolBar:tn,extraUse:Ln})=>{const Mn=[...ze,{title:`${ft?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${ft?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ie.createElement("ul",{className:"markdown-toolbar-container"},!tn&&Mn.map((kn,xn)=>ie.createElement("li",{key:xn},kn.actionName?ie.createElement(Qe,Ue(vt({},kn),{onActionCallback:_t})):ie.createElement("span",{className:"v-line"}))),gt?ie.createElement("li",null,ie.createElement(Qe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:_t},ie.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,xt?ie.createElement(ie.Fragment,null,ie.createElement("li",null,ie.createElement(Qe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:_t},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ie.createElement("li",null,ie.createElement(Qe,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:_t},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,mn&&ie.createElement("li",null,ie.createElement(Qe,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${mn}`,onActionCallback:_t},ie.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ln&&ie.createElement("li",null,Ln),ie.createElement("li",{className:"btn-full-screen"},ie.createElement(Qe,{icon:`${Cn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Cn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:_t})))},It=fe(75790),Ye=fe(28284),Ze=fe(37568),at=fe(99571),Me=Object.defineProperty,Ge=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,lt=(ft,gt,xt)=>gt in ft?Me(ft,gt,{enumerable:!0,configurable:!0,writable:!0,value:xt}):ft[gt]=xt,$e=(ft,gt)=>{for(var xt in gt||(gt={}))Tt.call(gt,xt)&<(ft,xt,gt[xt]);if(He)for(var xt of He(gt))yt.call(gt,xt)&<(ft,xt,gt[xt]);return ft},he=(ft,gt)=>Ge(ft,Ce(gt));const ue={labelCol:{span:4},wrapperCol:{span:20}};var Be=({callback:ft,onCancel:gt})=>{function xt(_t){ft(_t)}return ie.createElement(Ye.default,he($e({},ue),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:xt,style:{width:500}}),ie.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ie.createElement(Ze.default,null)),ie.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ie.createElement(Ze.default,null)),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(at.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(at.ZP,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},rt=fe(44905),qe=fe(45596),ye=fe(62957),Pe=fe(77019),Te=fe(6077),bt=fe(59301),Ke=({callback:ft,onCancel:gt})=>{const xt=document.createElement("canvas"),_t=xt.getContext("2d");xt.width=1e3,xt.height=800,_t.fillStyle="#ffffff",_t.fillRect(0,0,xt.width,xt.height);const Cn=xt.toDataURL("image/png");return bt.createElement(ye.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},bt.createElement(Pe.Z,{style:{height:"100vh"}},bt.createElement(Te.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Cn,visible:!0,title:String(Date.now())},onOk:mn=>{ft({src:mn.url})},onClose:gt})))},mt=fe(30641),ke=fe(5269),tt=fe(6767),ut={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ae=fe(59301),z=(0,ie.forwardRef)(({onCancel:ft,editImgId:gt,callback:xt},_t)=>{let Cn=(0,ie.useRef)(),mn=(0,ie.useRef)(),tn=(0,ie.useRef)(),Ln=(0,ie.useRef)(!1);const Mn=(0,ie.useRef)(!1);console.log("ref:",_t);const[kn,xn]=(0,ie.useState)(0),[Bn,Ft]=(0,ie.useState)("100vh");return(0,ie.useEffect)(()=>{xn(1)},[]),(0,ie.useImperativeHandle)(_t,()=>({setHeight:Ft})),ae.createElement("div",{ref:Mn,className:"body-overflow-initial"},ae.createElement(mt.Z,{width:"100vw",height:Bn,footer:null,closable:!0,placement:"bottom",open:!!kn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${ut.drawerWrap}`,onClose:()=>{window.saveDrawData(nt=>{xt({src:`/api/attachments/${nt}`,id:nt})})},title:ae.createElement(Pe.Z,{align:"middle"},ae.createElement(ke.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ae.createElement(ke.Z,{onClick:()=>{Ft(Bn==="60px"?"100vh":"60px")}},ae.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ae.createElement(ke.Z,{onClick:()=>{window.saveDrawData(nt=>{if(nt===null){tt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}tt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),xt({src:`/api/attachments/${nt}`,id:nt,disabledClose:!0})})}},ae.createElement(at.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ae.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${gt||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:mn})))}),re=fe(90524),le=fe(47889),ne=fe(71051);const be=le.ZP.Group,je={margin:"0 8px"};var Mt=({callback:ft,onCancel:gt})=>{function xt(_t){ft(_t)}return ie.createElement(Ye.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:xt},ie.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ie.createElement("span",{style:je},"\u5355\u5143\u683C\u6570\uFF1A"),ie.createElement("span",{style:je},"\u884C\u6570"),ie.createElement(Ye.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ie.createElement(ne.Z,null)),ie.createElement("span",{style:je},"\u5217\u6570"),ie.createElement(Ye.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ie.createElement(ne.Z,null))),ie.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ie.createElement("span",{style:je},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ie.createElement(Ye.default.Item,{name:"align"},ie.createElement(be,null,ie.createElement(le.ZP,{value:"default"},ie.createElement("i",{className:"fa fa-align-justify"})),ie.createElement(le.ZP,{value:"left"},ie.createElement("i",{className:"fa fa-align-left"})),ie.createElement(le.ZP,{value:"center"},ie.createElement("i",{className:"fa fa-align-center"})),ie.createElement(le.ZP,{value:"right"},ie.createElement("i",{className:"fa fa-align-right"}))))),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(at.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(at.ZP,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},St=fe(71411),wt=fe(11081),Dt=fe.n(wt),zt=(0,ie.forwardRef)(({use3d:ft,width:gt,height:xt,callback:_t,showSaveButton:Cn},mn)=>{const tn=(0,ie.useRef)(),Ln=(0,ie.useRef)(),[Mn,kn]=(0,ie.useState)(!1),xn=(0,ie.useRef)({id:tn,appName:"graphing",width:gt||1e3,height:xt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ie.useEffect)(()=>{Ln.current=new(Dt())(xn.current,!0),window.onload=function(){Ln.current.inject("applet_container")}},[]);const Bn=()=>{var Ft=window.ggbApplet.getPNGBase64(1,!0,72);return _t&&_t(Ft),Ft};return(0,ie.useEffect)(()=>{xn.current.appName=Mn?"3D":"graphing",Ln.current.inject("applet_container")},[Mn]),(0,ie.useEffect)(()=>{kn(ft)},[ft]),(0,ie.useImperativeHandle)(mn,()=>({getImgData:Bn})),ie.createElement(ie.Fragment,null,ie.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:tn}),ie.createElement(Pe.Z,{align:"middle"},ie.createElement(ke.Z,{flex:1},ie.createElement(St.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Mn,onChange:Ft=>kn(Ft)})),ie.createElement(ke.Z,null,ie.createElement(at.ZP,{size:"large",onClick:Bn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),en=fe(88615);const Jt="link",Bt="upload-image",sn="add-flowchart",Vt="draw-image",nn="add-flowchart",dt="code-block",un="add-table",Zt="------------",Qt={default:Zt,left:`:${Zt}`,center:`:${Zt}:`,right:`${Zt}:`};var ln=fe(17904);function _n(){}let cn=0;const wn=1e4,$n="\u2581",Zn="@\u2581\u2581@",Mr="@\u2581@",Nr=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,sr=["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 Gn(ft){return/^\d+$/.test(ft)?`${ft}px`:ft}const Wn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Un={[Wn+"-B"]:"bold",[Wn+"-I"]:"italic"},En={[Jt]:"\u6DFB\u52A0\u94FE\u63A5",[dt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Bt]:"\u6DFB\u52A0\u56FE\u7247",[Vt]:"\u6DFB\u52A0\u753B\u56FE",[sn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[un]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var tr=({defaultValue:ft="",onChange:gt,width:xt="100%",height:_t=400,miniToolbar:Cn=!1,isFocus:mn=!1,watch:tn,insertTemp:Ln,mode:Mn="markdown",id:kn="markdown-editor-id",showResizeBar:xn=!1,noStorage:Bn=!1,showNullButton:Ft=!1,showNullProgramButton:nt=!1,hidetoolBar:Yt=!1,fullScreen:gn=!1,onBlur:Sn,onCMBeforeChange:Ee,onFullScreen:Fe,className:Wt="",disablePaste:Ct=!1,disabled:We=!1,disabledFill:kt=!1,placeholder:qt="",values:rn="",extraUse:dn})=>{const[Je,$t]=(0,ie.useState)(null),[Lt,An]=(0,ie.useState)(ft),[Xt,yn]=(0,ie.useState)(tn),[pn,Fn]=(0,ie.useState)(gn),[Pn,Xn]=(0,ie.useState)(""),[rr,Yn]=(0,ie.useState)(0),[hr,Hn]=(0,ie.useState)(_t),[wr,Rr]=(0,ie.useState)(!1),[ar,pr]=(0,ie.useState)(0),[Er,vr]=(0,ie.useState)(0),er=(0,ie.useRef)(),Ar=(0,ie.useRef)(),lr=(0,ie.useRef)(),ur=(0,ie.useRef)(),mr=(0,ie.useRef)(),Br=(0,ie.useRef)();(0,ie.useEffect)(()=>{const Et=window.scrollY||window.pageYOffset;An(rn),Je==null||Je.setValue(rn),window.scrollTo(0,Et)},[rn]),(0,ie.useEffect)(()=>{Fe==null||Fe(pn)},[pn]),(0,ie.useEffect)(()=>{if(er.current){let Et=function(Nt,Gt){var bn;if(Ct){Gt.preventDefault();return}const Tn=Gt.clipboardData;if(Tn){const Kn=Tn.types.toString(),nr=Tn.items;if(Kn==="Files"||Tn.types.indexOf("Files")>-1){if(Gt.preventDefault(),Mn=="stex")return;try{let Qn=nr[1];((bn=nr[0])==null?void 0:bn.kind)==="file"&&(Qn=nr[0]);const yr=Qn.getAsFile(),dr=yr.name.split(".").pop();(0,qe.I)(yr,Or=>{var Ai,ii,jr;Or.id?((Ai=yr==null?void 0:yr.type)==null?void 0:Ai.indexOf("image"))>-1?pt.replaceSelection(`<img width="100%" src="/api/attachments/${Or.id}?type=${Or.content_type})" alt="" />`):((ii=yr==null?void 0:yr.type)==null?void 0:ii.indexOf("video"))>-1?pt.replaceSelection(`<video width="100%" controls src="/api/attachments/${Or.id}"></video>`):((jr=yr==null?void 0:yr.type)==null?void 0:jr.indexOf("pdf"))>-1?pt.replaceSelection(`<a href="/api/attachments/${Or.id}?type=${yr.type}&disposition=inline" target="_blank">${yr.name}</a>`):sr.includes(dr)?pt.replaceSelection(`<a href="/api/attachments/${Or.id}?type=office&disposition=inline" target="_blank">${yr.name}</a>`):pt.replaceSelection(`[${yr.name}](/api/attachments/${Or.id}?type=${Or.content_type})`):(Or==null?void 0:Or.status)===401&&(document.location.href="/user/login")})}catch(Qn){tt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const pt=Ne().fromTextArea(er.current,{mode:Mn,lineNumbers:!Cn,lineWrapping:!0,value:ft,autoCloseTags:!0,autoCloseBrackets:!0});return pt.on("keyup",function(Nt,Gt){Gt.keyCode===8&&(Nt.getValue()==""?pt.setOption("placeholder",qt):pt.setOption("placeholder",null))}),pt.on("keydown",function(Nt,Gt){if(Gt.keyCode===8){var bn=ir(Nt);bn&&Gt.preventDefault()}}),mn&&pt.focus(),pt.on("paste",Et),We&&pt.on("beforeChange",function(Nt,Gt){(Gt.origin==="paste"||Gt.origin==="+input")&&Gt.cancel()}),$t(pt),()=>{pt.off("paste",Et)}}},[]);const gr=(0,ie.useCallback)(()=>{if(Ar.current)try{}catch(Et){console.log(Et,"---- to set md editor body height")}},[hr,Ar,pn]);(0,ie.useEffect)(()=>{function Et(){let pt=new _e.Z(Nt=>{for(let Gt of Nt)(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&(gr(),Je.setSize("100%","100%"),Je.refresh())});return pt.observe(er.current.parentElement),pt}if(Je){const pt=Et();return()=>{var Nt,Gt;(Nt=er.current)!=null&&Nt.parentElement&&pt.unobserve((Gt=er.current)==null?void 0:Gt.parentElement)}}},[Je,gr]),(0,ie.useEffect)(()=>{if(Je){let Et=[];for(const[pt,Nt]of Object.entries(Un)){let Gt={[pt]:()=>{Jn(Nt)}};Et.push(Gt),Je.addKeyMap(Gt)}return()=>{for(let pt of Et)Je.removeKeyMap(pt)}}},[Je]),(0,ie.useEffect)(()=>{gn!==pn&&Fn(gn)},[gn]),(0,ln.Z)(()=>{if(!Bn&&rr>0){let Et=new Date().getTime(),pt=window.sessionStorage.getItem(kn);Et>=rr+wn&&(!pt||pt!==Lt)&&(window.sessionStorage.setItem(kn,Lt),Rr(!0))}},wn),(0,ie.useEffect)(()=>{yn(tn)},[Je,tn]),(0,ie.useEffect)(()=>{Je&&mn&&Je.focus()},[Je,mn]),(0,ie.useEffect)(()=>{if(Xt&&Je){let Et=function(Nt){let Gt=Nt.target;if(ur.current){let bn=Gt.scrollTop/Gt.scrollHeight;ur.current.scrollTop=ur.current.scrollHeight*bn}};const pt=Je.getScrollerElement();return pt.addEventListener("scroll",Et),()=>{pt.removeEventListener("scroll",Et)}}},[Je,Xt]),(0,ie.useEffect)(()=>{if(Je&&Ee){let Et=function(pt,Nt){Ee(pt,Nt)};return Je.on("beforeChange",Et),()=>{Je.off("beforeChange",Et)}}},[Je,Ee]),(0,ie.useEffect)(()=>{if(Je&&Sn){let Et=function(){Sn(Je.getValue())};return Je.on("blur",Et),()=>{Je.off("blur",Et)}}},[Je,Sn]);function ir(Et,pt){var Nt=Et.getDoc(),Gt=Nt.getCursor(),bn=Nt.getLine(Gt.line),Tn=bn.charAt(Gt.ch-1),Kn=bn.lastIndexOf("@\u2581@",Gt.ch),nr=bn.lastIndexOf("@\u2581\u2581@",Gt.ch),Qn=Kn>nr?Kn:nr,yr=Kn>nr?3:4;if(Zn.indexOf(Tn)===-1)return null;if(console.log("change1:",pt,Et,bn,Gt,Qn,Kn,nr,Tn),Qn>=0&&Gt.ch-Qn<5){var dr=Qn+yr;return Nt.replaceRange("",{line:Gt.line,ch:Qn},{line:Gt.line,ch:dr}),{line:Gt.line,ch:dr}}return null}(0,ie.useEffect)(()=>{if(Je){let Et=function(pt,Nt){const Gt=pt.getValue();An(Gt),Yn(new Date().getTime()),pt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),gt&&(nt?gt(Gt,qr(Gt)):gt(Gt))};return Je.on("change",Et),()=>{Je.off("change",Et)}}},[Je,gt]),(0,ie.useEffect)(()=>{if(Je)if(ft==null)Je.setValue(""),An("");else{const Et=window.scrollY||window.pageYOffset;ft!==Je.getValue()&&(Je.setValue(ft),An(ft),Je.setCursor(We?1:Je.lineCount(),0),window.scrollTo(0,Et))}},[Je,ft]);const Jn=(0,ie.useCallback)(Et=>{const pt=Je.getCursor(),Nt=Je.getSelection();let Gt=Nt.split(`
|
|
`);switch(Et){case"bold":return Je.replaceSelection("**"+Nt+"**"),Nt===""&&Je.setCursor(pt.line,pt.ch+2),Je.focus();case"italic":return Je.replaceSelection("*"+Nt+"*"),Nt===""&&Je.setCursor(pt.line,pt.ch+1),Je.focus();case"code":return Je.replaceSelection("`"+Nt+"`"),Nt===""&&Je.setCursor(pt.line,pt.ch+1),Je.focus();case"inline-latex":return Xn("inline-latex"),Je.focus();case"latex":return Je.replaceSelection("```latex\n"+Nt+"\n```"),Je.setCursor(pt.line+1,Nt.length+1),Je.focus();case"line-break":return Je.replaceSelection(`<br/>
|
|
`),Je.focus();case"list-ul":return Nt===""?Je.replaceSelection("- "+Nt):Je.replaceSelection(Gt.map(bn=>bn===""?"":`- ${bn}`).join(`
|
|
`)),Je.focus();case"list-ol":return Nt===""?Je.replaceSelection("1. "+Nt):Je.replaceSelection(Gt.map((bn,Tn)=>bn===""?"":`${Tn+1}. ${bn}`).join(`
|
|
`)),Je.focus();case"add-null-ch":return Nt===""&&Je.setCursor(pt.line,pt.ch),Je.replaceSelection($n),Je.focus();case"add-signal":return Nt===""&&Je.setCursor(pt.line,pt.ch),Je.replaceSelection(Mr),Je.focus();case"add-multiple":return Nt===""&&Je.setCursor(pt.line,pt.ch),Je.replaceSelection(Zn),Je.focus();case"inster-template-1":return Nt===""&&Je.setCursor(pt.line,pt.ch),Je.replaceSelection(Nr),Je.focus();case"eraser":return Je.setValue(""),Je.focus();case"trigger-watch":return yn(!Xt),Je.focus();case"trigger-full-screen":return Fn(!pn),Je.focus();case Jt:Xn(Jt);return;case dt:Xn(dt);return;case Bt:Xn(Bt);return;case Vt:Xn(Vt);return;case"maths-latex":Xn("maths-latex");return;case sn:mr.current="",sessionStorage.removeItem("file_id"),Xn(sn);return;case un:Xn(un);return;default:throw new Error}},[Je,Xt,pn]),cr=(0,ie.useCallback)((Et,pt)=>{var Nt,Gt,bn,Tn,Kn,nr;switch(Et!=null&&Et.disabledClose||Xn(""),Pn){case Jt:const{title:Ai,link:ii}=Et;return Je.replaceSelection(`[${Ai}](${ii})`),Je.focus();case dt:const{language:jr,content:ui}=Et;return Je.replaceSelection(["```"+jr,ui,"```"].join(`
|
|
`)),Je.focus();case"maths-latex":for(var Qn=atob(Et),yr=new Uint8Array(Qn.length),dr=0;dr<Qn.length;dr++)yr[dr]=Qn.charCodeAt(dr);var Or=new Blob([yr],{type:"image/png"});(0,qe.I)(Or,Lr=>{Lr.id?Je.replaceSelection(``):(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Je.replaceSelection("`$$"+Et+"$$`");break;case nn:const{src:Cr,alt:hi,id:Ti}=Et;if(!Ti)return;Je.getValue().indexOf(Cr)===-1?Je.replaceSelection(`<center><img id="${Ti}" width="80%" src="${Cr}" class="draw-flowchart" alt="${hi||""}" /></center>`):document.getElementById(Ti).src=re.Z.API_SERVER+Cr+"?t="+Date.now();break;case Bt:case Vt:const br=pt,yi=(bn=(Gt=(Nt=br==null?void 0:br.name)==null?void 0:Nt.split("."))==null?void 0:Gt.pop)==null?void 0:bn.call(Gt);return((Tn=br==null?void 0:br.type)==null?void 0:Tn.indexOf("image"))>-1||!(br!=null&&br.type)?br!=null&&br.align||br!=null&&br.width?Je.replaceSelection(`<p style="text-align:${br.align||"initial"}"><img width="${br.width?br.width+"%":"initial"}" src="${Cr}" alt="${hi||""}" /></p>`):Je.replaceSelection(`<img width="100%" src="${Cr}" alt="${hi||""}" />`):((Kn=br==null?void 0:br.type)==null?void 0:Kn.indexOf("video"))>-1?Je.replaceSelection(`<video width="100%" controls src="${Cr}"></video>`):((nr=br==null?void 0:br.type)==null?void 0:nr.indexOf("pdf"))>-1?Je.replaceSelection(`<a href="${Cr}?type=${br.type}&disposition=inline" target="_blank">${br.name}</a>`):sr.includes(yi)?Je.replaceSelection(`<a href="${Cr}?type=office&disposition=inline" target="_blank">${br.name}</a>`):Je.replaceSelection(`[${br.name}](${Cr})`),Je.focus();case un:const{row:pi,col:Hi,align:bi}=Et;let Wi=`
|
|
`;for(let Lr=0;Lr<pi;Lr++){let Fi=[],$i=[];for(let eo=0;eo<Hi;eo++)Lr===1&&$i.push(Qt[bi]),Fi.push(" ");Lr===1&&(Wi+=`| ${$i.join(" | ")} |
|
|
`),Wi+=`| ${Fi.join(Hi===1?"":" | ")} |
|
|
`}return Je.replaceSelection(Wi+`
|
|
`),Je.focus();default:throw new Error}},[Je,Pn]),Zr=(0,ie.useMemo)(()=>{switch(Pn){case Jt:return ie.createElement(Be,{callback:cr,onCancel:Pr});case dt:return ie.createElement(rt.Z,{callback:cr,onCancel:Pr});case Bt:return ie.createElement(qe.Z,{callback:cr,onCancel:Pr});case sn:return ie.createElement(z,{editImgId:mr.current,callback:cr,onCancel:Pr});case un:return ie.createElement(Mt,{callback:cr,onCancel:Pr});case"maths-latex":return ie.createElement(zt,{showSaveButton:!0,callback:cr});case"inline-latex":return ie.createElement(en.Z,{showSaveButton:!0,callback:cr});default:return null}},[Pn]);function Pr(){Xn("")}(0,ie.useEffect)(()=>{if(lr.current){let Et=function(Kn){bn=!0,Tn=Kn.pageY},pt=function(){bn=!1},Nt=function(Kn){if(bn){let nr=Kn.pageY-Tn;nr<0&&(nr=0),nr>300&&(nr=300);let Qn=_t+nr+"px";Hn(Qn)}},Gt=lr.current,bn=!1,Tn=0;return Gt.addEventListener("mousedown",Et),document.addEventListener("mousemove",Nt),document.addEventListener("mouseup",pt),()=>{Gt.removeEventListener("mousedown",Et),document.removeEventListener("mousemove",Nt),document.removeEventListener("mouseup",pt)}}},[Je,lr]),(0,ie.useEffect)(()=>{Hn(_t)},[_t]);const Sr=Gn(xt),ri=Gn(hr),Dr={width:Sr,height:ri},li=(0,ie.useMemo)(()=>{if(rr){let Et=new Date(rr),pt=Et.getHours(),Nt=Et.getMinutes(),Gt=Et.getSeconds();return pt=pt<10?"0"+pt:pt,Nt=Nt<10?"0"+Nt:Nt,Gt=Gt<10?"0"+Gt:Gt,`${pt}:${Nt}:${Gt}`}return 0},[rr]),qr=Et=>{const pt=[];if(nt){let Nt=-1;Et=Et.replace(/(@▁▁@|@▁@)/g,function(Gt,bn,Tn){pt.push({multiLine:Gt!==Mr})})}return pt};function _r(){window.sessionStorage.removeItem(kn),Rr(!1),Yn(0)}function zn(){Rr(!1),Yn(0),Je.setValue(window.sessionStorage.getItem(kn))}(0,ie.useEffect)(()=>{En[Pn]&&Pn!==Vt&&Pn!==sn&&setTimeout(()=>{const Et=document.getElementsByClassName("markdown-popup-form")[0],pt=window.innerWidth/2-Et.offsetWidth/2,Nt=window.innerHeight/2-Et.offsetHeight/2;pr(pt),vr(Nt)},0)},[Pn]);const Ht=Et=>{Et.preventDefault();const pt=Et.clientX-ar,Nt=Et.clientY-Er;document.body.onmousemove=Gt=>{let bn=Gt.clientX-pt,Tn=Gt.clientY-Nt;const Kn=document.getElementsByClassName("markdown-popup-form")[0],nr=window.innerWidth-Kn.offsetWidth,Qn=window.innerHeight-Kn.offsetHeight;bn=Math.max(0,Math.min(bn,nr)),Tn=Math.max(0,Math.min(Tn,Qn)),Ut(Gt.clientX,Gt.clientY,pt,Nt)&&(pr(bn),vr(Tn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ut=(Et,pt,Nt,Gt)=>{const bn=document.body.clientHeight,Tn=document.body.clientWidth;return Et<20&&Nt>Et||Et>Tn-20&&Nt<Et||pt<20&&Gt>pt||pt>bn-20&&Gt<pt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ie.createElement(ie.Fragment,null,ie.createElement("div",{className:"markdown-editor-wrapper",ref:Ar},ie.createElement("div",{className:`markdown-editor-container ${Wt} ${Xt?"on-preview":""} ${Cn?"mini":""} ${pn?"full-screen":""}`,style:Dr},ie.createElement(Ve,{insertTemp:Ln,watch:Xt,fullScreen:pn,showNullButton:Ft,showNullProgramButton:nt,onActionCallback:Jn,hidetoolBar:Yt,extraUse:dn}),ie.createElement("div",{className:"markdown-editor-body"},ie.createElement("div",{className:"codemirror-container"},ie.createElement("textarea",{ref:er,placeholder:qt})),Xt?ie.createElement("div",{ref:ur,className:"preview-container"},Mn==="stex"&&ie.createElement(ve,{value:Lt}),Mn!=="stex"&&ie.createElement(it.Z,{edit:!0,disabledFill:kt,showProgramFill:nt,value:Lt,openEditor:Et=>{var pt;mr.current=Et,(pt=Br.current)==null||pt.setHeight("100vh"),setTimeout(()=>{Xn("add-flowchart")},150)}})):null))),xn?ie.createElement("a",{ref:lr,className:"editor-resize"}):null,Pn===Vt&&ie.createElement(Ke,{callback:cr,onCancel:Pr}),Pn===sn&&ie.createElement(z,{ref:Br,editImgId:mr.current,callback:cr,onCancel:Pr}),ie.createElement(It.Z,null,En[Pn]&&Pn!==Vt&&Pn!==sn?ie.createElement(ye.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ar,top:Er},title:ie.createElement("div",{style:{cursor:"move"},onMouseDown:Ht},En[Pn]),open:!0,onCancel:Pr,footer:null,destroyOnClose:!0,width:Pn===sn?"1200px":null,height:Pn===sn?"80vh":null,className:"markdown-popup-form"},Zr):null))}},45596:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return Qe},I:function(){return It}});var ie=fe(28284),ot=fe(6767),Ne=fe(37568),_e=fe(77736),me=fe(71051),ge=fe(47889),Ae=fe(99571),Ie=fe(67303),we=fe(59301),pe=fe(59301),it=Object.defineProperty,ve=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Le=(Ye,Ze,at)=>Ze in Ye?it(Ye,Ze,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ye[Ze]=at,st=(Ye,Ze)=>{for(var at in Ze||(Ze={}))De.call(Ze,at)&&Le(Ye,at,Ze[at]);if(Oe)for(var at of Oe(Ze))Re.call(Ze,at)&&Le(Ye,at,Ze[at]);return Ye},ct=(Ye,Ze)=>ve(Ye,ht(Ze));const{useForm:vt}=ie.default,Ue={width:280,marginRight:10},ze={labelCol:{span:5},wrapperCol:{span:19}};var Qe=({callback:Ye,onCancel:Ze})=>{const[at]=vt();let Me=(0,we.useRef)();function Ge(Tt){Me.current.width=at.getFieldValue("width"),Me.current.align=at.getFieldValue("align"),Ye(Tt,Me.current)}function Ce(Tt,yt){if(Tt.status===-1){ot.ZP.error(Tt.message);return}at.setFieldsValue({src:`/api/attachments/${Tt.id}`,type:yt.type})}function He(Tt){let yt=Tt.target.files[0];Me.current=yt,It(yt,Ce)}return pe.createElement(ie.default,ct(st({form:at},ze),{className:"upload-image-panel",onFinish:Ge,style:{width:470,overflow:"hidden"}}),pe.createElement(ie.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},pe.createElement("div",{className:"flex-container"},pe.createElement(ie.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},pe.createElement(Ne.default,{style:Ue})),pe.createElement(Ve,{onFileChange:He}))),pe.createElement(ie.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},pe.createElement(Ne.default,{style:{width:264}})),pe.createElement(ie.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},pe.createElement(_e.Z,null,pe.createElement(ie.default.Item,{name:"width",style:{margin:0}},pe.createElement(me.Z,{style:{width:264}})),pe.createElement("span",{className:"ml8"},"%"))),pe.createElement(ie.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},pe.createElement(ge.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"}]})),pe.createElement("aside",null,pe.createElement(ie.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},pe.createElement(Ae.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(Ae.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function Ve({onFileChange:Ye}){return pe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pe.createElement("input",{type:"file",onChange:Ye}))}function It(Ye,Ze){if(!Ye)throw new String("\u6CA1\u6709\u6587\u4EF6");let at=new FormData;at.append("editormd-image-file",Ye),at.append("file_param_name","editormd-image-file"),at.append("byxhr","true");var Me=new window.XMLHttpRequest;Me.withCredentials=!0,Me.addEventListener("load",function(Ge){Ze(JSON.parse(Ge.target.responseText),Ye)},!1),Me.addEventListener("error",function(Ge){console.error(Ge)},!1),Me.open("POST",`${Ie.KI}/api/attachments.json`),Me.send(at)}},75790:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return Ne}});var ie=fe(59301),ot=fe(4676);class Ne extends ie.Component{constructor(me){super(me);const ge=window.document;this.node=ge.createElement("div"),ge.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,ot.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(Pt,Ot,fe){"use strict";fe.d(Ot,{SV:function(){return mt},ZP:function(){return Ke}});var ie=fe(59301),ot=fe(76374);const Ne={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},_e={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},me={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},ge={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(`
|
|
`)}]},Ae={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 Ie=fe(53184),we=fe.n(Ie),pe=(ke,tt,ut)=>new Promise((ae,te)=>{var z=ne=>{try{le(ut.next(ne))}catch(be){te(be)}},re=ne=>{try{le(ut.throw(ne))}catch(be){te(be)}},le=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,re);le((ut=ut.apply(ke,tt)).next())});const it={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ve=(ke,tt,ut,ae)=>{const te=tt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:ut.lineNumber,endColumn:ut.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:ke.languages.CompletionItemKind.Text,insertText:re,range:ae}))},ht=(ke,tt,ut,ae)=>{ke.languages.registerCompletionItemProvider(tt,{provideCompletionItems(te,z){const re=te.getWordUntilPosition(z),le={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=te.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...ve(ke,te,z,le),...ut.map(je=>({label:je,kind:ke.languages.CompletionItemKind.Keyword,documentation:je,insertText:je,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le})),...ae.map(je=>({label:je.label,kind:ke.languages.CompletionItemKind.Snippet,documentation:je.content,insertText:ne.startsWith("#")?je.content.replace(/#/,""):je.content,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:le}))]}}})};var Oe=ke=>{it.languages.forEach(tt=>{ke.languages.registerDocumentFormattingEditProvider(tt,{provideDocumentFormattingEdits(ut){return pe(this,null,function*(){const ae=we()(ut.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:ut.getFullModelRange(),text:ae}]})}})}),ht(ke,"java",_e.keywords,_e.quickKey),ht(ke,"cpp",me.keywords,me.quickKey),ht(ke,"c",Ne.keywords,[]),ht(ke,"python",ge.keywords,ge.quickKey),ht(ke,"scala",Ae.keywords,Ae.quickKey)};const De="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Re=Object.defineProperty,Le=(ke,tt,ut)=>tt in ke?Re(ke,tt,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ke[tt]=ut,st=(ke,tt,ut)=>Le(ke,typeof tt!="symbol"?tt+"":tt,ut);const ct=class Il{constructor(tt,ut,ae){this.placeholder=tt,this.editor=ut,this.monaco=ae,ut.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Il.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};st(ct,"ID","editor.widget.placeholderHint");var Ue=ct,ze=fe(96236),Qe=fe(6767),Ve=fe(25399),It=fe(89392),Ye=fe(33796),Ze=fe(56102),at=Object.defineProperty,Me=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,yt=(ke,tt,ut)=>tt in ke?at(ke,tt,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ke[tt]=ut,lt=(ke,tt)=>{for(var ut in tt||(tt={}))He.call(tt,ut)&&yt(ke,ut,tt[ut]);if(Ce)for(var ut of Ce(tt))Tt.call(tt,ut)&&yt(ke,ut,tt[ut]);return ke},$e=(ke,tt)=>Me(ke,Ge(tt)),he=(ke,tt)=>{var ut={};for(var ae in ke)He.call(ke,ae)&&tt.indexOf(ae)<0&&(ut[ae]=ke[ae]);if(ke!=null&&Ce)for(var ae of Ce(ke))tt.indexOf(ae)<0&&Tt.call(ke,ae)&&(ut[ae]=ke[ae]);return ut},ue=(ke,tt,ut)=>new Promise((ae,te)=>{var z=ne=>{try{le(ut.next(ne))}catch(be){te(be)}},re=ne=>{try{le(ut.throw(ne))}catch(be){te(be)}},le=ne=>ne.done?ae(ne.value):Promise.resolve(ne.value).then(z,re);le((ut=ut.apply(ke,tt)).next())});function Be(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}function rt(){}let qe=!1;const ye={"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 Pe(ke=[]){let tt=ke;if(Array.isArray(ke)){for(let ut=0;ut<ke.length;ut++){let ae=ye[ke[ut]];if(ae)return ae}return tt[0]}return ye[tt]||tt}let Te=null;const bt=()=>ue(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ke)}});var Ke=ke=>{var tt=ke,{width:ut="100%",height:ae="100%",value:te,language:z="javascript",style:re={},options:le={},overrideServices:ne={},theme:be="vs-dark",onEditBlur:je,isCopy:Mt=!1,onSave:St,autoHeight:wt=!1,forbidCopy:Dt=!1,onChange:jt=rt,editorDidMount:zt=rt,onFocus:en=rt,onBreakPoint:Jt=rt,breakPointValue:Bt=[],filename:sn="educoder.txt",errorLine:Vt,errorContent:nn="",highlightLine:dt,openBreakPoint:un=!1,placeholder:Zt="",showMiniMap:Qt=!0}=tt,ln=he(tt,["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 _n=(0,ie.useRef)(),cn=(0,ie.useRef)({}),wn=(0,ie.useRef)(),$n=(0,ie.useRef)(),Zn=(0,ie.useRef)([]),Mr=(0,ie.useRef)(!1),Nr=(0,ie.useRef)(),sr=(0,ie.useRef)(),Gn=(0,ie.useRef)(!1),[fn,Wn]=(0,ie.useState)(!1);function Un(){let Ft;return _n.current&&(Ft=new ot.Z(nt=>{for(let Yt of nt)(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&cn.current.instance.layout()}),Ft.observe(_n.current)),Ft}function En(){Qe.ZP.warning({content:decodeURIComponent(De),key:"monaco-editor-tip"})}const tr=()=>{let Ft=cn.current.instance;if(te!=null&&Ft&&fn){const nt=Ft.getModel();nt&&te!==nt.getValue()&&(qe=!0,nt.setValue(te),Ft.layout(),qe=!1)}};(0,ie.useEffect)(()=>{const Ft=Ye.Z.subscribe("formatDocument",nt=>{var Yt;let gn=cn.current.instance;(Yt=gn==null?void 0:gn.getAction)==null||Yt.call(gn,"editor.action.formatDocument").run()});return window.updateMonacoValue=nt=>{jt(nt)},Ft},[]),(0,ie.useEffect)(()=>{var Ft;let nt=cn.current.instance;$n.current&&clearTimeout($n.current),$n.current=setTimeout(()=>{tr()},500),te&&(te!=null&&te.length)&&((Ft=nt==null?void 0:nt.updateOptions)==null||Ft.call(nt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,fn,cn.current]),(0,ie.useEffect)(()=>{if(Vt&&cn.current&&cn.current.instance){let nt=cn.current.instance;nt.changeViewZones(function(Yt){var gn=document.createElement("div");gn.style.padding="10px 20px",gn.style.width="calc(100% - 20px)",gn.className="my-error-line-wrp",gn.innerHTML=nn,Yt.addZone({afterLineNumber:Vt||11,heightInLines:3,domNode:gn})});var Ft={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}};nt.addOverlayWidget(Ft),nt.revealPositionInCenter({lineNumber:20,column:1})}},[Vt,cn.current,fn]);const ft=(Ft="",nt)=>{if(!Ft||Ft.trim()==="")return!0;const gn=cn.current.instance.getModel().getLineTokens(nt);let Sn=!1;for(let Ee=0;Ee<2;Ee++)gn.getStandardTokenType(Ee)===1&&(Sn=!0);return Sn};(0,ie.useEffect)(()=>{var Ft;const nt=(Ft=cn.current)==null?void 0:Ft.instance;if(nt&&fn&&Dt){const Yt=nt.onDidBlurEditorWidget(()=>{Gn.current=!1}),gn=nt.onDidFocusEditorText(()=>{Gn.current=!0});return()=>{Yt.dispose(),gn.dispose()}}},[cn.current,fn,Dt]),(0,ie.useEffect)(()=>{var Ft;if((Ft=cn.current)!=null&&Ft.instance&&fn&&un){let nt=cn.current.instance,Yt=nt.getModel();if(!Yt)return;(()=>{var Je;let $t=[],Lt=[];const An=Yt.getAllDecorations();for(let yn of An)yn.options.className==="highlighted-line"&&($t.push((Je=yn==null?void 0:yn.range)==null?void 0:Je.startLineNumber),Lt.push(yn==null?void 0:yn.id));if(dt===$t[0])return;Yt.deltaDecorations(Lt,[]);const Xt=Yt.getLineCount();dt&&dt<=Xt&&(nt.deltaDecorations([],[{range:new Te.Range(dt,1,dt,Yt.getLineMaxColumn(dt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),nt.revealLineInCenter(dt))})();const Sn=(Je=!1)=>{var $t;let Lt=[],An=[];const Xt=Yt.getAllDecorations();for(let yn of Xt)yn.options.linesDecorationsClassName==="breakpoints-select"&&(Lt.push(($t=yn==null?void 0:yn.range)==null?void 0:$t.startLineNumber),An.push(yn==null?void 0:yn.id));if(Je)return{lines:Lt,ids:An};Jt(Lt)},Ee=Je=>ue(void 0,null,function*(){let $t={range:new Te.Range(Je,1,Je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Yt.deltaDecorations([],[$t]),Sn()}),Fe=Je=>ue(void 0,null,function*(){let $t=[];const Lt=nt.getLineDecorations(Je);for(let An of Lt)An.options.linesDecorationsClassName==="breakpoints-select"&&$t.push(An.id);yield Yt.deltaDecorations($t,[]),Sn()}),Wt=Je=>{let $t=nt.getLineDecorations(Je);for(let Lt of $t)if(Lt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,It.isEqual)(Bt,Sn(!0).lines)){Yt.deltaDecorations(Sn(!0).ids,[]);const Je=Bt.map($t=>({range:new Te.Range($t,1,$t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Yt.deltaDecorations([],Je)}const Ct=nt.onDidChangeModelContent(Je=>{let $t=nt.getPosition();if($t){let Lt=$t.lineNumber;clearTimeout(sr.current),sr.current=setTimeout(()=>{ft(Yt.getLineContent(Lt),Lt)?Fe(Lt):Wt(Lt)?(Fe(Lt),Ee(Lt)):Sn()},100)}}),We=nt.onMouseDown(Je=>{var $t,Lt,An;if(Je.target.detail&&((An=(Lt=($t=Je.target)==null?void 0:$t.element)==null?void 0:Lt.className)!=null&&An.includes("line-numbers"))){let Xt=Je.target.position.lineNumber;if(ft(Yt.getLineContent(Xt),Xt))return;Wt(Xt)?Fe(Xt):Ee(Xt)}}),kt=Je=>{let $t={range:new Te.Range(Je,1,Je,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Zn.current=nt.deltaDecorations(Zn.current,[$t])},qt=()=>{Zn.current=nt.deltaDecorations(Zn.current,[])},rn=nt.onMouseMove(Je=>{var $t,Lt,An;if(qt(),Je.target.detail&&((An=(Lt=($t=Je.target)==null?void 0:$t.element)==null?void 0:Lt.className)!=null&&An.includes("line-numbers"))){let Xt=Je.target.position.lineNumber;if(ft(Yt.getLineContent(Xt),Xt))return;kt(Xt)}}),dn=nt.onMouseLeave(()=>{qt()});return()=>{Ct.dispose(),We.dispose(),rn.dispose(),dn.dispose()}}},[cn.current,fn,Bt,dt,un,z]),(0,ie.useEffect)(()=>{var Ft;(Ft=cn.current)!=null&&Ft.instance&&un&&cn.current.instance.setPosition({lineNumber:0,column:0})},[dt]);function gt(){let Ft=cn.current.instance;if(Ft){const nt=Ft.getSelection(),Yt=cn.current.pastePos||{},gn=new Te.Range(Yt.startLineNumber||nt.endLineNumber,Yt.startColumn||nt.endColumn,Yt.endLineNumber||nt.endLineNumber,Yt.endColumn||nt.endColumn);setTimeout(()=>{Ft.executeEdits("",[{range:gn,text:""}])},300)}}function xt(Ft){(window.navigator.platform.match("Mac")?Ft.metaKey:Ft.ctrlKey)&&Ft.keyCode==83&&(Ft.preventDefault(),St())}const _t=()=>{if(wt&&cn.current.instance){const Ft=cn.current.instance.getContentHeight();xn(Ft<ae?ae:Ft)}else xn(ae)};function Cn(Ft){var nt=document.createEvent("MouseEvents");nt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ft.dispatchEvent(nt)}const mn=Ft=>{if(!Gn.current)return;const{keyCode:nt,ctrlKey:Yt,metaKey:gn,target:Sn,type:Ee}=Ft;return(Ee==="paste"||(nt===67||nt===86)&&(gn||Yt))&&Sn.nodeName==="TEXTAREA"&&(En(),Ft.preventDefault()),!1};function tn(Ft,nt){var Yt=window.URL||window.webkitURL||window,gn=new Blob([nt]),Sn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Sn.href=Yt.createObjectURL(gn),Sn.download=Ft,Cn(Sn)}(0,ie.useEffect)(()=>{_t()},[_t]),(0,ie.useEffect)(()=>{_n.current&&!fn&&Promise.all([fe.e(8909),fe.e(5028)]).then(fe.bind(fe,71448)).then(Ft=>{try{Te=Ft,cn.current.instance=Te.editor.create(_n.current,{value:te,language:Pe(z),theme:be,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Qt||!1}},ne);const nt=cn.current.instance;let Sn=[...ze.BH._menuItems].find(Ct=>Ct[0]._debugName=="EditorContext")[1],Ee=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fe=(Ct,We)=>{var kt,qt;let rn=Ct._first;do We.includes((qt=(kt=rn.element)==null?void 0:kt.command)==null?void 0:qt.id)&&Ct._remove(rn);while(rn=rn.next)};if(zt(nt,Te),setTimeout(()=>{_t(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{tn(sn||"educoder.txt",nt.getValue())}})},500),cn.current.subscription=nt.onDidChangeModelContent(Ct=>{Mr.current?clearTimeout(Nr.current):(_t(),jt(nt.getValue(),Ct)),Nr.current=setTimeout(()=>{Mr.current=!1},500)}),window.Monaco||Oe(Te,Pe(z)),Dt&&(Fe(Sn,Ee),_n.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",mn),window.removeEventListener("paste",mn),window.addEventListener("keydown",mn),window.addEventListener("paste",mn)),window.Monaco=Te,je&&nt.onDidBlurEditorWidget(()=>{je(nt.getValue())}),en&&nt.onDidFocusEditorText(()=>{Dt&&bt(),en(nt.getValue())}),Dt){bt();try{nt.onDidPaste(Ct=>{const We=nt.getSelection(),kt=cn.current.pastePos||{},qt=new Te.Range(kt.startLineNumber||We.endLineNumber,kt.startColumn||We.endColumn,kt.endLineNumber||We.endLineNumber,kt.endColumn||We.endColumn);nt.executeEdits("",[{range:Ct.range,text:""}])})}catch(Ct){}}let Wt=Un();return Zt&&typeof Zt=="string"&&new Ue(Zt,nt,Te),Wn(!0),()=>{const Ct=cn.current.instance;Ct.dispose();const We=Ct.getModel();We&&We.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Wt.unobserve(_n.current)}}catch(nt){}})},[]),(0,ie.useEffect)(()=>{if(cn.current.instance&&fn)return document.addEventListener("keydown",xt,!1),()=>{document.removeEventListener("keydown",xt)}},[St,fn]),(0,ie.useEffect)(()=>{let Ft=cn.current.instance;if(Ft&&fn){let nt=Pe(z);Te.editor.setModelLanguage(Ft.getModel(),nt)}},[z,fn]),(0,ie.useEffect)(()=>{cn.current.instance&&fn&&Te.editor.setTheme(be)},[be,fn]),(0,ie.useEffect)(()=>{let Ft=cn.current.instance;wn.current=le,Ft&&fn&&(Ft.updateOptions(lt({},le)),setTimeout(()=>{Ft.getModel().updateOptions(lt({},le))},200))},[JSON.stringify(le),fn]),(0,ie.useEffect)(()=>{let Ft=cn.current.instance;Ft&&fn&&Ft.layout()},[ut,ae,fn]);const[Ln,Mn]=(0,ie.useState)(Be(ut)),[kn,xn]=(0,ie.useState)(Be(ae)),Bn=$e(lt({},re),{width:Ln,height:kn,position:"relative"});return ie.createElement("div",{className:"my-monaco-editor",ref:_n,style:Bn},Mt&&ie.createElement(Ze.CopyToClipboard,{text:te,onCopy:()=>Qe.ZP.success("\u590D\u5236\u6210\u529F")},ie.createElement(Ve.Z,{title:"\u590D\u5236\u4EE3\u7801"},ie.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ie.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function mt({width:ke="100%",height:tt="100%",original:ut,modified:ae,language:te,options:z={}}){const re=(0,ie.useRef)(),[le,ne]=(0,ie.useState)(null);function be(wt){let Dt;return re.current&&(Dt=new ot.Z(jt=>{for(let zt of jt)(zt.target.offsetHeight>0||zt.target.offsetWidth>0)&&wt.layout()}),Dt.observe(re.current)),Dt}(0,ie.useEffect)(()=>(re.current&&Promise.all([fe.e(8909),fe.e(9404)]).then(fe.bind(fe,2550)).then(wt=>{Te=wt;const Dt=Te.editor.createDiffEditor(re.current,$e(lt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},z),{wordWrap:!0}));ne(Dt);let jt=be(Dt);return()=>{Dt.dispose();const zt=Dt.getModel();zt&&zt.dispose(),jt.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ie.useEffect)(()=>{le&&le.setModel({original:Te.editor.createModel(ut,te),modified:Te.editor.createModel(ae,te)})},[ut,ae,te,le]);const je=Be(ke),Mt=Be(tt),St={width:je,height:Mt};return ie.createElement("div",{className:"my-diff-editor",ref:re,style:St})}},929:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return ve}});var ie={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},ot=fe(29787),Ne=fe(25399),_e=fe(60242),me=fe(92310),ge=fe.n(me),Ae=fe(49661),Ie=fe(57884),we=fe(34055),pe=fe(59301),ve=({className:ht,dataSource:Oe=[],col:De=4,right:Re,bottom:Le=23,precision:st=0,wrapWidth:ct=1200,trackEventItems:vt,loading:Ue,onRemove:ze=()=>{},isCurrent:Qe=!0,showProgress:Ve=!1,showAlias:It=!1})=>{const Ye=Math.floor((ct-(De-1)*Re)/De),Ze=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return pe.createElement(ot.Z,{spinning:Ue},pe.createElement("div",{className:ge()(ie.list,ht)},!!(Oe!=null&&Oe.length)&&(Oe==null?void 0:Oe.map((at,Me)=>{var Ge,Ce,He,Tt,yt,lt;const{name:$e,id:he,identifier:ue,featured:Be,school_name:rt,image_url:qe,excellent:ye,is_plan:Pe}=at;return pe.createElement("div",{key:he,className:Qe&&Ve?ie.wrapisCurrent:ie.wrap,style:{width:Ye,marginRight:(1+Me)%De===0?0:Re+st,marginBottom:Le}},pe.createElement("a",{className:ie.li,onClick:Te=>{Te.preventDefault(),Te.stopPropagation(),vt&&(0,Ae.L9)([vt]),(0,Ae.xg)(`/paths/${ue}`)}},pe.createElement("div",{className:ie.img},pe.createElement("img",{className:ie.cover,src:`${qe}`}),Qe&&(0,we.bg)()&&(at==null?void 0:at.studying)&&pe.createElement("div",{className:`${ie.movebq} user-path-items`,onClick:Te=>{Te.stopPropagation(),ze(at)}},pe.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),pe.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ge=at==null?void 0:at.subject_tags)==null?void 0:Ge.map((Te,bt)=>{var Ke,mt;if(bt===0){const tt=(Ke=Ze.find(ut=>ut.name==Te))==null?void 0:Ke.swimg;return pe.createElement("img",{className:ie.sign,src:tt,style:{left:"-4px"}})}const ke=(mt=Ze.find(tt=>tt.name==Te))==null?void 0:mt.ptimg;return pe.createElement("img",{className:ie.sign,src:ke,style:{left:`${48+52*(bt-1)+2*bt}px`}})}),pe.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(at==null?void 0:at.excellent)&&pe.createElement("div",{className:ie.bq},"\u5F00\u653E\u8BFE\u7A0B"))),pe.createElement("div",{className:ie.name},pe.createElement(Ne.Z,{title:It&&(at!=null&&at.excellent_alias_name)?pe.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${$e}`,pe.createElement("br",null),pe.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${at==null?void 0:at.excellent_alias_name}`)):$e},pe.createElement("span",{className:ie.e},It&&(at==null?void 0:at.excellent_alias_name)||$e))),Qe&&Ve&&((Ce=at==null?void 0:at.progress)==null?void 0:Ce.all_score)!=0&&pe.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},pe.createElement(_e.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((He=at==null?void 0:at.progress)==null?void 0:He.my_score)/((Tt=at==null?void 0:at.progress)==null?void 0:Tt.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(yt=at==null?void 0:at.progress)==null?void 0:yt.my_score,"/",(lt=at==null?void 0:at.progress)==null?void 0:lt.all_score),(!Qe||!Ve)&&pe.createElement(Ne.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${rt}`},pe.createElement("div",{className:ie.unit},pe.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),rt)),(!Qe||!Ve)&&pe.createElement("div",{className:ie.tags},pe.createElement("div",null,pe.createElement(Ne.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},pe.createElement("span",null,pe.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),pe.createElement("span",null,at.stages_count))),pe.createElement(Ne.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},pe.createElement("span",null,pe.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),pe.createElement("span",null,at.members_count)))))))})),!Oe.length&&pe.createElement(Ie.Z,null)))}},71360:function(Pt,Ot,fe){"use strict";fe.d(Ot,{jL:function(){return me},w9:function(){return Be},QD:function(){return Vt},cQ:function(){return yt.Z},op:function(){return jt},O5:function(){return tr},_b:function(){return ln},t7:function(){return st},Gi:function(){return bt},YG:function(){return Pe},qp:function(){return it},vr:function(){return un},qE:function(){return Jt},Je:function(){return Ue},wb:function(){return Tt},cq:function(){return ae},tp:function(){return Oe}});var ie=fe(59301),ot={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gB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avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",me=({dataSource:ft=[],img:gt,imgWidth:xt=346,title:_t,sunTitle:Cn,bannerExtraContent:mn})=>ie.createElement("div",{className:ot.banner},ie.createElement("div",{className:ot.content},ie.createElement("aside",null,ie.createElement("p",null,ie.createElement("b",null,_t),ie.createElement("span",null,Cn)),ft.length>0&&ie.createElement("div",{className:ot.btns},ft.map((tn,Ln)=>ie.createElement("div",{key:Ln,onClick:tn.click},tn.name,tn.sign?ie.createElement("img",{src:Ne,width:39}):null))),mn),gt&&ie.createElement("img",{style:{marginTop:33,marginRight:38},src:gt,width:xt}))),ge={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Ae=fe(92310),Ie=fe.n(Ae),we=fe(89392),it=({dataSource:ft=[],value:gt,onChange:xt,onTitleChange:_t,className:Cn,title:mn,titleWidth:tn=41,style:Ln={},fontColor:Mn="#6A7283",showCount:kn})=>{const[xn,Bn]=(0,ie.useState)(0),[Ft,nt]=(0,ie.useState)(!1),Yt=(0,ie.useRef)(null),gn=(0,ie.useRef)(null);return(0,ie.useEffect)(()=>{var Sn;ft.length!==0&&(((Sn=Yt==null?void 0:Yt.current)==null?void 0:Sn.clientHeight)>97?Bn(1):Bn(0)),ft.length===0&&Bn(0),nt(!1)},[ft]),ie.createElement("div",{className:Ie()(ge.row,Cn),style:Ln},ie.createElement("div",{onClick:(0,we.throttle)(()=>_t==null?void 0:_t(),2e3),style:{width:tn,marginTop:Ft?12:4},className:`${ge.title} ${_t?"current":""}`},mn),ie.createElement("div",{className:Ft?`${ge.tagsWrap} ${ge.tagsBorderWrap}`:ge.tagsWrap},ie.createElement("div",{className:ge.bar,ref:gn,style:xn>0?{height:xn===1?97:"auto",overflow:xn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ie.createElement("div",{className:ge.tag,ref:Yt},ft==null?void 0:ft.map(Sn=>ie.createElement("span",{onClick:()=>xt(Sn.id),key:Sn.id,style:{color:Mn},className:gt===Sn.id?ge.active:""},ie.createElement("span",{title:Sn.name,className:ge.name},Sn.name),!!kn&&ie.createElement("span",{className:ge.num},Sn.count))))),!!xn&&ie.createElement(ie.Fragment,null,xn===1?ie.createElement("div",{onClick:()=>{var Sn;Bn(2),((Sn=Yt==null?void 0:Yt.current)==null?void 0:Sn.clientHeight)>245?nt(!0):nt(!1)},className:ge.action},"\u5C55\u5F00",ie.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ie.createElement("div",{onClick:()=>{gn.current.scrollTop=0,Bn(1),nt(!1)},className:ge.action},"\u6536\u8D77",ie.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},ve={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Oe=({dataSource:ft=[],value:gt,onChange:xt,className:_t,style:Cn={}})=>ie.createElement("div",{style:Cn,className:Ie()(ve.tabs,_t)},ft.map(mn=>ie.createElement("span",{onClick:()=>xt(mn.id),className:gt===mn.id?ve.active:"",key:mn.id},mn.name))),De={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},Re=fe(37568),st=({dataSource:ft=[],value:gt="",onChange:xt,onInputChange:_t=()=>{},className:Cn,style:mn={},placeholder:tn,allowClear:Ln=!1})=>{var Mn;const[kn,xn]=(0,ie.useState)(""),[Bn,Ft]=(0,ie.useState)("");(0,ie.useEffect)(()=>{var gn;let Sn=gt;(gn=JSON.stringify(gt))!=null&&gn.includes("{")&&(xn(gt.id),Sn=gt.value||"");try{Ft(decodeURIComponent(Sn||""))}catch(Ee){Ft(decodeURIComponent(Sn||""))}},[gt]);const nt=()=>{xt(encodeURIComponent(Bn),kn||null)},Yt=gn=>{gn!==kn&&(xn(gn),xt(encodeURIComponent(Bn),gn))};return ie.createElement("div",{className:Ie()(De.input,Cn),style:mn},!!ft.length&&ie.createElement("div",{className:De.dropdown},ie.createElement("div",{className:De.text},(Mn=ft.find(gn=>gn.id===kn))==null?void 0:Mn.name,ie.createElement("i",{className:"iconfont icon-zhankai4"}),ie.createElement("b",{className:De.b1}),ie.createElement("b",{className:De.b2})),ie.createElement("div",{className:De.menu},ft.map((gn,Sn)=>ie.createElement("div",{key:Sn,onClick:()=>Yt(gn.id)},gn.name)))),ie.createElement(Re.default,{onPressEnter:nt,value:Bn,onChange:gn=>{Ft(gn.target.value),_t(encodeURIComponent(gn.target.value),kn||null)},bordered:!1,placeholder:tn}),ie.createElement("i",{onClick:nt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ct={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Ue=({value:ft,onChange:gt,className:xt,total:_t,pageSize:Cn,style:mn={}})=>{const tn=ft<2,Ln=ft>=Math.ceil(_t/Cn);return _t<=Cn?ie.createElement(ie.Fragment,null):ie.createElement("div",{className:Ie()(ct.quickPager,xt),style:mn},ie.createElement("div",{onClick:()=>{tn||gt(ft-1,"prev")},className:tn?ct.disabled:""},"\u4E0A\u4E00\u9875"),ie.createElement("div",{onClick:()=>{Ln||gt(ft+1,"next")},className:Ln?ct.disabled:""},"\u4E0B\u4E00\u9875"))},ze={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Qe=fe(29787),Ve=fe(25399),It=fe(58018),Ye=fe(90524),Ze=fe(49661),at=fe(96908),Me=fe(57177),Ge=fe(81378),Ce=fe(57884),Tt=({className:ft,dataSource:gt=[],col:xt=4,right:_t,bottom:Cn=23,precision:mn=0,wrapWidth:tn=1200,trackEventItems:Ln,loading:Mn})=>{const kn=Math.floor((tn-(xt-1)*_t)/xt);return ie.createElement(Qe.Z,{spinning:Mn},ie.createElement("div",{className:Ie()(ze.list,ft)},!!gt.length&>.map((xn,Bn)=>{const{name:Ft,id:nt,identifier:Yt,power:gn,cover_image_id:Sn,pic:Ee}=xn;return ie.createElement("div",{className:ze.wrap,key:nt,style:{width:kn,marginRight:(1+Bn)%xt===0?0:_t+mn,marginBottom:Cn}},ie.createElement("a",{target:"_blank",href:`/shixuns/${Yt}/challenges`,className:ze.li,onClick:Fe=>{Fe.preventDefault(),Ln&&(0,Ze.L9)([Ln]),gn&&(0,Ze.xg)(`/shixuns/${Yt}/challenges`)}},ie.createElement("div",{className:ze.img},ie.createElement("img",{className:ze.cover,src:`${Ee}`}),xn.is_jupyter&&ie.createElement("img",{className:ze.sign,src:at}),xn.is_jupyter_lab&&ie.createElement("img",{className:ze.sign,src:Me}),xn.is_unity_3d&&ie.createElement("img",{className:ze.sign,src:Ge})),ie.createElement("div",{className:ze.name},ie.createElement(Ve.Z,{title:Ft||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ie.createElement("span",{className:ze.e},Ft||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ie.createElement("div",{className:ze.tags},ie.createElement(Ve.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ie.createElement("span",null,xn.challenges_count))),!!xn.myshixuns_count&&ie.createElement(Ve.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ie.createElement("span",null,xn.myshixuns_count))),ie.createElement(Ve.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ie.createElement("span",null,ie.createElement("span",null,xn.level))),ie.createElement("div",{className:ze.rate},ie.createElement(It.Z,{allowHalf:!0,disabled:!0,defaultValue:xn.score_info}),ie.createElement("span",null,"\xA0",xn.score_info?`${xn.score_info}\u5206`:"5\u5206")))),!gn&&ie.createElement("div",{className:ze.lockWrap},ie.createElement("img",{src:`${Ye.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ie.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!gt.length&&ie.createElement(Ce.Z,null)))},yt=fe(929),lt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},$e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGV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OEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",he=fe(59301),Be=({className:ft,dataSource:gt=[],col:xt=4,right:_t,bottom:Cn=23,precision:mn=0,wrapWidth:tn=1200,trackEventItems:Ln,loading:Mn,handleVery:kn=()=>!0})=>{const xn=Math.floor((tn-(xt-1)*_t)/xt);return he.createElement(Qe.Z,{spinning:Mn},he.createElement("div",{className:Ie()(lt.list,ft)},!!gt.length&>.map((Bn,Ft)=>{const{subject_identifier:nt,id:Yt,identifier:gn,power:Sn}=Bn,Ee=Bn.is_public!=0&&Bn.is_public;return he.createElement("div",{className:lt.wrap,key:Yt,style:{width:xn,marginRight:(1+Ft)%xt===0?0:_t+mn,marginBottom:Cn}},he.createElement("a",{className:lt.li,onClick:Fe=>{Fe.preventDefault(),kn(Bn==null?void 0:Bn.first_category_url)&&(Ln&&(0,Ze.L9)([Ln]),(0,Ze.xg)(Bn.first_category_url))}},he.createElement("div",{className:lt.top},he.createElement(Ve.Z,{title:Bn.name},he.createElement("div",{className:lt.name},Bn.name)),he.createElement("img",{className:lt.img,src:Ye.Z.IMG_SERVER+"/images/"+Bn.avatar_url}),he.createElement("div",{className:lt.text,title:Bn.creator},Bn.creator),nt&&he.createElement("div",{className:lt.btns},he.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),he.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Ee&&he.createElement("div",{className:lt.sign},"\u516C\u5F00")),he.createElement("div",{className:lt.bottom},Bn.visits>0&&he.createElement(Ve.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-liulanyan"}),he.createElement("span",null,Bn.visits))),Bn.course_members_count>0&&he.createElement(Ve.Z,{title:"\u6210\u5458",placement:"bottom"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-chengyuan"}),Bn.course_members_count)),Bn.tasks_count>0&&he.createElement(Ve.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},he.createElement("span",null,he.createElement("i",{className:"iconfont icon-zuoye"}),Bn.tasks_count)),Bn.is_end?he.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):he.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Bn.is_accessible&&he.createElement("div",{className:lt.lockWrap},he.createElement("img",{src:`${Ye.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),he.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!gt.length&&he.createElement(Ce.Z,null)))},rt={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},qe=fe(76560),Pe=({dataSource:ft=[],value:gt,onChange:xt,className:_t,style:Cn={},tabBarExtraContent:mn})=>ie.createElement("div",{className:Ie()(rt.tabs,_t),style:Cn},ie.createElement("div",{className:rt.tabsWrap},ft.map((tn,Ln)=>!(tn!=null&&tn.hide)&&ie.createElement("aside",{className:rt.tab,onClick:()=>{xt(tn.id),tn.link&&qe.history.push(tn.link)},key:Ln},ie.createElement("div",{className:gt===tn.id?rt.active:""},tn.name),(tn==null?void 0:tn.resetCount)==null&&(tn==null?void 0:tn.total)!==void 0&&ie.createElement("span",null,"\uFF08",tn==null?void 0:tn.total,"\uFF09"),(tn==null?void 0:tn.resetCount)!==void 0&&(tn==null?void 0:tn.total)!==void 0&&ie.createElement(Ve.Z,{title:(tn==null?void 0:tn.tip)!=null?tn==null?void 0:tn.tip:""},ie.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ie.createElement("span",{style:{color:"#000"}},tn==null?void 0:tn.resetCount),"/",ie.createElement("span",null,tn==null?void 0:tn.total),"\uFF09"))))),ie.createElement("div",{className:rt.tabBar},mn)),bt=({className:ft,style:gt={},children:xt})=>ie.createElement("div",{className:Ie()(ft),style:gt},xt),Ke={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},mt=fe(75727),ke=fe(93041);const tt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ae=({sortValue:ft,dropValue:gt,className:xt,onSort:_t,onDrop:Cn,dataSource:mn=tt})=>{var tn;return ie.createElement("div",{className:Ie()(Ke.orderWrap,xt)},ie.createElement(mt.Z,{dropdownRender:()=>ie.createElement(ke.default,null,mn.map((Ln,Mn)=>ie.createElement(ke.default.Item,{key:Mn,onClick:()=>Cn(Ln.id)},Ln.name)))},ie.createElement("span",{className:Ke.orderTextWrap},(tn=mn.find(Ln=>gt===Ln.id))==null?void 0:tn.name)),ie.createElement("span",{className:Ke.orderIconWrap},ie.createElement("span",{className:Ke.orderAsc},ie.createElement("i",{className:ft==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Ke.cursorPointer} ${Ke.active}`:`iconfont icon-sanjiaoxing-up font12 ${Ke.cursorPointer}`,onClick:()=>_t(ft==="asc"?"desc":"asc")})),ie.createElement("span",{className:Ke.orderDesc},ie.createElement("i",{className:ft==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Ke.cursorPointer} ${Ke.active}`:`iconfont icon-sanjiaoxing-down font12 ${Ke.cursorPointer}`,onClick:()=>_t(ft==="asc"?"desc":"asc")}))))},te={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},z=fe(99571),re=Object.defineProperty,le=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,je=(ft,gt,xt)=>gt in ft?re(ft,gt,{enumerable:!0,configurable:!0,writable:!0,value:xt}):ft[gt]=xt,Mt=(ft,gt)=>{for(var xt in gt||(gt={}))ne.call(gt,xt)&&je(ft,xt,gt[xt]);if(le)for(var xt of le(gt))be.call(gt,xt)&&je(ft,xt,gt[xt]);return ft},St=(ft,gt)=>{var xt={};for(var _t in ft)ne.call(ft,_t)&>.indexOf(_t)<0&&(xt[_t]=ft[_t]);if(ft!=null&&le)for(var _t of le(ft))gt.indexOf(_t)<0&&be.call(ft,_t)&&(xt[_t]=ft[_t]);return xt},wt=(ft,gt,xt)=>new Promise((_t,Cn)=>{var mn=Mn=>{try{Ln(xt.next(Mn))}catch(kn){Cn(kn)}},tn=Mn=>{try{Ln(xt.throw(Mn))}catch(kn){Cn(kn)}},Ln=Mn=>Mn.done?_t(Mn.value):Promise.resolve(Mn.value).then(mn,tn);Ln((xt=xt.apply(ft,gt)).next())}),jt=ft=>{var gt=ft,{className:xt,style:_t,children:Cn,loading:mn=!1,openLoading:tn,onClick:Ln=()=>{},size:Mn="middle",shape:kn="round"}=gt,xn=St(gt,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Bn,Ft]=(0,ie.useState)(!1);return ie.createElement(z.ZP,Mt({onClick:(0,we.throttle)(nt=>wt(void 0,null,function*(){tn&&Ft(!0);try{yield Ln(nt)}catch(Yt){console.log("error",Yt)}tn&&Ft(!1)}),2e3,{leading:!0,trailing:!1}),className:Ie()(te.btn,te[`${Mn}-${kn}`],xt),style:_t,size:Mn,shape:kn,loading:Bn||mn},xn),Cn)},zt={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Jt=({className:ft,style:gt,children:xt=null,onClick:_t,title:Cn})=>ie.createElement("div",{className:Ie()(zt.head,ft),style:gt},ie.createElement("span",{className:"primary-hover",onClick:_t},ie.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ie.createElement("b",{title:Cn},Cn),ie.createElement("div",{className:zt.node},xt)),Bt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Vt=({confirmShow:ft=!0,confirmTitle:gt,confirmClick:xt,cancelShow:_t=!0,cancelTitle:Cn,cancelClick:mn,className:tn,style:Ln,confirmLoading:Mn=!1})=>ie.createElement("div",{className:Ie()(Bt.btns,tn),style:Ln},ft&&ie.createElement(z.ZP,{loading:Mn,onClick:xt,type:"primary",className:Bt.confirm},gt),_t&&ie.createElement(z.ZP,{onClick:mn,className:Bt.cancel},Cn)),nn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},un=({className:ft,style:gt={},LeftContent:xt,children:_t,RightContent:Cn})=>ie.createElement("div",{className:Ie()(nn.fixedBottom,ft),style:gt},ie.createElement("div",{className:nn.wrap},ie.createElement("div",{className:nn.left},xt),ie.createElement("div",{className:nn.center},_t),ie.createElement("div",{className:nn.right},Cn))),Zt={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},ln=({className:ft,style:gt={},dataSource:xt=[]})=>ie.createElement("div",{className:Ie()(Zt.crumbs,ft),style:gt},xt.map((_t,Cn)=>Cn<xt.length-1?ie.createElement(ie.Fragment,{key:Cn},_t.path||_t.onClick?ie.createElement("span",{className:Zt.hover,onClick:_t!=null&&_t.onClick?_t.onClick:()=>qe.history.push(_t.path)},_t.name):ie.createElement("span",null,_t.name),ie.createElement("span",null,"\xA0",">","\xA0")):ie.createElement("span",{key:Cn,style:{color:"#5F6368"}},_t.name))),_n=fe(11938),cn=Object.defineProperty,wn=Object.defineProperties,$n=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,sr=(ft,gt,xt)=>gt in ft?cn(ft,gt,{enumerable:!0,configurable:!0,writable:!0,value:xt}):ft[gt]=xt,Gn=(ft,gt)=>{for(var xt in gt||(gt={}))Mr.call(gt,xt)&&sr(ft,xt,gt[xt]);if(Zn)for(var xt of Zn(gt))Nr.call(gt,xt)&&sr(ft,xt,gt[xt]);return ft},fn=(ft,gt)=>wn(ft,$n(gt)),Wn=(ft,gt)=>{var xt={};for(var _t in ft)Mr.call(ft,_t)&>.indexOf(_t)<0&&(xt[_t]=ft[_t]);if(ft!=null&&Zn)for(var _t of Zn(ft))gt.indexOf(_t)<0&&Nr.call(ft,_t)&&(xt[_t]=ft[_t]);return xt};const{Countdown:Un}=_n.default;var tr=ft=>{var gt=ft,{onChange:xt}=gt,_t=Wn(gt,["onChange"]);const[Cn,mn]=(0,ie.useState)(null);(0,ie.useEffect)(()=>{typeof Cn=="number"&&Cn>=0&&xt(Cn)},[Cn]);const tn=Ln=>{const Mn=Math.floor(Ln/1e3);mn(Mn)};return ie.createElement(Un,fn(Gn({},_t),{onChange:tn}))}},17904:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return ot}});var ie=fe(59301);function ot(Ne,_e){const me=(0,ie.useRef)();(0,ie.useEffect)(()=>{me.current=Ne}),(0,ie.useEffect)(()=>{function ge(){me.current()}if(_e!==null){let Ae=setInterval(ge,_e);return()=>clearInterval(Ae)}},[_e])}},29572:function(Pt,Ot,fe){"use strict";fe.r(Ot),fe.d(Ot,{default:function(){return yt}});var ie=fe(59301),ot=fe(82093),Ne={flex_box_center:"flex_box_center___XSfK9",flex_space_between:"flex_space_between___fNQw6",flex_box_vertical_center:"flex_box_vertical_center___lE1Os",flex_box_center_end:"flex_box_center_end___IyHt0",flex_box_column:"flex_box_column___s_S14",wrap:"wrap___jhaRK",title:"title___yHGiU",tags:"tags___NT3qR",tag:"tag___PxWDv",btns:"btns___NjqzR"},_e=fe(6767),me=fe(37568),ge=fe(71051),Ae={flex_box_center:"flex_box_center___yia5q",flex_space_between:"flex_space_between___WWLmb",flex_box_vertical_center:"flex_box_vertical_center___N_pbo",flex_box_center_end:"flex_box_center_end___DSwEA",flex_box_column:"flex_box_column___jCGMT",add:"add___QhmVz",row:"row___jUJhV",input:"input___rAwei",title:"title___IS6B6",list:"list___oafqL",listRow:"listRow___JbnHf",listNextRow:"listNextRow___zlQFB"},Ie=fe(71360),we=fe(2978),pe=fe(89392),it=fe(49661),ve=fe(76560),ht=(lt,$e,he)=>new Promise((ue,Be)=>{var rt=Pe=>{try{ye(he.next(Pe))}catch(Te){Be(Te)}},qe=Pe=>{try{ye(he.throw(Pe))}catch(Te){Be(Te)}},ye=Pe=>Pe.done?ue(Pe.value):Promise.resolve(Pe.value).then(rt,qe);ye((he=he.apply(lt,$e)).next())}),De=({})=>{const lt=(0,ve.useParams)(),{virtual_spacesId:$e,id:he}=lt,[ue,Be]=(0,ie.useState)(""),[rt,qe]=(0,ie.useState)([]),[ye,Pe]=(0,ie.useState)(!1);(0,ie.useEffect)(()=>{he&&Te()},[he]);const Te=()=>ht(void 0,null,function*(){var tt,ut;const ae=yield(0,ot.ZP)(`/api/virtual_classrooms/${lt.virtual_spacesId}/knowledge_systems/${he}/show_content.json`,{method:"get"});(ae==null?void 0:ae.status)!==-1&&(qe((tt=ae==null?void 0:ae.members)==null?void 0:tt.module_content),Be((ut=ae==null?void 0:ae.members)==null?void 0:ut.module_name))}),bt=()=>{const tt={knowledge_point:"",content:"",target:"",class_hour:"",lesson_plan:""};qe([...rt,tt])},Ke=tt=>{const ut=rt.filter((ae,te)=>te!==tt);qe(ut)},mt=(tt,ut,ae)=>{const te=(0,pe.cloneDeep)(rt);te[ut][tt]=ae,qe(te)},ke=()=>ht(void 0,null,function*(){if(!ue){_e.ZP.warning("\u8BF7\u8F93\u5165\u6A21\u5757\u540D\u79F0");return}if(!rt.length){_e.ZP.warning("\u8BF7\u6DFB\u52A0\u77E5\u8BC6\u70B9");return}Pe(!0);let tt=`/api/virtual_classrooms/${lt.virtual_spacesId}/knowledge_systems/add_content.json`;he&&(tt=`/api/virtual_classrooms/${lt.virtual_spacesId}/knowledge_systems/${he}/update_content.json`);const ut=yield(0,ot.ZP)(tt,{method:he?"put":"post",body:{module_content:rt,module_name:ue,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});(ut==null?void 0:ut.status)!==-1&&(ut==null?void 0:ut.status)!==403&&(_e.ZP.success("\u64CD\u4F5C\u6210\u529F"),ve.history.push(`/${it.AS}/${lt.virtual_spacesId}/knowledge?active=desc&leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)),Pe(!1)});return ie.createElement("div",{style:{marginTop:he?30:0},className:Ae.add},ie.createElement("div",{className:Ae.row},ie.createElement("span",{className:"c-grey-666 font14 mr20"},"\u6A21\u5757\u540D\u79F0"),ie.createElement(me.default,{placeholder:"\u8BF7\u8F93\u5165",onChange:tt=>Be(tt.target.value),value:ue,className:Ae.input})),ie.createElement("div",{className:Ae.title},ie.createElement("b",null),ie.createElement("span",null,"\u6A21\u5757\u5185\u5BB9")),rt.map((tt,ut)=>{const{knowledge_point:ae,content:te,target:z,class_hour:re,lesson_plan:le}=tt;return ie.createElement("div",{className:Ae.list,key:ut},ie.createElement("div",{className:Ae.listRow},ie.createElement("span",null,"\u77E5\u8BC6\u70B9"),ie.createElement(me.default,{onChange:ne=>mt("knowledge_point",ut,ne.target.value),value:ae,placeholder:"\u8BF7\u8F93\u5165",className:Ae.input})),ie.createElement("div",{className:Ae.listRow},ie.createElement("span",null,"\u4E3B\u8981\u5185\u5BB9"),ie.createElement(me.default.TextArea,{onChange:ne=>mt("content",ut,ne.target.value),value:te,autoSize:{minRows:3,maxRows:6},className:Ae.input})),ie.createElement("div",{className:Ae.listRow},ie.createElement("span",null,"\u80FD\u529B\u76EE\u6807"),ie.createElement(me.default.TextArea,{onChange:ne=>mt("target",ut,ne.target.value),value:z,autoSize:{minRows:3,maxRows:6},className:Ae.input})),ie.createElement("div",{className:Ae.listRow},ie.createElement("span",null,"\u53C2\u8003\u5B66\u65F6"),ie.createElement(ge.Z,{onChange:ne=>mt("class_hour",ut,ne),precision:1,min:.1,value:re,className:Ae.input})),ie.createElement("div",{className:Ae.listNextRow},ie.createElement("span",null,"\u6559\u6848"),ie.createElement("div",{style:{flex:1}},ie.createElement(we.Z,{onChange:ne=>mt("lesson_plan",ut,ne),defaultValue:le,height:280,values:"2222"})),ie.createElement("i",{onClick:()=>Ke(ut),className:"iconfont icon-piliangshanchubeifen"})))}),ie.createElement(Ie.op,{onClick:bt,style:{display:"inline-block",marginTop:20}},ie.createElement("i",{className:"iconfont icon-tianjiashitixiaojiahao font14 mr5"}),"\u65B0\u589E\u77E5\u8BC6\u70B9"),ie.createElement(Ie.QD,{confirmTitle:"\u786E\u8BA4\u53D1\u5E03",confirmLoading:ye,confirmClick:ke,cancelClick:()=>{ve.history.push(`/${it.AS}/${lt.virtual_spacesId}/knowledge?active=desc&leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},cancelTitle:"\u53D6\u6D88",className:"mb25 mt20"}))},Re=fe(62957),Le=fe(77019),st=fe(14566),ct={flex_box_center:"flex_box_center___MWmFU",flex_space_between:"flex_space_between___YKGNN",flex_box_vertical_center:"flex_box_vertical_center___DDTno",flex_box_center_end:"flex_box_center_end___nE28i",flex_box_column:"flex_box_column___OZbik"},vt=fe(90524),Ue=fe(77277),ze=fe(59301),Qe=Object.defineProperty,Ve=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Ze=(lt,$e,he)=>$e in lt?Qe(lt,$e,{enumerable:!0,configurable:!0,writable:!0,value:he}):lt[$e]=he,at=(lt,$e)=>{for(var he in $e||($e={}))It.call($e,he)&&Ze(lt,he,$e[he]);if(Ve)for(var he of Ve($e))Ye.call($e,he)&&Ze(lt,he,$e[he]);return lt},Me=(lt,$e,he)=>new Promise((ue,Be)=>{var rt=Pe=>{try{ye(he.next(Pe))}catch(Te){Be(Te)}},qe=Pe=>{try{ye(he.throw(Pe))}catch(Te){Be(Te)}},ye=Pe=>Pe.done?ue(Pe.value):Promise.resolve(Pe.value).then(rt,qe);ye((he=he.apply(lt,$e)).next())}),Ce=({})=>{const lt=(0,ve.useParams)(),{virtual_spacesId:$e}=lt,[he,ue]=(0,ie.useState)([]),[Be,rt]=(0,ie.useState)(!1),qe={onRemove:()=>{ue([])},beforeUpload:Pe=>{var Te,bt,Ke;let mt=(Ke=Pe==null?void 0:Pe.name)==null?void 0:Ke.substring((Te=Pe==null?void 0:Pe.name)==null?void 0:Te.lastIndexOf("."),(bt=Pe==null?void 0:Pe.name)==null?void 0:bt.length);if(mt=mt==null?void 0:mt.toLowerCase(),mt!==".xls"&&mt!==".xlsx")return _e.ZP.error("\u53EA\u80FD\u4E0A\u4F20.xls,.xlsx\u683C\u5F0F\u7684\u6587\u6863"),Promise.reject();let ke=[];return ke.push(Pe),ue([...ke]),Promise.reject()},fileList:he,accept:".xls,.xlsx"},ye=()=>Me(void 0,null,function*(){var Pe;if((he==null?void 0:he.length)<=0){_e.ZP.info("\u8BF7\u4E0A\u4F20\u6587\u4EF6");return}const Te=new FormData;Te.append("file",he[0]),Te.append("virtual_module_id",window.localStorage.getItem("vtrsModuleId")),rt(!0);let bt=`/api/virtual_classrooms/${lt.virtual_spacesId}/knowledge_systems/batch_import.json`;const Ke=yield(0,ot.ZP)(bt,{method:"post",body:Te},!0);(Ke==null?void 0:Ke.status)!==-1&&(Ke==null?void 0:Ke.status)!==403&&Re.default.info({centered:!0,keyboard:!1,maskClosable:!1,okText:"\u786E\u5B9A",icon:null,title:"\u63D0\u793A",className:Ue.Z.CustomTipsModalCss,content:ze.createElement("div",null,ze.createElement("div",null,"\u6210\u529F",Ke==null?void 0:Ke.success,"\u6761"),ze.createElement("div",null,"\u5931\u8D25",((Pe=Ke==null?void 0:Ke.fail)==null?void 0:Pe.length)||0,"\u6761")),onOk:()=>{ve.history.push(`/${it.AS}/${lt.virtual_spacesId}/knowledge?active=desc&leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)}}),rt(!1)});return ze.createElement("div",{className:ct.add},ze.createElement(Le.Z,{className:"mt20"},ze.createElement("div",{className:"c-grey-666 font14 mr20 pt5"},"\u4E0A\u4F20\u6587\u4EF6"),ze.createElement("div",null,ze.createElement(st.default,at({},qe),ze.createElement(Ie.op,{style:{borderRadius:2}},ze.createElement("i",{className:"iconfont icon-tianjiashitixiaojiahao font14 mr5"}),"\u9009\u62E9\u6587\u4EF6")),ze.createElement("div",{className:"c-grey-666 font14 mt35"},"\u6CE8\u610F\uFF1A"),ze.createElement("div",{className:"c-grey-666 font14 pt5 pb5"},"1\u3001\u4EC5\u652F\u6301\u4E0A\u4F20.xlsx \u6216 .xls\u7C7B\u578B\u7684\u6587\u4EF6"),ze.createElement("div",{className:"c-grey-666 font14"},"2\u3001\u9700\u6309\u7167\u6307\u5B9A\u6A21\u677F\u4E0A\u4F20\u6570\u636E ",ze.createElement("a",{className:"ml5 mr5",onClick:()=>Me(void 0,null,function*(){(0,it.FH)("",(0,it.NY)({url:vt.Z.API_SERVER+"/api/virtual_classrooms/download_content_module_template",query:{}}))})},"\u70B9\u51FB\u4E0B\u8F7D\u6A21\u677F")))),ze.createElement(Ie.QD,{confirmTitle:"\u786E\u8BA4\u4E0A\u4F20",confirmLoading:Be,confirmClick:ye,cancelClick:()=>{ve.history.push(`/${it.AS}/${lt.virtual_spacesId}/knowledge?active=desc&leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},cancelTitle:"\u53D6\u6D88",className:"mb25 mt20"}))},He=(lt,$e,he)=>new Promise((ue,Be)=>{var rt=Pe=>{try{ye(he.next(Pe))}catch(Te){Be(Te)}},qe=Pe=>{try{ye(he.throw(Pe))}catch(Te){Be(Te)}},ye=Pe=>Pe.done?ue(Pe.value):Promise.resolve(Pe.value).then(rt,qe);ye((he=he.apply(lt,$e)).next())}),yt=({})=>{const lt=(0,ve.useParams)(),[$e,he]=(0,ie.useState)("1"),{virtual_spacesId:ue,id:Be}=lt,[rt,qe]=(0,ie.useState)(!1);(0,ie.useEffect)(()=>{Pe()},[]);const ye=[{id:"1",name:"\u5355\u4E2A\u65B0\u589E"},{id:"2",name:"\u6279\u91CF\u5BFC\u5165"}],Pe=()=>He(void 0,null,function*(){(yield(0,ot.ZP)(`/api/virtual_classrooms/${ue}/settings_auth.json`,{method:"get"})).status===0&&qe(!0)});return rt?ie.createElement("div",{className:Ne.wrap},ie.createElement(Ie.qE,{title:Be?"\u7F16\u8F91\u77E5\u8BC6\u70B9\u6A21\u5757":"\u65B0\u5EFA\u77E5\u8BC6\u70B9\u6A21\u5757",onClick:()=>ve.history.push(`/${it.AS}/${ue}/knowledge?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)}),!Be&&ie.createElement(Ie.qp,{titleWidth:56,dataSource:ye,className:"mt25",title:"\u65B0\u589E\u6A21\u5F0F",value:$e,onChange:Te=>he(Te)}),$e==="1"&&ie.createElement(De,null),$e==="2"&&ie.createElement(Ce,null)):ie.createElement(ie.Fragment,null)}},90290:function(Pt,Ot,fe){"use strict";fe.d(Ot,{AL:function(){return Ue},Iy:function(){return it},Qv:function(){return Oe},ez:function(){return vt},jb:function(){return ve}});var ie=fe(32834),ot=fe.n(ie),Ne=fe(11690),_e=fe.n(Ne);let me=1;function ge(Ye,Ze){const at=Ye.match(/^(\s+)(?:```)/);if(at===null)return Ze;const Me=at[1];return Ze.split(`
|
|
`).map(Ge=>{const Ce=Ge.match(/^\s+/);if(Ce===null)return Ge;const[He]=Ce;return He.length>=Me.length?Ge.slice(Me.length):Ge}).join(`
|
|
`)}let Ae=[],Ie=["<ul>"];const we=new(ot()).Renderer,pe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function it(){Ae.length=0,Ie=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function ht(Ye,Ze,at,Me){if(Ze>=Ye.length||Ye[Ze].level<=at)return Ze;var Ge=Ye[Ze];Me.push("<li><a href='#"+me+Ge.anchor+"'>"+Ge.text+"</a>"),Ze++;var Ce=[];return Ze=ht(Ye,Ze,Ge.level,Ce),Ce.length>0&&(Me.push("<ul>"),Ce.forEach(function(He){Me.push(He)}),Me.push("</ul>")),Me.push("</li>"),Ze=ht(Ye,Ze,at,Me),Ze}function Oe(){return ht(Ae,0,0,Ie),Ie.push("</ul>"),Ie.join("")}const De={heading(Ye){const Ze=pe.exec(Ye);if(me+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(Ye){const Ze=this.rules.block.fences.exec(Ye);if(Ze){const at=Ze[0];let Me=ge(at,Ze[3]||"");const Ge=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(Ge)>=0){const Ce=st(),He=Me;Me=Ce,ct[Ce]={type:"block",expression:He}}return{type:"code",raw:at,lang:Ge,text:Me}}}},Re=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Le=0;const st=()=>`__special_katext_id_${Le++}__`;let ct={};function vt(){return ct}function Ue(){Le=0,ct={}}function ze(Ye){return Ye=Ye.replace(Re,(Ze,at)=>{const Me=st();return ct[Me]={type:"inline",expression:at},Me}),Ye}const Qe=we.listitem;we.listitem=function(Ye){return Qe(ze(Ye))};const Ve=we.paragraph;we.paragraph=function(Ye){return Ve(ze(Ye))};const It=we.tablecell;we.tablecell=function(Ye,Ze){return It(ze(Ye),Ze)},we.code=function(Ye,Ze,at){const Me=(Ze||"").match(/\S*/)[0];return Me?["latex","katex","math"].indexOf(Me)>=0?`<p class='editormd-tex'>${Ye}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${at?Ye:(0,Ne.escape)(Ye,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(at?Ye:(0,Ne.escape)(Ye,!0))+"</code></pre>"},we.heading=function(Ye,Ze,at){let Me=this.options.headerPrefix+at.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ae.push({anchor:Me,level:Ze,text:Ye}),"<h"+Ze+' id="'+me+Me+'">'+Ye+"</h"+Ze+">"},ot().setOptions({silent:!0,gfm:!0,pedantic:!1}),ot().use({tokenizer:De,renderer:we}),Ot.ZP=ot()},99498:function(Pt,Ot,fe){(function(ie){ie(fe(89780))})(function(ie){ie.defineOption("placeholder","",function(Ie,we,pe){var it=pe&&pe!=ie.Init;if(we&&!it)Ie.on("blur",me),Ie.on("change",ge),Ie.on("swapDoc",ge),ie.on(Ie.getInputField(),"compositionupdate",Ie.state.placeholderCompose=function(){_e(Ie)}),ge(Ie);else if(!we&&it){Ie.off("blur",me),Ie.off("change",ge),Ie.off("swapDoc",ge),ie.off(Ie.getInputField(),"compositionupdate",Ie.state.placeholderCompose),ot(Ie);var ve=Ie.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}we&&!Ie.hasFocus()&&me(Ie)});function ot(Ie){Ie.state.placeholder&&(Ie.state.placeholder.parentNode.removeChild(Ie.state.placeholder),Ie.state.placeholder=null)}function Ne(Ie){ot(Ie);var we=Ie.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Ie.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var pe=Ie.getOption("placeholder");typeof pe=="string"&&(pe=document.createTextNode(pe)),we.appendChild(pe),Ie.display.lineSpace.insertBefore(we,Ie.display.lineSpace.firstChild)}function _e(Ie){setTimeout(function(){var we=!1,pe=Ie.getInputField();pe.nodeName=="TEXTAREA"?we=!pe.value:Ie.lineCount()==1&&(we=!/[^\u200b]/.test(pe.querySelector(".CodeMirror-line").textContent)),we?Ne(Ie):ot(Ie)},20)}function me(Ie){Ae(Ie)&&Ne(Ie)}function ge(Ie){var we=Ie.getWrapperElement(),pe=Ae(Ie);we.className=we.className.replace(" CodeMirror-empty","")+(pe?" CodeMirror-empty":""),pe?Ne(Ie):ot(Ie)}function Ae(Ie){return Ie.lineCount()===1&&Ie.getLine(0)===""}})},25717:function(Pt,Ot,fe){(function(ie){ie(fe(89780))})(function(ie){var ot={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ne=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(De,Re,Le){Le&&Le!=ie.Init&&(De.removeKeyMap(me),De.state.closeBrackets=null),Re&&(ge(_e(Re,"pairs")),De.state.closeBrackets=Re,De.addKeyMap(me))});function _e(De,Re){return Re=="pairs"&&typeof De=="string"?De:typeof De=="object"&&De[Re]!=null?De[Re]:ot[Re]}var me={Backspace:we,Enter:pe};function ge(De){for(var Re=0;Re<De.length;Re++){var Le=De.charAt(Re),st="'"+Le+"'";me[st]||(me[st]=Ae(Le))}}ge(ot.pairs+"`");function Ae(De){return function(Re){return ve(Re,De)}}function Ie(De){var Re=De.state.closeBrackets;if(!Re||Re.override)return Re;var Le=De.getModeAt(De.getCursor());return Le.closeBrackets||Re}function we(De){var Re=Ie(De);if(!Re||De.getOption("disableInput"))return ie.Pass;for(var Le=_e(Re,"pairs"),st=De.listSelections(),ct=0;ct<st.length;ct++){if(!st[ct].empty())return ie.Pass;var vt=ht(De,st[ct].head);if(!vt||Le.indexOf(vt)%2!=0)return ie.Pass}for(var ct=st.length-1;ct>=0;ct--){var Ue=st[ct].head;De.replaceRange("",Ne(Ue.line,Ue.ch-1),Ne(Ue.line,Ue.ch+1),"+delete")}}function pe(De){var Re=Ie(De),Le=Re&&_e(Re,"explode");if(!Le||De.getOption("disableInput"))return ie.Pass;for(var st=De.listSelections(),ct=0;ct<st.length;ct++){if(!st[ct].empty())return ie.Pass;var vt=ht(De,st[ct].head);if(!vt||Le.indexOf(vt)%2!=0)return ie.Pass}De.operation(function(){var Ue=De.lineSeparator()||`
|
|
`;De.replaceSelection(Ue+Ue,null),De.execCommand("goCharLeft"),st=De.listSelections();for(var ze=0;ze<st.length;ze++){var Qe=st[ze].head.line;De.indentLine(Qe,null,!0),De.indentLine(Qe+1,null,!0)}})}function it(De){var Re=ie.cmpPos(De.anchor,De.head)>0;return{anchor:new Ne(De.anchor.line,De.anchor.ch+(Re?-1:1)),head:new Ne(De.head.line,De.head.ch+(Re?1:-1))}}function ve(De,Re){var Le=Ie(De);if(!Le||De.getOption("disableInput"))return ie.Pass;var st=_e(Le,"pairs"),ct=st.indexOf(Re);if(ct==-1)return ie.Pass;for(var vt=_e(Le,"closeBefore"),Ue=_e(Le,"triples"),ze=st.charAt(ct+1)==Re,Qe=De.listSelections(),Ve=ct%2==0,It,Ye=0;Ye<Qe.length;Ye++){var Ze=Qe[Ye],at=Ze.head,Me,Ge=De.getRange(at,Ne(at.line,at.ch+1));if(Ve&&!Ze.empty())Me="surround";else if((ze||!Ve)&&Ge==Re)ze&&Oe(De,at)?Me="both":Ue.indexOf(Re)>=0&&De.getRange(at,Ne(at.line,at.ch+3))==Re+Re+Re?Me="skipThree":Me="skip";else if(ze&&at.ch>1&&Ue.indexOf(Re)>=0&&De.getRange(Ne(at.line,at.ch-2),at)==Re+Re){if(at.ch>2&&/\bstring/.test(De.getTokenTypeAt(Ne(at.line,at.ch-2))))return ie.Pass;Me="addFour"}else if(ze){var Ce=at.ch==0?" ":De.getRange(Ne(at.line,at.ch-1),at);if(!ie.isWordChar(Ge)&&Ce!=Re&&!ie.isWordChar(Ce))Me="both";else return ie.Pass}else if(Ve&&(Ge.length===0||/\s/.test(Ge)||vt.indexOf(Ge)>-1))Me="both";else return ie.Pass;if(!It)It=Me;else if(It!=Me)return ie.Pass}var He=ct%2?st.charAt(ct-1):Re,Tt=ct%2?Re:st.charAt(ct+1);De.operation(function(){if(It=="skip")De.execCommand("goCharRight");else if(It=="skipThree")for(var yt=0;yt<3;yt++)De.execCommand("goCharRight");else if(It=="surround"){for(var lt=De.getSelections(),yt=0;yt<lt.length;yt++)lt[yt]=He+lt[yt]+Tt;De.replaceSelections(lt,"around"),lt=De.listSelections().slice();for(var yt=0;yt<lt.length;yt++)lt[yt]=it(lt[yt]);De.setSelections(lt)}else It=="both"?(De.replaceSelection(He+Tt,null),De.triggerElectric(He+Tt),De.execCommand("goCharLeft")):It=="addFour"&&(De.replaceSelection(He+He+He+He,"before"),De.execCommand("goCharRight"))})}function ht(De,Re){var Le=De.getRange(Ne(Re.line,Re.ch-1),Ne(Re.line,Re.ch+1));return Le.length==2?Le:null}function Oe(De,Re){var Le=De.getTokenAt(Ne(Re.line,Re.ch+1));return/\bstring/.test(Le.type)&&Le.start==Re.ch&&(Re.ch==0||!/\bstring/.test(De.getTokenTypeAt(Re)))}})},6313:function(Pt,Ot,fe){(function(ie){ie(fe(89780),fe(52730))})(function(ie){ie.defineOption("autoCloseTags",!1,function(we,pe,it){if(it!=ie.Init&&it&&we.removeKeyMap("autoCloseTags"),!!pe){var ve={name:"autoCloseTags"};(typeof pe!="object"||pe.whenClosing!==!1)&&(ve["'/'"]=function(ht){return ge(ht)}),(typeof pe!="object"||pe.whenOpening!==!1)&&(ve["'>'"]=function(ht){return _e(ht)}),we.addKeyMap(ve)}});var ot=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ne=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function _e(we){if(we.getOption("disableInput"))return ie.Pass;for(var pe=we.listSelections(),it=[],ve=we.getOption("autoCloseTags"),ht=0;ht<pe.length;ht++){if(!pe[ht].empty())return ie.Pass;var Oe=pe[ht].head,De=we.getTokenAt(Oe),Re=ie.innerMode(we.getMode(),De.state),Le=Re.state,st=Re.mode.xmlCurrentTag&&Re.mode.xmlCurrentTag(Le),ct=st&&st.name;if(!ct)return ie.Pass;var vt=Re.mode.configuration=="html",Ue=typeof ve=="object"&&ve.dontCloseTags||vt&&ot,ze=typeof ve=="object"&&ve.indentTags||vt&&Ne;De.end>Oe.ch&&(ct=ct.slice(0,ct.length-De.end+Oe.ch));var Qe=ct.toLowerCase();if(!ct||De.type=="string"&&(De.end!=Oe.ch||!/[\"\']/.test(De.string.charAt(De.string.length-1))||De.string.length==1)||De.type=="tag"&&st.close||De.string.indexOf("/")==Oe.ch-De.start-1||Ue&&Ae(Ue,Qe)>-1||Ie(we,Re.mode.xmlCurrentContext&&Re.mode.xmlCurrentContext(Le)||[],ct,Oe,!0))return ie.Pass;var Ve=typeof ve=="object"&&ve.emptyTags;if(Ve&&Ae(Ve,ct)>-1){it[ht]={text:"/>",newPos:ie.Pos(Oe.line,Oe.ch+2)};continue}var It=ze&&Ae(ze,Qe)>-1;it[ht]={indent:It,text:">"+(It?`
|
|
|
|
`:"")+"</"+ct+">",newPos:It?ie.Pos(Oe.line+1,0):ie.Pos(Oe.line,Oe.ch+1)}}for(var Ye=typeof ve=="object"&&ve.dontIndentOnAutoClose,ht=pe.length-1;ht>=0;ht--){var Ze=it[ht];we.replaceRange(Ze.text,pe[ht].head,pe[ht].anchor,"+insert");var at=we.listSelections().slice(0);at[ht]={head:Ze.newPos,anchor:Ze.newPos},we.setSelections(at),!Ye&&Ze.indent&&(we.indentLine(Ze.newPos.line,null,!0),we.indentLine(Ze.newPos.line+1,null,!0))}}function me(we,pe){for(var it=we.listSelections(),ve=[],ht=pe?"/":"</",Oe=we.getOption("autoCloseTags"),De=typeof Oe=="object"&&Oe.dontIndentOnSlash,Re=0;Re<it.length;Re++){if(!it[Re].empty())return ie.Pass;var Le=it[Re].head,st=we.getTokenAt(Le),ct=ie.innerMode(we.getMode(),st.state),vt=ct.state;if(pe&&(st.type=="string"||st.string.charAt(0)!="<"||st.start!=Le.ch-1))return ie.Pass;var Ue,ze=ct.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(ze&&ct.mode.name=="javascript")Ue=ht+"script";else if(ze&&ct.mode.name=="css")Ue=ht+"style";else{var Qe=ct.mode.xmlCurrentContext&&ct.mode.xmlCurrentContext(vt);if(!Qe||Qe.length&&Ie(we,Qe,Qe[Qe.length-1],Le))return ie.Pass;Ue=ht+Qe[Qe.length-1]}we.getLine(Le.line).charAt(st.end)!=">"&&(Ue+=">"),ve[Re]=Ue}if(we.replaceSelections(ve),it=we.listSelections(),!De)for(var Re=0;Re<it.length;Re++)(Re==it.length-1||it[Re].head.line<it[Re+1].head.line)&&we.indentLine(it[Re].head.line)}function ge(we){return we.getOption("disableInput")?ie.Pass:me(we,!0)}ie.commands.closeTag=function(we){return me(we)};function Ae(we,pe){if(we.indexOf)return we.indexOf(pe);for(var it=0,ve=we.length;it<ve;++it)if(we[it]==pe)return it;return-1}function Ie(we,pe,it,ve,ht){if(!ie.scanForClosingTag)return!1;var Oe=Math.min(we.lastLine()+1,ve.line+500),De=ie.scanForClosingTag(we,ve,null,Oe);if(!De||De.tag!=it)return!1;for(var Re=ht?1:0,Le=pe.length-1;Le>=0&&pe[Le]==it;Le--)++Re;ve=De.to;for(var Le=1;Le<Re;Le++){var st=ie.scanForClosingTag(we,ve,null,Oe);if(!st||st.tag!=it)return!1;ve=st.to}return!0}})},52730:function(Pt,Ot,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";var ot=ie.Pos;function Ne(Le,st){return Le.line-st.line||Le.ch-st.ch}var _e="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",me=_e+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ge=new RegExp("<(/?)(["+_e+"]["+me+"]*)","g");function Ae(Le,st,ct,vt){this.line=st,this.ch=ct,this.cm=Le,this.text=Le.getLine(st),this.min=vt?Math.max(vt.from,Le.firstLine()):Le.firstLine(),this.max=vt?Math.min(vt.to-1,Le.lastLine()):Le.lastLine()}function Ie(Le,st){var ct=Le.cm.getTokenTypeAt(ot(Le.line,st));return ct&&/\btag\b/.test(ct)}function we(Le){if(!(Le.line>=Le.max))return Le.ch=0,Le.text=Le.cm.getLine(++Le.line),!0}function pe(Le){if(!(Le.line<=Le.min))return Le.text=Le.cm.getLine(--Le.line),Le.ch=Le.text.length,!0}function it(Le){for(;;){var st=Le.text.indexOf(">",Le.ch);if(st==-1){if(we(Le))continue;return}if(!Ie(Le,st+1)){Le.ch=st+1;continue}var ct=Le.text.lastIndexOf("/",st),vt=ct>-1&&!/\S/.test(Le.text.slice(ct+1,st));return Le.ch=st+1,vt?"selfClose":"regular"}}function ve(Le){for(;;){var st=Le.ch?Le.text.lastIndexOf("<",Le.ch-1):-1;if(st==-1){if(pe(Le))continue;return}if(!Ie(Le,st+1)){Le.ch=st;continue}ge.lastIndex=st,Le.ch=st;var ct=ge.exec(Le.text);if(ct&&ct.index==st)return ct}}function ht(Le){for(;;){ge.lastIndex=Le.ch;var st=ge.exec(Le.text);if(!st){if(we(Le))continue;return}if(!Ie(Le,st.index+1)){Le.ch=st.index+1;continue}return Le.ch=st.index+st[0].length,st}}function Oe(Le){for(;;){var st=Le.ch?Le.text.lastIndexOf(">",Le.ch-1):-1;if(st==-1){if(pe(Le))continue;return}if(!Ie(Le,st+1)){Le.ch=st;continue}var ct=Le.text.lastIndexOf("/",st),vt=ct>-1&&!/\S/.test(Le.text.slice(ct+1,st));return Le.ch=st+1,vt?"selfClose":"regular"}}function De(Le,st){for(var ct=[];;){var vt=ht(Le),Ue,ze=Le.line,Qe=Le.ch-(vt?vt[0].length:0);if(!vt||!(Ue=it(Le)))return;if(Ue!="selfClose")if(vt[1]){for(var Ve=ct.length-1;Ve>=0;--Ve)if(ct[Ve]==vt[2]){ct.length=Ve;break}if(Ve<0&&(!st||st==vt[2]))return{tag:vt[2],from:ot(ze,Qe),to:ot(Le.line,Le.ch)}}else ct.push(vt[2])}}function Re(Le,st){for(var ct=[];;){var vt=Oe(Le);if(!vt)return;if(vt=="selfClose"){ve(Le);continue}var Ue=Le.line,ze=Le.ch,Qe=ve(Le);if(!Qe)return;if(Qe[1])ct.push(Qe[2]);else{for(var Ve=ct.length-1;Ve>=0;--Ve)if(ct[Ve]==Qe[2]){ct.length=Ve;break}if(Ve<0&&(!st||st==Qe[2]))return{tag:Qe[2],from:ot(Le.line,Le.ch),to:ot(Ue,ze)}}}}ie.registerHelper("fold","xml",function(Le,st){for(var ct=new Ae(Le,st.line,0);;){var vt=ht(ct);if(!vt||ct.line!=st.line)return;var Ue=it(ct);if(!Ue)return;if(!vt[1]&&Ue!="selfClose"){var ze=ot(ct.line,ct.ch),Qe=De(ct,vt[2]);return Qe&&Ne(Qe.from,ze)>0?{from:ze,to:Qe.from}:null}}}),ie.findMatchingTag=function(Le,st,ct){var vt=new Ae(Le,st.line,st.ch,ct);if(!(vt.text.indexOf(">")==-1&&vt.text.indexOf("<")==-1)){var Ue=it(vt),ze=Ue&&ot(vt.line,vt.ch),Qe=Ue&&ve(vt);if(!(!Ue||!Qe||Ne(vt,st)>0)){var Ve={from:ot(vt.line,vt.ch),to:ze,tag:Qe[2]};return Ue=="selfClose"?{open:Ve,close:null,at:"open"}:Qe[1]?{open:Re(vt,Qe[2]),close:Ve,at:"close"}:(vt=new Ae(Le,ze.line,ze.ch,ct),{open:Ve,close:De(vt,Qe[2]),at:"open"})}}},ie.findEnclosingTag=function(Le,st,ct,vt){for(var Ue=new Ae(Le,st.line,st.ch,ct);;){var ze=Re(Ue,vt);if(!ze)break;var Qe=new Ae(Le,st.line,st.ch,ct),Ve=De(Qe,ze.tag);if(Ve)return{open:ze,close:Ve}}},ie.scanForClosingTag=function(Le,st,ct,vt){var Ue=new Ae(Le,st.line,st.ch,vt?{from:0,to:vt}:null);return De(Ue,ct)}})},89780:function(Pt){(function(Ot,fe){Pt.exports=fe()})(this,function(){"use strict";var Ot=navigator.userAgent,fe=navigator.platform,ie=/gecko\/\d/i.test(Ot),ot=/MSIE \d/.test(Ot),Ne=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ot),_e=/Edge\/(\d+)/.exec(Ot),me=ot||Ne||_e,ge=me&&(ot?document.documentMode||6:+(_e||Ne)[1]),Ae=!_e&&/WebKit\//.test(Ot),Ie=Ae&&/Qt\/\d+\.\d+/.test(Ot),we=!_e&&/Chrome\//.test(Ot),pe=/Opera\//.test(Ot),it=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ot),ht=/PhantomJS/.test(Ot),Oe=!_e&&/AppleWebKit/.test(Ot)&&/Mobile\/\w+/.test(Ot),De=/Android/.test(Ot),Re=Oe||De||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ot),Le=Oe||/Mac/.test(fe),st=/\bCrOS\b/.test(Ot),ct=/win/i.test(fe),vt=pe&&Ot.match(/Version\/(\d*\.\d*)/);vt&&(vt=Number(vt[1])),vt&&vt>=15&&(pe=!1,Ae=!0);var Ue=Le&&(Ie||pe&&(vt==null||vt<12.11)),ze=ie||me&&ge>=9;function Qe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var Ve=function(a,y){var x=a.className,b=Qe(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 It(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ye(a,y){return It(a).appendChild(y)}function Ze(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee<y.length;++ee)E.appendChild(y[ee]);return E}function at(a,y,x,b){var E=Ze(a,y,x,b);return E.setAttribute("role","presentation"),E}var Me;document.createRange?Me=function(a,y,x,b){var E=document.createRange();return E.setEnd(b||a,x),E.setStart(a,y),E}:Me=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 Ge(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 Ce(){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 He(a,y){var x=a.className;Qe(y).test(x)||(a.className+=(x?" ":"")+y)}function Tt(a,y){for(var x=a.split(" "),b=0;b<x.length;b++)x[b]&&!Qe(x[b]).test(y)&&(y+=" "+x[b]);return y}var yt=function(a){a.select()};Oe?yt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:me&&(yt=function(a){try{a.select()}catch(y){}});function lt(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function $e(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 he(a,y,x,b,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var ee=b||0,oe=E||0;;){var se=a.indexOf(" ",ee);if(se<0||se>=y)return oe+(y-ee);oe+=se-ee,oe+=x-oe%x,ee=se+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=lt(this.onTimeout,this)};ue.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ue.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 Be(a,y){for(var x=0;x<a.length;++x)if(a[x]==y)return x;return-1}var rt=50,qe={toString:function(){return"CodeMirror.Pass"}},ye={scroll:!1},Pe={origin:"*mouse"},Te={origin:"+move"};function bt(a,y,x){for(var b=0,E=0;;){var ee=a.indexOf(" ",b);ee==-1&&(ee=a.length);var oe=ee-b;if(ee==a.length||E+oe>=y)return b+Math.min(oe,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var Ke=[""];function mt(a){for(;Ke.length<=a;)Ke.push(ke(Ke)+" ");return Ke[a]}function ke(a){return a[a.length-1]}function tt(a,y){for(var x=[],b=0;b<a.length;b++)x[b]=y(a[b],b);return x}function ut(a,y,x){for(var b=0,E=x(y);b<a.length&&x(a[b])<=E;)b++;a.splice(b,0,y)}function ae(){}function te(a,y){var x;return Object.create?x=Object.create(a):(ae.prototype=a,x=new ae),y&&$e(y,x),x}var z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function le(a,y){return y?y.source.indexOf("\\w")>-1&&re(a)?!0:y.test(a):re(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var be=/[\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 je(a){return a.charCodeAt(0)>=768&&be.test(a)}function Mt(a,y,x){for(;(x<0?y>0:y<a.length)&&je(a.charAt(y));)y+=x;return y}function St(a,y,x){for(var b=y>x?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function wt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;ee<a.length;++ee){var oe=a[ee];(oe.from<x&&oe.to>y||y==x&&oe.to==y)&&(b(Math.max(oe.from,y),Math.min(oe.to,x),oe.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var Dt=null;function jt(a,y,x){var b;Dt=null;for(var E=0;E<a.length;++E){var ee=a[E];if(ee.from<y&&ee.to>y)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:Dt=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:Dt=E)}return b!=null?b:Dt}var zt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(de){return de<=247?a.charAt(de):1424<=de&&de<=1524?"R":1536<=de&&de<=1785?y.charAt(de-1536):1774<=de&&de<=2220?"r":8192<=de&&de<=8203?"w":de==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,oe=/[Lb1n]/,se=/[1n]/;function ce(de,xe,Se){this.level=de,this.from=xe,this.to=Se}return function(de,xe){var Se=xe=="ltr"?"L":"R";if(de.length==0||xe=="ltr"&&!b.test(de))return!1;for(var et=de.length,Xe=[],At=0;At<et;++At)Xe.push(x(de.charCodeAt(At)));for(var Rt=0,Kt=Se;Rt<et;++Rt){var on=Xe[Rt];on=="m"?Xe[Rt]=Kt:Kt=on}for(var hn=0,an=Se;hn<et;++hn){var vn=Xe[hn];vn=="1"&&an=="r"?Xe[hn]="n":ee.test(vn)&&(an=vn,vn=="r"&&(Xe[hn]="R"))}for(var Rn=1,Dn=Xe[0];Rn<et-1;++Rn){var qn=Xe[Rn];qn=="+"&&Dn=="1"&&Xe[Rn+1]=="1"?Xe[Rn]="1":qn==","&&Dn==Xe[Rn+1]&&(Dn=="1"||Dn=="n")&&(Xe[Rn]=Dn),Dn=qn}for(var Fr=0;Fr<et;++Fr){var ti=Xe[Fr];if(ti==",")Xe[Fr]="N";else if(ti=="%"){var Hr=void 0;for(Hr=Fr+1;Hr<et&&Xe[Hr]=="%";++Hr);for(var Pi=Fr&&Xe[Fr-1]=="!"||Hr<et&&Xe[Hr]=="1"?"1":"N",Si=Fr;Si<Hr;++Si)Xe[Si]=Pi;Fr=Hr-1}}for(var Yr=0,ki=Se;Yr<et;++Yr){var si=Xe[Yr];ki=="L"&&si=="1"?Xe[Yr]="L":ee.test(si)&&(ki=si)}for(var Qr=0;Qr<et;++Qr)if(E.test(Xe[Qr])){var Xr=void 0;for(Xr=Qr+1;Xr<et&&E.test(Xe[Xr]);++Xr);for(var zr=(Qr?Xe[Qr-1]:Se)=="L",Ei=(Xr<et?Xe[Xr]:Se)=="L",Go=zr==Ei?zr?"L":"R":Se,yo=Qr;yo<Xr;++yo)Xe[yo]=Go;Qr=Xr-1}for(var fi=[],qi,ni=0;ni<et;)if(oe.test(Xe[ni])){var bs=ni;for(++ni;ni<et&&oe.test(Xe[ni]);++ni);fi.push(new ce(0,bs,ni))}else{var oo=ni,Do=fi.length,Lo=xe=="rtl"?1:0;for(++ni;ni<et&&Xe[ni]!="L";++ni);for(var gi=oo;gi<ni;)if(se.test(Xe[gi])){oo<gi&&(fi.splice(Do,0,new ce(1,oo,gi)),Do+=Lo);var Uo=gi;for(++gi;gi<ni&&se.test(Xe[gi]);++gi);fi.splice(Do,0,new ce(2,Uo,gi)),Do+=Lo,oo=gi}else++gi;oo<ni&&fi.splice(Do,0,new ce(1,oo,ni))}return xe=="ltr"&&(fi[0].level==1&&(qi=de.match(/^\s+/))&&(fi[0].from=qi[0].length,fi.unshift(new ce(0,0,qi[0].length))),ke(fi).level==1&&(qi=de.match(/\s+$/))&&(ke(fi).to-=qi[0].length,fi.push(new ce(0,et-qi[0].length,et)))),xe=="rtl"?fi.reverse():fi}}();function en(a,y){var x=a.order;return x==null&&(x=a.order=zt(a.text,y)),x}var Jt=[],Bt=function(a,y,x){if(a.addEventListener)a.addEventListener(y,x,!1);else if(a.attachEvent)a.attachEvent("on"+y,x);else{var b=a._handlers||(a._handlers={});b[y]=(b[y]||Jt).concat(x)}};function sn(a,y){return a._handlers&&a._handlers[y]||Jt}function Vt(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 ee=Be(E,x);ee>-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function nn(a,y){var x=sn(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E<x.length;++E)x[E].apply(null,b)}function dt(a,y,x){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),nn(a,x||y.type,a,y),cn(y)||y.codemirrorIgnore}function un(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)Be(x,y[b])==-1&&x.push(y[b])}function Zt(a,y){return sn(a,y).length>0}function Qt(a){a.prototype.on=function(y,x){Bt(this,y,x)},a.prototype.off=function(y,x){Vt(this,y,x)}}function ln(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function _n(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function wn(a){ln(a),_n(a)}function $n(a){return a.target||a.srcElement}function Zn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Le&&a.ctrlKey&&y==1&&(y=3),y}var Mr=function(){if(me&&ge<9)return!1;var a=Ze("div");return"draggable"in a||"dragDrop"in a}(),Nr;function sr(a){if(Nr==null){var y=Ze("span","\u200B");Ye(a,Ze("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Nr=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&ge<8))}var x=Nr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var Gn;function fn(a){if(Gn!=null)return Gn;var y=Ye(a,document.createTextNode("A\u062EA")),x=Me(y,0,1).getBoundingClientRect(),b=Me(y,1,2).getBoundingClientRect();return It(a),!x||x.left==x.right?!1:Gn=b.right-x.right<3}var Wn=`
|
|
|
|
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 ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),oe=ee.indexOf("\r");oe!=-1?(x.push(ee.slice(0,oe)),y+=oe+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Un=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},En=function(){var a=Ze("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),tr=null;function ft(a){if(tr!=null)return tr;var y=Ye(a,Ze("span","x")),x=y.getBoundingClientRect(),b=Me(y,0,1).getBoundingClientRect();return tr=Math.abs(x.left-b.left)>1}var gt={},xt={};function _t(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),gt[a]=y}function Cn(a,y){xt[a]=y}function mn(a){if(typeof a=="string"&&xt.hasOwnProperty(a))a=xt[a];else if(a&&typeof a.name=="string"&&xt.hasOwnProperty(a.name)){var y=xt[a.name];typeof y=="string"&&(y={name:y}),a=te(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return mn("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return mn("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function tn(a,y){y=mn(y);var x=gt[y.name];if(!x)return tn(a,"text/plain");var b=x(a,y);if(Ln.hasOwnProperty(y.name)){var E=Ln[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var oe in y.modeProps)b[oe]=y.modeProps[oe];return b}var Ln={};function Mn(a,y){var x=Ln.hasOwnProperty(a)?Ln[a]:Ln[a]={};$e(y,x)}function kn(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 xn(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 Bn(a,y,x){return a.startState?a.startState(y,x):!0}var Ft=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};Ft.prototype.eol=function(){return this.pos>=this.string.length},Ft.prototype.sol=function(){return this.pos==this.lineStart},Ft.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ft.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ft.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},Ft.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},Ft.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Ft.prototype.skipToEnd=function(){this.pos=this.string.length},Ft.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Ft.prototype.backUp=function(a){this.pos-=a},Ft.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=he(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?he(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.indentation=function(){return he(this.string,null,this.tabSize)-(this.lineStart?he(this.string,this.lineStart,this.tabSize):0)},Ft.prototype.match=function(a,y,x){if(typeof a=="string"){var b=function(oe){return x?oe.toLowerCase():oe},E=this.string.substr(this.pos,a.length);if(b(E)==b(a))return y!==!1&&(this.pos+=a.length),!0}else{var ee=this.string.slice(this.pos).match(a);return ee&&ee.index>0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},Ft.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ft.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Ft.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Ft.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function nt(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],ee=E.chunkSize();if(y<ee){x=E;break}y-=ee}return x.lines[y]}function Yt(a,y,x){var b=[],E=y.line;return a.iter(y.line,x.line+1,function(ee){var oe=ee.text;E==x.line&&(oe=oe.slice(0,x.ch)),E==y.line&&(oe=oe.slice(y.ch)),b.push(oe),++E}),b}function gn(a,y,x){var b=[];return a.iter(y,x,function(E){b.push(E.text)}),b}function Sn(a,y){var x=y-a.height;if(x)for(var b=a;b;b=b.parent)b.height+=x}function Ee(a){if(a.parent==null)return null;for(var y=a.parent,x=Be(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 Fe(a,y){var x=a.first;e:do{for(var b=0;b<a.children.length;++b){var E=a.children[b],ee=E.height;if(y<ee){a=E;continue e}y-=ee,x+=E.chunkSize()}return x}while(!a.lines);for(var oe=0;oe<a.lines.length;++oe){var se=a.lines[oe],ce=se.height;if(y<ce)break;y-=ce}return x+oe}function Wt(a,y){return y>=a.first&&y<a.first+a.size}function Ct(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function We(a,y,x){if(x===void 0&&(x=null),!(this instanceof We))return new We(a,y,x);this.line=a,this.ch=y,this.sticky=x}function kt(a,y){return a.line-y.line||a.ch-y.ch}function qt(a,y){return a.sticky==y.sticky&&kt(a,y)==0}function rn(a){return We(a.line,a.ch)}function dn(a,y){return kt(a,y)<0?y:a}function Je(a,y){return kt(a,y)<0?a:y}function $t(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Lt(a,y){if(y.line<a.first)return We(a.first,0);var x=a.first+a.size-1;return y.line>x?We(x,nt(a,x).text.length):An(y,nt(a,y.line).text.length)}function An(a,y){var x=a.ch;return x==null||x>y?We(a.line,y):x<0?We(a.line,0):a}function Xt(a,y){for(var x=[],b=0;b<y.length;b++)x[b]=Lt(a,y[b]);return x}var yn=function(a,y){this.state=a,this.lookAhead=y},pn=function(a,y,x,b){this.state=y,this.doc=a,this.line=x,this.maxLookAhead=b||0,this.baseTokens=null,this.baseTokenPos=1};pn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},pn.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}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(a,y,x){return y instanceof yn?new pn(a,kn(a.mode,y.state),x,y.lookAhead):new pn(a,kn(a.mode,y),x)},pn.prototype.save=function(a){var y=a!==!1?kn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yn(y,this.maxLookAhead):y};function Fn(a,y,x,b){var E=[a.state.modeGen],ee={};ar(a,y.text,a.doc.mode,x,function(de,xe){return E.push(de,xe)},ee,b);for(var oe=x.state,se=function(de){x.baseTokens=E;var xe=a.state.overlays[de],Se=1,et=0;x.state=!0,ar(a,y.text,xe.mode,x,function(Xe,At){for(var Rt=Se;et<Xe;){var Kt=E[Se];Kt>Xe&&E.splice(Se,1,Xe,E[Se+1],Kt),Se+=2,et=Math.min(Xe,Kt)}if(At)if(xe.opaque)E.splice(Rt,Se-Rt,Xe,"overlay "+At),Se=Rt+2;else for(;Rt<Se;Rt+=2){var on=E[Rt+1];E[Rt+1]=(on?on+" ":"")+"overlay "+At}},ee),x.state=oe,x.baseTokens=null,x.baseTokenPos=1},ce=0;ce<a.state.overlays.length;++ce)se(ce);return{styles:E,classes:ee.bgClass||ee.textClass?ee:null}}function Pn(a,y,x){if(!y.styles||y.styles[0]!=a.state.modeGen){var b=Xn(a,Ee(y)),E=y.text.length>a.options.maxHighlightLength&&kn(a.doc.mode,b.state),ee=Fn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.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 Xn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new pn(b,!0,y);var ee=pr(a,y,x),oe=ee>b.first&&nt(b,ee-1).stateAfter,se=oe?pn.fromSaved(b,oe,ee):new pn(b,Bn(b.mode),ee);return b.iter(ee,y,function(ce){rr(a,ce.text,se);var de=se.line;ce.stateAfter=de==y-1||de%5==0||de>=E.viewFrom&&de<E.viewTo?se.save():null,se.nextLine()}),x&&(b.modeFrontier=se.line),se}function rr(a,y,x,b){var E=a.doc.mode,ee=new Ft(y,a.options.tabSize,x);for(ee.start=ee.pos=b||0,y==""&&Yn(E,x.state);!ee.eol();)hr(E,ee,x.state),ee.start=ee.pos}function Yn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var x=xn(a,y);if(x.mode.blankLine)return x.mode.blankLine(x.state)}}function hr(a,y,x,b){for(var E=0;E<10;E++){b&&(b[0]=xn(a,x).mode);var ee=a.token(y,x);if(y.pos>y.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var Hn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function wr(a,y,x,b){var E=a.doc,ee=E.mode,oe;y=Lt(E,y);var se=nt(E,y.line),ce=Xn(a,y.line,x),de=new Ft(se.text,a.options.tabSize,ce),xe;for(b&&(xe=[]);(b||de.pos<y.ch)&&!de.eol();)de.start=de.pos,oe=hr(ee,de,ce.state),b&&xe.push(new Hn(de,oe,kn(E.mode,ce.state)));return b?xe:new Hn(de,oe,ce.state)}function Rr(a,y){if(a)for(;;){var x=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!x)break;a=a.slice(0,x.index)+a.slice(x.index+x[0].length);var b=x[1]?"bgClass":"textClass";y[b]==null?y[b]=x[2]:new RegExp("(?:^|\\s)"+x[2]+"(?:$|\\s)").test(y[b])||(y[b]+=" "+x[2])}return a}function ar(a,y,x,b,E,ee,oe){var se=x.flattenSpans;se==null&&(se=a.options.flattenSpans);var ce=0,de=null,xe=new Ft(y,a.options.tabSize,b),Se,et=a.options.addModeClass&&[null];for(y==""&&Rr(Yn(x,b.state),ee);!xe.eol();){if(xe.pos>a.options.maxHighlightLength?(se=!1,oe&&rr(a,y,b,xe.pos),xe.pos=y.length,Se=null):Se=Rr(hr(x,xe,b.state,et),ee),et){var Xe=et[0].name;Xe&&(Se="m-"+(Se?Xe+" "+Se:Xe))}if(!se||de!=Se){for(;ce<xe.start;)ce=Math.min(xe.start,ce+5e3),E(ce,de);de=Se}xe.start=xe.pos}for(;ce<xe.pos;){var At=Math.min(xe.pos,ce+5e3);E(At,de),ce=At}}function pr(a,y,x){for(var b,E,ee=a.doc,oe=x?-1:y-(a.doc.mode.innerMode?1e3:100),se=y;se>oe;--se){if(se<=ee.first)return ee.first;var ce=nt(ee,se-1),de=ce.stateAfter;if(de&&(!x||se+(de instanceof yn?de.lookAhead:0)<=ee.modeFrontier))return se;var xe=he(ce.text,null,a.options.tabSize);(E==null||b>xe)&&(E=se-1,b=xe)}return E}function Er(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=nt(a,b).stateAfter;if(E&&(!(E instanceof yn)||b+E.lookAhead<y)){x=b+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,x)}}var vr=!1,er=!1;function Ar(){vr=!0}function lr(){er=!0}function ur(a,y,x){this.marker=a,this.from=y,this.to=x}function mr(a,y){if(a)for(var x=0;x<a.length;++x){var b=a[x];if(b.marker==y)return b}}function Br(a,y){for(var x,b=0;b<a.length;++b)a[b]!=y&&(x||(x=[])).push(a[b]);return x}function gr(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function ir(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],oe=ee.marker,se=ee.from==null||(oe.inclusiveLeft?ee.from<=y:ee.from<y);if(se||ee.from==y&&oe.type=="bookmark"&&(!x||!ee.marker.insertLeft)){var ce=ee.to==null||(oe.inclusiveRight?ee.to>=y:ee.to>y);(b||(b=[])).push(new ur(oe,ee.from,ce?null:ee.to))}}return b}function Jn(a,y,x){var b;if(a)for(var E=0;E<a.length;++E){var ee=a[E],oe=ee.marker,se=ee.to==null||(oe.inclusiveRight?ee.to>=y:ee.to>y);if(se||ee.from==y&&oe.type=="bookmark"&&(!x||ee.marker.insertLeft)){var ce=ee.from==null||(oe.inclusiveLeft?ee.from<=y:ee.from<y);(b||(b=[])).push(new ur(oe,ce?null:ee.from-y,ee.to==null?null:ee.to-y))}}return b}function cr(a,y){if(y.full)return null;var x=Wt(a,y.from.line)&&nt(a,y.from.line).markedSpans,b=Wt(a,y.to.line)&&nt(a,y.to.line).markedSpans;if(!x&&!b)return null;var E=y.from.ch,ee=y.to.ch,oe=kt(y.from,y.to)==0,se=ir(x,E,oe),ce=Jn(b,ee,oe),de=y.text.length==1,xe=ke(y.text).length+(de?E:0);if(se)for(var Se=0;Se<se.length;++Se){var et=se[Se];if(et.to==null){var Xe=mr(ce,et.marker);Xe?de&&(et.to=Xe.to==null?null:Xe.to+xe):et.to=E}}if(ce)for(var At=0;At<ce.length;++At){var Rt=ce[At];if(Rt.to!=null&&(Rt.to+=xe),Rt.from==null){var Kt=mr(se,Rt.marker);Kt||(Rt.from=xe,de&&(se||(se=[])).push(Rt))}else Rt.from+=xe,de&&(se||(se=[])).push(Rt)}se&&(se=Zr(se)),ce&&ce!=se&&(ce=Zr(ce));var on=[se];if(!de){var hn=y.text.length-2,an;if(hn>0&&se)for(var vn=0;vn<se.length;++vn)se[vn].to==null&&(an||(an=[])).push(new ur(se[vn].marker,null,null));for(var Rn=0;Rn<hn;++Rn)on.push(an);on.push(ce)}return on}function Zr(a){for(var y=0;y<a.length;++y){var x=a[y];x.from!=null&&x.from==x.to&&x.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Pr(a,y,x){var b=null;if(a.iter(y.line,x.line+1,function(Xe){if(Xe.markedSpans)for(var At=0;At<Xe.markedSpans.length;++At){var Rt=Xe.markedSpans[At].marker;Rt.readOnly&&(!b||Be(b,Rt)==-1)&&(b||(b=[])).push(Rt)}}),!b)return null;for(var E=[{from:y,to:x}],ee=0;ee<b.length;++ee)for(var oe=b[ee],se=oe.find(0),ce=0;ce<E.length;++ce){var de=E[ce];if(!(kt(de.to,se.from)<0||kt(de.from,se.to)>0)){var xe=[ce,1],Se=kt(de.from,se.from),et=kt(de.to,se.to);(Se<0||!oe.inclusiveLeft&&!Se)&&xe.push({from:de.from,to:se.from}),(et>0||!oe.inclusiveRight&&!et)&&xe.push({from:se.to,to:de.to}),E.splice.apply(E,xe),ce+=xe.length-3}}return E}function Sr(a){var y=a.markedSpans;if(y){for(var x=0;x<y.length;++x)y[x].marker.detachLine(a);a.markedSpans=null}}function ri(a,y){if(y){for(var x=0;x<y.length;++x)y[x].marker.attachLine(a);a.markedSpans=y}}function Dr(a){return a.inclusiveLeft?-1:0}function li(a){return a.inclusiveRight?1:0}function qr(a,y){var x=a.lines.length-y.lines.length;if(x!=0)return x;var b=a.find(),E=y.find(),ee=kt(b.from,E.from)||Dr(a)-Dr(y);if(ee)return-ee;var oe=kt(b.to,E.to)||li(a)-li(y);return oe||y.id-a.id}function _r(a,y){var x=er&&a.markedSpans,b;if(x)for(var E=void 0,ee=0;ee<x.length;++ee)E=x[ee],E.marker.collapsed&&(y?E.from:E.to)==null&&(!b||qr(b,E.marker)<0)&&(b=E.marker);return b}function zn(a){return _r(a,!0)}function Ht(a){return _r(a,!1)}function Ut(a,y){var x=er&&a.markedSpans,b;if(x)for(var E=0;E<x.length;++E){var ee=x[E];ee.marker.collapsed&&(ee.from==null||ee.from<y)&&(ee.to==null||ee.to>y)&&(!b||qr(b,ee.marker)<0)&&(b=ee.marker)}return b}function Et(a,y,x,b,E){var ee=nt(a,y),oe=er&&ee.markedSpans;if(oe)for(var se=0;se<oe.length;++se){var ce=oe[se];if(ce.marker.collapsed){var de=ce.marker.find(0),xe=kt(de.from,x)||Dr(ce.marker)-Dr(E),Se=kt(de.to,b)||li(ce.marker)-li(E);if(!(xe>=0&&Se<=0||xe<=0&&Se>=0)&&(xe<=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?kt(de.to,x)>=0:kt(de.to,x)>0)||xe>=0&&(ce.marker.inclusiveRight&&E.inclusiveLeft?kt(de.from,b)<=0:kt(de.from,b)<0)))return!0}}}function pt(a){for(var y;y=zn(a);)a=y.find(-1,!0).line;return a}function Nt(a){for(var y;y=Ht(a);)a=y.find(1,!0).line;return a}function Gt(a){for(var y,x;y=Ht(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function bn(a,y){var x=nt(a,y),b=pt(x);return x==b?y:Ee(b)}function Tn(a,y){if(y>a.lastLine())return y;var x=nt(a,y),b;if(!Kn(a,x))return y;for(;b=Ht(x);)x=b.find(1,!0).line;return Ee(x)+1}function Kn(a,y){var x=er&&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&&nr(a,y,b))return!0}}}function nr(a,y,x){if(x.to==null){var b=x.marker.find(1,!0);return nr(a,b.line,mr(b.line.markedSpans,x.marker))}if(x.marker.inclusiveRight&&x.to==y.text.length)return!0;for(var E=void 0,ee=0;ee<y.markedSpans.length;++ee)if(E=y.markedSpans[ee],E.marker.collapsed&&!E.marker.widgetNode&&E.from==x.to&&(E.to==null||E.to!=x.from)&&(E.marker.inclusiveLeft||x.marker.inclusiveRight)&&nr(a,y,E))return!0}function Qn(a){a=pt(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 ee=x.parent;ee;x=ee,ee=x.parent)for(var oe=0;oe<ee.children.length;++oe){var se=ee.children[oe];if(se==x)break;y+=se.height}return y}function yr(a){if(a.height==0)return 0;for(var y=a.text.length,x,b=a;x=zn(b);){var E=x.find(0,!0);b=E.from.line,y+=E.from.ch-E.to.ch}for(b=a;x=Ht(b);){var ee=x.find(0,!0);y-=b.text.length-ee.from.ch,b=ee.to.line,y+=b.text.length-ee.to.ch}return y}function dr(a){var y=a.display,x=a.doc;y.maxLine=nt(x,x.first),y.maxLineLength=yr(y.maxLine),y.maxLineChanged=!0,x.iter(function(b){var E=yr(b);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Or=function(a,y,x){this.text=a,ri(this,y),this.height=x?x(this):1};Or.prototype.lineNo=function(){return Ee(this)},Qt(Or);function Ai(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Sr(a),ri(a,x);var E=b?b(a):1;E!=a.height&&Sn(a,E)}function ii(a){a.parent=null,Sr(a)}var jr={},ui={};function Cr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?ui:jr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function hi(a,y){var x=at("span",null,null,Ae?"padding-right: .1px":null),b={pre:at("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 ee=E?y.rest[E-1]:y.line,oe=void 0;b.pos=0,b.addToken=br,fn(a.display.measure)&&(oe=en(ee,a.doc.direction))&&(b.addToken=pi(b.addToken,oe)),b.map=[];var se=y!=a.display.externalMeasured&&Ee(ee);bi(ee,b,Pn(a,ee,se)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=Tt(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=Tt(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(sr(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(Ae){var ce=b.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return nn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Tt(b.pre.className,b.textClass||"")),b}function Ti(a){var y=Ze("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function br(a,y,x,b,E,ee,oe){if(y){var se=a.splitSpaces?yi(y,a.trailingSpace):y,ce=a.cm.state.specialChars,de=!1,xe;if(!ce.test(y))a.col+=y.length,xe=document.createTextNode(se),a.map.push(a.pos,a.pos+y.length,xe),me&&ge<9&&(de=!0),a.pos+=y.length;else{xe=document.createDocumentFragment();for(var Se=0;;){ce.lastIndex=Se;var et=ce.exec(y),Xe=et?et.index-Se:y.length-Se;if(Xe){var At=document.createTextNode(se.slice(Se,Se+Xe));me&&ge<9?xe.appendChild(Ze("span",[At])):xe.appendChild(At),a.map.push(a.pos,a.pos+Xe,At),a.col+=Xe,a.pos+=Xe}if(!et)break;Se+=Xe+1;var Rt=void 0;if(et[0]==" "){var Kt=a.cm.options.tabSize,on=Kt-a.col%Kt;Rt=xe.appendChild(Ze("span",mt(on),"cm-tab")),Rt.setAttribute("role","presentation"),Rt.setAttribute("cm-text"," "),a.col+=on}else et[0]=="\r"||et[0]==`
|
|
`?(Rt=xe.appendChild(Ze("span",et[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Rt.setAttribute("cm-text",et[0]),a.col+=1):(Rt=a.cm.options.specialCharPlaceholder(et[0]),Rt.setAttribute("cm-text",et[0]),me&&ge<9?xe.appendChild(Ze("span",[Rt])):xe.appendChild(Rt),a.col+=1);a.map.push(a.pos,a.pos+1,Rt),a.pos++}}if(a.trailingSpace=se.charCodeAt(y.length-1)==32,x||b||E||de||ee||oe){var hn=x||"";b&&(hn+=b),E&&(hn+=E);var an=Ze("span",[xe],hn,ee);if(oe)for(var vn in oe)oe.hasOwnProperty(vn)&&vn!="style"&&vn!="class"&&an.setAttribute(vn,oe[vn]);return a.content.appendChild(an)}a.content.appendChild(xe)}}function yi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;E<a.length;E++){var ee=a.charAt(E);ee==" "&&x&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(ee="\xA0"),b+=ee,x=ee==" "}return b}function pi(a,y){return function(x,b,E,ee,oe,se,ce){E=E?E+" cm-force-border":"cm-force-border";for(var de=x.pos,xe=de+b.length;;){for(var Se=void 0,et=0;et<y.length&&(Se=y[et],!(Se.to>de&&Se.from<=de));et++);if(Se.to>=xe)return a(x,b,E,ee,oe,se,ce);a(x,b.slice(0,Se.to-de),E,ee,null,se,ce),ee=null,b=b.slice(Se.to-de),de=Se.to}}}function Hi(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 bi(a,y,x){var b=a.markedSpans,E=a.text,ee=0;if(!b){for(var oe=1;oe<x.length;oe+=2)y.addToken(y,E.slice(ee,ee=x[oe]),Cr(x[oe+1],y.cm.options));return}for(var se=E.length,ce=0,de=1,xe="",Se,et,Xe=0,At,Rt,Kt,on,hn;;){if(Xe==ce){At=Rt=Kt=et="",hn=null,on=null,Xe=1/0;for(var an=[],vn=void 0,Rn=0;Rn<b.length;++Rn){var Dn=b[Rn],qn=Dn.marker;if(qn.type=="bookmark"&&Dn.from==ce&&qn.widgetNode)an.push(qn);else if(Dn.from<=ce&&(Dn.to==null||Dn.to>ce||qn.collapsed&&Dn.to==ce&&Dn.from==ce)){if(Dn.to!=null&&Dn.to!=ce&&Xe>Dn.to&&(Xe=Dn.to,Rt=""),qn.className&&(At+=" "+qn.className),qn.css&&(et=(et?et+";":"")+qn.css),qn.startStyle&&Dn.from==ce&&(Kt+=" "+qn.startStyle),qn.endStyle&&Dn.to==Xe&&(vn||(vn=[])).push(qn.endStyle,Dn.to),qn.title&&((hn||(hn={})).title=qn.title),qn.attributes)for(var Fr in qn.attributes)(hn||(hn={}))[Fr]=qn.attributes[Fr];qn.collapsed&&(!on||qr(on.marker,qn)<0)&&(on=Dn)}else Dn.from>ce&&Xe>Dn.from&&(Xe=Dn.from)}if(vn)for(var ti=0;ti<vn.length;ti+=2)vn[ti+1]==Xe&&(Rt+=" "+vn[ti]);if(!on||on.from==ce)for(var Hr=0;Hr<an.length;++Hr)Hi(y,0,an[Hr]);if(on&&(on.from||0)==ce){if(Hi(y,(on.to==null?se+1:on.to)-ce,on.marker,on.from==null),on.to==null)return;on.to==ce&&(on=!1)}}if(ce>=se)break;for(var Pi=Math.min(se,Xe);;){if(xe){var Si=ce+xe.length;if(!on){var Yr=Si>Pi?xe.slice(0,Pi-ce):xe;y.addToken(y,Yr,Se?Se+At:At,Kt,ce+Yr.length==Xe?Rt:"",et,hn)}if(Si>=Pi){xe=xe.slice(Pi-ce),ce=Pi;break}ce=Si,Kt=""}xe=E.slice(ee,ee=x[de++]),Se=Cr(x[de++],y.cm.options)}}}function Wi(a,y,x){this.line=y,this.rest=Gt(y),this.size=this.rest?Ee(ke(this.rest))-x+1:1,this.node=this.text=null,this.hidden=Kn(a,y)}function Lr(a,y,x){for(var b=[],E,ee=y;ee<x;ee=E){var oe=new Wi(a.doc,nt(a.doc,ee),ee);E=ee+oe.size,b.push(oe)}return b}var Fi=null;function $i(a){Fi?Fi.ops.push(a):a.ownsGroup=Fi={ops:[a],delayedCallbacks:[]}}function eo(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 Vo(a,y){var x=a.ownsGroup;if(x)try{eo(x)}finally{Fi=null,y(x)}}var Yi=null;function Wr(a,y){var x=sn(a,y);if(x.length){var b=Array.prototype.slice.call(arguments,2),E;Fi?E=Fi.delayedCallbacks:Yi?E=Yi:(E=Yi=[],setTimeout(to,0));for(var ee=function(se){E.push(function(){return x[se].apply(null,b)})},oe=0;oe<x.length;++oe)ee(oe)}}function to(){var a=Yi;Yi=null;for(var y=0;y<a.length;++y)a[y]()}function ao(a,y,x,b){for(var E=0;E<y.changes.length;E++){var ee=y.changes[E];ee=="text"?so(a,y):ee=="gutter"?jn(a,y,x,b):ee=="class"?Nn(a,y):ee=="widget"&&On(a,y,b)}y.changes=null}function zi(a){return a.node==a.text&&(a.node=Ze("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),me&&ge<8&&(a.node.style.zIndex=2)),a.node}function Kr(a,y){var x=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(x&&(x+=" CodeMirror-linebackground"),y.background)x?y.background.className=x:(y.background.parentNode.removeChild(y.background),y.background=null);else if(x){var b=zi(y);y.background=b.insertBefore(Ze("div",null,x),b.firstChild),a.display.input.setUneditable(y.background)}}function bo(a,y){var x=a.display.externalMeasured;return x&&x.line==y.line?(a.display.externalMeasured=null,y.measure=x.measure,x.built):hi(a,y)}function so(a,y){var x=y.text.className,b=bo(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,Nn(a,y)):x&&(y.text.className=x)}function Nn(a,y){Kr(a,y),y.line.wrapClass?zi(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var x=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=x||""}function jn(a,y,x,b){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var E=zi(y);y.gutterBackground=Ze("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px; width: "+b.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var ee=y.line.gutterMarkers;if(a.options.lineNumbers||ee){var oe=zi(y),se=y.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?b.fixedPos:-b.gutterTotalWidth)+"px");if(a.display.input.setUneditable(se),oe.insertBefore(se,y.text),y.line.gutterClass&&(se.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!ee||!ee["CodeMirror-linenumbers"])&&(y.lineNumber=se.appendChild(Ze("div",Ct(a.options,x),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+b.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),ee)for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var de=a.display.gutterSpecs[ce].className,xe=ee.hasOwnProperty(de)&&ee[de];xe&&se.appendChild(Ze("div",[xe],"CodeMirror-gutter-elt","left: "+b.gutterLeft[de]+"px; width: "+b.gutterWidth[de]+"px"))}}}function On(a,y,x){y.alignable&&(y.alignable=null);for(var b=Qe("CodeMirror-linewidget"),E=y.node.firstChild,ee=void 0;E;E=ee)ee=E.nextSibling,b.test(E.className)&&y.node.removeChild(E);fr(a,y,x)}function In(a,y,x,b){var E=bo(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),Nn(a,y),jn(a,y,x,b),fr(a,y,b),y.node}function fr(a,y,x){if(Tr(a,y.line,y,x,!0),y.rest)for(var b=0;b<y.rest.length;b++)Tr(a,y.rest[b],y,x,!1)}function Tr(a,y,x,b,E){if(y.widgets)for(var ee=zi(x),oe=0,se=y.widgets;oe<se.length;++oe){var ce=se[oe],de=Ze("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||de.setAttribute("cm-ignore-events","true"),Zi(ce,de,x,b),a.display.input.setUneditable(de),E&&ce.above?ee.insertBefore(de,x.gutter||x.text):ee.appendChild(de),Wr(ce,"redraw")}}function Zi(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 vi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Ge(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;"),Ye(y.display.measure,Ze("div",[a.node],null,x))}return a.height=a.node.parentNode.offsetHeight}function oi(a,y){for(var x=$n(y);x!=a.wrapper;x=x.parentNode)if(!x||x.nodeType==1&&x.getAttribute("cm-ignore-events")=="true"||x.parentNode==a.sizer&&x!=a.mover)return!0}function Gr(a){return a.lineSpace.offsetTop}function _i(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Xi(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ye(a.measure,Ze("pre","x","CodeMirror-line-like")),x=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,b={left:parseInt(x.paddingLeft),right:parseInt(x.paddingRight)};return!isNaN(b.left)&&!isNaN(b.right)&&(a.cachedPaddingH=b),b}function Di(a){return rt-a.display.nativeBarWidth}function Ji(a){return a.display.scroller.clientWidth-Di(a)-a.display.barWidth}function no(a){return a.display.scroller.clientHeight-Di(a)-a.display.barHeight}function ji(a,y,x){var b=a.options.lineWrapping,E=b&&Ji(a);if(!y.measure.heights||b&&y.measure.width!=E){var ee=y.measure.heights=[];if(b){y.measure.width=E;for(var oe=y.text.firstChild.getClientRects(),se=0;se<oe.length-1;se++){var ce=oe[se],de=oe[se+1];Math.abs(ce.bottom-de.bottom)>2&&ee.push((ce.bottom+de.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function Mo(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;b<a.rest.length;b++)if(a.rest[b]==y)return{map:a.measure.maps[b],cache:a.measure.caches[b]};for(var E=0;E<a.rest.length;E++)if(Ee(a.rest[E])>x)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function Ga(a,y){y=pt(y);var x=Ee(y),b=a.display.externalMeasured=new Wi(a.doc,y,x);b.lineN=x;var E=b.built=hi(a,b);return b.text=E.pre,Ye(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Oi(a,lo(a,y),x,b)}function Qi(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[Co(a,y)];var x=a.display.externalMeasured;if(x&&y>=x.lineN&&y<x.lineN+x.size)return x}function lo(a,y){var x=Ee(y),b=Qi(a,x);b&&!b.text?b=null:b&&b.changes&&(ao(a,b,x,uo(a)),a.curOp.forceUpdate=!0),b||(b=Ga(a,y));var E=Mo(b,y,x);return{line:y,view:b,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function Oi(a,y,x,b,E){y.before&&(x=-1);var ee=x+(b||""),oe;return y.cache.hasOwnProperty(ee)?oe=y.cache[ee]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(ji(a,y.view,y.rect),y.hasHeights=!0),oe=wa(a,y,x,b),oe.bogus||(y.cache[ee]=oe)),{left:oe.left,right:oe.right,top:E?oe.rtop:oe.top,bottom:E?oe.rbottom:oe.bottom}}var ba={left:0,right:0,top:0,bottom:0};function xa(a,y,x){for(var b,E,ee,oe,se,ce,de=0;de<a.length;de+=3)if(se=a[de],ce=a[de+1],y<se?(E=0,ee=1,oe="left"):y<ce?(E=y-se,ee=E+1):(de==a.length-3||y==ce&&a[de+3]>y)&&(ee=ce-se,E=ee-1,y>=ce&&(oe="right")),E!=null){if(b=a[de+2],se==ce&&x==(b.insertLeft?"left":"right")&&(oe=x),x=="left"&&E==0)for(;de&&a[de-2]==a[de-3]&&a[de-1].insertLeft;)b=a[(de-=3)+2],oe="left";if(x=="right"&&E==ce-se)for(;de<a.length-3&&a[de+3]==a[de+4]&&!a[de+5].insertLeft;)b=a[(de+=3)+2],oe="right";break}return{node:b,start:E,end:ee,collapse:oe,coverStart:se,coverEnd:ce}}function Ua(a,y){var x=ba;if(y=="left")for(var b=0;b<a.length&&(x=a[b]).left==x.right;b++);else for(var E=a.length-1;E>=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),ee=E.node,oe=E.start,se=E.end,ce=E.collapse,de;if(ee.nodeType==3){for(var xe=0;xe<4;xe++){for(;oe&&je(y.line.text.charAt(E.coverStart+oe));)--oe;for(;E.coverStart+se<E.coverEnd&&je(y.line.text.charAt(E.coverStart+se));)++se;if(me&&ge<9&&oe==0&&se==E.coverEnd-E.coverStart?de=ee.parentNode.getBoundingClientRect():de=Ua(Me(ee,oe,se).getClientRects(),b),de.left||de.right||oe==0)break;se=oe,oe=oe-1,ce="right"}me&&ge<11&&(de=Va(a.display.measure,de))}else{oe>0&&(ce=b="right");var Se;a.options.lineWrapping&&(Se=ee.getClientRects()).length>1?de=Se[b=="right"?Se.length-1:0]:de=ee.getBoundingClientRect()}if(me&&ge<9&&!oe&&(!de||!de.left&&!de.right)){var et=ee.parentNode.getClientRects()[0];et?de={left:et.left,right:et.left+Ui(a.display),top:et.top,bottom:et.bottom}:de=ba}for(var Xe=de.top-y.rect.top,At=de.bottom-y.rect.top,Rt=(Xe+At)/2,Kt=y.view.measure.heights,on=0;on<Kt.length-1&&!(Rt<Kt[on]);on++);var hn=on?Kt[on-1]:0,an=Kt[on],vn={left:(ce=="right"?de.right:de.left)-y.rect.left,right:(ce=="left"?de.left:de.right)-y.rect.left,top:hn,bottom:an};return!de.left&&!de.right&&(vn.bogus=!0),a.options.singleCursorHeightPerLine||(vn.rtop=Xe,vn.rbottom=At),vn}function Va(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ft(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,It(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ko(a.display.view[y])}function xo(a){Yo(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Xo(){return we&&De?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ca(){return we&&De?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Jo(a){var y=0;if(a.widgets)for(var x=0;x<a.widgets.length;++x)a.widgets[x].above&&(y+=vi(a.widgets[x]));return y}function Bo(a,y,x,b,E){if(!E){var ee=Jo(y);x.top+=ee,x.bottom+=ee}if(b=="line")return x;b||(b="local");var oe=Qn(y);if(b=="local"?oe+=Gr(a.display):oe-=a.display.viewOffset,b=="page"||b=="window"){var se=a.display.lineSpace.getBoundingClientRect();oe+=se.top+(b=="window"?0:Ca());var ce=se.left+(b=="window"?0:Xo());x.left+=ce,x.right+=ce}return x.top+=oe,x.bottom+=oe,x}function Sa(a,y,x){if(x=="div")return y;var b=y.left,E=y.top;if(x=="page")b-=Xo(),E-=Ca();else if(x=="local"||!x){var ee=a.display.sizer.getBoundingClientRect();b+=ee.left,E+=ee.top}var oe=a.display.lineSpace.getBoundingClientRect();return{left:b-oe.left,top:E-oe.top}}function Po(a,y,x,b,E){return b||(b=nt(a.doc,y.line)),Bo(a,b,ya(a,b,y.ch,E),x)}function xi(a,y,x,b,E,ee){b=b||nt(a.doc,y.line),E||(E=lo(a,b));function oe(At,Rt){var Kt=Oi(a,E,At,Rt?"right":"left",ee);return Rt?Kt.left=Kt.right:Kt.right=Kt.left,Bo(a,b,Kt,x)}var se=en(b,a.doc.direction),ce=y.ch,de=y.sticky;if(ce>=b.text.length?(ce=b.text.length,de="before"):ce<=0&&(ce=0,de="after"),!se)return oe(de=="before"?ce-1:ce,de=="before");function xe(At,Rt,Kt){var on=se[Rt],hn=on.level==1;return oe(Kt?At-1:At,hn!=Kt)}var Se=jt(se,ce,de),et=Dt,Xe=xe(ce,Se,de=="before");return et!=null&&(Xe.other=xe(ce,et,de!="before")),Xe}function or(a,y){var x=0;y=Lt(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=nt(a.doc,y.line),E=Qn(b)+Gr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Vn(a,y,x,b,E){var ee=We(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function ai(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Vn(b.first,0,null,-1,-1);var E=Fe(b,x),ee=b.first+b.size-1;if(E>ee)return Vn(b.first+b.size-1,nt(b,ee).text.length,null,1,1);y<0&&(y=0);for(var oe=nt(b,E);;){var se=Gi(a,oe,E,y,x),ce=Ut(oe,se.ch+(se.xRel>0||se.outside>0?1:0));if(!ce)return se;var de=ce.find(1);if(de.line==E)return de;oe=nt(b,E=de.line)}}function ci(a,y,x,b){b-=Jo(y);var E=y.text.length,ee=St(function(oe){return Oi(a,x,oe-1).bottom<=b},E,0);return E=St(function(oe){return Oi(a,x,oe).top>b},ee,E),{begin:ee,end:E}}function Ur(a,y,x,b){x||(x=lo(a,y));var E=Bo(a,y,Oi(a,x,b),"line").top;return ci(a,y,x,E)}function Jr(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function Gi(a,y,x,b,E){E-=Qn(y);var ee=lo(a,y),oe=Jo(y),se=0,ce=y.text.length,de=!0,xe=en(y,a.doc.direction);if(xe){var Se=(a.options.lineWrapping?ro:Ii)(a,y,x,ee,xe,b,E);de=Se.level!=1,se=de?Se.from:Se.to-1,ce=de?Se.to:Se.from-1}var et=null,Xe=null,At=St(function(Rn){var Dn=Oi(a,ee,Rn);return Dn.top+=oe,Dn.bottom+=oe,Jr(Dn,b,E,!1)?(Dn.top<=E&&Dn.left<=b&&(et=Rn,Xe=Dn),!0):!1},se,ce),Rt,Kt,on=!1;if(Xe){var hn=b-Xe.left<Xe.right-b,an=hn==de;At=et+(an?0:1),Kt=an?"after":"before",Rt=hn?Xe.left:Xe.right}else{!de&&(At==ce||At==se)&&At++,Kt=At==0?"after":At==y.text.length?"before":Oi(a,ee,At-(de?1:0)).bottom+oe<=E==de?"after":"before";var vn=xi(a,We(x,At,Kt),"line",y,ee);Rt=vn.left,on=E<vn.top?-1:E>=vn.bottom?1:0}return At=Mt(y.text,At,1),Vn(x,At,Kt,on,b-Rt)}function Ii(a,y,x,b,E,ee,oe){var se=St(function(Se){var et=E[Se],Xe=et.level!=1;return Jr(xi(a,We(x,Xe?et.to:et.from,Xe?"before":"after"),"line",y,b),ee,oe,!0)},0,E.length-1),ce=E[se];if(se>0){var de=ce.level!=1,xe=xi(a,We(x,de?ce.from:ce.to,de?"after":"before"),"line",y,b);Jr(xe,ee,oe,!0)&&xe.top>oe&&(ce=E[se-1])}return ce}function ro(a,y,x,b,E,ee,oe){var se=ci(a,y,b,oe),ce=se.begin,de=se.end;/\s/.test(y.text.charAt(de-1))&&de--;for(var xe=null,Se=null,et=0;et<E.length;et++){var Xe=E[et];if(!(Xe.from>=de||Xe.to<=ce)){var At=Xe.level!=1,Rt=Oi(a,b,At?Math.min(de,Xe.to)-1:Math.max(ce,Xe.from)).right,Kt=Rt<ee?ee-Rt+1e9:Rt-ee;(!xe||Se>Kt)&&(xe=Xe,Se=Kt)}}return xe||(xe=E[E.length-1]),xe.from<ce&&(xe={from:ce,to:xe.to,level:xe.level}),xe.to>de&&(xe={from:xe.from,to:de,level:xe.level}),xe}var Li;function Mi(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Li==null){Li=Ze("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Li.appendChild(document.createTextNode("x")),Li.appendChild(Ze("br"));Li.appendChild(document.createTextNode("x"))}Ye(a.measure,Li);var x=Li.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),It(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ze("span","xxxxxxxxxx"),x=Ze("pre",[y],"CodeMirror-line-like");Ye(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function uo(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,oe=0;ee;ee=ee.nextSibling,++oe){var se=a.display.gutterSpecs[oe].className;x[se]=ee.offsetLeft+ee.clientLeft+E,b[se]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Mi(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(Kn(a.doc,E))return 0;var ee=0;if(E.widgets)for(var oe=0;oe<E.widgets.length;oe++)E.widgets[oe].height&&(ee+=E.widgets[oe].height);return x?ee+(Math.ceil(E.text.length/b)||1)*y:ee+y}}function Ya(a){var y=a.doc,x=ws(a);y.iter(function(b){var E=x(b);E!=b.height&&Sn(b,E)})}function wo(a,y,x,b){var E=a.display;if(!x&&$n(y).getAttribute("cm-not-content")=="true")return null;var ee,oe,se=E.lineSpace.getBoundingClientRect();try{ee=y.clientX-se.left,oe=y.clientY-se.top}catch(Se){return null}var ce=ai(a,ee,oe),de;if(b&&ce.xRel>0&&(de=nt(a.doc,ce.line).text).length==ce.ch){var xe=he(de,de.length,a.options.tabSize)-de.length;ce=We(ce.line,Math.max(0,Math.round((ee-Xi(a.display).left)/Ui(a.display))-xe))}return ce}function Co(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;b<x.length;b++)if(y-=x[b].size,y<0)return b}function wi(a,y,x,b){y==null&&(y=a.doc.first),x==null&&(x=a.doc.first+a.doc.size),b||(b=0);var E=a.display;if(b&&x<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)er&&bn(a.doc,y)<E.viewTo&&fo(a);else if(x<=E.viewFrom)er&&Tn(a.doc,x+b)>E.viewFrom?fo(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)fo(a);else if(y<=E.viewFrom){var ee=ka(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):fo(a)}else if(x>=E.viewTo){var oe=ka(a,y,y,-1);oe?(E.view=E.view.slice(0,oe.index),E.viewTo=oe.lineN):fo(a)}else{var se=ka(a,y,y,-1),ce=ka(a,x,x+b,1);se&&ce?(E.view=E.view.slice(0,se.index).concat(Lr(a,se.lineN,ce.lineN)).concat(E.view.slice(ce.index)),E.viewTo+=b):fo(a)}var de=E.externalMeasured;de&&(x<de.lineN?de.lineN+=b:y<de.lineN+de.size&&(E.externalMeasured=null))}function co(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 ee=b.view[Co(a,y)];if(ee.node!=null){var oe=ee.changes||(ee.changes=[]);Be(oe,x)==-1&&oe.push(x)}}}function fo(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=Co(a,y),ee,oe=a.display.view;if(!er||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var se=a.display.viewFrom,ce=0;ce<E;ce++)se+=oe[ce].size;if(se!=y){if(b>0){if(E==oe.length-1)return null;ee=se+oe[E].size-y,E++}else ee=se-y;y+=ee,x+=ee}for(;bn(a.doc,x)!=x;){if(E==(b<0?0:oe.length-1))return null;x+=b*oe[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=Lr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=Lr(a,y,b.viewFrom).concat(b.view):b.viewFrom<y&&(b.view=b.view.slice(Co(a,y))),b.viewFrom=y,b.viewTo<x?b.view=b.view.concat(Lr(a,b.viewTo,x)):b.viewTo>x&&(b.view=b.view.slice(0,Co(a,x)))),b.viewTo=x}function Cs(a){for(var y=a.display.view,x=0,b=0;b<y.length;b++){var E=y[b];!E.hidden&&(!E.node||E.changes)&&++x}return x}function Qo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ss(a,y){y===void 0&&(y=!0);for(var x=a.doc,b={},E=b.cursors=document.createDocumentFragment(),ee=b.selection=document.createDocumentFragment(),oe=0;oe<x.sel.ranges.length;oe++)if(!(!y&&oe==x.sel.primIndex)){var se=x.sel.ranges[oe];if(!(se.from().line>=a.display.viewTo||se.to().line<a.display.viewFrom)){var ce=se.empty();(ce||a.options.showCursorWhenSelecting)&&ks(a,se.head,E),ce||Wl(a,se,ee)}}return b}function ks(a,y,x){var b=xi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=x.appendChild(Ze("div","\xA0","CodeMirror-cursor"));if(E.style.left=b.left+"px",E.style.top=b.top+"px",E.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px",b.other){var ee=x.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ee.style.display="",ee.style.left=b.other.left+"px",ee.style.top=b.other.top+"px",ee.style.height=(b.other.bottom-b.other.top)*.85+"px"}}function Ea(a,y){return a.top-y.top||a.left-y.left}function Wl(a,y,x){var b=a.display,E=a.doc,ee=document.createDocumentFragment(),oe=Xi(a.display),se=oe.left,ce=Math.max(b.sizerWidth,Ji(a)-b.sizer.offsetLeft)-oe.right,de=E.direction=="ltr";function xe(an,vn,Rn,Dn){vn<0&&(vn=0),vn=Math.round(vn),Dn=Math.round(Dn),ee.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+an+`px;
|
|
top: `+vn+"px; width: "+(Rn==null?ce-an:Rn)+`px;
|
|
height: `+(Dn-vn)+"px"))}function Se(an,vn,Rn){var Dn=nt(E,an),qn=Dn.text.length,Fr,ti;function Hr(Yr,ki){return Po(a,We(an,Yr),"div",Dn,ki)}function Pi(Yr,ki,si){var Qr=Ur(a,Dn,null,Yr),Xr=ki=="ltr"==(si=="after")?"left":"right",zr=si=="after"?Qr.begin:Qr.end-(/\s/.test(Dn.text.charAt(Qr.end-1))?2:1);return Hr(zr,Xr)[Xr]}var Si=en(Dn,E.direction);return wt(Si,vn||0,Rn==null?qn:Rn,function(Yr,ki,si,Qr){var Xr=si=="ltr",zr=Hr(Yr,Xr?"left":"right"),Ei=Hr(ki-1,Xr?"right":"left"),Go=vn==null&&Yr==0,yo=Rn==null&&ki==qn,fi=Qr==0,qi=!Si||Qr==Si.length-1;if(Ei.top-zr.top<=3){var ni=(de?Go:yo)&&fi,bs=(de?yo:Go)&&qi,oo=ni?se:(Xr?zr:Ei).left,Do=bs?ce:(Xr?Ei:zr).right;xe(oo,zr.top,Do-oo,zr.bottom)}else{var Lo,gi,Uo,xs;Xr?(Lo=de&&Go&&fi?se:zr.left,gi=de?ce:Pi(Yr,si,"before"),Uo=de?se:Pi(ki,si,"after"),xs=de&&yo&&qi?ce:Ei.right):(Lo=de?Pi(Yr,si,"before"):se,gi=!de&&Go&&fi?ce:zr.right,Uo=!de&&yo&&qi?se:Ei.left,xs=de?Pi(ki,si,"after"):ce),xe(Lo,zr.top,gi-Lo,zr.bottom),zr.bottom<Ei.top&&xe(se,zr.bottom,null,Ei.top),xe(Uo,Ei.top,xs-Uo,Ei.bottom)}(!Fr||Ea(zr,Fr)<0)&&(Fr=zr),Ea(Ei,Fr)<0&&(Fr=Ei),(!ti||Ea(zr,ti)<0)&&(ti=zr),Ea(Ei,ti)<0&&(ti=Ei)}),{start:Fr,end:ti}}var et=y.from(),Xe=y.to();if(et.line==Xe.line)Se(et.line,et.ch,Xe.ch);else{var At=nt(E,et.line),Rt=nt(E,Xe.line),Kt=pt(At)==pt(Rt),on=Se(et.line,et.ch,Kt?At.text.length+1:null).end,hn=Se(Xe.line,Kt?0:null,Xe.ch).start;Kt&&(on.top<hn.top-2?(xe(on.right,on.top,null,on.bottom),xe(se,hn.top,hn.left,hn.bottom)):xe(on.right,on.top,hn.left-on.right,on.bottom)),on.bottom<hn.top&&xe(se,on.bottom,null,hn.top)}x.appendChild(ee)}function Xa(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var x=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||To(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function As(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,To(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(nn(a,"focus",a,y),a.state.focused=!0,He(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Ae&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function To(a,y){a.state.delayingBlurEvent||(a.state.focused&&(nn(a,"blur",a,y),a.state.focused=!1,Ve(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],ee=a.options.lineWrapping,oe=void 0,se=0;if(!E.hidden){if(me&&ge<8){var ce=E.node.offsetTop+E.node.offsetHeight;oe=ce-x,x=ce}else{var de=E.node.getBoundingClientRect();oe=de.bottom-de.top,!ee&&E.text.firstChild&&(se=E.text.firstChild.getBoundingClientRect().right-de.left-1)}var xe=E.line.height-oe;if((xe>.005||xe<-.005)&&(Sn(E.line,oe),Ds(E.line),E.rest))for(var Se=0;Se<E.rest.length;Se++)Ds(E.rest[Se]);if(se>a.display.sizerWidth){var et=Math.ceil(se/Ui(a.display));et>a.display.maxLineLength&&(a.display.maxLineLength=et,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ds(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var x=a.widgets[y],b=x.node.parentNode;b&&(x.height=b.offsetHeight)}}function Da(a,y,x){var b=x&&x.top!=null?Math.max(0,x.top):a.scroller.scrollTop;b=Math.floor(b-Gr(a));var E=x&&x.bottom!=null?x.bottom:b+a.wrapper.clientHeight,ee=Fe(y,b),oe=Fe(y,E);if(x&&x.ensure){var se=x.ensure.from.line,ce=x.ensure.to.line;se<ee?(ee=se,oe=Fe(y,Qn(nt(y,se))+a.wrapper.clientHeight)):Math.min(ce,y.lastLine())>=oe&&(ee=Fe(y,Qn(nt(y,ce))-a.wrapper.clientHeight),oe=ce)}return{from:ee,to:Math.max(oe,ee+1)}}function zl(a,y){if(!dt(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&&!ht){var ee=Ze("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-x.viewOffset-Gr(a.display))+`px;
|
|
height: `+(y.bottom-y.top+Di(a)+x.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?We(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?We(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var oe=!1,se=xi(a,y),ce=!x||x==y?se:xi(a,x);E={left:Math.min(se.left,ce.left),top:Math.min(se.top,ce.top)-b,right:Math.max(se.left,ce.left),bottom:Math.max(se.bottom,ce.bottom)+b};var de=Qa(a,E),xe=a.doc.scrollTop,Se=a.doc.scrollLeft;if(de.scrollTop!=null&&($o(a,de.scrollTop),Math.abs(a.doc.scrollTop-xe)>1&&(oe=!0)),de.scrollLeft!=null&&(So(a,de.scrollLeft),Math.abs(a.doc.scrollLeft-Se)>1&&(oe=!0)),!oe)break}return E}function jl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&So(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Mi(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=no(a),oe={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var se=a.doc.height+_i(x),ce=y.top<b,de=y.bottom>se-b;if(y.top<E)oe.scrollTop=ce?0:y.top;else if(y.bottom>E+ee){var xe=Math.min(y.top,(de?se:y.bottom)-ee);xe!=E&&(oe.scrollTop=xe)}var Se=a.options.fixedGutter?0:x.gutters.offsetWidth,et=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Se,Xe=Ji(a)-x.gutters.offsetWidth,At=y.right-y.left>Xe;return At&&(y.right=y.left+Xe),y.left<10?oe.scrollLeft=0:y.left<et?oe.scrollLeft=Math.max(0,y.left+Se-(At?0:10)):y.right>Xe+et-3&&(oe.scrollLeft=y.right+(At?0:10)-Xe),oe}function qa(a,y){y!=null&&(La(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Fo(a){La(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)&&La(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function Gl(a,y){La(a),a.curOp.scrollToPos=y}function La(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=or(a,y.from),b=or(a,y.to);Ls(a,x,b,y.margin)}}function Ls(a,y,x,b){var E=Qa(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(ie||es(a,{top:y}),Ms(a,y,!0),ie&&es(a),na(a,100))}function Ms(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 So(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,Ns(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+_i(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Di(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Bt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Bt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&ge<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 ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"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=Le&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ue,this.disableVert=new ue},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=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 No(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Bs(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),Bs(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Bs(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var Ps={native:ko,null:ta};function Ts(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Ve(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Ps[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Bt(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"?So(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&He(a.display.wrapper,a.display.scrollbars.addClass)}var Ul=0;function Eo(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ul},$i(a.curOp)}function Ao(a){var y=a.curOp;y&&Vo(y,function(x){for(var b=0;b<x.ops.length;b++)x.ops[b].cm.curOp=null;Vl(x)})}function Vl(a){for(var y=a.ops,x=0;x<y.length;x++)Kl(y[x]);for(var b=0;b<y.length;b++)Yl(y[b]);for(var E=0;E<y.length;E++)Xl(y[E]);for(var ee=0;ee<y.length;ee++)Jl(y[ee]);for(var oe=0;oe<y.length;oe++)Ql(y[oe])}function Kl(a){var y=a.cm,x=y.display;$l(y),a.updateMaxLine&&dr(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 Ma(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&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+Di(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-Ji(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&So(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var x=a.focus&&a.focus==Ce();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,x),(a.updatedDisplay||a.startHeight!=y.doc.height)&&No(y,a.barMeasure),a.updatedDisplay&&ns(y,a.barMeasure),a.selectionChanged&&Xa(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),x&&Es(a.cm)}function Ql(a){var y=a.cm,x=y.display,b=y.doc;if(a.updatedDisplay&&Fs(y,a.update),x.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(x.wheelStartX=x.wheelStartY=null),a.scrollTop!=null&&Ms(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&So(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=Zl(y,Lt(b,a.scrollToPos.from),Lt(b,a.scrollToPos.to),a.scrollToPos.margin);zl(y,E)}var ee=a.maybeHiddenMarkers,oe=a.maybeUnhiddenMarkers;if(ee)for(var se=0;se<ee.length;++se)ee[se].lines.length||nn(ee[se],"hide");if(oe)for(var ce=0;ce<oe.length;++ce)oe[ce].lines.length&&nn(oe[ce],"unhide");x.wrapper.offsetHeight&&(b.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&nn(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Bi(a,y){if(a.curOp)return y();Eo(a);try{return y()}finally{Ao(a)}}function $r(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Eo(a);try{return y.apply(a,arguments)}finally{Ao(a)}}}function mi(a){return function(){if(this.curOp)return a.apply(this,arguments);Eo(this);try{return a.apply(this,arguments)}finally{Ao(this)}}}function ei(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Eo(y);try{return a.apply(this,arguments)}finally{Ao(y)}}}function na(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,lt(ql,a))}function ql(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Xn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var oe=ee.styles,se=ee.text.length>a.options.maxHighlightLength?kn(y.mode,b.state):null,ce=Fn(a,ee,b,!0);se&&(b.state=se),ee.styles=ce.styles;var de=ee.styleClasses,xe=ce.classes;xe?ee.styleClasses=xe:de&&(ee.styleClasses=null);for(var Se=!oe||oe.length!=ee.styles.length||de!=xe&&(!de||!xe||de.bgClass!=xe.bgClass||de.textClass!=xe.textClass),et=0;!Se&&et<oe.length;++et)Se=oe[et]!=ee.styles[et];Se&&E.push(b.line),ee.stateAfter=b.save(),b.nextLine()}else ee.text.length<=a.options.maxHighlightLength&&rr(a,ee.text,b),ee.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&&Bi(a,function(){for(var ee=0;ee<E.length;ee++)co(a,E[ee],"text")})}}var Ma=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=Ji(a),this.force=x,this.dims=uo(a),this.events=[]};Ma.prototype.signal=function(a,y){Zt(a,y)&&this.events.push(arguments)},Ma.prototype.finish=function(){for(var a=0;a<this.events.length;a++)nn.apply(null,this.events[a])};function $l(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Di(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Di(a)+"px",y.scrollbarsClipped=!0)}function eu(a){if(a.hasFocus())return null;var y=Ce();if(!y||!Ge(a.display.lineDiv,y))return null;var x={activeElt:y};if(window.getSelection){var b=window.getSelection();b.anchorNode&&b.extend&&Ge(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==Ce())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Ge(document.body,a.anchorNode)&&Ge(document.body,a.focusNode))){var y=window.getSelection(),x=document.createRange();x.setEnd(a.anchorNode,a.anchorOffset),x.collapse(!1),y.removeAllRanges(),y.addRange(x),y.extend(a.focusNode,a.focusOffset)}}function $a(a,y){var x=a.display,b=a.doc;if(y.editorIsHidden)return fo(a),!1;if(!y.force&&y.visible.from>=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cs(a)==0)return!1;Rs(a)&&(fo(a),y.dims=uo(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),oe=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFrom<ee&&ee-x.viewFrom<20&&(ee=Math.max(b.first,x.viewFrom)),x.viewTo>oe&&x.viewTo-oe<20&&(oe=Math.min(E,x.viewTo)),er&&(ee=bn(a.doc,ee),oe=Tn(a.doc,oe));var se=ee!=x.viewFrom||oe!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ee,oe),x.viewOffset=Qn(nt(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ce=Cs(a);if(!se&&ce==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var de=eu(a);return ce>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ce>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(de),It(x.cursorDiv),It(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,se&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Fs(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==Ji(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+_i(a.display)-no(a),x.top)}),y.visible=Da(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Da(a.display,a.doc,x));if(!$a(a,y))break;Aa(a);var E=ea(a);Qo(a),No(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Ma(a,y);if($a(a,x)){Aa(a),Fs(a,x);var b=ea(a);Qo(a),No(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,oe=ee.firstChild;function se(At){var Rt=At.nextSibling;return Ae&&Le&&a.display.currentWheelTarget==At?At.style.display="none":At.parentNode.removeChild(At),Rt}for(var ce=b.view,de=b.viewFrom,xe=0;xe<ce.length;xe++){var Se=ce[xe];if(!Se.hidden)if(!Se.node||Se.node.parentNode!=ee){var et=In(a,Se,de,x);ee.insertBefore(et,oe)}else{for(;oe!=Se.node;)oe=se(oe);var Xe=E&&y!=null&&y<=de&&Se.lineNumber;Se.changes&&(Be(Se.changes,"gutter")>-1&&(Xe=!1),ao(a,Se,de,x)),Xe&&(It(Se.lineNumber),Se.lineNumber.appendChild(document.createTextNode(Ct(a.options,de)))),oe=Se.node.nextSibling}de+=Se.size}for(;oe;)oe=se(oe)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Di(a)+"px"}function Ns(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,ee=b+"px",oe=0;oe<x.length;oe++)if(!x[oe].hidden){a.options.fixedGutter&&(x[oe].gutter&&(x[oe].gutter.style.left=ee),x[oe].gutterBackground&&(x[oe].gutterBackground.style.left=ee));var se=x[oe].alignable;if(se)for(var ce=0;ce<se.length;ce++)se[ce].style.left=ee}a.options.fixedGutter&&(y.gutters.style.left=b+E+"px")}}function Rs(a){if(!a.options.lineNumbers)return!1;var y=a.doc,x=Ct(a.options,y.first+y.size-1),b=a.display;if(x.length!=b.lineNumChars){var E=b.measure.appendChild(Ze("div",[Ze("div",x)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ee=E.firstChild.offsetWidth,oe=E.offsetWidth-ee;return b.lineGutter.style.width="",b.lineNumInnerWidth=Math.max(ee,b.lineGutter.offsetWidth-oe)+1,b.lineNumWidth=b.lineNumInnerWidth+oe,b.lineNumChars=b.lineNumInnerWidth?x.length:-1,b.lineGutter.style.width=b.lineNumWidth+"px",ts(a.display),!0}return!1}function rs(a,y){for(var x=[],b=!1,E=0;E<a.length;E++){var ee=a[E],oe=null;if(typeof ee!="string"&&(oe=ee.style,ee=ee.className),ee=="CodeMirror-linenumbers")if(y)b=!0;else continue;x.push({className:ee,style:oe})}return y&&!b&&x.push({className:"CodeMirror-linenumbers",style:null}),x}function _s(a){var y=a.gutters,x=a.gutterSpecs;It(y),a.lineGutter=null;for(var b=0;b<x.length;++b){var E=x[b],ee=E.className,oe=E.style,se=y.appendChild(Ze("div",null,"CodeMirror-gutter "+ee));oe&&(se.style.cssText=oe),ee=="CodeMirror-linenumbers"&&(a.lineGutter=se,se.style.width=(a.lineNumWidth||1)+"px")}y.style.display=x.length?"":"none",ts(a)}function ra(a){_s(a.display),wi(a),Ns(a)}function ru(a,y,x,b){var E=this;this.input=x,E.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=at("div",null,"CodeMirror-code"),E.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=Ze("div",null,"CodeMirror-cursors"),E.measure=Ze("div",null,"CodeMirror-measure"),E.lineMeasure=Ze("div",null,"CodeMirror-measure"),E.lineSpace=at("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var ee=at("div",[E.lineSpace],"CodeMirror-lines");E.mover=Ze("div",[ee],null,"position: relative"),E.sizer=Ze("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=Ze("div",null,null,"position: absolute; height: "+rt+"px; width: 1px;"),E.gutters=Ze("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=Ze("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=Ze("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),me&&ge<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Ae&&!(ie&&Re)&&(E.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(E.wrapper):a(E.wrapper)),E.viewFrom=E.viewTo=y.first,E.reportedViewFrom=E.reportedViewTo=y.first,E.view=[],E.renderedView=null,E.externalMeasured=null,E.viewOffset=0,E.lastWrapHeight=E.lastWrapWidth=0,E.updateLineNumbers=null,E.nativeBarWidth=E.barHeight=E.barWidth=0,E.scrollbarsClipped=!1,E.lineNumWidth=E.lineNumInnerWidth=E.lineNumChars=null,E.alignWidgets=!1,E.cachedCharWidth=E.cachedTextHeight=E.cachedPaddingH=null,E.maxLine=null,E.maxLineLength=0,E.maxLineChanged=!1,E.wheelDX=E.wheelDY=E.wheelStartX=E.wheelStartY=null,E.shift=!1,E.selForContextMenu=null,E.activeTouch=null,E.gutterSpecs=rs(b.gutters,b.lineNumbers),_s(E),x.init(E)}var Ba=0,Ni=null;me?Ni=-.53:ie?Ni=15:we?Ni=-.7:it&&(Ni=-1/3);function Os(a){var y=a.wheelDeltaX,x=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),x==null&&a.detail&&a.axis==a.VERTICAL_AXIS?x=a.detail:x==null&&(x=a.wheelDelta),{x:y,y:x}}function iu(a){var y=Os(a);return y.x*=Ni,y.y*=Ni,y}function Is(a,y){var x=Os(y),b=x.x,E=x.y,ee=a.display,oe=ee.scroller,se=oe.scrollWidth>oe.clientWidth,ce=oe.scrollHeight>oe.clientHeight;if(b&&se||E&&ce){if(E&&Le&&Ae){e:for(var de=y.target,xe=ee.view;de!=oe;de=de.parentNode)for(var Se=0;Se<xe.length;Se++)if(xe[Se].node==de){a.display.currentWheelTarget=de;break e}}if(b&&!ie&&!pe&&Ni!=null){E&&ce&&$o(a,Math.max(0,oe.scrollTop+E*Ni)),So(a,Math.max(0,oe.scrollLeft+b*Ni)),(!E||E&&ce)&&ln(y),ee.wheelStartX=null;return}if(E&&Ni!=null){var et=E*Ni,Xe=a.doc.scrollTop,At=Xe+ee.wrapper.clientHeight;et<0?Xe=Math.max(0,Xe+et-50):At=Math.min(a.doc.height,At+et+50),es(a,{top:Xe,bottom:At})}Ba<20&&(ee.wheelStartX==null?(ee.wheelStartX=oe.scrollLeft,ee.wheelStartY=oe.scrollTop,ee.wheelDX=b,ee.wheelDY=E,setTimeout(function(){if(ee.wheelStartX!=null){var Rt=oe.scrollLeft-ee.wheelStartX,Kt=oe.scrollTop-ee.wheelStartY,on=Kt&&ee.wheelDY&&Kt/ee.wheelDY||Rt&&ee.wheelDX&&Rt/ee.wheelDX;ee.wheelStartX=ee.wheelStartY=null,on&&(Ni=(Ni*Ba+on)/(Ba+1),++Ba)}},200)):(ee.wheelDX+=b,ee.wheelDY+=E))}}var Ri=function(a,y){this.ranges=a,this.primIndex=y};Ri.prototype.primary=function(){return this.ranges[this.primIndex]},Ri.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var x=this.ranges[y],b=a.ranges[y];if(!qt(x.anchor,b.anchor)||!qt(x.head,b.head))return!1}return!0},Ri.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new xr(rn(this.ranges[y].anchor),rn(this.ranges[y].head));return new Ri(a,this.primIndex)},Ri.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Ri.prototype.contains=function(a,y){y||(y=a);for(var x=0;x<this.ranges.length;x++){var b=this.ranges[x];if(kt(y,b.from())>=0&&kt(a,b.to())<=0)return x}return-1};var xr=function(a,y){this.anchor=a,this.head=y};xr.prototype.from=function(){return Je(this.anchor,this.head)},xr.prototype.to=function(){return dn(this.anchor,this.head)},xr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vi(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(et,Xe){return kt(et.from(),Xe.from())}),x=Be(y,E);for(var ee=1;ee<y.length;ee++){var oe=y[ee],se=y[ee-1],ce=kt(se.to(),oe.from());if(b&&!oe.empty()?ce>0:ce>=0){var de=Je(se.from(),oe.from()),xe=dn(se.to(),oe.to()),Se=se.empty()?oe.from()==oe.head:se.from()==se.head;ee<=x&&--x,y.splice(--ee,2,new xr(Se?xe:de,Se?de:xe))}}return new Ri(y,x)}function ho(a,y){return new Ri([new xr(a,y||a)],0)}function po(a){return a.text?We(a.from.line+a.text.length-1,ke(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(kt(a,y.from)<0)return a;if(kt(a,y.to)<=0)return po(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+=po(y).ch-y.to.ch),We(x,b)}function is(a,y){for(var x=[],b=0;b<a.sel.ranges.length;b++){var E=a.sel.ranges[b];x.push(new xr(Hs(E.anchor,y),Hs(E.head,y)))}return Vi(a.cm,x,a.sel.primIndex)}function Ws(a,y,x){return a.line==y.line?We(x.line,a.ch-y.ch+x.ch):We(x.line+(a.line-y.line),a.ch)}function ou(a,y,x){for(var b=[],E=We(a.first,0),ee=E,oe=0;oe<y.length;oe++){var se=y[oe],ce=Ws(se.from,E,ee),de=Ws(po(se),E,ee);if(E=se.to,ee=de,x=="around"){var xe=a.sel.ranges[oe],Se=kt(xe.head,xe.anchor)<0;b[oe]=new xr(Se?de:ce,Se?ce:de)}else b[oe]=new xr(ce,ce)}return new Ri(b,a.sel.primIndex)}function os(a){a.doc.mode=tn(a.options,a.doc.modeOption),ia(a)}function ia(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,na(a,100),a.state.modeGen++,a.curOp&&wi(a)}function zs(a,y){return y.from.ch==0&&y.to.ch==0&&ke(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function as(a,y,x,b){function E(hn){return x?x[hn]:null}function ee(hn,an,vn){Ai(hn,an,vn,b),Wr(hn,"change",hn,y)}function oe(hn,an){for(var vn=[],Rn=hn;Rn<an;++Rn)vn.push(new Or(de[Rn],E(Rn),b));return vn}var se=y.from,ce=y.to,de=y.text,xe=nt(a,se.line),Se=nt(a,ce.line),et=ke(de),Xe=E(de.length-1),At=ce.line-se.line;if(y.full)a.insert(0,oe(0,de.length)),a.remove(de.length,a.size-de.length);else if(zs(a,y)){var Rt=oe(0,de.length-1);ee(Se,Se.text,Xe),At&&a.remove(se.line,At),Rt.length&&a.insert(se.line,Rt)}else if(xe==Se)if(de.length==1)ee(xe,xe.text.slice(0,se.ch)+et+xe.text.slice(ce.ch),Xe);else{var Kt=oe(1,de.length-1);Kt.push(new Or(et+xe.text.slice(ce.ch),Xe,b)),ee(xe,xe.text.slice(0,se.ch)+de[0],E(0)),a.insert(se.line+1,Kt)}else if(de.length==1)ee(xe,xe.text.slice(0,se.ch)+de[0]+Se.text.slice(ce.ch),E(0)),a.remove(se.line+1,At);else{ee(xe,xe.text.slice(0,se.ch)+de[0],E(0)),ee(Se,et+Se.text.slice(ce.ch),Xe);var on=oe(1,de.length-1);At>1&&a.remove(se.line+1,At-1),a.insert(se.line+1,on)}Wr(a,"change",a,y)}function vo(a,y,x){function b(E,ee,oe){if(E.linked)for(var se=0;se<E.linked.length;++se){var ce=E.linked[se];if(ce.doc!=ee){var de=oe&&ce.sharedHist;x&&!de||(y(ce.doc,de),b(ce.doc,E,de))}}}b(a,null,!0)}function Zs(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,Ya(a),os(a),js(a),a.options.lineWrapping||dr(a),a.options.mode=y.modeOption,wi(a)}function js(a){(a.doc.direction=="rtl"?He:Ve)(a.display.lineDiv,"CodeMirror-rtl")}function au(a){Bi(a,function(){js(a),wi(a)})}function Pa(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function ss(a,y){var x={from:rn(y.from),to:po(y),text:Yt(a,y.from,y.to)};return Vs(a,x,y.from.line,y.to.line+1),vo(a,function(b){return Vs(b,x,y.from.line,y.to.line+1)},!0),x}function Gs(a){for(;a.length;){var y=ke(a);if(y.ranges)a.pop();else break}}function su(a,y){if(y)return Gs(a.done),ke(a.done);if(a.done.length&&!ke(a.done).ranges)return ke(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),ke(a.done)}function Us(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,oe,se;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(oe=su(E,E.lastOp==b)))se=ke(oe.changes),kt(y.from,y.to)==0&&kt(y.from,se.to)==0?se.to=po(y):oe.changes.push(ss(a,y));else{var ce=ke(E.done);for((!ce||!ce.ranges)&&Ta(a.sel,E.done),oe={changes:[ss(a,y)],generation:E.generation},E.done.push(oe);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,se||nn(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||lu(a,ee,ke(E.done),y))?E.done[E.done.length-1]=y:Ta(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&Gs(E.undone)}function Ta(a,y){var x=ke(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vs(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(oe){oe.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=oe.markedSpans),++ee})}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 Ks(a,y){var x=du(a,y),b=cr(a,y);if(!x)return b;if(!b)return x;for(var E=0;E<x.length;++E){var ee=x[E],oe=b[E];if(ee&&oe)e:for(var se=0;se<oe.length;++se){for(var ce=oe[se],de=0;de<ee.length;++de)if(ee[de].marker==ce.marker)continue e;ee.push(ce)}else oe&&(x[E]=oe)}return x}function Ro(a,y,x){for(var b=[],E=0;E<a.length;++E){var ee=a[E];if(ee.ranges){b.push(x?Ri.prototype.deepCopy.call(ee):ee);continue}var oe=ee.changes,se=[];b.push({changes:se});for(var ce=0;ce<oe.length;++ce){var de=oe[ce],xe=void 0;if(se.push({from:de.from,to:de.to,text:de.text}),y)for(var Se in de)(xe=Se.match(/^spans_(\d+)$/))&&Be(y,Number(xe[1]))>-1&&(ke(se)[Se]=de[Se],delete de[Se])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=kt(y,E)<0;ee!=kt(x,E)<0?(E=y,y=x):ee!=kt(y,x)<0&&(y=x)}return new xr(E,y)}else return new xr(x||y,y)}function Fa(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),di(a,new Ri([ls(a.sel.primary(),y,x,E)],0),b)}function Ys(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee<a.sel.ranges.length;ee++)b[ee]=ls(a.sel.ranges[ee],y[ee],null,E);var oe=Vi(a.cm,b,a.sel.primIndex);di(a,oe,x)}function us(a,y,x,b){var E=a.sel.ranges.slice(0);E[y]=x,di(a,Vi(a.cm,E,a.sel.primIndex),b)}function Xs(a,y,x,b){di(a,ho(y,x),b)}function fu(a,y,x){var b={ranges:y.ranges,update:function(E){this.ranges=[];for(var ee=0;ee<E.length;ee++)this.ranges[ee]=new xr(Lt(a,E[ee].anchor),Lt(a,E[ee].head))},origin:x&&x.origin};return nn(a,"beforeSelectionChange",a,b),a.cm&&nn(a.cm,"beforeSelectionChange",a.cm,b),b.ranges!=y.ranges?Vi(a.cm,b.ranges,b.ranges.length-1):y}function Js(a,y,x){var b=a.history.done,E=ke(b);E&&E.ranges?(b[b.length-1]=y,Na(a,y,x)):di(a,y,x)}function di(a,y,x){Na(a,y,x),uu(a,a.sel,a.cm?a.cm.curOp.id:NaN,x)}function Na(a,y,x){(Zt(a,"beforeSelectionChange")||a.cm&&Zt(a.cm,"beforeSelectionChange"))&&(y=fu(a,y,x));var b=x&&x.bias||(kt(y.primary().head,a.sel.primary().head)<0?-1:1);Qs(a,$s(a,y,b,!0)),!(x&&x.scroll===!1)&&a.cm&&Fo(a.cm)}function Qs(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,un(a.cm)),Wr(a,"cursorActivity",a))}function qs(a){Qs(a,$s(a,a.sel,null,!1))}function $s(a,y,x,b){for(var E,ee=0;ee<y.ranges.length;ee++){var oe=y.ranges[ee],se=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[ee],ce=Ra(a,oe.anchor,se&&se.anchor,x,b),de=Ra(a,oe.head,se&&se.head,x,b);(E||ce!=oe.anchor||de!=oe.head)&&(E||(E=y.ranges.slice(0,ee)),E[ee]=new xr(ce,de))}return E?Vi(a.cm,E,y.primIndex):y}function _o(a,y,x,b,E){var ee=nt(a,y.line);if(ee.markedSpans)for(var oe=0;oe<ee.markedSpans.length;++oe){var se=ee.markedSpans[oe],ce=se.marker,de="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,xe="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((se.from==null||(de?se.from<=y.ch:se.from<y.ch))&&(se.to==null||(xe?se.to>=y.ch:se.to>y.ch))){if(E&&(nn(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(ee.markedSpans){--oe;continue}else break;if(!ce.atomic)continue;if(x){var Se=ce.find(b<0?1:-1),et=void 0;if((b<0?xe:de)&&(Se=el(a,Se,-b,Se&&Se.line==y.line?ee:null)),Se&&Se.line==y.line&&(et=kt(Se,x))&&(b<0?et<0:et>0))return _o(a,Se,y,b,E)}var Xe=ce.find(b<0?-1:1);return(b<0?de:xe)&&(Xe=el(a,Xe,b,Xe.line==y.line?ee:null)),Xe?_o(a,Xe,y,b,E):null}}return y}function Ra(a,y,x,b,E){var ee=b||1,oe=_o(a,y,x,ee,E)||!E&&_o(a,y,x,ee,!0)||_o(a,y,x,-ee,E)||!E&&_o(a,y,x,-ee,!0);return oe||(a.cantEdit=!0,We(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?Lt(a,We(y.line-1)):null:x>0&&y.ch==(b||nt(a,y.line)).text.length?y.line<a.first+a.size-1?We(y.line+1,0):null:new We(y.line,y.ch+x)}function tl(a){a.setSelection(We(a.firstLine(),0),We(a.lastLine()),ye)}function nl(a,y,x){var b={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return b.canceled=!0}};return x&&(b.update=function(E,ee,oe,se){E&&(b.from=Lt(a,E)),ee&&(b.to=Lt(a,ee)),oe&&(b.text=oe),se!==void 0&&(b.origin=se)}),nn(a,"beforeChange",a,b),a.cm&&nn(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 $r(a.cm,Oo)(a,y,x);if(a.cm.state.suppressEdits)return}if(!((Zt(a,"beforeChange")||a.cm&&Zt(a.cm,"beforeChange"))&&(y=nl(a,y,!0),!y))){var b=vr&&!x&&Pr(a,y.from,y.to);if(b)for(var E=b.length-1;E>=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&kt(y.from,y.to)==0)){var x=is(a,y);Us(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,cr(a,y));var b=[];vo(a,function(E,ee){!ee&&Be(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,cr(E,y))})}}function _a(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,oe=a.sel,se=y=="undo"?E.done:E.undone,ce=y=="undo"?E.undone:E.done,de=0;de<se.length&&(ee=se[de],!(x?ee.ranges&&!ee.equals(a.sel):!ee.ranges));de++);if(de!=se.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(ee=se.pop(),ee.ranges){if(Ta(ee,ce),x&&!ee.equals(a.sel)){di(a,ee,{clearRedo:!1});return}oe=ee}else if(b){se.push(ee);return}else break;var xe=[];Ta(oe,ce),ce.push({changes:xe,generation:E.generation}),E.generation=ee.generation||++E.maxGeneration;for(var Se=Zt(a,"beforeChange")||a.cm&&Zt(a.cm,"beforeChange"),et=function(Rt){var Kt=ee.changes[Rt];if(Kt.origin=y,Se&&!nl(a,Kt,!1))return se.length=0,{};xe.push(ss(a,Kt));var on=Rt?is(a,Kt):ke(se);oa(a,Kt,on,Ks(a,Kt)),!Rt&&a.cm&&a.cm.scrollIntoView({from:Kt.from,to:po(Kt)});var hn=[];vo(a,function(an,vn){!vn&&Be(hn,an.history)==-1&&(sl(an.history,Kt),hn.push(an.history)),oa(an,Kt,null,Ks(an,Kt))})},Xe=ee.changes.length-1;Xe>=0;--Xe){var At=et(Xe);if(At)return At.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ri(tt(a.sel.ranges,function(E){return new xr(We(E.anchor.line+y,E.anchor.ch),We(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){wi(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;b<x.viewTo;b++)co(a.cm,b,"gutter")}}function oa(a,y,x,b){if(a.cm&&!a.cm.curOp)return $r(a.cm,oa)(a,y,x,b);if(y.to.line<a.first){il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var E=y.text.length-1-(a.first-y.from.line);il(a,E),y={from:We(a.first,0),to:We(y.to.line+E,y.to.ch),text:[ke(y.text)],origin:y.origin}}var ee=a.lastLine();y.to.line>ee&&(y={from:y.from,to:We(ee,nt(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Yt(a,y.from,y.to),x||(x=is(a,y)),a.cm?hu(a.cm,y,b):as(a,y,b),Na(a,x,ye),a.cantEdit&&Ra(a,We(a.firstLine(),0))&&(a.cantEdit=!1)}}function hu(a,y,x){var b=a.doc,E=a.display,ee=y.from,oe=y.to,se=!1,ce=ee.line;a.options.lineWrapping||(ce=Ee(pt(nt(b,ee.line))),b.iter(ce,oe.line+1,function(Xe){if(Xe==E.maxLine)return se=!0,!0})),b.sel.contains(y.from,y.to)>-1&&un(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ce,ee.line+y.text.length,function(Xe){var At=yr(Xe);At>E.maxLineLength&&(E.maxLine=Xe,E.maxLineLength=At,E.maxLineChanged=!0,se=!1)}),se&&(a.curOp.updateMaxLine=!0)),Er(b,ee.line),na(a,400);var de=y.text.length-(oe.line-ee.line)-1;y.full?wi(a):ee.line==oe.line&&y.text.length==1&&!zs(a.doc,y)?co(a,ee.line,"text"):wi(a,ee.line,oe.line+1,de);var xe=Zt(a,"changes"),Se=Zt(a,"change");if(Se||xe){var et={from:ee,to:oe,text:y.text,removed:y.removed,origin:y.origin};Se&&Wr(a,"change",a,et),xe&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(et)}a.display.selForContextMenu=null}function Io(a,y,x,b,E){var ee;b||(b=x),kt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),Oo(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x<a.line?a.line+=b:y<a.line&&(a.line=y,a.ch=0)}function al(a,y,x,b){for(var E=0;E<a.length;++E){var ee=a[E],oe=!0;if(ee.ranges){ee.copied||(ee=a[E]=ee.deepCopy(),ee.copied=!0);for(var se=0;se<ee.ranges.length;se++)ol(ee.ranges[se].anchor,y,x,b),ol(ee.ranges[se].head,y,x,b);continue}for(var ce=0;ce<ee.changes.length;++ce){var de=ee.changes[ce];if(x<de.from.line)de.from=We(de.from.line+b,de.from.ch),de.to=We(de.to.line+b,de.to.ch);else if(y<=de.to.line){oe=!1;break}}oe||(a.splice(0,E+1),E=0)}}function sl(a,y){var x=y.from.line,b=y.to.line,E=y.text.length-(b-x)-1;al(a.done,x,b,E),al(a.undone,x,b,E)}function aa(a,y,x,b){var E=y,ee=y;return typeof y=="number"?ee=nt(a,$t(a,y)):E=Ee(y),E==null?null:(b(ee,E)&&a.cm&&co(a.cm,E,x),ee)}function sa(a){this.lines=a,this.parent=null;for(var y=0,x=0;x<a.length;++x)a[x].parent=this,y+=a[x].height;this.height=y}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var x=a,b=a+y;x<b;++x){var E=this.lines[x];this.height-=E.height,ii(E),Wr(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,x){this.height+=x,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var b=0;b<y.length;++b)y[b].parent=this},iterN:function(a,y,x){for(var b=a+y;a<b;++a)if(x(this.lines[a]))return!0}};function la(a){this.children=a;for(var y=0,x=0,b=0;b<a.length;++b){var E=a[b];y+=E.chunkSize(),x+=E.height,E.parent=this}this.size=y,this.height=x,this.parent=null}la.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var x=0;x<this.children.length;++x){var b=this.children[x],E=b.chunkSize();if(a<E){var ee=Math.min(y,E-a),oe=b.height;if(b.removeInner(a,ee),this.height-=oe-b.height,E==ee&&(this.children.splice(x--,1),b.parent=null),(y-=ee)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var se=[];this.collapse(se),this.children=[new sa(se)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,x){this.size+=y.length,this.height+=x;for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<=ee){if(E.insertInner(a,y,x),E.lines&&E.lines.length>50){for(var oe=E.lines.length%25+25,se=oe;se<E.lines.length;){var ce=new sa(E.lines.slice(se,se+=25));E.height-=ce.height,this.children.splice(++b,0,ce),ce.parent=this}E.lines=E.lines.slice(0,oe),this.maybeSpill()}break}a-=ee}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),x=new la(y);if(a.parent){a.size-=x.size,a.height-=x.height;var E=Be(a.parent.children,a);a.parent.children.splice(E+1,0,x)}else{var b=new la(a.children);b.parent=a,a.children=[b,x],a=b}x.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;b<this.children.length;++b){var E=this.children[b],ee=E.chunkSize();if(a<ee){var oe=Math.min(y,ee-a);if(E.iterN(a,oe,x))return!0;if((y-=oe)==0)break;a=0}else a-=ee}}};var ua=function(a,y,x){if(x)for(var b in x)x.hasOwnProperty(b)&&(this[b]=x[b]);this.doc=a,this.node=y};ua.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,x=this.line,b=Ee(x);if(!(b==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(x.widgets=null);var ee=vi(this);Sn(x,Math.max(0,x.height-ee)),a&&(Bi(a,function(){ll(a,x,-ee),co(a,b,"widget")}),Wr(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=vi(this)-y;E&&(Kn(this.doc,b)||Sn(b,b.height+E),x&&Bi(x,function(){x.curOp.forceUpdate=!0,ll(x,b,E),Wr(x,"lineWidgetChanged",x,a,Ee(b))}))},Qt(ua);function ll(a,y,x){Qn(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),ee=a.cm;return ee&&E.noHScroll&&(ee.display.alignWidgets=!0),aa(a,y,"widget",function(oe){var se=oe.widgets||(oe.widgets=[]);if(E.insertAt==null?se.push(E):se.splice(Math.min(se.length-1,Math.max(0,E.insertAt)),0,E),E.line=oe,ee&&!Kn(a,oe)){var ce=Qn(oe)<a.scrollTop;Sn(oe,oe.height+vi(E)),ce&&qa(ee,E.height),ee.curOp.forceUpdate=!0}return!0}),ee&&Wr(ee,"lineWidgetAdded",ee,E,typeof y=="number"?y:Ee(y)),E}var ul=0,mo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++ul};mo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Eo(a),Zt(this,"clear")){var x=this.find();x&&Wr(this,"clear",x.from,x.to)}for(var b=null,E=null,ee=0;ee<this.lines.length;++ee){var oe=this.lines[ee],se=mr(oe.markedSpans,this);a&&!this.collapsed?co(a,Ee(oe),"text"):a&&(se.to!=null&&(E=Ee(oe)),se.from!=null&&(b=Ee(oe))),oe.markedSpans=Br(oe.markedSpans,se),se.from==null&&this.collapsed&&!Kn(this.doc,oe)&&a&&Sn(oe,Mi(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var de=pt(this.lines[ce]),xe=yr(de);xe>a.display.maxLineLength&&(a.display.maxLine=de,a.display.maxLineLength=xe,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&wi(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&Wr(a,"markerCleared",a,this,b,E),y&&Ao(a),this.parent&&this.parent.clear()}},mo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E<this.lines.length;++E){var ee=this.lines[E],oe=mr(ee.markedSpans,this);if(oe.from!=null&&(x=We(y?ee:Ee(ee),oe.from),a==-1))return x;if(oe.to!=null&&(b=We(y?ee:Ee(ee),oe.to),a==1))return b}return x&&{from:x,to:b}},mo.prototype.changed=function(){var a=this,y=this.find(-1,!0),x=this,b=this.doc.cm;!y||!b||Bi(b,function(){var E=y.line,ee=Ee(y.line),oe=Qi(b,ee);if(oe&&(Ko(oe),b.curOp.selectionChanged=b.curOp.forceUpdate=!0),b.curOp.updateMaxLine=!0,!Kn(x.doc,E)&&x.height!=null){var se=x.height;x.height=null;var ce=vi(x)-se;ce&&Sn(E,E.height+ce)}Wr(b,"markerChanged",b,a)})},mo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Be(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},mo.prototype.detachLine=function(a){if(this.lines.splice(Be(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Qt(mo);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 $r(a.cm,Ho)(a,y,x,b,E);var ee=new mo(a,E),oe=kt(y,x);if(b&&$e(b,ee,!1),oe>0||oe==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=at("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(Et(a,y.line,y,x,ee)||y.line!=x.line&&Et(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");lr()}ee.addToHistory&&Us(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var se=y.line,ce=a.cm,de;if(a.iter(se,x.line+1,function(Se){ce&&ee.collapsed&&!ce.options.lineWrapping&&pt(Se)==ce.display.maxLine&&(de=!0),ee.collapsed&&se!=y.line&&Sn(Se,0),gr(Se,new ur(ee,se==y.line?y.ch:null,se==x.line?x.ch:null)),++se}),ee.collapsed&&a.iter(y.line,x.line+1,function(Se){Kn(a,Se)&&Sn(Se,0)}),ee.clearOnEnter&&Bt(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Ar(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++ul,ee.atomic=!0),ce){if(de&&(ce.curOp.updateMaxLine=!0),ee.collapsed)wi(ce,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var xe=y.line;xe<=x.line;xe++)co(ce,xe,"text");ee.atomic&&qs(ce.doc),Wr(ce,"markerAdded",ce,ee)}return ee}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();Wr(this,"clear")}},ca.prototype.find=function(a,y){return this.primary.find(a,y)},Qt(ca);function vu(a,y,x,b,E){b=$e(b),b.shared=!1;var ee=[Ho(a,y,x,b,E)],oe=ee[0],se=b.widgetNode;return vo(a,function(ce){se&&(b.widgetNode=se.cloneNode(!0)),ee.push(Ho(ce,Lt(ce,y),Lt(ce,x),b,E));for(var de=0;de<ce.linked.length;++de)if(ce.linked[de].isParent)return;oe=ke(ee)}),new ca(ee,oe)}function cl(a){return a.findMarks(We(a.first,0),a.clipPos(We(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var x=0;x<y.length;x++){var b=y[x],E=b.find(),ee=a.clipPos(E.from),oe=a.clipPos(E.to);if(kt(ee,oe)){var se=Ho(a,ee,oe,b.primary,b.primary.type);b.markers.push(se),se.parent=b}}}function gu(a){for(var y=function(b){var E=a[b],ee=[E.primary.doc];vo(E.primary.doc,function(ce){return ee.push(ce)});for(var oe=0;oe<E.markers.length;oe++){var se=E.markers[oe];Be(ee,se.doc)==-1&&(se.parent=null,E.markers.splice(oe--,1))}},x=0;x<a.length;x++)y(x)}var yu=0,Ci=function(a,y,x,b,E){if(!(this instanceof Ci))return new Ci(a,y,x,b,E);x==null&&(x=0),la.call(this,[new sa([new Or("",null)])]),this.first=x,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=x;var ee=We(x,0);this.sel=ho(ee),this.history=new Pa(null),this.id=++yu,this.modeOption=y,this.lineSep=b,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),as(this,{from:ee,to:ee,text:a}),di(this,ho(ee),ye)};Ci.prototype=te(la.prototype,{constructor:Ci,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:ei(function(a){var y=We(this.first,0),x=this.first+this.size-1;Oo(this,{from:y,to:We(x,nt(this,x).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&qo(this.cm,0,0),di(this,ho(y),ye)}),replaceRange:function(a,y,x,b){y=Lt(this,y),x=x?Lt(this,x):y,Io(this,a,y,x,b)},getRange:function(a,y,x){var b=Yt(this,Lt(this,a),Lt(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(Wt(this,a))return nt(this,a)},getLineNumber:function(a){return Ee(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=nt(this,a)),pt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Lt(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:ei(function(a,y,x){Xs(this,Lt(this,typeof a=="number"?We(a,y||0):a),null,x)}),setSelection:ei(function(a,y,x){Xs(this,Lt(this,a),Lt(this,y||a),x)}),extendSelection:ei(function(a,y,x){Fa(this,Lt(this,a),y&&Lt(this,y),x)}),extendSelections:ei(function(a,y){Ys(this,Xt(this,a),y)}),extendSelectionsBy:ei(function(a,y){var x=tt(this.sel.ranges,a);Ys(this,Xt(this,x),y)}),setSelections:ei(function(a,y,x){if(a.length){for(var b=[],E=0;E<a.length;E++)b[E]=new xr(Lt(this,a[E].anchor),Lt(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),di(this,Vi(this.cm,b,y),x)}}),addSelection:ei(function(a,y,x){var b=this.sel.ranges.slice(0);b.push(new xr(Lt(this,a),Lt(this,y||a))),di(this,Vi(this.cm,b,b.length-1),x)}),getSelection:function(a){for(var y=this.sel.ranges,x,b=0;b<y.length;b++){var E=Yt(this,y[b].from(),y[b].to());x=x?x.concat(E):E}return a===!1?x:x.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],x=this.sel.ranges,b=0;b<x.length;b++){var E=Yt(this,x[b].from(),x[b].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[b]=E}return y},replaceSelection:function(a,y,x){for(var b=[],E=0;E<this.sel.ranges.length;E++)b[E]=a;this.replaceSelections(b,y,x||"+input")},replaceSelections:ei(function(a,y,x){for(var b=[],E=this.sel,ee=0;ee<E.ranges.length;ee++){var oe=E.ranges[ee];b[ee]={from:oe.from(),to:oe.to(),text:this.splitLines(a[ee]),origin:x}}for(var se=y&&y!="end"&&ou(this,b,y),ce=b.length-1;ce>=0;ce--)Oo(this,b[ce]);se?Js(this,se):this.cm&&Fo(this.cm)}),undo:ei(function(){_a(this,"undo")}),redo:ei(function(){_a(this,"redo")}),undoSelection:ei(function(){_a(this,"undo",!0)}),redoSelection:ei(function(){_a(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b<a.done.length;b++)a.done[b].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++x;return{undo:y,redo:x}},clearHistory:function(){var a=this;this.history=new Pa(this.history.maxGeneration),vo(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:Ro(this.history.done),undone:Ro(this.history.undone)}},setHistory:function(a){var y=this.history=new Pa(this.history.maxGeneration);y.done=Ro(a.done.slice(0),null,!0),y.undone=Ro(a.undone.slice(0),null,!0)},setGutterMarker:ei(function(a,y,x){return aa(this,a,"gutter",function(b){var E=b.gutterMarkers||(b.gutterMarkers={});return E[y]=x,!x&&ne(E)&&(b.gutterMarkers=null),!0})}),clearGutter:ei(function(a){var y=this;this.iter(function(x){x.gutterMarkers&&x.gutterMarkers[a]&&aa(y,x,"gutter",function(){return x.gutterMarkers[a]=null,ne(x.gutterMarkers)&&(x.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!Wt(this,a)||(y=a,a=nt(this,a),!a))return null}else if(y=Ee(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:ei(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(Qe(x).test(b[E]))return!1;b[E]+=" "+x}return!0})}),removeLineClass:ei(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",ee=b[E];if(ee)if(x==null)b[E]=null;else{var oe=ee.match(Qe(x));if(!oe)return!1;var se=oe.index+oe[0].length;b[E]=ee.slice(0,oe.index)+(!oe.index||se==ee.length?"":" ")+ee.slice(se)||null}else return!1;return!0})}),addLineWidget:ei(function(a,y,x){return pu(this,a,y,x)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,x){return Ho(this,Lt(this,a),Lt(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=Lt(this,a),Ho(this,a,a,x,"bookmark")},findMarksAt:function(a){a=Lt(this,a);var y=[],x=nt(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=Lt(this,a),y=Lt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var oe=ee.markedSpans;if(oe)for(var se=0;se<oe.length;se++){var ce=oe[se];!(ce.to!=null&&E==a.line&&a.ch>=ce.to||ce.from==null&&E!=a.line||ce.from!=null&&E==y.line&&ce.from>=y.ch)&&(!x||x(ce.marker))&&b.push(ce.marker.parent||ce.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 ee=E.text.length+b;if(ee>a)return y=a,!0;a-=ee,++x}),Lt(this,We(x,y))},indexFromPos:function(a){a=Lt(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 Ci(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 Ci(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,cl(this)),b},unlinkDoc:function(a){if(a instanceof Ir&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var x=this.linked[y];if(x.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(cl(this));break}}if(a.history==this.history){var b=[a.id];vo(a,function(E){return b.push(E.id)},!0),a.history=new Pa(null),a.history.done=Ro(this.history.done,b),a.history.undone=Ro(this.history.undone,b)}},iterLinkedDocs:function(a){vo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):Wn(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:ei(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))})}),Ci.prototype.eachLine=Ci.prototype.iter;var dl=0;function bu(a){var y=this;if(fl(y),!(dt(y,a)||oi(y.display,a))){ln(a),me&&(dl=+new Date);var x=wo(y,a,!0),b=a.dataTransfer.files;if(!(!x||y.isReadOnly()))if(b&&b.length&&window.FileReader&&window.File)for(var E=b.length,ee=Array(E),oe=0,se=function(){++oe==E&&$r(y,function(){x=Lt(y.doc,x);var Xe={from:x,to:x,text:y.doc.splitLines(ee.filter(function(At){return At!=null}).join(y.doc.lineSeparator())),origin:"paste"};Oo(y.doc,Xe),Js(y.doc,ho(Lt(y.doc,x),Lt(y.doc,po(Xe))))})()},ce=function(Xe,At){if(y.options.allowDropFileTypes&&Be(y.options.allowDropFileTypes,Xe.type)==-1){se();return}var Rt=new FileReader;Rt.onerror=function(){return se()},Rt.onload=function(){var Kt=Rt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Kt)){se();return}ee[At]=Kt,se()},Rt.readAsText(Xe)},de=0;de<b.length;de++)ce(b[de],de);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 Se;if(y.state.draggingText&&!y.state.draggingText.copy&&(Se=y.listSelections()),Na(y.doc,ho(x,x)),Se)for(var et=0;et<Se.length;++et)Io(y.doc,"",Se[et].anchor,Se[et].head,"drag");y.replaceSelection(xe,"around","paste"),y.display.input.focus()}}catch(Xe){}}}}function xu(a,y){if(me&&(!a.state.draggingText||+new Date-dl<100)){wn(y);return}if(!(dt(a,y)||oi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!it)){var x=Ze("img",null,null,"position: fixed; left: 0; top: 0;");x.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",pe&&(x.width=x.height=1,a.display.wrapper.appendChild(x),x._top=x.offsetTop),y.dataTransfer.setDragImage(x,0,0),pe&&x.parentNode.removeChild(x)}}function wu(a,y){var x=wo(a,y);if(x){var b=document.createDocumentFragment();ks(a,x,b),a.display.dragCursor||(a.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ye(a.display.dragCursor,b)}}function fl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function hl(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 ee=0;ee<x.length;ee++)a(x[ee])})}}var pl=!1;function Cu(){pl||(Su(),pl=!0)}function Su(){var a;Bt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,hl(ku)},100))}),Bt(window,"blur",function(){return hl(To)})}function ku(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var go={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++)go[da+48]=go[da+96]=String(da);for(var Oa=65;Oa<=90;Oa++)go[Oa]=String.fromCharCode(Oa);for(var fa=1;fa<=12;fa++)go[fa+111]=go[fa+63235]="F"+fa;var io={};io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},io.default=Le?io.macDefault:io.pcDefault;function Eu(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var x,b,E,ee,oe=0;oe<y.length-1;oe++){var se=y[oe];if(/^(cmd|meta|m)$/i.test(se))ee=!0;else if(/^a(lt)?$/i.test(se))x=!0;else if(/^(c|ctrl|control)$/i.test(se))b=!0;else if(/^s(hift)?$/i.test(se))E=!0;else throw new Error("Unrecognized modifier name: "+se)}return x&&(a="Alt-"+a),b&&(a="Ctrl-"+a),ee&&(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=tt(x.split(" "),Eu),ee=0;ee<E.length;ee++){var oe=void 0,se=void 0;ee==E.length-1?(se=E.join(" "),oe=b):(se=E.slice(0,ee+1).join(" "),oe="...");var ce=y[se];if(!ce)y[se]=oe;else if(ce!=oe)throw new Error("Inconsistent bindings for "+se)}delete a[x]}for(var de in y)a[de]=y[de];return a}function Wo(a,y,x,b){y=Ia(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 ee=0;ee<y.fallthrough.length;ee++){var oe=Wo(a,y.fallthrough[ee],x,b);if(oe)return oe}}}function vl(a){var y=typeof a=="string"?a:go[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function ml(a,y,x){var b=a;return y.altKey&&b!="Alt"&&(a="Alt-"+a),(Ue?y.metaKey:y.ctrlKey)&&b!="Ctrl"&&(a="Ctrl-"+a),(Ue?y.ctrlKey:y.metaKey)&&b!="Mod"&&(a="Cmd-"+a),!x&&y.shiftKey&&b!="Shift"&&(a="Shift-"+a),a}function gl(a,y){if(pe&&a.keyCode==34&&a.char)return!1;var x=go[a.keyCode];return x==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(x=a.code),ml(x,a,y))}function Ia(a){return typeof a=="string"?io[a]:a}function zo(a,y){for(var x=a.doc.sel.ranges,b=[],E=0;E<x.length;E++){for(var ee=y(x[E]);b.length&&kt(ee.from,ke(b).to)<=0;){var oe=b.pop();if(kt(oe.from,ee.from)<0){ee.from=oe.from;break}}b.push(ee)}Bi(a,function(){for(var se=b.length-1;se>=0;se--)Io(a.doc,"",b[se].from,b[se].to,"+delete");Fo(a)})}function cs(a,y,x){var b=Mt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function ds(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new We(y.line,b,x<0?"after":"before")}function fs(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=en(x,y.doc.direction);if(ee){var oe=E<0?ke(ee):ee[0],se=E<0==(oe.level==1),ce=se?"after":"before",de;if(oe.level>0||y.doc.direction=="rtl"){var xe=lo(y,x);de=E<0?x.text.length-1:0;var Se=Oi(y,xe,de).top;de=St(function(et){return Oi(y,xe,et).top==Se},E<0==(oe.level==1)?oe.from:oe.to-1,de),ce=="before"&&(de=cs(x,de,1))}else de=E<0?oe.to:oe.from;return new We(b,de,ce)}}return new We(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=en(y,a.doc.direction);if(!E)return ds(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 ee=jt(E,x.ch,x.sticky),oe=E[ee];if(a.doc.direction=="ltr"&&oe.level%2==0&&(b>0?oe.to>x.ch:oe.from<x.ch))return ds(y,x,b);var se=function(on,hn){return cs(y,on instanceof We?on.ch:on,hn)},ce,de=function(on){return a.options.lineWrapping?(ce=ce||lo(a,y),Ur(a,y,ce,on)):{begin:0,end:y.text.length}},xe=de(x.sticky=="before"?se(x,-1):x.ch);if(a.doc.direction=="rtl"||oe.level==1){var Se=oe.level==1==b<0,et=se(x,Se?1:-1);if(et!=null&&(Se?et<=oe.to&&et<=xe.end:et>=oe.from&&et>=xe.begin)){var Xe=Se?"before":"after";return new We(x.line,et,Xe)}}var At=function(on,hn,an){for(var vn=function(Fr,ti){return ti?new We(x.line,se(Fr,1),"before"):new We(x.line,Fr,"after")};on>=0&&on<E.length;on+=hn){var Rn=E[on],Dn=hn>0==(Rn.level!=1),qn=Dn?an.begin:se(an.end,-1);if(Rn.from<=qn&&qn<Rn.to||(qn=Dn?Rn.from:se(Rn.to,-1),an.begin<=qn&&qn<an.end))return vn(qn,Dn)}},Rt=At(ee+b,b,xe);if(Rt)return Rt;var Kt=b>0?xe.end:se(xe.begin,-1);return Kt!=null&&!(b>0&&Kt==y.text.length)&&(Rt=At(b>0?0:E.length-1,b,de(Kt)),Rt)?Rt:null}var ha={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),ye)},killLine:function(a){return zo(a,function(y){if(y.empty()){var x=nt(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line<a.lastLine()?{from:y.head,to:We(y.head.line+1,0)}:{from:y.head,to:We(y.head.line,x)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return zo(a,function(y){return{from:We(y.from().line,0),to:Lt(a.doc,We(y.to().line+1,0))}})},delLineLeft:function(a){return zo(a,function(y){return{from:We(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(We(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(We(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return yl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return bl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Lu(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")},Te)},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")},Te)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var x=a.cursorCoords(y.head,"div").top+5,b=a.coordsChar({left:0,top:x},"div");return b.ch<a.getLine(b.line).search(/\S/)?bl(a,y.head):b},Te)},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 ee=x[E].from(),oe=he(a.getLine(ee.line),ee.ch,b);y.push(mt(b-oe%b))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Bi(a,function(){for(var y=a.listSelections(),x=[],b=0;b<y.length;b++)if(y[b].empty()){var E=y[b].head,ee=nt(a.doc,E.line).text;if(ee){if(E.ch==ee.length&&(E=new We(E.line,E.ch-1)),E.ch>0)E=new We(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),We(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var oe=nt(a.doc,E.line-1).text;oe&&(E=new We(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+oe.charAt(oe.length-1),We(E.line-1,oe.length-1),E,"+transpose"))}}x.push(new xr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Bi(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;b<y.length;b++)a.indentLine(y[b].from().line,null,!0);Fo(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function yl(a,y){var x=nt(a.doc,y),b=pt(x);return b!=x&&(y=Ee(b)),fs(!0,a,b,y,1)}function Lu(a,y){var x=nt(a.doc,y),b=Nt(x);return b!=x&&(y=Ee(b)),fs(!0,a,x,y,-1)}function bl(a,y){var x=yl(a,y.line),b=nt(a.doc,x.line),E=en(b,a.doc.direction);if(!E||E[0].level==0){var ee=Math.max(x.ch,b.text.search(/\S/)),oe=y.line==x.line&&y.ch<=ee&&y.ch;return We(x.line,oe?0:ee,x.sticky)}return x}function Ha(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)!=qe}finally{a.display.shift=b,a.state.suppressEdits=!1}return E}function Mu(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 Bu=new ue;function pa(a,y,x,b){var E=a.state.keySeq;if(E){if(vl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Bu.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),xl(a,E+" "+y,x,b))return!0}return xl(a,y,x,b)}function xl(a,y,x,b){var E=Mu(a,y,b);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Wr(a,"keyHandled",a,y,x),(E=="handled"||E=="multi")&&(ln(x),Xa(a)),!!E}function wl(a,y){var x=gl(y,!0);return x?y.shiftKey&&!a.state.keySeq?pa(a,"Shift-"+x,y,function(b){return Ha(a,b,!0)})||pa(a,x,y,function(b){if(typeof b=="string"?/^go[A-Z]/.test(b):b.motion)return Ha(a,b)}):pa(a,x,y,function(b){return Ha(a,b)}):!1}function Pu(a,y,x){return pa(a,"'"+x+"'",y,function(b){return Ha(a,b,!0)})}var hs=null;function Cl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ce(),!dt(y,a))){me&&ge<11&&a.keyCode==27&&(a.returnValue=!1);var x=a.keyCode;y.display.shift=x==16||a.shiftKey;var b=wl(y,a);pe&&(hs=b?x:null,!b&&x==88&&!En&&(Le?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ie&&!Le&&!b&&x==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),x==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Tu(y)}}function Tu(a){var y=a.display.lineDiv;He(y,"CodeMirror-crosshair");function x(b){(b.keyCode==18||!b.altKey)&&(Ve(y,"CodeMirror-crosshair"),Vt(document,"keyup",x),Vt(document,"mouseover",x))}Bt(document,"keyup",x),Bt(document,"mouseover",x)}function Sl(a){a.keyCode==16&&(this.doc.sel.shift=!1),dt(this,a)}function kl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(oi(y.display,a)||dt(y,a)||a.ctrlKey&&!a.altKey||Le&&a.metaKey)){var x=a.keyCode,b=a.charCode;if(pe&&x==hs){hs=null,ln(a);return}if(!(pe&&(!a.which||a.which<10)&&wl(y,a))){var E=String.fromCharCode(b==null?x:b);E!="\b"&&(Pu(y,a,E)||y.display.input.onKeyPress(a))}}}var Fu=400,ps=function(a,y,x){this.time=a,this.pos=y,this.button=x};ps.prototype.compare=function(a,y,x){return this.time+Fu>a&&kt(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 ps(x,a,y),va=null,"double"):(va=new ps(x,a,y),ma=null,"single")}function El(a){var y=this,x=y.display;if(!(dt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,oi(x,a)){Ae||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=wo(y,a),E=Zn(a),ee=b?Nu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Ru(y,E,b,ee,a))&&(E==1?b?Ou(y,b,ee,a):$n(a)==x.scroller&&ln(a):E==2?(b&&Fa(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(ze?y.display.input.onContextMenu(a):As(y)))}}}function Ru(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ml(ee,E),E,function(oe){if(typeof oe=="string"&&(oe=ha[oe]),!oe)return!1;var se=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),se=oe(a,x)!=qe}finally{a.state.suppressEdits=!1}return se})}function _u(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=st?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=Le?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Le?x.altKey:x.ctrlKey)),E}function Ou(a,y,x,b){me?setTimeout(lt(Es,a),0):a.curOp.focus=Ce();var E=_u(a,x,b),ee=a.doc.sel,oe;a.options.dragDrop&&Mr&&!a.isReadOnly()&&x=="single"&&(oe=ee.contains(y))>-1&&(kt((oe=ee.ranges[oe]).from(),y)<0||y.xRel>0)&&(kt(oe.to(),y)>0||y.xRel<0)?Iu(a,b,y,E):Hu(a,b,y,E)}function Iu(a,y,x,b){var E=a.display,ee=!1,oe=$r(a,function(de){Ae&&(E.scroller.draggable=!1),a.state.draggingText=!1,Vt(E.wrapper.ownerDocument,"mouseup",oe),Vt(E.wrapper.ownerDocument,"mousemove",se),Vt(E.scroller,"dragstart",ce),Vt(E.scroller,"drop",oe),ee||(ln(de),b.addNew||Fa(a.doc,x,null,null,b.extend),Ae&&!it||me&&ge==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),se=function(de){ee=ee||Math.abs(y.clientX-de.clientX)+Math.abs(y.clientY-de.clientY)>=10},ce=function(){return ee=!0};Ae&&(E.scroller.draggable=!0),a.state.draggingText=oe,oe.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Bt(E.wrapper.ownerDocument,"mouseup",oe),Bt(E.wrapper.ownerDocument,"mousemove",se),Bt(E.scroller,"dragstart",ce),Bt(E.scroller,"drop",oe),As(a),setTimeout(function(){return E.input.focus()},20)}function Al(a,y,x){if(x=="char")return new xr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new xr(We(y.line,0),Lt(a.doc,We(y.line+1,0)));var b=x(a,y);return new xr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;ln(y);var oe,se,ce=ee.sel,de=ce.ranges;if(b.addNew&&!b.extend?(se=ee.sel.contains(x),se>-1?oe=de[se]:oe=new xr(x,x)):(oe=ee.sel.primary(),se=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(oe=new xr(x,x)),x=wo(a,y,!0,!0),se=-1;else{var xe=Al(a,x,b.unit);b.extend?oe=ls(oe,xe.anchor,xe.head,b.extend):oe=xe}b.addNew?se==-1?(se=de.length,di(ee,Vi(a,de.concat([oe]),se),{scroll:!1,origin:"*mouse"})):de.length>1&&de[se].empty()&&b.unit=="char"&&!b.extend?(di(ee,Vi(a,de.slice(0,se).concat(de.slice(se+1)),0),{scroll:!1,origin:"*mouse"}),ce=ee.sel):us(ee,se,oe,Pe):(se=0,di(ee,new Ri([oe],0),Pe),ce=ee.sel);var Se=x;function et(an){if(kt(Se,an)!=0)if(Se=an,b.unit=="rectangle"){for(var vn=[],Rn=a.options.tabSize,Dn=he(nt(ee,x.line).text,x.ch,Rn),qn=he(nt(ee,an.line).text,an.ch,Rn),Fr=Math.min(Dn,qn),ti=Math.max(Dn,qn),Hr=Math.min(x.line,an.line),Pi=Math.min(a.lastLine(),Math.max(x.line,an.line));Hr<=Pi;Hr++){var Si=nt(ee,Hr).text,Yr=bt(Si,Fr,Rn);Fr==ti?vn.push(new xr(We(Hr,Yr),We(Hr,Yr))):Si.length>Yr&&vn.push(new xr(We(Hr,Yr),We(Hr,bt(Si,ti,Rn))))}vn.length||vn.push(new xr(x,x)),di(ee,Vi(a,ce.ranges.slice(0,se).concat(vn),se),{origin:"*mouse",scroll:!1}),a.scrollIntoView(an)}else{var ki=oe,si=Al(a,an,b.unit),Qr=ki.anchor,Xr;kt(si.anchor,Qr)>0?(Xr=si.head,Qr=Je(ki.from(),si.anchor)):(Xr=si.anchor,Qr=dn(ki.to(),si.head));var zr=ce.ranges.slice(0);zr[se]=Wu(a,new xr(Lt(ee,Qr),Xr)),di(ee,Vi(a,zr,se),Pe)}}var Xe=E.wrapper.getBoundingClientRect(),At=0;function Rt(an){var vn=++At,Rn=wo(a,an,!0,b.unit=="rectangle");if(Rn)if(kt(Rn,Se)!=0){a.curOp.focus=Ce(),et(Rn);var Dn=Da(E,ee);(Rn.line>=Dn.to||Rn.line<Dn.from)&&setTimeout($r(a,function(){At==vn&&Rt(an)}),150)}else{var qn=an.clientY<Xe.top?-20:an.clientY>Xe.bottom?20:0;qn&&setTimeout($r(a,function(){At==vn&&(E.scroller.scrollTop+=qn,Rt(an))}),50)}}function Kt(an){a.state.selectingText=!1,At=1/0,an&&(ln(an),E.input.focus()),Vt(E.wrapper.ownerDocument,"mousemove",on),Vt(E.wrapper.ownerDocument,"mouseup",hn),ee.history.lastSelOrigin=null}var on=$r(a,function(an){an.buttons===0||!Zn(an)?Kt(an):Rt(an)}),hn=$r(a,Kt);a.state.selectingText=hn,Bt(E.wrapper.ownerDocument,"mousemove",on),Bt(E.wrapper.ownerDocument,"mouseup",hn)}function Wu(a,y){var x=y.anchor,b=y.head,E=nt(a.doc,x.line);if(kt(x,b)==0&&x.sticky==b.sticky)return y;var ee=en(E);if(!ee)return y;var oe=jt(ee,x.ch,x.sticky),se=ee[oe];if(se.from!=x.ch&&se.to!=x.ch)return y;var ce=oe+(se.from==x.ch==(se.level!=1)?0:1);if(ce==0||ce==ee.length)return y;var de;if(b.line!=x.line)de=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var xe=jt(ee,b.ch,b.sticky),Se=xe-oe||(b.ch-x.ch)*(se.level==1?-1:1);xe==ce-1||xe==ce?de=Se<0:de=Se>0}var et=ee[ce+(de?-1:0)],Xe=de==(et.level==1),At=Xe?et.from:et.to,Rt=Xe?"after":"before";return x.ch==At&&x.sticky==Rt?y:new xr(new We(x.line,At,Rt),b)}function Dl(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(et){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&ln(y);var oe=a.display,se=oe.lineDiv.getBoundingClientRect();if(ee>se.bottom||!Zt(a,x))return cn(y);ee-=se.top-oe.viewOffset;for(var ce=0;ce<a.display.gutterSpecs.length;++ce){var de=oe.gutters.childNodes[ce];if(de&&de.getBoundingClientRect().right>=E){var xe=Fe(a.doc,ee),Se=a.display.gutterSpecs[ce];return nn(a,x,a,xe,Se.className,y),cn(y)}}}function vs(a,y){return Dl(a,y,"gutterClick",!0)}function Ll(a,y){oi(a.display,y)||zu(a,y)||dt(a,y,"contextmenu")||ze||a.display.input.onContextMenu(y)}function zu(a,y){return Zt(a,"gutterContextMenu")?Dl(a,y,"gutterContextMenu",!1):!1}function Ml(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),xo(a)}var Zo={toString:function(){return"CodeMirror.Init"}},Bl={},Wa={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,oe){a.defaults[b]=E,ee&&(y[b]=oe?function(se,ce,de){de!=Zo&&ee(se,ce,de)}:ee)}a.defineOption=x,a.Init=Zo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),xo(b),wi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],oe=b.doc.first;b.doc.iter(function(ce){for(var de=0;;){var xe=ce.text.indexOf(E,de);if(xe==-1)break;de=xe+E.length,ee.push(We(oe,xe))}oe++});for(var se=ee.length-1;se>=0;se--)Io(b.doc,E,ee[se],We(ee[se].line,ee[se].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=Zo&&b.refresh()}),x("specialCharPlaceholder",Ti,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Re?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!ct),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Ml(b),ra(b)},!0),x("keyMap","default",function(b,E,ee){var oe=Ia(E),se=ee!=Zo&&Ia(ee);se&&se.detach&&se.detach(b,oe),oe.attach&&oe.attach(b,se||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,Gu,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return No(b)},!0),x("scrollbarStyle","native",function(b){Ts(b),No(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(To(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,ju),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function ju(a,y,x){var b=x&&x!=Zo;if(!y!=!b){var E=a.display.dragFunctions,ee=y?Bt:Vt;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(He(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Ve(a.display.wrapper,"CodeMirror-wrap"),dr(a)),Ya(a),wi(a),xo(a),setTimeout(function(){return No(a)},100)}function Ir(a,y){var x=this;if(!(this instanceof Ir))return new Ir(a,y);this.options=y=y?$e(y):{},$e(Bl,y,!1);var b=y.value;typeof b=="string"?b=new Ci(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Ir.inputStyles[y.inputStyle](this),ee=this.display=new ru(a,b,E,y);ee.wrapper.CodeMirror=this,Ml(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ts(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 ue,keySeq:null,specialChars:null},y.autofocus&&!Re&&ee.input.focus(),me&&ge<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Uu(this),Cu(),Eo(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Re||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):To(this);for(var oe in Wa)Wa.hasOwnProperty(oe)&&Wa[oe](this,y[oe],Zo);Rs(this),y.finishInit&&y.finishInit(this);for(var se=0;se<ms.length;++se)ms[se](this);Ao(this),Ae&&y.lineWrapping&&getComputedStyle(ee.lineDiv).textRendering=="optimizelegibility"&&(ee.lineDiv.style.textRendering="auto")}Ir.defaults=Bl,Ir.optionHandlers=Wa;function Uu(a){var y=a.display;Bt(y.scroller,"mousedown",$r(a,El)),me&&ge<11?Bt(y.scroller,"dblclick",$r(a,function(ce){if(!dt(a,ce)){var de=wo(a,ce);if(!(!de||vs(a,ce)||oi(a.display,ce))){ln(ce);var xe=a.findWordAt(de);Fa(a.doc,xe.anchor,xe.head)}}})):Bt(y.scroller,"dblclick",function(ce){return dt(a,ce)||ln(ce)}),Bt(y.scroller,"contextmenu",function(ce){return Ll(a,ce)}),Bt(y.input.getField(),"contextmenu",function(ce){y.scroller.contains(ce.target)||Ll(a,ce)});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 ee(ce){if(ce.touches.length!=1)return!1;var de=ce.touches[0];return de.radiusX<=1&&de.radiusY<=1}function oe(ce,de){if(de.left==null)return!0;var xe=de.left-ce.left,Se=de.top-ce.top;return xe*xe+Se*Se>20*20}Bt(y.scroller,"touchstart",function(ce){if(!dt(a,ce)&&!ee(ce)&&!vs(a,ce)){y.input.ensurePolled(),clearTimeout(x);var de=+new Date;y.activeTouch={start:de,moved:!1,prev:de-b.end<=300?b:null},ce.touches.length==1&&(y.activeTouch.left=ce.touches[0].pageX,y.activeTouch.top=ce.touches[0].pageY)}}),Bt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Bt(y.scroller,"touchend",function(ce){var de=y.activeTouch;if(de&&!oi(y,ce)&&de.left!=null&&!de.moved&&new Date-de.start<300){var xe=a.coordsChar(y.activeTouch,"page"),Se;!de.prev||oe(de,de.prev)?Se=new xr(xe,xe):!de.prev.prev||oe(de,de.prev.prev)?Se=a.findWordAt(xe):Se=new xr(We(xe.line,0),Lt(a.doc,We(xe.line+1,0))),a.setSelection(Se.anchor,Se.head),a.focus(),ln(ce)}E()}),Bt(y.scroller,"touchcancel",E),Bt(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),So(a,y.scroller.scrollLeft,!0),nn(a,"scroll",a))}),Bt(y.scroller,"mousewheel",function(ce){return Is(a,ce)}),Bt(y.scroller,"DOMMouseScroll",function(ce){return Is(a,ce)}),Bt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ce){dt(a,ce)||wn(ce)},over:function(ce){dt(a,ce)||(wu(a,ce),wn(ce))},start:function(ce){return xu(a,ce)},drop:$r(a,bu),leave:function(ce){dt(a,ce)||fl(a)}};var se=y.input.getField();Bt(se,"keyup",function(ce){return Sl.call(a,ce)}),Bt(se,"keydown",$r(a,Cl)),Bt(se,"keypress",$r(a,kl)),Bt(se,"focus",function(ce){return Ja(a,ce)}),Bt(se,"blur",function(ce){return To(a,ce)})}var ms=[];Ir.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=Xn(a,y).state:x="prev");var oe=a.options.tabSize,se=nt(E,y),ce=he(se.text,null,oe);se.stateAfter&&(se.stateAfter=null);var de=se.text.match(/^\s*/)[0],xe;if(!b&&!/\S/.test(se.text))xe=0,x="not";else if(x=="smart"&&(xe=E.mode.indent(ee,se.text.slice(de.length),se.text),xe==qe||xe>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?xe=he(nt(E,y-1).text,null,oe):xe=0:x=="add"?xe=ce+a.options.indentUnit:x=="subtract"?xe=ce-a.options.indentUnit:typeof x=="number"&&(xe=ce+x),xe=Math.max(0,xe);var Se="",et=0;if(a.options.indentWithTabs)for(var Xe=Math.floor(xe/oe);Xe;--Xe)et+=oe,Se+=" ";if(et<xe&&(Se+=mt(xe-et)),Se!=de)return Io(E,Se,We(y,0),We(y,de.length),"+input"),se.stateAfter=null,!0;for(var At=0;At<E.sel.ranges.length;At++){var Rt=E.sel.ranges[At];if(Rt.head.line==y&&Rt.head.ch<de.length){var Kt=We(y,de.length);us(E,At,new xr(Kt,Kt));break}}}var Ki=null;function za(a){Ki=a}function gs(a,y,x,b,E){var ee=a.doc;a.display.shift=!1,b||(b=ee.sel);var oe=+new Date-200,se=E=="paste"||a.state.pasteIncoming>oe,ce=Wn(y),de=null;if(se&&b.ranges.length>1)if(Ki&&Ki.text.join(`
|
|
`)==y){if(b.ranges.length%Ki.text.length==0){de=[];for(var xe=0;xe<Ki.text.length;xe++)de.push(ee.splitLines(Ki.text[xe]))}}else ce.length==b.ranges.length&&a.options.pasteLinesPerSelection&&(de=tt(ce,function(on){return[on]}));for(var Se=a.curOp.updateInput,et=b.ranges.length-1;et>=0;et--){var Xe=b.ranges[et],At=Xe.from(),Rt=Xe.to();Xe.empty()&&(x&&x>0?At=We(At.line,At.ch-x):a.state.overwrite&&!se?Rt=We(Rt.line,Math.min(nt(ee,Rt.line).text.length,Rt.ch+ke(ce).length)):se&&Ki&&Ki.lineWise&&Ki.text.join(`
|
|
`)==ce.join(`
|
|
`)&&(At=Rt=We(At.line,0)));var Kt={from:At,to:Rt,text:de?de[et%de.length]:ce,origin:E||(se?"paste":a.state.cutIncoming>oe?"cut":"+input")};Oo(a.doc,Kt),Wr(a,"inputRead",a,Kt)}y&&!se&&Tl(a,y),Fo(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Se),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Pl(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Bi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Tl(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 ee=a.getModeAt(E.head),oe=!1;if(ee.electricChars){for(var se=0;se<ee.electricChars.length;se++)if(y.indexOf(ee.electricChars.charAt(se))>-1){oe=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(nt(a.doc,E.head.line).text.slice(0,E.head.ch))&&(oe=ga(a,E.head.line,"smart"));oe&&Wr(a,"electricInput",a,E.head.line)}}}function Fl(a){for(var y=[],x=[],b=0;b<a.doc.sel.ranges.length;b++){var E=a.doc.sel.ranges[b].head.line,ee={anchor:We(E,0),head:We(E+1,0)};x.push(ee),y.push(a.getRange(ee.anchor,ee.head))}return{text:y,ranges:x}}function Nl(a,y,x,b){a.setAttribute("autocorrect",x?"":"off"),a.setAttribute("autocapitalize",b?"":"off"),a.setAttribute("spellcheck",!!y)}function Rl(){var a=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Ze("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ae?a.style.width="1000px":a.setAttribute("wrap","off"),Oe&&(a.style.border="1px solid black"),Nl(a),y}function Vu(a){var y=a.optionHandlers,x=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(b,E){var ee=this.options,oe=ee[b];ee[b]==E&&b!="mode"||(ee[b]=E,y.hasOwnProperty(b)&&$r(this,y[b])(this,E,oe),nn(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"](Ia(b))},removeKeyMap:function(b){for(var E=this.state.keyMaps,ee=0;ee<E.length;++ee)if(E[ee]==b||E[ee].name==b)return E.splice(ee,1),!0},addOverlay:mi(function(b,E){var ee=b.token?b:a.getMode(this.options,b);if(ee.startState)throw new Error("Overlays may not be stateful.");ut(this.state.overlays,{mode:ee,modeSpec:b,opaque:E&&E.opaque,priority:E&&E.priority||0},function(oe){return oe.priority}),this.state.modeGen++,wi(this)}),removeOverlay:mi(function(b){for(var E=this.state.overlays,ee=0;ee<E.length;++ee){var oe=E[ee].modeSpec;if(oe==b||typeof b=="string"&&oe.name==b){E.splice(ee,1),this.state.modeGen++,wi(this);return}}}),indentLine:mi(function(b,E,ee){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),Wt(this.doc,b)&&ga(this,b,E,ee)}),indentSelection:mi(function(b){for(var E=this.doc.sel.ranges,ee=-1,oe=0;oe<E.length;oe++){var se=E[oe];if(se.empty())se.head.line>ee&&(ga(this,se.head.line,b,!0),ee=se.head.line,oe==this.doc.sel.primIndex&&Fo(this));else{var ce=se.from(),de=se.to(),xe=Math.max(ee,ce.line);ee=Math.min(this.lastLine(),de.line-(de.ch?0:1))+1;for(var Se=xe;Se<ee;++Se)ga(this,Se,b);var et=this.doc.sel.ranges;ce.ch==0&&E.length==et.length&&et[oe].from().ch>0&&us(this.doc,oe,new xr(ce,et[oe].to()),ye)}}}),getTokenAt:function(b,E){return wr(this,b,E)},getLineTokens:function(b,E){return wr(this,We(b),E,!0)},getTokenTypeAt:function(b){b=Lt(this.doc,b);var E=Pn(this,nt(this.doc,b.line)),ee=0,oe=(E.length-1)/2,se=b.ch,ce;if(se==0)ce=E[2];else for(;;){var de=ee+oe>>1;if((de?E[de*2-1]:0)>=se)oe=de;else if(E[de*2+1]<se)ee=de+1;else{ce=E[de*2+2];break}}var xe=ce?ce.indexOf("overlay "):-1;return xe<0?ce:xe==0?null:ce.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 ee=[];if(!x.hasOwnProperty(E))return ee;var oe=x[E],se=this.getModeAt(b);if(typeof se[E]=="string")oe[se[E]]&&ee.push(oe[se[E]]);else if(se[E])for(var ce=0;ce<se[E].length;ce++){var de=oe[se[E][ce]];de&&ee.push(de)}else se.helperType&&oe[se.helperType]?ee.push(oe[se.helperType]):oe[se.name]&&ee.push(oe[se.name]);for(var xe=0;xe<oe._global.length;xe++){var Se=oe._global[xe];Se.pred(se,this)&&Be(ee,Se.val)==-1&&ee.push(Se.val)}return ee},getStateAfter:function(b,E){var ee=this.doc;return b=$t(ee,b==null?ee.first+ee.size-1:b),Xn(this,b+1,E).state},cursorCoords:function(b,E){var ee,oe=this.doc.sel.primary();return b==null?ee=oe.head:typeof b=="object"?ee=Lt(this.doc,b):ee=b?oe.from():oe.to(),xi(this,ee,E||"page")},charCoords:function(b,E){return Po(this,Lt(this.doc,b),E||"page")},coordsChar:function(b,E){return b=Sa(this,b,E||"page"),ai(this,b.left,b.top)},lineAtHeight:function(b,E){return b=Sa(this,{top:b,left:0},E||"page").top,Fe(this.doc,b+this.display.viewOffset)},heightAtLine:function(b,E,ee){var oe=!1,se;if(typeof b=="number"){var ce=this.doc.first+this.doc.size-1;b<this.doc.first?b=this.doc.first:b>ce&&(b=ce,oe=!0),se=nt(this.doc,b)}else se=b;return Bo(this,se,{top:0,left:0},E||"page",ee||oe).top+(oe?this.doc.height-Qn(se):0)},defaultTextHeight:function(){return Mi(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,oe,se){var ce=this.display;b=xi(this,Lt(this.doc,b));var de=b.bottom,xe=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ce.sizer.appendChild(E),oe=="over")de=b.top;else if(oe=="above"||oe=="near"){var Se=Math.max(ce.wrapper.clientHeight,this.doc.height),et=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(oe=="above"||b.bottom+E.offsetHeight>Se)&&b.top>E.offsetHeight?de=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Se&&(de=b.bottom),xe+E.offsetWidth>et&&(xe=et-E.offsetWidth)}E.style.top=de+"px",E.style.left=E.style.right="",se=="right"?(xe=ce.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(se=="left"?xe=0:se=="middle"&&(xe=(ce.sizer.clientWidth-E.offsetWidth)/2),E.style.left=xe+"px"),ee&&jl(this,{left:xe,top:de,right:xe+E.offsetWidth,bottom:de+E.offsetHeight})},triggerOnKeyDown:mi(Cl),triggerOnKeyPress:mi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:mi(El),execCommand:function(b){if(ha.hasOwnProperty(b))return ha[b].call(null,this)},triggerElectric:mi(function(b){Tl(this,b)}),findPosH:function(b,E,ee,oe){var se=1;E<0&&(se=-1,E=-E);for(var ce=Lt(this.doc,b),de=0;de<E&&(ce=ys(this.doc,ce,se,ee,oe),!ce.hitSide);++de);return ce},moveH:mi(function(b,E){var ee=this;this.extendSelectionsBy(function(oe){return ee.display.shift||ee.doc.extend||oe.empty()?ys(ee.doc,oe.head,b,E,ee.options.rtlMoveVisually):b<0?oe.from():oe.to()},Te)}),deleteH:mi(function(b,E){var ee=this.doc.sel,oe=this.doc;ee.somethingSelected()?oe.replaceSelection("",null,"+delete"):zo(this,function(se){var ce=ys(oe,se.head,b,E,!1);return b<0?{from:ce,to:se.head}:{from:se.head,to:ce}})}),findPosV:function(b,E,ee,oe){var se=1,ce=oe;E<0&&(se=-1,E=-E);for(var de=Lt(this.doc,b),xe=0;xe<E;++xe){var Se=xi(this,de,"div");if(ce==null?ce=Se.left:Se.left=ce,de=_l(this,Se,se,ee),de.hitSide)break}return de},moveV:mi(function(b,E){var ee=this,oe=this.doc,se=[],ce=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(xe){if(ce)return b<0?xe.from():xe.to();var Se=xi(ee,xe.head,"div");xe.goalColumn!=null&&(Se.left=xe.goalColumn),se.push(Se.left);var et=_l(ee,Se,b,E);return E=="page"&&xe==oe.sel.primary()&&qa(ee,Po(ee,et,"div").top-Se.top),et},Te),se.length)for(var de=0;de<oe.sel.ranges.length;de++)oe.sel.ranges[de].goalColumn=se[de]}),findWordAt:function(b){var E=this.doc,ee=nt(E,b.line).text,oe=b.ch,se=b.ch;if(ee){var ce=this.getHelper(b,"wordChars");(b.sticky=="before"||se==ee.length)&&oe?--oe:++se;for(var de=ee.charAt(oe),xe=le(de,ce)?function(Se){return le(Se,ce)}:/\s/.test(de)?function(Se){return/\s/.test(Se)}:function(Se){return!/\s/.test(Se)&&!le(Se)};oe>0&&xe(ee.charAt(oe-1));)--oe;for(;se<ee.length&&xe(ee.charAt(se));)++se}return new xr(We(b.line,oe),We(b.line,se))},toggleOverwrite:function(b){b!=null&&b==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?He(this.display.cursorDiv,"CodeMirror-overwrite"):Ve(this.display.cursorDiv,"CodeMirror-overwrite"),nn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ce()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:mi(function(b,E){qo(this,b,E)}),getScrollInfo:function(){var b=this.display.scroller;return{left:b.scrollLeft,top:b.scrollTop,height:b.scrollHeight-Di(this)-this.display.barHeight,width:b.scrollWidth-Di(this)-this.display.barWidth,clientHeight:no(this),clientWidth:Ji(this)}},scrollIntoView:mi(function(b,E){b==null?(b={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof b=="number"?b={from:We(b,0),to:null}:b.from==null&&(b={from:b,to:null}),b.to||(b.to=b.from),b.margin=E||0,b.from.line!=null?Gl(this,b):Ls(this,b.from,b.to,b.margin)}),setSize:mi(function(b,E){var ee=this,oe=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};b!=null&&(this.display.wrapper.style.width=oe(b)),E!=null&&(this.display.wrapper.style.height=oe(E)),this.options.lineWrapping&&Yo(this);var se=this.display.viewFrom;this.doc.iter(se,this.display.viewTo,function(ce){if(ce.widgets){for(var de=0;de<ce.widgets.length;de++)if(ce.widgets[de].noHScroll){co(ee,se,"widget");break}}++se}),this.curOp.forceUpdate=!0,nn(this,"refresh",this)}),operation:function(b){return Bi(this,b)},startOperation:function(){return Eo(this)},endOperation:function(){return Ao(this)},refresh:mi(function(){var b=this.display.cachedTextHeight;wi(this),this.curOp.forceUpdate=!0,xo(this),qo(this,this.doc.scrollLeft,this.doc.scrollTop),ts(this.display),(b==null||Math.abs(b-Mi(this.display))>.5||this.options.lineWrapping)&&Ya(this),nn(this,"refresh",this)}),swapDoc:mi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),xo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Wr(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}},Qt(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,oe){a.registerHelper(b,E,oe),x[b]._global.push({pred:ee,val:oe})}}function ys(a,y,x,b,E){var ee=y,oe=x,se=nt(a,y.line),ce=E&&a.direction=="rtl"?-x:x;function de(){var hn=y.line+ce;return hn<a.first||hn>=a.first+a.size?!1:(y=new We(hn,y.ch,y.sticky),se=nt(a,hn))}function xe(hn){var an;if(b=="codepoint"){var vn=se.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(vn)?an=null:an=new We(y.line,Math.max(0,Math.min(se.text.length,y.ch+x*(vn>=55296&&vn<56320?2:1))),-x)}else E?an=Du(a.cm,se,y,x):an=ds(se,y,x);if(an==null)if(!hn&&de())y=fs(E,a.cm,se,y.line,ce);else return!1;else y=an;return!0}if(b=="char"||b=="codepoint")xe();else if(b=="column")xe(!0);else if(b=="word"||b=="group")for(var Se=null,et=b=="group",Xe=a.cm&&a.cm.getHelper(y,"wordChars"),At=!0;!(x<0&&!xe(!At));At=!1){var Rt=se.text.charAt(y.ch)||`
|
|
`,Kt=le(Rt,Xe)?"w":et&&Rt==`
|
|
`?"n":!et||/\s/.test(Rt)?null:"p";if(et&&!At&&!Kt&&(Kt="s"),Se&&Se!=Kt){x<0&&(x=1,xe(),y.sticky="after");break}if(Kt&&(Se=Kt),x>0&&!xe(!At))break}var on=Ra(a,y,ee,oe,!0);return qt(ee,on)&&(on.hitSide=!0),on}function _l(a,y,x,b){var E=a.doc,ee=y.left,oe;if(b=="page"){var se=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(se-.5*Mi(a.display),3);oe=(x>0?y.bottom:y.top)+x*ce}else b=="line"&&(oe=x>0?y.bottom+3:y.top-3);for(var de;de=ai(a,ee,oe),!!de.outside;){if(x<0?oe<=0:oe>=E.height){de.hitSide=!0;break}oe+=x*5}return de}var kr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};kr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Nl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(se){for(var ce=se.target;ce;ce=ce.parentNode){if(ce==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Bt(E,"paste",function(se){!ee(se)||dt(b,se)||Pl(se,b)||ge<=11&&setTimeout($r(b,function(){return y.updateFromDOM()}),20)}),Bt(E,"compositionstart",function(se){y.composing={data:se.data,done:!1}}),Bt(E,"compositionupdate",function(se){y.composing||(y.composing={data:se.data,done:!1})}),Bt(E,"compositionend",function(se){y.composing&&(se.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Bt(E,"touchstart",function(){return x.forceCompositionEnd()}),Bt(E,"input",function(){y.composing||y.readFromDOMSoon()});function oe(se){if(!(!ee(se)||dt(b,se))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),se.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ce=Fl(b);za({lineWise:!0,text:ce.text}),se.type=="cut"&&b.operation(function(){b.setSelections(ce.ranges,0,ye),b.replaceSelection("",null,"cut")})}else return;if(se.clipboardData){se.clipboardData.clearData();var de=Ki.text.join(`
|
|
`);if(se.clipboardData.setData("Text",de),se.clipboardData.getData("Text")==de){se.preventDefault();return}}var xe=Rl(),Se=xe.firstChild;b.display.lineSpace.insertBefore(xe,b.display.lineSpace.firstChild),Se.value=Ki.text.join(`
|
|
`);var et=document.activeElement;yt(Se),setTimeout(function(){b.display.lineSpace.removeChild(xe),et.focus(),et==E&&x.showPrimarySelection()},50)}}Bt(E,"copy",oe),Bt(E,"cut",oe)},kr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},kr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},kr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},kr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},kr.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 ee=Za(y,a.anchorNode,a.anchorOffset),oe=Za(y,a.focusNode,a.focusOffset);if(!(ee&&!ee.bad&&oe&&!oe.bad&&kt(Je(ee,oe),b)==0&&kt(dn(ee,oe),E)==0)){var se=y.display.view,ce=b.line>=y.display.viewFrom&&Ol(y,b)||{node:se[0].measure.map[2],offset:0},de=E.line<y.display.viewTo&&Ol(y,E);if(!de){var xe=se[se.length-1].measure,Se=xe.maps?xe.maps[xe.maps.length-1]:xe.map;de={node:Se[Se.length-1],offset:Se[Se.length-2]-Se[Se.length-3]}}if(!ce||!de){a.removeAllRanges();return}var et=a.rangeCount&&a.getRangeAt(0),Xe;try{Xe=Me(ce.node,ce.offset,de.offset,de.node)}catch(At){}Xe&&(!ie&&y.state.focused?(a.collapse(ce.node,ce.offset),Xe.collapsed||(a.removeAllRanges(),a.addRange(Xe))):(a.removeAllRanges(),a.addRange(Xe)),et&&a.anchorNode==null?a.addRange(et):ie&&this.startGracePeriod()),this.rememberSelection()}},kr.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)},kr.prototype.showMultipleSelections=function(a){Ye(this.cm.display.cursorDiv,a.cursors),Ye(this.cm.display.selectionDiv,a.selection)},kr.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},kr.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Ge(this.div,y)},kr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},kr.prototype.blur=function(){this.div.blur()},kr.prototype.getField=function(){return this.div},kr.prototype.supportsTouch=function(){return!0},kr.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Bi(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)},kr.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},kr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(De&&we&&this.cm.display.gutterSpecs.length&&Ku(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var x=Za(y,a.anchorNode,a.anchorOffset),b=Za(y,a.focusNode,a.focusOffset);x&&b&&Bi(y,function(){di(y.doc,ho(x,b),ye),(x.bad||b.bad)&&(y.curOp.selectionChanged=!0)})}}},kr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,x=a.doc.sel.primary(),b=x.from(),E=x.to();if(b.ch==0&&b.line>a.firstLine()&&(b=We(b.line-1,nt(a.doc,b.line-1).length)),E.ch==nt(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=We(E.line+1,0)),b.line<y.viewFrom||E.line>y.viewTo-1)return!1;var ee,oe,se;b.line==y.viewFrom||(ee=Co(a,b.line))==0?(oe=Ee(y.view[0].line),se=y.view[0].node):(oe=Ee(y.view[ee].line),se=y.view[ee-1].node.nextSibling);var ce=Co(a,E.line),de,xe;if(ce==y.view.length-1?(de=y.viewTo-1,xe=y.lineDiv.lastChild):(de=Ee(y.view[ce+1].line)-1,xe=y.view[ce+1].node.previousSibling),!se)return!1;for(var Se=a.doc.splitLines(Yu(a,se,xe,oe,de)),et=Yt(a.doc,We(oe,0),We(de,nt(a.doc,de).text.length));Se.length>1&&et.length>1;)if(ke(Se)==ke(et))Se.pop(),et.pop(),de--;else if(Se[0]==et[0])Se.shift(),et.shift(),oe++;else break;for(var Xe=0,At=0,Rt=Se[0],Kt=et[0],on=Math.min(Rt.length,Kt.length);Xe<on&&Rt.charCodeAt(Xe)==Kt.charCodeAt(Xe);)++Xe;for(var hn=ke(Se),an=ke(et),vn=Math.min(hn.length-(Se.length==1?Xe:0),an.length-(et.length==1?Xe:0));At<vn&&hn.charCodeAt(hn.length-At-1)==an.charCodeAt(an.length-At-1);)++At;if(Se.length==1&&et.length==1&&oe==b.line)for(;Xe&&Xe>b.ch&&hn.charCodeAt(hn.length-At-1)==an.charCodeAt(an.length-At-1);)Xe--,At++;Se[Se.length-1]=hn.slice(0,hn.length-At).replace(/^\u200b+/,""),Se[0]=Se[0].slice(Xe).replace(/\u200b+$/,"");var Rn=We(oe,Xe),Dn=We(de,et.length?ke(et).length-At:0);if(Se.length>1||Se[0]||kt(Rn,Dn))return Io(a.doc,Se,Rn,Dn,"+input"),!0},kr.prototype.ensurePolled=function(){this.forceCompositionEnd()},kr.prototype.reset=function(){this.forceCompositionEnd()},kr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},kr.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))},kr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Bi(this.cm,function(){return wi(a.cm)})},kr.prototype.setUneditable=function(a){a.contentEditable="false"},kr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||$r(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},kr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},kr.prototype.onContextMenu=function(){},kr.prototype.resetPosition=function(){},kr.prototype.needsContentAttribute=!0;function Ol(a,y){var x=Qi(a,y.line);if(!x||x.hidden)return null;var b=nt(a.doc,y.line),E=Mo(x,b,y.line),ee=en(b,a.doc.direction),oe="left";if(ee){var se=jt(ee,y.ch);oe=se%2?"right":"left"}var ce=xa(E.map,y.ch,oe);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}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 ee="",oe=!1,se=a.doc.lineSeparator(),ce=!1;function de(Xe){return function(At){return At.id==Xe}}function xe(){oe&&(ee+=se,ce&&(ee+=se),oe=ce=!1)}function Se(Xe){Xe&&(xe(),ee+=Xe)}function et(Xe){if(Xe.nodeType==1){var At=Xe.getAttribute("cm-text");if(At){Se(At);return}var Rt=Xe.getAttribute("cm-marker"),Kt;if(Rt){var on=a.findMarks(We(b,0),We(E+1,0),de(+Rt));on.length&&(Kt=on[0].find(0))&&Se(Yt(a.doc,Kt.from,Kt.to).join(se));return}if(Xe.getAttribute("contenteditable")=="false")return;var hn=/^(pre|div|p|li|table|br)$/i.test(Xe.nodeName);if(!/^br$/i.test(Xe.nodeName)&&Xe.textContent.length==0)return;hn&&xe();for(var an=0;an<Xe.childNodes.length;an++)et(Xe.childNodes[an]);/^(pre|p)$/i.test(Xe.nodeName)&&(ce=!0),hn&&(oe=!0)}else Xe.nodeType==3&&Se(Xe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;et(y),y!=x;)y=y.nextSibling,ce=!1;return ee}function Za(a,y,x){var b;if(y==a.display.lineDiv){if(b=a.display.lineDiv.childNodes[x],!b)return jo(a.clipPos(We(a.display.viewTo-1)),!0);y=null,x=0}else for(b=y;;b=b.parentNode){if(!b||b==a.display.lineDiv)return null;if(b.parentNode&&b.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var ee=a.display.view[E];if(ee.node==b)return Xu(ee,y,x)}}function Xu(a,y,x){var b=a.text.firstChild,E=!1;if(!y||!Ge(b,y))return jo(We(Ee(a.line),0),!0);if(y==b&&(E=!0,y=b.childNodes[x],x=0,!y)){var ee=a.rest?ke(a.rest):a.line;return jo(We(Ee(ee),ee.text.length),E)}var oe=y.nodeType==3?y:null,se=y;for(!oe&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(oe=y.firstChild,x&&(x=oe.nodeValue.length));se.parentNode!=b;)se=se.parentNode;var ce=a.measure,de=ce.maps;function xe(Kt,on,hn){for(var an=-1;an<(de?de.length:0);an++)for(var vn=an<0?ce.map:de[an],Rn=0;Rn<vn.length;Rn+=3){var Dn=vn[Rn+2];if(Dn==Kt||Dn==on){var qn=Ee(an<0?a.line:a.rest[an]),Fr=vn[Rn]+hn;return(hn<0||Dn!=Kt)&&(Fr=vn[Rn+(hn?1:0)]),We(qn,Fr)}}}var Se=xe(oe,se,x);if(Se)return jo(Se,E);for(var et=se.nextSibling,Xe=oe?oe.nodeValue.length-x:0;et;et=et.nextSibling){if(Se=xe(et,et.firstChild,0),Se)return jo(We(Se.line,Se.ch-Xe),E);Xe+=et.textContent.length}for(var At=se.previousSibling,Rt=x;At;At=At.previousSibling){if(Se=xe(At,At.firstChild,-1),Se)return jo(We(Se.line,Se.ch+Rt),E);Rt+=At.textContent.length}}var Vr=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ue,this.hasSelection=!1,this.composing=null};Vr.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),Oe&&(E.style.width="0px"),Bt(E,"input",function(){me&&ge>=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Bt(E,"paste",function(oe){dt(b,oe)||Pl(oe,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(oe){if(!dt(b,oe)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var se=Fl(b);za({lineWise:!0,text:se.text}),oe.type=="cut"?b.setSelections(se.ranges,null,ye):(x.prevInput="",E.value=se.text.join(`
|
|
`),yt(E))}else return;oe.type=="cut"&&(b.state.cutIncoming=+new Date)}}Bt(E,"cut",ee),Bt(E,"copy",ee),Bt(a.scroller,"paste",function(oe){if(!(oi(a,oe)||dt(b,oe))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var se=new Event("paste");se.clipboardData=oe.clipboardData,E.dispatchEvent(se)}}),Bt(a.lineSpace,"selectstart",function(oe){oi(a,oe)||ln(oe)}),Bt(E,"compositionstart",function(){var oe=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:oe,range:b.markText(oe,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Bt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Vr.prototype.createField=function(a){this.wrapper=Rl(),this.textarea=this.wrapper.firstChild},Vr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Vr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=xi(a,x.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),oe=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+oe.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+oe.left-ee.left))}return b},Vr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Ye(x.cursorDiv,a.cursors),Ye(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Vr.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&&yt(this.textarea),me&&ge>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&ge>=9&&(this.hasSelection=null))}},Vr.prototype.getField=function(){return this.textarea},Vr.prototype.supportsTouch=function(){return!1},Vr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Re||Ce()!=this.textarea))try{this.textarea.focus()}catch(a){}},Vr.prototype.blur=function(){this.textarea.blur()},Vr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vr.prototype.receivedFocus=function(){this.slowPoll()},Vr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Vr.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)},Vr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Un(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&ge>=9&&this.hasSelection===E||Le&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,se=Math.min(b.length,E.length);oe<se&&b.charCodeAt(oe)==E.charCodeAt(oe);)++oe;return Bi(y,function(){gs(y,E.slice(oe),b.length-oe,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
|
|
`)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Vr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vr.prototype.onKeyPress=function(){me&&ge>=9&&(this.hasSelection=null),this.fastPoll()},Vr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=wo(x,a),oe=b.scroller.scrollTop;if(!ee||pe)return;var se=x.options.resetSelectionOnContextMenu;se&&x.doc.sel.contains(ee)==-1&&$r(x,di)(x.doc,ho(ee),ye);var ce=E.style.cssText,de=y.wrapper.style.cssText,xe=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-xe.top-5)+"px; left: "+(a.clientX-xe.left-5)+`px;
|
|
z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Se;Ae&&(Se=window.scrollY),b.input.focus(),Ae&&window.scrollTo(null,Se),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=Xe,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function et(){if(E.selectionStart!=null){var Rt=x.somethingSelected(),Kt="\u200B"+(Rt?E.value:"");E.value="\u21DA",E.value=Kt,y.prevInput=Rt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Kt.length,b.selForContextMenu=x.doc.sel}}function Xe(){if(y.contextMenuPending==Xe&&(y.contextMenuPending=!1,y.wrapper.style.cssText=de,E.style.cssText=ce,me&&ge<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=oe),E.selectionStart!=null)){(!me||me&&ge<9)&&et();var Rt=0,Kt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?$r(x,tl)(x):Rt++<10?b.detectingSelectAll=setTimeout(Kt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(Kt,200)}}if(me&&ge>=9&&et(),ze){wn(a);var At=function(){Vt(window,"mouseup",At),setTimeout(Xe,20)};Bt(window,"mouseup",At)}else setTimeout(Xe,50)},Vr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Vr.prototype.setUneditable=function(){},Vr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?$e(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=Ce();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=se.getValue()}var E;if(a.form&&(Bt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var oe=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=oe}}catch(ce){}}y.finishInit=function(ce){ce.save=b,ce.getTextArea=function(){return a},ce.toTextArea=function(){ce.toTextArea=isNaN,b(),a.parentNode.removeChild(ce.getWrapperElement()),a.style.display="",a.form&&(Vt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var se=Ir(function(ce){return a.parentNode.insertBefore(ce,a.nextSibling)},y);return se}function Qu(a){a.off=Vt,a.on=Bt,a.wheelEventPixels=iu,a.Doc=Ci,a.splitLines=Wn,a.countColumn=he,a.findColumn=bt,a.isWordChar=re,a.Pass=qe,a.signal=nn,a.Line=Or,a.changeEnd=po,a.scrollbarModel=Ps,a.Pos=We,a.cmpPos=kt,a.modes=gt,a.mimeModes=xt,a.resolveMode=mn,a.getMode=tn,a.modeExtensions=Ln,a.extendMode=Mn,a.copyState=kn,a.startState=Bn,a.innerMode=xn,a.commands=ha,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=Wo,a.normalizeKeyMap=Au,a.StringStream=Ft,a.SharedTextMarker=ca,a.TextMarker=mo,a.LineWidget=ua,a.e_preventDefault=ln,a.e_stopPropagation=_n,a.e_stop=wn,a.addClass=He,a.contains=Ge,a.rmClass=Ve,a.keyNames=go}Zu(Ir),Vu(Ir);var qu="iter insert remove copy getEditor constructor".split(" ");for(var ja in Ci.prototype)Ci.prototype.hasOwnProperty(ja)&&Be(qu,ja)<0&&(Ir.prototype[ja]=function(a){return function(){return a.apply(this.doc,arguments)}}(Ci.prototype[ja]));return Qt(Ci),Ir.inputStyles={textarea:Vr,contenteditable:kr},Ir.defineMode=function(a){!Ir.defaults.mode&&a!="null"&&(Ir.defaults.mode=a),_t.apply(this,arguments)},Ir.defineMIME=Cn,Ir.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ir.defineMIME("text/plain","null"),Ir.defineExtension=function(a,y){Ir.prototype[a]=y},Ir.defineDocExtension=function(a,y){Ci.prototype[a]=y},Ir.fromTextArea=Ju,Qu(Ir),Ir.version="5.58.2",Ir})},25419:function(Pt,Ot,fe){(function(ie){ie(fe(89780),fe(15525),fe(98101))})(function(ie){"use strict";ie.defineMode("markdown",function(ot,Ne){var _e=ie.getMode(ot,"text/html"),me=_e.name=="null";function ge(he){if(ie.findModeByName){var ue=ie.findModeByName(he);ue&&(he=ue.mime||ue.mimes[0])}var Be=ie.getMode(ot,he);return Be.name=="null"?null:Be}Ne.highlightFormatting===void 0&&(Ne.highlightFormatting=!1),Ne.maxBlockquoteDepth===void 0&&(Ne.maxBlockquoteDepth=0),Ne.taskLists===void 0&&(Ne.taskLists=!1),Ne.strikethrough===void 0&&(Ne.strikethrough=!1),Ne.emoji===void 0&&(Ne.emoji=!1),Ne.fencedCodeBlockHighlighting===void 0&&(Ne.fencedCodeBlockHighlighting=!0),Ne.fencedCodeBlockDefaultMode===void 0&&(Ne.fencedCodeBlockDefaultMode="text/plain"),Ne.xml===void 0&&(Ne.xml=!0),Ne.tokenTypeOverrides===void 0&&(Ne.tokenTypeOverrides={});var Ae={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 Ie in Ae)Ae.hasOwnProperty(Ie)&&Ne.tokenTypeOverrides[Ie]&&(Ae[Ie]=Ne.tokenTypeOverrides[Ie]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,it=/^\[(x| )\](?=\s)/i,ve=Ne.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ht=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Oe=/^[^#!\[\]*_\\<>` "'(~:]+/,De=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Re=/^\s*\[[^\]]+?\]:.*$/,Le=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,st=" ";function ct(he,ue,Be){return ue.f=ue.inline=Be,Be(he,ue)}function vt(he,ue,Be){return ue.f=ue.block=Be,Be(he,ue)}function Ue(he){return!he||!/\S/.test(he.string)}function ze(he){if(he.linkTitle=!1,he.linkHref=!1,he.linkText=!1,he.em=!1,he.strong=!1,he.strikethrough=!1,he.quote=0,he.indentedCode=!1,he.f==Ve){var ue=me;if(!ue){var Be=ie.innerMode(_e,he.htmlState);ue=Be.mode.name=="xml"&&Be.state.tagStart===null&&!Be.state.context&&Be.state.tokenize.isInText}ue&&(he.f=at,he.block=Qe,he.htmlState=null)}return he.trailingSpace=0,he.trailingSpaceNewLine=!1,he.prevLine=he.thisLine,he.thisLine={stream:null},null}function Qe(he,ue){var Be=he.column()===ue.indentation,rt=Ue(ue.prevLine.stream),qe=ue.indentedCode,ye=ue.prevLine.hr,Pe=ue.list!==!1,Te=(ue.listStack[ue.listStack.length-1]||0)+3;ue.indentedCode=!1;var bt=ue.indentation;if(ue.indentationDiff===null&&(ue.indentationDiff=ue.indentation,Pe)){for(ue.list=null;bt<ue.listStack[ue.listStack.length-1];)ue.listStack.pop(),ue.listStack.length?ue.indentation=ue.listStack[ue.listStack.length-1]:ue.list=!1;ue.list!==!1&&(ue.indentationDiff=bt-ue.listStack[ue.listStack.length-1])}var Ke=!rt&&!ye&&!ue.prevLine.header&&(!Pe||!qe)&&!ue.prevLine.fencedCodeEnd,mt=(ue.list===!1||ye||rt)&&ue.indentation<=Te&&he.match(we),ke=null;if(ue.indentationDiff>=4&&(qe||ue.prevLine.fencedCodeEnd||ue.prevLine.header||rt))return he.skipToEnd(),ue.indentedCode=!0,Ae.code;if(he.eatSpace())return null;if(Be&&ue.indentation<=Te&&(ke=he.match(ve))&&ke[1].length<=6)return ue.quote=0,ue.header=ke[1].length,ue.thisLine.header=!0,Ne.highlightFormatting&&(ue.formatting="header"),ue.f=ue.inline,Ye(ue);if(ue.indentation<=Te&&he.eat(">"))return ue.quote=Be?1:ue.quote+1,Ne.highlightFormatting&&(ue.formatting="quote"),he.eatSpace(),Ye(ue);if(!mt&&!ue.setext&&Be&&ue.indentation<=Te&&(ke=he.match(pe))){var tt=ke[1]?"ol":"ul";return ue.indentation=bt+he.current().length,ue.list=!0,ue.quote=0,ue.listStack.push(ue.indentation),ue.em=!1,ue.strong=!1,ue.code=!1,ue.strikethrough=!1,Ne.taskLists&&he.match(it,!1)&&(ue.taskList=!0),ue.f=ue.inline,Ne.highlightFormatting&&(ue.formatting=["list","list-"+tt]),Ye(ue)}else{if(Be&&ue.indentation<=Te&&(ke=he.match(De,!0)))return ue.quote=0,ue.fencedEndRE=new RegExp(ke[1]+"+ *$"),ue.localMode=Ne.fencedCodeBlockHighlighting&&ge(ke[2]||Ne.fencedCodeBlockDefaultMode),ue.localMode&&(ue.localState=ie.startState(ue.localMode)),ue.f=ue.block=It,Ne.highlightFormatting&&(ue.formatting="code-block"),ue.code=-1,Ye(ue);if(ue.setext||(!Ke||!Pe)&&!ue.quote&&ue.list===!1&&!ue.code&&!mt&&!Re.test(he.string)&&(ke=he.lookAhead(1))&&(ke=ke.match(ht)))return ue.setext?(ue.header=ue.setext,ue.setext=0,he.skipToEnd(),Ne.highlightFormatting&&(ue.formatting="header")):(ue.header=ke[0].charAt(0)=="="?1:2,ue.setext=ue.header),ue.thisLine.header=!0,ue.f=ue.inline,Ye(ue);if(mt)return he.skipToEnd(),ue.hr=!0,ue.thisLine.hr=!0,Ae.hr;if(he.peek()==="[")return ct(he,ue,Tt)}return ct(he,ue,ue.inline)}function Ve(he,ue){var Be=_e.token(he,ue.htmlState);if(!me){var rt=ie.innerMode(_e,ue.htmlState);(rt.mode.name=="xml"&&rt.state.tagStart===null&&!rt.state.context&&rt.state.tokenize.isInText||ue.md_inside&&he.current().indexOf(">")>-1)&&(ue.f=at,ue.block=Qe,ue.htmlState=null)}return Be}function It(he,ue){var Be=ue.listStack[ue.listStack.length-1]||0,rt=ue.indentation<Be,qe=Be+3;if(ue.fencedEndRE&&ue.indentation<=qe&&(rt||he.match(ue.fencedEndRE))){Ne.highlightFormatting&&(ue.formatting="code-block");var ye;return rt||(ye=Ye(ue)),ue.localMode=ue.localState=null,ue.block=Qe,ue.f=at,ue.fencedEndRE=null,ue.code=0,ue.thisLine.fencedCodeEnd=!0,rt?vt(he,ue,ue.block):ye}else return ue.localMode?ue.localMode.token(he,ue.localState):(he.skipToEnd(),Ae.code)}function Ye(he){var ue=[];if(he.formatting){ue.push(Ae.formatting),typeof he.formatting=="string"&&(he.formatting=[he.formatting]);for(var Be=0;Be<he.formatting.length;Be++)ue.push(Ae.formatting+"-"+he.formatting[Be]),he.formatting[Be]==="header"&&ue.push(Ae.formatting+"-"+he.formatting[Be]+"-"+he.header),he.formatting[Be]==="quote"&&(!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=he.quote?ue.push(Ae.formatting+"-"+he.formatting[Be]+"-"+he.quote):ue.push("error"))}if(he.taskOpen)return ue.push("meta"),ue.length?ue.join(" "):null;if(he.taskClosed)return ue.push("property"),ue.length?ue.join(" "):null;if(he.linkHref?ue.push(Ae.linkHref,"url"):(he.strong&&ue.push(Ae.strong),he.em&&ue.push(Ae.em),he.strikethrough&&ue.push(Ae.strikethrough),he.emoji&&ue.push(Ae.emoji),he.linkText&&ue.push(Ae.linkText),he.code&&ue.push(Ae.code),he.image&&ue.push(Ae.image),he.imageAltText&&ue.push(Ae.imageAltText,"link"),he.imageMarker&&ue.push(Ae.imageMarker)),he.header&&ue.push(Ae.header,Ae.header+"-"+he.header),he.quote&&(ue.push(Ae.quote),!Ne.maxBlockquoteDepth||Ne.maxBlockquoteDepth>=he.quote?ue.push(Ae.quote+"-"+he.quote):ue.push(Ae.quote+"-"+Ne.maxBlockquoteDepth)),he.list!==!1){var rt=(he.listStack.length-1)%3;rt?rt===1?ue.push(Ae.list2):ue.push(Ae.list3):ue.push(Ae.list1)}return he.trailingSpaceNewLine?ue.push("trailing-space-new-line"):he.trailingSpace&&ue.push("trailing-space-"+(he.trailingSpace%2?"a":"b")),ue.length?ue.join(" "):null}function Ze(he,ue){if(he.match(Oe,!0))return Ye(ue)}function at(he,ue){var Be=ue.text(he,ue);if(typeof Be!="undefined")return Be;if(ue.list)return ue.list=null,Ye(ue);if(ue.taskList){var rt=he.match(it,!0)[1]===" ";return rt?ue.taskOpen=!0:ue.taskClosed=!0,Ne.highlightFormatting&&(ue.formatting="task"),ue.taskList=!1,Ye(ue)}if(ue.taskOpen=!1,ue.taskClosed=!1,ue.header&&he.match(/^#+$/,!0))return Ne.highlightFormatting&&(ue.formatting="header"),Ye(ue);var qe=he.next();if(ue.linkTitle){ue.linkTitle=!1;var ye=qe;qe==="("&&(ye=")"),ye=(ye+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Pe="^\\s*(?:[^"+ye+"\\\\]+|\\\\\\\\|\\\\.)"+ye;if(he.match(new RegExp(Pe),!0))return Ae.linkHref}if(qe==="`"){var Te=ue.formatting;Ne.highlightFormatting&&(ue.formatting="code"),he.eatWhile("`");var bt=he.current().length;if(ue.code==0&&(!ue.quote||bt==1))return ue.code=bt,Ye(ue);if(bt==ue.code){var Ke=Ye(ue);return ue.code=0,Ke}else return ue.formatting=Te,Ye(ue)}else if(ue.code)return Ye(ue);if(qe==="\\"&&(he.next(),Ne.highlightFormatting)){var mt=Ye(ue),ke=Ae.formatting+"-escape";return mt?mt+" "+ke:ke}if(qe==="!"&&he.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ue.imageMarker=!0,ue.image=!0,Ne.highlightFormatting&&(ue.formatting="image"),Ye(ue);if(qe==="["&&ue.imageMarker&&he.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ue.imageMarker=!1,ue.imageAltText=!0,Ne.highlightFormatting&&(ue.formatting="image"),Ye(ue);if(qe==="]"&&ue.imageAltText){Ne.highlightFormatting&&(ue.formatting="image");var mt=Ye(ue);return ue.imageAltText=!1,ue.image=!1,ue.inline=ue.f=Ge,mt}if(qe==="["&&!ue.image)return ue.linkText&&he.match(/^.*?\]/)||(ue.linkText=!0,Ne.highlightFormatting&&(ue.formatting="link")),Ye(ue);if(qe==="]"&&ue.linkText){Ne.highlightFormatting&&(ue.formatting="link");var mt=Ye(ue);return ue.linkText=!1,ue.inline=ue.f=he.match(/\(.*?\)| ?\[.*?\]/,!1)?Ge:at,mt}if(qe==="<"&&he.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Me,Ne.highlightFormatting&&(ue.formatting="link");var mt=Ye(ue);return mt?mt+=" ":mt="",mt+Ae.linkInline}if(qe==="<"&&he.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ue.f=ue.inline=Me,Ne.highlightFormatting&&(ue.formatting="link");var mt=Ye(ue);return mt?mt+=" ":mt="",mt+Ae.linkEmail}if(Ne.xml&&qe==="<"&&he.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var tt=he.string.indexOf(">",he.pos);if(tt!=-1){var ut=he.string.substring(he.start,tt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ut)&&(ue.md_inside=!0)}return he.backUp(1),ue.htmlState=ie.startState(_e),vt(he,ue,Ve)}if(Ne.xml&&qe==="<"&&he.match(/^\/\w*?>/))return ue.md_inside=!1,"tag";if(qe==="*"||qe==="_"){for(var ae=1,te=he.pos==1?" ":he.string.charAt(he.pos-2);ae<3&&he.eat(qe);)ae++;var z=he.peek()||" ",re=!/\s/.test(z)&&(!Le.test(z)||/\s/.test(te)||Le.test(te)),le=!/\s/.test(te)&&(!Le.test(te)||/\s/.test(z)||Le.test(z)),ne=null,be=null;if(ae%2&&(!ue.em&&re&&(qe==="*"||!le||Le.test(te))?ne=!0:ue.em==qe&&le&&(qe==="*"||!re||Le.test(z))&&(ne=!1)),ae>1&&(!ue.strong&&re&&(qe==="*"||!le||Le.test(te))?be=!0:ue.strong==qe&&le&&(qe==="*"||!re||Le.test(z))&&(be=!1)),be!=null||ne!=null){Ne.highlightFormatting&&(ue.formatting=ne==null?"strong":be==null?"em":"strong em"),ne===!0&&(ue.em=qe),be===!0&&(ue.strong=qe);var Ke=Ye(ue);return ne===!1&&(ue.em=!1),be===!1&&(ue.strong=!1),Ke}}else if(qe===" "&&(he.eat("*")||he.eat("_"))){if(he.peek()===" ")return Ye(ue);he.backUp(1)}if(Ne.strikethrough){if(qe==="~"&&he.eatWhile(qe)){if(ue.strikethrough){Ne.highlightFormatting&&(ue.formatting="strikethrough");var Ke=Ye(ue);return ue.strikethrough=!1,Ke}else if(he.match(/^[^\s]/,!1))return ue.strikethrough=!0,Ne.highlightFormatting&&(ue.formatting="strikethrough"),Ye(ue)}else if(qe===" "&&he.match(/^~~/,!0)){if(he.peek()===" ")return Ye(ue);he.backUp(2)}}if(Ne.emoji&&qe===":"&&he.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ue.emoji=!0,Ne.highlightFormatting&&(ue.formatting="emoji");var je=Ye(ue);return ue.emoji=!1,je}return qe===" "&&(he.match(/^ +$/,!1)?ue.trailingSpace++:ue.trailingSpace&&(ue.trailingSpaceNewLine=!0)),Ye(ue)}function Me(he,ue){var Be=he.next();if(Be===">"){ue.f=ue.inline=at,Ne.highlightFormatting&&(ue.formatting="link");var rt=Ye(ue);return rt?rt+=" ":rt="",rt+Ae.linkInline}return he.match(/^[^>]+/,!0),Ae.linkInline}function Ge(he,ue){if(he.eatSpace())return null;var Be=he.next();return Be==="("||Be==="["?(ue.f=ue.inline=He(Be==="("?")":"]"),Ne.highlightFormatting&&(ue.formatting="link-string"),ue.linkHref=!0,Ye(ue)):"error"}var Ce={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function He(he){return function(ue,Be){var rt=ue.next();if(rt===he){Be.f=Be.inline=at,Ne.highlightFormatting&&(Be.formatting="link-string");var qe=Ye(Be);return Be.linkHref=!1,qe}return ue.match(Ce[he]),Be.linkHref=!0,Ye(Be)}}function Tt(he,ue){return he.match(/^([^\]\\]|\\.)*\]:/,!1)?(ue.f=yt,he.next(),Ne.highlightFormatting&&(ue.formatting="link"),ue.linkText=!0,Ye(ue)):ct(he,ue,at)}function yt(he,ue){if(he.match(/^\]:/,!0)){ue.f=ue.inline=lt,Ne.highlightFormatting&&(ue.formatting="link");var Be=Ye(ue);return ue.linkText=!1,Be}return he.match(/^([^\]\\]|\\.)+/,!0),Ae.linkText}function lt(he,ue){return he.eatSpace()?null:(he.match(/^[^\s]+/,!0),he.peek()===void 0?ue.linkTitle=!0:he.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ue.f=ue.inline=at,Ae.linkHref+" url")}var $e={startState:function(){return{f:Qe,prevLine:{stream:null},thisLine:{stream:null},block:Qe,htmlState:null,indentation:0,inline:at,text:Ze,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(he){return{f:he.f,prevLine:he.prevLine,thisLine:he.thisLine,block:he.block,htmlState:he.htmlState&&ie.copyState(_e,he.htmlState),indentation:he.indentation,localMode:he.localMode,localState:he.localMode?ie.copyState(he.localMode,he.localState):null,inline:he.inline,text:he.text,formatting:!1,linkText:he.linkText,linkTitle:he.linkTitle,linkHref:he.linkHref,code:he.code,em:he.em,strong:he.strong,strikethrough:he.strikethrough,emoji:he.emoji,header:he.header,setext:he.setext,hr:he.hr,taskList:he.taskList,list:he.list,listStack:he.listStack.slice(0),quote:he.quote,indentedCode:he.indentedCode,trailingSpace:he.trailingSpace,trailingSpaceNewLine:he.trailingSpaceNewLine,md_inside:he.md_inside,fencedEndRE:he.fencedEndRE}},token:function(he,ue){if(ue.formatting=!1,he!=ue.thisLine.stream){if(ue.header=0,ue.hr=!1,he.match(/^\s*$/,!0))return ze(ue),null;if(ue.prevLine=ue.thisLine,ue.thisLine={stream:he},ue.taskList=!1,ue.trailingSpace=0,ue.trailingSpaceNewLine=!1,!ue.localState&&(ue.f=ue.block,ue.f!=Ve)){var Be=he.match(/^\s*/,!0)[0].replace(/\t/g,st).length;if(ue.indentation=Be,ue.indentationDiff=null,Be>0)return null}}return ue.f(he,ue)},innerMode:function(he){return he.block==Ve?{state:he.htmlState,mode:_e}:he.localState?{state:he.localState,mode:he.localMode}:{state:he,mode:$e}},indent:function(he,ue,Be){return he.block==Ve&&_e.indent?_e.indent(he.htmlState,ue,Be):he.localState&&he.localMode.indent?he.localMode.indent(he.localState,ue,Be):ie.Pass},blankLine:ze,getType:Ye,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return $e},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},98101:function(Pt,Ot,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";ie.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 ot=0;ot<ie.modeInfo.length;ot++){var Ne=ie.modeInfo[ot];Ne.mimes&&(Ne.mime=Ne.mimes[0])}ie.findModeByMIME=function(_e){_e=_e.toLowerCase();for(var me=0;me<ie.modeInfo.length;me++){var ge=ie.modeInfo[me];if(ge.mime==_e)return ge;if(ge.mimes){for(var Ae=0;Ae<ge.mimes.length;Ae++)if(ge.mimes[Ae]==_e)return ge}}if(/\+xml$/.test(_e))return ie.findModeByMIME("application/xml");if(/\+json$/.test(_e))return ie.findModeByMIME("application/json")},ie.findModeByExtension=function(_e){_e=_e.toLowerCase();for(var me=0;me<ie.modeInfo.length;me++){var ge=ie.modeInfo[me];if(ge.ext){for(var Ae=0;Ae<ge.ext.length;Ae++)if(ge.ext[Ae]==_e)return ge}}},ie.findModeByFileName=function(_e){for(var me=0;me<ie.modeInfo.length;me++){var ge=ie.modeInfo[me];if(ge.file&&ge.file.test(_e))return ge}var Ae=_e.lastIndexOf("."),Ie=Ae>-1&&_e.substring(Ae+1,_e.length);if(Ie)return ie.findModeByExtension(Ie)},ie.findModeByName=function(_e){_e=_e.toLowerCase();for(var me=0;me<ie.modeInfo.length;me++){var ge=ie.modeInfo[me];if(ge.name.toLowerCase()==_e)return ge;if(ge.alias){for(var Ae=0;Ae<ge.alias.length;Ae++)if(ge.alias[Ae].toLowerCase()==_e)return ge}}}})},67549:function(Pt,Ot,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";ie.defineMode("stex",function(ot,Ne){"use strict";function _e(Oe,De){Oe.cmdState.push(De)}function me(Oe){return Oe.cmdState.length>0?Oe.cmdState[Oe.cmdState.length-1]:null}function ge(Oe){var De=Oe.cmdState.pop();De&&De.closeBracket()}function Ae(Oe){for(var De=Oe.cmdState,Re=De.length-1;Re>=0;Re--){var Le=De[Re];if(Le.name!="DEFAULT")return Le}return{styleIdentifier:function(){return null}}}function Ie(Oe,De,Re){return function(){this.name=Oe,this.bracketNo=0,this.style=De,this.styles=Re,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=Ie("importmodule","tag",["string","builtin"]),we.documentclass=Ie("documentclass","tag",["","atom"]),we.usepackage=Ie("usepackage","tag",["atom"]),we.begin=Ie("begin","tag",["atom"]),we.end=Ie("end","tag",["atom"]),we.label=Ie("label","tag",["atom"]),we.ref=Ie("ref","tag",["atom"]),we.eqref=Ie("eqref","tag",["atom"]),we.cite=Ie("cite","tag",["atom"]),we.bibitem=Ie("bibitem","tag",["atom"]),we.Bibitem=Ie("Bibitem","tag",["atom"]),we.RBibitem=Ie("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function pe(Oe,De){Oe.f=De}function it(Oe,De){var Re;if(Oe.match(/^\\[a-zA-Z@]+/)){var Le=Oe.current().slice(1);return Re=we.hasOwnProperty(Le)?we[Le]:we.DEFAULT,Re=new Re,_e(De,Re),pe(De,ht),Re.style}if(Oe.match(/^\\[$&%#{}_]/)||Oe.match(/^\\[,;!\/\\]/))return"tag";if(Oe.match("\\["))return pe(De,function(ct,vt){return ve(ct,vt,"\\]")}),"keyword";if(Oe.match("\\("))return pe(De,function(ct,vt){return ve(ct,vt,"\\)")}),"keyword";if(Oe.match("$$"))return pe(De,function(ct,vt){return ve(ct,vt,"$$")}),"keyword";if(Oe.match("$"))return pe(De,function(ct,vt){return ve(ct,vt,"$")}),"keyword";var st=Oe.next();if(st=="%")return Oe.skipToEnd(),"comment";if(st=="}"||st=="]"){if(Re=me(De),Re)Re.closeBracket(st),pe(De,ht);else return"error";return"bracket"}else return st=="{"||st=="["?(Re=we.DEFAULT,Re=new Re,_e(De,Re),"bracket"):/\d/.test(st)?(Oe.eatWhile(/[\w.%]/),"atom"):(Oe.eatWhile(/[\w\-_]/),Re=Ae(De),Re.name=="begin"&&(Re.argument=Oe.current()),Re.styleIdentifier())}function ve(Oe,De,Re){if(Oe.eatSpace())return null;if(Re&&Oe.match(Re))return pe(De,it),"keyword";if(Oe.match(/^\\[a-zA-Z@]+/))return"tag";if(Oe.match(/^[a-zA-Z]+/))return"variable-2";if(Oe.match(/^\\[$&%#{}_]/)||Oe.match(/^\\[,;!\/]/)||Oe.match(/^[\^_&]/))return"tag";if(Oe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Oe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Le=Oe.next();return Le=="{"||Le=="}"||Le=="["||Le=="]"||Le=="("||Le==")"?"bracket":Le=="%"?(Oe.skipToEnd(),"comment"):"error"}function ht(Oe,De){var Re=Oe.peek(),Le;return Re=="{"||Re=="["?(Le=me(De),Le.openBracket(Re),Oe.eat(Re),pe(De,it),"bracket"):/[ \t\r]/.test(Re)?(Oe.eat(Re),null):(pe(De,it),ge(De),it(Oe,De))}return{startState:function(){var Oe=Ne.inMathMode?function(De,Re){return ve(De,Re)}:it;return{cmdState:[],f:Oe}},copyState:function(Oe){return{cmdState:Oe.cmdState.slice(),f:Oe.f}},token:function(Oe,De){return De.f(Oe,De)},blankLine:function(Oe){Oe.f=it,Oe.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},15525:function(Pt,Ot,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";var ot={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Ne={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(_e,me){var ge=_e.indentUnit,Ae={},Ie=me.htmlMode?ot:Ne;for(var we in Ie)Ae[we]=Ie[we];for(var we in me)Ae[we]=me[we];var pe,it;function ve(Me,Ge){function Ce(yt){return Ge.tokenize=yt,yt(Me,Ge)}var He=Me.next();if(He=="<")return Me.eat("!")?Me.eat("[")?Me.match("CDATA[")?Ce(De("atom","]]>")):null:Me.match("--")?Ce(De("comment","-->")):Me.match("DOCTYPE",!0,!0)?(Me.eatWhile(/[\w\._\-]/),Ce(Re(1))):null:Me.eat("?")?(Me.eatWhile(/[\w\._\-]/),Ge.tokenize=De("meta","?>"),"meta"):(pe=Me.eat("/")?"closeTag":"openTag",Ge.tokenize=ht,"tag bracket");if(He=="&"){var Tt;return Me.eat("#")?Me.eat("x")?Tt=Me.eatWhile(/[a-fA-F\d]/)&&Me.eat(";"):Tt=Me.eatWhile(/[\d]/)&&Me.eat(";"):Tt=Me.eatWhile(/[\w\.\-:]/)&&Me.eat(";"),Tt?"atom":"error"}else return Me.eatWhile(/[^&<]/),null}ve.isInText=!0;function ht(Me,Ge){var Ce=Me.next();if(Ce==">"||Ce=="/"&&Me.eat(">"))return Ge.tokenize=ve,pe=Ce==">"?"endTag":"selfcloseTag","tag bracket";if(Ce=="=")return pe="equals",null;if(Ce=="<"){Ge.tokenize=ve,Ge.state=vt,Ge.tagName=Ge.tagStart=null;var He=Ge.tokenize(Me,Ge);return He?He+" tag error":"tag error"}else return/[\'\"]/.test(Ce)?(Ge.tokenize=Oe(Ce),Ge.stringStartCol=Me.column(),Ge.tokenize(Me,Ge)):(Me.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Oe(Me){var Ge=function(Ce,He){for(;!Ce.eol();)if(Ce.next()==Me){He.tokenize=ht;break}return"string"};return Ge.isInAttribute=!0,Ge}function De(Me,Ge){return function(Ce,He){for(;!Ce.eol();){if(Ce.match(Ge)){He.tokenize=ve;break}Ce.next()}return Me}}function Re(Me){return function(Ge,Ce){for(var He;(He=Ge.next())!=null;){if(He=="<")return Ce.tokenize=Re(Me+1),Ce.tokenize(Ge,Ce);if(He==">")if(Me==1){Ce.tokenize=ve;break}else return Ce.tokenize=Re(Me-1),Ce.tokenize(Ge,Ce)}return"meta"}}function Le(Me,Ge,Ce){this.prev=Me.context,this.tagName=Ge,this.indent=Me.indented,this.startOfLine=Ce,(Ae.doNotIndent.hasOwnProperty(Ge)||Me.context&&Me.context.noIndent)&&(this.noIndent=!0)}function st(Me){Me.context&&(Me.context=Me.context.prev)}function ct(Me,Ge){for(var Ce;;){if(!Me.context||(Ce=Me.context.tagName,!Ae.contextGrabbers.hasOwnProperty(Ce)||!Ae.contextGrabbers[Ce].hasOwnProperty(Ge)))return;st(Me)}}function vt(Me,Ge,Ce){return Me=="openTag"?(Ce.tagStart=Ge.column(),Ue):Me=="closeTag"?ze:vt}function Ue(Me,Ge,Ce){return Me=="word"?(Ce.tagName=Ge.current(),it="tag",It):Ae.allowMissingTagName&&Me=="endTag"?(it="tag bracket",It(Me,Ge,Ce)):(it="error",Ue)}function ze(Me,Ge,Ce){if(Me=="word"){var He=Ge.current();return Ce.context&&Ce.context.tagName!=He&&Ae.implicitlyClosed.hasOwnProperty(Ce.context.tagName)&&st(Ce),Ce.context&&Ce.context.tagName==He||Ae.matchClosing===!1?(it="tag",Qe):(it="tag error",Ve)}else return Ae.allowMissingTagName&&Me=="endTag"?(it="tag bracket",Qe(Me,Ge,Ce)):(it="error",Ve)}function Qe(Me,Ge,Ce){return Me!="endTag"?(it="error",Qe):(st(Ce),vt)}function Ve(Me,Ge,Ce){return it="error",Qe(Me,Ge,Ce)}function It(Me,Ge,Ce){if(Me=="word")return it="attribute",Ye;if(Me=="endTag"||Me=="selfcloseTag"){var He=Ce.tagName,Tt=Ce.tagStart;return Ce.tagName=Ce.tagStart=null,Me=="selfcloseTag"||Ae.autoSelfClosers.hasOwnProperty(He)?ct(Ce,He):(ct(Ce,He),Ce.context=new Le(Ce,He,Tt==Ce.indented)),vt}return it="error",It}function Ye(Me,Ge,Ce){return Me=="equals"?Ze:(Ae.allowMissing||(it="error"),It(Me,Ge,Ce))}function Ze(Me,Ge,Ce){return Me=="string"?at:Me=="word"&&Ae.allowUnquoted?(it="string",It):(it="error",It(Me,Ge,Ce))}function at(Me,Ge,Ce){return Me=="string"?at:It(Me,Ge,Ce)}return{startState:function(Me){var Ge={tokenize:ve,state:vt,indented:Me||0,tagName:null,tagStart:null,context:null};return Me!=null&&(Ge.baseIndent=Me),Ge},token:function(Me,Ge){if(!Ge.tagName&&Me.sol()&&(Ge.indented=Me.indentation()),Me.eatSpace())return null;pe=null;var Ce=Ge.tokenize(Me,Ge);return(Ce||pe)&&Ce!="comment"&&(it=null,Ge.state=Ge.state(pe||Ce,Me,Ge),it&&(Ce=it=="error"?Ce+" error":it)),Ce},indent:function(Me,Ge,Ce){var He=Me.context;if(Me.tokenize.isInAttribute)return Me.tagStart==Me.indented?Me.stringStartCol+1:Me.indented+ge;if(He&&He.noIndent)return ie.Pass;if(Me.tokenize!=ht&&Me.tokenize!=ve)return Ce?Ce.match(/^(\s*)/)[0].length:0;if(Me.tagName)return Ae.multilineTagIndentPastTag!==!1?Me.tagStart+Me.tagName.length+2:Me.tagStart+ge*(Ae.multilineTagIndentFactor||1);if(Ae.alignCDATA&&/<!\[CDATA\[/.test(Ge))return 0;var Tt=Ge&&/^<(\/)?([\w_:\.-]*)/.exec(Ge);if(Tt&&Tt[1])for(;He;)if(He.tagName==Tt[2]){He=He.prev;break}else if(Ae.implicitlyClosed.hasOwnProperty(He.tagName))He=He.prev;else break;else if(Tt)for(;He;){var yt=Ae.contextGrabbers[He.tagName];if(yt&&yt.hasOwnProperty(Tt[2]))He=He.prev;else break}for(;He&&He.prev&&!He.startOfLine;)He=He.prev;return He?He.indent+ge:Me.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ae.htmlMode?"html":"xml",helperType:Ae.htmlMode?"html":"xml",skipAttribute:function(Me){Me.state==Ze&&(Me.state=It)},xmlCurrentTag:function(Me){return Me.tagName?{name:Me.tagName,close:Me.type=="closeTag"}:null},xmlCurrentContext:function(Me){for(var Ge=[],Ce=Me.context;Ce;Ce=Ce.prev)Ce.tagName&&Ge.push(Ce.tagName);return Ge.reverse()}}}),ie.defineMIME("text/xml","xml"),ie.defineMIME("application/xml","xml"),ie.mimeModes.hasOwnProperty("text/html")||ie.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(Pt,Ot,fe){"use strict";fe.d(Ot,{hP:function(){return ut}});var ie=function(ae,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var le in re)Object.prototype.hasOwnProperty.call(re,le)&&(z[le]=re[le])})(ae,te)};function ot(ae,te){function z(){this.constructor=ae}ie(ae,te),ae.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Ne(ae,te,z,re){return new(z||(z=Promise))(function(le,ne){function be(St){try{Mt(re.next(St))}catch(wt){ne(wt)}}function je(St){try{Mt(re.throw(St))}catch(wt){ne(wt)}}function Mt(St){var wt;St.done?le(St.value):(wt=St.value,wt instanceof z?wt:new z(function(Dt){Dt(wt)})).then(be,je)}Mt((re=re.apply(ae,te||[])).next())})}function _e(ae,te){var z,re,le,ne,be={label:0,sent:function(){if(1&le[0])throw le[1];return le[1]},trys:[],ops:[]};return ne={next:je(0),throw:je(1),return:je(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function je(Mt){return function(St){return function(wt){if(z)throw new TypeError("Generator is already executing.");for(;be;)try{if(z=1,re&&(le=2&wt[0]?re.return:wt[0]?re.throw||((le=re.return)&&le.call(re),0):re.next)&&!(le=le.call(re,wt[1])).done)return le;switch(re=0,le&&(wt=[2&wt[0],le.value]),wt[0]){case 0:case 1:le=wt;break;case 4:return be.label++,{value:wt[1],done:!1};case 5:be.label++,re=wt[1],wt=[0];continue;case 7:wt=be.ops.pop(),be.trys.pop();continue;default:if(le=be.trys,!((le=le.length>0&&le[le.length-1])||wt[0]!==6&&wt[0]!==2)){be=0;continue}if(wt[0]===3&&(!le||wt[1]>le[0]&&wt[1]<le[3])){be.label=wt[1];break}if(wt[0]===6&&be.label<le[1]){be.label=le[1],le=wt;break}if(le&&be.label<le[2]){be.label=le[2],be.ops.push(wt);break}le[2]&&be.ops.pop(),be.trys.pop();continue}wt=te.call(ae,be)}catch(Dt){wt=[6,Dt],re=0}finally{z=le=0}if(5&wt[0])throw wt[1];return{value:wt[0]?wt[1]:void 0,done:!0}}([Mt,St])}}}function me(){for(var ae=0,te=0,z=arguments.length;te<z;te++)ae+=arguments[te].length;var re=Array(ae),le=0;for(te=0;te<z;te++)for(var ne=arguments[te],be=0,je=ne.length;be<je;be++,le++)re[le]=ne[be];return re}var ge=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(te,z){for(var re=0,le=z;re<le.length;re++){var ne=le[re],be=ne[0],je=ne[1];te.setAttribute(be,je)}},ae.createRect=function(te,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","rect");return le.setAttribute("width",te.toString()),le.setAttribute("height",z.toString()),re&&ae.setAttributes(le,re),le},ae.createLine=function(te,z,re,le,ne){var be=document.createElementNS("http://www.w3.org/2000/svg","line");return be.setAttribute("x1",te.toString()),be.setAttribute("y1",z.toString()),be.setAttribute("x2",re.toString()),be.setAttribute("y2",le.toString()),ne&&ae.setAttributes(be,ne),be},ae.createPolygon=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","polygon");return re.setAttribute("points",te),z&&ae.setAttributes(re,z),re},ae.createCircle=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","circle");return re.setAttribute("cx",(te/2).toString()),re.setAttribute("cy",(te/2).toString()),re.setAttribute("r",te.toString()),z&&ae.setAttributes(re,z),re},ae.createEllipse=function(te,z,re){var le=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return le.setAttribute("cx",(te/2).toString()),le.setAttribute("cy",(z/2).toString()),le.setAttribute("rx",(te/2).toString()),le.setAttribute("ry",(z/2).toString()),re&&ae.setAttributes(le,re),le},ae.createGroup=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&ae.setAttributes(z,te),z},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(te,z,re,le,ne,be,je){var Mt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(Mt,[["id",te],["orient",z],["markerWidth",re.toString()],["markerHeight",le.toString()],["refX",ne.toString()],["refY",be.toString()]]),Mt.appendChild(je),Mt},ae.createText=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),te&&ae.setAttributes(z,te),z},ae.createTSpan=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","tspan");return re.textContent=te,z&&ae.setAttributes(re,z),re},ae.createImage=function(te){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&ae.setAttributes(z,te),z},ae.createPoint=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return re.x=te,re.y=z,re},ae.createPath=function(te,z){var re=document.createElementNS("http://www.w3.org/2000/svg","path");return re.setAttribute("d",te),z&&ae.setAttributes(re,z),re},ae}(),Ae=function(){function ae(){}return ae.addKey=function(te){ae.key=te},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),Ie=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(te,z,re){var le=this;return new Promise(function(ne){var be=re!==void 0?re:document.createElement("canvas");te===null&&(le.markersOnly=!0,le.naturalSize=!1);var je=document.createElementNS("http://www.w3.org/2000/svg","svg");je.setAttribute("xmlns","http://www.w3.org/2000/svg"),je.setAttribute("width",z.width.baseVal.valueAsString),je.setAttribute("height",z.height.baseVal.valueAsString),je.setAttribute("viewBox","0 0 "+z.viewBox.baseVal.width.toString()+" "+z.viewBox.baseVal.height.toString()),je.innerHTML=z.innerHTML,le.naturalSize===!0?(je.width.baseVal.value=te.naturalWidth,je.height.baseVal.value=te.naturalHeight):le.width!==void 0&&le.height!==void 0&&(je.width.baseVal.value=le.width,je.height.baseVal.value=le.height),be.width=je.width.baseVal.value,be.height=je.height.baseVal.value;var Mt=je.outerHTML,St=be.getContext("2d");le.markersOnly!==!0&&St.drawImage(te,0,0,be.width,be.height);var wt=window.URL,Dt=new Image(be.width,be.height);Dt.setAttribute("crossOrigin","anonymous");var jt=new Blob([Mt],{type:"image/svg+xml"}),zt=wt.createObjectURL(jt);Dt.onload=function(){St.drawImage(Dt,0,0),wt.revokeObjectURL(zt);var en=be.toDataURL(le.imageType,le.imageQuality);ne(en)},Dt.src=zt})},ae}(),we=function(){},pe=function(){function ae(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(te){return this.styleSheet===void 0&&this.addStyleSheet(),te.name=""+this.classNamePrefix+te.localName,this.classes.push(te),this.styleSheet.sheet.insertRule("."+te.name+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length),te},ae.prototype.addRule=function(te){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(te),this.styleSheet.sheet.insertRule(te.selector+" {"+te.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var te;this.styleSheet=document.createElement("style"),((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).appendChild(this.styleSheet),this.addRule(new it("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new it("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ve("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ve("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ae.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),it=function(ae,te){this.selector=ae,this.style=te},ve=function(ae,te){this.localName=ae,this.style=te},ht=function(){function ae(te,z,re,le,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=z,this.markerItems=re,this.uiStyleSettings=le,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ae.prototype.show=function(te){var z=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",this.uiContainer.appendChild(re),this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(re,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ne){var be=document.createElement("div");be.className=""+z.toolbarButtonStyleClass.name,be.setAttribute("data-type-name",ne.typeName),be.innerHTML=ne.icon,be.addEventListener("click",function(){z.markerToolbarButtonClicked(be,ne)}),z.buttons.push(be),z.markerButtons.push(be)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var le=document.createElement("div");le.className=this.toolbarBlockStyleClass.name,le.style.whiteSpace="nowrap",le.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(le),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(le,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ae.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},ae.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z<this.markerButtons.length;z++)z<te||z===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[z]):(z===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[z]))}},ae.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ae.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(z){z.className=z.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),z.className=z.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),z.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(te,z,re){var le=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=z,ne.setAttribute("data-action",re),ne.addEventListener("click",function(){le.actionToolbarButtonClicked(ne,re)}),re){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}te.appendChild(ne),this.buttons.push(ne)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ve("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ve("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*te)+`px;
|
|
padding: `+te+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new it("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ae.prototype.markerToolbarButtonClicked=function(te,z){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(te){this.resetButtonStyles(),te.className=te.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),te.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},ae.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){z.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},ae}(),Oe=function(){function ae(te,z,re,le){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=re,this.styles=le,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new ve("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ve("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ve("toolbox-panel-row_colors",`
|
|
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px;
|
|
padding: `+z+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new it("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ae.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(te){var z,re,le=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var be;ne.uiStyleSettings=le.uiStyleSettings;var je=document.createElement("div");je.className=le.toolboxButtonStyleClass.name+" "+((be=le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&be!==void 0?be:le.toolboxButtonStyleColorsClass.name),je.innerHTML=ne.icon,je.title=ne.title,je.addEventListener("click",function(){le.panelButtonClick(ne)}),le.panelButtons.push(je),le.buttonRow.appendChild(je)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(te){var z=this,re=-1;if(te!==this.activePanel){re=this.panels.indexOf(te),this.panelRow.innerHTML="";var le=te.getUi();le.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(le),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,be){var je,Mt;ne.className=z.toolboxButtonStyleClass.name+" "+(be===re?""+((je=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&je!==void 0?je:z.toolboxActiveButtonStyleColorsClass.name):""+((Mt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Mt!==void 0?Mt:z.toolboxButtonStyleColorsClass.name))})},ae}(),De=function(ae,te){this.title=ae,this.icon=te},Re=function(ae){function te(z,re,le,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return be.colors=[],be.addTransparent=!1,be.colorBoxes=[],be.colors=re,be.currentColor=le,be.setCurrentColor=be.setCurrentColor.bind(be),be.getColorBox=be.getColorBox.bind(be),be}return ot(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(le){var ne=z.getColorBox(le);re.appendChild(ne),z.colorBoxes.push(ne)}),re},te.prototype.getColorBox=function(z){var re=this,le=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-le,be=document.createElement("div");be.style.display="inline-block",be.style.boxSizing="content-box",be.style.width=ne-2+"px",be.style.height=ne-2+"px",be.style.padding="1px",be.style.marginRight="2px",be.style.marginBottom="2px",be.style.borderWidth="2px",be.style.borderStyle="solid",be.style.borderRadius=(ne+2)/2+"px",be.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",be.addEventListener("click",function(){re.setCurrentColor(z,be)});var je=document.createElement("div");return je.style.display="inline-block",je.style.width=ne-2+"px",je.style.height=ne-2+"px",je.style.backgroundColor=z,je.style.borderRadius=ne/2+"px",z==="transparent"&&(je.style.fill=this.uiStyleSettings.toolboxAccentColor,je.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),be.appendChild(je),be},te.prototype.setCurrentColor=function(z,re){var le=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(De),Le=function(){function ae(te,z,re){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(te){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(te,z){},ae.prototype.dblClick=function(te,z){},ae.prototype.manipulate=function(te){},ae.prototype.pointerUp=function(te){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},ae.prototype.scale=function(te,z){},ae.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},ae.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var te=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),te.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(te)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),st=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(te){return this.topLeft.ownsTarget(te)?this.topLeft:this.topCenter.ownsTarget(te)?this.topCenter:this.topRight.ownsTarget(te)?this.topRight:this.centerLeft.ownsTarget(te)?this.centerLeft:this.centerRight.ownsTarget(te)?this.centerRight:this.bottomLeft.ownsTarget(te)?this.bottomLeft:this.bottomCenter.ownsTarget(te)?this.bottomCenter:this.bottomRight.ownsTarget(te)?this.bottomRight:void 0},ae}(),ct=function(){function ae(){this.GRIP_SIZE=10,this.visual=ge.createGroup(),this.visual.appendChild(ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ge.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},ae}(),vt=function(){function ae(){}return ae.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},ae.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},ae}(),Ue=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(ge.createTransform()),ne.setupControlBox(),ne}return ot(te,ae),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=ge.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var le=this.unrotatePoint(z);if(this.manipulationStartX=le.x,this.manipulationStartY=le.y,this.offsetX=le.x-this.left,this.offsetY=le.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var re=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var re=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var re=this.manipulationStartLeft,le=this.manipulationStartWidth,ne=this.manipulationStartTop,be=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,le=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:le=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,be=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:be=this.manipulationStartHeight+z.y-this.manipulationStartY}le>=0?(this.left=re,this.width=le):(this.left=re+le,this.width=-le),be>=0?(this.top=ne,this.height=be):(this.top=ne+be,this.height=-be),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var re=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),le=ge.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var le=ge.createPoint(z.x,z.y);return{x:(le=le.matrixTransform(re)).x,y:le.y}},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup();var z=ge.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ge.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=ge.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 st,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var z=new ct;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,le=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,be=(this.height+this.CB_DISTANCE)/2-z/2,je=this.height+this.CB_DISTANCE-z/2,Mt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,le),this.positionGrip(this.controlGrips.topCenter.visual,ne,le),this.positionGrip(this.controlGrips.topRight.visual,Mt,le),this.positionGrip(this.controlGrips.centerLeft.visual,re,be),this.positionGrip(this.controlGrips.centerRight.visual,Mt,be),this.positionGrip(this.controlGrips.bottomLeft.visual,re,je),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,je),this.positionGrip(this.controlGrips.bottomRight.visual,Mt,je),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,le-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:vt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:vt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(vt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re);var le=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:le.x*z,y:le.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},te}(Le),ze=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize()},te.title="Rectangle marker",te}(Ue),Qe=function(ae){function te(z,re,le,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return be.widths=[],be.widthBoxes=[],be.widths=re,be.currentWidth=le,be.setCurrentWidth=be.setCurrentWidth.bind(be),be}return ot(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.widths.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=le===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.innerText=le.toString(),be.style.marginRight="5px",ne.appendChild(be);var je=document.createElement("div");je.style.minHeight="20px",je.style.flexGrow="2",je.style.display="flex",je.style.alignItems="center";var Mt=document.createElement("hr");Mt.style.minWidth="20px",Mt.style.border="0px",Mt.style.borderTop=le+"px solid "+z.uiStyleSettings.toolboxColor,Mt.style.flexGrow="2",je.appendChild(Mt),ne.appendChild(je),z.widthBoxes.push(ne)}),re},te.prototype.setCurrentWidth=function(z,re){var le=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(De),Ve=function(ae){function te(z,re,le,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return be.styles=[],be.styleBoxes=[],be.styles=re,be.currentStyle=le,be.setCurrentStyle=be.setCurrentStyle.bind(be),be}return ot(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.styles.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=le===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.style.minHeight="20px",be.style.flexGrow="2",be.style.overflow="hidden";var je=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+z.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(le!==""?'stroke-dasharray="'+le+'"':"")+` />
|
|
</svg>`;be.innerHTML=je,ne.appendChild(be),z.styleBoxes.push(ne)}),re},te.prototype.setCurrentStyle=function(z,re){var le=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(De),It=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Qe("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ve("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ot(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(ze),Ye=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ze=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!!ae.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var re=this.state;ae.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var z=new ct;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,re,le){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,le),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.x1=this.x1*z,this.y1=this.y1*re,this.x2=this.x2*z,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},te}(Le),at=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Qe("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ve("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ge.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',te}(Ze),Me=function(ae){function te(z,re,le,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return be.fonts=[],be.fontBoxes=[],be.fonts=re,be.currentFont=le,be.setCurrentFont=be.setCurrentFont.bind(be),be}return ot(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(le){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=le===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.style.display="flex",be.style.minHeight="20px",be.style.flexGrow="2",be.style.fontFamily=le,be.style.overflow="hidden";var je=document.createElement("div");je.style.whiteSpace="nowrap",je.style.overflow="hidden",je.style.textOverflow="ellipsis",je.innerHTML="The quick brown fox jumps over the lazy dog",be.appendChild(je),ne.appendChild(be),z.fontBoxes.push(ne)}),re},te.prototype.setCurrentFont=function(z,re){var le=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(De),Ge=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=le.defaultColor,ne.fontFamily=le.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new Re("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Me("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){if(ae.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(le){le===z&&(re=!0)}),re},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.bgRectangle=ge.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ge.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(re){z.textElement.appendChild(ge.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var le=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(le,ne)}return re},te.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),le=0,ne=0;return re.width>0&&re.height>0&&(le=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:le,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),le=this.getTextPosition(re);le.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+le.x+"px, "+le.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(le.x,le.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,z),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&re>.9;)re-=.1,z.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var le=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(le)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),le=this.textElement.getBBox(),ne={x:le.width*z,y:le.height*z};re.x-=ne.x/2,re.y-=ne.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},te.prototype.dblClick=function(z,re){ae.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&ge.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&ge.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',te}(Ue),Ce=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=le.defaultColor,ne.lineWidth=le.defaultStrokeWidth,ne.pixelRatio=le.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new Re("Color",le.defaultColorSet,le.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Qe("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.drawingImage=ge.createImage(),this.visual.appendChild(this.drawingImage);var z=ge.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):ae.prototype.pointerDown.call(this,z,re)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,z)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],le=re[0],ne=re[1],be=re[2],je=re[3],Mt=!1,St=0;St<this.canvasElement.height;St++)for(var wt=0;wt<this.canvasElement.width;wt++)z.data[St*this.canvasElement.width*4+4*wt+3]>0&&(Mt=!0,St<ne&&(ne=St),wt<le&&(le=wt),St>je&&(je=St),wt>be&&(be=wt));if(Mt){this.left=le/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(be-le)/this.pixelRatio,this.height=(je-ne)/this.pixelRatio;var Dt=document.createElement("canvas");Dt.width=be-le,Dt.height=je-ne,Dt.getContext("2d").putImageData(this.canvasContext.getImageData(le,ne,be-le,je-ne),0,0),this.drawingImgUrl=Dt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),ae.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',te}(Ue),He=function(ae){function te(z,re,le){var ne=ae.call(this,z,le||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return ot(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var le=function(je){var Mt="both";switch(je){case 0:Mt="both";break;case 1:Mt="start";break;case 2:Mt="end";break;case 3:Mt="none"}var St=document.createElement("div");if(St.style.display="flex",St.style.flexGrow="2",St.style.alignItems="center",St.style.justifyContent="space-between",St.style.padding="5px",St.style.borderWidth="2px",St.style.borderStyle="solid",St.style.borderColor=Mt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",St.addEventListener("click",function(){z.setCurrentType(Mt,St)}),re.appendChild(St),Mt==="both"||Mt==="start"){var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,wt.style.marginLeft="5px",St.appendChild(wt)}var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",Dt.appendChild(jt),St.appendChild(Dt),Mt==="both"||Mt==="end"){var zt=document.createElement("div");zt.style.display="flex",zt.style.alignItems="center",zt.style.minHeight="20px",zt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,zt.style.marginRight="5px",St.appendChild(zt)}ne.typeBoxes.push(St)},ne=this,be=0;be<4;be++)le(be);return re},te.prototype.setCurrentType=function(z,re){var le=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(De),Tt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new He("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,re){var le=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-le/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+le/2)+","+(re+ne/2)},te.prototype.createTips=function(){this.arrow1=ge.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ge.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ge.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ge.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var le=this.arrow2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(le,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',te}(at),yt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor=le.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Re("Color",le.defaultColorSet,le.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return ot(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(ze),lt=function(ae){function te(z,re,le,ne){var be=ae.call(this,z,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return be.opacities=[],be.opacityBoxes=[],be.opacities=re,be.currentOpacity=le,be.setCurrentOpacity=be.setCurrentOpacity.bind(be),be}return ot(te,ae),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.style.justifyContent="space-between",this.opacities.forEach(function(le){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=le===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(le,ne)}),re.appendChild(ne);var be=document.createElement("div");be.innerText=100*le+"%",ne.appendChild(be),z.opacityBoxes.push(ne)}),re},te.prototype.setCurrentOpacity=function(z,re){var le=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?le.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(De),$e=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=le.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=le.defaultHighlightOpacity,ne.fillPanel=new Re("Color",le.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new lt("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return ot(te,ae),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',te}(yt),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>',ue='<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>',Be=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=le.defaultStrokeColor,ne.bgColor=le.defaultFillColor,ne.fontFamily=le.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new Re("Text color",le.defaultColorSet,ne.color,he),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Re("Fill color",le.defaultColorSet,ne.bgColor,ue),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Me("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new ct,ne.tipGrip.visual.transform.baseVal.appendItem(ge.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return ae.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){ge.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ge.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,re){this.state==="new"&&ae.prototype.pointerDown.call(this,z,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,z,re)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,z);else{var re=this.state==="creating";ae.prototype.pointerUp.call(this,z),this.setTipPoints(re),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var re=this.unrotatePoint(z);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ge.setAttributes(this.bgRectangle,[["fill",z]]),ge.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),le=this.height/5;z&&(this.tipPosition={x:re+le/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:0},this.tipBase2Position={x:re+le,y:0}):(this.tipBase1Position={x:0,y:re},this.tipBase2Position={x:0,y:re+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:0},this.tipBase2Position={x:this.width-re,y:0}):(this.tipBase1Position={x:this.width,y:re},this.tipBase2Position={x:this.width,y:re+le}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-re-le,y:this.height},this.tipBase2Position={x:this.width-re,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-re-le},this.tipBase2Position={x:this.width,y:this.height-re}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(le=this.width/5,re=Math.min(this.width/2,15),this.tipBase1Position={x:re,y:this.height},this.tipBase2Position={x:re+le,y:this.height}):(this.tipBase1Position={x:0,y:this.height-re},this.tipBase2Position={x:0,y:this.height-re-le})},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.positionTip()},te.prototype.positionTip=function(){ge.setAttributes(this.tip,[["points",this.getTipPoints()]]);var z=this.tipGrip.visual.transform.baseVal.getItem(0);z.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(z,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},te.prototype.getState=function(){var z=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.bgColor=re.bgColor,this.tipPosition=re.tipPosition,ae.prototype.restoreState.call(this,z),this.createTip(),this.setTipPoints()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.tipPosition={x:this.tipPosition.x*z,y:this.tipPosition.y*re},this.positionTip()},te.typeName="CalloutMarker",te.title="Callout marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',te}(Ge),rt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new Re("Line color",me(le.defaultColorSet,["transparent"]),le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Re("Fill color",me(le.defaultColorSet,["transparent"]),ne.fillColor,ue),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Qe("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ve("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new lt("Opacity",le.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ge.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize()},te.typeName="EllipseMarker",te.title="Ellipse marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(Ue),qe=function(ae){function te(z,re,le){return ae.call(this,z,re,le)||this}return ot(te,ae),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.tip1&&z!==this.tip2)},te.prototype.createTips=function(){this.tip1=ge.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(ge.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ge.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(ge.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ge.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()]]),ge.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var le=this.tip2.transform.baseVal.getItem(0);le.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(le,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',te}(at),ye=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokePanel.colors=le.defaultColorSet,ne.fillColor="transparent",ne}return ot(te,ae),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=ae.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(rt),Pe=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(te){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(te)||(this.undoStack.push(te),JSON.stringify(this.lastRedoStep)!==JSON.stringify(te)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var te=this.undoStack.pop();return te!==void 0&&this.redoStack.push(te),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),Te=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.strokePanel=new Re("Line color",le.defaultColorSet,le.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Qe("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ve("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorCurve=ge.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ge.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ge.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=ge.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ge.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),ae.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),ae.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,ae.prototype.scale.call(this,z,re)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){ae.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',te}(Ze),bt=function(ae){function te(z,re,le){var ne=ae.call(this,z,re,le)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.textColor="transparent",ne.fontSize="1rem",ne.isMoved=!1,ne.captionText="Caption",ne.PADDING=5,ne.captionBoxWidth=0,ne.captionBoxHeight=0,ne.strokeColor=le.defaultColor,ne.strokeWidth=le.defaultStrokeWidth,ne.strokeDasharray=le.defaultStrokeDasharray,ne.fillColor=le.defaultFillColor,ne.textColor=le.defaultStrokeColor,ne.fontFamily=le.defaultFontFamily,ne.fontSize=le.defaultCaptionFontSize,ne.captionText=le.defaultCaptionText,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.sizeCaption=ne.sizeCaption.bind(ne),ne.setCaptionText=ne.setCaptionText.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.finishTextEditing=ne.finishTextEditing.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.setTextColor=ne.setTextColor.bind(ne),ne.strokePanel=new Re("Line color",me(le.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Re("Fill color",me(le.defaultColorSet,["transparent"]),ne.fillColor,ue),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Qe("Line width",le.defaultStrokeWidths,le.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ve("Line style",le.defaultStrokeDasharrays,le.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Me("Font",le.defaultFontFamilies,le.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Re("Text color",le.defaultColorSet,ne.textColor,he),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return ot(te,ae),te.prototype.ownsTarget=function(z){return!(!ae.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ge.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ge.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=ge.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,re){ae.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){ae.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){ae.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ge.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')"]]),ge.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(re){re.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){ae.prototype.setSize.call(this),ge.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){ae.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,re){ae.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ge.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ge.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ge.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ge.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ae.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.textColor=re.textColor,this.fontFamily=re.fontFamily,this.captionText=re.captionText,this.fontSize=re.fontSize,this.createVisual(),ae.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){ae.prototype.scale.call(this,z,re),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',te}(Ue),Ke=function(){function ae(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),mt=function(ae){function te(z,re,le){var ne=ae.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=le,ne}return ot(te,ae),te}(Ke),ke=function(ae){function te(z,re,le){le===void 0&&(le=!1);var ne=ae.call(this,z,le)||this;return ne.marker=re,ne}return ot(te,ae),te}(Ke),tt=function(){function ae(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ae.prototype.addEventListener=function(te,z){this[te].push(z)},ae.prototype.removeEventListener=function(te,z){var re=this[te].indexOf(z);re>-1&&this[te].splice(re,1)},ae}(),ut=function(){function ae(te){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ye,this._isOpen=!1,this.undoRedoManager=new Pe,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 tt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=te,this.targetRoot=document.body,this.width=te.clientWidth,this.height=te.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[It,Ce,Tt,Ge,ye,rt,$e,Be,qe,yt,at,Te,bt]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[It,Ce,Tt,Ge,rt,$e,Be]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[It,Ce,Tt,Ge,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(re){if(typeof re=="string"){var le=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});le!==void 0&&z._availableMarkerTypes.push(le)}else z._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(te){this._zoomLevel=te,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ae.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Ke(te))})},ae.prototype.render=function(){return Ne(this,void 0,void 0,function(){var te;return _e(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Ie).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},ae.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var re=!1;te||this.eventListeners.beforeclose.forEach(function(le){var ne=new Ke(z,!0);le(ne),ne.defaultPrevented&&(re=!0)}),re||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(le){return le(new Ke(z))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var te,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];(te=this._availableMarkerTypes).push.apply(te,z)},ae.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(z){te(z.dataUrl,z.state)})},ae.prototype.removeRenderEventListener=function(te){},ae.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},ae.prototype.removeCloseEventListener=function(te){},ae.prototype.setupResizeObserver=function(){var te=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){te.resize(te.target.clientWidth,te.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return te.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,z=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,re=z<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(z,re)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(te,z){this._isResizing=!0;var re=te/this.imageWidth,le=z/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(z),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(re,le),this._isResizing=!1},ae.prototype.scaleMarkers=function(te,z){var re,le=this;this._currentMarker&&this._currentMarker instanceof Ge?this._currentMarker.scale(te,z):(re=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==le._currentMarker&&ne.scale(te,z)}),re!==void 0&&this.setCurrentMarker(re)},ae.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ae.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=te.left-z.left,this.top=te.top-z.top},ae.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ae.prototype.addDefs=function(){for(var te,z=[],re=0;re<arguments.length;re++)z[re]=arguments[re];this.defs=ge.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,z)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var te=document.createElement("a");te.href="https://markerjs.com/",te.target="_blank",te.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',te.title="Powered by marker.js",te.style.display="grid",te.style.alignItems="center",te.style.justifyItems="center",te.style.padding="3px",te.style.width="20px",te.style.height="20px",this.logoUI.appendChild(te),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ae.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ae.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var te=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new ht(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 Oe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},ae.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ae.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ae.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(le){var ne=new ke(te,te._currentMarker,!0);le(ne),ne.defaultPrevented&&(z=!0)}),!z){var re=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(le){return le(new ke(te,re))})}}},ae.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(be){var je=new ke(te,void 0,!0);be(je),je.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(be){var je=le.markers[be];le.setCurrentMarker(le.markers[be]),le._currentMarker.dispose(),le.markerImage.removeChild(le._currentMarker.container),le.markers.splice(le.markers.indexOf(le._currentMarker),1),le.eventListeners.markerdelete.forEach(function(Mt){return Mt(new ke(te,je))})},le=this,ne=this.markers.length-1;ne>=0;ne--)re(ne);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var te;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(te=this._currentMarker.notes)!==null&&te!==void 0?te:"",this.overlayContainer.appendChild(this.notesArea))},ae.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===z.width&&re.height===z.height){var le=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),le<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Ke(te))})}else this.undoRedoManager.replaceLastUndoStep(z),this.eventListeners.statechange.forEach(function(ne){return ne(new Ke(te))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var te=this,z=this.undoRedoManager.undo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new Ke(te))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var te=this,z=this.undoRedoManager.redo();z!==void 0&&(this.restoreState(z),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(re){return re(new Ke(te))}))},ae.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},ae.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},ae.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var te,z,re=this;return _e(this,function(le){switch(le.label){case 0:return[4,this.render()];case 1:return te=le.sent(),z=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new mt(re,te,z))}),this.close(!0),[2]}})})},ae.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var z={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(re){return z.markers.push(re.getState())}),z},ae.prototype.restoreState=function(te){var z=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(re){var le=z._availableMarkerTypes.find(function(be){return be.typeName===re.typeName});if(le!==void 0){var ne=z.addNewMarker(le);ne.restoreState(re),z.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(re){return re(new Ke(z))})},ae.prototype.addNewMarker=function(te){var z=ge.createGroup();return this.markerImage.appendChild(z),new te(z,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(te){var z,re=this;(z=typeof te=="string"?this._availableMarkerTypes.find(function(le){return le.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(z),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(z.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(le){return le(new ke(re,re._currentMarker))}))},ae.prototype.markerCreated=function(te){var z=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Ce&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ce):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(re){return re(new ke(z,z._currentMarker))})},ae.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},ae.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},ae.prototype.markerStateChanged=function(te){var z=this;this.eventListeners.markerchange.forEach(function(re){return re(new ke(z,te))})},ae.prototype.setCurrentMarker=function(te){var z=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(re){return re(new ke(z,z._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(re){return re(new ke(z,z._currentMarker))}))},ae.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(te.target)});z!==void 0?(this.setCurrentMarker(z),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},ae.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var z=this.markers.find(function(re){return re.ownsTarget(te.target)});z!==void 0&&z!==this._currentMarker&&this.setCurrentMarker(z),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},ae.prototype.onPointerMove=function(te){this.touchPoints!==1&&te.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||te.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(te.clientX,te.clientY)):this.zoomLevel>1&&this.panTo({x:te.clientX,y:te.clientY}))},ae.prototype.onPointerUp=function(te){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(te.clientX,te.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(te,z){var re=this.markerImage.getBoundingClientRect();return{x:(te-re.left)/this.zoomLevel,y:(z-re.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var te=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=te+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ae.prototype.addLicenseKey=function(te){Ae.addKey(te)},ae.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},ae.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},ae.prototype.renderState=function(te){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(te),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new Ke(te))}))},ae.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new Ke(te))}))},ae.instanceCounter=0,ae}()},66042:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return Ge}});var ie=fe(27247),ot=fe(11913),Ne=fe(43403),_e=fe(34280),me=fe(59301),ge=me.createContext(null),Ae=me.createContext({}),Ie=ge,we=fe(74430),pe=fe(32855),it=fe(92310),ve=fe.n(it),ht=fe(77900),Oe=fe(10228),De=fe(26112),Re=fe(43079),Le=fe(8654),st=["prefixCls","className","containerRef"],ct=function(He){var Tt=He.prefixCls,yt=He.className,lt=He.containerRef,$e=(0,Re.Z)(He,st),he=me.useContext(Ae),ue=he.panel,Be=(0,Le.x1)(ue,lt);return me.createElement("div",(0,pe.Z)({className:ve()("".concat(Tt,"-content"),yt),role:"dialog",ref:Be},(0,De.Z)(He,{aria:!0}),{"aria-modal":"true"},$e))},vt=ct,Ue=fe(48736);function ze(Ce){return typeof Ce=="string"&&String(Number(Ce))===Ce?((0,Ue.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ce)):Ce}function Qe(Ce){warning(!("wrapperClassName"in Ce),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ce.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ve={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function It(Ce,He){var Tt,yt,lt,$e=Ce.prefixCls,he=Ce.open,ue=Ce.placement,Be=Ce.inline,rt=Ce.push,qe=Ce.forceRender,ye=Ce.autoFocus,Pe=Ce.keyboard,Te=Ce.classNames,bt=Ce.rootClassName,Ke=Ce.rootStyle,mt=Ce.zIndex,ke=Ce.className,tt=Ce.id,ut=Ce.style,ae=Ce.motion,te=Ce.width,z=Ce.height,re=Ce.children,le=Ce.mask,ne=Ce.maskClosable,be=Ce.maskMotion,je=Ce.maskClassName,Mt=Ce.maskStyle,St=Ce.afterOpenChange,wt=Ce.onClose,Dt=Ce.onMouseEnter,jt=Ce.onMouseOver,zt=Ce.onMouseLeave,en=Ce.onClick,Jt=Ce.onKeyDown,Bt=Ce.onKeyUp,sn=Ce.styles,Vt=Ce.drawerRender,nn=me.useRef(),dt=me.useRef(),un=me.useRef();me.useImperativeHandle(He,function(){return nn.current});var Zt=function(tr){var ft=tr.keyCode,gt=tr.shiftKey;switch(ft){case Oe.Z.TAB:{if(ft===Oe.Z.TAB){if(!gt&&document.activeElement===un.current){var xt;(xt=dt.current)===null||xt===void 0||xt.focus({preventScroll:!0})}else if(gt&&document.activeElement===dt.current){var _t;(_t=un.current)===null||_t===void 0||_t.focus({preventScroll:!0})}}break}case Oe.Z.ESC:{wt&&Pe&&(tr.stopPropagation(),wt(tr));break}}};me.useEffect(function(){if(he&&ye){var En;(En=nn.current)===null||En===void 0||En.focus({preventScroll:!0})}},[he]);var Qt=me.useState(!1),ln=(0,ot.Z)(Qt,2),_n=ln[0],cn=ln[1],wn=me.useContext(Ie),$n;typeof rt=="boolean"?$n=rt?{}:{distance:0}:$n=rt||{};var Zn=(Tt=(yt=(lt=$n)===null||lt===void 0?void 0:lt.distance)!==null&&yt!==void 0?yt:wn==null?void 0:wn.pushDistance)!==null&&Tt!==void 0?Tt:180,Mr=me.useMemo(function(){return{pushDistance:Zn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[Zn]);me.useEffect(function(){if(he){var En;wn==null||(En=wn.push)===null||En===void 0||En.call(wn)}else{var tr;wn==null||(tr=wn.pull)===null||tr===void 0||tr.call(wn)}},[he]),me.useEffect(function(){return function(){var En;wn==null||(En=wn.pull)===null||En===void 0||En.call(wn)}},[]);var Nr=le&&me.createElement(ht.default,(0,pe.Z)({key:"mask"},be,{visible:he}),function(En,tr){var ft=En.className,gt=En.style;return me.createElement("div",{className:ve()("".concat($e,"-mask"),ft,Te==null?void 0:Te.mask,je),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},gt),Mt),sn==null?void 0:sn.mask),onClick:ne&&he?wt:void 0,ref:tr})}),sr=typeof ae=="function"?ae(ue):ae,Gn={};if(_n&&Zn)switch(ue){case"top":Gn.transform="translateY(".concat(Zn,"px)");break;case"bottom":Gn.transform="translateY(".concat(-Zn,"px)");break;case"left":Gn.transform="translateX(".concat(Zn,"px)");break;default:Gn.transform="translateX(".concat(-Zn,"px)");break}ue==="left"||ue==="right"?Gn.width=ze(te):Gn.height=ze(z);var fn={onMouseEnter:Dt,onMouseOver:jt,onMouseLeave:zt,onClick:en,onKeyDown:Jt,onKeyUp:Bt},Wn=me.createElement(ht.default,(0,pe.Z)({key:"panel"},sr,{visible:he,forceRender:qe,onVisibleChanged:function(tr){St==null||St(tr)},removeOnLeave:!1,leavedClassName:"".concat($e,"-content-wrapper-hidden")}),function(En,tr){var ft=En.className,gt=En.style,xt=me.createElement(vt,(0,pe.Z)({id:tt,containerRef:tr,prefixCls:$e,className:ve()(ke,Te==null?void 0:Te.content),style:(0,ie.Z)((0,ie.Z)({},ut),sn==null?void 0:sn.content)},(0,De.Z)(Ce,{aria:!0}),fn),re);return me.createElement("div",(0,pe.Z)({className:ve()("".concat($e,"-content-wrapper"),Te==null?void 0:Te.wrapper,ft),style:(0,ie.Z)((0,ie.Z)((0,ie.Z)({},Gn),gt),sn==null?void 0:sn.wrapper)},(0,De.Z)(Ce,{data:!0})),Vt?Vt(xt):xt)}),Un=(0,ie.Z)({},Ke);return mt&&(Un.zIndex=mt),me.createElement(Ie.Provider,{value:Mr},me.createElement("div",{className:ve()($e,"".concat($e,"-").concat(ue),bt,(0,we.Z)((0,we.Z)({},"".concat($e,"-open"),he),"".concat($e,"-inline"),Be)),style:Un,tabIndex:-1,ref:nn,onKeyDown:Zt},Nr,me.createElement("div",{tabIndex:0,ref:dt,style:Ve,"aria-hidden":"true","data-sentinel":"start"}),Wn,me.createElement("div",{tabIndex:0,ref:un,style:Ve,"aria-hidden":"true","data-sentinel":"end"})))}var Ye=me.forwardRef(It),Ze=Ye,at=function(He){var Tt=He.open,yt=Tt===void 0?!1:Tt,lt=He.prefixCls,$e=lt===void 0?"rc-drawer":lt,he=He.placement,ue=he===void 0?"right":he,Be=He.autoFocus,rt=Be===void 0?!0:Be,qe=He.keyboard,ye=qe===void 0?!0:qe,Pe=He.width,Te=Pe===void 0?378:Pe,bt=He.mask,Ke=bt===void 0?!0:bt,mt=He.maskClosable,ke=mt===void 0?!0:mt,tt=He.getContainer,ut=He.forceRender,ae=He.afterOpenChange,te=He.destroyOnClose,z=He.onMouseEnter,re=He.onMouseOver,le=He.onMouseLeave,ne=He.onClick,be=He.onKeyDown,je=He.onKeyUp,Mt=He.panelRef,St=me.useState(!1),wt=(0,ot.Z)(St,2),Dt=wt[0],jt=wt[1],zt=me.useState(!1),en=(0,ot.Z)(zt,2),Jt=en[0],Bt=en[1];(0,_e.Z)(function(){Bt(!0)},[]);var sn=Jt?yt:!1,Vt=me.useRef(),nn=me.useRef();(0,_e.Z)(function(){sn&&(nn.current=document.activeElement)},[sn]);var dt=function(_n){var cn;if(jt(_n),ae==null||ae(_n),!_n&&nn.current&&!((cn=Vt.current)!==null&&cn!==void 0&&cn.contains(nn.current))){var wn;(wn=nn.current)===null||wn===void 0||wn.focus({preventScroll:!0})}},un=me.useMemo(function(){return{panel:Mt}},[Mt]);if(!ut&&!Dt&&!sn&&te)return null;var Zt={onMouseEnter:z,onMouseOver:re,onMouseLeave:le,onClick:ne,onKeyDown:be,onKeyUp:je},Qt=(0,ie.Z)((0,ie.Z)({},He),{},{open:sn,prefixCls:$e,placement:ue,autoFocus:rt,keyboard:ye,width:Te,mask:Ke,maskClosable:ke,inline:tt===!1,afterOpenChange:dt,ref:Vt},Zt);return me.createElement(Ae.Provider,{value:un},me.createElement(Ne.Z,{open:sn||ut||Dt,autoDestroy:!1,getContainer:tt,autoLock:Ke&&(sn||Dt)},me.createElement(Ze,Qt)))},Me=at,Ge=Me},25930:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Cd:function(){return at}});var ie=fe(32855),ot=fe(27247),Ne=fe(43079),_e=fe(59301),me=fe(92310),ge=fe.n(me),Ae={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ie=function(){var Ce=(0,_e.useRef)([]),He=(0,_e.useRef)(null);return(0,_e.useEffect)(function(){var Tt=Date.now(),yt=!1;Ce.current.forEach(function(lt){if(lt){yt=!0;var $e=lt.style;$e.transitionDuration=".3s, .3s, .3s, .06s",He.current&&Tt-He.current<100&&($e.transitionDuration="0s, 0s")}}),yt&&(He.current=Date.now())}),Ce.current},we=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],pe=function(Ce){var He=(0,ot.Z)((0,ot.Z)({},Ae),Ce),Tt=He.className,yt=He.percent,lt=He.prefixCls,$e=He.strokeColor,he=He.strokeLinecap,ue=He.strokeWidth,Be=He.style,rt=He.trailColor,qe=He.trailWidth,ye=He.transition,Pe=(0,Ne.Z)(He,we);delete Pe.gapPosition;var Te=Array.isArray(yt)?yt:[yt],bt=Array.isArray($e)?$e:[$e],Ke=Ie(),mt=ue/2,ke=100-ue/2,tt="M ".concat(he==="round"?mt:0,",").concat(mt,`
|
|
L `).concat(he==="round"?ke:100,",").concat(mt),ut="0 0 100 ".concat(ue),ae=0;return _e.createElement("svg",(0,ie.Z)({className:ge()("".concat(lt,"-line"),Tt),viewBox:ut,preserveAspectRatio:"none",style:Be},Pe),_e.createElement("path",{className:"".concat(lt,"-line-trail"),d:tt,strokeLinecap:he,stroke:rt,strokeWidth:qe||ue,fillOpacity:"0"}),Te.map(function(te,z){var re=1;switch(he){case"round":re=1-ue/100;break;case"square":re=1-ue/2/100;break;default:re=1;break}var le={strokeDasharray:"".concat(te*re,"px, 100px"),strokeDashoffset:"-".concat(ae,"px"),transition:ye||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ne=bt[z]||bt[bt.length-1];return ae+=te,_e.createElement("path",{key:z,className:"".concat(lt,"-line-path"),d:tt,strokeLinecap:he,stroke:ne,strokeWidth:ue,fillOpacity:"0",ref:function(je){Ke[z]=je},style:le})}))},it=pe,ve=fe(34666),ht=fe(11913),Oe=fe(47273),De=0,Re=(0,Oe.Z)();function Le(){var Ge;return Re?(Ge=De,De+=1):Ge="TEST_OR_SSR",Ge}var st=function(Ge){var Ce=_e.useState(),He=(0,ht.Z)(Ce,2),Tt=He[0],yt=He[1];return _e.useEffect(function(){yt("rc_progress_".concat(Le()))},[]),Ge||Tt},ct=function(Ce){var He=Ce.bg,Tt=Ce.children;return _e.createElement("div",{style:{width:"100%",height:"100%",background:He}},Tt)};function vt(Ge,Ce){return Object.keys(Ge).map(function(He){var Tt=parseFloat(He),yt="".concat(Math.floor(Tt*Ce),"%");return"".concat(Ge[He]," ").concat(yt)})}var Ue=_e.forwardRef(function(Ge,Ce){var He=Ge.prefixCls,Tt=Ge.color,yt=Ge.gradientId,lt=Ge.radius,$e=Ge.style,he=Ge.ptg,ue=Ge.strokeLinecap,Be=Ge.strokeWidth,rt=Ge.size,qe=Ge.gapDegree,ye=Tt&&(0,ve.Z)(Tt)==="object",Pe=ye?"#FFF":void 0,Te=rt/2,bt=_e.createElement("circle",{className:"".concat(He,"-circle-path"),r:lt,cx:Te,cy:Te,stroke:Pe,strokeLinecap:ue,strokeWidth:Be,opacity:he===0?0:1,style:$e,ref:Ce});if(!ye)return bt;var Ke="".concat(yt,"-conic"),mt=qe?"".concat(180+qe/2,"deg"):"0deg",ke=vt(Tt,(360-qe)/360),tt=vt(Tt,1),ut="conic-gradient(from ".concat(mt,", ").concat(ke.join(", "),")"),ae="linear-gradient(to ".concat(qe?"bottom":"top",", ").concat(tt.join(", "),")");return _e.createElement(_e.Fragment,null,_e.createElement("mask",{id:Ke},bt),_e.createElement("foreignObject",{x:0,y:0,width:rt,height:rt,mask:"url(#".concat(Ke,")")},_e.createElement(ct,{bg:ae},_e.createElement(ct,{bg:ut}))))}),ze=Ue,Qe=100,Ve=function(Ce,He,Tt,yt,lt,$e,he,ue,Be,rt){var qe=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ye=Tt/100*360*((360-$e)/360),Pe=$e===0?0:{bottom:0,top:180,left:90,right:-90}[he],Te=(100-yt)/100*He;Be==="round"&&yt!==100&&(Te+=rt/2,Te>=He&&(Te=He-.01));var bt=Qe/2;return{stroke:typeof ue=="string"?ue:void 0,strokeDasharray:"".concat(He,"px ").concat(Ce),strokeDashoffset:Te+qe,transform:"rotate(".concat(lt+ye+Pe,"deg)"),transformOrigin:"".concat(bt,"px ").concat(bt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},It=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ye(Ge){var Ce=Ge!=null?Ge:[];return Array.isArray(Ce)?Ce:[Ce]}var Ze=function(Ce){var He=(0,ot.Z)((0,ot.Z)({},Ae),Ce),Tt=He.id,yt=He.prefixCls,lt=He.steps,$e=He.strokeWidth,he=He.trailWidth,ue=He.gapDegree,Be=ue===void 0?0:ue,rt=He.gapPosition,qe=He.trailColor,ye=He.strokeLinecap,Pe=He.style,Te=He.className,bt=He.strokeColor,Ke=He.percent,mt=(0,Ne.Z)(He,It),ke=Qe/2,tt=st(Tt),ut="".concat(tt,"-gradient"),ae=ke-$e/2,te=Math.PI*2*ae,z=Be>0?90+Be/2:-90,re=te*((360-Be)/360),le=(0,ve.Z)(lt)==="object"?lt:{count:lt,gap:2},ne=le.count,be=le.gap,je=Ye(Ke),Mt=Ye(bt),St=Mt.find(function(Bt){return Bt&&(0,ve.Z)(Bt)==="object"}),wt=St&&(0,ve.Z)(St)==="object",Dt=wt?"butt":ye,jt=Ve(te,re,0,100,z,Be,rt,qe,Dt,$e),zt=Ie(),en=function(){var sn=0;return je.map(function(Vt,nn){var dt=Mt[nn]||Mt[Mt.length-1],un=Ve(te,re,sn,Vt,z,Be,rt,dt,Dt,$e);return sn+=Vt,_e.createElement(ze,{key:nn,color:dt,ptg:Vt,radius:ae,prefixCls:yt,gradientId:ut,style:un,strokeLinecap:Dt,strokeWidth:$e,gapDegree:Be,ref:function(Qt){zt[nn]=Qt},size:Qe})}).reverse()},Jt=function(){var sn=Math.round(ne*(je[0]/100)),Vt=100/ne,nn=0;return new Array(ne).fill(null).map(function(dt,un){var Zt=un<=sn-1?Mt[0]:qe,Qt=Zt&&(0,ve.Z)(Zt)==="object"?"url(#".concat(ut,")"):void 0,ln=Ve(te,re,nn,Vt,z,Be,rt,Zt,"butt",$e,be);return nn+=(re-ln.strokeDashoffset+be)*100/re,_e.createElement("circle",{key:un,className:"".concat(yt,"-circle-path"),r:ae,cx:ke,cy:ke,stroke:Qt,strokeWidth:$e,opacity:1,style:ln,ref:function(cn){zt[un]=cn}})})};return _e.createElement("svg",(0,ie.Z)({className:ge()("".concat(yt,"-circle"),Te),viewBox:"0 0 ".concat(Qe," ").concat(Qe),style:Pe,id:Tt,role:"presentation"},mt),!ne&&_e.createElement("circle",{className:"".concat(yt,"-circle-trail"),r:ae,cx:ke,cy:ke,stroke:qe,strokeLinecap:Dt,strokeWidth:he||$e,style:jt}),ne?Jt():en())},at=Ze,Me={Line:it,Circle:at}},738:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return vt}});var ie=fe(32855),ot=fe(74430),Ne=fe(11913),_e=fe(43079),me=fe(92310),ge=fe.n(me),Ae=fe(18929),Ie=fe(10228),we=fe(26112),pe=fe(59301);function it(Ue,ze){var Qe=Ue.disabled,Ve=Ue.prefixCls,It=Ue.character,Ye=Ue.characterRender,Ze=Ue.index,at=Ue.count,Me=Ue.value,Ge=Ue.allowHalf,Ce=Ue.focused,He=Ue.onHover,Tt=Ue.onClick,yt=function(ye){He(ye,Ze)},lt=function(ye){Tt(ye,Ze)},$e=function(ye){ye.keyCode===Ie.Z.ENTER&&Tt(ye,Ze)},he=Ze+1,ue=new Set([Ve]);Me===0&&Ze===0&&Ce?ue.add("".concat(Ve,"-focused")):Ge&&Me+.5>=he&&Me<he?(ue.add("".concat(Ve,"-half")),ue.add("".concat(Ve,"-active")),Ce&&ue.add("".concat(Ve,"-focused"))):(he<=Me?ue.add("".concat(Ve,"-full")):ue.add("".concat(Ve,"-zero")),he===Me&&Ce&&ue.add("".concat(Ve,"-focused")));var Be=typeof It=="function"?It(Ue):It,rt=pe.createElement("li",{className:ge()(Array.from(ue)),ref:ze},pe.createElement("div",{onClick:Qe?null:lt,onKeyDown:Qe?null:$e,onMouseMove:Qe?null:yt,role:"radio","aria-checked":Me>Ze?"true":"false","aria-posinset":Ze+1,"aria-setsize":at,tabIndex:Qe?-1:0},pe.createElement("div",{className:"".concat(Ve,"-first")},Be),pe.createElement("div",{className:"".concat(Ve,"-second")},Be)));return Ye&&(rt=Ye(rt,Ue)),rt}var ve=pe.forwardRef(it);function ht(){var Ue=pe.useRef({});function ze(Ve){return Ue.current[Ve]}function Qe(Ve){return function(It){Ue.current[Ve]=It}}return[ze,Qe]}function Oe(Ue){var ze=Ue.pageXOffset,Qe="scrollLeft";if(typeof ze!="number"){var Ve=Ue.document;ze=Ve.documentElement[Qe],typeof ze!="number"&&(ze=Ve.body[Qe])}return ze}function De(Ue){var ze,Qe,Ve=Ue.ownerDocument,It=Ve.body,Ye=Ve&&Ve.documentElement,Ze=Ue.getBoundingClientRect();return ze=Ze.left,Qe=Ze.top,ze-=Ye.clientLeft||It.clientLeft||0,Qe-=Ye.clientTop||It.clientTop||0,{left:ze,top:Qe}}function Re(Ue){var ze=De(Ue),Qe=Ue.ownerDocument,Ve=Qe.defaultView||Qe.parentWindow;return ze.left+=Oe(Ve),ze.left}var Le=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function st(Ue,ze){var Qe=Ue.prefixCls,Ve=Qe===void 0?"rc-rate":Qe,It=Ue.className,Ye=Ue.defaultValue,Ze=Ue.value,at=Ue.count,Me=at===void 0?5:at,Ge=Ue.allowHalf,Ce=Ge===void 0?!1:Ge,He=Ue.allowClear,Tt=He===void 0?!0:He,yt=Ue.keyboard,lt=yt===void 0?!0:yt,$e=Ue.character,he=$e===void 0?"\u2605":$e,ue=Ue.characterRender,Be=Ue.disabled,rt=Ue.direction,qe=rt===void 0?"ltr":rt,ye=Ue.tabIndex,Pe=ye===void 0?0:ye,Te=Ue.autoFocus,bt=Ue.onHoverChange,Ke=Ue.onChange,mt=Ue.onFocus,ke=Ue.onBlur,tt=Ue.onKeyDown,ut=Ue.onMouseLeave,ae=(0,_e.Z)(Ue,Le),te=ht(),z=(0,Ne.Z)(te,2),re=z[0],le=z[1],ne=pe.useRef(null),be=function(){if(!Be){var fn;(fn=ne.current)===null||fn===void 0||fn.focus()}};pe.useImperativeHandle(ze,function(){return{focus:be,blur:function(){if(!Be){var fn;(fn=ne.current)===null||fn===void 0||fn.blur()}}}});var je=(0,Ae.Z)(Ye||0,{value:Ze}),Mt=(0,Ne.Z)(je,2),St=Mt[0],wt=Mt[1],Dt=(0,Ae.Z)(null),jt=(0,Ne.Z)(Dt,2),zt=jt[0],en=jt[1],Jt=function(fn,Wn){var Un=qe==="rtl",En=fn+1;if(Ce){var tr=re(fn),ft=Re(tr),gt=tr.clientWidth;(Un&&Wn-ft>gt/2||!Un&&Wn-ft<gt/2)&&(En-=.5)}return En},Bt=function(fn){wt(fn),Ke==null||Ke(fn)},sn=pe.useState(!1),Vt=(0,Ne.Z)(sn,2),nn=Vt[0],dt=Vt[1],un=function(){dt(!0),mt==null||mt()},Zt=function(){dt(!1),ke==null||ke()},Qt=pe.useState(null),ln=(0,Ne.Z)(Qt,2),_n=ln[0],cn=ln[1],wn=function(fn,Wn){var Un=Jt(Wn,fn.pageX);Un!==zt&&(cn(Un),en(null)),bt==null||bt(Un)},$n=function(fn){Be||(cn(null),en(null),bt==null||bt(void 0)),fn&&(ut==null||ut(fn))},Zn=function(fn,Wn){var Un=Jt(Wn,fn.pageX),En=!1;Tt&&(En=Un===St),$n(),Bt(En?0:Un),en(En?Un:null)},Mr=function(fn){var Wn=fn.keyCode,Un=qe==="rtl",En=Ce?.5:1;lt&&(Wn===Ie.Z.RIGHT&&St<Me&&!Un?(Bt(St+En),fn.preventDefault()):Wn===Ie.Z.LEFT&&St>0&&!Un||Wn===Ie.Z.RIGHT&&St>0&&Un?(Bt(St-En),fn.preventDefault()):Wn===Ie.Z.LEFT&&St<Me&&Un&&(Bt(St+En),fn.preventDefault())),tt==null||tt(fn)};pe.useEffect(function(){Te&&!Be&&be()},[]);var Nr=new Array(Me).fill(0).map(function(Gn,fn){return pe.createElement(ve,{ref:le(fn),index:fn,count:Me,disabled:Be,prefixCls:"".concat(Ve,"-star"),allowHalf:Ce,value:_n===null?St:_n,onClick:Zn,onHover:wn,key:Gn||fn,character:he,characterRender:ue,focused:nn})}),sr=ge()(Ve,It,(0,ot.Z)((0,ot.Z)({},"".concat(Ve,"-disabled"),Be),"".concat(Ve,"-rtl"),qe==="rtl"));return pe.createElement("ul",(0,ie.Z)({className:sr,onMouseLeave:$n,tabIndex:Be?-1:Pe,onFocus:Be?null:un,onBlur:Be?null:Zt,onKeyDown:Be?null:Mr,ref:ne},(0,we.Z)(ae,{aria:!0,data:!0,attr:!0})),Nr)}var ct=pe.forwardRef(st),vt=ct},6551:function(Pt,Ot,fe){"use strict";fe.d(Ot,{ZP:function(){return Ae}});var ie=fe(11913),ot=fe(59301),Ne=fe(47273),_e=0,me=(0,Ne.Z)();function ge(){var Ie;return me?(Ie=_e,_e+=1):Ie="TEST_OR_SSR",Ie}function Ae(Ie){var we=ot.useState(),pe=(0,ie.Z)(we,2),it=pe[0],ve=pe[1];return ot.useEffect(function(){ve("rc_select_".concat(ge()))},[]),Ie||it}},37463:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Ac:function(){return dt},Xo:function(){return Zt},Wx:function(){return ln},ZP:function(){return Sn},lk:function(){return vt}});var ie=fe(32855),ot=fe(3300),Ne=fe(74430),_e=fe(27247),me=fe(11913),ge=fe(43079),Ae=fe(34666),Ie=fe(18929),we=fe(48736),pe=fe(59301),it=fe(92310),ve=fe.n(it),ht=fe(34280),Oe=fe(49658),De=fe(8654),Re=function(Fe){var Wt=Fe.className,Ct=Fe.customizeIcon,We=Fe.customizeIconProps,kt=Fe.children,qt=Fe.onMouseDown,rn=Fe.onClick,dn=typeof Ct=="function"?Ct(We):Ct;return pe.createElement("span",{className:Wt,onMouseDown:function($t){$t.preventDefault(),qt==null||qt($t)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:rn,"aria-hidden":!0},dn!==void 0?dn:pe.createElement("span",{className:ve()(Wt.split(/\s+/).map(function(Je){return"".concat(Je,"-icon")}))},kt))},Le=Re,st=function(Fe,Wt,Ct,We,kt){var qt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,rn=arguments.length>6?arguments[6]:void 0,dn=arguments.length>7?arguments[7]:void 0,Je=pe.useMemo(function(){if((0,Ae.Z)(We)==="object")return We.clearIcon;if(kt)return kt},[We,kt]),$t=pe.useMemo(function(){return!!(!qt&&We&&(Ct.length||rn)&&!(dn==="combobox"&&rn===""))},[We,qt,Ct.length,rn,dn]);return{allowClear:$t,clearIcon:pe.createElement(Le,{className:"".concat(Fe,"-clear"),onMouseDown:Wt,customizeIcon:Je},"\xD7")}},ct=pe.createContext(null);function vt(){return pe.useContext(ct)}function Ue(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Fe=pe.useState(!1),Wt=(0,me.Z)(Fe,2),Ct=Wt[0],We=Wt[1],kt=pe.useRef(null),qt=function(){window.clearTimeout(kt.current)};pe.useEffect(function(){return qt},[]);var rn=function(Je,$t){qt(),kt.current=window.setTimeout(function(){We(Je),$t&&$t()},Ee)};return[Ct,rn,qt]}function ze(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Fe=pe.useRef(null),Wt=pe.useRef(null);pe.useEffect(function(){return function(){window.clearTimeout(Wt.current)}},[]);function Ct(We){(We||Fe.current===null)&&(Fe.current=We),window.clearTimeout(Wt.current),Wt.current=window.setTimeout(function(){Fe.current=null},Ee)}return[function(){return Fe.current},Ct]}function Qe(Ee,Fe,Wt,Ct){var We=pe.useRef(null);We.current={open:Fe,triggerOpen:Wt,customizedTrigger:Ct},pe.useEffect(function(){function kt(qt){var rn;if(!((rn=We.current)!==null&&rn!==void 0&&rn.customizedTrigger)){var dn=qt.target;dn.shadowRoot&&qt.composed&&(dn=qt.composedPath()[0]||dn),We.current.open&&Ee().filter(function(Je){return Je}).every(function(Je){return!Je.contains(dn)&&Je!==dn})&&We.current.triggerOpen(!1)}}return window.addEventListener("mousedown",kt),function(){return window.removeEventListener("mousedown",kt)}},[])}var Ve=fe(10228);function It(Ee){return Ee&&![Ve.Z.ESC,Ve.Z.SHIFT,Ve.Z.BACKSPACE,Ve.Z.TAB,Ve.Z.WIN_KEY,Ve.Z.ALT,Ve.Z.META,Ve.Z.WIN_KEY_RIGHT,Ve.Z.CTRL,Ve.Z.SEMICOLON,Ve.Z.EQUALS,Ve.Z.CAPS_LOCK,Ve.Z.CONTEXT_MENU,Ve.Z.F1,Ve.Z.F2,Ve.Z.F3,Ve.Z.F4,Ve.Z.F5,Ve.Z.F6,Ve.Z.F7,Ve.Z.F8,Ve.Z.F9,Ve.Z.F10,Ve.Z.F11,Ve.Z.F12].includes(Ee)}var Ye=fe(26112),Ze=fe(11780);function at(Ee,Fe,Wt){var Ct=(0,_e.Z)((0,_e.Z)({},Ee),Wt?Fe:{});return Object.keys(Fe).forEach(function(We){var kt=Fe[We];typeof kt=="function"&&(Ct[We]=function(){for(var qt,rn=arguments.length,dn=new Array(rn),Je=0;Je<rn;Je++)dn[Je]=arguments[Je];return kt.apply(void 0,dn),(qt=Ee[We])===null||qt===void 0?void 0:qt.call.apply(qt,[Ee].concat(dn))})}),Ct}var Me=at,Ge=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ce=function(Fe,Wt){var Ct=Fe.prefixCls,We=Fe.id,kt=Fe.inputElement,qt=Fe.autoFocus,rn=Fe.autoComplete,dn=Fe.editable,Je=Fe.activeDescendantId,$t=Fe.value,Lt=Fe.open,An=Fe.attrs,Xt=(0,ge.Z)(Fe,Ge),yn=kt||pe.createElement("input",null),pn=yn,Fn=pn.ref,Pn=pn.props;return(0,we.Kp)(!("maxLength"in yn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),yn=pe.cloneElement(yn,(0,_e.Z)((0,_e.Z)((0,_e.Z)({type:"search"},Me(Xt,Pn,!0)),{},{id:We,ref:(0,De.sQ)(Wt,Fn),autoComplete:rn||"off",autoFocus:qt,className:ve()("".concat(Ct,"-selection-search-input"),Pn==null?void 0:Pn.className),role:"combobox","aria-expanded":Lt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(We,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(We,"_list"),"aria-activedescendant":Lt?Je:void 0},An),{},{value:dn?$t:"",readOnly:!dn,unselectable:dn?null:"on",style:(0,_e.Z)((0,_e.Z)({},Pn.style),{},{opacity:dn?null:0})})),yn},He=pe.forwardRef(Ce),Tt=He;function yt(Ee){return Array.isArray(Ee)?Ee:Ee!==void 0?[Ee]:[]}var lt=typeof window!="undefined"&&window.document&&window.document.documentElement,$e=lt;function he(Ee){return Ee!=null}function ue(Ee){return!Ee&&Ee!==0}function Be(Ee){return["string","number"].includes((0,Ae.Z)(Ee))}function rt(Ee){var Fe=void 0;return Ee&&(Be(Ee.title)?Fe=Ee.title.toString():Be(Ee.label)&&(Fe=Ee.label.toString())),Fe}function qe(Ee,Fe){$e?pe.useLayoutEffect(Ee,Fe):pe.useEffect(Ee,Fe)}function ye(Ee){var Fe;return(Fe=Ee.key)!==null&&Fe!==void 0?Fe:Ee.value}var Pe=function(Fe){Fe.preventDefault(),Fe.stopPropagation()},Te=function(Fe){var Wt=Fe.id,Ct=Fe.prefixCls,We=Fe.values,kt=Fe.open,qt=Fe.searchValue,rn=Fe.autoClearSearchValue,dn=Fe.inputRef,Je=Fe.placeholder,$t=Fe.disabled,Lt=Fe.mode,An=Fe.showSearch,Xt=Fe.autoFocus,yn=Fe.autoComplete,pn=Fe.activeDescendantId,Fn=Fe.tabIndex,Pn=Fe.removeIcon,Xn=Fe.maxTagCount,rr=Fe.maxTagTextLength,Yn=Fe.maxTagPlaceholder,hr=Yn===void 0?function(Et){return"+ ".concat(Et.length," ...")}:Yn,Hn=Fe.tagRender,wr=Fe.onToggleOpen,Rr=Fe.onRemove,ar=Fe.onInputChange,pr=Fe.onInputPaste,Er=Fe.onInputKeyDown,vr=Fe.onInputMouseDown,er=Fe.onInputCompositionStart,Ar=Fe.onInputCompositionEnd,lr=Fe.onInputBlur,ur=pe.useRef(null),mr=(0,pe.useState)(0),Br=(0,me.Z)(mr,2),gr=Br[0],ir=Br[1],Jn=(0,pe.useState)(!1),cr=(0,me.Z)(Jn,2),Zr=cr[0],Pr=cr[1],Sr="".concat(Ct,"-selection"),ri=kt||Lt==="multiple"&&rn===!1||Lt==="tags"?qt:"",Dr=Lt==="tags"||Lt==="multiple"&&rn===!1||An&&(kt||Zr);qe(function(){ir(ur.current.scrollWidth)},[ri]);var li=function(pt,Nt,Gt,bn,Tn){return pe.createElement("span",{title:rt(pt),className:ve()("".concat(Sr,"-item"),(0,Ne.Z)({},"".concat(Sr,"-item-disabled"),Gt))},pe.createElement("span",{className:"".concat(Sr,"-item-content")},Nt),bn&&pe.createElement(Le,{className:"".concat(Sr,"-item-remove"),onMouseDown:Pe,onClick:Tn,customizeIcon:Pn},"\xD7"))},qr=function(pt,Nt,Gt,bn,Tn,Kn){var nr=function(yr){Pe(yr),wr(!kt)};return pe.createElement("span",{onMouseDown:nr},Hn({label:Nt,value:pt,disabled:Gt,closable:bn,onClose:Tn,isMaxTag:!!Kn}))},_r=function(pt){var Nt=pt.disabled,Gt=pt.label,bn=pt.value,Tn=!$t&&!Nt,Kn=Gt;if(typeof rr=="number"&&(typeof Gt=="string"||typeof Gt=="number")){var nr=String(Kn);nr.length>rr&&(Kn="".concat(nr.slice(0,rr),"..."))}var Qn=function(dr){dr&&dr.stopPropagation(),Rr(pt)};return typeof Hn=="function"?qr(bn,Kn,Nt,Tn,Qn):li(pt,Kn,Nt,Tn,Qn)},zn=function(pt){if(!We.length)return null;var Nt=typeof hr=="function"?hr(pt):hr;return typeof Hn=="function"?qr(void 0,Nt,!1,!1,void 0,!0):li({title:Nt},Nt,!1)},Ht=pe.createElement("div",{className:"".concat(Sr,"-search"),style:{width:gr},onFocus:function(){Pr(!0)},onBlur:function(){Pr(!1)}},pe.createElement(Tt,{ref:dn,open:kt,prefixCls:Ct,id:Wt,inputElement:null,disabled:$t,autoFocus:Xt,autoComplete:yn,editable:Dr,activeDescendantId:pn,value:ri,onKeyDown:Er,onMouseDown:vr,onChange:ar,onPaste:pr,onCompositionStart:er,onCompositionEnd:Ar,onBlur:lr,tabIndex:Fn,attrs:(0,Ye.Z)(Fe,!0)}),pe.createElement("span",{ref:ur,className:"".concat(Sr,"-search-mirror"),"aria-hidden":!0},ri,"\xA0")),Ut=pe.createElement(Ze.Z,{prefixCls:"".concat(Sr,"-overflow"),data:We,renderItem:_r,renderRest:zn,suffix:Ht,itemKey:ye,maxCount:Xn});return pe.createElement("span",{className:"".concat(Sr,"-wrap")},Ut,!We.length&&!ri&&pe.createElement("span",{className:"".concat(Sr,"-placeholder")},Je))},bt=Te,Ke=function(Fe){var Wt=Fe.inputElement,Ct=Fe.prefixCls,We=Fe.id,kt=Fe.inputRef,qt=Fe.disabled,rn=Fe.autoFocus,dn=Fe.autoComplete,Je=Fe.activeDescendantId,$t=Fe.mode,Lt=Fe.open,An=Fe.values,Xt=Fe.placeholder,yn=Fe.tabIndex,pn=Fe.showSearch,Fn=Fe.searchValue,Pn=Fe.activeValue,Xn=Fe.maxLength,rr=Fe.onInputKeyDown,Yn=Fe.onInputMouseDown,hr=Fe.onInputChange,Hn=Fe.onInputPaste,wr=Fe.onInputCompositionStart,Rr=Fe.onInputCompositionEnd,ar=Fe.onInputBlur,pr=Fe.title,Er=pe.useState(!1),vr=(0,me.Z)(Er,2),er=vr[0],Ar=vr[1],lr=$t==="combobox",ur=lr||pn,mr=An[0],Br=Fn||"";lr&&Pn&&!er&&(Br=Pn),pe.useEffect(function(){lr&&Ar(!1)},[lr,Pn]);var gr=$t!=="combobox"&&!Lt&&!pn?!1:!!Br,ir=pr===void 0?rt(mr):pr,Jn=pe.useMemo(function(){return mr?null:pe.createElement("span",{className:"".concat(Ct,"-selection-placeholder"),style:gr?{visibility:"hidden"}:void 0},Xt)},[mr,gr,Xt,Ct]);return pe.createElement("span",{className:"".concat(Ct,"-selection-wrap")},pe.createElement("span",{className:"".concat(Ct,"-selection-search")},pe.createElement(Tt,{ref:kt,prefixCls:Ct,id:We,open:Lt,inputElement:Wt,disabled:qt,autoFocus:rn,autoComplete:dn,editable:ur,activeDescendantId:Je,value:Br,onKeyDown:rr,onMouseDown:Yn,onChange:function(Zr){Ar(!0),hr(Zr)},onPaste:Hn,onCompositionStart:wr,onCompositionEnd:Rr,onBlur:ar,tabIndex:yn,attrs:(0,Ye.Z)(Fe,!0),maxLength:lr?Xn:void 0})),!lr&&mr?pe.createElement("span",{className:"".concat(Ct,"-selection-item"),title:ir,style:gr?{visibility:"hidden"}:void 0},mr.label):null,Jn)},mt=Ke,ke=function(Fe,Wt){var Ct=(0,pe.useRef)(null),We=(0,pe.useRef)(!1),kt=Fe.prefixCls,qt=Fe.open,rn=Fe.mode,dn=Fe.showSearch,Je=Fe.tokenWithEnter,$t=Fe.disabled,Lt=Fe.prefix,An=Fe.autoClearSearchValue,Xt=Fe.onSearch,yn=Fe.onSearchSubmit,pn=Fe.onToggleOpen,Fn=Fe.onInputKeyDown,Pn=Fe.onInputBlur,Xn=Fe.domRef;pe.useImperativeHandle(Wt,function(){return{focus:function(ir){Ct.current.focus(ir)},blur:function(){Ct.current.blur()}}});var rr=ze(0),Yn=(0,me.Z)(rr,2),hr=Yn[0],Hn=Yn[1],wr=function(ir){var Jn=ir.which,cr=Ct.current instanceof HTMLTextAreaElement;!cr&&qt&&(Jn===Ve.Z.UP||Jn===Ve.Z.DOWN)&&ir.preventDefault(),Fn&&Fn(ir),Jn===Ve.Z.ENTER&&rn==="tags"&&!We.current&&!qt&&(yn==null||yn(ir.target.value)),!(cr&&!qt&&~[Ve.Z.UP,Ve.Z.DOWN,Ve.Z.LEFT,Ve.Z.RIGHT].indexOf(Jn))&&It(Jn)&&pn(!0)},Rr=function(){Hn(!0)},ar=(0,pe.useRef)(null),pr=function(ir){Xt(ir,!0,We.current)!==!1&&pn(!0)},Er=function(){We.current=!0},vr=function(ir){We.current=!1,rn!=="combobox"&&pr(ir.target.value)},er=function(ir){var Jn=ir.target.value;if(Je&&ar.current&&/[\r\n]/.test(ar.current)){var cr=ar.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Jn=Jn.replace(cr,ar.current)}ar.current=null,pr(Jn)},Ar=function(ir){var Jn=ir.clipboardData,cr=Jn==null?void 0:Jn.getData("text");ar.current=cr||""},lr=function(ir){var Jn=ir.target;if(Jn!==Ct.current){var cr=document.body.style.msTouchAction!==void 0;cr?setTimeout(function(){Ct.current.focus()}):Ct.current.focus()}},ur=function(ir){var Jn=hr();ir.target!==Ct.current&&!Jn&&!(rn==="combobox"&&$t)&&ir.preventDefault(),(rn!=="combobox"&&(!dn||!Jn)||!qt)&&(qt&&An!==!1&&Xt("",!0,!1),pn())},mr={inputRef:Ct,onInputKeyDown:wr,onInputMouseDown:Rr,onInputChange:er,onInputPaste:Ar,onInputCompositionStart:Er,onInputCompositionEnd:vr,onInputBlur:Pn},Br=rn==="multiple"||rn==="tags"?pe.createElement(bt,(0,ie.Z)({},Fe,mr)):pe.createElement(mt,(0,ie.Z)({},Fe,mr));return pe.createElement("div",{ref:Xn,className:"".concat(kt,"-selector"),onClick:lr,onMouseDown:ur},Lt&&pe.createElement("div",{className:"".concat(kt,"-prefix")},Lt),Br)},tt=pe.forwardRef(ke),ut=tt,ae=fe(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Fe){var Wt=Fe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Wt,adjustY:1},htmlRegion:"scroll"}}},re=function(Fe,Wt){var Ct=Fe.prefixCls,We=Fe.disabled,kt=Fe.visible,qt=Fe.children,rn=Fe.popupElement,dn=Fe.animation,Je=Fe.transitionName,$t=Fe.dropdownStyle,Lt=Fe.dropdownClassName,An=Fe.direction,Xt=An===void 0?"ltr":An,yn=Fe.placement,pn=Fe.builtinPlacements,Fn=Fe.dropdownMatchSelectWidth,Pn=Fe.dropdownRender,Xn=Fe.dropdownAlign,rr=Fe.getPopupContainer,Yn=Fe.empty,hr=Fe.getTriggerDOMNode,Hn=Fe.onPopupVisibleChange,wr=Fe.onPopupMouseEnter,Rr=(0,ge.Z)(Fe,te),ar="".concat(Ct,"-dropdown"),pr=rn;Pn&&(pr=Pn(rn));var Er=pe.useMemo(function(){return pn||z(Fn)},[pn,Fn]),vr=dn?"".concat(ar,"-").concat(dn):Je,er=typeof Fn=="number",Ar=pe.useMemo(function(){return er?null:Fn===!1?"minWidth":"width"},[Fn,er]),lr=$t;er&&(lr=(0,_e.Z)((0,_e.Z)({},lr),{},{width:Fn}));var ur=pe.useRef(null);return pe.useImperativeHandle(Wt,function(){return{getPopupElement:function(){var Br;return(Br=ur.current)===null||Br===void 0?void 0:Br.popupElement}}}),pe.createElement(ae.Z,(0,ie.Z)({},Rr,{showAction:Hn?["click"]:[],hideAction:Hn?["click"]:[],popupPlacement:yn||(Xt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Er,prefixCls:ar,popupTransitionName:vr,popup:pe.createElement("div",{onMouseEnter:wr},pr),ref:ur,stretch:Ar,popupAlign:Xn,popupVisible:kt,getPopupContainer:rr,popupClassName:ve()(Lt,(0,Ne.Z)({},"".concat(ar,"-empty"),Yn)),popupStyle:lr,getTriggerDOMNode:hr,onPopupVisibleChange:Hn}),qt)},le=pe.forwardRef(re),ne=le,be=fe(40954);function je(Ee,Fe){var Wt=Ee.key,Ct;return"value"in Ee&&(Ct=Ee.value),Wt!=null?Wt:Ct!==void 0?Ct:"rc-index-key-".concat(Fe)}function Mt(Ee){return typeof Ee!="undefined"&&!Number.isNaN(Ee)}function St(Ee,Fe){var Wt=Ee||{},Ct=Wt.label,We=Wt.value,kt=Wt.options,qt=Wt.groupLabel,rn=Ct||(Fe?"children":"label");return{label:rn,value:We||"value",options:kt||"options",groupLabel:qt||rn}}function wt(Ee){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Wt=Fe.fieldNames,Ct=Fe.childrenAsData,We=[],kt=St(Wt,!1),qt=kt.label,rn=kt.value,dn=kt.options,Je=kt.groupLabel;function $t(Lt,An){Array.isArray(Lt)&&Lt.forEach(function(Xt){if(An||!(dn in Xt)){var yn=Xt[rn];We.push({key:je(Xt,We.length),groupOption:An,data:Xt,label:Xt[qt],value:yn})}else{var pn=Xt[Je];pn===void 0&&Ct&&(pn=Xt.label),We.push({key:je(Xt,We.length),group:!0,data:Xt,label:pn}),$t(Xt[dn],!0)}})}return $t(Ee,!1),We}function Dt(Ee){var Fe=(0,_e.Z)({},Ee);return"props"in Fe||Object.defineProperty(Fe,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Fe}}),Fe}var jt=function(Fe,Wt,Ct){if(!Wt||!Wt.length)return null;var We=!1,kt=function rn(dn,Je){var $t=(0,be.Z)(Je),Lt=$t[0],An=$t.slice(1);if(!Lt)return[dn];var Xt=dn.split(Lt);return We=We||Xt.length>1,Xt.reduce(function(yn,pn){return[].concat((0,ot.Z)(yn),(0,ot.Z)(rn(pn,An)))},[]).filter(Boolean)},qt=kt(Fe,Wt);return We?typeof Ct!="undefined"?qt.slice(0,Ct):qt:null},zt=pe.createContext(null),en=zt;function Jt(Ee){var Fe=Ee.visible,Wt=Ee.values;if(!Fe)return null;var Ct=50;return pe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Wt.slice(0,Ct).map(function(We){var kt=We.label,qt=We.value;return["number","string"].includes((0,Ae.Z)(kt))?kt:qt}).join(", ")),Wt.length>Ct?", ...":null)}var Bt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],sn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Vt=function(Fe){return Fe==="tags"||Fe==="multiple"},nn=pe.forwardRef(function(Ee,Fe){var Wt,Ct=Ee.id,We=Ee.prefixCls,kt=Ee.className,qt=Ee.showSearch,rn=Ee.tagRender,dn=Ee.direction,Je=Ee.omitDomProps,$t=Ee.displayValues,Lt=Ee.onDisplayValuesChange,An=Ee.emptyOptions,Xt=Ee.notFoundContent,yn=Xt===void 0?"Not Found":Xt,pn=Ee.onClear,Fn=Ee.mode,Pn=Ee.disabled,Xn=Ee.loading,rr=Ee.getInputElement,Yn=Ee.getRawInputElement,hr=Ee.open,Hn=Ee.defaultOpen,wr=Ee.onDropdownVisibleChange,Rr=Ee.activeValue,ar=Ee.onActiveValueChange,pr=Ee.activeDescendantId,Er=Ee.searchValue,vr=Ee.autoClearSearchValue,er=Ee.onSearch,Ar=Ee.onSearchSplit,lr=Ee.tokenSeparators,ur=Ee.allowClear,mr=Ee.prefix,Br=Ee.suffixIcon,gr=Ee.clearIcon,ir=Ee.OptionList,Jn=Ee.animation,cr=Ee.transitionName,Zr=Ee.dropdownStyle,Pr=Ee.dropdownClassName,Sr=Ee.dropdownMatchSelectWidth,ri=Ee.dropdownRender,Dr=Ee.dropdownAlign,li=Ee.placement,qr=Ee.builtinPlacements,_r=Ee.getPopupContainer,zn=Ee.showAction,Ht=zn===void 0?[]:zn,Ut=Ee.onFocus,Et=Ee.onBlur,pt=Ee.onKeyUp,Nt=Ee.onKeyDown,Gt=Ee.onMouseDown,bn=(0,ge.Z)(Ee,Bt),Tn=Vt(Fn),Kn=(qt!==void 0?qt:Tn)||Fn==="combobox",nr=(0,_e.Z)({},bn);sn.forEach(function(or){delete nr[or]}),Je==null||Je.forEach(function(or){delete nr[or]});var Qn=pe.useState(!1),yr=(0,me.Z)(Qn,2),dr=yr[0],Or=yr[1];pe.useEffect(function(){Or((0,Oe.Z)())},[]);var Ai=pe.useRef(null),ii=pe.useRef(null),jr=pe.useRef(null),ui=pe.useRef(null),Cr=pe.useRef(null),hi=pe.useRef(!1),Ti=Ue(),br=(0,me.Z)(Ti,3),yi=br[0],pi=br[1],Hi=br[2];pe.useImperativeHandle(Fe,function(){var or,Vn;return{focus:(or=ui.current)===null||or===void 0?void 0:or.focus,blur:(Vn=ui.current)===null||Vn===void 0?void 0:Vn.blur,scrollTo:function(ci){var Ur;return(Ur=Cr.current)===null||Ur===void 0?void 0:Ur.scrollTo(ci)},nativeElement:Ai.current||ii.current}});var bi=pe.useMemo(function(){var or;if(Fn!=="combobox")return Er;var Vn=(or=$t[0])===null||or===void 0?void 0:or.value;return typeof Vn=="string"||typeof Vn=="number"?String(Vn):""},[Er,Fn,$t]),Wi=Fn==="combobox"&&typeof rr=="function"&&rr()||null,Lr=typeof Yn=="function"&&Yn(),Fi=(0,De.x1)(ii,Lr==null||(Wt=Lr.props)===null||Wt===void 0?void 0:Wt.ref),$i=pe.useState(!1),eo=(0,me.Z)($i,2),Vo=eo[0],Yi=eo[1];(0,ht.Z)(function(){Yi(!0)},[]);var Wr=(0,Ie.Z)(!1,{defaultValue:Hn,value:hr}),to=(0,me.Z)(Wr,2),ao=to[0],zi=to[1],Kr=Vo?ao:!1,bo=!yn&&An;(Pn||bo&&Kr&&Fn==="combobox")&&(Kr=!1);var so=bo?!1:Kr,Nn=pe.useCallback(function(or){var Vn=or!==void 0?or:!Kr;Pn||(zi(Vn),Kr!==Vn&&(wr==null||wr(Vn)))},[Pn,Kr,zi,wr]),jn=pe.useMemo(function(){return(lr||[]).some(function(or){return[`
|
|
`,`\r
|
|
`].includes(or)})},[lr]),On=pe.useContext(en)||{},In=On.maxCount,fr=On.rawValues,Tr=function(Vn,ai,ci){if(!(Tn&&Mt(In)&&(fr==null?void 0:fr.size)>=In)){var Ur=!0,Jr=Vn;ar==null||ar(null);var Gi=jt(Vn,lr,Mt(In)?In-fr.size:void 0),Ii=ci?null:Gi;return Fn!=="combobox"&&Ii&&(Jr="",Ar==null||Ar(Ii),Nn(!1),Ur=!1),er&&bi!==Jr&&er(Jr,{source:ai?"typing":"effect"}),Ur}},Zi=function(Vn){!Vn||!Vn.trim()||er(Vn,{source:"submit"})};pe.useEffect(function(){!Kr&&!Tn&&Fn!=="combobox"&&Tr("",!1,!1)},[Kr]),pe.useEffect(function(){ao&&Pn&&zi(!1),Pn&&!hi.current&&pi(!1)},[Pn]);var vi=ze(),oi=(0,me.Z)(vi,2),Gr=oi[0],_i=oi[1],Xi=pe.useRef(!1),Di=function(Vn){var ai=Gr(),ci=Vn.key,Ur=ci==="Enter";if(Ur&&(Fn!=="combobox"&&Vn.preventDefault(),Kr||Nn(!0)),_i(!!bi),ci==="Backspace"&&!ai&&Tn&&!bi&&$t.length){for(var Jr=(0,ot.Z)($t),Gi=null,Ii=Jr.length-1;Ii>=0;Ii-=1){var ro=Jr[Ii];if(!ro.disabled){Jr.splice(Ii,1),Gi=ro;break}}Gi&&Lt(Jr,{type:"remove",values:[Gi]})}for(var Li=arguments.length,Mi=new Array(Li>1?Li-1:0),Ui=1;Ui<Li;Ui++)Mi[Ui-1]=arguments[Ui];if(Kr&&(!Ur||!Xi.current)){var uo;Ur&&(Xi.current=!0),(uo=Cr.current)===null||uo===void 0||uo.onKeyDown.apply(uo,[Vn].concat(Mi))}Nt==null||Nt.apply(void 0,[Vn].concat(Mi))},Ji=function(Vn){for(var ai=arguments.length,ci=new Array(ai>1?ai-1:0),Ur=1;Ur<ai;Ur++)ci[Ur-1]=arguments[Ur];if(Kr){var Jr;(Jr=Cr.current)===null||Jr===void 0||Jr.onKeyUp.apply(Jr,[Vn].concat(ci))}Vn.key==="Enter"&&(Xi.current=!1),pt==null||pt.apply(void 0,[Vn].concat(ci))},no=function(Vn){var ai=$t.filter(function(ci){return ci!==Vn});Lt(ai,{type:"remove",values:[Vn]})},ji=function(){Xi.current=!1},Mo=pe.useRef(!1),Ga=function(){pi(!0),Pn||(Ut&&!Mo.current&&Ut.apply(void 0,arguments),Ht.includes("focus")&&Nn(!0)),Mo.current=!0},ya=function(){hi.current=!0,pi(!1,function(){Mo.current=!1,hi.current=!1,Nn(!1)}),!Pn&&(bi&&(Fn==="tags"?er(bi,{source:"submit"}):Fn==="multiple"&&er("",{source:"blur"})),Et&&Et.apply(void 0,arguments))},Qi=[];pe.useEffect(function(){return function(){Qi.forEach(function(or){return clearTimeout(or)}),Qi.splice(0,Qi.length)}},[]);var lo=function(Vn){var ai,ci=Vn.target,Ur=(ai=jr.current)===null||ai===void 0?void 0:ai.getPopupElement();if(Ur&&Ur.contains(ci)){var Jr=setTimeout(function(){var Li=Qi.indexOf(Jr);if(Li!==-1&&Qi.splice(Li,1),Hi(),!dr&&!Ur.contains(document.activeElement)){var Mi;(Mi=ui.current)===null||Mi===void 0||Mi.focus()}});Qi.push(Jr)}for(var Gi=arguments.length,Ii=new Array(Gi>1?Gi-1:0),ro=1;ro<Gi;ro++)Ii[ro-1]=arguments[ro];Gt==null||Gt.apply(void 0,[Vn].concat(Ii))},Oi=pe.useState({}),ba=(0,me.Z)(Oi,2),xa=ba[1];function Ua(){xa({})}var wa;Lr&&(wa=function(Vn){Nn(Vn)}),Qe(function(){var or;return[Ai.current,(or=jr.current)===null||or===void 0?void 0:or.getPopupElement()]},so,Nn,!!Lr);var Va=pe.useMemo(function(){return(0,_e.Z)((0,_e.Z)({},Ee),{},{notFoundContent:yn,open:Kr,triggerOpen:so,id:Ct,showSearch:Kn,multiple:Tn,toggleOpen:Nn})},[Ee,yn,so,Kr,Ct,Kn,Tn,Nn]),Ko=!!Br||Xn,Yo;Ko&&(Yo=pe.createElement(Le,{className:ve()("".concat(We,"-arrow"),(0,Ne.Z)({},"".concat(We,"-arrow-loading"),Xn)),customizeIcon:Br,customizeIconProps:{loading:Xn,searchValue:bi,open:Kr,focused:yi,showSearch:Kn}}));var xo=function(){var Vn;pn==null||pn(),(Vn=ui.current)===null||Vn===void 0||Vn.focus(),Lt([],{type:"clear",values:$t}),Tr("",!1,!1)},Xo=st(We,xo,$t,ur,gr,Pn,bi,Fn),Ca=Xo.allowClear,Jo=Xo.clearIcon,Bo=pe.createElement(ir,{ref:Cr}),Sa=ve()(We,kt,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(We,"-focused"),yi),"".concat(We,"-multiple"),Tn),"".concat(We,"-single"),!Tn),"".concat(We,"-allow-clear"),ur),"".concat(We,"-show-arrow"),Ko),"".concat(We,"-disabled"),Pn),"".concat(We,"-loading"),Xn),"".concat(We,"-open"),Kr),"".concat(We,"-customize-input"),Wi),"".concat(We,"-show-search"),Kn)),Po=pe.createElement(ne,{ref:jr,disabled:Pn,prefixCls:We,visible:so,popupElement:Bo,animation:Jn,transitionName:cr,dropdownStyle:Zr,dropdownClassName:Pr,direction:dn,dropdownMatchSelectWidth:Sr,dropdownRender:ri,dropdownAlign:Dr,placement:li,builtinPlacements:qr,getPopupContainer:_r,empty:An,getTriggerDOMNode:function(Vn){return ii.current||Vn},onPopupVisibleChange:wa,onPopupMouseEnter:Ua},Lr?pe.cloneElement(Lr,{ref:Fi}):pe.createElement(ut,(0,ie.Z)({},Ee,{domRef:ii,prefixCls:We,inputElement:Wi,ref:ui,id:Ct,prefix:mr,showSearch:Kn,autoClearSearchValue:vr,mode:Fn,activeDescendantId:pr,tagRender:rn,values:$t,open:Kr,onToggleOpen:Nn,activeValue:Rr,searchValue:bi,onSearch:Tr,onSearchSubmit:Zi,onRemove:no,tokenWithEnter:jn,onInputBlur:ji}))),xi;return Lr?xi=Po:xi=pe.createElement("div",(0,ie.Z)({className:Sa},nr,{ref:Ai,onMouseDown:lo,onKeyDown:Di,onKeyUp:Ji,onFocus:Ga,onBlur:ya}),pe.createElement(Jt,{visible:yi&&!Kr,values:$t}),Po,Yo,Ca&&Jo),pe.createElement(ct.Provider,{value:Va},xi)}),dt=nn,un=function(){return null};un.isSelectOptGroup=!0;var Zt=un,Qt=function(){return null};Qt.isSelectOption=!0;var ln=Qt,_n=fe(80547),cn=fe(2738),wn=fe(6790);function $n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Zn=["disabled","title","children","style","className"];function Mr(Ee){return typeof Ee=="string"||typeof Ee=="number"}var Nr=function(Fe,Wt){var Ct=vt(),We=Ct.prefixCls,kt=Ct.id,qt=Ct.open,rn=Ct.multiple,dn=Ct.mode,Je=Ct.searchValue,$t=Ct.toggleOpen,Lt=Ct.notFoundContent,An=Ct.onPopupScroll,Xt=pe.useContext(en),yn=Xt.maxCount,pn=Xt.flattenOptions,Fn=Xt.onActiveValue,Pn=Xt.defaultActiveFirstOption,Xn=Xt.onSelect,rr=Xt.menuItemSelectedIcon,Yn=Xt.rawValues,hr=Xt.fieldNames,Hn=Xt.virtual,wr=Xt.direction,Rr=Xt.listHeight,ar=Xt.listItemHeight,pr=Xt.optionRender,Er="".concat(We,"-item"),vr=(0,_n.Z)(function(){return pn},[qt,pn],function(zn,Ht){return Ht[0]&&zn[1]!==Ht[1]}),er=pe.useRef(null),Ar=pe.useMemo(function(){return rn&&Mt(yn)&&(Yn==null?void 0:Yn.size)>=yn},[rn,yn,Yn==null?void 0:Yn.size]),lr=function(Ht){Ht.preventDefault()},ur=function(Ht){var Ut;(Ut=er.current)===null||Ut===void 0||Ut.scrollTo(typeof Ht=="number"?{index:Ht}:Ht)},mr=pe.useCallback(function(zn){return dn==="combobox"?!1:Yn.has(zn)},[dn,(0,ot.Z)(Yn).toString(),Yn.size]),Br=function(Ht){for(var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Et=vr.length,pt=0;pt<Et;pt+=1){var Nt=(Ht+pt*Ut+Et)%Et,Gt=vr[Nt]||{},bn=Gt.group,Tn=Gt.data;if(!bn&&!(Tn!=null&&Tn.disabled)&&(mr(Tn.value)||!Ar))return Nt}return-1},gr=pe.useState(function(){return Br(0)}),ir=(0,me.Z)(gr,2),Jn=ir[0],cr=ir[1],Zr=function(Ht){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;cr(Ht);var Et={source:Ut?"keyboard":"mouse"},pt=vr[Ht];if(!pt){Fn(null,-1,Et);return}Fn(pt.value,Ht,Et)};(0,pe.useEffect)(function(){Zr(Pn!==!1?Br(0):-1)},[vr.length,Je]);var Pr=pe.useCallback(function(zn){return dn==="combobox"?String(zn).toLowerCase()===Je.toLowerCase():Yn.has(zn)},[dn,Je,(0,ot.Z)(Yn).toString(),Yn.size]);(0,pe.useEffect)(function(){var zn=setTimeout(function(){if(!rn&&qt&&Yn.size===1){var Ut=Array.from(Yn)[0],Et=vr.findIndex(function(pt){var Nt=pt.data;return Je?String(Nt.value).startsWith(Je):Nt.value===Ut});Et!==-1&&(Zr(Et),ur(Et))}});if(qt){var Ht;(Ht=er.current)===null||Ht===void 0||Ht.scrollTo(void 0)}return function(){return clearTimeout(zn)}},[qt,Je]);var Sr=function(Ht){Ht!==void 0&&Xn(Ht,{selected:!Yn.has(Ht)}),rn||$t(!1)};if(pe.useImperativeHandle(Wt,function(){return{onKeyDown:function(Ht){var Ut=Ht.which,Et=Ht.ctrlKey;switch(Ut){case Ve.Z.N:case Ve.Z.P:case Ve.Z.UP:case Ve.Z.DOWN:{var pt=0;if(Ut===Ve.Z.UP?pt=-1:Ut===Ve.Z.DOWN?pt=1:$n()&&Et&&(Ut===Ve.Z.N?pt=1:Ut===Ve.Z.P&&(pt=-1)),pt!==0){var Nt=Br(Jn+pt,pt);ur(Nt),Zr(Nt,!0)}break}case Ve.Z.TAB:case Ve.Z.ENTER:{var Gt,bn=vr[Jn];bn&&!(bn!=null&&(Gt=bn.data)!==null&&Gt!==void 0&&Gt.disabled)&&!Ar?Sr(bn.value):Sr(void 0),qt&&Ht.preventDefault();break}case Ve.Z.ESC:$t(!1),qt&&Ht.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ht){ur(Ht)}}}),vr.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(kt,"_list"),className:"".concat(Er,"-empty"),onMouseDown:lr},Lt);var ri=Object.keys(hr).map(function(zn){return hr[zn]}),Dr=function(Ht){return Ht.label};function li(zn,Ht){var Ut=zn.group;return{role:Ut?"presentation":"option",id:"".concat(kt,"_list_").concat(Ht)}}var qr=function(Ht){var Ut=vr[Ht];if(!Ut)return null;var Et=Ut.data||{},pt=Et.value,Nt=Ut.group,Gt=(0,Ye.Z)(Et,!0),bn=Dr(Ut);return Ut?pe.createElement("div",(0,ie.Z)({"aria-label":typeof bn=="string"&&!Nt?bn:null},Gt,{key:Ht},li(Ut,Ht),{"aria-selected":Pr(pt)}),pt):null},_r={role:"listbox",id:"".concat(kt,"_list")};return pe.createElement(pe.Fragment,null,Hn&&pe.createElement("div",(0,ie.Z)({},_r,{style:{height:0,width:0,overflow:"hidden"}}),qr(Jn-1),qr(Jn),qr(Jn+1)),pe.createElement(wn.Z,{itemKey:"key",ref:er,data:vr,height:Rr,itemHeight:ar,fullHeight:!1,onMouseDown:lr,onScroll:An,virtual:Hn,direction:wr,innerProps:Hn?null:_r},function(zn,Ht){var Ut=zn.group,Et=zn.groupOption,pt=zn.data,Nt=zn.label,Gt=zn.value,bn=pt.key;if(Ut){var Tn,Kn=(Tn=pt.title)!==null&&Tn!==void 0?Tn:Mr(Nt)?Nt.toString():void 0;return pe.createElement("div",{className:ve()(Er,"".concat(Er,"-group"),pt.className),title:Kn},Nt!==void 0?Nt:bn)}var nr=pt.disabled,Qn=pt.title,yr=pt.children,dr=pt.style,Or=pt.className,Ai=(0,ge.Z)(pt,Zn),ii=(0,cn.Z)(Ai,ri),jr=mr(Gt),ui=nr||!jr&&Ar,Cr="".concat(Er,"-option"),hi=ve()(Er,Cr,Or,(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({},"".concat(Cr,"-grouped"),Et),"".concat(Cr,"-active"),Jn===Ht&&!ui),"".concat(Cr,"-disabled"),ui),"".concat(Cr,"-selected"),jr)),Ti=Dr(zn),br=!rr||typeof rr=="function"||jr,yi=typeof Ti=="number"?Ti:Ti||Gt,pi=Mr(yi)?yi.toString():void 0;return Qn!==void 0&&(pi=Qn),pe.createElement("div",(0,ie.Z)({},(0,Ye.Z)(ii),Hn?{}:li(zn,Ht),{"aria-selected":Pr(Gt),className:hi,title:pi,onMouseMove:function(){Jn===Ht||ui||Zr(Ht)},onClick:function(){ui||Sr(Gt)},style:dr}),pe.createElement("div",{className:"".concat(Cr,"-content")},typeof pr=="function"?pr(zn,{index:Ht}):yi),pe.isValidElement(rr)||jr,br&&pe.createElement(Le,{className:"".concat(Er,"-option-state"),customizeIcon:rr,customizeIconProps:{value:Gt,disabled:ui,isSelected:jr}},jr?"\u2713":null))}))},sr=pe.forwardRef(Nr),Gn=sr,fn=function(Ee,Fe){var Wt=pe.useRef({values:new Map,options:new Map}),Ct=pe.useMemo(function(){var kt=Wt.current,qt=kt.values,rn=kt.options,dn=Ee.map(function(Lt){if(Lt.label===void 0){var An;return(0,_e.Z)((0,_e.Z)({},Lt),{},{label:(An=qt.get(Lt.value))===null||An===void 0?void 0:An.label})}return Lt}),Je=new Map,$t=new Map;return dn.forEach(function(Lt){Je.set(Lt.value,Lt),$t.set(Lt.value,Fe.get(Lt.value)||rn.get(Lt.value))}),Wt.current.values=Je,Wt.current.options=$t,dn},[Ee,Fe]),We=pe.useCallback(function(kt){return Fe.get(kt)||Wt.current.options.get(kt)},[Fe]);return[Ct,We]};function Wn(Ee,Fe){return yt(Ee).join("").toUpperCase().includes(Fe)}var Un=function(Ee,Fe,Wt,Ct,We){return pe.useMemo(function(){if(!Wt||Ct===!1)return Ee;var kt=Fe.options,qt=Fe.label,rn=Fe.value,dn=[],Je=typeof Ct=="function",$t=Wt.toUpperCase(),Lt=Je?Ct:function(Xt,yn){return We?Wn(yn[We],$t):yn[kt]?Wn(yn[qt!=="children"?qt:"label"],$t):Wn(yn[rn],$t)},An=Je?function(Xt){return Dt(Xt)}:function(Xt){return Xt};return Ee.forEach(function(Xt){if(Xt[kt]){var yn=Lt(Wt,An(Xt));if(yn)dn.push(Xt);else{var pn=Xt[kt].filter(function(Fn){return Lt(Wt,An(Fn))});pn.length&&dn.push((0,_e.Z)((0,_e.Z)({},Xt),{},(0,Ne.Z)({},kt,pn)))}return}Lt(Wt,An(Xt))&&dn.push(Xt)}),dn},[Ee,Ct,We,Wt,Fe])},En=fe(6551),tr=fe(11592),ft=["children","value"],gt=["children"];function xt(Ee){var Fe=Ee,Wt=Fe.key,Ct=Fe.props,We=Ct.children,kt=Ct.value,qt=(0,ge.Z)(Ct,ft);return(0,_e.Z)({key:Wt,value:kt!==void 0?kt:Wt,children:We},qt)}function _t(Ee){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,tr.Z)(Ee).map(function(Wt,Ct){if(!pe.isValidElement(Wt)||!Wt.type)return null;var We=Wt,kt=We.type.isSelectOptGroup,qt=We.key,rn=We.props,dn=rn.children,Je=(0,ge.Z)(rn,gt);return Fe||!kt?xt(Wt):(0,_e.Z)((0,_e.Z)({key:"__RC_SELECT_GRP__".concat(qt===null?Ct:qt,"__"),label:qt},Je),{},{options:_t(dn)})}).filter(function(Wt){return Wt})}var Cn=function(Fe,Wt,Ct,We,kt){return pe.useMemo(function(){var qt=Fe,rn=!Fe;rn&&(qt=_t(Wt));var dn=new Map,Je=new Map,$t=function(Xt,yn,pn){pn&&typeof pn=="string"&&Xt.set(yn[pn],yn)},Lt=function An(Xt){for(var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pn=0;pn<Xt.length;pn+=1){var Fn=Xt[pn];!Fn[Ct.options]||yn?(dn.set(Fn[Ct.value],Fn),$t(Je,Fn,Ct.label),$t(Je,Fn,We),$t(Je,Fn,kt)):An(Fn[Ct.options],!0)}};return Lt(qt),{options:qt,valueOptions:dn,labelOptions:Je}},[Fe,Wt,Ct,We,kt])},mn=Cn;function tn(Ee){var Fe=pe.useRef();Fe.current=Ee;var Wt=pe.useCallback(function(){return Fe.current.apply(Fe,arguments)},[]);return Wt}function Ln(Ee){var Fe=Ee.mode,Wt=Ee.options,Ct=Ee.children,We=Ee.backfill,kt=Ee.allowClear,qt=Ee.placeholder,rn=Ee.getInputElement,dn=Ee.showSearch,Je=Ee.onSearch,$t=Ee.defaultOpen,Lt=Ee.autoFocus,An=Ee.labelInValue,Xt=Ee.value,yn=Ee.inputValue,pn=Ee.optionLabelProp,Fn=isMultiple(Fe),Pn=dn!==void 0?dn:Fn||Fe==="combobox",Xn=Wt||convertChildrenToData(Ct);if(warning(Fe!=="tags"||Xn.every(function(Hn){return!Hn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Fe==="tags"||Fe==="combobox"){var rr=Xn.some(function(Hn){return Hn.options?Hn.options.some(function(wr){return typeof("value"in wr?wr.value:wr.key)=="number"}):typeof("value"in Hn?Hn.value:Hn.key)=="number"});warning(!rr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Fe!=="combobox"||!pn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Fe==="combobox"||!We,"`backfill` only works with `combobox` mode."),warning(Fe==="combobox"||!rn,"`getInputElement` only work with `combobox` mode."),noteOnce(Fe!=="combobox"||!rn||!kt||!qt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Je&&!Pn&&Fe!=="combobox"&&Fe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!$t||Lt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Xt!=null){var Yn=toArray(Xt);warning(!An||Yn.every(function(Hn){return _typeof(Hn)==="object"&&("key"in Hn||"value"in Hn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Fn||Array.isArray(Xt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ct){var hr=null;toNodeArray(Ct).some(function(Hn){if(!React.isValidElement(Hn)||!Hn.type)return!1;var wr=Hn,Rr=wr.type;if(Rr.isSelectOption)return!1;if(Rr.isSelectOptGroup){var ar=toNodeArray(Hn.props.children).every(function(pr){return!React.isValidElement(pr)||!Hn.type||pr.type.isSelectOption?!0:(hr=pr.type,!1)});return!ar}return hr=Rr,!0}),hr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(hr.displayName||hr.name||hr,"`.")),warning(yn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Mn(Ee,Fe){if(Ee){var Wt=function Ct(We){for(var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qt=0;qt<We.length;qt++){var rn=We[qt];if(rn[Fe==null?void 0:Fe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!kt&&Array.isArray(rn[Fe==null?void 0:Fe.options])&&Ct(rn[Fe==null?void 0:Fe.options],!0))break}};Wt(Ee)}}var kn=null,xn=["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"],Bn=["inputValue"];function Ft(Ee){return!Ee||(0,Ae.Z)(Ee)!=="object"}var nt=pe.forwardRef(function(Ee,Fe){var Wt=Ee.id,Ct=Ee.mode,We=Ee.prefixCls,kt=We===void 0?"rc-select":We,qt=Ee.backfill,rn=Ee.fieldNames,dn=Ee.inputValue,Je=Ee.searchValue,$t=Ee.onSearch,Lt=Ee.autoClearSearchValue,An=Lt===void 0?!0:Lt,Xt=Ee.onSelect,yn=Ee.onDeselect,pn=Ee.dropdownMatchSelectWidth,Fn=pn===void 0?!0:pn,Pn=Ee.filterOption,Xn=Ee.filterSort,rr=Ee.optionFilterProp,Yn=Ee.optionLabelProp,hr=Ee.options,Hn=Ee.optionRender,wr=Ee.children,Rr=Ee.defaultActiveFirstOption,ar=Ee.menuItemSelectedIcon,pr=Ee.virtual,Er=Ee.direction,vr=Ee.listHeight,er=vr===void 0?200:vr,Ar=Ee.listItemHeight,lr=Ar===void 0?20:Ar,ur=Ee.labelRender,mr=Ee.value,Br=Ee.defaultValue,gr=Ee.labelInValue,ir=Ee.onChange,Jn=Ee.maxCount,cr=(0,ge.Z)(Ee,xn),Zr=(0,En.ZP)(Wt),Pr=Vt(Ct),Sr=!!(!hr&&wr),ri=pe.useMemo(function(){return Pn===void 0&&Ct==="combobox"?!1:Pn},[Pn,Ct]),Dr=pe.useMemo(function(){return St(rn,Sr)},[JSON.stringify(rn),Sr]),li=(0,Ie.Z)("",{value:Je!==void 0?Je:dn,postState:function(jn){return jn||""}}),qr=(0,me.Z)(li,2),_r=qr[0],zn=qr[1],Ht=mn(hr,wr,Dr,rr,Yn),Ut=Ht.valueOptions,Et=Ht.labelOptions,pt=Ht.options,Nt=pe.useCallback(function(Nn){var jn=yt(Nn);return jn.map(function(On){var In,fr,Tr,Zi,vi;if(Ft(On))In=On;else{var oi;Tr=On.key,fr=On.label,In=(oi=On.value)!==null&&oi!==void 0?oi:Tr}var Gr=Ut.get(In);if(Gr){var _i;if(fr===void 0&&(fr=Gr==null?void 0:Gr[Yn||Dr.label]),Tr===void 0&&(Tr=(_i=Gr==null?void 0:Gr.key)!==null&&_i!==void 0?_i:In),Zi=Gr==null?void 0:Gr.disabled,vi=Gr==null?void 0:Gr.title,0)var Xi}return{label:fr,value:In,key:Tr,disabled:Zi,title:vi}})},[Dr,Yn,Ut]),Gt=(0,Ie.Z)(Br,{value:mr}),bn=(0,me.Z)(Gt,2),Tn=bn[0],Kn=bn[1],nr=pe.useMemo(function(){var Nn,jn=Pr&&Tn===null?[]:Tn,On=Nt(jn);return Ct==="combobox"&&ue((Nn=On[0])===null||Nn===void 0?void 0:Nn.value)?[]:On},[Tn,Nt,Ct,Pr]),Qn=fn(nr,Ut),yr=(0,me.Z)(Qn,2),dr=yr[0],Or=yr[1],Ai=pe.useMemo(function(){if(!Ct&&dr.length===1){var Nn=dr[0];if(Nn.value===null&&(Nn.label===null||Nn.label===void 0))return[]}return dr.map(function(jn){var On;return(0,_e.Z)((0,_e.Z)({},jn),{},{label:(On=typeof ur=="function"?ur(jn):jn.label)!==null&&On!==void 0?On:jn.value})})},[Ct,dr,ur]),ii=pe.useMemo(function(){return new Set(dr.map(function(Nn){return Nn.value}))},[dr]);pe.useEffect(function(){if(Ct==="combobox"){var Nn,jn=(Nn=dr[0])===null||Nn===void 0?void 0:Nn.value;zn(he(jn)?String(jn):"")}},[dr]);var jr=tn(function(Nn,jn){var On=jn!=null?jn:Nn;return(0,Ne.Z)((0,Ne.Z)({},Dr.value,Nn),Dr.label,On)}),ui=pe.useMemo(function(){if(Ct!=="tags")return pt;var Nn=(0,ot.Z)(pt),jn=function(In){return Ut.has(In)};return(0,ot.Z)(dr).sort(function(On,In){return On.value<In.value?-1:1}).forEach(function(On){var In=On.value;jn(In)||Nn.push(jr(In,On.label))}),Nn},[jr,pt,Ut,dr,Ct]),Cr=Un(ui,Dr,_r,ri,rr),hi=pe.useMemo(function(){return Ct!=="tags"||!_r||Cr.some(function(Nn){return Nn[rr||"value"]===_r})||Cr.some(function(Nn){return Nn[Dr.value]===_r})?Cr:[jr(_r)].concat((0,ot.Z)(Cr))},[jr,rr,Ct,Cr,_r,Dr]),Ti=function Nn(jn){var On=(0,ot.Z)(jn).sort(function(In,fr){return Xn(In,fr,{searchValue:_r})});return On.map(function(In){return Array.isArray(In.options)?(0,_e.Z)((0,_e.Z)({},In),{},{options:In.options.length>0?Nn(In.options):In.options}):In})},br=pe.useMemo(function(){return Xn?Ti(hi):hi},[hi,Xn,_r]),yi=pe.useMemo(function(){return wt(br,{fieldNames:Dr,childrenAsData:Sr})},[br,Dr,Sr]),pi=function(jn){var On=Nt(jn);if(Kn(On),ir&&(On.length!==dr.length||On.some(function(Tr,Zi){var vi;return((vi=dr[Zi])===null||vi===void 0?void 0:vi.value)!==(Tr==null?void 0:Tr.value)}))){var In=gr?On:On.map(function(Tr){return Tr.value}),fr=On.map(function(Tr){return Dt(Or(Tr.value))});ir(Pr?In:In[0],Pr?fr:fr[0])}},Hi=pe.useState(null),bi=(0,me.Z)(Hi,2),Wi=bi[0],Lr=bi[1],Fi=pe.useState(0),$i=(0,me.Z)(Fi,2),eo=$i[0],Vo=$i[1],Yi=Rr!==void 0?Rr:Ct!=="combobox",Wr=pe.useCallback(function(Nn,jn){var On=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},In=On.source,fr=In===void 0?"keyboard":In;Vo(jn),qt&&Ct==="combobox"&&Nn!==null&&fr==="keyboard"&&Lr(String(Nn))},[qt,Ct]),to=function(jn,On,In){var fr=function(){var no,ji=Or(jn);return[gr?{label:ji==null?void 0:ji[Dr.label],value:jn,key:(no=ji==null?void 0:ji.key)!==null&&no!==void 0?no:jn}:jn,Dt(ji)]};if(On&&Xt){var Tr=fr(),Zi=(0,me.Z)(Tr,2),vi=Zi[0],oi=Zi[1];Xt(vi,oi)}else if(!On&&yn&&In!=="clear"){var Gr=fr(),_i=(0,me.Z)(Gr,2),Xi=_i[0],Di=_i[1];yn(Xi,Di)}},ao=tn(function(Nn,jn){var On,In=Pr?jn.selected:!0;In?On=Pr?[].concat((0,ot.Z)(dr),[Nn]):[Nn]:On=dr.filter(function(fr){return fr.value!==Nn}),pi(On),to(Nn,In),Ct==="combobox"?Lr(""):(!Vt||An)&&(zn(""),Lr(""))}),zi=function(jn,On){pi(jn);var In=On.type,fr=On.values;(In==="remove"||In==="clear")&&fr.forEach(function(Tr){to(Tr.value,!1,In)})},Kr=function(jn,On){if(zn(jn),Lr(null),On.source==="submit"){var In=(jn||"").trim();if(In){var fr=Array.from(new Set([].concat((0,ot.Z)(ii),[In])));pi(fr),to(In,!0),zn("")}return}On.source!=="blur"&&(Ct==="combobox"&&pi(jn),$t==null||$t(jn))},bo=function(jn){var On=jn;Ct!=="tags"&&(On=jn.map(function(fr){var Tr=Et.get(fr);return Tr==null?void 0:Tr.value}).filter(function(fr){return fr!==void 0}));var In=Array.from(new Set([].concat((0,ot.Z)(ii),(0,ot.Z)(On))));pi(In),In.forEach(function(fr){to(fr,!0)})},so=pe.useMemo(function(){var Nn=pr!==!1&&Fn!==!1;return(0,_e.Z)((0,_e.Z)({},Ht),{},{flattenOptions:yi,onActiveValue:Wr,defaultActiveFirstOption:Yi,onSelect:ao,menuItemSelectedIcon:ar,rawValues:ii,fieldNames:Dr,virtual:Nn,direction:Er,listHeight:er,listItemHeight:lr,childrenAsData:Sr,maxCount:Jn,optionRender:Hn})},[Jn,Ht,yi,Wr,Yi,ao,ar,ii,Dr,pr,Fn,Er,er,lr,Sr,Hn]);return pe.createElement(en.Provider,{value:so},pe.createElement(dt,(0,ie.Z)({},cr,{id:Zr,prefixCls:kt,ref:Fe,omitDomProps:Bn,mode:Ct,displayValues:Ai,onDisplayValuesChange:zi,direction:Er,searchValue:_r,onSearch:Kr,autoClearSearchValue:An,onSearchSplit:bo,dropdownMatchSelectWidth:Fn,OptionList:Gn,emptyOptions:!yi.length,activeValue:Wi,activeDescendantId:"".concat(Zr,"_list_").concat(eo)})))}),Yt=nt;Yt.Option=ln,Yt.OptGroup=Zt;var gn=Yt,Sn=gn},63158:function(Pt,Ot,fe){"use strict";var ie=fe(32855),ot=fe(74430),Ne=fe(11913),_e=fe(43079),me=fe(59301),ge=fe(92310),Ae=fe.n(ge),Ie=fe(18929),we=fe(10228),pe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],it=me.forwardRef(function(ve,ht){var Oe,De=ve.prefixCls,Re=De===void 0?"rc-switch":De,Le=ve.className,st=ve.checked,ct=ve.defaultChecked,vt=ve.disabled,Ue=ve.loadingIcon,ze=ve.checkedChildren,Qe=ve.unCheckedChildren,Ve=ve.onClick,It=ve.onChange,Ye=ve.onKeyDown,Ze=(0,_e.Z)(ve,pe),at=(0,Ie.Z)(!1,{value:st,defaultValue:ct}),Me=(0,Ne.Z)(at,2),Ge=Me[0],Ce=Me[1];function He($e,he){var ue=Ge;return vt||(ue=$e,Ce(ue),It==null||It(ue,he)),ue}function Tt($e){$e.which===we.Z.LEFT?He(!1,$e):$e.which===we.Z.RIGHT&&He(!0,$e),Ye==null||Ye($e)}function yt($e){var he=He(!Ge,$e);Ve==null||Ve(he,$e)}var lt=Ae()(Re,Le,(Oe={},(0,ot.Z)(Oe,"".concat(Re,"-checked"),Ge),(0,ot.Z)(Oe,"".concat(Re,"-disabled"),vt),Oe));return me.createElement("button",(0,ie.Z)({},Ze,{type:"button",role:"switch","aria-checked":Ge,disabled:vt,className:lt,ref:ht,onKeyDown:Tt,onClick:yt}),Ue,me.createElement("span",{className:"".concat(Re,"-inner")},me.createElement("span",{className:"".concat(Re,"-inner-checked")},ze),me.createElement("span",{className:"".concat(Re,"-inner-unchecked")},Qe)))});it.displayName="Switch",Ot.Z=it},22711:function(Pt,Ot,fe){"use strict";fe.r(Ot),fe.d(Ot,{ResizableTextArea:function(){return Me},default:function(){return Tt}});var ie=fe(32855),ot=fe(74430),Ne=fe(27247),_e=fe(3300),me=fe(11913),ge=fe(43079),Ae=fe(92310),Ie=fe.n(Ae),we=fe(36901),pe=fe(66003),it=fe(30292),ve=fe(18929),ht=fe(59301),Oe=fe(34666),De=fe(29301),Re=fe(34280),Le=fe(16089),st=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,ct=["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"],vt={},Ue;function ze(yt){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$e=yt.getAttribute("id")||yt.getAttribute("data-reactid")||yt.getAttribute("name");if(lt&&vt[$e])return vt[$e];var he=window.getComputedStyle(yt),ue=he.getPropertyValue("box-sizing")||he.getPropertyValue("-moz-box-sizing")||he.getPropertyValue("-webkit-box-sizing"),Be=parseFloat(he.getPropertyValue("padding-bottom"))+parseFloat(he.getPropertyValue("padding-top")),rt=parseFloat(he.getPropertyValue("border-bottom-width"))+parseFloat(he.getPropertyValue("border-top-width")),qe=ct.map(function(Pe){return"".concat(Pe,":").concat(he.getPropertyValue(Pe))}).join(";"),ye={sizingStyle:qe,paddingSize:Be,borderSize:rt,boxSizing:ue};return lt&&$e&&(vt[$e]=ye),ye}function Qe(yt){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ue||(Ue=document.createElement("textarea"),Ue.setAttribute("tab-index","-1"),Ue.setAttribute("aria-hidden","true"),Ue.setAttribute("name","hiddenTextarea"),document.body.appendChild(Ue)),yt.getAttribute("wrap")?Ue.setAttribute("wrap",yt.getAttribute("wrap")):Ue.removeAttribute("wrap");var ue=ze(yt,lt),Be=ue.paddingSize,rt=ue.borderSize,qe=ue.boxSizing,ye=ue.sizingStyle;Ue.setAttribute("style","".concat(ye,";").concat(st)),Ue.value=yt.value||yt.placeholder||"";var Pe=void 0,Te=void 0,bt,Ke=Ue.scrollHeight;if(qe==="border-box"?Ke+=rt:qe==="content-box"&&(Ke-=Be),$e!==null||he!==null){Ue.value=" ";var mt=Ue.scrollHeight-Be;$e!==null&&(Pe=mt*$e,qe==="border-box"&&(Pe=Pe+Be+rt),Ke=Math.max(Pe,Ke)),he!==null&&(Te=mt*he,qe==="border-box"&&(Te=Te+Be+rt),bt=Ke>Te?"":"hidden",Ke=Math.min(Te,Ke))}var ke={height:Ke,overflowY:bt,resize:"none"};return Pe&&(ke.minHeight=Pe),Te&&(ke.maxHeight=Te),ke}var Ve=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],It=0,Ye=1,Ze=2,at=ht.forwardRef(function(yt,lt){var $e=yt,he=$e.prefixCls,ue=$e.defaultValue,Be=$e.value,rt=$e.autoSize,qe=$e.onResize,ye=$e.className,Pe=$e.style,Te=$e.disabled,bt=$e.onChange,Ke=$e.onInternalAutoSize,mt=(0,ge.Z)($e,Ve),ke=(0,ve.Z)(ue,{value:Be,postState:function(ln){return ln!=null?ln:""}}),tt=(0,me.Z)(ke,2),ut=tt[0],ae=tt[1],te=function(ln){ae(ln.target.value),bt==null||bt(ln)},z=ht.useRef();ht.useImperativeHandle(lt,function(){return{textArea:z.current}});var re=ht.useMemo(function(){return rt&&(0,Oe.Z)(rt)==="object"?[rt.minRows,rt.maxRows]:[]},[rt]),le=(0,me.Z)(re,2),ne=le[0],be=le[1],je=!!rt,Mt=function(){try{if(document.activeElement===z.current){var ln=z.current,_n=ln.selectionStart,cn=ln.selectionEnd,wn=ln.scrollTop;z.current.setSelectionRange(_n,cn),z.current.scrollTop=wn}}catch($n){}},St=ht.useState(Ze),wt=(0,me.Z)(St,2),Dt=wt[0],jt=wt[1],zt=ht.useState(),en=(0,me.Z)(zt,2),Jt=en[0],Bt=en[1],sn=function(){jt(It)};(0,Re.Z)(function(){je&&sn()},[Be,ne,be,je]),(0,Re.Z)(function(){if(Dt===It)jt(Ye);else if(Dt===Ye){var Qt=Qe(z.current,!1,ne,be);jt(Ze),Bt(Qt)}else Mt()},[Dt]);var Vt=ht.useRef(),nn=function(){Le.Z.cancel(Vt.current)},dt=function(ln){Dt===Ze&&(qe==null||qe(ln),rt&&(nn(),Vt.current=(0,Le.Z)(function(){sn()})))};ht.useEffect(function(){return nn},[]);var un=je?Jt:null,Zt=(0,Ne.Z)((0,Ne.Z)({},Pe),un);return(Dt===It||Dt===Ye)&&(Zt.overflowY="hidden",Zt.overflowX="hidden"),ht.createElement(De.Z,{onResize:dt,disabled:!(rt||qe)},ht.createElement("textarea",(0,ie.Z)({},mt,{ref:z,style:Zt,className:Ie()(he,ye,(0,ot.Z)({},"".concat(he,"-disabled"),Te)),disabled:Te,value:ut,onChange:te})))}),Me=at,Ge=["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"],Ce=ht.forwardRef(function(yt,lt){var $e,he=yt.defaultValue,ue=yt.value,Be=yt.onFocus,rt=yt.onBlur,qe=yt.onChange,ye=yt.allowClear,Pe=yt.maxLength,Te=yt.onCompositionStart,bt=yt.onCompositionEnd,Ke=yt.suffix,mt=yt.prefixCls,ke=mt===void 0?"rc-textarea":mt,tt=yt.showCount,ut=yt.count,ae=yt.className,te=yt.style,z=yt.disabled,re=yt.hidden,le=yt.classNames,ne=yt.styles,be=yt.onResize,je=yt.onClear,Mt=yt.onPressEnter,St=yt.readOnly,wt=yt.autoSize,Dt=yt.onKeyDown,jt=(0,ge.Z)(yt,Ge),zt=(0,ve.Z)(he,{value:ue,defaultValue:he}),en=(0,me.Z)(zt,2),Jt=en[0],Bt=en[1],sn=Jt==null?"":String(Jt),Vt=ht.useState(!1),nn=(0,me.Z)(Vt,2),dt=nn[0],un=nn[1],Zt=ht.useRef(!1),Qt=ht.useState(null),ln=(0,me.Z)(Qt,2),_n=ln[0],cn=ln[1],wn=(0,ht.useRef)(null),$n=(0,ht.useRef)(null),Zn=function(){var Yt;return(Yt=$n.current)===null||Yt===void 0?void 0:Yt.textArea},Mr=function(){Zn().focus()};(0,ht.useImperativeHandle)(lt,function(){var nt;return{resizableTextArea:$n.current,focus:Mr,blur:function(){Zn().blur()},nativeElement:((nt=wn.current)===null||nt===void 0?void 0:nt.nativeElement)||Zn()}}),(0,ht.useEffect)(function(){un(function(nt){return!z&&nt})},[z]);var Nr=ht.useState(null),sr=(0,me.Z)(Nr,2),Gn=sr[0],fn=sr[1];ht.useEffect(function(){if(Gn){var nt;(nt=Zn()).setSelectionRange.apply(nt,(0,_e.Z)(Gn))}},[Gn]);var Wn=(0,pe.Z)(ut,tt),Un=($e=Wn.max)!==null&&$e!==void 0?$e:Pe,En=Number(Un)>0,tr=Wn.strategy(sn),ft=!!Un&&tr>Un,gt=function(Yt,gn){var Sn=gn;!Zt.current&&Wn.exceedFormatter&&Wn.max&&Wn.strategy(gn)>Wn.max&&(Sn=Wn.exceedFormatter(gn,{max:Wn.max}),gn!==Sn&&fn([Zn().selectionStart||0,Zn().selectionEnd||0])),Bt(Sn),(0,it.rJ)(Yt.currentTarget,Yt,qe,Sn)},xt=function(Yt){Zt.current=!0,Te==null||Te(Yt)},_t=function(Yt){Zt.current=!1,gt(Yt,Yt.currentTarget.value),bt==null||bt(Yt)},Cn=function(Yt){gt(Yt,Yt.target.value)},mn=function(Yt){Yt.key==="Enter"&&Mt&&Mt(Yt),Dt==null||Dt(Yt)},tn=function(Yt){un(!0),Be==null||Be(Yt)},Ln=function(Yt){un(!1),rt==null||rt(Yt)},Mn=function(Yt){Bt(""),Mr(),(0,it.rJ)(Zn(),Yt,qe)},kn=Ke,xn;Wn.show&&(Wn.showFormatter?xn=Wn.showFormatter({value:sn,count:tr,maxLength:Un}):xn="".concat(tr).concat(En?" / ".concat(Un):""),kn=ht.createElement(ht.Fragment,null,kn,ht.createElement("span",{className:Ie()("".concat(ke,"-data-count"),le==null?void 0:le.count),style:ne==null?void 0:ne.count},xn)));var Bn=function(Yt){var gn;be==null||be(Yt),(gn=Zn())!==null&&gn!==void 0&&gn.style.height&&cn(!0)},Ft=!wt&&!tt&&!ye;return ht.createElement(we.BaseInput,{ref:wn,value:sn,allowClear:ye,handleReset:Mn,suffix:kn,prefixCls:ke,classNames:(0,Ne.Z)((0,Ne.Z)({},le),{},{affixWrapper:Ie()(le==null?void 0:le.affixWrapper,(0,ot.Z)((0,ot.Z)({},"".concat(ke,"-show-count"),tt),"".concat(ke,"-textarea-allow-clear"),ye))}),disabled:z,focused:dt,className:Ie()(ae,ft&&"".concat(ke,"-out-of-range")),style:(0,Ne.Z)((0,Ne.Z)({},te),_n&&!Ft?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof xn=="string"?xn:void 0}},hidden:re,readOnly:St,onClear:je},ht.createElement(Me,(0,ie.Z)({},jt,{autoSize:wt,maxLength:Pe,onKeyDown:mn,onChange:Cn,onFocus:tn,onBlur:Ln,onCompositionStart:xt,onCompositionEnd:_t,className:Ie()(le==null?void 0:le.textarea),style:(0,Ne.Z)((0,Ne.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:ke,onResize:Bn,ref:$n,readOnly:St})))}),He=Ce,Tt=He},90472:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return yt}});var ie=fe(32855),ot=fe(33377),Ne=fe(93912),_e=fe(83383),me=fe(18881),ge=fe(85461),Ae=fe(74430),Ie=fe(59301),we=fe(27247),pe=fe(43079),it=fe(34666),ve=fe(13932),ht=fe(68702),Oe=fe(3300),De=fe(92310),Re=fe.n(De),Le=fe(26112),st=fe(48736),ct=function(lt,$e){if(lt&&$e){var he=Array.isArray($e)?$e:$e.split(","),ue=lt.name||"",Be=lt.type||"",rt=Be.replace(/\/.*$/,"");return he.some(function(qe){var ye=qe.trim();if(/^\*(\/\*)?$/.test(qe))return!0;if(ye.charAt(0)==="."){var Pe=ue.toLowerCase(),Te=ye.toLowerCase(),bt=[Te];return(Te===".jpg"||Te===".jpeg")&&(bt=[".jpg",".jpeg"]),bt.some(function(Ke){return Pe.endsWith(Ke)})}return/\/\*$/.test(ye)?rt===ye.replace(/\/.*$/,""):Be===ye?!0:/^\w+$/.test(ye)?((0,st.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ye,"'.Skip for check.")),!0):!1})}return!0};function vt(lt,$e){var he="cannot ".concat(lt.method," ").concat(lt.action," ").concat($e.status,"'"),ue=new Error(he);return ue.status=$e.status,ue.method=lt.method,ue.url=lt.action,ue}function Ue(lt){var $e=lt.responseText||lt.response;if(!$e)return $e;try{return JSON.parse($e)}catch(he){return $e}}function ze(lt){var $e=new XMLHttpRequest;lt.onProgress&&$e.upload&&($e.upload.onprogress=function(rt){rt.total>0&&(rt.percent=rt.loaded/rt.total*100),lt.onProgress(rt)});var he=new FormData;lt.data&&Object.keys(lt.data).forEach(function(Be){var rt=lt.data[Be];if(Array.isArray(rt)){rt.forEach(function(qe){he.append("".concat(Be,"[]"),qe)});return}he.append(Be,rt)}),lt.file instanceof Blob?he.append(lt.filename,lt.file,lt.file.name):he.append(lt.filename,lt.file),$e.onerror=function(rt){lt.onError(rt)},$e.onload=function(){return $e.status<200||$e.status>=300?lt.onError(vt(lt,$e),Ue($e)):lt.onSuccess(Ue($e),$e)},$e.open(lt.method,lt.action,!0),lt.withCredentials&&"withCredentials"in $e&&($e.withCredentials=!0);var ue=lt.headers||{};return ue["X-Requested-With"]!==null&&$e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ue).forEach(function(Be){ue[Be]!==null&&$e.setRequestHeader(Be,ue[Be])}),$e.send(he),{abort:function(){$e.abort()}}}var Qe=function(){var lt=(0,ht.Z)((0,ve.Z)().mark(function $e(he,ue){var Be,rt,qe,ye,Pe,Te,bt,Ke;return(0,ve.Z)().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:Te=function(){return Te=(0,ht.Z)((0,ve.Z)().mark(function ut(ae){return(0,ve.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",new Promise(function(re){ae.file(function(le){ue(le)?(ae.fullPath&&!le.webkitRelativePath&&(Object.defineProperties(le,{webkitRelativePath:{writable:!0}}),le.webkitRelativePath=ae.fullPath.replace(/^\//,""),Object.defineProperties(le,{webkitRelativePath:{writable:!1}})),re(le)):re(null)})}));case 1:case"end":return z.stop()}},ut)})),Te.apply(this,arguments)},Pe=function(ut){return Te.apply(this,arguments)},ye=function(){return ye=(0,ht.Z)((0,ve.Z)().mark(function ut(ae){var te,z,re,le,ne;return(0,ve.Z)().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:te=ae.createReader(),z=[];case 2:return je.next=5,new Promise(function(Mt){te.readEntries(Mt,function(){return Mt([])})});case 5:if(re=je.sent,le=re.length,le){je.next=9;break}return je.abrupt("break",12);case 9:for(ne=0;ne<le;ne++)z.push(re[ne]);je.next=2;break;case 12:return je.abrupt("return",z);case 13:case"end":return je.stop()}},ut)})),ye.apply(this,arguments)},qe=function(ut){return ye.apply(this,arguments)},Be=[],rt=[],he.forEach(function(tt){return rt.push(tt.webkitGetAsEntry())}),bt=function(){var tt=(0,ht.Z)((0,ve.Z)().mark(function ut(ae,te){var z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(ae){ne.next=2;break}return ne.abrupt("return");case 2:if(ae.path=te||"",!ae.isFile){ne.next=10;break}return ne.next=6,Pe(ae);case 6:z=ne.sent,z&&Be.push(z),ne.next=15;break;case 10:if(!ae.isDirectory){ne.next=15;break}return ne.next=13,qe(ae);case 13:re=ne.sent,rt.push.apply(rt,(0,Oe.Z)(re));case 15:case"end":return ne.stop()}},ut)}));return function(ae,te){return tt.apply(this,arguments)}}(),Ke=0;case 9:if(!(Ke<rt.length)){ke.next=15;break}return ke.next=12,bt(rt[Ke]);case 12:Ke++,ke.next=9;break;case 15:return ke.abrupt("return",Be);case 16:case"end":return ke.stop()}},$e)}));return function(he,ue){return lt.apply(this,arguments)}}(),Ve=Qe,It=+new Date,Ye=0;function Ze(){return"rc-upload-".concat(It,"-").concat(++Ye)}var at=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Me=function(lt){(0,me.Z)(he,lt);var $e=(0,ge.Z)(he);function he(){var ue;(0,ot.Z)(this,he);for(var Be=arguments.length,rt=new Array(Be),qe=0;qe<Be;qe++)rt[qe]=arguments[qe];return ue=$e.call.apply($e,[this].concat(rt)),(0,Ae.Z)((0,_e.Z)(ue),"state",{uid:Ze()}),(0,Ae.Z)((0,_e.Z)(ue),"reqs",{}),(0,Ae.Z)((0,_e.Z)(ue),"fileInput",void 0),(0,Ae.Z)((0,_e.Z)(ue),"_isMounted",void 0),(0,Ae.Z)((0,_e.Z)(ue),"onChange",function(ye){var Pe=ue.props,Te=Pe.accept,bt=Pe.directory,Ke=ye.target.files,mt=(0,Oe.Z)(Ke).filter(function(ke){return!bt||ct(ke,Te)});ue.uploadFiles(mt),ue.reset()}),(0,Ae.Z)((0,_e.Z)(ue),"onClick",function(ye){var Pe=ue.fileInput;if(Pe){var Te=ye.target,bt=ue.props.onClick;if(Te&&Te.tagName==="BUTTON"){var Ke=Pe.parentNode;Ke.focus(),Te.blur()}Pe.click(),bt&&bt(ye)}}),(0,Ae.Z)((0,_e.Z)(ue),"onKeyDown",function(ye){ye.key==="Enter"&&ue.onClick(ye)}),(0,Ae.Z)((0,_e.Z)(ue),"onFileDrop",function(){var ye=(0,ht.Z)((0,ve.Z)().mark(function Pe(Te){var bt,Ke,mt;return(0,ve.Z)().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(bt=ue.props.multiple,Te.preventDefault(),Te.type!=="dragover"){tt.next=4;break}return tt.abrupt("return");case 4:if(!ue.props.directory){tt.next=11;break}return tt.next=7,Ve(Array.prototype.slice.call(Te.dataTransfer.items),function(ut){return ct(ut,ue.props.accept)});case 7:Ke=tt.sent,ue.uploadFiles(Ke),tt.next=14;break;case 11:mt=(0,Oe.Z)(Te.dataTransfer.files).filter(function(ut){return ct(ut,ue.props.accept)}),bt===!1&&(mt=mt.slice(0,1)),ue.uploadFiles(mt);case 14:case"end":return tt.stop()}},Pe)}));return function(Pe){return ye.apply(this,arguments)}}()),(0,Ae.Z)((0,_e.Z)(ue),"uploadFiles",function(ye){var Pe=(0,Oe.Z)(ye),Te=Pe.map(function(bt){return bt.uid=Ze(),ue.processFile(bt,Pe)});Promise.all(Te).then(function(bt){var Ke=ue.props.onBatchStart;Ke==null||Ke(bt.map(function(mt){var ke=mt.origin,tt=mt.parsedFile;return{file:ke,parsedFile:tt}})),bt.filter(function(mt){return mt.parsedFile!==null}).forEach(function(mt){ue.post(mt)})})}),(0,Ae.Z)((0,_e.Z)(ue),"processFile",function(){var ye=(0,ht.Z)((0,ve.Z)().mark(function Pe(Te,bt){var Ke,mt,ke,tt,ut,ae,te,z,re;return(0,ve.Z)().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(Ke=ue.props.beforeUpload,mt=Te,!Ke){ne.next=14;break}return ne.prev=3,ne.next=6,Ke(Te,bt);case 6:mt=ne.sent,ne.next=12;break;case 9:ne.prev=9,ne.t0=ne.catch(3),mt=!1;case 12:if(mt!==!1){ne.next=14;break}return ne.abrupt("return",{origin:Te,parsedFile:null,action:null,data:null});case 14:if(ke=ue.props.action,typeof ke!="function"){ne.next=21;break}return ne.next=18,ke(Te);case 18:tt=ne.sent,ne.next=22;break;case 21:tt=ke;case 22:if(ut=ue.props.data,typeof ut!="function"){ne.next=29;break}return ne.next=26,ut(Te);case 26:ae=ne.sent,ne.next=30;break;case 29:ae=ut;case 30:return te=((0,it.Z)(mt)==="object"||typeof mt=="string")&&mt?mt:Te,te instanceof File?z=te:z=new File([te],Te.name,{type:Te.type}),re=z,re.uid=Te.uid,ne.abrupt("return",{origin:Te,data:ae,parsedFile:re,action:tt});case 35:case"end":return ne.stop()}},Pe,null,[[3,9]])}));return function(Pe,Te){return ye.apply(this,arguments)}}()),(0,Ae.Z)((0,_e.Z)(ue),"saveFileInput",function(ye){ue.fileInput=ye}),ue}return(0,Ne.Z)(he,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Be){var rt=this,qe=Be.data,ye=Be.origin,Pe=Be.action,Te=Be.parsedFile;if(this._isMounted){var bt=this.props,Ke=bt.onStart,mt=bt.customRequest,ke=bt.name,tt=bt.headers,ut=bt.withCredentials,ae=bt.method,te=ye.uid,z=mt||ze,re={action:Pe,filename:ke,data:qe,file:Te,headers:tt,withCredentials:ut,method:ae||"post",onProgress:function(ne){var be=rt.props.onProgress;be==null||be(ne,Te)},onSuccess:function(ne,be){var je=rt.props.onSuccess;je==null||je(ne,Te,be),delete rt.reqs[te]},onError:function(ne,be){var je=rt.props.onError;je==null||je(ne,be,Te),delete rt.reqs[te]}};Ke(ye),this.reqs[te]=z(re)}}},{key:"reset",value:function(){this.setState({uid:Ze()})}},{key:"abort",value:function(Be){var rt=this.reqs;if(Be){var qe=Be.uid?Be.uid:Be;rt[qe]&&rt[qe].abort&&rt[qe].abort(),delete rt[qe]}else Object.keys(rt).forEach(function(ye){rt[ye]&&rt[ye].abort&&rt[ye].abort(),delete rt[ye]})}},{key:"render",value:function(){var Be=this.props,rt=Be.component,qe=Be.prefixCls,ye=Be.className,Pe=Be.classNames,Te=Pe===void 0?{}:Pe,bt=Be.disabled,Ke=Be.id,mt=Be.name,ke=Be.style,tt=Be.styles,ut=tt===void 0?{}:tt,ae=Be.multiple,te=Be.accept,z=Be.capture,re=Be.children,le=Be.directory,ne=Be.openFileDialogOnClick,be=Be.onMouseEnter,je=Be.onMouseLeave,Mt=Be.hasControlInside,St=(0,pe.Z)(Be,at),wt=Re()((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},qe,!0),"".concat(qe,"-disabled"),bt),ye,ye)),Dt=le?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},jt=bt?{}:{onClick:ne?this.onClick:function(){},onKeyDown:ne?this.onKeyDown:function(){},onMouseEnter:be,onMouseLeave:je,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Mt?void 0:"0"};return Ie.createElement(rt,(0,ie.Z)({},jt,{className:wt,role:Mt?void 0:"button",style:ke}),Ie.createElement("input",(0,ie.Z)({},(0,Le.Z)(St,{aria:!0,data:!0}),{id:Ke,name:mt,disabled:bt,type:"file",ref:this.saveFileInput,onClick:function(en){return en.stopPropagation()},key:this.state.uid,style:(0,we.Z)({display:"none"},ut.input),className:Te.input,accept:te},Dt,{multiple:ae,onChange:this.onChange},z!=null?{capture:z}:{})),re)}}]),he}(Ie.Component),Ge=Me;function Ce(){}var He=function(lt){(0,me.Z)(he,lt);var $e=(0,ge.Z)(he);function he(){var ue;(0,ot.Z)(this,he);for(var Be=arguments.length,rt=new Array(Be),qe=0;qe<Be;qe++)rt[qe]=arguments[qe];return ue=$e.call.apply($e,[this].concat(rt)),(0,Ae.Z)((0,_e.Z)(ue),"uploader",void 0),(0,Ae.Z)((0,_e.Z)(ue),"saveUploader",function(ye){ue.uploader=ye}),ue}return(0,Ne.Z)(he,[{key:"abort",value:function(Be){this.uploader.abort(Be)}},{key:"render",value:function(){return Ie.createElement(Ge,(0,ie.Z)({},this.props,{ref:this.saveUploader}))}}]),he}(Ie.Component);(0,Ae.Z)(He,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ce,onError:Ce,onSuccess:Ce,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var Tt=He,yt=Tt},6790:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return ut}});var ie=fe(32855),ot=fe(34666),Ne=fe(27247),_e=fe(74430),me=fe(11913),ge=fe(43079),Ae=fe(92310),Ie=fe.n(Ae),we=fe(29301),pe=fe(70425),it=fe(34280),ve=fe(59301),ht=fe(4676),Oe=ve.forwardRef(function(ae,te){var z=ae.height,re=ae.offsetY,le=ae.offsetX,ne=ae.children,be=ae.prefixCls,je=ae.onInnerResize,Mt=ae.innerProps,St=ae.rtl,wt=ae.extra,Dt={},jt={display:"flex",flexDirection:"column"};return re!==void 0&&(Dt={height:z,position:"relative",overflow:"hidden"},jt=(0,Ne.Z)((0,Ne.Z)({},jt),{},(0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)((0,_e.Z)({transform:"translateY(".concat(re,"px)")},St?"marginRight":"marginLeft",-le),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Dt},ve.createElement(we.Z,{onResize:function(en){var Jt=en.offsetHeight;Jt&&je&&je()}},ve.createElement("div",(0,ie.Z)({style:jt,className:Ie()((0,_e.Z)({},"".concat(be,"-holder-inner"),be)),ref:te},Mt),ne,wt)))});Oe.displayName="Filler";var De=Oe;function Re(ae){var te=ae.children,z=ae.setRef,re=ve.useCallback(function(le){z(le)},[]);return ve.cloneElement(te,{ref:re})}function Le(ae,te,z,re,le,ne,be,je){var Mt=je.getKey;return ae.slice(te,z+1).map(function(St,wt){var Dt=te+wt,jt=be(St,Dt,{style:{width:re},offsetX:le}),zt=Mt(St);return ve.createElement(Re,{key:zt,setRef:function(Jt){return ne(St,Jt)}},jt)})}function st(ae,te,z,re){var le=z-ae,ne=te-z,be=Math.min(le,ne)*2;if(re<=be){var je=Math.floor(re/2);return re%2?z+je+1:z-je}return le>ne?z-(re-ne):z+(re-le)}function ct(ae,te,z){var re=ae.length,le=te.length,ne,be;if(re===0&&le===0)return null;re<le?(ne=ae,be=te):(ne=te,be=ae);var je={__EMPTY_ITEM__:!0};function Mt(en){return en!==void 0?z(en):je}for(var St=null,wt=Math.abs(re-le)!==1,Dt=0;Dt<be.length;Dt+=1){var jt=Mt(ne[Dt]),zt=Mt(be[Dt]);if(jt!==zt){St=Dt,wt=wt||jt!==Mt(be[Dt+1]);break}}return St===null?null:{index:St,multiple:wt}}function vt(ae,te,z){var re=ve.useState(ae),le=(0,me.Z)(re,2),ne=le[0],be=le[1],je=ve.useState(null),Mt=(0,me.Z)(je,2),St=Mt[0],wt=Mt[1];return ve.useEffect(function(){var Dt=ct(ne||[],ae||[],te);(Dt==null?void 0:Dt.index)!==void 0&&(z==null||z(Dt.index),wt(ae[Dt.index])),be(ae)},[ae]),[St]}var Ue=fe(16089),ze=(typeof navigator=="undefined"?"undefined":(0,ot.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Qe=ze,Ve=function(ae,te,z,re){var le=(0,ve.useRef)(!1),ne=(0,ve.useRef)(null);function be(){clearTimeout(ne.current),le.current=!0,ne.current=setTimeout(function(){le.current=!1},50)}var je=(0,ve.useRef)({top:ae,bottom:te,left:z,right:re});return je.current.top=ae,je.current.bottom=te,je.current.left=z,je.current.right=re,function(Mt,St){var wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Dt=Mt?St<0&&je.current.left||St>0&&je.current.right:St<0&&je.current.top||St>0&&je.current.bottom;return wt&&Dt?(clearTimeout(ne.current),le.current=!1):(!Dt||le.current)&&be(),!le.current&&Dt}};function It(ae,te,z,re,le,ne,be){var je=(0,ve.useRef)(0),Mt=(0,ve.useRef)(null),St=(0,ve.useRef)(null),wt=(0,ve.useRef)(!1),Dt=Ve(te,z,re,le);function jt(Vt,nn){if(Ue.Z.cancel(Mt.current),!Dt(!1,nn)){var dt=Vt;if(!dt._virtualHandled)dt._virtualHandled=!0;else return;je.current+=nn,St.current=nn,Qe||dt.preventDefault(),Mt.current=(0,Ue.Z)(function(){var un=wt.current?10:1;be(je.current*un,!1),je.current=0})}}function zt(Vt,nn){be(nn,!0),Qe||Vt.preventDefault()}var en=(0,ve.useRef)(null),Jt=(0,ve.useRef)(null);function Bt(Vt){if(ae){Ue.Z.cancel(Jt.current),Jt.current=(0,Ue.Z)(function(){en.current=null},2);var nn=Vt.deltaX,dt=Vt.deltaY,un=Vt.shiftKey,Zt=nn,Qt=dt;(en.current==="sx"||!en.current&&un&&dt&&!nn)&&(Zt=dt,Qt=0,en.current="sx");var ln=Math.abs(Zt),_n=Math.abs(Qt);en.current===null&&(en.current=ne&&ln>_n?"x":"y"),en.current==="y"?jt(Vt,Qt):zt(Vt,Zt)}}function sn(Vt){ae&&(wt.current=Vt.detail===St.current)}return[Bt,sn]}function Ye(ae,te,z,re){var le=ve.useMemo(function(){return[new Map,[]]},[ae,z.id,re]),ne=(0,me.Z)(le,2),be=ne[0],je=ne[1],Mt=function(wt){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wt,jt=be.get(wt),zt=be.get(Dt);if(jt===void 0||zt===void 0)for(var en=ae.length,Jt=je.length;Jt<en;Jt+=1){var Bt,sn=ae[Jt],Vt=te(sn);be.set(Vt,Jt);var nn=(Bt=z.get(Vt))!==null&&Bt!==void 0?Bt:re;if(je[Jt]=(je[Jt-1]||0)+nn,Vt===wt&&(jt=Jt),Vt===Dt&&(zt=Jt),jt!==void 0&&zt!==void 0)break}return{top:je[jt-1]||0,bottom:je[zt]}};return Mt}var Ze=fe(33377),at=fe(93912),Me=function(){function ae(){(0,Ze.Z)(this,ae),(0,_e.Z)(this,"maps",void 0),(0,_e.Z)(this,"id",0),(0,_e.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,at.Z)(ae,[{key:"set",value:function(z,re){this.diffRecords.set(z,this.maps[z]),this.maps[z]=re,this.id+=1}},{key:"get",value:function(z){return this.maps[z]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),ae}(),Ge=Me;function Ce(ae){var te=parseFloat(ae);return isNaN(te)?0:te}function He(ae,te,z){var re=ve.useState(0),le=(0,me.Z)(re,2),ne=le[0],be=le[1],je=(0,ve.useRef)(new Map),Mt=(0,ve.useRef)(new Ge),St=(0,ve.useRef)(0);function wt(){St.current+=1}function Dt(){var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;wt();var en=function(){var sn=!1;je.current.forEach(function(Vt,nn){if(Vt&&Vt.offsetParent){var dt=Vt.offsetHeight,un=getComputedStyle(Vt),Zt=un.marginTop,Qt=un.marginBottom,ln=Ce(Zt),_n=Ce(Qt),cn=dt+ln+_n;Mt.current.get(nn)!==cn&&(Mt.current.set(nn,cn),sn=!0)}}),sn&&be(function(Vt){return Vt+1})};if(zt)en();else{St.current+=1;var Jt=St.current;Promise.resolve().then(function(){Jt===St.current&&en()})}}function jt(zt,en){var Jt=ae(zt),Bt=je.current.get(Jt);en?(je.current.set(Jt,en),Dt()):je.current.delete(Jt),!Bt!=!en&&(en?te==null||te(zt):z==null||z(zt))}return(0,ve.useEffect)(function(){return wt},[]),[jt,Dt,Mt.current,ne]}var Tt=14/15;function yt(ae,te,z){var re=(0,ve.useRef)(!1),le=(0,ve.useRef)(0),ne=(0,ve.useRef)(0),be=(0,ve.useRef)(null),je=(0,ve.useRef)(null),Mt,St=function(zt){if(re.current){var en=Math.ceil(zt.touches[0].pageX),Jt=Math.ceil(zt.touches[0].pageY),Bt=le.current-en,sn=ne.current-Jt,Vt=Math.abs(Bt)>Math.abs(sn);Vt?le.current=en:ne.current=Jt;var nn=z(Vt,Vt?Bt:sn,!1,zt);nn&&zt.preventDefault(),clearInterval(je.current),nn&&(je.current=setInterval(function(){Vt?Bt*=Tt:sn*=Tt;var dt=Math.floor(Vt?Bt:sn);(!z(Vt,dt,!0)||Math.abs(dt)<=.1)&&clearInterval(je.current)},16))}},wt=function(){re.current=!1,Mt()},Dt=function(zt){Mt(),zt.touches.length===1&&!re.current&&(re.current=!0,le.current=Math.ceil(zt.touches[0].pageX),ne.current=Math.ceil(zt.touches[0].pageY),be.current=zt.target,be.current.addEventListener("touchmove",St,{passive:!1}),be.current.addEventListener("touchend",wt,{passive:!0}))};Mt=function(){be.current&&(be.current.removeEventListener("touchmove",St),be.current.removeEventListener("touchend",wt))},(0,it.Z)(function(){return ae&&te.current.addEventListener("touchstart",Dt,{passive:!0}),function(){var jt;(jt=te.current)===null||jt===void 0||jt.removeEventListener("touchstart",Dt),Mt(),clearInterval(je.current)}},[ae])}function lt(ae){return Math.floor(Math.pow(ae,.5))}function $e(ae,te){var z="touches"in ae?ae.touches[0]:ae;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function he(ae,te,z){ve.useEffect(function(){var re=te.current;if(ae&&re){var le=!1,ne,be,je=function(){Ue.Z.cancel(ne)},Mt=function jt(){je(),ne=(0,Ue.Z)(function(){z(be),jt()})},St=function(zt){if(!(zt.target.draggable||zt.button!==0)){var en=zt;en._virtualHandled||(en._virtualHandled=!0,le=!0)}},wt=function(){le=!1,je()},Dt=function(zt){if(le){var en=$e(zt,!1),Jt=re.getBoundingClientRect(),Bt=Jt.top,sn=Jt.bottom;if(en<=Bt){var Vt=Bt-en;be=-lt(Vt),Mt()}else if(en>=sn){var nn=en-sn;be=lt(nn),Mt()}else je()}};return re.addEventListener("mousedown",St),re.ownerDocument.addEventListener("mouseup",wt),re.ownerDocument.addEventListener("mousemove",Dt),function(){re.removeEventListener("mousedown",St),re.ownerDocument.removeEventListener("mouseup",wt),re.ownerDocument.removeEventListener("mousemove",Dt),je()}}},[ae])}var ue=10;function Be(ae,te,z,re,le,ne,be,je){var Mt=ve.useRef(),St=ve.useState(null),wt=(0,me.Z)(St,2),Dt=wt[0],jt=wt[1];return(0,it.Z)(function(){if(Dt&&Dt.times<ue){if(!ae.current){jt(function(Wn){return(0,Ne.Z)({},Wn)});return}ne();var zt=Dt.targetAlign,en=Dt.originAlign,Jt=Dt.index,Bt=Dt.offset,sn=ae.current.clientHeight,Vt=!1,nn=zt,dt=null;if(sn){for(var un=zt||en,Zt=0,Qt=0,ln=0,_n=Math.min(te.length-1,Jt),cn=0;cn<=_n;cn+=1){var wn=le(te[cn]);Qt=Zt;var $n=z.get(wn);ln=Qt+($n===void 0?re:$n),Zt=ln}for(var Zn=un==="top"?Bt:sn-Bt,Mr=_n;Mr>=0;Mr-=1){var Nr=le(te[Mr]),sr=z.get(Nr);if(sr===void 0){Vt=!0;break}if(Zn-=sr,Zn<=0)break}switch(un){case"top":dt=Qt-Bt;break;case"bottom":dt=ln-sn+Bt;break;default:{var Gn=ae.current.scrollTop,fn=Gn+sn;Qt<Gn?nn="top":ln>fn&&(nn="bottom")}}dt!==null&&be(dt),dt!==Dt.lastTop&&(Vt=!0)}Vt&&jt((0,Ne.Z)((0,Ne.Z)({},Dt),{},{times:Dt.times+1,targetAlign:nn,lastTop:dt}))}},[Dt,ae.current]),function(zt){if(zt==null){je();return}if(Ue.Z.cancel(Mt.current),typeof zt=="number")be(zt);else if(zt&&(0,ot.Z)(zt)==="object"){var en,Jt=zt.align;"index"in zt?en=zt.index:en=te.findIndex(function(Vt){return le(Vt)===zt.key});var Bt=zt.offset,sn=Bt===void 0?0:Bt;jt({times:0,index:en,offset:sn,originAlign:Jt})}}}var rt=ve.forwardRef(function(ae,te){var z=ae.prefixCls,re=ae.rtl,le=ae.scrollOffset,ne=ae.scrollRange,be=ae.onStartMove,je=ae.onStopMove,Mt=ae.onScroll,St=ae.horizontal,wt=ae.spinSize,Dt=ae.containerSize,jt=ae.style,zt=ae.thumbStyle,en=ae.showScrollBar,Jt=ve.useState(!1),Bt=(0,me.Z)(Jt,2),sn=Bt[0],Vt=Bt[1],nn=ve.useState(null),dt=(0,me.Z)(nn,2),un=dt[0],Zt=dt[1],Qt=ve.useState(null),ln=(0,me.Z)(Qt,2),_n=ln[0],cn=ln[1],wn=!re,$n=ve.useRef(),Zn=ve.useRef(),Mr=ve.useState(en),Nr=(0,me.Z)(Mr,2),sr=Nr[0],Gn=Nr[1],fn=ve.useRef(),Wn=function(){en===!0||en===!1||(clearTimeout(fn.current),Gn(!0),fn.current=setTimeout(function(){Gn(!1)},3e3))},Un=ne-Dt||0,En=Dt-wt||0,tr=ve.useMemo(function(){if(le===0||Un===0)return 0;var Mn=le/Un;return Mn*En},[le,Un,En]),ft=function(kn){kn.stopPropagation(),kn.preventDefault()},gt=ve.useRef({top:tr,dragging:sn,pageY:un,startTop:_n});gt.current={top:tr,dragging:sn,pageY:un,startTop:_n};var xt=function(kn){Vt(!0),Zt($e(kn,St)),cn(gt.current.top),be(),kn.stopPropagation(),kn.preventDefault()};ve.useEffect(function(){var Mn=function(Ft){Ft.preventDefault()},kn=$n.current,xn=Zn.current;return kn.addEventListener("touchstart",Mn,{passive:!1}),xn.addEventListener("touchstart",xt,{passive:!1}),function(){kn.removeEventListener("touchstart",Mn),xn.removeEventListener("touchstart",xt)}},[]);var _t=ve.useRef();_t.current=Un;var Cn=ve.useRef();Cn.current=En,ve.useEffect(function(){if(sn){var Mn,kn=function(Ft){var nt=gt.current,Yt=nt.dragging,gn=nt.pageY,Sn=nt.startTop;Ue.Z.cancel(Mn);var Ee=$n.current.getBoundingClientRect(),Fe=Dt/(St?Ee.width:Ee.height);if(Yt){var Wt=($e(Ft,St)-gn)*Fe,Ct=Sn;!wn&&St?Ct-=Wt:Ct+=Wt;var We=_t.current,kt=Cn.current,qt=kt?Ct/kt:0,rn=Math.ceil(qt*We);rn=Math.max(rn,0),rn=Math.min(rn,We),Mn=(0,Ue.Z)(function(){Mt(rn,St)})}},xn=function(){Vt(!1),je()};return window.addEventListener("mousemove",kn,{passive:!0}),window.addEventListener("touchmove",kn,{passive:!0}),window.addEventListener("mouseup",xn,{passive:!0}),window.addEventListener("touchend",xn,{passive:!0}),function(){window.removeEventListener("mousemove",kn),window.removeEventListener("touchmove",kn),window.removeEventListener("mouseup",xn),window.removeEventListener("touchend",xn),Ue.Z.cancel(Mn)}}},[sn]),ve.useEffect(function(){return Wn(),function(){clearTimeout(fn.current)}},[le]),ve.useImperativeHandle(te,function(){return{delayHidden:Wn}});var mn="".concat(z,"-scrollbar"),tn={position:"absolute",visibility:sr?null:"hidden"},Ln={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return St?(Object.assign(tn,{height:8,left:0,right:0,bottom:0}),Object.assign(Ln,(0,_e.Z)({height:"100%",width:wt},wn?"left":"right",tr))):(Object.assign(tn,(0,_e.Z)({width:8,top:0,bottom:0},wn?"right":"left",0)),Object.assign(Ln,{width:"100%",height:wt,top:tr})),ve.createElement("div",{ref:$n,className:Ie()(mn,(0,_e.Z)((0,_e.Z)((0,_e.Z)({},"".concat(mn,"-horizontal"),St),"".concat(mn,"-vertical"),!St),"".concat(mn,"-visible"),sr)),style:(0,Ne.Z)((0,Ne.Z)({},tn),jt),onMouseDown:ft,onMouseMove:Wn},ve.createElement("div",{ref:Zn,className:Ie()("".concat(mn,"-thumb"),(0,_e.Z)({},"".concat(mn,"-thumb-moving"),sn)),style:(0,Ne.Z)((0,Ne.Z)({},Ln),zt),onMouseDown:xt}))}),qe=rt,ye=20;function Pe(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=ae/te*ae;return isNaN(z)&&(z=0),z=Math.max(z,ye),Math.floor(z)}var Te=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],bt=[],Ke={overflowY:"auto",overflowAnchor:"none"};function mt(ae,te){var z=ae.prefixCls,re=z===void 0?"rc-virtual-list":z,le=ae.className,ne=ae.height,be=ae.itemHeight,je=ae.fullHeight,Mt=je===void 0?!0:je,St=ae.style,wt=ae.data,Dt=ae.children,jt=ae.itemKey,zt=ae.virtual,en=ae.direction,Jt=ae.scrollWidth,Bt=ae.component,sn=Bt===void 0?"div":Bt,Vt=ae.onScroll,nn=ae.onVirtualScroll,dt=ae.onVisibleChange,un=ae.innerProps,Zt=ae.extraRender,Qt=ae.styles,ln=ae.showScrollBar,_n=ln===void 0?"optional":ln,cn=(0,ge.Z)(ae,Te),wn=ve.useCallback(function(Ht){return typeof jt=="function"?jt(Ht):Ht==null?void 0:Ht[jt]},[jt]),$n=He(wn,null,null),Zn=(0,me.Z)($n,4),Mr=Zn[0],Nr=Zn[1],sr=Zn[2],Gn=Zn[3],fn=!!(zt!==!1&&ne&&be),Wn=ve.useMemo(function(){return Object.values(sr.maps).reduce(function(Ht,Ut){return Ht+Ut},0)},[sr.id,sr.maps]),Un=fn&&wt&&(Math.max(be*wt.length,Wn)>ne||!!Jt),En=en==="rtl",tr=Ie()(re,(0,_e.Z)({},"".concat(re,"-rtl"),En),le),ft=wt||bt,gt=(0,ve.useRef)(),xt=(0,ve.useRef)(),_t=(0,ve.useRef)(),Cn=(0,ve.useState)(0),mn=(0,me.Z)(Cn,2),tn=mn[0],Ln=mn[1],Mn=(0,ve.useState)(0),kn=(0,me.Z)(Mn,2),xn=kn[0],Bn=kn[1],Ft=(0,ve.useState)(!1),nt=(0,me.Z)(Ft,2),Yt=nt[0],gn=nt[1],Sn=function(){gn(!0)},Ee=function(){gn(!1)},Fe={getKey:wn};function Wt(Ht){Ln(function(Ut){var Et;typeof Ht=="function"?Et=Ht(Ut):Et=Ht;var pt=Rr(Et);return gt.current.scrollTop=pt,pt})}var Ct=(0,ve.useRef)({start:0,end:ft.length}),We=(0,ve.useRef)(),kt=vt(ft,wn),qt=(0,me.Z)(kt,1),rn=qt[0];We.current=rn;var dn=ve.useMemo(function(){if(!fn)return{scrollHeight:void 0,start:0,end:ft.length-1,offset:void 0};if(!Un){var Ht;return{scrollHeight:((Ht=xt.current)===null||Ht===void 0?void 0:Ht.offsetHeight)||0,start:0,end:ft.length-1,offset:void 0}}for(var Ut=0,Et,pt,Nt,Gt=ft.length,bn=0;bn<Gt;bn+=1){var Tn=ft[bn],Kn=wn(Tn),nr=sr.get(Kn),Qn=Ut+(nr===void 0?be:nr);Qn>=tn&&Et===void 0&&(Et=bn,pt=Ut),Qn>tn+ne&&Nt===void 0&&(Nt=bn),Ut=Qn}return Et===void 0&&(Et=0,pt=0,Nt=Math.ceil(ne/be)),Nt===void 0&&(Nt=ft.length-1),Nt=Math.min(Nt+1,ft.length-1),{scrollHeight:Ut,start:Et,end:Nt,offset:pt}},[Un,fn,tn,ft,Gn,ne]),Je=dn.scrollHeight,$t=dn.start,Lt=dn.end,An=dn.offset;Ct.current.start=$t,Ct.current.end=Lt,ve.useLayoutEffect(function(){var Ht=sr.getRecord();if(Ht.size===1){var Ut=Array.from(Ht.keys())[0],Et=Ht.get(Ut),pt=ft[$t];if(pt&&Et===void 0){var Nt=wn(pt);if(Nt===Ut){var Gt=sr.get(Ut),bn=Gt-be;Wt(function(Tn){return Tn+bn})}}}sr.resetRecord()},[Je]);var Xt=ve.useState({width:0,height:ne}),yn=(0,me.Z)(Xt,2),pn=yn[0],Fn=yn[1],Pn=function(Ut){Fn({width:Ut.offsetWidth,height:Ut.offsetHeight})},Xn=(0,ve.useRef)(),rr=(0,ve.useRef)(),Yn=ve.useMemo(function(){return Pe(pn.width,Jt)},[pn.width,Jt]),hr=ve.useMemo(function(){return Pe(pn.height,Je)},[pn.height,Je]),Hn=Je-ne,wr=(0,ve.useRef)(Hn);wr.current=Hn;function Rr(Ht){var Ut=Ht;return Number.isNaN(wr.current)||(Ut=Math.min(Ut,wr.current)),Ut=Math.max(Ut,0),Ut}var ar=tn<=0,pr=tn>=Hn,Er=xn<=0,vr=xn>=Jt,er=Ve(ar,pr,Er,vr),Ar=function(){return{x:En?-xn:xn,y:tn}},lr=(0,ve.useRef)(Ar()),ur=(0,pe.zX)(function(Ht){if(nn){var Ut=(0,Ne.Z)((0,Ne.Z)({},Ar()),Ht);(lr.current.x!==Ut.x||lr.current.y!==Ut.y)&&(nn(Ut),lr.current=Ut)}});function mr(Ht,Ut){var Et=Ht;Ut?((0,ht.flushSync)(function(){Bn(Et)}),ur()):Wt(Et)}function Br(Ht){var Ut=Ht.currentTarget.scrollTop;Ut!==tn&&Wt(Ut),Vt==null||Vt(Ht),ur()}var gr=function(Ut){var Et=Ut,pt=Jt?Jt-pn.width:0;return Et=Math.max(Et,0),Et=Math.min(Et,pt),Et},ir=(0,pe.zX)(function(Ht,Ut){Ut?((0,ht.flushSync)(function(){Bn(function(Et){var pt=Et+(En?-Ht:Ht);return gr(pt)})}),ur()):Wt(function(Et){var pt=Et+Ht;return pt})}),Jn=It(fn,ar,pr,Er,vr,!!Jt,ir),cr=(0,me.Z)(Jn,2),Zr=cr[0],Pr=cr[1];yt(fn,gt,function(Ht,Ut,Et,pt){var Nt=pt;return er(Ht,Ut,Et)?!1:!Nt||!Nt._virtualHandled?(Nt&&(Nt._virtualHandled=!0),Zr({preventDefault:function(){},deltaX:Ht?Ut:0,deltaY:Ht?0:Ut}),!0):!1}),he(Un,gt,function(Ht){Wt(function(Ut){return Ut+Ht})}),(0,it.Z)(function(){function Ht(Et){var pt=ar&&Et.detail<0,Nt=pr&&Et.detail>0;fn&&!pt&&!Nt&&Et.preventDefault()}var Ut=gt.current;return Ut.addEventListener("wheel",Zr,{passive:!1}),Ut.addEventListener("DOMMouseScroll",Pr,{passive:!0}),Ut.addEventListener("MozMousePixelScroll",Ht,{passive:!1}),function(){Ut.removeEventListener("wheel",Zr),Ut.removeEventListener("DOMMouseScroll",Pr),Ut.removeEventListener("MozMousePixelScroll",Ht)}},[fn,ar,pr]),(0,it.Z)(function(){if(Jt){var Ht=gr(xn);Bn(Ht),ur({x:Ht})}},[pn.width,Jt]);var Sr=function(){var Ut,Et;(Ut=Xn.current)===null||Ut===void 0||Ut.delayHidden(),(Et=rr.current)===null||Et===void 0||Et.delayHidden()},ri=Be(gt,ft,sr,be,wn,function(){return Nr(!0)},Wt,Sr);ve.useImperativeHandle(te,function(){return{nativeElement:_t.current,getScrollInfo:Ar,scrollTo:function(Ut){function Et(pt){return pt&&(0,ot.Z)(pt)==="object"&&("left"in pt||"top"in pt)}Et(Ut)?(Ut.left!==void 0&&Bn(gr(Ut.left)),ri(Ut.top)):ri(Ut)}}}),(0,it.Z)(function(){if(dt){var Ht=ft.slice($t,Lt+1);dt(Ht,ft)}},[$t,Lt,ft]);var Dr=Ye(ft,wn,sr,be),li=Zt==null?void 0:Zt({start:$t,end:Lt,virtual:Un,offsetX:xn,offsetY:An,rtl:En,getSize:Dr}),qr=Le(ft,$t,Lt,Jt,xn,Mr,Dt,Fe),_r=null;ne&&(_r=(0,Ne.Z)((0,_e.Z)({},Mt?"height":"maxHeight",ne),Ke),fn&&(_r.overflowY="hidden",Jt&&(_r.overflowX="hidden"),Yt&&(_r.pointerEvents="none")));var zn={};return En&&(zn.dir="rtl"),ve.createElement("div",(0,ie.Z)({ref:_t,style:(0,Ne.Z)((0,Ne.Z)({},St),{},{position:"relative"}),className:tr},zn,cn),ve.createElement(we.Z,{onResize:Pn},ve.createElement(sn,{className:"".concat(re,"-holder"),style:_r,ref:gt,onScroll:Br,onMouseEnter:Sr},ve.createElement(De,{prefixCls:re,height:Je,offsetX:xn,offsetY:An,scrollWidth:Jt,onInnerResize:Nr,ref:xt,innerProps:un,rtl:En,extra:li},qr))),Un&&Je>ne&&ve.createElement(qe,{ref:Xn,prefixCls:re,scrollOffset:tn,scrollRange:Je,rtl:En,onScroll:mr,onStartMove:Sn,onStopMove:Ee,spinSize:hr,containerSize:pn.height,style:Qt==null?void 0:Qt.verticalScrollBar,thumbStyle:Qt==null?void 0:Qt.verticalScrollBarThumb,showScrollBar:_n}),Un&&Jt>pn.width&&ve.createElement(qe,{ref:rr,prefixCls:re,scrollOffset:xn,scrollRange:Jt,rtl:En,onScroll:mr,onStartMove:Sn,onStopMove:Ee,spinSize:Yn,containerSize:pn.width,horizontal:!0,style:Qt==null?void 0:Qt.horizontalScrollBar,thumbStyle:Qt==null?void 0:Qt.horizontalScrollBarThumb,showScrollBar:_n}))}var ke=ve.forwardRef(mt);ke.displayName="List";var tt=ke,ut=tt},93314:function(Pt){"use strict";Pt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4O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h642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(Pt,Ot,fe){"use strict";fe.d(Ot,{Z:function(){return Ie}});const ie=we=>typeof we=="object"&&we!=null&&we.nodeType===1,ot=(we,pe)=>(!pe||we!=="hidden")&&we!=="visible"&&we!=="clip",Ne=(we,pe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const it=getComputedStyle(we,null);return ot(it.overflowY,pe)||ot(it.overflowX,pe)||(ve=>{const ht=(Oe=>{if(!Oe.ownerDocument||!Oe.ownerDocument.defaultView)return null;try{return Oe.ownerDocument.defaultView.frameElement}catch(De){return null}})(ve);return!!ht&&(ht.clientHeight<ve.scrollHeight||ht.clientWidth<ve.scrollWidth)})(we)}return!1},_e=(we,pe,it,ve,ht,Oe,De,Re)=>Oe<we&&De>pe||Oe>we&&De<pe?0:Oe<=we&&Re<=it||De>=pe&&Re>=it?Oe-we-ve:De>pe&&Re<it||Oe<we&&Re>it?De-pe+ht:0,me=we=>{const pe=we.parentElement;return pe==null?we.getRootNode().host||null:pe},ge=(we,pe)=>{var it,ve,ht,Oe;if(typeof document=="undefined")return[];const{scrollMode:De,block:Re,inline:Le,boundary:st,skipOverflowHiddenElements:ct}=pe,vt=typeof st=="function"?st:qe=>qe!==st;if(!ie(we))throw new TypeError("Invalid target");const Ue=document.scrollingElement||document.documentElement,ze=[];let Qe=we;for(;ie(Qe)&&vt(Qe);){if(Qe=me(Qe),Qe===Ue){ze.push(Qe);break}Qe!=null&&Qe===document.body&&Ne(Qe)&&!Ne(document.documentElement)||Qe!=null&&Ne(Qe,ct)&&ze.push(Qe)}const Ve=(ve=(it=window.visualViewport)==null?void 0:it.width)!=null?ve:innerWidth,It=(Oe=(ht=window.visualViewport)==null?void 0:ht.height)!=null?Oe:innerHeight,{scrollX:Ye,scrollY:Ze}=window,{height:at,width:Me,top:Ge,right:Ce,bottom:He,left:Tt}=we.getBoundingClientRect(),{top:yt,right:lt,bottom:$e,left:he}=(qe=>{const ye=window.getComputedStyle(qe);return{top:parseFloat(ye.scrollMarginTop)||0,right:parseFloat(ye.scrollMarginRight)||0,bottom:parseFloat(ye.scrollMarginBottom)||0,left:parseFloat(ye.scrollMarginLeft)||0}})(we);let ue=Re==="start"||Re==="nearest"?Ge-yt:Re==="end"?He+$e:Ge+at/2-yt+$e,Be=Le==="center"?Tt+Me/2-he+lt:Le==="end"?Ce+lt:Tt-he;const rt=[];for(let qe=0;qe<ze.length;qe++){const ye=ze[qe],{height:Pe,width:Te,top:bt,right:Ke,bottom:mt,left:ke}=ye.getBoundingClientRect();if(De==="if-needed"&&Ge>=0&&Tt>=0&&He<=It&&Ce<=Ve&&(ye===Ue&&!Ne(ye)||Ge>=bt&&He<=mt&&Tt>=ke&&Ce<=Ke))return rt;const tt=getComputedStyle(ye),ut=parseInt(tt.borderLeftWidth,10),ae=parseInt(tt.borderTopWidth,10),te=parseInt(tt.borderRightWidth,10),z=parseInt(tt.borderBottomWidth,10);let re=0,le=0;const ne="offsetWidth"in ye?ye.offsetWidth-ye.clientWidth-ut-te:0,be="offsetHeight"in ye?ye.offsetHeight-ye.clientHeight-ae-z:0,je="offsetWidth"in ye?ye.offsetWidth===0?0:Te/ye.offsetWidth:0,Mt="offsetHeight"in ye?ye.offsetHeight===0?0:Pe/ye.offsetHeight:0;if(Ue===ye)re=Re==="start"?ue:Re==="end"?ue-It:Re==="nearest"?_e(Ze,Ze+It,It,ae,z,Ze+ue,Ze+ue+at,at):ue-It/2,le=Le==="start"?Be:Le==="center"?Be-Ve/2:Le==="end"?Be-Ve:_e(Ye,Ye+Ve,Ve,ut,te,Ye+Be,Ye+Be+Me,Me),re=Math.max(0,re+Ze),le=Math.max(0,le+Ye);else{re=Re==="start"?ue-bt-ae:Re==="end"?ue-mt+z+be:Re==="nearest"?_e(bt,mt,Pe,ae,z+be,ue,ue+at,at):ue-(bt+Pe/2)+be/2,le=Le==="start"?Be-ke-ut:Le==="center"?Be-(ke+Te/2)+ne/2:Le==="end"?Be-Ke+te+ne:_e(ke,Ke,Te,ut,te+ne,Be,Be+Me,Me);const{scrollLeft:St,scrollTop:wt}=ye;re=Mt===0?0:Math.max(0,Math.min(wt+re/Mt,ye.scrollHeight-Pe/Mt+be)),le=je===0?0:Math.max(0,Math.min(St+le/je,ye.scrollWidth-Te/je+ne)),ue+=wt-re,Be+=St-le}rt.push({el:ye,top:re,left:le})}return rt},Ae=we=>we===!1?{block:"end",inline:"nearest"}:(pe=>pe===Object(pe)&&Object.keys(pe).length!==0)(we)?we:{block:"start",inline:"nearest"};function Ie(we,pe){if(!we.isConnected||!(ht=>{let Oe=ht;for(;Oe&&Oe.parentNode;){if(Oe.parentNode===document)return!0;Oe=Oe.parentNode instanceof ShadowRoot?Oe.parentNode.host:Oe.parentNode}return!1})(we))return;const it=(ht=>{const Oe=window.getComputedStyle(ht);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(we);if((ht=>typeof ht=="object"&&typeof ht.behavior=="function")(pe))return pe.behavior(ge(we,pe));const ve=typeof pe=="boolean"||pe==null?void 0:pe.behavior;for(const{el:ht,top:Oe,left:De}of ge(we,Ae(pe))){const Re=Oe-it.top+it.bottom,Le=De-it.left+it.right;ht.scroll({top:Re,left:Le,behavior:ve})}}}}]);
|