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.
220 lines
610 KiB
220 lines
610 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[2338],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(gt,wt){"use strict";wt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},69092:function(gt,wt){"use strict";wt.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},39832:function(gt,wt,fe){"use strict";var ie=fe(59301),Ge=Object.defineProperty,De=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ve=(Ee,Ne,ze)=>Ne in Ee?Ge(Ee,Ne,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Ee[Ne]=ze,Te=(Ee,Ne)=>{for(var ze in Ne||(Ne={}))Ze.call(Ne,ze)&&ve(Ee,ze,Ne[ze]);if(De)for(var ze of De(Ne))xe.call(Ne,ze)&&ve(Ee,ze,Ne[ze]);return Ee};const Ie=Ee=>React.createElement("svg",Te({width:99,height:80,xmlns:"http://www.w3.org/2000/svg"},Ee),React.createElement("title",null,"\u6279\u6CE8\u6587\u4EF6"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M62.7 79.6H0V8.5h39.3l23.4 18.4z",fill:"#F0A221"}),React.createElement("path",{d:"M71.4 71.1H8.7V0h44.4l18.3 18z",fill:"#F1C84C"}),React.createElement("path",{d:"M53.3 7.3v11.5h11.5z",fill:"#FFF"}),React.createElement("path",{d:"M34.9 13.9h-17v4.6h17zM45.9 27h-28v4.6h28zM45.9 40.6h-28v4.6h28zM45.9 53.7h-28v4.7h28z",fill:"#F0A221"}),React.createElement("path",{d:"M65 32H50v4.6h15zM65 45.6H50v4.6h15zM65 58.7H50v4.7h15z",fill:"#FFF"}),React.createElement("path",{d:"M60 56.5c.7 4.3-1 8.3-1 8.3s4-1.7 8.3-1c0 0 1.4-4.5 5.2-10L70 51.2c-5.5 3.9-10 5.3-10 5.3Z",fill:"#000"}),React.createElement("path",{d:"m64 59.2 7.1-7.1.5.5-7.1 7.1z",fill:"#F9A54C"}),React.createElement("path",{d:"M62.8 59.8c0 .7.5 1.2 1.2 1.2s1.2-.5 1.2-1.2-.5-1.2-1.2-1.2-1.2.6-1.2 1.2Z",fill:"#FFF"}),React.createElement("path",{d:"M71.6 55.8c4-2.6 6.7-4.5 12.6-10.5 10.2-10.2 16-18.3 14.3-20-1.7-1.7-9.5 3.8-20 14.3-6 6-7.6 8.6-10.5 12.6l3.6 3.6Z",fill:"#324A5E"}),React.createElement("path",{d:"m78 39.8 5.7 5.7.5-.5 1.4-1.4-5.6-5.7-1.4 1.4-.6.5Zm10.5-5.7c-.5.2-1.2.7-1.7 1.4-1.2 1.2-1.9 2.4-1.7 2.9.5.5 1.7-.5 2.9-1.7.7-.7 1.2-1.2 1.4-1.7l6.2-6.2 1.4 1.4c1.7-2.6 2.1-4.5 1.4-5-.5-.5-2.6-.2-5 1.4l1.6 1.6-6.5 5.9Z",fill:"#FFC65B"}),React.createElement("path",{d:"m49.6 36.4-3.8-3.9H18v-1h28.2l4.2 4.1zM49.6 50.4l-3.8-3.9H18v-1h28.2l4.2 4.1zM49.6 64.4l-3.8-3.9H18v-1h28.2l4.2 4.1z",fill:"#FFF"})));wt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTkiIGhlaWdodD0iODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNjIuNyA3OS42SDBWOC41aDM5LjNsMjMuNCAxOC40eiIgZmlsbD0iI0YwQTIyMSIvPjxwYXRoIGQ9Ik03MS40IDcxLjFIOC43VjBoNDQuNGwxOC4zIDE4eiIgZmlsbD0iI0YxQzg0QyIvPjxwYXRoIGQ9Ik01My4zIDcuM3YxMS41aDExLjV6IiBmaWxsPSIjRkZGIi8+PHBhdGggZD0iTTM0LjkgMTMuOWgtMTd2NC42aDE3ek00NS45IDI3aC0yOHY0LjZoMjh6TTQ1LjkgNDAuNmgtMjh2NC42aDI4ek00NS45IDUzLjdoLTI4djQuN2gyOHoiIGZpbGw9IiNGMEEyMjEiLz48cGF0aCBkPSJNNjUgMzJINTB2NC42aDE1ek02NSA0NS42SDUwdjQuNmgxNXpNNjUgNTguN0g1MHY0LjdoMTV6IiBmaWxsPSIjRkZGIi8+PGc+PHBhdGggZD0iTTYwIDU2LjVjLjcgNC4zLTEgOC4zLTEgOC4zczQtMS43IDguMy0xYzAgMCAxLjQtNC41IDUuMi0xMEw3MCA1MS4yYy01LjUgMy45LTEwIDUuMy0xMCA1LjNaIiBmaWxsPSIjMDAwIi8+PHBhdGggZD0ibTY0IDU5LjIgNy4xLTcuMS41LjUtNy4xIDcuMXoiIGZpbGw9IiNGOUE1NEMiLz48cGF0aCBkPSJNNjIuOCA1OS44YzAgLjcuNSAxLjIgMS4yIDEuMnMxLjItLjUgMS4yLTEuMi0uNS0xLjItMS4yLTEuMi0xLjIuNi0xLjIgMS4yWiIgZmlsbD0iI0ZGRiIvPjxwYXRoIGQ9Ik03MS42IDU1LjhjNC0yLjYgNi43LTQuNSAxMi42LTEwLjUgMTAuMi0xMC4yIDE2LTE4LjMgMTQuMy0yMC0xLjctMS43LTkuNSAzLjgtMjAgMTQuMy02IDYtNy42IDguNi0xMC41IDEyLjZsMy42IDMuNloiIGZpbGw9IiMzMjRBNUUiLz48cGF0aCBkPSJtNzggMzkuOCA1LjcgNS43LjUtLjUgMS40LTEuNC01LjYtNS43LTEuNCAxLjQtLjYuNVptMTAuNS01LjdjLS41LjItMS4yLjctMS43IDEuNC0xLjIgMS4yLTEuOSAyLjQtMS43IDIuOS41LjUgMS43LS41IDIuOS0xLjcuNy0uNyAxLjItMS4yIDEuNC0xLjdsNi4yLTYuMiAxLjQgMS40YzEuNy0yLjYgMi4xLTQuNSAxLjQtNS0uNS0uNS0yLjYtLjItNSAxLjRsMS42IDEuNi02LjUgNS45WiIgZmlsbD0iI0ZGQzY1QiIvPjwvZz48ZyBmaWxsPSIjRkZGIj48cGF0aCBkPSJtNDkuNiAzNi40LTMuOC0zLjlIMTh2LTFoMjguMmw0LjIgNC4xeiIvPjwvZz48ZyBmaWxsPSIjRkZGIj48cGF0aCBkPSJtNDkuNiA1MC40LTMuOC0zLjlIMTh2LTFoMjguMmw0LjIgNC4xeiIvPjwvZz48ZyBmaWxsPSIjRkZGIj48cGF0aCBkPSJtNDkuNiA2NC40LTMuOC0zLjlIMTh2LTFoMjguMmw0LjIgNC4xeiIvPjwvZz48L2c+PC9zdmc+"},39221:function(gt,wt,fe){"use strict";var ie=fe(59301),Ge=Object.defineProperty,De=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ve=(Ee,Ne,ze)=>Ne in Ee?Ge(Ee,Ne,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Ee[Ne]=ze,Te=(Ee,Ne)=>{for(var ze in Ne||(Ne={}))Ze.call(Ne,ze)&&ve(Ee,ze,Ne[ze]);if(De)for(var ze of De(Ne))xe.call(Ne,ze)&&ve(Ee,ze,Ne[ze]);return Ee};const Ie=Ee=>React.createElement("svg",Te({width:72,height:80,xmlns:"http://www.w3.org/2000/svg"},Ee),React.createElement("title",null,"\u6587\u4EF6 "),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fill:"#F0A221",d:"M62.698 79.631H.04V8.534h39.22l23.438 18.332z"}),React.createElement("path",{d:"M71.387 71.1H8.73V.005h44.326l18.337 18.03v53.067h-.005ZM53.331 7.336v11.48h11.48L53.33 7.335Zm-8.367 6.536H17.938v4.623h27.026V13.87ZM62.26 27.024H17.857v4.623H62.26v-4.623Zm0 13.551H17.857v4.623H62.26v-4.623Zm0 13.158H17.857v4.623H62.26v-4.623Z",fill:"#F1C84C"})));wt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iODAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsPSIjRjBBMjIxIiBkPSJNNjIuNjk4IDc5LjYzMUguMDRWOC41MzRoMzkuMjJsMjMuNDM4IDE4LjMzMnoiLz48cGF0aCBkPSJNNzEuMzg3IDcxLjFIOC43M1YuMDA1aDQ0LjMyNmwxOC4zMzcgMTguMDN2NTMuMDY3aC0uMDA1Wk01My4zMzEgNy4zMzZ2MTEuNDhoMTEuNDhMNTMuMzMgNy4zMzVabS04LjM2NyA2LjUzNkgxNy45Mzh2NC42MjNoMjcuMDI2VjEzLjg3Wk02Mi4yNiAyNy4wMjRIMTcuODU3djQuNjIzSDYyLjI2di00LjYyM1ptMCAxMy41NTFIMTcuODU3djQuNjIzSDYyLjI2di00LjYyM1ptMCAxMy4xNThIMTcuODU3djQuNjIzSDYyLjI2di00LjYyM1oiIGZpbGw9IiNGMUM4NEMiLz48L2c+PC9zdmc+"},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 gt={},wt="5.0",fe={},ie=null,Ge=!1,De=!1,Ze=null,xe=!1,ve=null,Te=null,Ie=0;Ie<arguments.length;Ie++){var Ee=arguments[Ie];if(Ee!==null)switch(typeof Ee){case"number":wt=Ee.toFixed(1);break;case"string":Ee.match(new RegExp("^[0-9]\\.[0-9]+$"))?wt=Ee:Ze=Ee;break;case"object":typeof Ee.is3D!="undefined"?ie=Ee:fe=Ee;break;case"boolean":Ge=Ee,De=!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&&!De&&(Ge=!0)),Ze!==null&&fe.id===void 0&&(fe.id=Ze);var Ne="",ze="",je=!1,pt=null,We=null,Le=null,Ae=!1,Ce=null,Oe=null,He=null,Ue=null,nt=null;fe.height!==void 0&&(fe.height=Math.round(fe.height)),fe.width!==void 0&&(fe.width=Math.round(fe.width));var rt=function(Se){return parseFloat(Se)>4?parseFloat(Se):5};gt.setHTML5Codebase=function(Se,Re){Te=Se,we(Se,Re)},gt.setJavaCodebase=gt.setJavaCodebaseVersion=gt.isCompiledInstalled=gt.setPreCompiledScriptPath=gt.setPreCompiledResourcePath=function(){},gt.setHTML5CodebaseVersion=function(Se,Re){var it=parseFloat(Se);if(it!==NaN&&it<5){console.log("The GeoGebra HTML5 codebase version "+it+" is deprecated. Using version latest instead.");return}ve=Se,de(Se,Re)},gt.getHTML5CodebaseVersion=function(){return We},gt.getParameters=function(){return fe},gt.setFontsCSSURL=function(Se){Ue=Se},gt.setGiacJSURL=function(Se){},gt.setJNLPFile=function(Se){Ne=Se},gt.setJNLPBaseDir=function(Se){},gt.inject=function(){function Se(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Re="auto",it=fe.id,yt,$e=!1,ut=0;ut<arguments.length;ut++){var et=arguments[ut];typeof et=="string"?(et=et.toLowerCase(),et.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Re=et:it=arguments[ut]):typeof et=="boolean"?$e=et:et instanceof HTMLElement&&(yt=et)}Nt();function Nt(){if(!xe){setTimeout(Nt,200);return}Re=ai(Re);var Gt=yt||document.getElementById(it);if(!Gt){console.log("possibly bug on ajax loading? ");return}if(gt.removeExistingApplet(Gt,!1),fe.width===void 0&&Gt.clientWidth&&(fe.width=Gt.clientWidth),fe.height===void 0&&Gt.clientHeight&&(fe.height=Gt.clientHeight),!(fe.width&&fe.height)&&Re==="html5"&&(delete fe.width,delete fe.height),pt=Re,Re==="screenshot")Ye(Gt,fe);else{var se=!1;fe.hasOwnProperty("playButton")&&fe.playButton||fe.hasOwnProperty("clickToLoad")&&fe.clickToLoad?se=!0:fe.hasOwnProperty("playButtonAutoDecide")&&fe.playButtonAutoDecide&&(se=(!tt()||Se())&&at()),se?(pt="screenshot",Ve(Gt,fe,$e,Re)):lt(Gt,fe,$e)}}};function tt(){try{return window.self!==window.top}catch(Se){return!0}}function at(){return fe.hasOwnProperty("screenshotGenerator")&&fe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gt.getViews=function(){return ie},gt.isJavaInstalled=function(){return!1};var Et=function(Se){var Re=function(ut){var et=JSON.parse(ut),Nt=function(te){return te.type=="G"||te.type=="E"},Gt=et.elements?et.elements.filter(Nt)[0]:et;if(!Gt||!Gt.url){it();return}fe.fileName=Gt.url,ft(Gt.settings||{}),ie.is3D=!0;var se="https://www.geogebra.org/images/";gt.setPreviewImage(Ce||Gt.previewUrl,se+"GeoGebra_loading.png",se+"applet_play.png"),Se()},it=function(){fe.onError&&fe.onError(),Pe("Error: Fetching material (id "+fe.material_id+") failed.",fe)},yt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",$e="/materials/"+fe.material_id+"?scope=basic";qe("https://"+yt+"/api/proxy.php?path="+encodeURIComponent($e),Re,it)};function ft(Se){var Re=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(it){Se[it]=!!Se[it]}),Re.forEach(function(it){fe[it]===void 0&&Se[it]!==void 0&&(fe[it]=Se[it])}),fe.showToolBarHelp===void 0&&(fe.showToolBarHelp=fe.showToolBar)}function qe(Se,Re,it){var yt=new XMLHttpRequest;yt.open("GET",Se),yt.onload=function(){Re(yt.responseText)},yt.onerror=it,yt.send()}gt.isHTML5Installed=function(){return!0},gt.getLoadedAppletType=function(){return pt},gt.setPreviewImage=function(Se,Re,it){Ce=Se,Oe=Re,He=it},gt.removeExistingApplet=function(Se,Re){var it;typeof Se=="string"&&(Se=document.getElementById(Se)),pt=null;var yt=null;for(it=0;it<Se.childNodes.length;it++){var $e=Se.childNodes[it],ut=$e.className;ut==="applet_screenshot"?Re?($e.style.display="block",pt="screenshot"):$e.style.display="none":ut!=="applet_scaler prerender"&&(Se.removeChild($e),yt=ut&&ut.indexOf("appletParameters")!=-1?$e.id:null,it--)}var et=fe.id!==void 0?fe.id:yt,Nt=window[et];Nt&&typeof Nt.getBase64=="function"&&(Nt.remove(),window[et]=null)},gt.refreshHitPoints=function(){if(rt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Se=gt.getAppletObject();return Se&&typeof Se.recalculateEnvironments=="function"?(Se.recalculateEnvironments(),!0):!1},gt.startAnimation=function(){var Se=gt.getAppletObject();return Se&&typeof Se.startAnimation=="function"?(Se.startAnimation(),!0):!1},gt.stopAnimation=function(){var Se=gt.getAppletObject();return Se&&typeof Se.stopAnimation=="function"?(Se.stopAnimation(),!0):!1},gt.getAppletObject=function(){var Se=fe.id!==void 0?fe.id:"ggbApplet";return window[Se]},gt.resize=function(){};var vt=function(Se,Re,it){var yt=document.createElement("param");yt.setAttribute("name",Re),yt.setAttribute("value",it),Se.appendChild(yt)},Fe=function(Se){return Se&&Se!=="false"},lt=function(Se,Re,it){rt(We)<=4.2&&(it=!0);var yt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==We||ggbHTML5LoadedCodebaseIsWebSimple&&!Ae)&&(yt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var $e=document.createElement("div");$e.classList.add("appletParameters","notranslate");var ut=Re.width,et=Re.height;if(Re.disableAutoScale=Re.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Re.disableAutoScale,Re.width!==void 0)if(rt(We)<=4.4)Fe(Re.showToolBar)&&(Re.height-=7),Fe(Re.showAlgebraInput)&&(Re.height-=37),Re.width<605&&Fe(Re.showToolBar)&&(Re.width=605,ut=605);else{var Nt=100;(Fe(Re.showToolBar)||Fe(Re.showMenuBar))&&(Re.hasOwnProperty("customToolBar")&&(Re.customToolbar=Re.customToolBar),Nt=Fe(Re.showMenuBar)?245:155),ut<Nt&&(Re.width=Nt,ut=Nt)}$e.style.border="none",$e.style.display="inline-block";for(var Gt in Re)Re.hasOwnProperty(Gt)&&Gt!=="appletOnLoad"&&$e.setAttribute("data-param-"+Gt,Re[Gt]);Ue&&$e.setAttribute("data-param-fontscssurl",Ue),gt.resize=function(){GGBAppletUtils.responsiveResize(Se,Re)},window.addEventListener("resize",function(Vt){gt.resize()});var se=typeof Re.appletOnLoad=="function"?Re.appletOnLoad:function(){};if(!it&&Re.width!==void 0){Re.hasOwnProperty("showSplash")||$e.setAttribute("data-param-showSplash","false");var te=Se.querySelector(".applet_scaler.prerender"),ee=te!==null;if(ee)var oe=te.querySelector(".ggb_preview");else{var oe=si(ut,et,Re.borderColor,!1);te=document.createElement("div"),te.className="applet_scaler",te.style.position="relative",te.style.display="block",te.style.width=ut+"px",te.style.height=et+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(te,"66%"),rt(We)>=5?(Re.appletOnLoad=function(Vt){var Ut=Se.querySelector(".ggb_preview");Ut&&Ut.parentNode.removeChild(Ut),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),se(Vt)},ee||te.appendChild(oe)):$e.appendChild(oe),te.appendChild($e),ee||Se.appendChild(te),setTimeout(function(){gt.resize()},1)}else{var ce=document.createElement("div");ce.className="applet_scaler",ce.style.position="relative",ce.style.display="block",ce.appendChild($e),Se.appendChild(ce),Re.appletOnLoad=function(Vt){gt.resize(),se(Vt)}}function ne(Vt,Ut){Ut&&typeof Ut.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Vt,Ut.appletOnLoad):renderGGBElement(Vt),Pe("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ut)}function Me(Vt,Ut){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Vt,params:Ut}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Ei){ne(Ei.article,Ei.params)}),html5AppletsToProcess=null)},rt(We)<5&&(Vt.className+=" geogebraweb")):ne(Vt,Ut)}if(yt){scriptLoadStarted=!0;for(var Je=0;Je<$e.childNodes.length;Je++){var At=$e.childNodes[Je].tagName;At==="TABLE"&&($e.removeChild($e.childNodes[Je]),Je--)}if(ggbHTML5LoadedScript!==null){var bt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');bt!=null&&bt.parentNode.removeChild(bt)}var It=document.createElement("script"),ei=function(){Me($e,Re)};It.src=ze+Le,ggbHTML5LoadedCodebaseIsWebSimple=Ae,ggbHTML5LoadedCodebaseVersion=We,ggbHTML5LoadedScript=It.src,Pe("GeoGebra HTML5 codebase loaded: '"+ze+"'.",Re),!Te&&(!ve||ve=="5.0")?(Ae?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ei()):ze.requirejs?__webpack_require__.e(981).then(function(){var Vt=[__webpack_require__(60981)];ei.apply(null,Vt)}.bind(this)).catch(__webpack_require__.oe):(It.onload=ei,Se.appendChild(It))}else Me($e,Re);Re.height=et,Re.width=ut},Ye=function(Se,Re,it){var yt=si(Re.width,Re.height,Re.borderColor,it),$e=document.createElement("div");$e.style.position="relative",$e.style.display="block",$e.style.width=Re.width+"px",$e.style.height=Re.height+"px",$e.className="applet_screenshot applet_scaler"+(it?" applet_screenshot_play":""),$e.appendChild(yt);var ut=GGBAppletUtils.getScale(Re,Se,it);it?(Se.appendChild(jt()),window.GGBT_wsf_view||(Se.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner($e,"66%"),Se.appendChild($e),ut!==1&&!isNaN(ut)&&(GGBAppletUtils.scaleElement($e,ut),$e.style.width=Re.width+"px",$e.style.height=Re.height+"px",$e.parentNode.style.width=Re.width*ut+"px",$e.parentNode.style.height=Re.height*ut+"px"),gt.resize=function(){st(Se,yt,$e,it)},window.addEventListener("resize",function(et){gt.resize()}),gt.resize()};function st(Se,Re,it,yt){if(Se.contains(Re)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Se.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Se)}var $e=GGBAppletUtils.getScale(fe,Se,yt);it.parentNode!==null&&(!isNaN($e)&&$e!==1?(GGBAppletUtils.scaleElement(it,$e),it.parentNode.style.width=fe.width*$e+"px",it.parentNode.style.height=fe.height*$e+"px"):(GGBAppletUtils.scaleElement(it,1),it.parentNode.style.width=fe.width+"px",it.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Se),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gt.onExitFullscreen=function(Se,Re){Re.appendChild(Se)};var Ve=function(Se,Re,it,yt){Ye(Se,Re,!0);for(var $e=function(){var Nt=[];for(et=0;et<Se.childNodes.length;et++)Nt.push(Se.childNodes[et]);if(window.GGBT_wsf_view){var Gt=window.GGBT_wsf_view.renderFullScreen(Se,Re.id),se=document.getElementById("fullscreencontainer"),te=jQuery(Se).find(".fullscreencontent");te.length>0?(Gt.remove(),te.attr("id","fullscreencontent").show(),jQuery(se).append(te),window.dispatchEvent(new Event("resize"))):lt(Gt,Re,!1),window.GGBT_wsf_view.launchFullScreen(se)}else pt=yt,lt(Se,Re,!1);if(!window.GGBT_wsf_view)for(et=0;et<Nt.length;et++)Se.removeChild(Nt[et])},ut=Se.getElementsByClassName("ggb_preview_play"),et=0;et<ut.length;et++)ut[et].addEventListener("click",$e,!1),ut[et].addEventListener("ontouchstart",$e,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Se),at()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},jt=function(){var Se=document.createElement("div");if(Se.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Re='.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");}',it=document.createElement("style");it.styleSheet?it.styleSheet.cssText=Re:it.appendChild(document.createTextNode(Re)),document.getElementsByTagName("head")[0].appendChild(it)}return Se},si=function(Se,Re,it,yt){var $e=document.createElement("div");$e.className="ggb_preview",$e.style.position="absolute",$e.style.zIndex="90",$e.style.width=Se-2+"px",$e.style.height=Re-2+"px",$e.style.top="0px",$e.style.left="0px",$e.style.overflow="hidden",$e.style.backgroundColor="white";var ut="lightgrey";it!==void 0&&(it==="none"?ut="transparent":ut=it),$e.style.border="1px solid "+ut;var et=document.createElement("img");if(et.style.position="relative",et.style.zIndex="1000",et.style.top="-1px",et.style.left="-1px",Ce!==null&&et.setAttribute("src",Ce),et.style.opacity=.7,Oe!==null){var Nt,Gt,se;if(!yt){Nt=document.createElement("img"),Nt.style.position="absolute",Nt.style.zIndex="1001",Nt.style.opacity=1,et.style.opacity=.3,Gt=360,Gt>Se/4*3&&(Gt=Se/4*3),se=Gt/5.8,Nt.setAttribute("src",Oe),Nt.setAttribute("width",Gt),Nt.setAttribute("height",se);var te=(Se-Gt)/2,ee=(Re-se)/2;Nt.style.left=te+"px",Nt.style.top=ee+"px",$e.appendChild(Nt)}}return $e.appendChild(et),$e},ai=function(Se){return Se=Se.toLowerCase(),Se==="html5"||Se==="screenshot"?Se:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],de=function(Se,Re){if(We=Se,Re){we(We,!0);return}var it=!Ge;if(it){var yt=rt(We);!isNaN(yt)&&yt<4.4&&(it=!1)}var $e,ut;window.location.protocol.substr(0,4)==="http"?$e=window.location.protocol:$e="http:";var et=We.indexOf("//");et>0?ut=We:et===0?ut=$e+We:ut="https://www.geogebra.org/apps/5.2.814.0/";for(var Nt in me)if(We.slice(me[Nt].length*-1)===me[Nt]||We.slice((me[Nt].length+1)*-1)===me[Nt]+"/"){we(ut,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&it&&!ie.is3D&&!ie.AV&&!ie.SV&&!ie.CV&&!ie.EV2&&!ie.CP&&!ie.PC&&!ie.DA&&!ie.FI&&!ie.PV&&!Fe(fe.showToolBar)&&!Fe(fe.showMenuBar)&&!Fe(fe.showAlgebraInput)&&!Fe(fe.enableRightClick)&&(!fe.appName||fe.appName=="classic")?ut+="webSimple/":ut+="web3d/",we(ut,!1)},we=function(Se,Re){if(Se.requirejs){ze=Se;return}Se.slice(-1)!=="/"&&(Se+="/"),ze=Se,Re===null&&(Re=Se.indexOf("http")===-1),je=Re,Le="web.nocache.js",Ae=!1;var it=ze.split("/");it.length>1&&(!Re&&it[it.length-2]==="webSimple"?(Le="webSimple.nocache.js",Ae=!0):me.indexOf(it[it.length-2])>=0&&(Le=it[it.length-2]+".nocache.js")),it=Se.split("/"),We=it[it.length-3],We.substr(0,4)==="test"?We=We.substr(4,1)+"."+We.substr(5,1):(We.substr(0,3)==="war"||We.substr(0,4)==="beta")&&(We="5.0");var yt=parseFloat(We);yt!==NaN&&yt<5&&Se.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+yt+" is deprecated. Using version latest instead."),de("5.0",Re))},Pe=function(Se,Re){window.console&&window.console.log&&(!Re||typeof Re.showLogging=="undefined"||Re.showLogging&&Re.showLogging!=="false")&&console.log(Se)};fe.material_id!==void 0?Et(mt):mt();function mt(){var Se=wt;ve!==null?Se=ve:parseFloat(Se)<5&&(Se="5.0"),de(Se,!1),Te!==null&&we(Te,je),xe=!0}return gt},GGBAppletUtils=function(){"use strict";function gt(){return window.GGBT_wsf_edit!==void 0}function wt(xe,ve){ve!=1?(xe.style.transformOrigin="0% 0% 0px",xe.style.webkitTransformOrigin="0% 0% 0px",xe.style.transform="scale("+ve+","+ve+")",xe.style.webkitTransform="scale("+ve+","+ve+")",xe.style.maxWidth="initial",xe.querySelector(".ggb_preview")!==null&&(xe.querySelector(".ggb_preview").style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),xe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(xe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(xe.style.transform="none",xe.style.webkitTransform="none")}function fe(xe,ve,Te,Ie,Ee,Ne){var ze=null;if(Ne!=null&&Ne!="")for(var je=xe.parentNode;je!=null;)if((" "+je.className+" ").indexOf(" "+Ne+" ")>-1){ze=je;break}else je=je.parentNode;var pt=0,We=0,Le=0,Ae=0,Ce=0,Oe=0,He=0;if(ze)pt=ze.offsetWidth,We=Math.max(Ie?ze.offsetWidth:0,ze.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(pt=Math.min(window.innerWidth,document.documentElement.clientWidth),We=Math.min(window.innerHeight,document.documentElement.clientHeight),Le=pt):(pt=window.innerWidth,We=window.innerHeight,Le=window.innerWidth),xe){var Ue=xe.getBoundingClientRect();Ue.left>0&&Ue.left<=pt&&(Ee===void 0||!Ee)&&(document.dir==="rtl"?(Ce=pt-Ue.width-Ue.left,Oe=Le<=480?10:30):(Oe=Ue.left,Ce=Le<=480?10:30),Ae=Oe+Ce)}if(xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var nt=xe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ae=40,He=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ae=0,He=40)}}return xe&&((Te===void 0||!Te)&&ve>0&&ve+Ae<pt?pt=ve:pt-=Ae,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Te===void 0||!Te)&&(We-=He)),{width:pt,height:We}}function ie(xe,ve,Te,Ie,Ee){if(xe.isScreenshoGenerator)return 1;var Ne=Ie!==void 0&&Ie,ze=xe.noScaleMargin!=null&&xe.noScaleMargin,je=function(nt){return nt&&nt!=="false"},pt=je(xe.autoHeight),We=fe(ve,xe.width,Te,pt,Ne&&window.GGBT_wsf_view||ze,Ee),Le=parseInt(We.width),Ae=xe.width,Ce=xe.height;if(Ae===void 0){var Oe=ve.querySelector(".appletParameters");Oe&&(Ae=Oe.offsetWidth,Ce=Oe.offsetHeight)}var He=Le/Ae,Ue=Ne?1:We.height/Ce;return Te!==void 0&&!Te&&(He=Math.min(1,He),Ue=Math.min(1,Ue)),Math.min(He,Ue)}function Ge(xe,ve,Te){var Ie=1,Ee,Ne=!1;if(xe.hasOwnProperty("allowUpscale")&&(Ne=xe.allowUpscale),xe.hasOwnProperty("scale")&&(Ie=parseFloat(xe.scale),(isNaN(Ie)||Ie===null||Ie===0)&&(Ie=1),Ie>1&&(Ne=!0)),ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ne=!0),!(xe.hasOwnProperty("disableAutoScale")&&xe.disableAutoScale))Ee=ie(xe,ve,Ne,Te,xe.scaleContainerClass);else return Ie;return Ne&&(!xe.hasOwnProperty("scale")||Ie===1)?Ee:Math.min(Ie,Ee)}function De(xe){var ve=Math.min(window.innerWidth,document.documentElement.clientWidth),Te=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=xe.getBoundingClientRect(),Ee=(ve-Ie.width)/2,Ne=(Te-Ie.height)/2;Ne<0&&(Ne=0),xe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee<40?xe.style.left="40px":xe.style.left=Ee+"px",xe.style.top=Ne+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ne<40?xe.style.top="40px":xe.style.top=Ne+"px",xe.style.left=Ee+"px")}function Ze(xe,ve){var Te=xe.querySelector(".appletParameters");if(Te){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ve.id!==Te.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(xe)}if(Te.parentElement&&/fullscreen/.test(Te.parentElement.className))return;var Ie=Ge(ve,xe);gt()&&Te.setAttribute("data-param-scale",Ie);for(var Ee=null,Ne=0;Ne<xe.childNodes.length;Ne++)if(xe.childNodes[Ne].className!==void 0&&xe.childNodes[Ne].className.match(/^applet_scaler/)){Ee=xe.childNodes[Ne];break}if(Ee!==null&&Ee.querySelector(".noscale")!==null)return;var ze=ve.id!==void 0?ve.id:"ggbApplet",je=window[ze];(je==null||!je.recalculateEnvironments)&&Ee!==null&&!Ee.className.match(/fullscreen/)&&(Ee.parentNode.style.transform="",!isNaN(Ie)&&Ie!==1?(Ee.parentNode.style.width=ve.width*Ie+"px",Ee.parentNode.style.height=ve.height*Ie+"px",wt(Ee,Ie)):(wt(Ee,1),Ee.parentNode.style.width=ve.width+"px",Ee.parentNode.style.height=ve.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&De(xe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Te).parents(".content-added-content"))}}return{responsiveResize:Ze,isFlexibleWorksheetEditor:gt,positionCenter:De,getScale:Ge,scaleElement:wt}}();__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 gt=n.location.search;return gt.indexOf(J)!=-1||gt.indexOf(K)!=-1}function q(gt,wt){}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(gt){var wt=s[L].bindings;s[L].bindings=function(){for(var fe=wt?wt():{},ie=gt[webModule.__softPermutationId],Ge=O;Ge<ie.length;Ge++){var De=ie[Ge];fe[De[O]]=De[P]}return fe}};var t;function u(){return v(),t}function v(){if(!t){var gt=o.createElement(Q);if(gt.id=L,gt.style.cssText=R+S,gt.tabIndex=-1,o.body.appendChild(gt),t=gt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var wt=document.compatMode==U?V:W;t.write(wt+X),t.close()}}}function w(gt){function wt(ie){function Ge(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var De=Ge();if(De){ie();return}function Ze(){if(!De){if(!Ge())return;De=!0,ie(),o.removeEventListener&&o.removeEventListener(Z,Ze,!1),xe&&clearInterval(xe)}}o.addEventListener&&o.addEventListener(Z,Ze,!1);var xe=setInterval(function(){Ze()},$)}function fe(ie){var Ge=u(),De=Ge.body,Ze=Ge.createElement(_);Ze.language=ab,Ze.crossOrigin=W,Ze.src=ie,webModule.__errFn&&(Ze.onerror=function(){webModule.__errFn(L,new Error(bb+ie))}),De.appendChild(Ze)}wt(function(){fe(gt)})}webModule.__startLoadingFragment=function(gt){return C(gt)},webModule.__installRunAsyncCode=function(gt){var wt=u(),fe=wt.body,ie=wt.createElement(_);ie.language=ab,ie.text=gt,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(gt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(gt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(gt){var wt=c[gt];return wt==null?null:wt},r=d,webModule.__errFn=e}function B(){function gt(xe){var ve=xe.lastIndexOf(rb);ve==-1&&(ve=xe.length);var Te=xe.indexOf(sb);Te==-1&&(Te=xe.length);var Ie=xe.lastIndexOf(tb,Math.min(Te,ve));return Ie>=O?xe.substring(O,Ie+P):W}function wt(xe){if(!xe.match(/^\w+:\/\//)){var ve=o.createElement(ub);ve.src=xe+vb,xe=gt(ve.src)}return xe}function fe(){var xe=__gwt_getMetaProperty(wb);return xe!=null?xe:W}function ie(){for(var xe=o.getElementsByTagName(_),ve=O;ve<xe.length;++ve)if(xe[ve].src.indexOf(xb)!=-1)return gt(xe[ve].src);return W}function Ge(){var xe=o.getElementsByTagName(yb);return xe.length>O?xe[xe.length-P].href:W}function De(){var xe=o.location;return xe.href==xe.protocol+zb+xe.host+xe.pathname+xe.search+xe.hash}var Ze=fe();return Ze==W&&(Ze=ie()),Ze==W&&(Ze=Ge()),Ze==W&&De()&&(Ze=gt(o.location.href)),Ze=wt(Ze),Ze}function C(gt){return gt.match(/^\//)||gt.match(/^[a-zA-Z]+:\/\//)?gt:webModule.__moduleBase+gt}function D(){var gt=[],wt=O,fe=[],ie=[];function Ge(xe){var ve=ie[xe](),Te=fe[xe];if(ve in Te)return ve;var Ie=[];for(var Ee in Te)Ie[Te[Ee]]=Ee;throw r&&r(xe,Ie,ve),null}if(__gwt_isKnownPropertyValue=function(xe,ve){return ve in fe[xe]},webModule.__getPropMap=function(){var xe={};for(var ve in fe)fe.hasOwnProperty(ve)&&(xe[ve]=Ge(ve));return xe},webModule.__computePropValue=Ge,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var De;try{De=Cb;var Ze=De.indexOf(Db);Ze!=-1&&(wt=parseInt(De.substring(Ze+P),$),De=De.substring(O,Ze))}catch(xe){}return webModule.__softPermutationId=wt,C(De+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(gt,wt,fe){"use strict";fe.d(wt,{Ax:function(){return Ze},Ds:function(){return xe},KI:function(){return Te},SI:function(){return De},f1:function(){return Ge}});var ie=fe(90524);function Ge(Ie){let Ee=!0;if(Ie.length>0){for(let Ne=0;Ne<Ie.length;Ne++)if(Ie[Ne].compile_success==0||!Ie[Ne].compile_success){Ee=!1;break}}else Ee=!1;return Ee}function De(Ie,Ee=""){let Ne=[];for(let ze=0;ze<Ie.length;ze++){let je=Ie[ze],pt=Ee?`${Ee}/${je.name}`:`${je.name}`;Ne.push({title:je.name,type:je.type,isLeaf:je.type!=="tree",key:pt})}return Ne}function Ze(Ie,Ee,Ne){for(let ze=0;ze<Ie.length;ze++){let je=Ie[ze];if(je.key===Ee){je.children=Ne;break}je.children&&Ze(je.children,Ee,Ne)}return Ie}function xe(Ie,Ee,Ne){let ze;return function(){let je=this,pt=arguments,We=function(){ze=null,Ne||Ie.apply(je,pt)},Le=Ne&&!ze;clearTimeout(ze),ze=setTimeout(We,Ee),Le&&Ie.apply(je,pt)}}const ve=!0,Te=ie.Z.API_SERVER},83071:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return Le}});var ie=fe(59301),Ge={flex_box_center:"flex_box_center___A3pzf",flex_space_between:"flex_space_between___JBoa5",flex_box_vertical_center:"flex_box_vertical_center___MJuIO",flex_box_center_end:"flex_box_center_end___OcjUA",flex_box_column:"flex_box_column___zSH4A",list:"list___KhJas",middle:"middle___IjlYi",row:"row___GGtIx",title:"title___o_xqf",size:"size___OVRoL",download:"download___ZLcIH",preview:"preview___gi0kI",annotation:"annotation___KVSwj"},De=fe(92310),Ze=fe.n(De),xe=fe(41550),ve=fe(6077),Te=fe(49661),Ie=fe(90524),Ee=fe(82093),Ne=fe(34055),ze=fe(76560),je=fe(6767),pt=(Ae,Ce,Oe)=>new Promise((He,Ue)=>{var nt=at=>{try{tt(Oe.next(at))}catch(Et){Ue(Et)}},rt=at=>{try{tt(Oe.throw(at))}catch(Et){Ue(Et)}},tt=at=>at.done?He(at.value):Promise.resolve(at.value).then(nt,rt);tt((Oe=Oe.apply(Ae,Ce)).next())});const We=({className:Ae,style:Ce,dataSource:Oe=[],authority:He=!1,callback:Ue,showDimensions:nt=!0,classroomList:rt})=>{var tt;const[at,Et]=(0,ie.useState)({content:"",type:""}),[ft,qe]=(0,ie.useState)({}),[vt,Fe]=(0,ie.useState)(!1),[lt,Ye]=(0,ie.useState)({title:"",visible:!1,src:"",snapshotData:{}}),st=(0,ie.useRef)(),Ve=me=>pt(void 0,null,function*(){if(qe(me),me.file_type==="txt"){const de=yield(0,Ee.ZP)(me.url,{method:"get",headers:{"Content-Type":"application/xml"}});st.current=de}Et({type:me.file_type,content:Ie.Z.API_SERVER+me.url})}),jt=me=>{var de;Ye({visible:!0,src:Ie.Z.API_SERVER+me.url,id:me.id,title:me.title,snapshotData:(de=me==null?void 0:me.subitem)==null?void 0:de.settings})},si=me=>pt(void 0,null,function*(){var de;Et({type:me.file_type,content:Ie.Z.API_SERVER+((de=me==null?void 0:me.subitem)==null?void 0:de.url)})}),ai=()=>{Ue(),Ye({visible:!1})};return Oe!=null&&Oe.length?ie.createElement(ie.Fragment,null,ie.createElement("div",{className:Ze()(Ge.list,Ae),style:Ce},Oe.map((me,de)=>{var we,Pe,mt;return ie.createElement("div",{key:de,className:Ge.row},ie.createElement("div",{className:Ge.title,onClick:()=>Ve(me)},ie.createElement("i",{className:"iconfont icon-fujian1"}),ie.createElement("span",{title:me.title},me.title)),ie.createElement("div",{className:Ge.size},me.filesize),ie.createElement("div",{className:Ge.download,onClick:()=>{var Se,Re;if((0,Ne.Rm)()&&!((Se=rt.AssistantObject.normal)!=null&&Se.can_download)){je.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(0,Te.Nd)("",`${Ie.Z.API_SERVER}${(Re=me.url)==null?void 0:Re.replace("disposition=inline","")}`)}},ie.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D"),!["other","download"].includes(me==null?void 0:me.file_type)&&ie.createElement("div",{className:Ge.preview,onClick:()=>Ve(me)},ie.createElement("i",{className:"iconfont icon-yulan"}),"\u9884\u89C8"),["image"].includes(me==null?void 0:me.file_type)&&nt&&(He?ie.createElement("div",{className:Ge.annotation,onClick:()=>jt(me)},ie.createElement("i",{className:"iconfont icon-pizhu"}),(we=me.subitem)!=null&&we.id?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"):((Pe=me.subitem)==null?void 0:Pe.id)&&ie.createElement("div",{className:Ge.annotation,onClick:()=>si(me)},ie.createElement("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8")),["image"].includes(me==null?void 0:me.file_type)&&((mt=me.subitem)==null?void 0:mt.id)&&ie.createElement("div",{className:Ge.download,style:{marginLeft:20},onClick:()=>{var Se,Re;(0,Te.Nd)("",`${Ie.Z.API_SERVER}${(Re=(Se=me==null?void 0:me.subitem)==null?void 0:Se.url)==null?void 0:Re.replace("disposition=inline","")}`)}},ie.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D\u6279\u6CE8\u6587\u4EF6"),["office"].includes(me==null?void 0:me.file_type)&&(0,Ne.eB)()&&["xlsx","docx","pptx"].includes(me==null?void 0:me.file_sub)&&nt&&ie.createElement("div",{className:Ge.annotation,onClick:()=>{Fe(!0),Ve(me)}},ie.createElement("i",{className:"iconfont icon-pizhu"}),me.is_edit?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"),me.is_edit&&(0,Ne.dE)()&&nt&&ie.createElement("div",{className:Ge.annotation,onClick:()=>{Ve(me)}},ie.createElement("i",{className:"iconfont icon-sousuo7"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8"))})),ie.createElement(xe.Z,{close:!0,data:at==null?void 0:at.content,type:at==null?void 0:at.type,hasMask:!0,disabledDownload:(0,Ne.Rm)()&&!((tt=rt.AssistantObject.normal)!=null&&tt.can_download),editOffice:vt?"edit":"view",monacoEditor:{value:st.current,language:"txt",onChange:()=>{},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:He&&nt&&at.type==="image"?()=>jt(ft):null,onClose:()=>{Ue(),Fe(!1),Et({content:"",type:""})}}),ie.createElement(ve.Z,{onOk:ai,onClose:()=>Ye({visible:!1}),data:lt,showFullTools:!0})):null};var Le=(0,ze.connect)(({classroomList:Ae})=>({classroomList:Ae}))(We)},6077:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return ze}});var ie=fe(59301),Ge={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},De=fe(92310),Ze=fe.n(De),xe=fe(29787),ve=fe(2859),Te=fe(82093),Ie=fe(49661),Ee=(je,pt,We)=>new Promise((Le,Ae)=>{var Ce=Ue=>{try{He(We.next(Ue))}catch(nt){Ae(nt)}},Oe=Ue=>{try{He(We.throw(Ue))}catch(nt){Ae(nt)}},He=Ue=>Ue.done?Le(Ue.value):Promise.resolve(Ue.value).then(Ce,Oe);He((We=We.apply(je,pt)).next())}),ze=({data:je,className:pt,fullWidth:We,style:Le={},onClose:Ae,onOk:Ce,showFullTools:Oe,noAssociationId:He})=>{const Ue=(0,ie.useRef)(null),nt=(0,ie.useRef)(null),rt=(0,ie.useRef)(null),tt=(0,ie.useRef)(null),[at,Et]=(0,ie.useState)(!1),[ft,qe]=(0,ie.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ie.useEffect)(()=>(rt.current||(rt.current=document.createElement("style"),document.head.appendChild(rt.current)),je!=null&&je.visible?(document.body.setAttribute("data-custom","y-hidden"),rt.current.innerHTML=" html { overflow-y: hidden; }",je!=null&&je.src&&vt()):(document.body.removeAttribute("data-custom"),rt.current&&(document.head.removeChild(rt.current),rt.current=null)),()=>{document.body.removeAttribute("data-custom"),rt.current&&(document.head.removeChild(rt.current),rt.current=null)}),[je==null?void 0:je.visible]);const vt=()=>Ee(void 0,null,function*(){Et(!0),qe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const st=yield(0,Ie.ZJ)(je==null?void 0:je.src);Ue.current.src="",Ue.current.src=st,Ue.current.onload=function(){Ye()},Et(!1),qe("")}),Fe=st=>Ee(void 0,null,function*(){Et(!0),qe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Ve=yield(0,Te.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:je.title,file:st.dataUrl}});Ve!=null&&Ve.id&&!He?(yield(0,Te.ZP)(`/api/attachments/${je.id}/add_subitem.json`,{method:"post",body:{subitem_id:Ve==null?void 0:Ve.id,settings:JSON.stringify(st.state)}})).status===0&&Ce():Ve!=null&&Ve.id&&Ce(Ve),Et(!1),qe("")}),lt=()=>{const st=document.querySelector('a[href="https://markerjs.com/"]');st&&st.parentNode&&(st.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(jt=>{const si=document.querySelector(jt.name);si&&si.setAttribute("title",jt.title)})},Ye=()=>{nt.current=new ve.hP(Ue.current),nt.current.targetRoot=tt.current,nt.current.addEventListener("render",Fe),nt.current.addEventListener("beforeclose",Ae),Oe&&(nt.current.availableMarkerTypes=nt.current.ALL_MARKER_TYPES,nt.current.uiStyleSettings.redoButtonVisible=!0,nt.current.uiStyleSettings.notesButtonVisible=!0,nt.current.uiStyleSettings.zoomButtonVisible=!0,nt.current.uiStyleSettings.zoomOutButtonVisible=!0,nt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=nt.current.uiStyleSettings,nt.current.show(),je!=null&&je.snapshotData&&nt.current.restoreState(je.snapshotData),setTimeout(()=>{window.scrollTo(0,0),lt()},300)};return ie.createElement(ie.Fragment,null,(je==null?void 0:je.visible)&&ie.createElement(xe.Z,{spinning:at,tip:ft,style:{position:"absolute",width:"100vw"}},ie.createElement("div",{ref:tt,className:Ze()(Ge.imageDimensions,pt,We?Ge.fullWidth:""),style:Le},ie.createElement("img",{className:Ge.img,ref:Ue}))))}},88615:function(gt,wt,fe){"use strict";var ie=fe(59301),Ge=fe(77019),De=fe(5269),Ze=fe(20554),xe=fe(99571),ve=fe(38394),Te=fe(21697),Ie=fe(48136),Ee=fe(59301);const Ne=(0,ie.forwardRef)(({callback:ze,showSaveButton:je,value:pt=""},We)=>{const Le=(0,ie.useRef)(),Ae=[{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 "}]}]}],Ce=[{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}`}]}]}],Oe=nt=>{Le.current.setValue(Le.current.getValue()+" "+nt.value+" ")},He=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ee.createElement(Ge.Z,{className:Te.Z.lists,gutter:[10,10]},Ae.map((nt,rt)=>Ee.createElement(De.Z,{flex:"110px",className:Te.Z.item},Ee.createElement("div",null,Ee.createElement(ve.Z,{value:`$$${nt.value}$$`}),nt.name),Ee.createElement("div",{className:Te.Z.children},nt.children.map((tt,at)=>Ee.createElement("div",{key:at},Ee.createElement("h1",null,tt.name),Ee.createElement(Ge.Z,{gutter:[10,10]},tt.data.map((Et,ft)=>Ee.createElement(De.Z,{key:ft,onClick:()=>Oe(Et),className:Te.Z.diamond},Ee.createElement(ve.Z,{value:"`$$"+Et.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ee.createElement(Ge.Z,{className:Te.Z.lists,gutter:[10,10]},Ce.map((nt,rt)=>Ee.createElement(De.Z,{flex:"110px",className:Te.Z.item},Ee.createElement("div",null,Ee.createElement(ve.Z,{value:"`$$"+nt.value+"$$`"}),nt.name),Ee.createElement("div",{className:Te.Z.children},nt.children.map((tt,at)=>Ee.createElement("div",{key:at},tt.name&&Ee.createElement("h1",null,tt.name),Ee.createElement(Ge.Z,{gutter:[10,10]},tt.data.map((Et,ft)=>Ee.createElement(De.Z,{key:ft,onClick:()=>Oe(Et),className:Te.Z.diamond},Ee.createElement(ve.Z,{value:"`$$"+Et.value+"$$`"}))))))))))}],Ue=()=>{var nt=document.createElement("div");nt.innerHTML=Le.current.getValue();var rt=nt.innerText;return ze&&ze(rt),rt};return(0,ie.useImperativeHandle)(We,()=>({getData:Ue})),Ee.createElement("div",{className:Te.Z.mathWrap},Ee.createElement(Ze.default,{defaultActiveKey:"1",items:He}),Ee.createElement("math-field",{locale:"zh_cn",className:Te.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Le,style:{width:800,marginTop:30,fontSize:18}},pt||""),je&&Ee.createElement("div",{className:Te.Z.button},Ee.createElement(xe.ZP,{size:"large",onClick:Ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});wt.Z=Ne},82454:function(gt,wt,fe){"use strict";fe.d(wt,{z:function(){return ai},Z:function(){return me}});var ie=fe(59301),Ge=fe(14566),De=fe(6767),Ze=fe(62957),xe=fe(99571),ve=fe(90524),Te=fe(92725),Ie=Object.defineProperty,Ee=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,je=(de,we,Pe)=>we in de?Ie(de,we,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):de[we]=Pe,pt=(de,we)=>{for(var Pe in we||(we={}))Ne.call(we,Pe)&&je(de,Pe,we[Pe]);if(Ee)for(var Pe of Ee(we))ze.call(we,Pe)&&je(de,Pe,we[Pe]);return de},We=(de,we,Pe)=>new Promise((mt,Se)=>{var Re=$e=>{try{yt(Pe.next($e))}catch(ut){Se(ut)}},it=$e=>{try{yt(Pe.throw($e))}catch(ut){Se(ut)}},yt=$e=>$e.done?mt($e.value):Promise.resolve($e.value).then(Re,it);yt((Pe=Pe.apply(de,we)).next())});const Le="\u3000\u3000";function Ae(de){var we=["Bytes","KB","MB","GB","TB"];if(de==0)return"0 Byte";var Pe=parseInt(""+Math.floor(Math.log(de)/Math.log(1024)),10);return(de/Math.pow(1024,Pe)).toFixed(1)+" "+we[Pe]}var Ce=({value:de=[],action:we,onChange:Pe,className:mt,maxSize:Se=150,title:Re="\u6587\u4EF6\u4E0A\u4F20",accept:it=null})=>{const yt={multiple:!1,fileList:de,accept:it,withCredentials:!0,beforeUpload:ut=>ut.size/1024/1024<Se?!0:(message.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${Se}MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20`),Promise.reject()),action:`${ENV.API_SERVER}/api/attachments.json`,onChange(ut){var et,Nt,Gt,se;let te=[...ut.fileList];if(te=te.map(ee=>(ee.name.indexOf(Le)===-1&&(ee.name=`${ee.name}${Le}${Ae(ee.size)}`),pt({},ee))),ut.file.status==="done"&&((Nt=(et=ut.file)==null?void 0:et.response)==null?void 0:Nt.status)===-1){message.error((se=(Gt=ut.file)==null?void 0:Gt.response)==null?void 0:se.message),Pe([]);return}Pe(te)},onRemove:ut=>We(void 0,null,function*(){const et=ut.size/1024/1024;return ut.status==="uploading"?!0:et<Se&&(ut.response?ut.response.id:ut.uid)?yield removeAttachment(ut.response?ut.response.id:ut.id):!0})};function $e(ut){ut.preventDefault(),ut.stopPropagation()}return React.createElement("div",{className:`single-upload ${mt||""}`},React.createElement(Upload,pt({},yt),React.createElement(Button,{type:"primary",title:de.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:de.length>0,ghost:!0},Re),React.createElement("span",{onClick:$e,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",Se,"M)"," ")))},Oe=fe(61481),He=fe(89392),Ue=Object.defineProperty,nt=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(de,we,Pe)=>we in de?Ue(de,we,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):de[we]=Pe,Et=(de,we)=>{for(var Pe in we||(we={}))rt.call(we,Pe)&&at(de,Pe,we[Pe]);if(nt)for(var Pe of nt(we))tt.call(we,Pe)&&at(de,Pe,we[Pe]);return de};const ft=de=>React.createElement("svg",Et({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},de),React.createElement("title",null,"\u5F62\u72B6"),React.createElement("path",{d:"M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z",fill:"#3061D0",fillRule:"nonzero"}));var qe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",vt=Object.defineProperty,Fe=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,st=(de,we,Pe)=>we in de?vt(de,we,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):de[we]=Pe,Ve=(de,we)=>{for(var Pe in we||(we={}))lt.call(we,Pe)&&st(de,Pe,we[Pe]);if(Fe)for(var Pe of Fe(we))Ye.call(we,Pe)&&st(de,Pe,we[Pe]);return de},jt=(de,we,Pe)=>new Promise((mt,Se)=>{var Re=$e=>{try{yt(Pe.next($e))}catch(ut){Se(ut)}},it=$e=>{try{yt(Pe.throw($e))}catch(ut){Se(ut)}},yt=$e=>$e.done?mt($e.value):Promise.resolve($e.value).then(Re,it);yt((Pe=Pe.apply(de,we)).next())});const{Dragger:si}=Ge.default;function ai(de){let we=[];return de&&de.length>0&&(we=de.map(Pe=>({uid:Pe.id,id:Pe.id,name:Pe.title+Le+Pe.filesize,url:Pe.url,filesize:Pe.filesize,status:"done",response:{id:Pe.id}}))),we}var me=({value:de,onChange:we,action:Pe,data:mt,className:Se,maxSize:Re=150,title:it="\u4E0A\u4F20\u9644\u4EF6",showRemoveModal:yt=!1,accept:$e="",additionalText:ut,isDragger:et,number:Nt=1e3,aloneClear:Gt=!1,realTimeRemove:se=!0,uploadText:te,setFileProgress:ee,showFileProgress:oe})=>{const[ce,ne]=(0,ie.useState)(!1);let[Me,Je]=(0,ie.useState)(de||[]),[At,bt]=(0,ie.useState)(1);(0,ie.useEffect)(()=>{de&&(At===1&&Je([...de]),bt(2),Nt===(de==null?void 0:de.length)&&ne(!0))},[de]);const It=()=>{setTimeout(()=>{Me.pop(),Je([...Me])},500)};oe&&ee(Me.some(Ut=>Ut.status==="uploading"));const ei={multiple:!0,disabled:ce,accept:$e,withCredentials:!0,fileList:Me,beforeUpload:(Ut,Ei)=>{const kn=Ut.size/1024/1024;return Me.concat(Ei).length>Nt?(Me.pop(),Je([...Me]),De.ZP.error(`\u6700\u591A\u53EA\u80FD\u4E0A\u4F20${Nt}\u4E2A\u6587\u4EF6`),Gt?Promise.reject():(It(),!1)):kn<Re?!0:(De.ZP.error(`\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(${Re}MB).`),Gt?Promise.reject():(It(),!1))},data:mt,action:Pe||`${ve.Z.API_SERVER}/api/attachments.json`,onChange(Ut){var Ei,kn,zt,ln;if(Ut.file.status==="removed"?Me=Ut.fileList:Me=(0,He.uniqBy)([...Ut.fileList,...Me],"uid"),Ut.file.status==="done"&&((kn=(Ei=Ut.file)==null?void 0:Ei.response)==null?void 0:kn.status)===-1){De.ZP.error((ln=(zt=Ut.file)==null?void 0:zt.response)==null?void 0:ln.message);return}Me.length>=Nt?ne(!0):ne(!1),Je([...Me]),Me=Me.map(di=>{var vi,_i;return(vi=di==null?void 0:di.response)!=null&&vi.id&&(di.url=(_i=di==null?void 0:di.response)==null?void 0:_i.url),di.name.indexOf(Le)===-1&&(di.name=`${di.name}${Le}${Ae(di.size)}`),Ve({},di)}),console.log("info:",Ut,Me),we(Me)},onRemove:Ut=>jt(void 0,null,function*(){if(!se)return!0;const Ei=()=>jt(void 0,null,function*(){if(Ut.response?Ut.response.id:Ut.id){let zt=yield(0,Te.JZ)(Ut.response?Ut.response.id:Ut.uid);return Promise.resolve(zt)}else return!0});return yt?new Promise((kn,zt)=>{Ze.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ie.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:()=>jt(void 0,null,function*(){const ln=yield Ei();De.ZP.success("\u5220\u9664\u6210\u529F"),kn(!0)}),onCancel:()=>kn(!1)})}):yield Ei()})};function Vt(Ut){Ut.preventDefault(),Ut.stopPropagation()}return ie.createElement("div",{className:`multi-upload ${Se||""}`},et&&ie.createElement(si,Ve({},ei),ie.createElement("p",{className:"ant-upload-drag-icon"},ie.createElement(Oe.Z,null)),ie.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",ie.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",Re,"MB)"," "),ut),!et&&ie.createElement(Ge.default,Ve({},ei),ie.createElement(xe.ZP,{disabled:ce,className:"upload_button"},ie.createElement("img",{className:"aBtn_img",src:qe}),it),ie.createElement("span",{onClick:Vt,className:"upload_text"},te||`(\u5355\u4E2A\u6587\u4EF6\u6700\u5927${Re}MB)`)))}},54657:function(gt,wt,fe){"use strict";fe.d(wt,{h:function(){return Le},x:function(){return Ae}});var ie=fe(2978),Ge=fe(69092),De=fe(38394),Ze=fe(59301),xe=Object.defineProperty,ve=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,ze=(Ce,Oe,He)=>Oe in Ce?xe(Ce,Oe,{enumerable:!0,configurable:!0,writable:!0,value:He}):Ce[Oe]=He,je=(Ce,Oe)=>{for(var He in Oe||(Oe={}))Ee.call(Oe,He)&&ze(Ce,He,Oe[He]);if(Ie)for(var He of Ie(Oe))Ne.call(Oe,He)&&ze(Ce,He,Oe[He]);return Ce},pt=(Ce,Oe)=>ve(Ce,Te(Oe)),We=(Ce,Oe)=>{var He={};for(var Ue in Ce)Ee.call(Ce,Ue)&&Oe.indexOf(Ue)<0&&(He[Ue]=Ce[Ue]);if(Ce!=null&&Ie)for(var Ue of Ie(Ce))Oe.indexOf(Ue)<0&&Ne.call(Ce,Ue)&&(He[Ue]=Ce[Ue]);return He};const Le=Ce=>{var Oe=Ce,{value:He,onChange:Ue,scrollId:nt}=Oe,rt=We(Oe,["value","onChange","scrollId"]);return Ze.createElement("div",{id:nt||""},Ze.createElement(ie.Z,pt(je({},rt),{defaultValue:He,onChange:(tt,at)=>{at!=null&&at.length?Ue(tt,at):Ue(tt)}})))},Ae=({value:Ce,onChange:Oe,placeholder:He,height:Ue=140,isEdit:nt,miniToolbar:rt,watch:tt=!0})=>nt?Ze.createElement(ie.Z,{watch:tt,isFocus:!0,height:Ue||void 0,placeholder:He,defaultValue:Ce,onChange:Oe,miniToolbar:rt}):Ze.createElement("div",{style:{cursor:"pointer"}},Ce?Ze.createElement(De.Z,{className:Ge.Z.inputBorder,value:Ce}):Ze.createElement("div",{className:`${Ge.Z.inputBorder} ${Ge.Z.placeholder} inputBorderError`},He))},44816:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return lt}});var ie=fe(59301),Ge=fe(76560),De=fe(62957),Ze=fe(28284),xe=fe(6767),ve=fe(29787),Te=fe(18287),Ie=fe(77019),Ee=fe(5269),Ne=fe(25399),ze=fe(37568),je={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},pt=fe(98072),We=fe(63423),Le=fe(57884),Ae=fe(71360),Ce=Object.defineProperty,Oe=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,tt=(Ye,st,Ve)=>st in Ye?Ce(Ye,st,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Ye[st]=Ve,at=(Ye,st)=>{for(var Ve in st||(st={}))nt.call(st,Ve)&&tt(Ye,Ve,st[Ve]);if(Ue)for(var Ve of Ue(st))rt.call(st,Ve)&&tt(Ye,Ve,st[Ve]);return Ye},Et=(Ye,st)=>Oe(Ye,He(st)),ft=(Ye,st)=>{var Ve={};for(var jt in Ye)nt.call(Ye,jt)&&st.indexOf(jt)<0&&(Ve[jt]=Ye[jt]);if(Ye!=null&&Ue)for(var jt of Ue(Ye))st.indexOf(jt)<0&&rt.call(Ye,jt)&&(Ve[jt]=Ye[jt]);return Ve},qe=(Ye,st,Ve)=>new Promise((jt,si)=>{var ai=we=>{try{de(Ve.next(we))}catch(Pe){si(Pe)}},me=we=>{try{de(Ve.throw(we))}catch(Pe){si(Pe)}},de=we=>we.done?jt(we.value):Promise.resolve(we.value).then(ai,me);de((Ve=Ve.apply(Ye,st)).next())});const vt=(Ye=[])=>Ye==null?void 0:Ye.map(st=>Et(at({},st),{title:(st==null?void 0:st.value)||"",key:st==null?void 0:st.id,isLeaf:!0})),Fe=Ye=>{var st=Ye,{user:Ve,children:jt,isShowComponent:si=!0,ModalProps:ai={},onDataSelect:me}=st,de=ft(st,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[we,Pe]=De.default.useModal(),[mt]=Ze.default.useForm(),[Se,Re]=(0,ie.useState)([]),[it,yt]=(0,ie.useState)(!1),[$e,ut]=(0,ie.useState)(!1),[,et,Nt,Gt]=(0,pt.U)(We.qE,{page:1,limit:9999}),[,,se]=(0,pt.U)(We.V8,{}),[,,te]=(0,pt.U)(We.B$,{}),[,,ee]=(0,pt.U)(We.DH,{}),[,,oe]=(0,pt.U)(We.bJ,{}),ce=()=>{yt(!1),mt.resetFields(),ut(!1)},ne=Je=>qe(void 0,null,function*(){const{node:At,dragNode:bt,event:It}=Je,ei=Je.node.pos.split("-"),Vt=Je.dropPosition-Number(ei[ei.length-1]);if(Vt==0){xe.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(Vt==1&&(bt==null?void 0:bt.item_index)==(At==null?void 0:At.item_index)+1){xe.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const Ut=yield oe({id:bt==null?void 0:bt.key,position:Vt==-1?1:(bt==null?void 0:bt.item_index)>(At==null?void 0:At.item_index)?(At==null?void 0:At.item_index)+1:At==null?void 0:At.item_index});(Ut==null?void 0:Ut.status)===0&&(xe.ZP.success("\u79FB\u52A8\u6210\u529F"),Nt({},!0))}),Me=Je=>qe(void 0,null,function*(){let At={};$e?At=yield te(at({},Je)):At=yield ee(at({},Je)),(At==null?void 0:At.status)==0&&(xe.ZP.success((At==null?void 0:At.message)||($e?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),Nt({},!0),ce())});return(0,ie.useEffect)(()=>{ai!=null&&ai.open&&Nt({},!0)},[ai==null?void 0:ai.open]),(0,ie.useEffect)(()=>{var Je;Re(vt((Je=Gt==null?void 0:Gt.data)==null?void 0:Je.list))},[Gt]),si?ie.createElement(ie.Fragment,null,Pe,jt,ie.createElement(De.default,at({},at({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},ai)),ie.createElement(ve.Z,{spinning:et},(Se==null?void 0:Se.length)>0?ie.createElement(ie.Fragment,null,ie.createElement(Te.default.DirectoryTree,{height:500,className:je.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:me,treeData:Se,onDrop:ne,titleRender:Je=>ie.createElement(ie.Fragment,null,ie.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},Je==null?void 0:Je.title),ie.createElement("div",{className:`${je.EditDom}`},ie.createElement(Ie.Z,{wrap:!1,align:"middle",gutter:16},ie.createElement(Ee.Z,null,ie.createElement(Ne.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},ie.createElement("i",{className:`iconfont icon-tuodong1 font12 ${je.currentPrimary}`}))),ie.createElement(Ee.Z,null,ie.createElement(Ne.Z,{title:"\u7F16\u8F91"},ie.createElement("i",{className:`iconfont icon-bianji11 font12 ${je.currentPrimary}`,onClick:At=>{At.stopPropagation(),mt.setFieldsValue(at({},Je)),yt(!0)}}))),ie.createElement(Ee.Z,null,ie.createElement(Ne.Z,{title:"\u5220\u9664"},ie.createElement("i",{className:`iconfont icon-shanchu14 font12 ${je.currentDelete}`,onClick:At=>{At.stopPropagation(),we.confirm({icon:null,title:"\u5220\u9664\u5E38\u7528\u8BC4\u8BED",centered:!0,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u5E38\u7528\u8BC4\u8BED\u5417\uFF1F",onOk:()=>qe(void 0,null,function*(){const bt=yield se({id:Je==null?void 0:Je.key});(bt==null?void 0:bt.status)==0&&(xe.ZP.success((bt==null?void 0:bt.message)||"\u5220\u9664\u6210\u529F"),Nt({},!0))})})}}))))))}),ie.createElement(Ae.op,{className:"ml20 mt20",icon:ie.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{ut(!0),yt(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED")):ie.createElement(Le.Z,{styles:{margin:"30px auto"},customText:ie.createElement("span",null,"\u6682\u65E0\u5E38\u7528\u8BC4\u8BED\uFF0C\u4F60\u53EF\u4EE5",ie.createElement("a",{onClick:()=>{ut(!0),yt(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),ie.createElement(De.default,{title:$e?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:it,okText:$e?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{ce()},onOk:()=>{mt.submit()}},ie.createElement(Ze.default,{form:mt,onFinish:Me},$e&&ie.createElement("span",{className:"font14",style:{color:"#191919"}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED\uFF0C\u53EF\u4EE5\u5E2E\u52A9\u4F60\u63D0\u9AD8\u8BC4\u9605\u4F5C\u4E1A\u7684\u6548\u7387"),ie.createElement(Ze.default.Item,{hidden:!0,name:"id"}),ie.createElement(Ze.default.Item,{className:"mt10",name:"value"},ie.createElement(ze.default.TextArea,{placeholder:"\u8F93\u5165\u5E38\u7528\u8BC4\u8BED\u3002\u4F8B\u5982\uFF1A\u4F60\u7684\u7F16\u7A0B\u4F5C\u4E1A\u6574\u4F53\u8868\u73B0\u826F\u597D\uFF0C\u4F46\u4ECD\u6709\u4E00\u4E9B\u5C0F\u7684\u6539\u8FDB\u7A7A\u95F4\u3002",autoSize:{minRows:8,maxRows:9},maxLength:100,showCount:!0}))))):null};var lt=(0,Ge.connect)(({loading:Ye,user:st})=>({user:st,loading:Ye.effects}))(Fe)},39479:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return Ze}});var ie=fe(59301),Ge=fe(33796),De=fe(90083),Ze=()=>{const[xe,ve]=(0,ie.useState)(""),[Te,Ie]=(0,ie.useState)(0);let[Ee,Ne]=(0,ie.useState)(),[ze,je]=(0,ie.useState)();const[pt,We]=(0,ie.useState)(!1),Le=(0,ie.useRef)("");(0,ie.useEffect)(()=>Ge.Z.subscribe("preview-image",ft=>{ve(ft),console.log(tt.current)}),[]),(0,ie.useEffect)(()=>(document.addEventListener("keydown",Ae),()=>{document.removeEventListener("keydown",Ae)}),[]),(0,ie.useEffect)(()=>{Le.current=xe},[xe]);function Ae(Et){console.log("e====",Et),Et.keyCode==27&&Le.current&&Ce()}function Ce(){document.body.style.overflow="auto",Ne(void 0),je(void 0),Ie(0),ve("")}function Oe(){Ie(Te+90)}function He(){Ee=tt.current.width*1.1,ze=tt.current.height*1.1,je(ze),Ne(Ee)}function Ue(){Ee=tt.current.width/1.1,ze=tt.current.height/1.1,je(ze),Ne(Ee)}const nt=(0,ie.useRef)(),rt=(0,ie.useRef)(),tt=(0,ie.useRef)(),at=Et=>{(Et.nativeEvent.target===nt.current||Et.nativeEvent.target===rt.current)&&Ce()};return ie.createElement(ie.Fragment,null,xe?ie.createElement("div",null,ie.createElement("div",{className:"preview-wrp-group",ref:rt},ie.createElement(De.Z,{className:"image-preview",src:xe,style:{display:"none"},preview:{visible:!0,src:xe,onVisibleChange:Et=>{ve("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},44905:function(gt,wt,fe){"use strict";fe.d(wt,{h:function(){return nt}});var ie=fe(59301),Ge=fe(82326),De=fe(28284),Ze=fe(99571),xe=fe(89780),ve=fe.n(xe),Te=fe(66543),Ie=fe(59598),Ee=Object.defineProperty,Ne=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Le=(rt,tt,at)=>tt in rt?Ee(rt,tt,{enumerable:!0,configurable:!0,writable:!0,value:at}):rt[tt]=at,Ae=(rt,tt)=>{for(var at in tt||(tt={}))pt.call(tt,at)&&Le(rt,at,tt[at]);if(je)for(var at of je(tt))We.call(tt,at)&&Le(rt,at,tt[at]);return rt},Ce=(rt,tt)=>Ne(rt,ze(tt));const Oe=Ge.default.Option,He={labelCol:{span:4},wrapperCol:{span:20}},Ue={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"]};wt.Z=({callback:rt,onCancel:tt})=>{const[at,Et]=(0,ie.useState)("python");function ft(vt){Et(Ue[vt][1])}function qe(vt){rt(vt)}return ie.createElement(De.default,Ce(Ae({},He),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:qe,style:{width:500}}),ie.createElement(De.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ie.createElement(Ge.default,{getPopupContainer:vt=>vt.parentNode,onChange:ft},Object.keys(Ue).map(vt=>ie.createElement(Oe,{key:vt,value:vt},Ue[vt][0])))),ie.createElement(De.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ie.createElement(nt,{mode:at})),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Ze.ZP,{type:"ghost",onClick:tt},"\u53D6\u6D88")))};function nt({value:rt,onChange:tt,mode:at,options:Et={}}){const ft=(0,ie.useRef)(),[qe,vt]=(0,ie.useState)();return(0,ie.useEffect)(()=>{if(qe){let Fe=function(lt){const Ye=lt.getValue();tt&&tt(Ye)};return qe.on("change",Fe),()=>{qe.off("change",Fe)}}},[qe,tt]),(0,ie.useEffect)(()=>{qe&&qe.setOption("mode",at)},[qe,at]),(0,ie.useEffect)(()=>{qe&&(rt!==qe.getValue()||rt==="")&&setTimeout(()=>{qe.setValue(rt||"")},300)},[qe,rt]),(0,ie.useEffect)(()=>{if(ft.current&&!qe){const Fe=ve().fromTextArea(ft.current,Ae({mode:at,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Et));vt(Fe)}},[ft.current,qe]),ie.createElement("div",{className:"my-codemirror-container"},ie.createElement("textarea",{ref:ft}))}},2978:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return _r}});var ie=fe(59301),Ge=fe(76560),De=fe(89780),Ze=fe.n(De),xe=fe(76374),ve=fe(66543),Te=fe(6313),Ie=fe(25717),Ee=fe(99498),Ne=fe(25419),ze=fe(67549),je=fe(38394),pt=({value:Zt="",className:qt,showTextOnly:ti,showLines:xi,style:Sn={}})=>{const Fi=(0,ie.useMemo)(()=>"",[Zt]);return ie.createElement(ie.Fragment,null,ie.createElement("div",{dangerouslySetInnerHTML:{__html:Fi}}))},We=Object.defineProperty,Le=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ue=(Zt,qt,ti)=>qt in Zt?We(Zt,qt,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Zt[qt]=ti,nt=(Zt,qt)=>{for(var ti in qt||(qt={}))Oe.call(qt,ti)&&Ue(Zt,ti,qt[ti]);if(Ce)for(var ti of Ce(qt))He.call(qt,ti)&&Ue(Zt,ti,qt[ti]);return Zt},rt=(Zt,qt)=>Le(Zt,Ae(qt));let tt=[{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 at({onActionCallback:Zt,title:qt,icon:ti,actionName:xi,className:Sn="",children:Fi}){function On(){Zt(xi)}return ie.createElement("a",{title:qt,className:Sn,onClick:On},ie.createElement("i",{className:`${ti}`}),Fi)}var Et=({watch:Zt,showNullButton:qt,showNullProgramButton:ti,onActionCallback:xi,fullScreen:Sn,insertTemp:Fi,hidetoolBar:On,extraUse:gn})=>{const vn=[...tt,{title:`${Zt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Zt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ie.createElement("ul",{className:"markdown-toolbar-container"},!On&&vn.map((An,bi)=>ie.createElement("li",{key:bi},An.actionName?ie.createElement(at,rt(nt({},An),{onActionCallback:xi})):ie.createElement("span",{className:"v-line"}))),qt?ie.createElement("li",null,ie.createElement(at,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:xi},ie.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ti?ie.createElement(ie.Fragment,null,ie.createElement("li",null,ie.createElement(at,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:xi},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ie.createElement("li",null,ie.createElement(at,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:xi},ie.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Fi&&ie.createElement("li",null,ie.createElement(at,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Fi}`,onActionCallback:xi},ie.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),gn&&ie.createElement("li",null,gn),ie.createElement("li",{className:"btn-full-screen"},ie.createElement(at,{icon:`${Sn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Sn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:xi})))},ft=fe(75790),qe=fe(28284),vt=fe(37568),Fe=fe(99571),lt=Object.defineProperty,Ye=Object.defineProperties,st=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable,ai=(Zt,qt,ti)=>qt in Zt?lt(Zt,qt,{enumerable:!0,configurable:!0,writable:!0,value:ti}):Zt[qt]=ti,me=(Zt,qt)=>{for(var ti in qt||(qt={}))jt.call(qt,ti)&&ai(Zt,ti,qt[ti]);if(Ve)for(var ti of Ve(qt))si.call(qt,ti)&&ai(Zt,ti,qt[ti]);return Zt},de=(Zt,qt)=>Ye(Zt,st(qt));const we={labelCol:{span:4},wrapperCol:{span:20}};var Pe=({callback:Zt,onCancel:qt})=>{function ti(xi){Zt(xi)}return ie.createElement(qe.default,de(me({},we),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ti,style:{width:500}}),ie.createElement(qe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ie.createElement(vt.default,null)),ie.createElement(qe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ie.createElement(vt.default,null)),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Fe.ZP,{type:"ghost",onClick:qt},"\u53D6\u6D88")))},mt=fe(44905),Se=fe(45596),Re=fe(62957),it=fe(77019),yt=fe(6077),$e=fe(59301),ut=({callback:Zt,onCancel:qt})=>{const ti=document.createElement("canvas"),xi=ti.getContext("2d");ti.width=1e3,ti.height=800,xi.fillStyle="#ffffff",xi.fillRect(0,0,ti.width,ti.height);const Sn=ti.toDataURL("image/png");return $e.createElement(Re.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},$e.createElement(it.Z,{style:{height:"100vh"}},$e.createElement(yt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Sn,visible:!0,title:String(Date.now())},onOk:Fi=>{Zt({src:Fi.url})},onClose:qt})))},et=fe(30641),Nt=fe(5269),Gt=fe(6767),se={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},te=fe(59301),oe=(0,ie.forwardRef)(({onCancel:Zt,editImgId:qt,callback:ti},xi)=>{let Sn=(0,ie.useRef)(),Fi=(0,ie.useRef)(),On=(0,ie.useRef)(),gn=(0,ie.useRef)(!1);const vn=(0,ie.useRef)(!1);console.log("ref:",xi);const[An,bi]=(0,ie.useState)(0),[Ot,yn]=(0,ie.useState)("100vh");return(0,ie.useEffect)(()=>{bi(1)},[]),(0,ie.useImperativeHandle)(xi,()=>({setHeight:yn})),te.createElement("div",{ref:vn,className:"body-overflow-initial"},te.createElement(et.Z,{width:"100vw",height:Ot,footer:null,closable:!0,placement:"bottom",open:!!An,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${se.drawerWrap}`,onClose:()=>{window.saveDrawData(Nn=>{ti({src:`/api/attachments/${Nn}`,id:Nn})})},title:te.createElement(it.Z,{align:"middle"},te.createElement(Nt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),te.createElement(Nt.Z,{onClick:()=>{yn(Ot==="60px"?"100vh":"60px")}},te.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),te.createElement(Nt.Z,{onClick:()=>{window.saveDrawData(Nn=>{if(Nn===null){Gt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Gt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),ti({src:`/api/attachments/${Nn}`,id:Nn,disabledClose:!0})})}},te.createElement(Fe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},te.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${qt||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Fi})))}),ce=fe(90524),ne=fe(47889),Me=fe(71051);const Je=ne.ZP.Group,At={margin:"0 8px"};var bt=({callback:Zt,onCancel:qt})=>{function ti(xi){Zt(xi)}return ie.createElement(qe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ti},ie.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ie.createElement("span",{style:At},"\u5355\u5143\u683C\u6570\uFF1A"),ie.createElement("span",{style:At},"\u884C\u6570"),ie.createElement(qe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ie.createElement(Me.Z,null)),ie.createElement("span",{style:At},"\u5217\u6570"),ie.createElement(qe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ie.createElement(Me.Z,null))),ie.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ie.createElement("span",{style:At},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ie.createElement(qe.default.Item,{name:"align"},ie.createElement(Je,null,ie.createElement(ne.ZP,{value:"default"},ie.createElement("i",{className:"fa fa-align-justify"})),ie.createElement(ne.ZP,{value:"left"},ie.createElement("i",{className:"fa fa-align-left"})),ie.createElement(ne.ZP,{value:"center"},ie.createElement("i",{className:"fa fa-align-center"})),ie.createElement(ne.ZP,{value:"right"},ie.createElement("i",{className:"fa fa-align-right"}))))),ie.createElement("div",{className:"flex-container flex-end"},ie.createElement(Fe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(Fe.ZP,{type:"ghost",onClick:qt},"\u53D6\u6D88")))},It=fe(71411),ei=fe(11081),Vt=fe.n(ei),Ei=(0,ie.forwardRef)(({use3d:Zt,width:qt,height:ti,callback:xi,showSaveButton:Sn},Fi)=>{const On=(0,ie.useRef)(),gn=(0,ie.useRef)(),[vn,An]=(0,ie.useState)(!1),bi=(0,ie.useRef)({id:On,appName:"graphing",width:qt||1e3,height:ti||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)(()=>{gn.current=new(Vt())(bi.current,!0),window.onload=function(){gn.current.inject("applet_container")}},[]);const Ot=()=>{var yn=window.ggbApplet.getPNGBase64(1,!0,72);return xi&&xi(yn),yn};return(0,ie.useEffect)(()=>{bi.current.appName=vn?"3D":"graphing",gn.current.inject("applet_container")},[vn]),(0,ie.useEffect)(()=>{An(Zt)},[Zt]),(0,ie.useImperativeHandle)(Fi,()=>({getImgData:Ot})),ie.createElement(ie.Fragment,null,ie.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:On}),ie.createElement(it.Z,{align:"middle"},ie.createElement(Nt.Z,{flex:1},ie.createElement(It.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:vn,onChange:yn=>An(yn)})),ie.createElement(Nt.Z,null,ie.createElement(Fe.ZP,{size:"large",onClick:Ot,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),kn=fe(88615);const zt="link",ln="upload-image",di="add-flowchart",vi="draw-image",_i="add-flowchart",sr="code-block",Hi="add-table",mn="------------",Qi={default:mn,left:`:${mn}`,center:`:${mn}:`,right:`${mn}:`};var Mo=fe(17904),Gr=fe(49661);function Do(){}let $o=0;const Lo=1e4,Jo="\u2581",to="@\u2581\u2581@",Xo="@\u2581@",ko=`
|
|
**\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`,Ko=["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 xr(Zt){return/^\d+$/.test(Zt)?`${Zt}px`:Zt}const Ao=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",io={[Ao+"-B"]:"bold",[Ao+"-I"]:"italic"},Gi={[zt]:"\u6DFB\u52A0\u94FE\u63A5",[sr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ln]:"\u6DFB\u52A0\u56FE\u7247",[vi]:"\u6DFB\u52A0\u753B\u56FE",[di]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Hi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var _r=({defaultValue:Zt="",onChange:qt,width:ti="100%",height:xi=400,miniToolbar:Sn=!1,isFocus:Fi=!1,watch:On,insertTemp:gn,mode:vn="markdown",id:An="markdown-editor-id",showResizeBar:bi=!1,noStorage:Ot=!1,showNullButton:yn=!1,showNullProgramButton:Nn=!1,hidetoolBar:Un=!1,fullScreen:mi=!1,onBlur:nr,onCMBeforeChange:ur,onFullScreen:no,className:xt="",disablePaste:ni=!1,disabled:ro=!1,disabledFill:oo=!1,placeholder:Ur="",values:Tr="",extraUse:No})=>{const[Qe,yl]=(0,ie.useState)(null),[Zr,wr]=(0,ie.useState)(Zt),[qi,_o]=(0,ie.useState)(On),[rr,Cr]=(0,ie.useState)(mi),[$i,Zn]=(0,ie.useState)(""),[br,ao]=(0,ie.useState)(0),[lo,To]=(0,ie.useState)(xi),[ja,so]=(0,ie.useState)(!1),[qo,ea]=(0,ie.useState)(0),[qn,ta]=(0,ie.useState)(0),Yr=(0,ie.useRef)(),Ir=(0,ie.useRef)(),ot=(0,ie.useRef)(),uo=(0,ie.useRef)(),co=(0,ie.useRef)(),ia=(0,ie.useRef)(),Fr=(0,Ge.useDispatch)();(0,ie.useEffect)(()=>{const Rt=window.scrollY||window.pageYOffset;wr(Tr),Qe==null||Qe.setValue(Tr),window.scrollTo(0,Rt)},[Tr]),(0,ie.useEffect)(()=>{no==null||no(rr)},[rr]),(0,ie.useEffect)(()=>{if(Yr.current){let Rt=function(Wt,_t){var gi;if(ni){_t.preventDefault();return}const wi=_t.clipboardData;if(wi){const zi=wi.types.toString(),ji=wi.items;if(zi==="Files"||wi.types.indexOf("Files")>-1){if(_t.preventDefault(),vn=="stex")return;try{let Si=ji[1];((gi=ji[0])==null?void 0:gi.kind)==="file"&&(Si=ji[0]);const Ji=Si.getAsFile(),cr=Ji.name.split(".").pop();(0,Se.I)(Ji,xn=>{var Jr,hr,Br;xn.id?((Jr=Ji==null?void 0:Ji.type)==null?void 0:Jr.indexOf("image"))>-1?Lt.replaceSelection(`<img width="100%" src="/api/attachments/${xn.id}?type=${xn.content_type})" alt="" />`):((hr=Ji==null?void 0:Ji.type)==null?void 0:hr.indexOf("video"))>-1?Lt.replaceSelection(`<video width="100%" controls src="/api/attachments/${xn.id}"></video>`):((Br=Ji==null?void 0:Ji.type)==null?void 0:Br.indexOf("pdf"))>-1?Lt.replaceSelection(`<a href="/api/attachments/${xn.id}?type=${Ji.type}&disposition=inline" target="_blank">${Ji.name}</a>`):Ko.includes(cr)?Lt.replaceSelection(`<a href="/api/attachments/${xn.id}?type=office&disposition=inline" target="_blank">${Ji.name}</a>`):Lt.replaceSelection(`[${Ji.name}](/api/attachments/${xn.id}?type=${xn.content_type})`):(xn==null?void 0:xn.status)===401&&(document.location.href="/user/login")})}catch(Si){Gt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Lt=Ze().fromTextArea(Yr.current,{mode:vn,lineNumbers:!Sn,lineWrapping:!0,value:Zt,autoCloseTags:!0,autoCloseBrackets:!0});return Lt.on("keyup",function(Wt,_t){_t.keyCode===8&&(Wt.getValue()==""?Lt.setOption("placeholder",Ur):Lt.setOption("placeholder",null))}),Lt.on("keydown",function(Wt,_t){if(_t.keyCode===8){var gi=Io(Wt);gi&&_t.preventDefault()}}),Fi&&Lt.focus(),Lt.on("paste",Rt),ro&&Lt.on("beforeChange",function(Wt,_t){(_t.origin==="paste"||_t.origin==="+input")&&_t.cancel()}),yl(Lt),()=>{Lt.off("paste",Rt)}}},[]);const Vr=(0,ie.useCallback)(()=>{if(Ir.current)try{}catch(Rt){console.log(Rt,"---- to set md editor body height")}},[lo,Ir,rr]);(0,ie.useEffect)(()=>{function Rt(){let Lt=new xe.Z(Wt=>{for(let _t of Wt)(_t.target.offsetHeight>0||_t.target.offsetWidth>0)&&(Vr(),Qe.setSize("100%","100%"),Qe.refresh())});return Lt.observe(Yr.current.parentElement),Lt}if(Qe){const Lt=Rt();return()=>{var Wt,_t;(Wt=Yr.current)!=null&&Wt.parentElement&&Lt.unobserve((_t=Yr.current)==null?void 0:_t.parentElement)}}},[Qe,Vr]),(0,ie.useEffect)(()=>{if(Qe){let Rt=[];for(const[Lt,Wt]of Object.entries(io)){let _t={[Lt]:()=>{Fo(Wt)}};Rt.push(_t),Qe.addKeyMap(_t)}return()=>{for(let Lt of Rt)Qe.removeKeyMap(Lt)}}},[Qe]),(0,ie.useEffect)(()=>{mi!==rr&&Cr(mi)},[mi]),(0,Mo.Z)(()=>{if(!Ot&&br>0){let Rt=new Date().getTime(),Lt=window.sessionStorage.getItem(An);Rt>=br+Lo&&(!Lt||Lt!==Zr)&&(window.sessionStorage.setItem(An,Zr),so(!0))}},Lo),(0,ie.useEffect)(()=>{_o(On)},[Qe,On]),(0,ie.useEffect)(()=>{Qe&&Fi&&Qe.focus()},[Qe,Fi]),(0,ie.useEffect)(()=>{if(qi&&Qe){let Rt=function(Wt){let _t=Wt.target;if(uo.current){let gi=_t.scrollTop/_t.scrollHeight;uo.current.scrollTop=uo.current.scrollHeight*gi}};const Lt=Qe.getScrollerElement();return Lt.addEventListener("scroll",Rt),()=>{Lt.removeEventListener("scroll",Rt)}}},[Qe,qi]),(0,ie.useEffect)(()=>{if(Qe&&ur){let Rt=function(Lt,Wt){ur(Lt,Wt)};return Qe.on("beforeChange",Rt),()=>{Qe.off("beforeChange",Rt)}}},[Qe,ur]),(0,ie.useEffect)(()=>{if(Qe&&nr){let Rt=function(){nr(Qe.getValue())};return Qe.on("blur",Rt),()=>{Qe.off("blur",Rt)}}},[Qe,nr]);function Io(Rt,Lt){var Wt=Rt.getDoc(),_t=Wt.getCursor(),gi=Wt.getLine(_t.line),wi=gi.charAt(_t.ch-1),zi=gi.lastIndexOf("@\u2581@",_t.ch),ji=gi.lastIndexOf("@\u2581\u2581@",_t.ch),Si=zi>ji?zi:ji,Ji=zi>ji?3:4;if(to.indexOf(wi)===-1)return null;if(console.log("change1:",Lt,Rt,gi,_t,Si,zi,ji,wi),Si>=0&&_t.ch-Si<5){var cr=Si+Ji;return Wt.replaceRange("",{line:_t.line,ch:Si},{line:_t.line,ch:cr}),{line:_t.line,ch:cr}}return null}(0,ie.useEffect)(()=>{if(Qe){let Rt=function(Lt,Wt){const _t=Lt.getValue();wr(_t),ao(new Date().getTime()),Lt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qt&&(Nn?qt(_t,$r(_t)):qt(_t))};return Qe.on("change",Rt),()=>{Qe.off("change",Rt)}}},[Qe,qt]),(0,ie.useEffect)(()=>{if(Qe)if(Zt==null)Qe.setValue(""),wr("");else{const Rt=window.scrollY||window.pageYOffset;Zt!==Qe.getValue()&&(Qe.setValue(Zt),wr(Zt),Qe.setCursor(ro?1:Qe.lineCount(),0),window.scrollTo(0,Rt))}},[Qe,Zt]);const Fo=(0,ie.useCallback)(Rt=>{const Lt=Qe.getCursor(),Wt=Qe.getSelection();let _t=Wt.split(`
|
|
`);switch(Rt){case"bold":return Qe.replaceSelection("**"+Wt+"**"),Wt===""&&Qe.setCursor(Lt.line,Lt.ch+2),Qe.focus();case"italic":return Qe.replaceSelection("*"+Wt+"*"),Wt===""&&Qe.setCursor(Lt.line,Lt.ch+1),Qe.focus();case"code":return Qe.replaceSelection("`"+Wt+"`"),Wt===""&&Qe.setCursor(Lt.line,Lt.ch+1),Qe.focus();case"inline-latex":return(0,Gr.Ye)(Fr)?void 0:(Zn("inline-latex"),Qe.focus());case"latex":return Qe.replaceSelection("```latex\n"+Wt+"\n```"),Qe.setCursor(Lt.line+1,Wt.length+1),Qe.focus();case"line-break":return Qe.replaceSelection(`<br/>
|
|
`),Qe.focus();case"list-ul":return Wt===""?Qe.replaceSelection("- "+Wt):Qe.replaceSelection(_t.map(gi=>gi===""?"":`- ${gi}`).join(`
|
|
`)),Qe.focus();case"list-ol":return Wt===""?Qe.replaceSelection("1. "+Wt):Qe.replaceSelection(_t.map((gi,wi)=>gi===""?"":`${wi+1}. ${gi}`).join(`
|
|
`)),Qe.focus();case"add-null-ch":return Wt===""&&Qe.setCursor(Lt.line,Lt.ch),Qe.replaceSelection(Jo),Qe.focus();case"add-signal":return Wt===""&&Qe.setCursor(Lt.line,Lt.ch),Qe.replaceSelection(Xo),Qe.focus();case"add-multiple":return Wt===""&&Qe.setCursor(Lt.line,Lt.ch),Qe.replaceSelection(to),Qe.focus();case"inster-template-1":return Wt===""&&Qe.setCursor(Lt.line,Lt.ch),Qe.replaceSelection(ko),Qe.focus();case"eraser":return Qe.setValue(""),Qe.focus();case"trigger-watch":return _o(!qi),Qe.focus();case"trigger-full-screen":return Cr(!rr),Qe.focus();case zt:Zn(zt);return;case sr:Zn(sr);return;case ln:Zn(ln);return;case vi:Zn(vi);return;case"maths-latex":if((0,Gr.Ye)(Fr))return;Zn("maths-latex");return;case di:co.current="",sessionStorage.removeItem("file_id"),Zn(di);return;case Hi:Zn(Hi);return;default:throw new Error}},[Qe,qi,rr]),en=(0,ie.useCallback)((Rt,Lt)=>{var Wt,_t,gi,wi,zi,ji;Rt!=null&&Rt.disabledClose||Zn("");const{src:Si,alt:Ji,id:cr}=Rt||{};switch($i){case zt:const{title:za,link:wl}=Rt;return Qe.replaceSelection(`[${za}](${wl})`),Qe.focus();case sr:const{language:Ra,content:Wa}=Rt;return Qe.replaceSelection(["```"+Ra,Wa,"```"].join(`
|
|
`)),Qe.focus();case"maths-latex":for(var xn=atob(Rt),Jr=new Uint8Array(xn.length),hr=0;hr<xn.length;hr++)Jr[hr]=xn.charCodeAt(hr);var Br=new Blob([Jr],{type:"image/png"});(0,Se.I)(Br,zn=>{zn.id?Qe.replaceSelection(``):(zn==null?void 0:zn.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Gr.Ye)(Fr))return;Qe.replaceSelection("`$$"+Rt+"$$`");break;case _i:if(!cr)return;Qe.getValue().indexOf(Si)===-1?Qe.replaceSelection(`<center><img id="${cr}" width="80%" src="${Si}" class="draw-flowchart" alt="${Ji||""}" /></center>`):document.getElementById(cr).src=ce.Z.API_SERVER+Si+"?t="+Date.now();break;case ln:case vi:const Ii=Lt,Ha=(gi=(_t=(Wt=Ii==null?void 0:Ii.name)==null?void 0:Wt.split("."))==null?void 0:_t.pop)==null?void 0:gi.call(_t);return((wi=Ii==null?void 0:Ii.type)==null?void 0:wi.indexOf("image"))>-1||!(Ii!=null&&Ii.type)?Ii!=null&&Ii.align||Ii!=null&&Ii.width?Qe.replaceSelection(`<p style="text-align:${Ii.align||"initial"}"><img width="${Ii.width?Ii.width+"%":"initial"}" src="${Si}" alt="${Ji||""}" /></p>`):Qe.replaceSelection(`<img width="100%" src="${Si}" alt="${Ji||""}" />`):((zi=Ii==null?void 0:Ii.type)==null?void 0:zi.indexOf("video"))>-1?Qe.replaceSelection(`<video width="100%" controls src="${Si}"></video>`):((ji=Ii==null?void 0:Ii.type)==null?void 0:ji.indexOf("pdf"))>-1?Qe.replaceSelection(`<a href="${Si}?type=${Ii.type}&disposition=inline" target="_blank">${Ii.name}</a>`):Ko.includes(Ha)?Qe.replaceSelection(`<a href="${Si}?type=office&disposition=inline" target="_blank">${Ii.name}</a>`):Qe.replaceSelection(`[${Ii.name}](${Si})`),Qe.focus();case Hi:const{row:na,col:Or,align:Pr}=Rt;let ra=`
|
|
`;for(let zn=0;zn<na;zn++){let oa=[],Er=[];for(let Ui=0;Ui<Or;Ui++)zn===1&&Er.push(Qi[Pr]),oa.push(" ");zn===1&&(ra+=`| ${Er.join(" | ")} |
|
|
`),ra+=`| ${oa.join(Or===1?"":" | ")} |
|
|
`}return Qe.replaceSelection(ra+`
|
|
`),Qe.focus();default:throw new Error}},[Qe,$i]),ho=(0,ie.useMemo)(()=>{switch($i){case zt:return ie.createElement(Pe,{callback:en,onCancel:Yn});case sr:return ie.createElement(mt.Z,{callback:en,onCancel:Yn});case ln:return ie.createElement(Se.Z,{callback:en,onCancel:Yn});case di:return ie.createElement(oe,{editImgId:co.current,callback:en,onCancel:Yn});case Hi:return ie.createElement(bt,{callback:en,onCancel:Yn});case"maths-latex":return ie.createElement(Ei,{showSaveButton:!0,callback:en});case"inline-latex":return ie.createElement(kn.Z,{showSaveButton:!0,callback:en});default:return null}},[$i]);function Yn(){Zn("")}(0,ie.useEffect)(()=>{if(ot.current){let Rt=function(zi){gi=!0,wi=zi.pageY},Lt=function(){gi=!1},Wt=function(zi){if(gi){let ji=zi.pageY-wi;ji<0&&(ji=0),ji>300&&(ji=300);let Si=xi+ji+"px";To(Si)}},_t=ot.current,gi=!1,wi=0;return _t.addEventListener("mousedown",Rt),document.addEventListener("mousemove",Wt),document.addEventListener("mouseup",Lt),()=>{_t.removeEventListener("mousedown",Rt),document.removeEventListener("mousemove",Wt),document.removeEventListener("mouseup",Lt)}}},[Qe,ot]),(0,ie.useEffect)(()=>{To(xi)},[xi]);const Pn=xr(ti),Qr=xr(lo),jr={width:Pn,height:Qr},Ba=(0,ie.useMemo)(()=>{if(br){let Rt=new Date(br),Lt=Rt.getHours(),Wt=Rt.getMinutes(),_t=Rt.getSeconds();return Lt=Lt<10?"0"+Lt:Lt,Wt=Wt<10?"0"+Wt:Wt,_t=_t<10?"0"+_t:_t,`${Lt}:${Wt}:${_t}`}return 0},[br]),$r=Rt=>{const Lt=[];if(Nn){let Wt=-1;Rt=Rt.replace(/(@▁▁@|@▁@)/g,function(_t,gi,wi){Lt.push({multiLine:_t!==Xo})})}return Lt};function xl(){window.sessionStorage.removeItem(An),so(!1),ao(0)}function Oa(){so(!1),ao(0),Qe.setValue(window.sessionStorage.getItem(An))}(0,ie.useEffect)(()=>{Gi[$i]&&$i!==vi&&$i!==di&&setTimeout(()=>{const Rt=document.getElementsByClassName("markdown-popup-form")[0],Lt=window.innerWidth/2-Rt.offsetWidth/2,Wt=window.innerHeight/2-Rt.offsetHeight/2;ea(Lt),ta(Wt)},0)},[$i]);const Vn=Rt=>{Rt.preventDefault();const Lt=Rt.clientX-qo,Wt=Rt.clientY-qn;document.body.onmousemove=_t=>{let gi=_t.clientX-Lt,wi=_t.clientY-Wt;const zi=document.getElementsByClassName("markdown-popup-form")[0],ji=window.innerWidth-zi.offsetWidth,Si=window.innerHeight-zi.offsetHeight;gi=Math.max(0,Math.min(gi,ji)),wi=Math.max(0,Math.min(wi,Si)),Pa(_t.clientX,_t.clientY,Lt,Wt)&&(ea(gi),ta(wi))},document.body.onmouseup=function(){document.body.onmousemove=null}},Pa=(Rt,Lt,Wt,_t)=>{const gi=document.body.clientHeight,wi=document.body.clientWidth;return Rt<20&&Wt>Rt||Rt>wi-20&&Wt<Rt||Lt<20&&_t>Lt||Lt>gi-20&&_t<Lt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ie.createElement(ie.Fragment,null,ie.createElement("div",{className:"markdown-editor-wrapper",ref:Ir},ie.createElement("div",{className:`markdown-editor-container ${xt} ${qi?"on-preview":""} ${Sn?"mini":""} ${rr?"full-screen":""}`,style:jr},ie.createElement(Et,{insertTemp:gn,watch:qi,fullScreen:rr,showNullButton:yn,showNullProgramButton:Nn,onActionCallback:Fo,hidetoolBar:Un,extraUse:No}),ie.createElement("div",{className:"markdown-editor-body"},ie.createElement("div",{className:"codemirror-container"},ie.createElement("textarea",{ref:Yr,placeholder:Ur})),qi?ie.createElement("div",{ref:uo,className:"preview-container"},vn==="stex"&&ie.createElement(pt,{value:Zr}),vn!=="stex"&&ie.createElement(je.Z,{edit:!0,disabledFill:oo,showProgramFill:Nn,value:Zr,openEditor:Rt=>{var Lt;co.current=Rt,(Lt=ia.current)==null||Lt.setHeight("100vh"),setTimeout(()=>{Zn("add-flowchart")},150)}})):null))),bi?ie.createElement("a",{ref:ot,className:"editor-resize"}):null,$i===vi&&ie.createElement(ut,{callback:en,onCancel:Yn}),$i===di&&ie.createElement(oe,{ref:ia,editImgId:co.current,callback:en,onCancel:Yn}),ie.createElement(ft.Z,null,Gi[$i]&&$i!==vi&&$i!==di?ie.createElement(Re.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:qo,top:qn},title:ie.createElement("div",{style:{cursor:"move"},onMouseDown:Vn},Gi[$i]),open:!0,onCancel:Yn,footer:null,destroyOnClose:!0,width:$i===di?"1200px":null,height:$i===di?"80vh":null,className:"markdown-popup-form"},ho):null))}},45596:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return tt},I:function(){return Et}});var ie=fe(28284),Ge=fe(6767),De=fe(37568),Ze=fe(77736),xe=fe(71051),ve=fe(47889),Te=fe(99571),Ie=fe(67303),Ee=fe(59301),Ne=fe(59301),ze=Object.defineProperty,je=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Ce=(ft,qe,vt)=>qe in ft?ze(ft,qe,{enumerable:!0,configurable:!0,writable:!0,value:vt}):ft[qe]=vt,Oe=(ft,qe)=>{for(var vt in qe||(qe={}))Le.call(qe,vt)&&Ce(ft,vt,qe[vt]);if(We)for(var vt of We(qe))Ae.call(qe,vt)&&Ce(ft,vt,qe[vt]);return ft},He=(ft,qe)=>je(ft,pt(qe));const{useForm:Ue}=ie.default,nt={width:280,marginRight:10},rt={labelCol:{span:5},wrapperCol:{span:19}};var tt=({callback:ft,onCancel:qe})=>{const[vt]=Ue();let Fe=(0,Ee.useRef)();function lt(Ve){Fe.current.width=vt.getFieldValue("width"),Fe.current.align=vt.getFieldValue("align"),ft(Ve,Fe.current)}function Ye(Ve,jt){if(Ve.status===-1){Ge.ZP.error(Ve.message);return}vt.setFieldsValue({src:`/api/attachments/${Ve.id}`,type:jt.type})}function st(Ve){let jt=Ve.target.files[0];Fe.current=jt,Et(jt,Ye)}return Ne.createElement(ie.default,He(Oe({form:vt},rt),{className:"upload-image-panel",onFinish:lt,style:{width:470,overflow:"hidden"}}),Ne.createElement(ie.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Ne.createElement("div",{className:"flex-container"},Ne.createElement(ie.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Ne.createElement(De.default,{style:nt})),Ne.createElement(at,{onFileChange:st}))),Ne.createElement(ie.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Ne.createElement(De.default,{style:{width:264}})),Ne.createElement(ie.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Ne.createElement(Ze.Z,null,Ne.createElement(ie.default.Item,{name:"width",style:{margin:0}},Ne.createElement(xe.Z,{style:{width:264}})),Ne.createElement("span",{className:"ml8"},"%"))),Ne.createElement(ie.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Ne.createElement(ve.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"}]})),Ne.createElement("aside",null,Ne.createElement(ie.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Ne.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ne.createElement(Te.ZP,{type:"default",onClick:qe},"\u53D6\u6D88"))))};function at({onFileChange:ft}){return Ne.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Ne.createElement("input",{type:"file",onChange:ft}))}function Et(ft,qe){if(!ft)throw new String("\u6CA1\u6709\u6587\u4EF6");let vt=new FormData;vt.append("editormd-image-file",ft),vt.append("file_param_name","editormd-image-file"),vt.append("byxhr","true");var Fe=new window.XMLHttpRequest;Fe.withCredentials=!0,Fe.addEventListener("load",function(lt){qe(JSON.parse(lt.target.responseText),ft)},!1),Fe.addEventListener("error",function(lt){console.error(lt)},!1),Fe.open("POST",`${Ie.KI}/api/attachments.json`),Fe.send(vt)}},75790:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return De}});var ie=fe(59301),Ge=fe(4676);class De extends ie.Component{constructor(xe){super(xe);const ve=window.document;this.node=ve.createElement("div"),ve.body.appendChild(this.node)}render(){const{children:xe}=this.props;return(0,Ge.createPortal)(xe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},17904:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return Ge}});var ie=fe(59301);function Ge(De,Ze){const xe=(0,ie.useRef)();(0,ie.useEffect)(()=>{xe.current=De}),(0,ie.useEffect)(()=>{function ve(){xe.current()}if(Ze!==null){let Te=setInterval(ve,Ze);return()=>clearInterval(Te)}},[Ze])}},53612:function(gt,wt,fe){"use strict";fe.r(wt),fe.d(wt,{default:function(){return Dl}});var ie=fe(59301),Ge=fe(76560),De=fe(28284),Ze=fe(62957),xe=fe(6767),ve=fe(99571),Te=fe(75727),Ie=fe(25399),Ee=fe(20554),Ne=fe(29787),ze=fe(62673),je=fe(54172),pt=fe(37568),We=fe(39479),Le=fe(82093),Ae=fe(2978),Ce=fe(33796),Oe=fe(41550),He=fe(56656),Ue=fe.n(He),nt=fe(90524),rt=fe(45278),tt=fe(71051),at=Object.defineProperty,Et=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,vt=(be,pe,he)=>pe in be?at(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Fe=(be,pe)=>{for(var he in pe||(pe={}))ft.call(pe,he)&&vt(be,he,pe[he]);if(Et)for(var he of Et(pe))qe.call(pe,he)&&vt(be,he,pe[he]);return be},lt=(be,pe,he)=>new Promise((Ft,$t)=>{var Kt=kt=>{try{Jt(he.next(kt))}catch(ht){$t(ht)}},ui=kt=>{try{Jt(he.throw(kt))}catch(ht){$t(ht)}},Jt=kt=>kt.done?Ft(kt.value):Promise.resolve(kt.value).then(Kt,ui);Jt((he=he.apply(be,pe)).next())});const Ye=({shixunHomeworks:be,dispatch:pe})=>{const he=(0,Ge.useParams)(),[Ft,$t]=(0,ie.useState)(!0),[Kt]=De.default.useForm();return ie.createElement(ie.Fragment,null,ie.createElement(Ze.default,{centered:!0,title:"\u8C03\u5206",open:be.actionTabs.key==="\u8C03\u5206",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>lt(void 0,null,function*(){yield Kt.validateFields();const ui=Kt.getFieldsValue();(yield(0,Le.ZP)(`/api/student_works/${be.actionTabs.id}/adjust_score.json`,{method:"post",body:Fe({},ui)})).status===0&&(xe.ZP.success("\u8BC4\u9605\u6210\u529F"),Kt.resetFields(),pe({type:"shixunHomeworks/setActionTabs",payload:{}}),pe({type:"shixunHomeworks/getStudentWorkCommon",payload:Fe({},he)}))}),onCancel:()=>{pe({type:"shixunHomeworks/setActionTabs",payload:{}})}},ie.createElement("p",{className:"tc"},"\u8BE5\u5B66\u751F\u7684\u6700\u7EC8\u6210\u7EE9\u5C06\u4E0D\u4F1A\u6309\u7167\u8BC4\u5206\u89C4\u5219\u8FDB\u884C\u8BA1\u7B97"),ie.createElement(De.default,{form:Kt,layout:"horizontal"},ie.createElement("div",{style:{display:"flex",alignItems:"baseline"}},ie.createElement(De.default.Item,{label:"\u6210\u7EE9",name:"score",rules:[{required:!0,message:"\u8BF7\u8F93\u5165!"}]},ie.createElement(tt.Z,{min:0,placeholder:"\u8BF7\u586B\u5199\u5206\u6570"})),ie.createElement("span",{className:"ml10"},"\u5206")),ie.createElement("div",null,ie.createElement(De.default.Item,{name:"comment"},ie.createElement(pt.default.TextArea,{placeholder:"\u8BF7\u586B\u5199\u60A8\u5BF9\u4F5C\u54C1\u8C03\u5206\u7684\u539F\u56E0",rows:8}))))))};var st=(0,Ge.connect)(({shixunHomeworks:be})=>({shixunHomeworks:be}))(Ye),Ve={flex_box_center:"flex_box_center___tMwax",flex_space_between:"flex_space_between___8GJsg",flex_box_vertical_center:"flex_box_vertical_center___IFELt",flex_box_center_end:"flex_box_center_end___IrFRG",flex_box_column:"flex_box_column___s0LgG",TabsStyle:"TabsStyle___r0bwM",bg:"bg___sFhaA",title:"title___bk4oD",nextComment:"nextComment___NmNBo",modal:"modal___tWPO8",MdEditor:"MdEditor___AAxeb",ratewarp:"ratewarp___NGrsd",item:"item___Le8W0",total:"total___MNh4V",a1:"a1___g1iJT",a2:"a2___h8k2X",a3:"a3___yk1km",export_type_modal_title:"export_type_modal_title___nMqX0",export_type_modal:"export_type_modal___dbFVU",export_type_modal_con:"export_type_modal_con___ujWeL",type_item:"type_item___oF9R5",type_item_active:"type_item_active___dfBaM",export_type_modal_waring:"export_type_modal_waring___k8RaP",ReviewStyle:"ReviewStyle___o5d5N",left_content:"left_content___Tdt77",left_title:"left_title___V11QV",see_work:"see_work___HAfMs",left_list:"left_list___sXmxX",list_title:"list_title___NmWRs",list_box:"list_box___nK01J",list_item:"list_item___rrWl_",item_img:"item_img___yMYSc",item_content:"item_content___ZJr_4",item_name:"item_name___PkA99",item_code:"item_code___g13cU",item_states:"item_states___Rwb1r",center_top:"center_top___hgoJF",center_top_title:"center_top_title___rVfnl",center_top_content:"center_top_content___Wfmlt",right_content:"right_content___nMMjC",right_form:"right_form___ahOzz",work_score:"work_score___sJRnv",work_img:"work_img___p6zO4",work_button:"work_button___NDoqh",pingyue:"pingyue___PDoT9",pingyue_title:"pingyue_title___Wsqbg",pingyue_score:"pingyue_score___kvMiC",pingyue_teacher_title:"pingyue_teacher_title___lyJ0m",top_content:"top_content___mJifP",top_content_img:"top_content_img___vbTWm",item_tags:"item_tags___K9Qrr",daochu:"daochu___WdJvT",foldClose:"foldClose___DQSiP",foldOpen:"foldOpen___J18go",ScoreDetailsBase:"ScoreDetailsBase___UG7u2",lastAdd:"lastAdd___T9F0p",btnAdd:"btnAdd___GCat1",buttonStyle:"buttonStyle___jWXWa",hiddenBar:"hiddenBar___ZRZYH",apply:"apply___WQ6t7"},jt=fe(38394),si=fe(89392),ai=fe(82454),me=fe(59301),de=Object.defineProperty,we=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,it=(be,pe,he)=>pe in be?de(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,yt=(be,pe)=>{for(var he in pe||(pe={}))Se.call(pe,he)&&it(be,he,pe[he]);if(mt)for(var he of mt(pe))Re.call(pe,he)&&it(be,he,pe[he]);return be},$e=(be,pe)=>we(be,Pe(pe)),ut=(be,pe,he)=>new Promise((Ft,$t)=>{var Kt=kt=>{try{Jt(he.next(kt))}catch(ht){$t(ht)}},ui=kt=>{try{Jt(he.throw(kt))}catch(ht){$t(ht)}},Jt=kt=>kt.done?Ft(kt.value):Promise.resolve(kt.value).then(Kt,ui);Jt((he=he.apply(be,pe)).next())});const et=({classroomList:be,loading:pe,dispatch:he,studentWorkDetail:Ft})=>{const $t=(0,Ge.useParams)(),[Kt]=De.default.useForm(),ui=()=>ut(void 0,null,function*(){var Jt;yield Kt.validateFields();const kt=yt({},Kt.getFieldValue()),{selectArrs:ht}=be.actionTabs;kt.attachment_ids=(Jt=kt.attachment_ids)==null?void 0:Jt.map(Bi=>Bi.response.id),(yield(0,rt.mz)($e(yt({},kt),{homeworkId:ht.work_id}))).status===0&&(Kt.resetFields(),he({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:yt({},be.actionTabs.params)}),he({type:"classroomList/setActionTabs",payload:{}}))});return me.createElement(Ze.default,{centered:!0,title:"\u8865\u4EA4\u9644\u4EF6",open:be.actionTabs.key==="\u8865\u4EA4\u9644\u4EF6",bodyStyle:{minHeight:200},onOk:()=>ut(void 0,null,function*(){if(Ft!=null&&Ft.can_submit){if(!(Ft!=null&&Ft.submit_size)){xe.ZP.warning("\u60A8\u7684\u4F5C\u54C1\u63D0\u4EA4\u673A\u4F1A\u5DF2\u7528\u5B8C\u3002\u5982\u9700\u7EE7\u7EED\u4FEE\u6539\uFF0C\u8BF7\u8054\u7CFB\u6307\u5BFC\u8001\u5E08\u6216\u5E73\u53F0\u8FD0\u8425\u3002");return}Ze.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,width:472,content:me.createElement(me.Fragment,null,"\u4F60\u8FD8\u6709 ",me.createElement("span",{className:"ml5 mr5",style:{color:"#DF711C"}},Ft==null?void 0:Ft.submit_size)," \u6B21\u63D0\u4EA4\u673A\u4F1A\u3002\u786E\u8BA4\u63D0\u4EA4\u540E\uFF0C\u4E0A\u4E00\u6B21\u7684\u63D0\u4EA4\u8BB0\u5F55\u4F1A\u88AB\u8986\u76D6\u3002\u8BF7\u6CE8\u610F\uFF0C\u5230\u8FBE\u89C4\u5B9A\u7684\u63D0\u4EA4\u6B21\u6570\u540E\u5C06\u4E0D\u53EF\u518D\u6B21\u63D0\u4EA4\uFF0C\u786E\u5B9A\u662F\u5426\u63D0\u4EA4\uFF1F"),onOk:()=>{ui()}});return}ui()}),onCancel:()=>{Kt.resetFields(),he({type:"classroomList/setActionTabs",payload:{}})}},me.createElement(De.default,{form:Kt,initialValues:{}},me.createElement(De.default.Item,{name:"attachment_ids",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u9644\u4EF6"}]},me.createElement(ai.Z,null)),me.createElement(De.default.Item,{name:"description"},me.createElement(pt.default.TextArea,{placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u8865\u4EA4\u9644\u4EF6\u7684\u539F\u56E0\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26",rows:7}))))};var Nt=(0,Ge.connect)(({classroomList:be,loading:pe})=>({classroomList:be,loading:pe}))(et),Gt=fe(49661),se=fe(34055),te=fe(39221),ee=fe(39832),oe=fe(98072),ce=fe(57884),ne=fe(83071),Me=fe(77019),Je=fe(5269),At=fe(51502),bt={pinfen:"pinfen____hgN7",left:"left___ZyTXs",right:"right___OSPEM",tagStyleSzz:"tagStyleSzz___fzxbk",headpic:"headpic___d7fnl",new_style_box:"new_style_box___XOWhi",box_child:"box_child___uYxgt",box_item_top:"box_item_top___MohWv",yichang:"yichang___ppIPI",text_style:"text_style___V3FT_",text_style_red:"text_style_red___reUfY",btnWarp:"btnWarp___n5eYa",active:"active___JVU0m",feedbackSty:"feedbackSty___CeTDz"},It=fe(54657),ei=fe(44816),Vt=fe(46383),Ut=Object.defineProperty,Ei=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,ln=(be,pe,he)=>pe in be?Ut(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,di=(be,pe)=>{for(var he in pe||(pe={}))kn.call(pe,he)&&ln(be,he,pe[he]);if(Ei)for(var he of Ei(pe))zt.call(pe,he)&&ln(be,he,pe[he]);return be};const vi=be=>React.createElement("svg",di({width:14,height:13,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u661F\u5F62"),React.createElement("path",{d:"m7 10.5-4.114 2.163.785-4.581L.343 4.837l4.6-.669L7 0l2.057 4.168 4.6.669-3.328 3.245.785 4.581z",fill:"#FA6400",fillRule:"evenodd"}));var _i="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcgMTAuNS00LjExNCAyLjE2My43ODUtNC41ODFMLjM0MyA0LjgzN2w0LjYtLjY2OUw3IDBsMi4wNTcgNC4xNjggNC42LjY2OS0zLjMyOCAzLjI0NS43ODUgNC41ODF6IiBmaWxsPSIjRkE2NDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",sr=Object.defineProperty,Hi=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Mo=(be,pe,he)=>pe in be?sr(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Gr=(be,pe)=>{for(var he in pe||(pe={}))mn.call(pe,he)&&Mo(be,he,pe[he]);if(Hi)for(var he of Hi(pe))Qi.call(pe,he)&&Mo(be,he,pe[he]);return be};const Do=be=>React.createElement("svg",Gr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u62A5\u544A"),React.createElement("path",{d:"M3.629 14a2.38 2.38 0 0 1-2.373-2.373V4.311a.057.057 0 0 0-.06-.06H.564A.542.542 0 0 1 0 3.737V1.691C0 .76.81 0 1.81 0h8.868c.999 0 1.809.81 1.81 1.81v7.563a.057.057 0 0 0 .059.06h1.997a.557.557 0 0 1 .563.563v2.185a1.81 1.81 0 0 1-1.809 1.81L3.628 14Zm8.927-3.56a.057.057 0 0 0-.059.06v1.69a.81.81 0 0 0 1.622 0V10.5a.057.057 0 0 0-.06-.06h-1.503ZM2.314 4.252a.057.057 0 0 0-.06.06v7.306a1.377 1.377 0 0 0 1.375 1.375h7.959c.02 0 .04-.012.049-.03a.063.063 0 0 0 0-.06 1.814 1.814 0 0 1-.148-.721V1.819a.81.81 0 0 0-1.622 0v1.918a.536.536 0 0 1-.563.514h-6.99Zm-.505-3.243c-.445 0-.81.307-.81.683v1.502a.058.058 0 0 0 .059.06h7.741a.057.057 0 0 0 .06-.06V1.82c0-.248.05-.494.148-.722.01-.02 0-.04 0-.059a.054.054 0 0 0-.05-.03H1.81Zm2.314 9.462a.504.504 0 1 1 0-1.008H9.62a.504.504 0 1 1 0 1.008H4.123Zm0-2.689a.504.504 0 0 1 0-1.008H9.62a.504.504 0 1 1 0 1.008H4.123Z",fill:"#3061D0",fillRule:"nonzero"}));var $o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMuNjI5IDE0YTIuMzggMi4zOCAwIDAgMS0yLjM3My0yLjM3M1Y0LjMxMWEuMDU3LjA1NyAwIDAgMC0uMDYtLjA2SC41NjRBLjU0Mi41NDIgMCAwIDEgMCAzLjczN1YxLjY5MUMwIC43Ni44MSAwIDEuODEgMGg4Ljg2OGMuOTk5IDAgMS44MDkuODEgMS44MSAxLjgxdjcuNTYzYS4wNTcuMDU3IDAgMCAwIC4wNTkuMDZoMS45OTdhLjU1Ny41NTcgMCAwIDEgLjU2My41NjN2Mi4xODVhMS44MSAxLjgxIDAgMCAxLTEuODA5IDEuODFMMy42MjggMTRabTguOTI3LTMuNTZhLjA1Ny4wNTcgMCAwIDAtLjA1OS4wNnYxLjY5YS44MS44MSAwIDAgMCAxLjYyMiAwVjEwLjVhLjA1Ny4wNTcgMCAwIDAtLjA2LS4wNmgtMS41MDNaTTIuMzE0IDQuMjUyYS4wNTcuMDU3IDAgMCAwLS4wNi4wNnY3LjMwNmExLjM3NyAxLjM3NyAwIDAgMCAxLjM3NSAxLjM3NWg3Ljk1OWMuMDIgMCAuMDQtLjAxMi4wNDktLjAzYS4wNjMuMDYzIDAgMCAwIDAtLjA2IDEuODE0IDEuODE0IDAgMCAxLS4xNDgtLjcyMVYxLjgxOWEuODEuODEgMCAwIDAtMS42MjIgMHYxLjkxOGEuNTM2LjUzNiAwIDAgMS0uNTYzLjUxNGgtNi45OVptLS41MDUtMy4yNDNjLS40NDUgMC0uODEuMzA3LS44MS42ODN2MS41MDJhLjA1OC4wNTggMCAwIDAgLjA1OS4wNmg3Ljc0MWEuMDU3LjA1NyAwIDAgMCAuMDYtLjA2VjEuODJjMC0uMjQ4LjA1LS40OTQuMTQ4LS43MjIuMDEtLjAyIDAtLjA0IDAtLjA1OWEuMDU0LjA1NCAwIDAgMC0uMDUtLjAzSDEuODFabTIuMzE0IDkuNDYyYS41MDQuNTA0IDAgMSAxIDAtMS4wMDhIOS42MmEuNTA0LjUwNCAwIDEgMSAwIDEuMDA4SDQuMTIzWm0wLTIuNjg5YS41MDQuNTA0IDAgMCAxIDAtMS4wMDhIOS42MmEuNTA0LjUwNCAwIDEgMSAwIDEuMDA4SDQuMTIzWiIgZmlsbD0iIzMwNjFEMCIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+";const Lo=({handleCloseOrOpenModal:be,dataInfo:pe,isShowButton:he=!0,className:Ft=""})=>{const $t=()=>{if(pe!=null&&pe.teacher_score&&(pe==null?void 0:pe.teacher_score)>=0)return ie.createElement(ie.Fragment,null,"\u6559\u5E08\u8BC4\u5206",ie.createElement("span",{style:{color:"#CA7720"}},pe==null?void 0:pe.teacher_score));if(pe!=null&&pe.teaching_asistant_score&&(pe==null?void 0:pe.teaching_asistant_score)>=0)return ie.createElement(ie.Fragment,null,"\u52A9\u6559\u8BC4\u5206",ie.createElement("span",{style:{color:"#CA7720"}},pe==null?void 0:pe.teaching_asistant_score));if(pe!=null&&pe.student_score&&(pe==null?void 0:pe.student_score)>=0)return ie.createElement(ie.Fragment,null,"\u533F\u8BC4\u8BC4\u5206",ie.createElement("span",{style:{color:"#CA7720"}},pe==null?void 0:pe.student_score))};return ie.createElement(ie.Fragment,null,ie.createElement("div",{className:`${Ve.work_score} ${Ft}`},ie.createElement("div",{style:{color:"#191919",fontWeight:600}},"\u4F5C\u4E1A\u5F97\u5206"),ie.createElement("div",{className:Ve.work_img},ie.createElement("div",{style:{height:"40px",lineHeight:"50px",fontSize:"24px",color:"#009C0F",fontWeight:600}},(pe==null?void 0:pe.work_score)||"--",ie.createElement("span",{style:{fontSize:"14px"}},"\u5206")),ie.createElement("div",{style:{fontSize:"12px",color:"#666666"}},"\u6700\u7EC8\u6210\u7EE9")),ie.createElement("img",{src:_i}),ie.createElement("div",{style:{marginLeft:"10px",flex:1,marginRight:"10px",fontSize:"12px"}},"\u8BA1\u7B97\u89C4\u5219",ie.createElement(Ie.Z,{title:ie.createElement("span",{className:"font12"},"\u5728\u591A\u9879\u8BC4\u5206\u5360\u6BD4\u8BBE\u7F6E\u4E2D\uFF0C\u82E5\u67D0\u9879\u8BC4\u5206\u7F3A\u5931\uFF0C\u5176\u5360\u6BD4\u5C06\u7531\u5176\u4ED6\u5DF2\u8BC4\u5206\u9879\u5E73\u5206\uFF1B\u82E5\u4E24\u9879\u8BC4\u5206\u7F3A\u5931\uFF0C\u5219\u552F\u4E00\u5DF2\u8BC4\u5206\u9879\u5C06\u5360100%\u7684\u6BD4\u91CD\u3002")},ie.createElement("i",{className:"iconfont icon-tishixiaowenhao ml5 mr5 font12 c-grey-999 current",style:{lineHeight:"18px"}})),"=",pe!=null&&pe.final_mode?$t():ie.createElement(ie.Fragment,null,"\u6559\u5E08\u8BC4\u5206",ie.createElement("span",{style:{color:"#CA7720"}},(pe==null?void 0:pe.teacher_score)||"--","*",pe==null?void 0:pe.te_proportion),(pe==null?void 0:pe.teaching_asistant_score)!="--"&&!!(pe!=null&&pe.teaching_asistant_score)&&ie.createElement(ie.Fragment,null,"+\u52A9\u6559\u8BC4\u5206",ie.createElement("span",{style:{color:"#CA7720"}},(pe==null?void 0:pe.teaching_asistant_score)||"--","*",pe==null?void 0:pe.ta_proportion)),!!(pe!=null&&pe.student_score)&&ie.createElement(ie.Fragment,null,"+\u533F\u8BC4\u8BC4\u5206",ie.createElement("span",{style:{color:"#CA7720"}},(pe==null?void 0:pe.student_score)||"--","*",pe==null?void 0:pe.st_proportion))),!!(pe!=null&&pe.absence_penalty||pe!=null&&pe.late_penalty||pe!=null&&pe.repeat_minus_score)&&ie.createElement(ie.Fragment,null,"-\u6263\u5206\u9879 (\u8865\u4EA4\u6263\u5206",ie.createElement("span",{style:{color:"#CA7720"}},pe==null?void 0:pe.late_penalty),"+\u67E5\u91CD\u6263\u5206",ie.createElement("span",{style:{color:"#CA7720"}},pe==null?void 0:pe.repeat_minus_score),"+\u7F3A\u8BC4\u6263\u5206",ie.createElement("span",{style:{color:"#CA7720"}},pe==null?void 0:pe.absence_penalty),")")),he&&ie.createElement("div",{className:Ve.work_button,onClick:()=>{be({key:"\u5F97\u5206\u8BE6\u60C5"})}},ie.createElement("img",{src:$o,style:{marginRight:"5px"}}),"\u67E5\u770B\u5F97\u5206\u8BE6\u60C5")))};var Jo=(0,Ge.connect)(({shixunHomeworks:be})=>({shixunHomeworks:be}))(Lo),to=fe(3493),Xo=Object.defineProperty,ko=Object.defineProperties,Ko=Object.getOwnPropertyDescriptors,xr=Object.getOwnPropertySymbols,Fa=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable,io=(be,pe,he)=>pe in be?Xo(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Gi=(be,pe)=>{for(var he in pe||(pe={}))Fa.call(pe,he)&&io(be,he,pe[he]);if(xr)for(var he of xr(pe))Ao.call(pe,he)&&io(be,he,pe[he]);return be},_r=(be,pe)=>ko(be,Ko(pe)),Zt=(be,pe)=>{var he={};for(var Ft in be)Fa.call(be,Ft)&&pe.indexOf(Ft)<0&&(he[Ft]=be[Ft]);if(be!=null&&xr)for(var Ft of xr(be))pe.indexOf(Ft)<0&&Ao.call(be,Ft)&&(he[Ft]=be[Ft]);return he},qt=(be,pe,he)=>new Promise((Ft,$t)=>{var Kt=kt=>{try{Jt(he.next(kt))}catch(ht){$t(ht)}},ui=kt=>{try{Jt(he.throw(kt))}catch(ht){$t(ht)}},Jt=kt=>kt.done?Ft(kt.value):Promise.resolve(kt.value).then(Kt,ui);Jt((he=he.apply(be,pe)).next())});const ti=({shixunHomeworks:be,loading:pe,user:he,globalSetting:Ft})=>({shixunHomeworks:be,loading:pe.effects,user:he,globalSetting:Ft}),xi=be=>{var pe=be,{ModalProps:he={},shixunHomeworks:Ft,user:$t}=pe,Kt=Zt(pe,["ModalProps","shixunHomeworks","user"]),ui,Jt;const[kt]=De.default.useForm(),ht=(0,Ge.useParams)(),{userInfo:Bt={}}=$t,[,Bi,_n,ri]=(0,oe.U)(rt.Yn,{homeworkId:ht==null?void 0:ht.userId}),[,hi,tn,sn]=(0,oe.U)(rt.Am,{homeworkId:ht==null?void 0:ht.userId}),[,Tn,In]=(0,oe.U)(rt.QC,{userId:ht==null?void 0:ht.userId}),[Mi,un]=(0,ie.useState)({page:1,limit:10}),[nn,fi]=(0,ie.useState)(!1),Ni=[{title:"\u8BC4\u9605\u4EBA\u59D3\u540D",dataIndex:"user_name",ellipsis:!0,width:100,render:oi=>ie.createElement(Ie.Z,{title:oi},ie.createElement("span",null,oi))},{title:"\u8BC4\u5206",dataIndex:"score",width:80},{title:"\u8BC4\u8BED",dataIndex:"content",ellipsis:!0,render:oi=>ie.createElement(Ie.Z,{title:oi},ie.createElement("span",null,oi))},{title:"\u63D0\u4EA4\u4F5C\u4E1A\u7248\u672C",dataIndex:"student_work_num",width:110,render:(oi,li)=>{var Di;return ie.createElement("a",{style:{color:oi===((Di=ri==null?void 0:ri.data)==null?void 0:Di.max_student_work_num)?"#1B8565":"#FA6400"},target:"_blank",href:`/classrooms/${ht==null?void 0:ht.coursesId}/common_homework/${ht==null?void 0:ht.categoryId}/review/${li==null?void 0:li.student_work_id}?history_id=${li==null?void 0:li.history_id}`},"\u7B2C ",oi," \u6B21")}},{title:"\u64CD\u4F5C",dataIndex:"comment_id",width:150,render:(oi,li)=>ie.createElement("div",{className:"flex item-center gap-20px"},(li==null?void 0:li.user_login)===(Bt==null?void 0:Bt.login)&&ie.createElement("a",{onClick:()=>{var Di;kt.setFieldsValue(_r(Gi({},li),{comment:li==null?void 0:li.content,score_details:((Di=li==null?void 0:li.score_details)==null?void 0:Di.map(pi=>Gi({},pi)))||[]})),fi(!0)}},"\u7F16\u8F91"),ie.createElement("a",{target:"_blank",href:`/classrooms/${ht==null?void 0:ht.coursesId}/common_homework/${ht==null?void 0:ht.categoryId}/review/${li==null?void 0:li.student_work_id}?history_id=${li==null?void 0:li.history_id}`},"\u67E5\u770B"),(li==null?void 0:li.user_login)===(Bt==null?void 0:Bt.login)&&ie.createElement("a",{className:"current-delete-hover",onClick:()=>{Rn(li)}},"\u5220\u9664"))}],Rn=(oi={})=>{Ze.default.confirm({title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",centered:!0,onOk:()=>qt(void 0,null,function*(){(yield In({score_id:oi==null?void 0:oi.comment_id})).status===0&&(xe.ZP.success("\u5220\u9664\u6210\u529F"),un({page:1,limit:10}),fi(!1))})})};return(0,ie.useEffect)(()=>{he!=null&&he.open&&_n(Gi({homeworkId:ht==null?void 0:ht.userId},Mi))},[Mi,he==null?void 0:he.open]),ie.createElement(ie.Fragment,null,ie.createElement(Ze.default,Gi({},Gi({title:"\u5386\u53F2\u8BC4\u9605\u8BB0\u5F55",centered:!0,width:800},he)),ie.createElement(je.default,{className:"mt10",loading:Bi,columns:Ni,locale:{emptyText:ie.createElement(ce.Z,null)},dataSource:((ui=ri==null?void 0:ri.data)==null?void 0:ui.list)||[],pagination:{hideOnSinglePage:!0,total:((Jt=ri==null?void 0:ri.data)==null?void 0:Jt.size)||0,onChange:(oi,li)=>{un(_r(Gi({},Mi),{page:oi,limit:li}))},current:Mi==null?void 0:Mi.page,pageSize:Mi==null?void 0:Mi.limit,showTotal:oi=>ie.createElement(ie.Fragment,null,"\u5171",ie.createElement("span",{className:"ml5 mr5 c-blue"},oi),"\u6761\u6570\u636E")}})),ie.createElement(vn,{FormProps:{form:kt,onFinish:(...oi)=>qt(void 0,[...oi],function*(li={}){const Di=yield tn(_r(Gi({},li),{homeworkId:ht==null?void 0:ht.userId}));(Di==null?void 0:Di.status)===0&&(xe.ZP.success("\u4FEE\u6539\u6210\u529F"),un({page:1,limit:10}),fi(!1))})},ModalProps:{open:nn,onCancel:()=>{fi(!1)},onOk:()=>{kt.submit()},confirmLoading:hi}}))},Sn=(0,Ge.connect)(ti)(xi),Fi=be=>{var pe=be,{FormProps:he,DataProps:Ft={},isShowStyles:$t=!0,shixunHomeworks:Kt,dispatch:ui}=pe,Jt=Zt(pe,["FormProps","DataProps","isShowStyles","shixunHomeworks","dispatch"]);const[kt]=De.default.useForm(),{form:ht=kt}=he,{studentWorkDetail:Bt,workDetail:Bi}=Kt,_n=(0,Ge.useParams)(),ri=De.default.useWatch("comment",ht),hi=De.default.useWatch("score",ht),tn=De.default.useWatch("score_details",ht),[sn,Tn]=Ze.default.useModal(),[In,Mi]=(0,ie.useState)(!1),[un,nn]=(0,ie.useState)(!1),fi=(0,ie.useRef)({});(0,ie.useEffect)(()=>{var oi;!(Bt!=null&&Bt.single_score)&&(tn==null?void 0:tn.length)>0&&ht.setFieldsValue({score:(oi=tn||[])==null?void 0:oi.reduce((li,Di)=>(0,Gt.EN)(li,Di.score||0,"+"),0)})},[tn]);const Ni=oi=>qt(void 0,null,function*(){const{mes:li,setChatData:Di,setTyping:pi}=oi,ki=yield(0,Le.ZP)("/api/intelligent_reviews/large_model_intelligent_qa.json",{method:"post",body:Gi({query:li,student_work_id:_n.userId},fi.current)});ki.answer=(ki==null?void 0:ki.status)==-3?ki.message:ki==null?void 0:ki.answer,ki!=null&&ki.answer&&Di(Ri=>[...Ri].map((rn,Oi)=>Oi===Ri.length-1?_r(Gi({},rn),{text:ki==null?void 0:ki.answer,loading:!1,response:ki}):rn))}),Rn=({chatData:oi,setChatData:li,setLoading:Di,getData:pi,renderChatItems:ki})=>{ui({type:"shixunHomeworks/setActionTabs",payload:{key:"\u667A\u80FD\u8BC4\u9605\u914D\u7F6E",onOk:Ri=>{fi.current=Ri,nn(!0),Di(!0);const rn=ki();rn[0].show=!1,li(rn),pi()}}})};return ie.createElement(ie.Fragment,null,Tn,ie.createElement(De.default.Item,{hidden:!0,name:"score_id",label:"\u8FD9\u4E2A\u662F\u7528\u6765\u6536\u96C6score_id\u7684"}),!(Ft!=null&&Ft.disabledScore)&&ie.createElement(ie.Fragment,null,Bt!=null&&Bt.single_score?ie.createElement(De.default.Item,{className:Ve.ReviewStyle,name:"score",rules:[{required:!(0,se.GJ)(),message:"\u8BF7\u586B\u5199\u5206\u6570"}],label:ie.createElement("div",{className:"w-full flex justify-between item-center"},ie.createElement("span",null,"\u8BC4\u5206"),(Bi==null?void 0:Bi.is_open_ai_review)&&ie.createElement(Vt.Z,{title:"\u667A\u80FD\u8BC4\u9605",visible:un,onOpen:Rn,onClose:()=>{nn(!1)},loadingOption:{text:"AI\u8BC4\u9605\u4E2D..."},hideUpload:!0,showDefaultTips:!1,hideInputBox:!0,customRequest:Ni,extraAnswerAction:oi=>{var li;return!oi.loading&&![-1,-3].includes((li=oi==null?void 0:oi.response)==null?void 0:li.status)&&ie.createElement("div",{className:Ve.apply,onClick:()=>{const Di=()=>{var pi,ki;ht.setFieldsValue({score:(pi=oi==null?void 0:oi.response)==null?void 0:pi.score,comment:(ki=oi==null?void 0:oi.response)==null?void 0:ki.remarks}),nn(!1)};if(hi||ri){sn.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u5206\u6216\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4E00\u952E\u5E94\u7528\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u5E94\u7528\uFF1F",okText:"\u5E94\u7528",onOk:Di});return}Di()}},ie.createElement("i",{style:{color:"#3061D0"},className:"iconfont icon-yijianyingyong1 font12 mr5"}),"\u4E00\u952E\u5E94\u7528")}},ie.createElement(ve.ZP,{icon:ie.createElement("img",{src:fe(11689)}),type:"link"},"\u667A\u80FD\u8BC4\u9605")))},ie.createElement(tt.Z,{className:"w-full",step:.1,min:0,placeholder:"\u8BF7\u586B\u5199\u5206\u6570",addonAfter:"\u5206"})):ie.createElement("div",{className:$t?"gap-10px":"gap-20px mb20",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))"}},ie.createElement(De.default.List,{name:"score_details"},(oi,{add:li,remove:Di})=>ie.createElement(ie.Fragment,null,oi.map(pi=>ie.createElement("div",{key:pi.key,className:$t?"pt10 pb10 p20":"",style:{background:$t&&"#F6F7F9"}},ie.createElement("div",{className:"flex justify-between mb10"},ie.createElement("div",{className:"multi_ellipsis1"},ht.getFieldValue(["score_details",pi.name,"name"])),ie.createElement("div",{className:"c-grey-666"},"\uFF08\u6EE1\u5206",ht.getFieldValue(["score_details",pi.name,"full_score"]),"\u5206\uFF09")),ie.createElement(De.default.Item,{className:"mb0",name:[pi.name,"score"],rules:ht.getFieldValue(["score_details",pi.name,"isAllScore"])?null:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}]},ie.createElement(tt.Z,{className:"w-full",stringMode:!0,min:0,max:ht.getFieldValue(["score_details",pi.name,"full_score"]),placeholder:"\u8BF7\u8F93\u5165\u5206\u6570",controls:!1,addonAfter:"\u5206"})))))),ie.createElement("div",{key:"allScore",className:$t?"pt10 pb10 p20":"",style:{background:$t&&"#F6F7F9"}},ie.createElement("div",{className:"flex justify-between mb10"},ie.createElement("div",{className:"multi_ellipsis1 c-blue"},"\u7EFC\u5408\u5F97\u5206"),ie.createElement("div",{className:"c-grey-666"},"\uFF08\u6EE1\u5206100\u5206\uFF09")),ie.createElement(De.default.Item,{className:"mb0",name:"score"},ie.createElement(tt.Z,{className:"w-full",stringMode:!0,disabled:!0,placeholder:"\u8BF7\u8F93\u5165\u5206\u6570",controls:!1,addonAfter:"\u5206"}))))),ie.createElement(De.default.Item,{name:"comment",className:Ve.ReviewStyle,label:ie.createElement("div",{className:"w-full flex justify-between item-center"},ie.createElement("span",null,"\u8BC4\u8BED"),ie.createElement(ei.Z,{isShowComponent:(0,se.G5)(),ModalProps:{open:In,onCancel:()=>{Mi(!1)}},onDataSelect:(oi,{node:li})=>{const Di=()=>{ht.setFieldsValue({comment:li==null?void 0:li.value}),Mi(!1)};if(ri){sn.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:Di});return}Di()}},ie.createElement(ve.ZP,{style:{padding:0,height:"auto"},icon:ie.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:oi=>{oi.stopPropagation(),Mi(!0)}},"\u5E38\u7528\u8BC4\u8BED")))},ie.createElement(It.h,{OpenMore:!0,height:200,scrollId:"comment",placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5BF9\u672C\u4F5C\u54C1\u7684\u8BC4\u8BED\uFF0C\u6700\u5927\u9650\u52362000\u4E2A\u5B57\u7B26"})),ie.createElement(to.Z,{showModel:!1}))},On=(0,Ge.connect)(ti)(Fi),gn=be=>{var pe=be,{ModalProps:he={},DataProps:Ft={},shixunHomeworks:$t,FormProps:Kt}=pe,ui=Zt(pe,["ModalProps","DataProps","shixunHomeworks","FormProps"]);const{form:Jt}=Kt,{studentWorkDetail:kt}=$t;return ie.createElement(Ze.default,Gi({},Gi({title:ie.createElement(ie.Fragment,null,"\u7F16\u8F91\u8BC4\u8BED",!(kt!=null&&kt.single_score)&&ie.createElement("span",{className:"ml20 font16",style:{color:"#FA6400"}},"\u6CE8\u610F\uFF1A\u5F00\u542F\u591A\u7EF4\u5EA6\u8BC4\u5206")),centered:!0,width:kt!=null&&kt.single_score?662:1120},he)),ie.createElement(De.default,Gi({},Gi({size:"large",layout:"vertical"},Kt)),ie.createElement(On,{FormProps:{form:Jt},DataProps:Ft})))},vn=(0,Ge.connect)(ti)(gn),An=be=>{var pe=be,{ModalProps:he={},DataProps:Ft={},shixunHomeworks:$t}=pe,Kt=Zt(pe,["ModalProps","DataProps","shixunHomeworks"]),ui,Jt,kt;const{studentWorkDetail:ht}=$t,[Bt,Bi]=(0,ie.useState)({teacherList:[],assistantsList:[],anonymousCommentList:[]}),_n=(ri,hi,tn="")=>({title:tn==="anonymous_comment"?ie.createElement(Ie.Z,{title:(0,se.G5)()&&(ri==null?void 0:ri.name)},ie.createElement("a",null,"\u533F\u540D")):ri==null?void 0:ri.name,dataIndex:`score${hi}`,align:"center",render:(sn,Tn,In)=>In===0?ie.createElement(ie.Fragment,null,sn,Tn[`old_score${hi}`]&&ie.createElement("span",{style:{color:"#009C0F"}},"\uFF08\u6559\u5E08\u8865\u5206\uFF1A",Tn[`old_score${hi}`],"\uFF09")):ie.createElement("div",{className:"flex item-center justify-center"},ie.createElement("div",{style:{width:166}},sn==null?void 0:sn.map((Mi,un)=>ie.createElement("div",{key:un,className:"flex justify-between"},Mi==null?void 0:Mi.name,ie.createElement("span",{className:"ml5",style:{color:"#009C0F"}},Mi==null?void 0:Mi.score)))))});return(0,ie.useEffect)(()=>{var ri,hi,tn,sn,Tn,In;if(ht&&(he!=null&&he.open)){const Mi=[{},{}],un=[{},{}],nn=[{},{}];((ri=ht==null?void 0:ht.teacher_score_list)==null?void 0:ri.length)>0&&((hi=ht==null?void 0:ht.teacher_score_list)==null||hi.forEach((fi,Ni)=>{Mi[0][`score${Ni}`]=fi==null?void 0:fi.score,Mi[1][`score${Ni}`]=fi==null?void 0:fi.user_score})),((tn=ht==null?void 0:ht.assistants_score_list)==null?void 0:tn.length)>0&&((sn=ht==null?void 0:ht.assistants_score_list)==null||sn.forEach((fi,Ni)=>{un[0][`score${Ni}`]=fi==null?void 0:fi.score,un[1][`score${Ni}`]=fi==null?void 0:fi.user_score})),((Tn=ht==null?void 0:ht.anonymous_comment_score_list)==null?void 0:Tn.length)>0&&((In=ht==null?void 0:ht.anonymous_comment_score_list)==null||In.forEach((fi,Ni)=>{fi!=null&&fi.old_score?(nn[0][`score${Ni}`]=fi==null?void 0:fi.old_score,nn[0][`old_score${Ni}`]=fi==null?void 0:fi.score):(nn[0][`score${Ni}`]=fi==null?void 0:fi.score,nn[0][`old_score${Ni}`]=fi==null?void 0:fi.old_score),nn[1][`score${Ni}`]=fi==null?void 0:fi.user_score})),Bi({teacherList:ht!=null&&ht.single_score?[Mi[0]]:Mi,assistantsList:ht!=null&&ht.single_score?[un[0]]:un,anonymousCommentList:ht!=null&&ht.single_score?[nn[0]]:nn})}},[ht,he==null?void 0:he.open]),ie.createElement(Ze.default,Gi({},Gi({title:"\u5F97\u5206\u8BE6\u60C5",centered:!0,width:1200,bodyStyle:{maxHeight:"80vh"}},he)),ie.createElement(Jo,{className:"mt0",dataInfo:ht,isShowButton:!1}),ie.createElement("div",{className:`${Ve.ScoreDetailsBase} flex flex-col gap-20px`},((ui=ht==null?void 0:ht.teacher_score_list)==null?void 0:ui.length)>0&&ie.createElement("div",{className:"flex"},ie.createElement("div",{className:"c-grey-333 font14 blod flex item-center justify-center",style:{background:"rgba(48,97,208,0.1)",width:60,padding:"20px 15px"}},"\u6559\u5E08\u8BC4\u5206"),ie.createElement(je.default,{className:"flex-1",style:{minWidth:0},bordered:!0,dataSource:Bt==null?void 0:Bt.teacherList,pagination:!1,scroll:{x:"max-content"},columns:[...((ht==null?void 0:ht.teacher_score_list)||[]).map((ri,hi)=>_n(ri,hi)),{title:`\u6700\u7EC8\u5F97\u5206\uFF08${(ht==null?void 0:ht.teacher_mode)===1?"\u5E73\u5747\u8BC4\u5206":"\u6700\u7EC8\u8BC4\u5206"}\uFF09`,dataIndex:"value",align:"center",width:224,fixed:"right",render:ri=>ie.createElement("span",{style:{color:"#009C0F"}},ht==null?void 0:ht.teacher_score),onCell:(ri,hi)=>({rowSpan:hi%2==0?2:0})}]})),((Jt=ht==null?void 0:ht.assistants_score_list)==null?void 0:Jt.length)>0&&ie.createElement("div",{className:"flex"},ie.createElement("div",{className:"c-grey-333 font14 blod flex item-center justify-center",style:{background:"rgba(48,97,208,0.1)",width:60,padding:"20px 15px"}},"\u52A9\u6559\u8BC4\u5206"),ie.createElement(je.default,{className:"flex-1",style:{minWidth:0},bordered:!0,dataSource:(Bt==null?void 0:Bt.assistantsList)||[],pagination:!1,scroll:{x:"max-content"},columns:[...((ht==null?void 0:ht.assistants_score_list)||[]).map((ri,hi)=>_n(ri,hi)),{title:`\u6700\u7EC8\u5F97\u5206\uFF08${(ht==null?void 0:ht.ta_mode)===1?"\u5E73\u5747\u8BC4\u5206":"\u6700\u7EC8\u8BC4\u5206"}\uFF09`,dataIndex:"value",align:"center",width:224,fixed:"right",render:ri=>ie.createElement("span",{style:{color:"#009C0F"}},ht==null?void 0:ht.teaching_asistant_score),onCell:(ri,hi)=>({rowSpan:hi%2==0?2:0})}]})),(ht==null?void 0:ht.anonymous_comment)&&((kt=ht==null?void 0:ht.anonymous_comment_score_list)==null?void 0:kt.length)>0&&ie.createElement("div",{className:"flex"},ie.createElement("div",{className:"c-grey-333 font14 blod flex item-center justify-center",style:{background:"rgba(48,97,208,0.1)",width:60,padding:"20px 15px"}},"\u533F\u8BC4\u8BC4\u5206"),ie.createElement(je.default,{className:"flex-1",style:{minWidth:0},bordered:!0,dataSource:(Bt==null?void 0:Bt.anonymousCommentList)||[],pagination:!1,scroll:{x:"max-content"},columns:[...((ht==null?void 0:ht.anonymous_comment_score_list)||[]).map((ri,hi)=>_n(ri,hi,"anonymous_comment")),{title:"\u6700\u7EC8\u5F97\u5206\uFF08\u53D6\u5E73\u5747\u5206\uFF09",dataIndex:"value",align:"center",width:224,fixed:"right",render:ri=>ie.createElement("span",{style:{color:"#009C0F"}}," ",ht==null?void 0:ht.student_score),onCell:(ri,hi)=>({rowSpan:hi%2==0?2:0})}]})),ie.createElement("div",{className:"flex"},ie.createElement("div",{className:"c-grey-333 font14 blod flex item-center justify-center",style:{background:"rgba(48,97,208,0.1)",width:60,padding:"20px 15px"}},"\u6263\u5206"),ie.createElement(je.default,{className:" flex-1",bordered:!0,dataSource:[ht],pagination:!1,columns:[{title:"\u8865\u4EA4\u6263\u5206",dataIndex:"late_penalty",align:"center"},{title:"\u67E5\u91CD\u6263\u5206",dataIndex:"repeat_minus_score",align:"center"},(ht==null?void 0:ht.anonymous_comment)&&{title:"\u7F3A\u8BC4\u6263\u5206",dataIndex:"absence_penalty",align:"center"},{title:"\u8FDD\u8BC4\u6263\u5206",dataIndex:"appeal_penalty",align:"center"},{title:"\u6700\u7EC8\u6263\u5206",dataIndex:"value",align:"center",width:224,render:(ri,hi)=>ie.createElement("span",{style:{color:"#009C0F"}},((hi==null?void 0:hi.late_penalty)||0)+((hi==null?void 0:hi.repeat_minus_score)||0)+((hi==null?void 0:hi.absence_penalty)||0)+((hi==null?void 0:hi.appeal_penalty)||0))}].filter(ri=>ri)}))))},bi=(0,Ge.connect)(ti)(An),Ot=be=>{var pe=be,{ModalProps:he={},DataProps:Ft={},shixunHomeworks:$t,dispatch:Kt}=pe,ui=Zt(pe,["ModalProps","DataProps","shixunHomeworks","dispatch"]);const{workDetail:Jt}=$t,kt=(0,Ge.useParams)();return ie.createElement(Ze.default,Gi({},Gi({title:"\u4F5C\u4E1A\u63CF\u8FF0",centered:!0,width:1200,bodyStyle:{maxHeight:"80vh"}},he)),ie.createElement(jt.Z,{className:"mt10",value:(Jt==null?void 0:Jt.description)||"\u6682\u65E0\uFF5E"}),ie.createElement(ne.Z,{authority:(0,se.GJ)(),showDimensions:!1,dataSource:Jt==null?void 0:Jt.attachments,callback:()=>{Kt({type:"shixunHomeworks/getWorkDetail",payload:{categoryId:kt.categoryId}})}}))},yn=(0,Ge.connect)(ti)(Ot);var Nn=Object.defineProperty,Un=Object.getOwnPropertySymbols,mi=Object.prototype.hasOwnProperty,nr=Object.prototype.propertyIsEnumerable,ur=(be,pe,he)=>pe in be?Nn(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,no=(be,pe)=>{for(var he in pe||(pe={}))mi.call(pe,he)&&ur(be,he,pe[he]);if(Un)for(var he of Un(pe))nr.call(pe,he)&&ur(be,he,pe[he]);return be};const xt=be=>React.createElement("svg",no({width:13,height:12,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"4"),React.createElement("path",{d:"M2.573 1.787v.006c.018.135.324 2.394 2.146 4.04C6.597 7.53 9.481 7.66 9.481 7.66h.003c.084.001 1.985.07 3.035 3.16.033.096.074.232.123.407a.583.583 0 0 1-.563.739H3.578a.583.583 0 0 1-.584-.592c.025-1.732-.115-2.97-.421-3.714C2.057 6.405.735 5.392.038 2.183c-.04-.188-.246-1.41.997-1.578C2.277.437 2.573 1.787 2.573 1.787ZM7.876.007c1.611 0 2.917 1.371 2.917 3.063 0 1.69-1.306 3.062-2.917 3.062-1.611 0-2.917-1.37-2.917-3.062C4.96 1.379 6.265.007 7.876.007Z",fill:"#FA6400",fillRule:"nonzero"}));var ni="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNTczIDEuNzg3di4wMDZjLjAxOC4xMzUuMzI0IDIuMzk0IDIuMTQ2IDQuMDRDNi41OTcgNy41MyA5LjQ4MSA3LjY2IDkuNDgxIDcuNjZoLjAwM2MuMDg0LjAwMSAxLjk4NS4wNyAzLjAzNSAzLjE2LjAzMy4wOTYuMDc0LjIzMi4xMjMuNDA3YS41ODMuNTgzIDAgMCAxLS41NjMuNzM5SDMuNTc4YS41ODMuNTgzIDAgMCAxLS41ODQtLjU5MmMuMDI1LTEuNzMyLS4xMTUtMi45Ny0uNDIxLTMuNzE0QzIuMDU3IDYuNDA1LjczNSA1LjM5Mi4wMzggMi4xODNjLS4wNC0uMTg4LS4yNDYtMS40MS45OTctMS41NzhDMi4yNzcuNDM3IDIuNTczIDEuNzg3IDIuNTczIDEuNzg3Wk03Ljg3Ni4wMDdjMS42MTEgMCAyLjkxNyAxLjM3MSAyLjkxNyAzLjA2MyAwIDEuNjktMS4zMDYgMy4wNjItMi45MTcgMy4wNjItMS42MTEgMC0yLjkxNy0xLjM3LTIuOTE3LTMuMDYyQzQuOTYgMS4zNzkgNi4yNjUuMDA3IDcuODc2LjAwN1oiIGZpbGw9IiNGQTY0MDAiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",ro=Object.defineProperty,oo=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,No=(be,pe,he)=>pe in be?ro(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Qe=(be,pe)=>{for(var he in pe||(pe={}))Ur.call(pe,he)&&No(be,he,pe[he]);if(oo)for(var he of oo(pe))Tr.call(pe,he)&&No(be,he,pe[he]);return be};const yl=be=>React.createElement("svg",Qe({width:12,height:12,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"5"),React.createElement("g",{fill:"#5E54E7",fillRule:"nonzero"},React.createElement("path",{d:"M8.477 5.651c.569 0 1.101.138 1.569.377V1.257C10.046.56 9.486 0 8.789 0H1.257C.56 0 0 .56 0 1.257v8.789c0 .697.56 1.257 1.257 1.257h4.56a3.411 3.411 0 0 1-.79-2.193 3.448 3.448 0 0 1 3.45-3.459Zm-3.138.624H2.202a.31.31 0 0 1-.312-.312.31.31 0 0 1 .312-.312h3.137a.31.31 0 0 1 .312.312.31.31 0 0 1-.312.312ZM1.257 3.138V1.88c0-.349.284-.624.624-.624h6.275c.349 0 .624.284.624.624v1.257H1.257Zm2.826 5.651H2.202a.31.31 0 0 1-.312-.312.31.31 0 0 1 .312-.312h1.88a.31.31 0 0 1 .312.312.31.31 0 0 1-.311.312Z"}),React.createElement("path",{d:"M8.477 6.275a2.827 2.827 0 0 0 0 5.652 2.827 2.827 0 0 0 0-5.652Zm1.587 4.743C10.22 8.752 8.44 9.661 8.44 9.661v.981L6.908 9.101 8.44 7.54l-.009.9c2.835.421 1.633 2.577 1.633 2.577Z"})));var Zr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzVFNTRFNyIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNOC40NzcgNS42NTFjLjU2OSAwIDEuMTAxLjEzOCAxLjU2OS4zNzdWMS4yNTdDMTAuMDQ2LjU2IDkuNDg2IDAgOC43ODkgMEgxLjI1N0MuNTYgMCAwIC41NiAwIDEuMjU3djguNzg5YzAgLjY5Ny41NiAxLjI1NyAxLjI1NyAxLjI1N2g0LjU2YTMuNDExIDMuNDExIDAgMCAxLS43OS0yLjE5MyAzLjQ0OCAzLjQ0OCAwIDAgMSAzLjQ1LTMuNDU5Wm0tMy4xMzguNjI0SDIuMjAyYS4zMS4zMSAwIDAgMS0uMzEyLS4zMTIuMzEuMzEgMCAwIDEgLjMxMi0uMzEyaDMuMTM3YS4zMS4zMSAwIDAgMSAuMzEyLjMxMi4zMS4zMSAwIDAgMS0uMzEyLjMxMlpNMS4yNTcgMy4xMzhWMS44OGMwLS4zNDkuMjg0LS42MjQuNjI0LS42MjRoNi4yNzVjLjM0OSAwIC42MjQuMjg0LjYyNC42MjR2MS4yNTdIMS4yNTdabTIuODI2IDUuNjUxSDIuMjAyYS4zMS4zMSAwIDAgMS0uMzEyLS4zMTIuMzEuMzEgMCAwIDEgLjMxMi0uMzEyaDEuODhhLjMxLjMxIDAgMCAxIC4zMTIuMzEyLjMxLjMxIDAgMCAxLS4zMTEuMzEyWiIvPjxwYXRoIGQ9Ik04LjQ3NyA2LjI3NWEyLjgyNyAyLjgyNyAwIDAgMCAwIDUuNjUyIDIuODI3IDIuODI3IDAgMCAwIDAtNS42NTJabTEuNTg3IDQuNzQzQzEwLjIyIDguNzUyIDguNDQgOS42NjEgOC40NCA5LjY2MXYuOTgxTDYuOTA4IDkuMTAxIDguNDQgNy41NGwtLjAwOS45YzIuODM1LjQyMSAxLjYzMyAyLjU3NyAxLjYzMyAyLjU3N1oiLz48L2c+PC9zdmc+",wr=Object.defineProperty,qi=Object.getOwnPropertySymbols,_o=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,Cr=(be,pe,he)=>pe in be?wr(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,$i=(be,pe)=>{for(var he in pe||(pe={}))_o.call(pe,he)&&Cr(be,he,pe[he]);if(qi)for(var he of qi(pe))rr.call(pe,he)&&Cr(be,he,pe[he]);return be};const Zn=be=>React.createElement("svg",$i({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"2"),React.createElement("g",{fill:"#00B187",fillRule:"nonzero"},React.createElement("path",{d:"M2.573 1.787v.006c.018.135.324 2.394 2.146 4.04C6.597 7.53 9.481 7.66 9.481 7.66h.003c.084.001 1.985.07 3.035 3.16.033.096.074.232.123.407a.583.583 0 0 1-.563.739H3.578a.583.583 0 0 1-.584-.592c.025-1.732-.115-2.97-.421-3.714C2.057 6.405.735 5.392.038 2.183c-.04-.188-.246-1.41.997-1.578C2.277.437 2.573 1.787 2.573 1.787Z"}),React.createElement("path",{d:"M13.09 1.787v.006c-.017.135-.324 2.394-2.146 4.04C9.066 7.53 6.182 7.66 6.182 7.66h-.003c-.084.001-1.985.07-3.035 3.16a7.91 7.91 0 0 0-.122.407.583.583 0 0 0 .562.739h8.502a.583.583 0 0 0 .583-.592c-.025-1.732.116-2.97.422-3.714.515-1.255 1.837-2.268 2.534-5.477.041-.188.246-1.41-.996-1.578-1.242-.168-1.538 1.182-1.538 1.182Z"}),React.createElement("path",{d:"M7.876.007c1.611 0 2.917 1.371 2.917 3.063 0 1.69-1.306 3.062-2.917 3.062-1.611 0-2.917-1.37-2.917-3.062C4.96 1.379 6.265.007 7.876.007Z"})));var br="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwQjE4NyIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMi41NzMgMS43ODd2LjAwNmMuMDE4LjEzNS4zMjQgMi4zOTQgMi4xNDYgNC4wNEM2LjU5NyA3LjUzIDkuNDgxIDcuNjYgOS40ODEgNy42NmguMDAzYy4wODQuMDAxIDEuOTg1LjA3IDMuMDM1IDMuMTYuMDMzLjA5Ni4wNzQuMjMyLjEyMy40MDdhLjU4My41ODMgMCAwIDEtLjU2My43MzlIMy41NzhhLjU4My41ODMgMCAwIDEtLjU4NC0uNTkyYy4wMjUtMS43MzItLjExNS0yLjk3LS40MjEtMy43MTRDMi4wNTcgNi40MDUuNzM1IDUuMzkyLjAzOCAyLjE4M2MtLjA0LS4xODgtLjI0Ni0xLjQxLjk5Ny0xLjU3OEMyLjI3Ny40MzcgMi41NzMgMS43ODcgMi41NzMgMS43ODdaIi8+PHBhdGggZD0iTTEzLjA5IDEuNzg3di4wMDZjLS4wMTcuMTM1LS4zMjQgMi4zOTQtMi4xNDYgNC4wNEM5LjA2NiA3LjUzIDYuMTgyIDcuNjYgNi4xODIgNy42NmgtLjAwM2MtLjA4NC4wMDEtMS45ODUuMDctMy4wMzUgMy4xNmE3LjkxIDcuOTEgMCAwIDAtLjEyMi40MDcuNTgzLjU4MyAwIDAgMCAuNTYyLjczOWg4LjUwMmEuNTgzLjU4MyAwIDAgMCAuNTgzLS41OTJjLS4wMjUtMS43MzIuMTE2LTIuOTcuNDIyLTMuNzE0LjUxNS0xLjI1NSAxLjgzNy0yLjI2OCAyLjUzNC01LjQ3Ny4wNDEtLjE4OC4yNDYtMS40MS0uOTk2LTEuNTc4LTEuMjQyLS4xNjgtMS41MzggMS4xODItMS41MzggMS4xODJaIi8+PHBhdGggZD0iTTcuODc2LjAwN2MxLjYxMSAwIDIuOTE3IDEuMzcxIDIuOTE3IDMuMDYzIDAgMS42OS0xLjMwNiAzLjA2Mi0yLjkxNyAzLjA2Mi0xLjYxMSAwLTIuOTE3LTEuMzctMi45MTctMy4wNjJDNC45NiAxLjM3OSA2LjI2NS4wMDcgNy44NzYuMDA3WiIvPjwvZz48L3N2Zz4=",ao=Object.defineProperty,lo=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable,so=(be,pe,he)=>pe in be?ao(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,qo=(be,pe)=>{for(var he in pe||(pe={}))To.call(pe,he)&&so(be,he,pe[he]);if(lo)for(var he of lo(pe))ja.call(pe,he)&&so(be,he,pe[he]);return be};const ea=be=>React.createElement("svg",qo({width:12,height:12,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M6.325 1.6a.578.578 0 0 1 .448.197c.135.176.215.387.23.608a.672.672 0 0 1 .535-.107c.497.088.628.632.653 1.043a.565.565 0 0 1 .292-.037c.699.079.686.756.68 1.046-.008.29-.248 2.06-.28 2.288.04.277.343 2.649-.851 3.6l.057.849-3.338.113v-1.168c-.27-.219-1.33-1.136-1.544-2.283a4.077 4.077 0 0 0-.475-1.201c-.277-.514-.515-.96-.114-1.436a.585.585 0 0 1 .457-.236c.608 0 1.154 1.1 1.302 1.935l.16.08-.12-3.53c0-.015-.043-.516.228-.809a.651.651 0 0 1 .493-.205h.036a.767.767 0 0 1 .375.106c.016-.233.104-.456.252-.636a.692.692 0 0 1 .524-.217Z",fill:"#EE5D5D"}),React.createElement("path",{d:"M6 0a6 6 0 1 1 0 12A6 6 0 0 1 6 0ZM2.019 2.655a5.2 5.2 0 0 0 6.472 7.91ZM6 .8a5.18 5.18 0 0 0-3.417 1.28l6.582 8.046A5.2 5.2 0 0 0 6 .8Z",fill:"#E30000"})));var qn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNi4zMjUgMS42YS41NzguNTc4IDAgMCAxIC40NDguMTk3Yy4xMzUuMTc2LjIxNS4zODcuMjMuNjA4YS42NzIuNjcyIDAgMCAxIC41MzUtLjEwN2MuNDk3LjA4OC42MjguNjMyLjY1MyAxLjA0M2EuNTY1LjU2NSAwIDAgMSAuMjkyLS4wMzdjLjY5OS4wNzkuNjg2Ljc1Ni42OCAxLjA0Ni0uMDA4LjI5LS4yNDggMi4wNi0uMjggMi4yODguMDQuMjc3LjM0MyAyLjY0OS0uODUxIDMuNmwuMDU3Ljg0OS0zLjMzOC4xMTN2LTEuMTY4Yy0uMjctLjIxOS0xLjMzLTEuMTM2LTEuNTQ0LTIuMjgzYTQuMDc3IDQuMDc3IDAgMCAwLS40NzUtMS4yMDFjLS4yNzctLjUxNC0uNTE1LS45Ni0uMTE0LTEuNDM2YS41ODUuNTg1IDAgMCAxIC40NTctLjIzNmMuNjA4IDAgMS4xNTQgMS4xIDEuMzAyIDEuOTM1bC4xNi4wOC0uMTItMy41M2MwLS4wMTUtLjA0My0uNTE2LjIyOC0uODA5YS42NTEuNjUxIDAgMCAxIC40OTMtLjIwNWguMDM2YS43NjcuNzY3IDAgMCAxIC4zNzUuMTA2Yy4wMTYtLjIzMy4xMDQtLjQ1Ni4yNTItLjYzNmEuNjkyLjY5MiAwIDAgMSAuNTI0LS4yMTdaIiBmaWxsPSIjRUU1RDVEIi8+PHBhdGggZD0iTTYgMGE2IDYgMCAxIDEgMCAxMkE2IDYgMCAwIDEgNiAwWk0yLjAxOSAyLjY1NWE1LjIgNS4yIDAgMCAwIDYuNDcyIDcuOTFaTTYgLjhhNS4xOCA1LjE4IDAgMCAwLTMuNDE3IDEuMjhsNi41ODIgOC4wNDZBNS4yIDUuMiAwIDAgMCA2IC44WiIgZmlsbD0iI0UzMDAwMCIvPjwvZz48L3N2Zz4=",ta=(be,pe,he)=>new Promise((Ft,$t)=>{var Kt=kt=>{try{Jt(he.next(kt))}catch(ht){$t(ht)}},ui=kt=>{try{Jt(he.throw(kt))}catch(ht){$t(ht)}},Jt=kt=>kt.done?Ft(kt.value):Promise.resolve(kt.value).then(Kt,ui);Jt((he=he.apply(be,pe)).next())}),Ir=({open:be,onClose:pe,onOk:he})=>{const[Ft,$t]=(0,ie.useState)(!1),[Kt,ui]=(0,ie.useState)("\u6263\u5206\u7406\u7531\u4E0D\u6E05\u6670"),[Jt,kt]=(0,ie.useState)(""),ht=()=>ta(void 0,null,function*(){$t(!0),(yield he(Kt,Jt))===0&&pe(),$t(!1)}),Bt=["\u6263\u5206\u7406\u7531\u4E0D\u6E05\u6670","\u4F5C\u4E1A\u6B63\u786E\u4F46\u88AB\u6263\u5206","\u8BC4\u8BED\u8FC7\u4E8E\u4E3B\u89C2\u6216\u7B3C\u7EDF","\u8BC4\u8BED\u4E0E\u5B9E\u9645\u60C5\u51B5\u4E0D\u7B26","\u8BC4\u8BED\u4E0E\u8BC4\u5206\u4E0D\u5339\u914D","\u8BC4\u5206\u6807\u51C6\u6267\u884C\u4E0D\u4E00\u81F4","\u7F3A\u4E4F\u6539\u8FDB\u5EFA\u8BAE","\u81EA\u52A8\u8BC4\u5206\u7CFB\u7EDF\u95EE\u9898","\u5176\u5B83"];return ie.createElement(Ze.default,{centered:!0,open:be,confirmLoading:Ft,onCancel:()=>{pe()},afterClose:()=>{kt(""),ui("\u6263\u5206\u7406\u7531\u4E0D\u6E05\u6670")},onOk:ht,title:"\u53CD\u9988",width:"1000px",okText:"\u63D0\u4EA4"},ie.createElement("div",{className:bt.btnWarp},Bt.map(Bi=>ie.createElement("div",{key:Bi,className:Kt===Bi?bt.active:"",onClick:()=>ui(Bi)},Bi))),ie.createElement(pt.default.TextArea,{style:{height:280},placeholder:"\u6211\u4EEC\u60F3\u77E5\u9053\u4F60\u5BF9\u8BC4\u5206\u6216\u8BC4\u8BED\u4E0D\u6EE1\u610F\u7684\u539F\u56E0~",value:Jt,onChange:Bi=>kt(Bi.target.value)}))},ot=fe(59301),uo=Object.defineProperty,co=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,Fr=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Fo=(be,pe,he)=>pe in be?uo(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,en=(be,pe)=>{for(var he in pe||(pe={}))Vr.call(pe,he)&&Fo(be,he,pe[he]);if(Fr)for(var he of Fr(pe))Io.call(pe,he)&&Fo(be,he,pe[he]);return be},ho=(be,pe)=>co(be,ia(pe)),Yn=(be,pe)=>{var he={};for(var Ft in be)Vr.call(be,Ft)&&pe.indexOf(Ft)<0&&(he[Ft]=be[Ft]);if(be!=null&&Fr)for(var Ft of Fr(be))pe.indexOf(Ft)<0&&Io.call(be,Ft)&&(he[Ft]=be[Ft]);return he},Pn=(be,pe,he)=>new Promise((Ft,$t)=>{var Kt=kt=>{try{Jt(he.next(kt))}catch(ht){$t(ht)}},ui=kt=>{try{Jt(he.throw(kt))}catch(ht){$t(ht)}},Jt=kt=>kt.done?Ft(kt.value):Promise.resolve(kt.value).then(Kt,ui);Jt((he=he.apply(be,pe)).next())});const Qr=be=>{var pe=be,{Data:he,layer:Ft=1,type:$t,index:Kt=0,newType:ui,user:Jt,showName:kt,showNm:ht}=pe,Bt=Yn(pe,["Data","layer","type","index","newType","user","showName","showNm"]),Bi,_n,ri,hi,tn,sn,Tn,In,Mi,un,nn,fi,Ni,Rn,oi,li,Di;const pi=(0,Ge.useParams)(),{studentWorkDetail:ki}=Bt==null?void 0:Bt.shixunHomeworks,[Ri,rn]=(0,ie.useState)({type:0,show:!1}),[Oi,or]=(0,ie.useState)(null),[,yi,St]=(0,oe.U)(rt.qP,{userId:pi==null?void 0:pi.userId}),[,mr,Mr]=(0,oe.U)(rt.R$,{userId:pi==null?void 0:pi.userId}),[,Bo,Xe]=(0,oe.U)(rt.QC,{userId:pi==null?void 0:pi.userId}),[,Qt,Oo]=(0,oe.U)(rt.Mf,{userId:pi==null?void 0:pi.userId}),[,Ll,ua,cn]=(0,oe.U)(rt.Am,{homeworkId:pi==null?void 0:pi.userId}),[,ca,Po,zr]=(0,oe.U)(rt.oK,{}),[mo,Rr]=(0,ie.useState)(!1),[gr]=De.default.useForm(),[go]=De.default.useForm(),[zo]=De.default.useForm(),[vo,Kr]=(0,ie.useState)(!1),[ha,Dr]=(0,ie.useState)(!1),[hn,Ro]=(0,ie.useState)(!1),Cn=(ii=he)=>{Ze.default.confirm({title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",centered:!0,onOk:()=>Pn(void 0,null,function*(){(yield Xe({score_id:ii==null?void 0:ii.comment_id})).status===0&&(xe.ZP.success("\u5220\u9664\u6210\u529F"),Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()))})})},Wo=(ii=he)=>{Ze.default.confirm({title:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",centered:!0,onOk:()=>Pn(void 0,null,function*(){(yield Oo({object_id:ii.id,object_type:"journals_for_message"})).status===0&&(xe.ZP.success("\u5220\u9664\u6210\u529F"),Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()))})})},Lr=(ii,Li)=>{let dn="";for(let Qn=0;Qn<(ii==null?void 0:ii.length);Qn++){const Wn=ii[Qn];Li!=null&&Li.old_score?dn+=`<span style="color:#999999">${Wn.name}<span style="color:#999999;"}}> ${Wn.score}\u5206 </span></span>`:dn+=`<span>${Wn.name}<span style="color:#CA7720;"}}> ${Wn.score}\u5206 </span></span>`,Qn<(ii==null?void 0:ii.length)-1&&(Li!=null&&Li.old_score?dn+=' <span style="color:#999999"> + </span> ':dn+=" + ")}return ot.createElement("span",{dangerouslySetInnerHTML:{__html:dn}})},Ho=(ii,Li,dn)=>Pn(void 0,null,function*(){const Qn={type:ii,score_id:he==null?void 0:he.comment_id,reason:Li||null,content:dn||null},Wn=yield(0,Le.ZP)(`/api/student_works/${pi==null?void 0:pi.categoryId}/add_score_like.json`,{method:"post",body:Qn});return Wn.status===0&&Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()),Wn.status});return ot.createElement("div",{className:Ft==1&&bt.new_style_box,style:ui&&{background:"#FCF8F4",border:"none"}},ot.createElement(Me.Z,{wrap:!1,gutter:15,className:Ft!=1&&bt.box_child,style:ui&&{marginTop:"0px"}},$t=="appeal_info"?ot.createElement(Je.Z,{flex:1},ot.createElement("div",{className:bt.box_item_top},ot.createElement(Ie.Z,{title:kt?(Bi=he==null?void 0:he.appeal_info)==null?void 0:Bi.user_name:""},ot.createElement("span",{style:{color:kt?"#3061D0":"#333333",fontWeight:600}},ht?"\u533F\u540D":(_n=he==null?void 0:he.appeal_info)==null?void 0:_n.user_name)),(he==null?void 0:he.appeal_status)==1&&ot.createElement("span",{className:bt.tagStyleSzz,style:{color:"#CF5300",border:"1px solid rgba(250,100,0,0.2)",background:"rgba(250,100,0,0.1)",display:"flex",alignItems:"center",padding:"0 5px",marginLeft:"10px"}},ot.createElement("img",{src:ni,className:"mr5"}),"\u7533\u8BC9\u4E2D"),(he==null?void 0:he.appeal_status)==2&&ot.createElement("span",{className:bt.tagStyleSzz,style:{color:"#4237E7",border:"1px solid rgba(94,84,231,0.2)",background:"rgba(94,84,231,0.1)",display:"flex",alignItems:"center",padding:"0 5px",marginLeft:"10px"}},ot.createElement("img",{src:Zr,className:"mr5"}),"\u7533\u8BC9\u5DF2\u64A4\u9500"),(he==null?void 0:he.appeal_status)==3&&ot.createElement("span",{className:bt.tagStyleSzz,style:{color:"#00B187",border:"1px rgba(0,177,135,0.2) solid",background:"rgba(0,177,135,0.1)",display:"flex",alignItems:"center",padding:"0 5px",marginLeft:"10px"}},ot.createElement("img",{src:br,className:"mr5"}),"\u7533\u8BC9\u6210\u529F"),(he==null?void 0:he.appeal_status)==4&&ot.createElement("span",{className:bt.tagStyleSzz,style:{color:"#E30000",border:"1px solid rgba(227,0,0,0.2)",background:"rgba(227,0,0,0.1)",display:"flex",alignItems:"center",padding:"0 5px",marginLeft:"10px"}},ot.createElement("img",{src:qn,className:"mr5"}),"\u7533\u8BC9\u88AB\u62D2\u7EDD"),(he==null?void 0:he.appeal_status)==5&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.tagStyleSzz,style:{color:"#999",border:"1px #999 solid"}},"\u7533\u8BC9\u5931\u8D25")),(he==null?void 0:he.reason)&&ot.createElement("span",{className:`${bt.tagStyleSzz} ${bt.feedbackSty}`},he==null?void 0:he.reason)),ot.createElement(jt.Z,{className:"font14 mt10",value:`${((ri=he==null?void 0:he.appeal_info)==null?void 0:ri.content)||"\u6682\u672A\u5199\u8BC4\u8BED"}`})):ot.createElement(Je.Z,{flex:1},ot.createElement("div",{className:bt.box_item_top},ot.createElement(Ie.Z,{title:kt?(hi=he==null?void 0:he.user_info)==null?void 0:hi.user_name:""},ot.createElement("span",{style:{color:kt?"#3061D0":"#333333",fontWeight:600}},ht?"\u533F\u540D":(tn=he==null?void 0:he.user_info)==null?void 0:tn.user_name)),(he==null?void 0:he.student_work_num)&&ot.createElement(Je.Z,null,ot.createElement("span",{style:{padding:"3px 8px",background:(he==null?void 0:he.student_work_num)==1?"#5A9781":"#FFD28D",color:(he==null?void 0:he.student_work_num)==1?"#FFFFFF":"#AC4C0C",fontSize:"12px",borderRadius:"2px"}},"\u7B2C ",he==null?void 0:he.student_work_num," \u6B21\u63D0\u4EA4\u7684\u4F5C\u4E1A")),((he==null?void 0:he.score)||(he==null?void 0:he.score)==0)&&(ki==null?void 0:ki.single_score)&&ot.createElement(Je.Z,null,ot.createElement("span",{style:{color:he!=null&&he.anonymous_exception?"#E30000":he!=null&&he.old_score?"#999999":"#009C0F",fontWeight:600,marginLeft:"-7px"}}," ",(he==null?void 0:he.old_score)||(he==null?void 0:he.score),"\u5206 ",(he==null?void 0:he.old_score)&&"\uFF08\u5DF2\u5931\u6548\uFF09")),$t!="feedback"&&(Ft==1&&!(he!=null&&he.can_reply)||!(he!=null&&he.can_reply)&&$t=="teacher"&&Kt!=0)&&ot.createElement(Je.Z,null,ot.createElement("span",{className:"c-light-black"},"\uFF08\u5DF2\u5931\u6548\uFF09")),!(ki!=null&&ki.single_score)&&(he==null?void 0:he.score)!==null&&ot.createElement("div",{style:{color:"#333333"}},ot.createElement(Ie.Z,{title:((sn=he==null?void 0:he.score_details)==null?void 0:sn.length)>0?Lr(he==null?void 0:he.score_details,he):"",overlayInnerStyle:{width:"min-content",whiteSpace:"nowrap",overflow:"visible"},placement:"topLeft"},ot.createElement("div",{style:{display:"flex",alignItems:"center"}},((he==null?void 0:he.score)||(he==null?void 0:he.score)==0)&&ot.createElement("span",{style:{color:he!=null&&he.anonymous_exception?"#E30000":he!=null&&he.old_score?"#999999":"#009C0F",fontWeight:600,marginRight:"5px"}},(he==null?void 0:he.old_score)||(he==null?void 0:he.score),"\u5206 ",(he==null?void 0:he.old_score)&&"\uFF08\u5DF2\u5931\u6548\uFF09"),((Tn=he==null?void 0:he.score_details)==null?void 0:Tn.length)>0&&ot.createElement("div",{className:bt.left,style:{width:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},"= ",Lr(he==null?void 0:he.score_details,he))))),(he==null?void 0:he.anonymous_exception)&&ot.createElement("div",{className:bt.yichang,style:{marginLeft:((In=he==null?void 0:he.score_details)==null?void 0:In.length)>0&&"10px"}},ot.createElement("i",{className:"iconfont icon-tishi12",style:{fontSize:"11px",marginRight:"3px"}}),"\u8BC4\u5206\u5F02\u5E38"),(he==null?void 0:he.reason)&&ot.createElement("span",{className:`${bt.tagStyleSzz} ${bt.feedbackSty}`},he==null?void 0:he.reason)),ot.createElement(jt.Z,{className:"font14 mt10",value:`${(he==null?void 0:he.content)||(he==null?void 0:he.hidden_comment)||"\u6682\u672A\u5199\u8BC4\u8BED"}`}),((Mi=he==null?void 0:he.attachments)==null?void 0:Mi.length)>0&&ot.createElement("div",{className:"mt10",style:{display:"flex",flexDirection:"column",gap:10}},(un=he==null?void 0:he.attachments)==null?void 0:un.map((ii,Li)=>ot.createElement("a",{key:Li,href:`${nt.Z.API_SERVER}${ii.url}`},ot.createElement("i",{className:"iconfont icon-fujian font14"}),ot.createElement("span",{className:"ml10"},ii==null?void 0:ii.title),ot.createElement("span",{className:"c-light-black ml20 font12"},ii==null?void 0:ii.filesize))))),$t!="feedback"&&ot.createElement(ot.Fragment,null,$t=="appeal_info"?ot.createElement(Je.Z,{style:{whiteSpace:"nowrap"}},ot.createElement(Me.Z,{wrap:!1,gutter:10},(he==null?void 0:he.delete)&&(he==null?void 0:he.can_appeal)&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.text_style,onClick:()=>{Ze.default.confirm({centered:!0,title:ot.createElement("div",null,"\u64A4\u9500\u7533\u8BC9\u540E\uFF0C\u65E0\u6CD5\u518D\u5BF9\u672C\u8BC4\u9605\u8BB0\u5F55\u8FDB\u884C\u7533\u8BC9",ot.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u7533\u8BC9"),onOk:()=>Pn(void 0,null,function*(){Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData())})})}},"\u64A4\u9500\u7533\u8BC9")),(he==null?void 0:he.appeal_status)==1&&(0,se.GJ)()&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.text_style,style:{marginRight:"10pz"},onClick:()=>{Kr(!0)}},"\u63A5\u53D7\u7533\u8BC9")),(he==null?void 0:he.appeal_status)==1&&(0,se.GJ)()&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.text_style_red,onClick:()=>{Ze.default.confirm({centered:!0,title:ot.createElement("div",null,"\u6B64\u533F\u8BC4\u6210\u7EE9\u5C06\u88AB\u8BA4\u4E3A\u5408\u7406",ot.createElement("br",null),"\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\u7533\u8BC9"),onOk:()=>Pn(void 0,null,function*(){const ii=yield(0,Le.ZP)(`/api/student_works/${pi.userId}/deal_appeal_score.json`,{method:"post",body:{score_id:he==null?void 0:he.score_id,status:4}});(ii==null?void 0:ii.status)===0&&Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData())})})}},"\u62D2\u7EDD\u7533\u8BC9")))):ot.createElement(ot.Fragment,null,Ft==1&&(0,se.Yh)()&&(ki==null?void 0:ki.can_feedback)&&ot.createElement(ot.Fragment,null,ot.createElement(Ie.Z,{title:"\u559C\u6B22"},ot.createElement("i",{style:{color:(he==null?void 0:he.like)&&"#E30000",cursor:"pointer",lineHeight:"21px"},onClick:()=>Ho("like"),className:"iconfot icon-yijiejue font16 mr15"})),ot.createElement(Ie.Z,{title:"\u4E0D\u559C\u6B22"},ot.createElement("i",{style:{color:(he==null?void 0:he.dislike)&&"#37AD83",cursor:"pointer",lineHeight:"21px"},onClick:()=>{he!=null&&he.dislike?Ho("dislike"):Ro(!0)},className:"iconfot icon-weijiejuezhengchang font16 mr5"}))),(Ft==1||$t=="teacher")&&ot.createElement(Je.Z,{style:{whiteSpace:"nowrap"}},ot.createElement(Me.Z,{wrap:!1,gutter:10},((he==null?void 0:he.delete)||((nn=Jt==null?void 0:Jt.userInfo)==null?void 0:nn.user_id)==(he==null?void 0:he.user_id))&&ot.createElement(Je.Z,null,ot.createElement("span",{className:`${bt.text_style} ml5`,onClick:()=>{var ii;Rr(!0),go.setFieldsValue(ho(en({},he),{comment:he==null?void 0:he.content,score_details:((ii=he==null?void 0:he.score_details)==null?void 0:ii.map(Li=>en({},Li)))||[]}))}},"\u7F16\u8F91")),(he==null?void 0:he.is_invalid)&&(he==null?void 0:he.delete)&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.text_style,onClick:()=>{Cn(he)}},"\u5220\u9664")),(he==null?void 0:he.can_appeal)&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.text_style,onClick:()=>{rn({type:1,show:!0})}},"\u7533\u8BC9")),(he==null?void 0:he.can_reply)&&ot.createElement(Je.Z,null,ot.createElement("span",{className:bt.text_style,onClick:()=>{rn({type:0,show:!0})}},"\u56DE\u590D")))),ot.createElement(Je.Z,{style:{whiteSpace:"nowrap",padding:0}},Ft!=1&&((he==null?void 0:he.can_delete)&&$t!="teacher"||((fi=Jt==null?void 0:Jt.userInfo)==null?void 0:fi.user_id)==((Ni=he==null?void 0:he.user_info)==null?void 0:Ni.user_id))&&ot.createElement("span",{className:bt.text_style,onClick:()=>{Dr(!0),zo.setFieldsValue(en({},he))}},"\u7F16\u8F91"),Ft!=1&&(he==null?void 0:he.can_delete)&&$t!="teacher"&&ot.createElement("span",{className:bt.text_style,style:{marginLeft:"10px"},onClick:()=>{Wo(he)}},"\u5220\u9664")))),Ft!=1&&(he==null?void 0:he.old_score)&&ot.createElement("span",{style:{color:"#009C0F"}},"\u6559\u5E08\u533F\u8BC4\u8865\u5206\uFF1A",he==null?void 0:he.score,"\u5206")),Ft==1&&(he==null?void 0:he.appeal_info)&&(he==null?void 0:he.appeal_info)!=""&&ot.createElement("div",{className:"mt20",style:{display:"flex",flexDirection:"column",gap:"20px"}},ot.createElement(Qr,en({type:"appeal_info",Data:he,layer:Ft+1},Bt))),Ft==1&&((Rn=he==null?void 0:he.journals)==null?void 0:Rn.length)>0&&ot.createElement("div",{className:"mt20",style:{display:"flex",flexDirection:"column",gap:"20px"}},(oi=he==null?void 0:he.journals)==null?void 0:oi.map((ii,Li)=>ot.createElement(Qr,en({key:Li,type:$t,Data:ii,layer:Ft+1},Bt)))),(Ri==null?void 0:Ri.show)&&ot.createElement("div",{className:"mt20",style:{marginLeft:"56px"}},ot.createElement(Ae.Z,{height:150,isFocus:!0,watch:!0,onChange:ii=>{or(ii)}}),ot.createElement(Me.Z,{align:"middle",justify:"end",gutter:20},ot.createElement(Je.Z,null,ot.createElement(ve.ZP,{onClick:()=>{rn({type:0,show:!1})}},"\u53D6\u6D88")),ot.createElement(Je.Z,null,ot.createElement(ve.ZP,{loading:yi||mr,type:"primary",onClick:()=>Pn(void 0,null,function*(){if(Oi===""){xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}let ii;$t=="teacher"?ii=(yield Ri==null?void 0:Ri.type)==0?St({hidden_comment:Oi,score_id:he==null?void 0:he.score_id}):Mr({comment:Oi,score_id:he==null?void 0:he.score_id}):ii=yield((Ri==null?void 0:Ri.type)==0?St:Mr)({comment:Oi,score_id:he==null?void 0:he.score_id}),ii.status===0&&(xe.ZP.success("\u64CD\u4F5C\u6210\u529F"),rn({type:0,show:!1}),Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()))})},(Ri==null?void 0:Ri.type)==0?"\u56DE\u590D":"\u7533\u8BC9")))),ot.createElement(Ze.default,{title:"\u63A5\u53D7\u7533\u8BC9",open:vo,centered:!0,destroyOnClose:!0,onCancel:()=>{Kr(!1)},maskClosable:!1,width:544,onOk:()=>{gr.submit()}},ot.createElement(De.default,{form:gr,colon:!1,onFinish:ii=>Pn(void 0,null,function*(){(yield(0,Le.ZP)(`/api/student_works/${pi.userId}/deal_appeal_score.json`,{method:"post",body:ho(en({},ii),{userId:pi.userId,score_id:he==null?void 0:he.score_id,status:3})})).status===0&&(Kr(!1),Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()))})},ot.createElement("div",{style:{color:"#191919"}},"\u786E\u8BA4\u662F\u5426\u63A5\u53D7\u7533\u8BC9\uFF1F\u4E00\u65E6\u63A5\u53D7\uFF0C\u88AB\u7533\u8BC9\u7684\u8BC4\u5206\u8BB0\u5F55\u5C06\u4F5C\u5E9F\u3002\u8BF7\u60A8\u8865\u5145\u533F\u8BC4\u8BC4\u5206\uFF1A"),ot.createElement(At.Z,{style:{marginTop:"20px"},colon:!1,items:[{key:"1",label:"\u7533\u8BC9\u4EBA",children:ot.createElement("span",null,(li=he==null?void 0:he.appeal_info)==null?void 0:li.user_name)},{key:"2",label:"\u88AB\u7533\u8BC9\u4EBA",children:ot.createElement("span",{style:{color:"#191919"}},(Di=he==null?void 0:he.user_info)==null?void 0:Di.user_name)},{key:"3",label:"\u88AB\u7533\u8BC9\u4EBA\u8BC4\u5206",children:ot.createElement("span",{style:{color:"#191919"}},he==null?void 0:he.score)}]}),ot.createElement(Me.Z,{className:"mt20",wrap:!1},ot.createElement(Je.Z,null,ot.createElement(De.default.Item,{label:"\u533F\u8BC4\u5206\u6570",name:"score",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}]},ot.createElement(tt.Z,{min:1,max:100,step:1}))),ot.createElement(Je.Z,null,ot.createElement("span",{className:"ml10",style:{lineHeight:"30px"}},"\u5206")),ot.createElement(Je.Z,null,ot.createElement(De.default.Item,{className:"ml20",valuePropName:"checked",name:"is_appeal_penalty",initialValue:!0},ot.createElement(ze.default,null,"\u6263\u9664\u8FDD\u89C4\u533F\u8BC4\u5206\u6570")))))),ot.createElement(Ze.default,{title:"\u7F16\u8F91\u56DE\u590D",width:800,centered:!0,open:ha,confirmLoading:ca,onCancel:()=>{Dr(!1)},onOk:()=>{zo.submit()}},ot.createElement(De.default,{form:zo,colon:!1,onFinish:ii=>Pn(void 0,null,function*(){const Li=yield Po(en({},ii));(Li==null?void 0:Li.status)===0&&(xe.ZP.success("\u4FEE\u6539\u6210\u529F"),Dr(!1),Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()))})},ot.createElement(De.default.Item,{hidden:!0,name:"id",label:"\u8FD9\u4E2A\u662F\u7528\u6765\u6536\u96C6score_id\u7684"}),ot.createElement(De.default.Item,{name:"content",label:"\u8BC4\u8BED"},ot.createElement(It.h,{height:200,scrollId:"notes",placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5BF9\u672C\u4F5C\u54C1\u7684\u8BC4\u8BED\uFF0C\u6700\u5927\u9650\u52362000\u4E2A\u5B57\u7B26"})))),ot.createElement(vn,{DataProps:{disabledScore:ui=="teacher"},FormProps:{form:go,onFinish:(...ii)=>Pn(void 0,[...ii],function*(Li={}){const dn=yield ua(ho(en({},Li),{homeworkId:pi==null?void 0:pi.userId}));(dn==null?void 0:dn.status)===0&&(xe.ZP.success("\u4FEE\u6539\u6210\u529F"),Rr(!1),Bt!=null&&Bt.getInitData&&(Bt==null||Bt.getInitData()),Bt!=null&&Bt.updateData&&(Bt==null||Bt.updateData()))})},ModalProps:{open:mo,onCancel:()=>{Rr(!1),go.resetFields()},onOk:()=>{go.submit()},confirmLoading:Ll}}),ot.createElement(Ir,{open:hn,onClose:()=>Ro(!1),onOk:(ii,Li)=>Ho("dislike",ii,Li)}))};var jr=(0,Ge.connect)(({user:be})=>({user:be}))(Qr),Ba=Object.defineProperty,$r=Object.getOwnPropertySymbols,xl=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable,Vn=(be,pe,he)=>pe in be?Ba(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Pa=(be,pe)=>{for(var he in pe||(pe={}))xl.call(pe,he)&&Vn(be,he,pe[he]);if($r)for(var he of $r(pe))Oa.call(pe,he)&&Vn(be,he,pe[he]);return be};const Rt=be=>React.createElement("svg",Pa({width:18,height:18,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u4F5C\u4E1A\u63D0\u4EA4\u5185\u5BB9"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M9 0C4.032 0 0 4.032 0 9s4.032 9 9 9 9-4.032 9-9-4.032-9-9-9Z",fill:"#009CDC"}),React.createElement("path",{d:"M11.511 5H5.956a.954.954 0 0 0-.952.951v6.032c0 .524.428.952.952.952h5.555a.954.954 0 0 0 .952-.952V5.951A.954.954 0 0 0 11.511 5ZM6.607 6.881h2.58a.34.34 0 0 1 0 .68h-2.58a.34.34 0 0 1 0-.68Zm1.603 4.17H6.608a.34.34 0 0 1 0-.68H8.21a.34.34 0 0 1 0 .68Zm2.445-1.744H6.607a.34.34 0 0 1 0-.68h4.048a.34.34 0 0 1 0 .68Z",fill:"#FFF"})));var Lt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNOSAwQzQuMDMyIDAgMCA0LjAzMiAwIDlzNC4wMzIgOSA5IDkgOS00LjAzMiA5LTktNC4wMzItOS05LTlaIiBmaWxsPSIjMDA5Q0RDIi8+PHBhdGggZD0iTTExLjUxMSA1SDUuOTU2YS45NTQuOTU0IDAgMCAwLS45NTIuOTUxdjYuMDMyYzAgLjUyNC40MjguOTUyLjk1Mi45NTJoNS41NTVhLjk1NC45NTQgMCAwIDAgLjk1Mi0uOTUyVjUuOTUxQS45NTQuOTU0IDAgMCAwIDExLjUxMSA1Wk02LjYwNyA2Ljg4MWgyLjU4YS4zNC4zNCAwIDAgMSAwIC42OGgtMi41OGEuMzQuMzQgMCAwIDEgMC0uNjhabTEuNjAzIDQuMTdINi42MDhhLjM0LjM0IDAgMCAxIDAtLjY4SDguMjFhLjM0LjM0IDAgMCAxIDAgLjY4Wm0yLjQ0NS0xLjc0NEg2LjYwN2EuMzQuMzQgMCAwIDEgMC0uNjhoNC4wNDhhLjM0LjM0IDAgMCAxIDAgLjY4WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Wt=Object.defineProperty,_t=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,zi=(be,pe,he)=>pe in be?Wt(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,ji=(be,pe)=>{for(var he in pe||(pe={}))gi.call(pe,he)&&zi(be,he,pe[he]);if(_t)for(var he of _t(pe))wi.call(pe,he)&&zi(be,he,pe[he]);return be};const Si=be=>React.createElement("svg",ji({width:70,height:24,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u5F85\u8BC4\u9605"),React.createElement("path",{d:"m70 0-6.146 11.936L70 24H0V0h70ZM40.992 5.229H31.7v1.646h3.768v5.83H31.21v1.663h4.258v5.796h1.724v-5.796h4.325v-1.663h-4.325v-5.83h3.801V5.23Zm4.157 2.167h-1.724v12.768h1.724V7.396Zm-32.34.958c-.845 1.848-2.112 3.46-3.802 4.821l.524 1.663a27.003 27.003 0 0 0 1.656-1.41v6.618h1.706v-8.55a12.713 12.713 0 0 0 1.42-2.437l-1.504-.705Zm44.793-3.142h-8.01v1.613h6.286v10.953c0 .47-.152.706-.44.706l-.658-.034c.186-.37.32-1.008.405-1.932l-1.487-.47c-.05.706-.135 1.126-.253 1.26a.506.506 0 0 1-.422.218h-.305c-.22 0-.32-.134-.32-.386v-1.966h1.672V10.32h-1.487c.406-.672.794-1.411 1.132-2.234l-1.656-.588a23.536 23.536 0 0 1-1.165 2.822H49l1.217-.605c-.406-.739-.811-1.428-1.25-2.032l-1.47.705c.439.571.861 1.21 1.25 1.932h-1.842v4.855h1.538c-.237 1.31-1.183 2.235-2.856 2.806l.913 1.445c2.06-.89 3.21-2.302 3.446-4.25h.913v2.301c0 1.042.456 1.58 1.368 1.58h1.082c.49 0 .878-.102 1.149-.27l.32 1.26h1.015c1.2 0 1.808-.588 1.808-1.764V5.212Zm-35.095 6.3H20.75v1.058h-6.353v1.63h6.353v3.394c0 .537-.253.823-.76.823-.676 0-1.403-.034-2.18-.101l.406 1.663h2.399c1.25 0 1.892-.655 1.892-1.949V14.2h1.775v-1.63h-1.775v-1.058Zm7.317-1.949h-4.022v1.68h2.315v5.964c0 .353-.152.655-.44.907l.66 1.58a25.152 25.152 0 0 0 3.328-2.672l-.49-1.848c-.473.47-.929.908-1.351 1.294V9.563Zm-13.146 4.973-1.369.857c.88.924 1.589 1.764 2.113 2.52l1.368-.958c-.49-.705-1.2-1.512-2.112-2.419Zm35.787-2.806v2.033h-3.97V11.73h3.97Zm-19.11-4.233L31.851 8a28.8 28.8 0 0 1 1.2 4.099l1.504-.37a35.374 35.374 0 0 0-1.2-4.233Zm5.796-.05c-.355 1.646-.76 3.023-1.234 4.099l1.47.52c.524-1.21.963-2.604 1.301-4.216l-1.537-.404ZM20.226 4.573H18.52V6.22h-3.565v1.596h3.565v1.596h-4.174v1.613h10.172V9.412h-4.292V7.816h3.6V6.22h-3.6V4.574Zm-8.025-.101c-.727 1.562-1.842 2.923-3.346 4.065l.524 1.68c2.061-1.512 3.497-3.175 4.342-5.023l-1.52-.722Zm16 .235-1.25 1.21c1.2.873 2.13 1.696 2.771 2.47L30.94 7.16a23.623 23.623 0 0 0-2.737-2.453Zm18.283-.269-1.606.706A15.91 15.91 0 0 1 46.686 7.9l1.572-.806a14.573 14.573 0 0 0-1.774-2.655Z",fill:"#FA6400",fillRule:"nonzero"}));var Ji="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzAiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcwIDAtNi4xNDYgMTEuOTM2TDcwIDI0SDBWMGg3MFpNNDAuOTkyIDUuMjI5SDMxLjd2MS42NDZoMy43Njh2NS44M0gzMS4yMXYxLjY2M2g0LjI1OHY1Ljc5NmgxLjcyNHYtNS43OTZoNC4zMjV2LTEuNjYzaC00LjMyNXYtNS44M2gzLjgwMVY1LjIzWm00LjE1NyAyLjE2N2gtMS43MjR2MTIuNzY4aDEuNzI0VjcuMzk2Wm0tMzIuMzQuOTU4Yy0uODQ1IDEuODQ4LTIuMTEyIDMuNDYtMy44MDIgNC44MjFsLjUyNCAxLjY2M2EyNy4wMDMgMjcuMDAzIDAgMCAwIDEuNjU2LTEuNDF2Ni42MThoMS43MDZ2LTguNTVhMTIuNzEzIDEyLjcxMyAwIDAgMCAxLjQyLTIuNDM3bC0xLjUwNC0uNzA1Wm00NC43OTMtMy4xNDJoLTguMDF2MS42MTNoNi4yODZ2MTAuOTUzYzAgLjQ3LS4xNTIuNzA2LS40NC43MDZsLS42NTgtLjAzNGMuMTg2LS4zNy4zMi0xLjAwOC40MDUtMS45MzJsLTEuNDg3LS40N2MtLjA1LjcwNi0uMTM1IDEuMTI2LS4yNTMgMS4yNmEuNTA2LjUwNiAwIDAgMS0uNDIyLjIxOGgtLjMwNWMtLjIyIDAtLjMyLS4xMzQtLjMyLS4zODZ2LTEuOTY2aDEuNjcyVjEwLjMyaC0xLjQ4N2MuNDA2LS42NzIuNzk0LTEuNDExIDEuMTMyLTIuMjM0bC0xLjY1Ni0uNTg4YTIzLjUzNiAyMy41MzYgMCAwIDEtMS4xNjUgMi44MjJINDlsMS4yMTctLjYwNWMtLjQwNi0uNzM5LS44MTEtMS40MjgtMS4yNS0yLjAzMmwtMS40Ny43MDVjLjQzOS41NzEuODYxIDEuMjEgMS4yNSAxLjkzMmgtMS44NDJ2NC44NTVoMS41MzhjLS4yMzcgMS4zMS0xLjE4MyAyLjIzNS0yLjg1NiAyLjgwNmwuOTEzIDEuNDQ1YzIuMDYtLjg5IDMuMjEtMi4zMDIgMy40NDYtNC4yNWguOTEzdjIuMzAxYzAgMS4wNDIuNDU2IDEuNTggMS4zNjggMS41OGgxLjA4MmMuNDkgMCAuODc4LS4xMDIgMS4xNDktLjI3bC4zMiAxLjI2aDEuMDE1YzEuMiAwIDEuODA4LS41ODggMS44MDgtMS43NjRWNS4yMTJabS0zNS4wOTUgNi4zSDIwLjc1djEuMDU4aC02LjM1M3YxLjYzaDYuMzUzdjMuMzk0YzAgLjUzNy0uMjUzLjgyMy0uNzYuODIzLS42NzYgMC0xLjQwMy0uMDM0LTIuMTgtLjEwMWwuNDA2IDEuNjYzaDIuMzk5YzEuMjUgMCAxLjg5Mi0uNjU1IDEuODkyLTEuOTQ5VjE0LjJoMS43NzV2LTEuNjNoLTEuNzc1di0xLjA1OFptNy4zMTctMS45NDloLTQuMDIydjEuNjhoMi4zMTV2NS45NjRjMCAuMzUzLS4xNTIuNjU1LS40NC45MDdsLjY2IDEuNThhMjUuMTUyIDI1LjE1MiAwIDAgMCAzLjMyOC0yLjY3MmwtLjQ5LTEuODQ4Yy0uNDczLjQ3LS45MjkuOTA4LTEuMzUxIDEuMjk0VjkuNTYzWm0tMTMuMTQ2IDQuOTczLTEuMzY5Ljg1N2MuODguOTI0IDEuNTg5IDEuNzY0IDIuMTEzIDIuNTJsMS4zNjgtLjk1OGMtLjQ5LS43MDUtMS4yLTEuNTEyLTIuMTEyLTIuNDE5Wm0zNS43ODctMi44MDZ2Mi4wMzNoLTMuOTdWMTEuNzNoMy45N1ptLTE5LjExLTQuMjMzTDMxLjg1MSA4YTI4LjggMjguOCAwIDAgMSAxLjIgNC4wOTlsMS41MDQtLjM3YTM1LjM3NCAzNS4zNzQgMCAwIDAtMS4yLTQuMjMzWm01Ljc5Ni0uMDVjLS4zNTUgMS42NDYtLjc2IDMuMDIzLTEuMjM0IDQuMDk5bDEuNDcuNTJjLjUyNC0xLjIxLjk2My0yLjYwNCAxLjMwMS00LjIxNmwtMS41MzctLjQwNFpNMjAuMjI2IDQuNTczSDE4LjUyVjYuMjJoLTMuNTY1djEuNTk2aDMuNTY1djEuNTk2aC00LjE3NHYxLjYxM2gxMC4xNzJWOS40MTJoLTQuMjkyVjcuODE2aDMuNlY2LjIyaC0zLjZWNC41NzRabS04LjAyNS0uMTAxYy0uNzI3IDEuNTYyLTEuODQyIDIuOTIzLTMuMzQ2IDQuMDY1bC41MjQgMS42OGMyLjA2MS0xLjUxMiAzLjQ5Ny0zLjE3NSA0LjM0Mi01LjAyM2wtMS41Mi0uNzIyWm0xNiAuMjM1LTEuMjUgMS4yMWMxLjIuODczIDIuMTMgMS42OTYgMi43NzEgMi40N0wzMC45NCA3LjE2YTIzLjYyMyAyMy42MjMgMCAwIDAtMi43MzctMi40NTNabTE4LjI4My0uMjY5LTEuNjA2LjcwNkExNS45MSAxNS45MSAwIDAgMSA0Ni42ODYgNy45bDEuNTcyLS44MDZhMTQuNTczIDE0LjU3MyAwIDAgMC0xLjc3NC0yLjY1NVoiIGZpbGw9IiNGQTY0MDAiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",cr=Object.defineProperty,xn=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable,Br=(be,pe,he)=>pe in be?cr(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,za=(be,pe)=>{for(var he in pe||(pe={}))Jr.call(pe,he)&&Br(be,he,pe[he]);if(xn)for(var he of xn(pe))hr.call(pe,he)&&Br(be,he,pe[he]);return be};const wl=be=>React.createElement("svg",za({width:17,height:14,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u4EC5\u6559\u5E08\u53EF\u89C1"),React.createElement("g",{fill:"#CA7720",fillRule:"nonzero"},React.createElement("path",{d:"M7.046 13.302V14h1.566v-.698c0-.557.248-1.093.689-1.485a2.487 2.487 0 0 1 1.66-.615v-1.4c-2.163 0-3.915 1.565-3.915 3.5ZM0 9.802v1.4c.623 0 1.22.22 1.66.615.44.394.688.928.688 1.485V14h1.566v-.698c0-1.935-1.752-3.5-3.914-3.5Z"}),React.createElement("path",{d:"M10.96 3.502a4.878 4.878 0 0 0-.954-2.8 6.002 6.002 0 0 0-2.623 1.476A5.414 5.414 0 0 0 5.48 0a5.39 5.39 0 0 0-1.893 2.178A6 6 0 0 0 .957.702a4.87 4.87 0 0 0-.954 2.8V4.2C.005 6.633 2.007 8.695 4.7 9.044V14h1.566V9.045c2.693-.347 4.694-2.41 4.695-4.843v-.7Z"}),React.createElement("path",{d:"M10.977 8.084c-.061 0-.12-.004-.177-.013a.65.65 0 0 1-.15-.042.343.343 0 0 1-.175-.167.885.885 0 0 1-.075-.214l-.029-.133-.002-.009-.02-.092-.001-.006-.002-.005a.697.697 0 0 0-.005-.018l-.001-.002a.546.546 0 0 1-.013-.046.963.963 0 0 0-.009-.033l-.024-.08-.07-.047a.019.019 0 0 1-.008-.014l-.001-.005a.11.11 0 0 1-.003-.022l.005-.142v-.037c.001-.011.008-.02.02-.023l.011-.003a.422.422 0 0 1 .052-.012l.301-.039c.111-.013.23-.02.383-.02H11.011c.165 0 .333.016.5.047.096.018.188.048.27.074.06.02.106.032.15.04a.425.425 0 0 0 .072.008l-.198.512c-.02.054-.042.101-.065.145a.858.858 0 0 1-.2.25.499.499 0 0 1-.184.096 1.258 1.258 0 0 1-.38.052Zm-.205-.097c.022.005.042.01.062.013a1.09 1.09 0 0 0 .452-.026.435.435 0 0 0 .196-.104.61.61 0 0 0 .105-.138c.055-.095.095-.194.118-.294a.65.65 0 0 0 .018-.205l-.01-.126-.112-.058a.506.506 0 0 0-.13-.042l-.01-.002a1.717 1.717 0 0 0-.374-.039h-.008l-.038.002a4.311 4.311 0 0 0-.128.008 1.43 1.43 0 0 0-.25.041l-.133.036-.032.136a.514.514 0 0 0-.009.059v.001l-.002.018a.708.708 0 0 0-.002.155c.007.073.018.17.041.266a.57.57 0 0 0 .078.189c.019.027.04.05.063.067l.06.043h.045Zm2.28.091a1.4 1.4 0 0 1-.27-.025.75.75 0 0 1-.22-.077.594.594 0 0 1-.228-.228 1.782 1.782 0 0 1-.105-.212l-.21-.507a.565.565 0 0 0 .16-.029l.08-.028.075-.025c.09-.03.19-.05.315-.066a2.854 2.854 0 0 1 .525-.019h.009l.265.015c.11.008.219.024.34.043l.02.004.003.002c.01.002.017.007.018.021l.001.023v.006a.984.984 0 0 1 .005.138l-.034-.062-.048.167-.024.08-.082.288.014-.008c-.018.075-.04.152-.07.225a.512.512 0 0 1-.07.125.333.333 0 0 1-.178.115.855.855 0 0 1-.21.032 1.846 1.846 0 0 1-.08.002Zm-.106-1.115a1.641 1.641 0 0 0-.486.075l-.142.049-.012.15a.722.722 0 0 0 .023.21.868.868 0 0 0 .167.354c.066.083.15.136.249.157.109.024.208.035.303.035h.01a.815.815 0 0 0 .21-.024.319.319 0 0 0 .146-.076.342.342 0 0 0 .079-.128c.041-.11.064-.23.068-.358v-.008c.002-.042 0-.084-.002-.125v-.02a.489.489 0 0 0-.003-.039l-.004-.032-.012-.03a.424.424 0 0 0-.004-.01l-.044-.099-.104-.029a1.763 1.763 0 0 0-.396-.053h-.046Zm1.042 3.06-1.42 2.599-.21-.62.388-.78-.778-.782-.778.781.39.782-.251.633-1.38-2.613s-2.942 1.564-2.942 3.113c0 .428.176.823.605.823h8.731c.427 0 .607-.391.607-.817 0-1.454-2.962-3.12-2.962-3.12Zm.54-3.202-.003-.122-.102-.068c-.012-.01-.024-.017-.037-.024-.208-1.803-.194-2.866-2.287-2.551-.734.11-1.535-.118-1.99.215-.574.539-.615 1.348-.459 2.297-.035.019-.07.04-.103.063l-.102.068-.002.123c-.005.316.034.582.12.787a.788.788 0 0 0 .345.407c.182.62.444 1.084.772 1.419.357.365.787.572 1.273.654l.043.007.044-.01c.538-.113.968-.329 1.31-.69.319-.335.556-.787.73-1.39a.8.8 0 0 0 .332-.41c.083-.203.12-.465.115-.775Zm-.556.6c-.041.102-.098.17-.17.194l-.119.042-.032.12c-.156.58-.365.999-.644 1.293-.264.277-.598.449-1.02.544a1.78 1.78 0 0 1-.967-.509c-.292-.297-.524-.729-.685-1.322l-.034-.126-.126-.04c-.074-.022-.132-.088-.174-.19-.043-.101-.069-.23-.08-.383.116-.018.245-.05.308-.009l.022-.074h.003l.01-.05c.034-.137.073-1 .108-1.139.014-.04.019-.086.045-.12.169.23 1.444.257 2.185-.257l-.139.375.141.028.158-.253-.02.177.15.02.093-.291c.184.105.387.246.568.17.06.136.107.967.137 1.127l.039.206.068-.004.032.107c.08-.01.15-.011.22-.013a1.25 1.25 0 0 1-.077.376Z"})));var Ra="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0NBNzcyMCIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNNy4wNDYgMTMuMzAyVjE0aDEuNTY2di0uNjk4YzAtLjU1Ny4yNDgtMS4wOTMuNjg5LTEuNDg1YTIuNDg3IDIuNDg3IDAgMCAxIDEuNjYtLjYxNXYtMS40Yy0yLjE2MyAwLTMuOTE1IDEuNTY1LTMuOTE1IDMuNVpNMCA5LjgwMnYxLjRjLjYyMyAwIDEuMjIuMjIgMS42Ni42MTUuNDQuMzk0LjY4OC45MjguNjg4IDEuNDg1VjE0aDEuNTY2di0uNjk4YzAtMS45MzUtMS43NTItMy41LTMuOTE0LTMuNVoiLz48cGF0aCBkPSJNMTAuOTYgMy41MDJhNC44NzggNC44NzggMCAwIDAtLjk1NC0yLjggNi4wMDIgNi4wMDIgMCAwIDAtMi42MjMgMS40NzZBNS40MTQgNS40MTQgMCAwIDAgNS40OCAwYTUuMzkgNS4zOSAwIDAgMC0xLjg5MyAyLjE3OEE2IDYgMCAwIDAgLjk1Ny43MDJhNC44NyA0Ljg3IDAgMCAwLS45NTQgMi44VjQuMkMuMDA1IDYuNjMzIDIuMDA3IDguNjk1IDQuNyA5LjA0NFYxNGgxLjU2NlY5LjA0NWMyLjY5My0uMzQ3IDQuNjk0LTIuNDEgNC42OTUtNC44NDN2LS43WiIvPjxnPjxwYXRoIGQ9Ik0xMC45NzcgOC4wODRjLS4wNjEgMC0uMTItLjAwNC0uMTc3LS4wMTNhLjY1LjY1IDAgMCAxLS4xNS0uMDQyLjM0My4zNDMgMCAwIDEtLjE3NS0uMTY3Ljg4NS44ODUgMCAwIDEtLjA3NS0uMjE0bC0uMDI5LS4xMzMtLjAwMi0uMDA5LS4wMi0uMDkyLS4wMDEtLjAwNi0uMDAyLS4wMDVhLjY5Ny42OTcgMCAwIDAtLjAwNS0uMDE4bC0uMDAxLS4wMDJhLjU0Ni41NDYgMCAwIDEtLjAxMy0uMDQ2Ljk2My45NjMgMCAwIDAtLjAwOS0uMDMzbC0uMDI0LS4wOC0uMDctLjA0N2EuMDE5LjAxOSAwIDAgMS0uMDA4LS4wMTRsLS4wMDEtLjAwNWEuMTEuMTEgMCAwIDEtLjAwMy0uMDIybC4wMDUtLjE0MnYtLjAzN2MuMDAxLS4wMTEuMDA4LS4wMi4wMi0uMDIzbC4wMTEtLjAwM2EuNDIyLjQyMiAwIDAgMSAuMDUyLS4wMTJsLjMwMS0uMDM5Yy4xMTEtLjAxMy4yMy0uMDIuMzgzLS4wMkgxMS4wMTFjLjE2NSAwIC4zMzMuMDE2LjUuMDQ3LjA5Ni4wMTguMTg4LjA0OC4yNy4wNzQuMDYuMDIuMTA2LjAzMi4xNS4wNGEuNDI1LjQyNSAwIDAgMCAuMDcyLjAwOGwtLjE5OC41MTJjLS4wMi4wNTQtLjA0Mi4xMDEtLjA2NS4xNDVhLjg1OC44NTggMCAwIDEtLjIuMjUuNDk5LjQ5OSAwIDAgMS0uMTg0LjA5NiAxLjI1OCAxLjI1OCAwIDAgMS0uMzguMDUyWm0tLjIwNS0uMDk3Yy4wMjIuMDA1LjA0Mi4wMS4wNjIuMDEzYTEuMDkgMS4wOSAwIDAgMCAuNDUyLS4wMjYuNDM1LjQzNSAwIDAgMCAuMTk2LS4xMDQuNjEuNjEgMCAwIDAgLjEwNS0uMTM4Yy4wNTUtLjA5NS4wOTUtLjE5NC4xMTgtLjI5NGEuNjUuNjUgMCAwIDAgLjAxOC0uMjA1bC0uMDEtLjEyNi0uMTEyLS4wNThhLjUwNi41MDYgMCAwIDAtLjEzLS4wNDJsLS4wMS0uMDAyYTEuNzE3IDEuNzE3IDAgMCAwLS4zNzQtLjAzOWgtLjAwOGwtLjAzOC4wMDJhNC4zMTEgNC4zMTEgMCAwIDAtLjEyOC4wMDggMS40MyAxLjQzIDAgMCAwLS4yNS4wNDFsLS4xMzMuMDM2LS4wMzIuMTM2YS41MTQuNTE0IDAgMCAwLS4wMDkuMDU5di4wMDFsLS4wMDIuMDE4YS43MDguNzA4IDAgMCAwLS4wMDIuMTU1Yy4wMDcuMDczLjAxOC4xNy4wNDEuMjY2YS41Ny41NyAwIDAgMCAuMDc4LjE4OWMuMDE5LjAyNy4wNC4wNS4wNjMuMDY3bC4wNi4wNDNoLjA0NVptMi4yOC4wOTFhMS40IDEuNCAwIDAgMS0uMjctLjAyNS43NS43NSAwIDAgMS0uMjItLjA3Ny41OTQuNTk0IDAgMCAxLS4yMjgtLjIyOCAxLjc4MiAxLjc4MiAwIDAgMS0uMTA1LS4yMTJsLS4yMS0uNTA3YS41NjUuNTY1IDAgMCAwIC4xNi0uMDI5bC4wOC0uMDI4LjA3NS0uMDI1Yy4wOS0uMDMuMTktLjA1LjMxNS0uMDY2YTIuODU0IDIuODU0IDAgMCAxIC41MjUtLjAxOWguMDA5bC4yNjUuMDE1Yy4xMS4wMDguMjE5LjAyNC4zNC4wNDNsLjAyLjAwNC4wMDMuMDAyYy4wMS4wMDIuMDE3LjAwNy4wMTguMDIxbC4wMDEuMDIzdi4wMDZhLjk4NC45ODQgMCAwIDEgLjAwNS4xMzhsLS4wMzQtLjA2Mi0uMDQ4LjE2Ny0uMDI0LjA4LS4wODIuMjg4LjAxNC0uMDA4Yy0uMDE4LjA3NS0uMDQuMTUyLS4wNy4yMjVhLjUxMi41MTIgMCAwIDEtLjA3LjEyNS4zMzMuMzMzIDAgMCAxLS4xNzguMTE1Ljg1NS44NTUgMCAwIDEtLjIxLjAzMiAxLjg0NiAxLjg0NiAwIDAgMS0uMDguMDAyWm0tLjEwNi0xLjExNWExLjY0MSAxLjY0MSAwIDAgMC0uNDg2LjA3NWwtLjE0Mi4wNDktLjAxMi4xNWEuNzIyLjcyMiAwIDAgMCAuMDIzLjIxLjg2OC44NjggMCAwIDAgLjE2Ny4zNTRjLjA2Ni4wODMuMTUuMTM2LjI0OS4xNTcuMTA5LjAyNC4yMDguMDM1LjMwMy4wMzVoLjAxYS44MTUuODE1IDAgMCAwIC4yMS0uMDI0LjMxOS4zMTkgMCAwIDAgLjE0Ni0uMDc2LjM0Mi4zNDIgMCAwIDAgLjA3OS0uMTI4Yy4wNDEtLjExLjA2NC0uMjMuMDY4LS4zNTh2LS4wMDhjLjAwMi0uMDQyIDAtLjA4NC0uMDAyLS4xMjV2LS4wMmEuNDg5LjQ4OSAwIDAgMC0uMDAzLS4wMzlsLS4wMDQtLjAzMi0uMDEyLS4wM2EuNDI0LjQyNCAwIDAgMC0uMDA0LS4wMWwtLjA0NC0uMDk5LS4xMDQtLjAyOWExLjc2MyAxLjc2MyAwIDAgMC0uMzk2LS4wNTNoLS4wNDZabTEuMDQyIDMuMDYtMS40MiAyLjU5OS0uMjEtLjYyLjM4OC0uNzgtLjc3OC0uNzgyLS43NzguNzgxLjM5Ljc4Mi0uMjUxLjYzMy0xLjM4LTIuNjEzcy0yLjk0MiAxLjU2NC0yLjk0MiAzLjExM2MwIC40MjguMTc2LjgyMy42MDUuODIzaDguNzMxYy40MjcgMCAuNjA3LS4zOTEuNjA3LS44MTcgMC0xLjQ1NC0yLjk2Mi0zLjEyLTIuOTYyLTMuMTJabS41NC0zLjIwMi0uMDAzLS4xMjItLjEwMi0uMDY4Yy0uMDEyLS4wMS0uMDI0LS4wMTctLjAzNy0uMDI0LS4yMDgtMS44MDMtLjE5NC0yLjg2Ni0yLjI4Ny0yLjU1MS0uNzM0LjExLTEuNTM1LS4xMTgtMS45OS4yMTUtLjU3NC41MzktLjYxNSAxLjM0OC0uNDU5IDIuMjk3LS4wMzUuMDE5LS4wNy4wNC0uMTAzLjA2M2wtLjEwMi4wNjgtLjAwMi4xMjNjLS4wMDUuMzE2LjAzNC41ODIuMTIuNzg3YS43ODguNzg4IDAgMCAwIC4zNDUuNDA3Yy4xODIuNjIuNDQ0IDEuMDg0Ljc3MiAxLjQxOS4zNTcuMzY1Ljc4Ny41NzIgMS4yNzMuNjU0bC4wNDMuMDA3LjA0NC0uMDFjLjUzOC0uMTEzLjk2OC0uMzI5IDEuMzEtLjY5LjMxOS0uMzM1LjU1Ni0uNzg3LjczLTEuMzlhLjguOCAwIDAgMCAuMzMyLS40MWMuMDgzLS4yMDMuMTItLjQ2NS4xMTUtLjc3NVptLS41NTYuNmMtLjA0MS4xMDItLjA5OC4xNy0uMTcuMTk0bC0uMTE5LjA0Mi0uMDMyLjEyYy0uMTU2LjU4LS4zNjUuOTk5LS42NDQgMS4yOTMtLjI2NC4yNzctLjU5OC40NDktMS4wMi41NDRhMS43OCAxLjc4IDAgMCAxLS45NjctLjUwOWMtLjI5Mi0uMjk3LS41MjQtLjcyOS0uNjg1LTEuMzIybC0uMDM0LS4xMjYtLjEyNi0uMDRjLS4wNzQtLjAyMi0uMTMyLS4wODgtLjE3NC0uMTktLjA0My0uMTAxLS4wNjktLjIzLS4wOC0uMzgzLjExNi0uMDE4LjI0NS0uMDUuMzA4LS4wMDlsLjAyMi0uMDc0aC4wMDNsLjAxLS4wNWMuMDM0LS4xMzcuMDczLTEgLjEwOC0xLjEzOS4wMTQtLjA0LjAxOS0uMDg2LjA0NS0uMTIuMTY5LjIzIDEuNDQ0LjI1NyAyLjE4NS0uMjU3bC0uMTM5LjM3NS4xNDEuMDI4LjE1OC0uMjUzLS4wMi4xNzcuMTUuMDIuMDkzLS4yOTFjLjE4NC4xMDUuMzg3LjI0Ni41NjguMTcuMDYuMTM2LjEwNy45NjcuMTM3IDEuMTI3bC4wMzkuMjA2LjA2OC0uMDA0LjAzMi4xMDdjLjA4LS4wMS4xNS0uMDExLjIyLS4wMTNhMS4yNSAxLjI1IDAgMCAxLS4wNzcuMzc2WiIvPjwvZz48L2c+PC9zdmc+",Wa=Object.defineProperty,Ii=Object.getOwnPropertySymbols,Ha=Object.prototype.hasOwnProperty,na=Object.prototype.propertyIsEnumerable,Or=(be,pe,he)=>pe in be?Wa(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Pr=(be,pe)=>{for(var he in pe||(pe={}))Ha.call(pe,he)&&Or(be,he,pe[he]);if(Ii)for(var he of Ii(pe))na.call(pe,he)&&Or(be,he,pe[he]);return be};const ra=be=>React.createElement("svg",Pr({width:11,height:14,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u8BC4\u8BED"),React.createElement("g",{fill:"#000",fillRule:"nonzero"},React.createElement("path",{d:"M7.046 13.302V14h1.566v-.698c0-.557.248-1.093.689-1.485a2.487 2.487 0 0 1 1.66-.615v-1.4c-2.163 0-3.915 1.565-3.915 3.5ZM0 9.802v1.4c.623 0 1.22.22 1.66.615.44.394.688.928.688 1.485V14h1.566v-.698c0-1.935-1.752-3.5-3.914-3.5Z"}),React.createElement("path",{d:"M10.96 3.502a4.878 4.878 0 0 0-.954-2.8 6.002 6.002 0 0 0-2.623 1.476A5.414 5.414 0 0 0 5.48 0a5.39 5.39 0 0 0-1.893 2.178A6 6 0 0 0 .957.702a4.87 4.87 0 0 0-.954 2.8V4.2C.005 6.633 2.007 8.695 4.7 9.044V14h1.566V9.045c2.693-.347 4.694-2.41 4.695-4.843v-.7Z"})));var zn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNNy4wNDYgMTMuMzAyVjE0aDEuNTY2di0uNjk4YzAtLjU1Ny4yNDgtMS4wOTMuNjg5LTEuNDg1YTIuNDg3IDIuNDg3IDAgMCAxIDEuNjYtLjYxNXYtMS40Yy0yLjE2MyAwLTMuOTE1IDEuNTY1LTMuOTE1IDMuNVpNMCA5LjgwMnYxLjRjLjYyMyAwIDEuMjIuMjIgMS42Ni42MTUuNDQuMzk0LjY4OC45MjguNjg4IDEuNDg1VjE0aDEuNTY2di0uNjk4YzAtMS45MzUtMS43NTItMy41LTMuOTE0LTMuNVoiLz48cGF0aCBkPSJNMTAuOTYgMy41MDJhNC44NzggNC44NzggMCAwIDAtLjk1NC0yLjggNi4wMDIgNi4wMDIgMCAwIDAtMi42MjMgMS40NzZBNS40MTQgNS40MTQgMCAwIDAgNS40OCAwYTUuMzkgNS4zOSAwIDAgMC0xLjg5MyAyLjE3OEE2IDYgMCAwIDAgLjk1Ny43MDJhNC44NyA0Ljg3IDAgMCAwLS45NTQgMi44VjQuMkMuMDA1IDYuNjMzIDIuMDA3IDguNjk1IDQuNyA5LjA0NFYxNGgxLjU2NlY5LjA0NWMyLjY5My0uMzQ3IDQuNjk0LTIuNDEgNC42OTUtNC44NDN2LS43WiIvPjwvZz48L3N2Zz4=",oa=Object.defineProperty,Er=Object.getOwnPropertySymbols,Ui=Object.prototype.hasOwnProperty,Ul=Object.prototype.propertyIsEnumerable,Ga=(be,pe,he)=>pe in be?oa(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,jo=(be,pe)=>{for(var he in pe||(pe={}))Ui.call(pe,he)&&Ga(be,he,pe[he]);if(Er)for(var he of Er(pe))Ul.call(pe,he)&&Ga(be,he,pe[he]);return be};const ps=be=>React.createElement("svg",jo({width:20,height:20,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u8FD4\u56DE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#3061D0",width:20,height:20,rx:4}),React.createElement("g",{stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},React.createElement("path",{d:"M4.678 10.176h10.526M8.187 13.684l-3.509-3.509 3.509-3.508"}))));var Cl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjMzA2MUQwIiB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHJ4PSI0Ii8+PGcgc3Ryb2tlPSIjRkZGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiI+PHBhdGggZD0iTTQuNjc4IDEwLjE3NmgxMC41MjZNOC4xODcgMTMuNjg0bC0zLjUwOS0zLjUwOSAzLjUwOS0zLjUwOCIvPjwvZz48L2c+PC9zdmc+",Zl=Object.defineProperty,aa=Object.getOwnPropertySymbols,bl=Object.prototype.hasOwnProperty,Yl=Object.prototype.propertyIsEnumerable,El=(be,pe,he)=>pe in be?Zl(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,Sl=(be,pe)=>{for(var he in pe||(pe={}))bl.call(pe,he)&&El(be,he,pe[he]);if(aa)for(var he of aa(pe))Yl.call(pe,he)&&El(be,he,pe[he]);return be};const Vl=be=>React.createElement("svg",Sl({width:70,height:24,xmlns:"http://www.w3.org/2000/svg"},be),React.createElement("title",null,"\u5DF2\u8BC4\u9605"),React.createElement("path",{d:"m70 0-6.146 11.936L70 24H0V0h70ZM40.74 5.229h-9.292v1.646h3.768v5.83h-4.258v1.663h4.258v5.796h1.723v-5.796h4.326v-1.663h-4.326v-5.83h3.802V5.23Zm4.157 2.167h-1.723v12.768h1.723V7.396ZM57.35 5.212h-8.009v1.613h6.286v10.953c0 .47-.152.706-.44.706l-.659-.034c.186-.37.321-1.008.406-1.932l-1.487-.47c-.05.706-.135 1.126-.253 1.26a.506.506 0 0 1-.423.218h-.304c-.22 0-.321-.134-.321-.386v-1.966h1.673V10.32h-1.487c.405-.672.794-1.411 1.132-2.234l-1.656-.588a23.536 23.536 0 0 1-1.166 2.822H48.75l1.216-.605c-.405-.739-.81-1.428-1.25-2.032l-1.47.705c.44.571.862 1.21 1.25 1.932h-1.841v4.855h1.537c-.236 1.31-1.183 2.235-2.855 2.806l.912 1.445c2.061-.89 3.21-2.302 3.447-4.25h.912v2.301c0 1.042.457 1.58 1.369 1.58h1.081c.49 0 .879-.102 1.15-.27l.32 1.26h1.014c1.2 0 1.808-.588 1.808-1.764V5.212ZM29.572 9.563h-4.021v1.68h2.315v5.964c0 .353-.152.655-.44.907l.66 1.58a25.152 25.152 0 0 0 3.328-2.672l-.49-1.848c-.473.47-.93.908-1.352 1.294V9.563Zm-7.215-4.217H9.465v1.68h11.101v3.83h-8.634V8.64h-1.757v8.703c0 1.512.71 2.268 2.163 2.268h9.394c.676-.034 1.234-.236 1.64-.605.337-.37.624-1.63.844-3.78l-1.723-.538c-.102 1.714-.254 2.705-.49 2.94-.237.202-.49.303-.76.303h-8.398c-.609 0-.913-.303-.913-.908v-4.485h10.425v-7.19Zm29.857 6.384v2.033h-3.971V11.73h3.97Zm-19.11-4.233L31.6 8a28.8 28.8 0 0 1 1.2 4.099l1.503-.37a35.374 35.374 0 0 0-1.2-4.233Zm5.795-.05c-.355 1.646-.76 3.023-1.233 4.099l1.47.52c.523-1.21.963-2.604 1.3-4.216L38.9 7.446ZM27.95 4.707l-1.25 1.21c1.2.873 2.129 1.696 2.77 2.47l1.217-1.227a23.623 23.623 0 0 0-2.737-2.453Zm18.282-.269-1.605.706A15.91 15.91 0 0 1 46.435 7.9l1.571-.806a14.573 14.573 0 0 0-1.774-2.655Z",fill:"#37AD83",fillRule:"nonzero"}));var Ql="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzAiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTcwIDAtNi4xNDYgMTEuOTM2TDcwIDI0SDBWMGg3MFpNNDAuNzQgNS4yMjloLTkuMjkydjEuNjQ2aDMuNzY4djUuODNoLTQuMjU4djEuNjYzaDQuMjU4djUuNzk2aDEuNzIzdi01Ljc5Nmg0LjMyNnYtMS42NjNoLTQuMzI2di01LjgzaDMuODAyVjUuMjNabTQuMTU3IDIuMTY3aC0xLjcyM3YxMi43NjhoMS43MjNWNy4zOTZaTTU3LjM1IDUuMjEyaC04LjAwOXYxLjYxM2g2LjI4NnYxMC45NTNjMCAuNDctLjE1Mi43MDYtLjQ0LjcwNmwtLjY1OS0uMDM0Yy4xODYtLjM3LjMyMS0xLjAwOC40MDYtMS45MzJsLTEuNDg3LS40N2MtLjA1LjcwNi0uMTM1IDEuMTI2LS4yNTMgMS4yNmEuNTA2LjUwNiAwIDAgMS0uNDIzLjIxOGgtLjMwNGMtLjIyIDAtLjMyMS0uMTM0LS4zMjEtLjM4NnYtMS45NjZoMS42NzNWMTAuMzJoLTEuNDg3Yy40MDUtLjY3Mi43OTQtMS40MTEgMS4xMzItMi4yMzRsLTEuNjU2LS41ODhhMjMuNTM2IDIzLjUzNiAwIDAgMS0xLjE2NiAyLjgyMkg0OC43NWwxLjIxNi0uNjA1Yy0uNDA1LS43MzktLjgxLTEuNDI4LTEuMjUtMi4wMzJsLTEuNDcuNzA1Yy40NC41NzEuODYyIDEuMjEgMS4yNSAxLjkzMmgtMS44NDF2NC44NTVoMS41MzdjLS4yMzYgMS4zMS0xLjE4MyAyLjIzNS0yLjg1NSAyLjgwNmwuOTEyIDEuNDQ1YzIuMDYxLS44OSAzLjIxLTIuMzAyIDMuNDQ3LTQuMjVoLjkxMnYyLjMwMWMwIDEuMDQyLjQ1NyAxLjU4IDEuMzY5IDEuNThoMS4wODFjLjQ5IDAgLjg3OS0uMTAyIDEuMTUtLjI3bC4zMiAxLjI2aDEuMDE0YzEuMiAwIDEuODA4LS41ODggMS44MDgtMS43NjRWNS4yMTJaTTI5LjU3MiA5LjU2M2gtNC4wMjF2MS42OGgyLjMxNXY1Ljk2NGMwIC4zNTMtLjE1Mi42NTUtLjQ0LjkwN2wuNjYgMS41OGEyNS4xNTIgMjUuMTUyIDAgMCAwIDMuMzI4LTIuNjcybC0uNDktMS44NDhjLS40NzMuNDctLjkzLjkwOC0xLjM1MiAxLjI5NFY5LjU2M1ptLTcuMjE1LTQuMjE3SDkuNDY1djEuNjhoMTEuMTAxdjMuODNoLTguNjM0VjguNjRoLTEuNzU3djguNzAzYzAgMS41MTIuNzEgMi4yNjggMi4xNjMgMi4yNjhoOS4zOTRjLjY3Ni0uMDM0IDEuMjM0LS4yMzYgMS42NC0uNjA1LjMzNy0uMzcuNjI0LTEuNjMuODQ0LTMuNzhsLTEuNzIzLS41MzhjLS4xMDIgMS43MTQtLjI1NCAyLjcwNS0uNDkgMi45NC0uMjM3LjIwMi0uNDkuMzAzLS43Ni4zMDNoLTguMzk4Yy0uNjA5IDAtLjkxMy0uMzAzLS45MTMtLjkwOHYtNC40ODVoMTAuNDI1di03LjE5Wm0yOS44NTcgNi4zODR2Mi4wMzNoLTMuOTcxVjExLjczaDMuOTdabS0xOS4xMS00LjIzM0wzMS42IDhhMjguOCAyOC44IDAgMCAxIDEuMiA0LjA5OWwxLjUwMy0uMzdhMzUuMzc0IDM1LjM3NCAwIDAgMC0xLjItNC4yMzNabTUuNzk1LS4wNWMtLjM1NSAxLjY0Ni0uNzYgMy4wMjMtMS4yMzMgNC4wOTlsMS40Ny41MmMuNTIzLTEuMjEuOTYzLTIuNjA0IDEuMy00LjIxNkwzOC45IDcuNDQ2Wk0yNy45NSA0LjcwN2wtMS4yNSAxLjIxYzEuMi44NzMgMi4xMjkgMS42OTYgMi43NyAyLjQ3bDEuMjE3LTEuMjI3YTIzLjYyMyAyMy42MjMgMCAwIDAtMi43MzctMi40NTNabTE4LjI4Mi0uMjY5LTEuNjA1LjcwNkExNS45MSAxNS45MSAwIDAgMSA0Ni40MzUgNy45bDEuNTcxLS44MDZhMTQuNTczIDE0LjU3MyAwIDAgMC0xLjc3NC0yLjY1NVoiIGZpbGw9IiMzN0FEODMiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",ke=fe(59301),Sr=Object.defineProperty,la=Object.defineProperties,Ua=Object.getOwnPropertyDescriptors,Za=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,sa=(be,pe,he)=>pe in be?Sr(be,pe,{enumerable:!0,configurable:!0,writable:!0,value:he}):be[pe]=he,wn=(be,pe)=>{for(var he in pe||(pe={}))dr.call(pe,he)&&sa(be,he,pe[he]);if(Za)for(var he of Za(pe))Xr.call(pe,he)&&sa(be,he,pe[he]);return be},fr=(be,pe)=>la(be,Ua(pe)),fo=(be,pe,he)=>new Promise((Ft,$t)=>{var Kt=kt=>{try{Jt(he.next(kt))}catch(ht){$t(ht)}},ui=kt=>{try{Jt(he.throw(kt))}catch(ht){$t(ht)}},Jt=kt=>kt.done?Ft(kt.value):Promise.resolve(kt.value).then(Kt,ui);Jt((he=he.apply(be,pe)).next())});const Ml={0:"\u672A\u63D0\u4EA4",1:"\u6309\u65F6\u63D0\u4EA4",2:"\u5EF6\u65F6\u63D0\u4EA4",3:"\u90E8\u5206\u63D0\u4EA4",4:"\u6309\u65F6\u63D0\u4EA4\uFF08\u6559\u5E08\u63D0\u4EA4\uFF09",5:"\u672A\u63D0\u4EA4\uFF08\u6559\u5E08\u63D0\u4EA4\uFF09",6:"\u6309\u65F6\u63D0\u4EA4\uFF08\u7EBF\u4E0B\uFF09","-1":"\u91CD\u505A\u4E2D"},Ya={0:"#4D5865",1:"#FFFFFF",2:"#AC4C0C",3:"#AC4C0C",4:"#FFFFFF",5:"#4D5865",6:"#FFFFFF","-1":"#FFFFFF"},po={0:"#D0D8E0",1:"#37AD83",2:"#FFD28D",3:"#FFD28D",4:"#37AD83",5:"#D0D8E0",6:"#37AD83","-1":"#776FE8"},pr=({shixunHomeworks:be,globalSetting:pe,loading:he,user:Ft,classroomList:$t,dispatch:Kt})=>{var ui,Jt,kt,ht,Bt,Bi,_n,ri,hi,tn,sn,Tn,In,Mi,un,nn,fi,Ni,Rn,oi,li,Di,pi,ki,Ri,rn,Oi,or;const[yi]=(0,Ge.useSearchParams)(),St=(0,Ge.useParams)(),[mr]=De.default.useForm(),[Mr]=De.default.useForm(),{userInfo:Bo}=Ft,{studentWorkDetail:Xe,studentWorkCommon:Qt,studentWorkSupplyDetail:Oo,workList:Ll,workDetail:ua,actionTabs:cn}=be,[,ca,Po,zr]=(0,oe.U)(rt.wT,{userId:St==null?void 0:St.userId}),[,mo,Rr,gr]=(0,oe.U)(rt.Wr,{userId:St==null?void 0:St.userId}),[,go,zo]=(0,oe.U)(rt.G$,{userId:St==null?void 0:St.userId,id:St==null?void 0:St.userId}),[vo,Kr]=(0,ie.useState)("1"),[ha,Dr]=(0,ie.useState)(!1),[hn,Ro]=(0,ie.useState)({last:!1}),[Cn,Wo]=(0,ie.useState)({last:!1}),Lr=(0,ie.useRef)(),[Ho,ii]=(0,ie.useState)(!1),[Li,dn]=(0,ie.useState)("");let[Qn,Wn]=(0,ie.useState)([]);const[kl,Va]=(0,ie.useState)(!1),Al=(0,ie.useRef)(),[$l,vr]=(0,ie.useState)(!1),[yr,Qa]=(0,ie.useState)(""),[Jl,da]=(0,ie.useState)(!1),[Nl,Xl]=(0,ie.useState)(!1),[er,Hn]=(0,ie.useState)(""),[Zi,Mn]=(0,ie.useState)(!0),[fn,fa]=Ze.default.useModal(),[ms,$a]=(0,ie.useState)(!1),[gs,vs]=(0,ie.useState)(!1),[Ja,pa]=(0,ie.useState)(!1),[ma,ga]=(0,ie.useState)(!1),[Xa,va]=(0,ie.useState)(!1),[Go,Ka]=(0,ie.useState)(!1),[yo,qa]=(0,ie.useState)(!0),[_l,xo]=(0,ie.useState)(!1),[ya,xa]=(0,ie.useState)({content:"",type:""}),[Dn,Kl]=(0,ie.useState)({status:0}),ql=[{title:"\u63D0\u4EA4\u6B21\u6570",dataIndex:"id",ellipsis:!0,width:80,render:(ct,Ht,Fn)=>Fn+1},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"commit_time",ellipsis:!0,render:ct=>Ue()(ct).format("YYYY-MM-DD HH:mm")},{title:"\u63D0\u4EA4\u9636\u6BB5",dataIndex:"stage_name",ellipsis:!0,width:180,render:(ct,Ht)=>ke.createElement(ke.Fragment,null,ct,Ht!=null&&Ht.is_redo?ke.createElement("span",{style:{color:"#FF9D18"}},"\uFF08\u6253\u56DE\u91CD\u505A\uFF09"):(Ht==null?void 0:Ht.is_redo_commit)&&ke.createElement("span",{style:{color:"#2FA34F"}},"\uFF08\u91CD\u505A\u63D0\u4EA4\uFF09"))},{title:"\u6559\u5E08\u8BC4\u5206",dataIndex:"teacher_score",ellipsis:!0},{title:"\u52A9\u6559\u8BC4\u5206",dataIndex:"teaching_asistant_score",ellipsis:!0},{title:"\u533F\u8BC4\u5F97\u5206",dataIndex:"student_score",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"history_id",ellipsis:!0,width:80,align:"right",render:(ct,Ht)=>ke.createElement("a",{target:"_blank",href:`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${Ht==null?void 0:Ht.student_work_id}?history_id=${Ht==null?void 0:Ht.history_id}`},"\u67E5\u770B")}],Xi=(ct={key:""})=>{Kt({type:"shixunHomeworks/setActionTabs",payload:ct}),ct.key===""&&(mr.resetFields(),Mr.resetFields())},Yi=()=>{Kt({type:"shixunHomeworks/getStudentWorkCommon",payload:wn({is_invalid:!1,history_id:yi.get("history_id")},St)})},Ci=ct=>{let Ht=0;for(let Fn=0;Fn<ct.length;Fn++)ct[Fn].score!=""&&(Ht+=Number(ct[Fn].score));return Ht.toFixed(2)},ar=ct=>fo(void 0,null,function*(){var Ht;Xe!=null&&Xe.single_score||(ct.score=Ci(ct.score_details)),ct.attachment_ids=(Ht=ct.attachment_ids)==null?void 0:Ht.map(Zo=>{var ba;return(ba=Zo==null?void 0:Zo.response)==null?void 0:ba.id}),Va(!0),(yield(0,rt.yy)(fr(wn({},ct),{userId:St.userId,is_hidden_comment:_l}))).status===0&&(mr.resetFields(),xo(!1),Xe!=null&&Xe.next_work_id?(xe.ZP.success("\u8BC4\u9605\u6210\u529F\uFF01\u5DF2\u4E3A\u60A8\u81EA\u52A8\u5207\u6362\u81F3\u4E0B\u4E00\u4E2A\u5F85\u8BC4\u9605\u7684\u5B66\u751F",2),lr("read")):(xe.ZP.success("\u8BC4\u9605\u6210\u529F\uFF01",2),Yi(),Wr())),ii(!0),Va(!1)}),lr=ct=>fo(void 0,null,function*(){const{comment:Ht,score:Fn,score_details:Zo,attachment_ids:ba}=mr.getFieldsValue();let Co=!1;if(Xe!=null&&Xe.single_score?Co=!(0,si.isNil)((Fn==null?void 0:Fn.length)==0?null:Fn):Zo==null||Zo.some(Yo=>{if(!(0,si.isNil)(Yo!=null&&Yo.score?Yo==null?void 0:Yo.score:null))return Co=!0,!0}),Ht||Co||ba){Ze.default.confirm({centered:!0,okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:ke.createElement("div",{className:"tc"},"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539"),onOk:()=>{mr.resetFields(),ct==="last"?Ge.history.push(yi.get("ids")?`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${Cn==null?void 0:Cn.student_work_id}?ids=${yi.get("ids")}&page=${yi.get("page")}`:`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${Cn==null?void 0:Cn.student_work_id}&page=${yi.get("page")}`):ct==="read"?Ge.history.push(yi.get("ids")?`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${hn==null?void 0:hn.student_work_id}?ids=${yi.get("ids")}&page=${yi.get("page")}`:`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${hn==null?void 0:hn.student_work_id}&page=${yi.get("page")}`):Ge.history.push(`/classrooms/${St.coursesId}/common_homework/${St.categoryId}/detail?page=${yi.get("page")}`)}});return}ct==="last"?Ge.history.push(yi.get("ids")?`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${Cn==null?void 0:Cn.student_work_id}?ids=${yi.get("ids")}&page=${yi.get("page")}`:`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${Cn==null?void 0:Cn.student_work_id}&page=${yi.get("page")}`):ct==="read"?Ge.history.push(yi.get("ids")?`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${hn==null?void 0:hn.student_work_id}?ids=${yi.get("ids")}&page=${yi.get("page")}`:`/classrooms/${St==null?void 0:St.coursesId}/common_homework/${St==null?void 0:St.categoryId}/review/${hn==null?void 0:hn.student_work_id}&page=${yi.get("page")}`):Ge.history.push(`/classrooms/${St.coursesId}/common_homework/${St.categoryId}/detail?page=${yi.get("page")}`)}),kr=ct=>fo(void 0,null,function*(){da(!0),(yield(0,Le.ZP)(`/api/homework_commons/${St.categoryId}/student_works/export_normal_word_all.json`,{method:"post",body:{with_edit:ct,with_submit_record:Zi}})).status===0&&(vr(!1),Ge.history.push(`/classrooms/${St==null?void 0:St.coursesId}/exportlist/normal_work_list`)),da(!1)}),el=ct=>{da(!0),(0,Gt.Nd)("",`${nt.Z.API_SERVER}/api/student_works/${St.userId}/export_normal_word_single.json?with_edit=${ct}&with_submit_record=${Zi}`),da(!1),vr(!1)},wa=ct=>{(0,Gt.Ye)(Kt)||(Xl(ct),Qa("\u9644\u4EF6"),vr(!0))};(0,ie.useEffect)(()=>{Xe!=null&&Xe.homework_id&&(Xe!=null&&Xe.prev_work_id?Wo({student_work_id:Xe==null?void 0:Xe.prev_work_id}):Wo({last:!0}),Xe!=null&&Xe.next_work_id?Ro({student_work_id:Xe==null?void 0:Xe.next_work_id}):Ro({last:!0}))},[Xe]),(0,ie.useEffect)(()=>{const ct=JSON.parse(localStorage.getItem("all_student_works_param")||"{}");Kt({type:"shixunHomeworks/getStudentWorkDetail",payload:fr(wn(wn({},St),ct),{history_id:yi.get("history_id")||er})}),Kt({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:wn({},St)}),Yi(),vo=="3"&&Rr({userId:St==null?void 0:St.userId}),Lr.current.onclick=Ht=>{Ht.target.nodeName==="IMG"&&Ht.target.alt!==""&&Ce.Z.publish("preview-image",Ht.target.src)}},[St.categoryId,St.userId]),(0,ie.useEffect)(()=>{Xe!=null&&Xe.score_details&&Wn(Xe==null?void 0:Xe.score_details.map(ct=>fr(wn({},ct),{score:""})))},[Xe]),(0,ie.useEffect)(()=>{Qn.every(ct=>ct.score==="")?ii(!0):ii(!1)},[Qn]);const Wr=()=>{const ct=JSON.parse(localStorage.getItem("all_student_works_param")||"{}");Kt({type:"shixunHomeworks/getStudentWorkDetail",payload:fr(wn(wn({},St),ct),{history_id:yi.get("history_id")||er})}),Kt({type:"shixunHomeworks/getStudentWorkSupplyDetail",payload:wn({},St)}),Kt({type:"shixunHomeworks/getWorkDetail",payload:{categoryId:St.categoryId}})};(0,ie.useEffect)(()=>{Hn(yi.get("history_id")||"")},[yi.get("history_id")]),(0,ie.useEffect)(()=>(Kt({type:"classroomList/getAssistantPermissions",payload:{course_id:St.coursesId}}),Kt({type:"shixunHomeworks/getWorkDetail",payload:{categoryId:St.categoryId}}),Kt({type:"globalSetting/footerToggle",payload:!1}),()=>{Kt({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,ie.useEffect)(()=>{(0,se.Rm)()&&Kt({type:"classroomList/getAssistantPermissions",payload:{course_id:St.coursesId}})},[(ui=Ft==null?void 0:Ft.userInfo)==null?void 0:ui.username]);const wo=()=>{var ct,Ht,Fn;return er?!1:(0,se.G5)()||(0,se.Rm)()&&((Ht=(ct=$t==null?void 0:$t.AssistantObject)==null?void 0:ct.practice)!=null&&Ht.can_appraise)?!0:!!((0,se.dE)()&&((Fn=Xe==null?void 0:Xe.homework_status)!=null&&Fn.includes("\u533F\u8BC4\u4E2D"))&&!Qt.is_author)},tr=(0,se.dE)()&&((Jt=Xe==null?void 0:Xe.homework_status)==null?void 0:Jt.includes("\u533F\u8BC4\u4E2D"))&&!Qt.is_author,[Uo,tl]=(0,ie.useState)(!1),[il,Ar]=(0,ie.useState)(!1),[Tl,nl]=(0,ie.useState)(!1),es=ct=>{const Ht=ct.currentTarget;Ht.scrollHeight>Ht.clientHeight&&tl(!0)},Ca=ct=>{const Ht=ct.currentTarget;Ht.scrollHeight>Ht.clientHeight&&Ar(!0)},rl=ct=>{const Ht=ct.currentTarget;Ht.scrollHeight>Ht.clientHeight&&nl(!0)};return(0,ie.useEffect)(()=>{var ct;!(Xe!=null&&Xe.single_score)&&mr.setFieldValue("score_details",(ct=Xe==null?void 0:Xe.score_details)==null?void 0:ct.map(Ht=>wn({},Ht)))},[Xe]),ke.createElement("section",{className:"edu-container",ref:Lr,style:{width:wo()?"100%":"1200px",overflow:"hidden",overflowX:"auto"}},ke.createElement("div",{style:(0,se.bg)()&&wo()?{minWidth:"1200px"}:{}},ke.createElement("section",{className:"animated fadeIn"},ke.createElement("div",{style:{height:"52px",background:"#FFFFFF",marginBottom:"10px",padding:"0 20px",display:"flex",alignItems:"center"}},ke.createElement("div",{style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:()=>{lr("list")}},ke.createElement("img",{src:Cl}),ke.createElement("div",{style:{fontWeight:400,color:"#666666",marginLeft:"5px",fontSize:"16px"}},"\u8FD4\u56DE")),ke.createElement("div",{className:Ve.top_content},!tr&&(Xe==null?void 0:Xe.image_url)&&ke.createElement("img",{src:`${nt.Z.IMG_SERVER}/images/${Xe==null?void 0:Xe.image_url}`,className:Ve.top_content_img}),ke.createElement("div",{className:Ve.item_content},ke.createElement("div",{className:Ve.item_name,style:{height:tr?"40px":"20px",lineHeight:tr?"40px":"20px"}},Xe==null?void 0:Xe.author_name,!tr&&ke.createElement("span",{className:Ve.item_tags,style:{color:Ya[Xe==null?void 0:Xe.work_status],background:po[Xe==null?void 0:Xe.work_status]}},Ml[Xe==null?void 0:Xe.work_status])),!tr&&((Xe==null?void 0:Xe.student_id)||(Xe==null?void 0:Xe.group_name))&&ke.createElement("div",{className:Ve.item_code},ke.createElement("span",null,"\u5B66\u53F7\uFF1A",Xe==null?void 0:Xe.student_id),ke.createElement("span",{style:{marginLeft:"20px"}},"\u73ED\u7EA7\uFF1A",Xe==null?void 0:Xe.group_name)))),ke.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center"}},((Xe==null?void 0:Xe.score_given_user)||(Xe==null?void 0:Xe.score_given_user)==0)&&!er&&ke.createElement("div",{className:"mr10 font24",style:{fontWeight:600,color:"#009C0F"}},Xe==null?void 0:Xe.score_given_user,ke.createElement("span",{style:{fontSize:"14px"}},"\u5206")),er&&ke.createElement("span",{style:{padding:"3px",marginRight:30,background:"rgba(219,243,224,0.88)",color:"#1FBE3C",fontSize:"12px"}},"\u7B2C",Xe==null?void 0:Xe.commit_count,"\u6B21\u63D0\u4EA4\u7684\u4F5C\u4E1A"),er&&ke.createElement("div",{className:Ve.buttonStyle,style:{border:"1px solid rgba(48,97,208,0.5)",color:"#3061D0",display:"flex",alignItems:"center",padding:"0 10px",marginRight:10,height:32,cursor:"pointer"},onClick:()=>{Xi({key:"\u4F5C\u4E1A\u63CF\u8FF0"})}},ke.createElement("i",{className:"iconfont icon-fenzuzuoye3 font18",style:{color:"#009CDC"}}),ke.createElement("span",{style:{marginLeft:5}},"\u4F5C\u4E1A\u63CF\u8FF0")),!er&&ke.createElement("div",null,!((0,se.dE)()&&Qt.is_author)&&(Xe!=null&&Xe.rated_already?ke.createElement("img",{src:Ql,style:{margin:"0 20px 0 0"}}):ke.createElement("img",{src:Ji,style:{marginRight:"20px"}}))),(0,se.dE)()&&Qt.is_author?ke.createElement(ke.Fragment,null):(Xe==null?void 0:Xe.have_history_comment)&&ke.createElement(ve.ZP,{className:Ve.buttonStyle,style:{border:"1px solid rgba(48,97,208,0.5)",color:"#3061D0",display:"flex",alignItems:"center",padding:"0 10px"},icon:ke.createElement("i",{className:"iconfont icon-chakanshenqingjilu"}),onClick:()=>{Xi({key:"\u5386\u53F2\u8BC4\u9605\u8BB0\u5F55"})}},"\u5386\u53F2\u8BC4\u9605\u8BB0\u5F55"),!er&&(0,se.G5)()&&ke.createElement(Te.Z,{menu:{items:[{label:ke.createElement("div",{onClick:()=>{wa(!1)}},"\u5BFC\u51FA\u7B54\u9898\u8BB0\u5F55\u4E0E\u9644\u4EF6"),key:"1"},{label:ke.createElement("div",{onClick:()=>{wa(!0)}},"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u7B54\u9898\u8BB0\u5F55\u4E0E\u9644\u4EF6"),key:"2"}]}},ke.createElement("div",{className:`${Ve.daochu} ${Ve.buttonStyle}`},"\u5BFC\u51FA",ke.createElement("i",{className:"iconfont icon-a-xialazhankai",style:{fontSize:"6px",marginLeft:"6px"}})))))),ke.createElement("div",{style:{display:"flex"}},yo&&wo()&&ke.createElement("div",{className:Ve.left_content},ke.createElement("div",{className:Ve.left_title},ke.createElement("i",{className:"iconfont icon-fenzuzuoye3 font18",style:{color:"#009CDC"}}),ke.createElement("span",{className:"ml10"},"\u4F5C\u4E1A\u63CF\u8FF0"),ke.createElement("span",{className:Ve.see_work,onClick:()=>{Xi({key:"\u4F5C\u4E1A\u63CF\u8FF0"})}},"\u67E5\u770B")),ke.createElement("div",{className:Ve.left_list},ke.createElement("div",{className:`${Ve.list_title} gap-10px`},ke.createElement("div",{style:{width:"5px",height:"10px",background:"#3061D0"}}),ke.createElement("span",{className:"mr-auto font-semibold",style:{color:"#171717"}},"\u8BC4\u9605\u4EFB\u52A1"),ke.createElement("div",{className:`flex item-center ${(Xe==null?void 0:Xe.commented_size)>1e3||(Xe==null?void 0:Xe.no_commented_size)>1e3?"flex-col-reverse":"gap-8px"}`},ke.createElement("span",{className:"c-grey-333"},"\u5DF2\u8BC4"),ke.createElement("span",{className:"font-semibold",style:{color:"#009C0F"}},Xe==null?void 0:Xe.commented_size)),ke.createElement("div",{className:`flex item-center ${(Xe==null?void 0:Xe.no_commented_size)>1e3||(Xe==null?void 0:Xe.commented_size)>1e3?"flex-col-reverse":"gap-8px"}`},ke.createElement("span",{className:"c-grey-333"},"\u672A\u8BC4"),ke.createElement("span",{className:"font-semibold",style:{color:"#FA6400"}},Xe==null?void 0:Xe.no_commented_size))),ke.createElement("div",{className:`${Ve.list_box} ${Uo?"":Ve.hiddenBar}`,onMouseEnter:es,onMouseLeave:()=>tl(!1)},(kt=Xe==null?void 0:Xe.all_student_works)==null?void 0:kt.map(ct=>{var Ht;return ke.createElement("div",{className:Ve.list_item,style:{background:(Ht=St==null?void 0:St.userId)!=null&&Ht.includes(ct==null?void 0:ct.student_work_id)?"#F1F4F9":""},onClick:()=>{Ge.history.push(ct==null?void 0:ct.url)}},ke.createElement("img",{src:`${nt.Z.IMG_SERVER}/images/${ct==null?void 0:ct.image_url}`,className:Ve.item_img,style:{filter:tr&&"blur(10px)",border:tr&&"none"}}),ke.createElement("div",{className:Ve.item_content},ke.createElement("div",{className:Ve.item_name,style:{height:tr?"40px":"20px",lineHeight:tr?"40px":"20px"}},ct==null?void 0:ct.username),!tr&&ke.createElement("div",{className:Ve.item_code},"\u5B66\u53F7\uFF1A",ct==null?void 0:ct.student_id)),ke.createElement("div",{className:Ve.item_states,style:{color:(ct==null?void 0:ct.score)=="\u5F85\u8BC4"?"#FA6400":"#009C0F"}},ct==null?void 0:ct.score,(ct==null?void 0:ct.score)!="\u5F85\u8BC4"&&"\u5206"))})))),wo()&&ke.createElement("div",{className:yo?Ve.foldClose:Ve.foldOpen,onClick:()=>qa(!yo)},yo&&ke.createElement(Ie.Z,{placement:"right",title:"\u6536\u8D77"},ke.createElement("span",{className:"icon-zuojiantou iconfont c-grey-c"})),!yo&&ke.createElement(Ie.Z,{placement:"right",title:"\u5C55\u5F00"},ke.createElement("span",{className:"icon-youjiantou iconfont",style:{color:"#3061D0"}}))),ke.createElement("div",{style:{flex:1,margin:wo()?"0 20px 0 5px":"auto",minWidth:"600px"}},ke.createElement(Ee.default,{className:Ve.TabsStyle,destroyInactiveTabPane:!0,defaultActiveKey:"1",activeKey:vo,tabBarExtraContent:ke.createElement(ke.Fragment,null,!er&&(Xe==null?void 0:Xe.commit_count)>1&&ke.createElement(ve.ZP,{style:{border:"none",color:"#3061D0",display:"flex",alignItems:"center",padding:0},icon:ke.createElement("i",{className:"iconfont icon-chakanshenqingjilu"}),loading:ca,onClick:()=>fo(void 0,null,function*(){yield Po({},!0),Xi({key:"\u4F5C\u4E1A\u63D0\u4EA4\u8BB0\u5F55"})})},"\u4F5C\u4E1A\u63D0\u4EA4\u8BB0\u5F55")),onChange:ct=>{Kr(ct),ct=="2"&&Ge.history.push(`/classrooms/${St.coursesId}/common_homework/${St.categoryId}/lab-report-view/${St.userId}`),ct=="3"&&Rr({})}},ke.createElement(Ee.default.TabPane,{tab:ke.createElement("span",{style:{position:"relative"}},"\u5B66\u751F\u4F5C\u4E1A",ke.createElement(Ie.Z,{title:ke.createElement("span",{className:"font14"},"\uFF08\u5F53\u524D\u652F\u6301\u6279\u6CE8\u7684\u6587\u6863\u7C7B\u578B\uFF1A.docx\u3001.xlsx\u3001.pptx\uFF09")},ke.createElement("i",{className:"iconfont icon-tishixiaowenhao ml10 font14 c-grey-999 current",style:{lineHeight:"18px"}}))),key:"1"}),!er&&(0,se.j5)()&&ke.createElement(Ee.default.TabPane,{tab:"\u5B9E\u9A8C\u62A5\u544A",key:"2"}),(Xe==null?void 0:Xe.anonymous_comment)&&!er&&ke.createElement(Ee.default.TabPane,{tab:"\u95EE\u9898\u53CD\u9988",key:"3"})),ke.createElement("div",{className:`${il?"":Ve.hiddenBar}`,onMouseEnter:Ca,onMouseLeave:()=>Ar(!1),style:{overflowY:"auto",height:"calc(100vh - 180px)"}},ke.createElement(Ne.Z,{spinning:mo||!!he["shixunHomeworks/getStudentWorkDetail"]||!!he["shixunHomeworks/getStudentWorkSupplyDetail"]},ke.createElement("div",{key:"1",style:{display:vo==="1"?"block":"none"}},ke.createElement("div",{style:{background:"#F5F6F8",padding:"20px"}},ke.createElement("div",{className:Ve.center_top},ke.createElement("div",{className:Ve.center_top_title},ke.createElement("img",{src:Lt}),ke.createElement("span",{className:"ml5",style:{color:"#3061D0",fontWeight:600}},"\u4F5C\u4E1A\u63D0\u4EA4\u5185\u5BB9"),(Xe==null?void 0:Xe.update_time)&&ke.createElement(ke.Fragment,null,ke.createElement("span",{style:{marginLeft:"auto",cursor:"pointer",color:"#333333"}},Ue()(Xe==null?void 0:Xe.update_time).format("YYYY-MM-DD HH:mm")),ke.createElement("span",{className:"ml10",style:{color:"#333333"}},"\u66F4\u65B0"))),ke.createElement("div",{className:Ve.center_top_content},ke.createElement(jt.Z,{value:(Xe==null?void 0:Xe.description)||"\u6682\u65E0\uFF5E"}),ke.createElement(ne.Z,{authority:(0,se.GJ)(),dataSource:Xe==null?void 0:Xe.attachments,callback:()=>{Kt({type:"shixunHomeworks/getStudentWorkDetail",payload:wn({},St)})}})))),((Xe==null?void 0:Xe.work_score)||(Xe==null?void 0:Xe.work_score)==0)&&!er&&ke.createElement(Jo,{dataInfo:Xe,handleCloseOrOpenModal:ct=>{Xi(ct)}})),ke.createElement("div",{key:"3",style:{display:vo==="3"?"block":"none"}},ke.createElement("div",{style:{background:"#fff",display:"flex",flexDirection:"column",padding:"10px 30px 30px 30px"}},((ht=gr==null?void 0:gr.data)==null?void 0:ht.count)>0?ke.createElement(ke.Fragment,null,(Bi=(Bt=gr==null?void 0:gr.data)==null?void 0:Bt.list)==null?void 0:Bi.map((ct,Ht)=>ke.createElement(jr,{key:Ht,type:"feedback",Data:fr(wn({},ct),{time:ct==null?void 0:ct.created_at,user_info:{user_image_url:ct.avatar_url,user_id:ct.user_id,user_name:ct.real_name}}),getInitData:Yi,updateData:Wr,shixunHomeworks:be}))):ke.createElement(ce.Z,null)))),(_n=Qt==null?void 0:Qt.teacher_list)!=null&&_n.length?ke.createElement("div",{className:Ve.pingyue},ke.createElement("div",{className:Ve.pingyue_title},ke.createElement("img",{src:zn,style:{marginRight:"5px"}}),ke.createElement("div",{style:{color:"#333333",fontWeight:600}},"\u6559\u5E08\u8BC4\u9605"),((Xe==null?void 0:Xe.teacher_score)||(Xe==null?void 0:Xe.teacher_score)==0)&&ke.createElement("div",{className:Ve.pingyue_score},ke.createElement("div",{style:{height:"30px",lineHeight:"35px",fontSize:"24px",color:"#009C0F",fontWeight:600,marginLeft:"12px"}},Xe==null?void 0:Xe.teacher_score,ke.createElement("span",{style:{fontSize:"14px"}},"\u5206")),ke.createElement("div",{style:{fontSize:"12px",color:"#666666",marginLeft:"12px"}},"\u6700\u7EC8\u5F97\u5206\uFF08",(Xe==null?void 0:Xe.teacher_mode)==1?"\u5E73\u5747\u8BC4\u5206":"\u6700\u7EC8\u8BC4\u5206","\uFF09"))),ke.createElement("div",{style:{padding:"20px"}},ke.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"20px"}},(ri=Qt==null?void 0:Qt.teacher_list)!=null&&ri.length?(hi=Ja?Qt==null?void 0:Qt.teacher_list:Qt==null?void 0:Qt.teacher_list.slice(0,3))==null?void 0:hi.map((ct,Ht)=>ke.createElement(jr,{key:Ht,index:Ht,type:Dn.status==1&&"teacher",Data:fr(wn({},ct),{user_info:{user_image_url:ct.user_image_url,user_login:ct.user_login,user_name:ct.user_name}}),getInitData:Yi,updateData:Wr,shixunHomeworks:be})):ke.createElement(ce.Z,{styles:{margin:"50px auto"}}),((tn=Qt==null?void 0:Qt.teacher_list)==null?void 0:tn.length)>3&&!Ja&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{pa(!0)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u67E5\u770B\u5168\u90E8\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026"),((sn=Qt==null?void 0:Qt.teacher_list)==null?void 0:sn.length)>3&&Ja&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{pa(!1)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u5DF2\u5C55\u793A\u5168\u90E8\u4F5C\u4E1A\u8BC4\u8BED\uFF0C\u70B9\u51FB\u53EF\u6536\u8D77\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026")),((Tn=Qt==null?void 0:Qt.hidden_comment_scores)==null?void 0:Tn.length)>0&&ke.createElement("div",{className:Ve.pingyue_teacher_title},ke.createElement("img",{src:Ra,style:{marginRight:"5px"}}),ke.createElement("div",{style:{color:"#CA7720",fontWeight:600}},"\u4EC5\u6559\u5E08\u53EF\u89C1\u8BC4\u8BED")),((In=Qt==null?void 0:Qt.hidden_comment_scores)==null?void 0:In.length)>0&&ke.createElement("div",{style:{display:"flex",flexDirection:"column"}},(Mi=Qt==null?void 0:Qt.hidden_comment_scores)!=null&&Mi.length?(un=ma?Qt==null?void 0:Qt.hidden_comment_scores:Qt==null?void 0:Qt.hidden_comment_scores.slice(0,3))==null?void 0:un.map((ct,Ht)=>ke.createElement(jr,{newType:"teacher",key:Ht,index:Ht,type:Dn.status==1&&"teacher",Data:fr(wn({},ct),{user_info:{user_image_url:ct.user_image_url,user_login:ct.user_login,user_name:ct.user_name}}),getInitData:Yi,updateData:Wr,shixunHomeworks:be})):ke.createElement(ce.Z,{styles:{margin:"50px auto"}}),((nn=Qt==null?void 0:Qt.hidden_comment_scores)==null?void 0:nn.length)>3&&!ma&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{ga(!0)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u67E5\u770B\u5168\u90E8\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026"),((fi=Qt==null?void 0:Qt.hidden_comment_scores)==null?void 0:fi.length)>3&&ma&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{ga(!1)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u5DF2\u5C55\u793A\u5168\u90E8\u4F5C\u4E1A\u8BC4\u8BED\uFF0C\u70B9\u51FB\u53EF\u6536\u8D77\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026")))):null,(Ni=Qt==null?void 0:Qt.teaching_assistant_list)!=null&&Ni.length?ke.createElement("div",{className:Ve.pingyue,style:{marginTop:"20px"}},ke.createElement("div",{className:Ve.pingyue_title},ke.createElement("img",{src:zn,style:{marginRight:"5px"}}),ke.createElement("div",{style:{color:"#333333",fontWeight:600}},"\u52A9\u6559\u8BC4\u9605"),((Xe==null?void 0:Xe.teaching_asistant_score)||(Xe==null?void 0:Xe.teaching_asistant_score)==0)&&ke.createElement("div",{className:Ve.pingyue_score},ke.createElement("div",{style:{height:"30px",lineHeight:"35px",fontSize:"24px",color:"#009C0F",fontWeight:600,marginLeft:"12px"}},Xe==null?void 0:Xe.teaching_asistant_score,ke.createElement("span",{style:{fontSize:"14px"}},"\u5206")),ke.createElement("div",{style:{fontSize:"12px",color:"#666666",marginLeft:"12px"}},"\u6700\u7EC8\u5F97\u5206\uFF08",(Xe==null?void 0:Xe.ta_mode)==1?"\u5E73\u5747\u8BC4\u5206":"\u6700\u7EC8\u8BC4\u5206","\uFF09"))),ke.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"20px",padding:"20px"}},(Rn=Qt==null?void 0:Qt.teaching_assistant_list)!=null&&Rn.length?(oi=Xa?Qt==null?void 0:Qt.teaching_assistant_list:Qt==null?void 0:Qt.teaching_assistant_list.slice(0,3))==null?void 0:oi.map((ct,Ht)=>ke.createElement(jr,{key:Ht,index:Ht,type:Dn.status==1&&"teacher",Data:fr(wn({},ct),{user_info:{user_image_url:ct.user_image_url,user_login:ct.user_login,user_name:ct.user_name}}),getInitData:Yi,updateData:Wr,shixunHomeworks:be})):ke.createElement(ce.Z,{styles:{margin:"50px auto"}}),((li=Qt==null?void 0:Qt.teaching_assistant_list)==null?void 0:li.length)>3&&!Xa&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{va(!0)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u67E5\u770B\u5168\u90E8\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026"),((Di=Qt==null?void 0:Qt.teaching_assistant_list)==null?void 0:Di.length)>3&&Xa&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{va(!1)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u5DF2\u5C55\u793A\u5168\u90E8\u4F5C\u4E1A\u8BC4\u8BED\uFF0C\u70B9\u51FB\u53EF\u6536\u8D77\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026"))):null,(pi=Qt==null?void 0:Qt.student_list)!=null&&pi.length?ke.createElement("div",{className:Ve.pingyue,style:{marginTop:"20px"}},ke.createElement("div",{className:Ve.pingyue_title},ke.createElement("img",{src:zn,style:{marginRight:"5px"}}),ke.createElement("div",{style:{color:"#333333",fontWeight:600}},"\u533F\u8BC4\u8BC4\u9605"),((Xe==null?void 0:Xe.student_score)||(Xe==null?void 0:Xe.student_score)==0)&&ke.createElement("div",{className:Ve.pingyue_score},ke.createElement("div",{style:{height:"30px",lineHeight:"35px",fontSize:"24px",color:"#009C0F",fontWeight:600,marginLeft:"12px"}},Xe==null?void 0:Xe.student_score,ke.createElement("span",{style:{fontSize:"14px"}},"\u5206")),ke.createElement("div",{style:{fontSize:"12px",color:"#666666",marginLeft:"12px"}},"\u6700\u7EC8\u5F97\u5206\uFF08\u5E73\u5747\u8BC4\u5206\uFF09"))),ke.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"20px",padding:"20px"}},(ki=Qt==null?void 0:Qt.student_list)!=null&&ki.length?(Ri=Go?Qt==null?void 0:Qt.student_list:Qt==null?void 0:Qt.student_list.slice(0,3))==null?void 0:Ri.map((ct,Ht)=>ke.createElement(jr,{showNm:!0,showName:!(0,se.dE)(),key:Ht,index:Ht,type:Dn.status==1&&"teacher",Data:fr(wn({},ct),{user_info:{user_image_url:ct.user_image_url,user_login:ct.user_login,user_name:ct.user_name}}),getInitData:Yi,updateData:Wr,shixunHomeworks:be})):ke.createElement(ce.Z,{styles:{margin:"50px auto"}}),((rn=Qt==null?void 0:Qt.student_list)==null?void 0:rn.length)>3&&!Go&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{Ka(!0)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u67E5\u770B\u5168\u90E8\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026"),((Oi=Qt==null?void 0:Qt.student_list)==null?void 0:Oi.length)>3&&Go&&ke.createElement("div",{style:{color:"#3061D0",textAlign:"center",cursor:"pointer"},onClick:()=>{Ka(!1)}},"\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u5DF2\u5C55\u793A\u5168\u90E8\u4F5C\u4E1A\u8BC4\u8BED\uFF0C\u70B9\u51FB\u53EF\u6536\u8D77\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026"))):null)),wo()&&ke.createElement("div",{style:{padding:"15px",height:"calc(100vh - 143px)",overflowY:"auto",background:"#ffffff"},className:`${Ve.right_content} ${Tl?"":Ve.hiddenBar}`,onMouseEnter:rl,onMouseLeave:()=>nl(!1)},ke.createElement(De.default,{form:mr,layout:"vertical",size:"large",className:Ve.right_form,style:{position:"relative"},scrollToFirstError:!0,onFinish:ct=>{ar(ct)}},ke.createElement("div",{className:"blod font16 mb10",style:{color:"#191919"}},"\u8BC4\u9605"),ke.createElement(On,{FormProps:{form:mr},isShowStyles:!1}),ke.createElement(De.default.Item,{name:"attachment_ids",className:"mb20",style:{marginTop:"-12px"}},ke.createElement(ai.Z,null)),(0,se.GJ)()&&ke.createElement("div",null,ke.createElement(De.default.Item,{name:"hidden_comment",style:{background:"#F6F7F9",height:"50px",display:"flex",alignItems:"center",padding:"0 20px"}},ke.createElement(ze.default,{onChange:ct=>{var Ht;xo((Ht=ct==null?void 0:ct.target)==null?void 0:Ht.checked)}},"\u8BC4\u8BED\u4EC5\u8BFE\u5802\u6559\u5E08\u53EF\u89C1")))),ke.createElement("div",null,ke.createElement(ve.ZP,{loading:kl,style:{width:"100%",height:"40px",background:"#3061D0",borderRadius:"7px"},type:"primary",onClick:()=>{mr.submit()}}," \u63D0\u4EA4\u8BC4\u9605 ")),ke.createElement("div",{style:{display:"flex",marginTop:"20px",justifyContent:"space-between"}},(Xe==null?void 0:Xe.is_new_rule)&&(0,se.G5)()&&Xe.work_status!==-1&&Xe.work_status!==0&&ke.createElement(ve.ZP,{className:Ve.btnAdd,onClick:()=>{Xi({key:"\u786E\u8BA4\u6253\u56DE\u91CD\u505A"})}}," \u6253\u56DE\u91CD\u505A "),!(Xe!=null&&Xe.is_new_rule)&&(0,se.G5)()&&["\u63D0\u4EA4\u4E2D","\u8865\u4EA4\u4E2D","\u8FDB\u884C\u4E2D"].some(ct=>{var Ht;return(Ht=Xe==null?void 0:Xe.homework_status)==null?void 0:Ht.includes(ct)})&&ke.createElement(ve.ZP,{className:Ve.btnAdd,onClick:()=>{Xi({key:"\u786E\u8BA4\u6253\u56DE\u91CD\u505A"})}}," \u6253\u56DE\u91CD\u505A "),!(Xe!=null&&Xe.is_author)&&(0,se.dE)()&&((or=Xe==null?void 0:Xe.homework_status)==null?void 0:or.includes("\u533F\u8BC4\u4E2D"))&&yi.get("review")!=="review"&&ke.createElement(ve.ZP,{className:Ve.btnAdd,onClick:()=>{Xi({key:"\u95EE\u9898\u53CD\u9988"})}}," \u95EE\u9898\u53CD\u9988 "),ke.createElement(ve.ZP,{className:`${!(Cn!=null&&Cn.last)&&Ve.btnAdd} ${Ve.lastAdd}`,style:{display:"flex",alignItems:"center"},onClick:()=>lr("last"),disabled:Cn==null?void 0:Cn.last},ke.createElement("i",{className:"iconfont icon-zuojiantou font12 mr5"})," \u4E0A\u4E00\u4E2A "),ke.createElement(ve.ZP,{className:!(hn!=null&&hn.last)&&Ve.btnAdd,style:{display:"flex",alignItems:"center"},disabled:hn==null?void 0:hn.last,onClick:()=>lr("read")},"\u4E0B\u4E00\u4E2A ",ke.createElement("i",{className:"iconfont icon-youjiantou font12 ml5"})))))),ke.createElement(st,null),ke.createElement(Nt,{studentWorkDetail:Xe}),ke.createElement(We.Z,null),ke.createElement(Ze.default,{title:"\u786E\u8BA4\u6253\u56DE\u91CD\u505A",open:(cn==null?void 0:cn.key)=="\u786E\u8BA4\u6253\u56DE\u91CD\u505A",destroyOnClose:!0,forceRender:!0,width:700,onCancel:()=>{Xi("")},onOk:()=>fo(void 0,null,function*(){if(!Li){xe.ZP.info("\u8BC4\u8BED\u4E0D\u80FD\u4E3A\u7A7A");return}const ct=yield(0,Le.ZP)(`/api/student_works/${St.userId}/redo_modal.json`,{method:"post",body:{comment:Li,id:St.userId}});(ct==null?void 0:ct.status)===0&&(xe.ZP.info("\u6253\u56DE\u91CD\u505A\u6210\u529F"),Xi(""),Yi(),Wr())})},ke.createElement("div",{style:{padding:"32px"}},ke.createElement("span",null,"\u786E\u8BA4\u5C06",Xe==null?void 0:Xe.author_name,"\u7684\u4F5C\u4E1A\u6253\u56DE\u91CD\u505A\u5417"),ke.createElement("div",{style:{marginTop:"20px"}},ke.createElement("label",null,ke.createElement("span",{style:{marginRight:"5px",color:"red"}},"*"),"\u8BC4\u8BED\uFF1A"),ke.createElement(Ae.Z,{className:Ve.MdEditor,onChange:ct=>dn(ct),defaultValue:"",height:250})))),ke.createElement(Oe.Z,{close:!0,data:ya==null?void 0:ya.content,type:ya==null?void 0:ya.type,hasMask:!0,monacoEditor:{value:Al.current,language:"txt",onChange:()=>{},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:()=>xa({content:"",type:""})}),ke.createElement(Ze.default,{width:675,title:"\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u683C\u5F0F",open:$l,confirmLoading:Jl,centered:!0,onCancel:()=>vr(!1),onOk:()=>{yr=="\u9644\u4EF6"?Nl?kr(!1):el(!1):yr=="\u6279\u6CE8"&&(Nl?kr(!0):el(!0))}},ke.createElement(ze.default,{checked:Zi,onChange:ct=>{Mn(ct.target.checked)}},"\u540C\u65F6\u5BFC\u51FA\u5B66\u751F\u63D0\u4EA4\u8BB0\u5F55"),ke.createElement("div",{className:Ve.export_type_modal_title},"\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u9644\u4EF6\u7C7B\u578B"),ke.createElement("div",{className:Ve.export_type_modal},ke.createElement("div",{className:Ve.export_type_modal_con},ke.createElement("div",{className:`${Ve.type_item} ${yr=="\u9644\u4EF6"?Ve.type_item_active:""}`,onClick:()=>Qa("\u9644\u4EF6")},ke.createElement("div",{className:`${Ve.img_warp}`},ke.createElement("img",{src:te.Z,width:72,height:80})),ke.createElement("span",null,"\u5B66\u751F\u63D0\u4EA4\u7684\u9644\u4EF6")),ke.createElement("div",{className:`${Ve.type_item} ${yr=="\u6279\u6CE8"?Ve.type_item_active:""}`,onClick:()=>Qa("\u6279\u6CE8")},ke.createElement("div",{className:`${Ve.img_warp}`},ke.createElement("img",{src:ee.Z,width:99,height:80})),ke.createElement("span",null,"\u5305\u542B\u6279\u6CE8\u5185\u5BB9\u7684\u9644\u4EF6"))),ke.createElement("div",{className:Ve.export_type_modal_waring},"\u5982\u5B66\u751F\u672A\u4E0A\u4F20\u9644\u4EF6\uFF0C\u4EC5\u4F1A\u5BFC\u51FA\u8BE5\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u9898\u8BB0\u5F55"))),ke.createElement(Ze.default,{title:cn==null?void 0:cn.key,open:(cn==null?void 0:cn.key)=="\u4F5C\u4E1A\u63D0\u4EA4\u8BB0\u5F55",centered:!0,destroyOnClose:!0,width:969,footer:null,onCancel:()=>Xi("")},ke.createElement(je.default,{locale:{emptyText:ke.createElement(ce.Z,null)},columns:ql,dataSource:zr==null?void 0:zr.student_works,pagination:!1})),ke.createElement(Ze.default,{title:cn==null?void 0:cn.key,open:(cn==null?void 0:cn.key)=="\u95EE\u9898\u53CD\u9988",centered:!0,destroyOnClose:!0,width:700,onCancel:()=>{Xi(""),Mr.resetFields()},confirmLoading:go,onOk:()=>{Mr.submit()}},ke.createElement(De.default,{form:Mr,onFinish:ct=>fo(void 0,null,function*(){const Ht=yield zo({userId:St==null?void 0:St.userId,id:St==null?void 0:St.userId,student_work_feedback:wn({},ct)});(Ht==null?void 0:Ht.status)==0&&(xe.ZP.success("\u63D0\u4EA4\u6210\u529F"),Xi(""),Mr.resetFields(),Rr({}),Yi())})},ke.createElement("div",{className:"mb20 p20 pt10 pb10 c-grey-333",style:{background:"#F6F7F9"}}," \u5982\u679C\u4F5C\u54C1\u65E0\u6CD5\u533F\u8BC4\uFF0C\u8BF7\u63CF\u8FF0\u95EE\u9898\u5E76\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u8FDB\u884C\u53CD\u9988\u3002\u53CD\u9988\u540E\u7CFB\u7EDF\u5C06\u4E0D\u4F1A\u6263\u9664\u7F3A\u8BC4\u5206\u6570\u3002"),ke.createElement(De.default.Item,{className:"mb0",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5185\u5BB9"}]},ke.createElement(pt.default.TextArea,{rows:6,placeholder:"\u4F8B\u5982\uFF1A\u4F5C\u54C1\u63D0\u4EA4\u7684\u9644\u4EF6\u4E0D\u6E05\u6670",maxLength:200})))),ke.createElement(Sn,{ModalProps:{open:(cn==null?void 0:cn.key)=="\u5386\u53F2\u8BC4\u9605\u8BB0\u5F55",onCancel:()=>{Xi("")},onOk:()=>{Xi("")}}}),ke.createElement(bi,{ModalProps:{open:(cn==null?void 0:cn.key)=="\u5F97\u5206\u8BE6\u60C5",onCancel:()=>{Xi("")},onOk:()=>{Xi("")}}}),ke.createElement(yn,{ModalProps:{open:(cn==null?void 0:cn.key)=="\u4F5C\u4E1A\u63CF\u8FF0",footer:[ke.createElement(ve.ZP,{type:"primary",onClick:()=>Xi("")},"\u786E\u5B9A")],onCancel:()=>{Xi("")}}}))};var Dl=(0,Ge.connect)(({shixunHomeworks:be,loading:pe,user:he,globalSetting:Ft,classroomList:$t})=>({shixunHomeworks:be,globalSetting:Ft,user:he,loading:pe.effects,classroomList:$t}))(pr)},92725:function(gt,wt,fe){"use strict";fe.d(wt,{$J:function(){return De},JZ:function(){return xe},bN:function(){return Te},jP:function(){return ve},rO:function(){return Ze}});var ie=fe(82093),Ge=(Ie,Ee,Ne)=>new Promise((ze,je)=>{var pt=Ae=>{try{Le(Ne.next(Ae))}catch(Ce){je(Ce)}},We=Ae=>{try{Le(Ne.throw(Ae))}catch(Ce){je(Ce)}},Le=Ae=>Ae.done?ze(Ae.value):Promise.resolve(Ae.value).then(pt,We);Le((Ne=Ne.apply(Ie,Ee)).next())});function De(Ie){return(0,ie.U2)(`libraries/${Ie}.json`)}function Ze(){return(0,ie.U2)("library_tags.json")}function xe(Ie){return Ge(this,null,function*(){return(yield(0,ie.IV)(`attachments/${Ie}.json`)).status===0})}function ve(Ie){return(0,ie.v_)("libraries.json",Ie)}function Te(Ie,Ee){return(0,ie.gz)(`libraries/${Ie}.json`,Ee)}},98072:function(gt,wt,fe){"use strict";fe.d(wt,{U:function(){return Ee}});var ie=fe(59301),Ge=Object.defineProperty,De=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,ve=(Ne,ze,je)=>ze in Ne?Ge(Ne,ze,{enumerable:!0,configurable:!0,writable:!0,value:je}):Ne[ze]=je,Te=(Ne,ze)=>{for(var je in ze||(ze={}))Ze.call(ze,je)&&ve(Ne,je,ze[je]);if(De)for(var je of De(ze))xe.call(ze,je)&&ve(Ne,je,ze[je]);return Ne},Ie=(Ne,ze,je)=>new Promise((pt,We)=>{var Le=Oe=>{try{Ce(je.next(Oe))}catch(He){We(He)}},Ae=Oe=>{try{Ce(je.throw(Oe))}catch(He){We(He)}},Ce=Oe=>Oe.done?pt(Oe.value):Promise.resolve(Oe.value).then(Le,Ae);Ce((je=je.apply(Ne,ze)).next())});function Ee(Ne,ze){const[je,pt]=(0,ie.useState)(ze),[We,Le]=(0,ie.useState)(!1),[Ae,Ce]=(0,ie.useState)();return[je,We,(He,Ue=!1)=>Ie(this,null,function*(){const nt=Ue?ze:Te(Te({},je),He);Le(!0),pt(nt);const rt=yield Ne(nt);return Le(!1),Ce(rt),rt}),Ae,Ce]}},51502:function(gt,wt,fe){"use strict";fe.d(wt,{Z:function(){return de}});var ie=fe(59301),Ge=fe(92310),De=fe.n(Ge),Ze=fe(47999),xe=fe(48755),ve=fe(31756),Te=fe(13783),Ee={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},ze=ie.createContext({}),je=fe(11592),pt=function(we,Pe){var mt={};for(var Se in we)Object.prototype.hasOwnProperty.call(we,Se)&&Pe.indexOf(Se)<0&&(mt[Se]=we[Se]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Se=Object.getOwnPropertySymbols(we);Re<Se.length;Re++)Pe.indexOf(Se[Re])<0&&Object.prototype.propertyIsEnumerable.call(we,Se[Re])&&(mt[Se[Re]]=we[Se[Re]]);return mt};const We=we=>(0,je.Z)(we).map(Pe=>Object.assign(Object.assign({},Pe==null?void 0:Pe.props),{key:Pe.key}));function Le(we,Pe,mt){const Se=ie.useMemo(()=>Pe||We(mt),[Pe,mt]);return ie.useMemo(()=>Se.map(it=>{var{span:yt}=it,$e=pt(it,["span"]);return yt==="filled"?Object.assign(Object.assign({},$e),{filled:!0}):Object.assign(Object.assign({},$e),{span:typeof yt=="number"?yt:(0,Ze.m9)(we,yt)})}),[Se,we])}var Ae=function(we,Pe){var mt={};for(var Se in we)Object.prototype.hasOwnProperty.call(we,Se)&&Pe.indexOf(Se)<0&&(mt[Se]=we[Se]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Se=Object.getOwnPropertySymbols(we);Re<Se.length;Re++)Pe.indexOf(Se[Re])<0&&Object.prototype.propertyIsEnumerable.call(we,Se[Re])&&(mt[Se[Re]]=we[Se[Re]]);return mt};function Ce(we,Pe){let mt=[],Se=[],Re=!1,it=0;return we.filter(yt=>yt).forEach(yt=>{const{filled:$e}=yt,ut=Ae(yt,["filled"]);if($e){Se.push(ut),mt.push(Se),Se=[],it=0;return}const et=Pe-it;it+=yt.span||1,it>=Pe?(it>Pe?(Re=!0,Se.push(Object.assign(Object.assign({},ut),{span:et}))):Se.push(ut),mt.push(Se),Se=[],it=0):Se.push(ut)}),Se.length>0&&mt.push(Se),mt=mt.map(yt=>{const $e=yt.reduce((ut,et)=>ut+(et.span||1),0);if($e<Pe){const ut=yt[yt.length-1];return ut.span=Pe-($e-(ut.span||1)),yt}return yt}),[mt,Re]}var He=(we,Pe)=>{const[mt,Se]=(0,ie.useMemo)(()=>Ce(Pe,we),[Pe,we]);return mt},nt=we=>{let{children:Pe}=we;return Pe};function rt(we){return we!=null}var at=we=>{const{itemPrefixCls:Pe,component:mt,span:Se,className:Re,style:it,labelStyle:yt,contentStyle:$e,bordered:ut,label:et,content:Nt,colon:Gt,type:se,styles:te}=we,ee=mt,oe=ie.useContext(ze),{classNames:ce}=oe;return ut?ie.createElement(ee,{className:De()({[`${Pe}-item-label`]:se==="label",[`${Pe}-item-content`]:se==="content",[`${ce==null?void 0:ce.label}`]:se==="label",[`${ce==null?void 0:ce.content}`]:se==="content"},Re),style:it,colSpan:Se},rt(et)&&ie.createElement("span",{style:Object.assign(Object.assign({},yt),te==null?void 0:te.label)},et),rt(Nt)&&ie.createElement("span",{style:Object.assign(Object.assign({},yt),te==null?void 0:te.content)},Nt)):ie.createElement(ee,{className:De()(`${Pe}-item`,Re),style:it,colSpan:Se},ie.createElement("div",{className:`${Pe}-item-container`},(et||et===0)&&ie.createElement("span",{className:De()(`${Pe}-item-label`,ce==null?void 0:ce.label,{[`${Pe}-item-no-colon`]:!Gt}),style:Object.assign(Object.assign({},yt),te==null?void 0:te.label)},et),(Nt||Nt===0)&&ie.createElement("span",{className:De()(`${Pe}-item-content`,ce==null?void 0:ce.content),style:Object.assign(Object.assign({},$e),te==null?void 0:te.content)},Nt)))};function Et(we,Pe,mt){let{colon:Se,prefixCls:Re,bordered:it}=Pe,{component:yt,type:$e,showLabel:ut,showContent:et,labelStyle:Nt,contentStyle:Gt,styles:se}=mt;return we.map((te,ee)=>{let{label:oe,children:ce,prefixCls:ne=Re,className:Me,style:Je,labelStyle:At,contentStyle:bt,span:It=1,key:ei,styles:Vt}=te;return typeof yt=="string"?ie.createElement(at,{key:`${$e}-${ei||ee}`,className:Me,style:Je,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},Nt),se==null?void 0:se.label),At),Vt==null?void 0:Vt.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},Gt),se==null?void 0:se.content),bt),Vt==null?void 0:Vt.content)},span:It,colon:Se,component:yt,itemPrefixCls:ne,bordered:it,label:ut?oe:null,content:et?ce:null,type:$e}):[ie.createElement(at,{key:`label-${ei||ee}`,className:Me,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Nt),se==null?void 0:se.label),Je),At),Vt==null?void 0:Vt.label),span:1,colon:Se,component:yt[0],itemPrefixCls:ne,bordered:it,label:oe,type:"label"}),ie.createElement(at,{key:`content-${ei||ee}`,className:Me,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Gt),se==null?void 0:se.content),Je),bt),Vt==null?void 0:Vt.content),span:It*2-1,component:yt[1],itemPrefixCls:ne,bordered:it,content:ce,type:"content"})]})}var qe=we=>{const Pe=ie.useContext(ze),{prefixCls:mt,vertical:Se,row:Re,index:it,bordered:yt}=we;return Se?ie.createElement(ie.Fragment,null,ie.createElement("tr",{key:`label-${it}`,className:`${mt}-row`},Et(Re,we,Object.assign({component:"th",type:"label",showLabel:!0},Pe))),ie.createElement("tr",{key:`content-${it}`,className:`${mt}-row`},Et(Re,we,Object.assign({component:"td",type:"content",showContent:!0},Pe)))):ie.createElement("tr",{key:it,className:`${mt}-row`},Et(Re,we,Object.assign({component:yt?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},Pe)))},vt=fe(36237),Fe=fe(63356),lt=fe(16931),Ye=fe(51636);const st=we=>{const{componentCls:Pe,labelBg:mt}=we;return{[`&${Pe}-bordered`]:{[`> ${Pe}-view`]:{border:`${(0,vt.unit)(we.lineWidth)} ${we.lineType} ${we.colorSplit}`,"> table":{tableLayout:"auto"},[`${Pe}-row`]:{borderBottom:`${(0,vt.unit)(we.lineWidth)} ${we.lineType} ${we.colorSplit}`,"&:last-child":{borderBottom:"none"},[`> ${Pe}-item-label, > ${Pe}-item-content`]:{padding:`${(0,vt.unit)(we.padding)} ${(0,vt.unit)(we.paddingLG)}`,borderInlineEnd:`${(0,vt.unit)(we.lineWidth)} ${we.lineType} ${we.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${Pe}-item-label`]:{color:we.colorTextSecondary,backgroundColor:mt,"&::after":{display:"none"}}}},[`&${Pe}-middle`]:{[`${Pe}-row`]:{[`> ${Pe}-item-label, > ${Pe}-item-content`]:{padding:`${(0,vt.unit)(we.paddingSM)} ${(0,vt.unit)(we.paddingLG)}`}}},[`&${Pe}-small`]:{[`${Pe}-row`]:{[`> ${Pe}-item-label, > ${Pe}-item-content`]:{padding:`${(0,vt.unit)(we.paddingXS)} ${(0,vt.unit)(we.padding)}`}}}}}},Ve=we=>{const{componentCls:Pe,extraColor:mt,itemPaddingBottom:Se,itemPaddingEnd:Re,colonMarginRight:it,colonMarginLeft:yt,titleMarginBottom:$e}=we;return{[Pe]:Object.assign(Object.assign(Object.assign({},(0,Fe.Wf)(we)),st(we)),{"&-rtl":{direction:"rtl"},[`${Pe}-header`]:{display:"flex",alignItems:"center",marginBottom:$e},[`${Pe}-title`]:Object.assign(Object.assign({},Fe.vS),{flex:"auto",color:we.titleColor,fontWeight:we.fontWeightStrong,fontSize:we.fontSizeLG,lineHeight:we.lineHeightLG}),[`${Pe}-extra`]:{marginInlineStart:"auto",color:mt,fontSize:we.fontSize},[`${Pe}-view`]:{width:"100%",borderRadius:we.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${Pe}-row`]:{"> th, > td":{paddingBottom:Se,paddingInlineEnd:Re},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${Pe}-item-label`]:{color:we.labelColor,fontWeight:"normal",fontSize:we.fontSize,lineHeight:we.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,vt.unit)(yt)} ${(0,vt.unit)(it)}`},[`&${Pe}-item-no-colon::after`]:{content:'""'}},[`${Pe}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${Pe}-item-content`]:{display:"table-cell",flex:1,color:we.contentColor,fontSize:we.fontSize,lineHeight:we.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${Pe}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${Pe}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${Pe}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${Pe}-row`]:{"> th, > td":{paddingBottom:we.paddingSM}}},"&-small":{[`${Pe}-row`]:{"> th, > td":{paddingBottom:we.paddingXS}}}})}},jt=we=>({labelBg:we.colorFillAlter,labelColor:we.colorTextTertiary,titleColor:we.colorText,titleMarginBottom:we.fontSizeSM*we.lineHeightSM,itemPaddingBottom:we.padding,itemPaddingEnd:we.padding,colonMarginRight:we.marginXS,colonMarginLeft:we.marginXXS/2,contentColor:we.colorText,extraColor:we.colorText});var si=(0,lt.I$)("Descriptions",we=>{const Pe=(0,Ye.mergeToken)(we,{});return Ve(Pe)},jt),ai=function(we,Pe){var mt={};for(var Se in we)Object.prototype.hasOwnProperty.call(we,Se)&&Pe.indexOf(Se)<0&&(mt[Se]=we[Se]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,Se=Object.getOwnPropertySymbols(we);Re<Se.length;Re++)Pe.indexOf(Se[Re])<0&&Object.prototype.propertyIsEnumerable.call(we,Se[Re])&&(mt[Se[Re]]=we[Se[Re]]);return mt};const me=we=>{const{prefixCls:Pe,title:mt,extra:Se,column:Re,colon:it=!0,bordered:yt,layout:$e,children:ut,className:et,rootClassName:Nt,style:Gt,size:se,labelStyle:te,contentStyle:ee,styles:oe,items:ce,classNames:ne}=we,Me=ai(we,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:Je,direction:At,className:bt,style:It,classNames:ei,styles:Vt}=(0,xe.dj)("descriptions"),Ut=Je("descriptions",Pe),Ei=(0,Te.Z)(),kn=ie.useMemo(()=>{var mn;return typeof Re=="number"?Re:(mn=(0,Ze.m9)(Ei,Object.assign(Object.assign({},Ee),Re)))!==null&&mn!==void 0?mn:3},[Ei,Re]),zt=Le(Ei,ce,ut),ln=(0,ve.Z)(se),di=He(kn,zt),[vi,_i,sr]=si(Ut),Hi=ie.useMemo(()=>({labelStyle:te,contentStyle:ee,styles:{content:Object.assign(Object.assign({},Vt.content),oe==null?void 0:oe.content),label:Object.assign(Object.assign({},Vt.label),oe==null?void 0:oe.label)},classNames:{label:De()(ei.label,ne==null?void 0:ne.label),content:De()(ei.content,ne==null?void 0:ne.content)}}),[te,ee,oe,ne,ei,Vt]);return vi(ie.createElement(ze.Provider,{value:Hi},ie.createElement("div",Object.assign({className:De()(Ut,bt,ei.root,ne==null?void 0:ne.root,{[`${Ut}-${ln}`]:ln&&ln!=="default",[`${Ut}-bordered`]:!!yt,[`${Ut}-rtl`]:At==="rtl"},et,Nt,_i,sr),style:Object.assign(Object.assign(Object.assign(Object.assign({},It),Vt.root),oe==null?void 0:oe.root),Gt)},Me),(mt||Se)&&ie.createElement("div",{className:De()(`${Ut}-header`,ei.header,ne==null?void 0:ne.header),style:Object.assign(Object.assign({},Vt.header),oe==null?void 0:oe.header)},mt&&ie.createElement("div",{className:De()(`${Ut}-title`,ei.title,ne==null?void 0:ne.title),style:Object.assign(Object.assign({},Vt.title),oe==null?void 0:oe.title)},mt),Se&&ie.createElement("div",{className:De()(`${Ut}-extra`,ei.extra,ne==null?void 0:ne.extra),style:Object.assign(Object.assign({},Vt.extra),oe==null?void 0:oe.extra)},Se)),ie.createElement("div",{className:`${Ut}-view`},ie.createElement("table",null,ie.createElement("tbody",null,di.map((mn,Qi)=>ie.createElement(qe,{key:Qi,index:Qi,colon:it,prefixCls:Ut,vertical:$e==="vertical",bordered:yt,row:mn}))))))))};me.Item=nt;var de=me},99498:function(gt,wt,fe){(function(ie){ie(fe(89780))})(function(ie){ie.defineOption("placeholder","",function(Ie,Ee,Ne){var ze=Ne&&Ne!=ie.Init;if(Ee&&!ze)Ie.on("blur",xe),Ie.on("change",ve),Ie.on("swapDoc",ve),ie.on(Ie.getInputField(),"compositionupdate",Ie.state.placeholderCompose=function(){Ze(Ie)}),ve(Ie);else if(!Ee&&ze){Ie.off("blur",xe),Ie.off("change",ve),Ie.off("swapDoc",ve),ie.off(Ie.getInputField(),"compositionupdate",Ie.state.placeholderCompose),Ge(Ie);var je=Ie.getWrapperElement();je.className=je.className.replace(" CodeMirror-empty","")}Ee&&!Ie.hasFocus()&&xe(Ie)});function Ge(Ie){Ie.state.placeholder&&(Ie.state.placeholder.parentNode.removeChild(Ie.state.placeholder),Ie.state.placeholder=null)}function De(Ie){Ge(Ie);var Ee=Ie.state.placeholder=document.createElement("pre");Ee.style.cssText="height: 0; overflow: visible",Ee.style.direction=Ie.getOption("direction"),Ee.className="CodeMirror-placeholder CodeMirror-line-like";var Ne=Ie.getOption("placeholder");typeof Ne=="string"&&(Ne=document.createTextNode(Ne)),Ee.appendChild(Ne),Ie.display.lineSpace.insertBefore(Ee,Ie.display.lineSpace.firstChild)}function Ze(Ie){setTimeout(function(){var Ee=!1,Ne=Ie.getInputField();Ne.nodeName=="TEXTAREA"?Ee=!Ne.value:Ie.lineCount()==1&&(Ee=!/[^\u200b]/.test(Ne.querySelector(".CodeMirror-line").textContent)),Ee?De(Ie):Ge(Ie)},20)}function xe(Ie){Te(Ie)&&De(Ie)}function ve(Ie){var Ee=Ie.getWrapperElement(),Ne=Te(Ie);Ee.className=Ee.className.replace(" CodeMirror-empty","")+(Ne?" CodeMirror-empty":""),Ne?De(Ie):Ge(Ie)}function Te(Ie){return Ie.lineCount()===1&&Ie.getLine(0)===""}})},25717:function(gt,wt,fe){(function(ie){ie(fe(89780))})(function(ie){var Ge={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},De=ie.Pos;ie.defineOption("autoCloseBrackets",!1,function(Le,Ae,Ce){Ce&&Ce!=ie.Init&&(Le.removeKeyMap(xe),Le.state.closeBrackets=null),Ae&&(ve(Ze(Ae,"pairs")),Le.state.closeBrackets=Ae,Le.addKeyMap(xe))});function Ze(Le,Ae){return Ae=="pairs"&&typeof Le=="string"?Le:typeof Le=="object"&&Le[Ae]!=null?Le[Ae]:Ge[Ae]}var xe={Backspace:Ee,Enter:Ne};function ve(Le){for(var Ae=0;Ae<Le.length;Ae++){var Ce=Le.charAt(Ae),Oe="'"+Ce+"'";xe[Oe]||(xe[Oe]=Te(Ce))}}ve(Ge.pairs+"`");function Te(Le){return function(Ae){return je(Ae,Le)}}function Ie(Le){var Ae=Le.state.closeBrackets;if(!Ae||Ae.override)return Ae;var Ce=Le.getModeAt(Le.getCursor());return Ce.closeBrackets||Ae}function Ee(Le){var Ae=Ie(Le);if(!Ae||Le.getOption("disableInput"))return ie.Pass;for(var Ce=Ze(Ae,"pairs"),Oe=Le.listSelections(),He=0;He<Oe.length;He++){if(!Oe[He].empty())return ie.Pass;var Ue=pt(Le,Oe[He].head);if(!Ue||Ce.indexOf(Ue)%2!=0)return ie.Pass}for(var He=Oe.length-1;He>=0;He--){var nt=Oe[He].head;Le.replaceRange("",De(nt.line,nt.ch-1),De(nt.line,nt.ch+1),"+delete")}}function Ne(Le){var Ae=Ie(Le),Ce=Ae&&Ze(Ae,"explode");if(!Ce||Le.getOption("disableInput"))return ie.Pass;for(var Oe=Le.listSelections(),He=0;He<Oe.length;He++){if(!Oe[He].empty())return ie.Pass;var Ue=pt(Le,Oe[He].head);if(!Ue||Ce.indexOf(Ue)%2!=0)return ie.Pass}Le.operation(function(){var nt=Le.lineSeparator()||`
|
|
`;Le.replaceSelection(nt+nt,null),Le.execCommand("goCharLeft"),Oe=Le.listSelections();for(var rt=0;rt<Oe.length;rt++){var tt=Oe[rt].head.line;Le.indentLine(tt,null,!0),Le.indentLine(tt+1,null,!0)}})}function ze(Le){var Ae=ie.cmpPos(Le.anchor,Le.head)>0;return{anchor:new De(Le.anchor.line,Le.anchor.ch+(Ae?-1:1)),head:new De(Le.head.line,Le.head.ch+(Ae?1:-1))}}function je(Le,Ae){var Ce=Ie(Le);if(!Ce||Le.getOption("disableInput"))return ie.Pass;var Oe=Ze(Ce,"pairs"),He=Oe.indexOf(Ae);if(He==-1)return ie.Pass;for(var Ue=Ze(Ce,"closeBefore"),nt=Ze(Ce,"triples"),rt=Oe.charAt(He+1)==Ae,tt=Le.listSelections(),at=He%2==0,Et,ft=0;ft<tt.length;ft++){var qe=tt[ft],vt=qe.head,Fe,lt=Le.getRange(vt,De(vt.line,vt.ch+1));if(at&&!qe.empty())Fe="surround";else if((rt||!at)&<==Ae)rt&&We(Le,vt)?Fe="both":nt.indexOf(Ae)>=0&&Le.getRange(vt,De(vt.line,vt.ch+3))==Ae+Ae+Ae?Fe="skipThree":Fe="skip";else if(rt&&vt.ch>1&&nt.indexOf(Ae)>=0&&Le.getRange(De(vt.line,vt.ch-2),vt)==Ae+Ae){if(vt.ch>2&&/\bstring/.test(Le.getTokenTypeAt(De(vt.line,vt.ch-2))))return ie.Pass;Fe="addFour"}else if(rt){var Ye=vt.ch==0?" ":Le.getRange(De(vt.line,vt.ch-1),vt);if(!ie.isWordChar(lt)&&Ye!=Ae&&!ie.isWordChar(Ye))Fe="both";else return ie.Pass}else if(at&&(lt.length===0||/\s/.test(lt)||Ue.indexOf(lt)>-1))Fe="both";else return ie.Pass;if(!Et)Et=Fe;else if(Et!=Fe)return ie.Pass}var st=He%2?Oe.charAt(He-1):Ae,Ve=He%2?Ae:Oe.charAt(He+1);Le.operation(function(){if(Et=="skip")Le.execCommand("goCharRight");else if(Et=="skipThree")for(var jt=0;jt<3;jt++)Le.execCommand("goCharRight");else if(Et=="surround"){for(var si=Le.getSelections(),jt=0;jt<si.length;jt++)si[jt]=st+si[jt]+Ve;Le.replaceSelections(si,"around"),si=Le.listSelections().slice();for(var jt=0;jt<si.length;jt++)si[jt]=ze(si[jt]);Le.setSelections(si)}else Et=="both"?(Le.replaceSelection(st+Ve,null),Le.triggerElectric(st+Ve),Le.execCommand("goCharLeft")):Et=="addFour"&&(Le.replaceSelection(st+st+st+st,"before"),Le.execCommand("goCharRight"))})}function pt(Le,Ae){var Ce=Le.getRange(De(Ae.line,Ae.ch-1),De(Ae.line,Ae.ch+1));return Ce.length==2?Ce:null}function We(Le,Ae){var Ce=Le.getTokenAt(De(Ae.line,Ae.ch+1));return/\bstring/.test(Ce.type)&&Ce.start==Ae.ch&&(Ae.ch==0||!/\bstring/.test(Le.getTokenTypeAt(Ae)))}})},6313:function(gt,wt,fe){(function(ie){ie(fe(89780),fe(52730))})(function(ie){ie.defineOption("autoCloseTags",!1,function(Ee,Ne,ze){if(ze!=ie.Init&&ze&&Ee.removeKeyMap("autoCloseTags"),!!Ne){var je={name:"autoCloseTags"};(typeof Ne!="object"||Ne.whenClosing!==!1)&&(je["'/'"]=function(pt){return ve(pt)}),(typeof Ne!="object"||Ne.whenOpening!==!1)&&(je["'>'"]=function(pt){return Ze(pt)}),Ee.addKeyMap(je)}});var Ge=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],De=["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 Ze(Ee){if(Ee.getOption("disableInput"))return ie.Pass;for(var Ne=Ee.listSelections(),ze=[],je=Ee.getOption("autoCloseTags"),pt=0;pt<Ne.length;pt++){if(!Ne[pt].empty())return ie.Pass;var We=Ne[pt].head,Le=Ee.getTokenAt(We),Ae=ie.innerMode(Ee.getMode(),Le.state),Ce=Ae.state,Oe=Ae.mode.xmlCurrentTag&&Ae.mode.xmlCurrentTag(Ce),He=Oe&&Oe.name;if(!He)return ie.Pass;var Ue=Ae.mode.configuration=="html",nt=typeof je=="object"&&je.dontCloseTags||Ue&&Ge,rt=typeof je=="object"&&je.indentTags||Ue&&De;Le.end>We.ch&&(He=He.slice(0,He.length-Le.end+We.ch));var tt=He.toLowerCase();if(!He||Le.type=="string"&&(Le.end!=We.ch||!/[\"\']/.test(Le.string.charAt(Le.string.length-1))||Le.string.length==1)||Le.type=="tag"&&Oe.close||Le.string.indexOf("/")==We.ch-Le.start-1||nt&&Te(nt,tt)>-1||Ie(Ee,Ae.mode.xmlCurrentContext&&Ae.mode.xmlCurrentContext(Ce)||[],He,We,!0))return ie.Pass;var at=typeof je=="object"&&je.emptyTags;if(at&&Te(at,He)>-1){ze[pt]={text:"/>",newPos:ie.Pos(We.line,We.ch+2)};continue}var Et=rt&&Te(rt,tt)>-1;ze[pt]={indent:Et,text:">"+(Et?`
|
|
|
|
`:"")+"</"+He+">",newPos:Et?ie.Pos(We.line+1,0):ie.Pos(We.line,We.ch+1)}}for(var ft=typeof je=="object"&&je.dontIndentOnAutoClose,pt=Ne.length-1;pt>=0;pt--){var qe=ze[pt];Ee.replaceRange(qe.text,Ne[pt].head,Ne[pt].anchor,"+insert");var vt=Ee.listSelections().slice(0);vt[pt]={head:qe.newPos,anchor:qe.newPos},Ee.setSelections(vt),!ft&&qe.indent&&(Ee.indentLine(qe.newPos.line,null,!0),Ee.indentLine(qe.newPos.line+1,null,!0))}}function xe(Ee,Ne){for(var ze=Ee.listSelections(),je=[],pt=Ne?"/":"</",We=Ee.getOption("autoCloseTags"),Le=typeof We=="object"&&We.dontIndentOnSlash,Ae=0;Ae<ze.length;Ae++){if(!ze[Ae].empty())return ie.Pass;var Ce=ze[Ae].head,Oe=Ee.getTokenAt(Ce),He=ie.innerMode(Ee.getMode(),Oe.state),Ue=He.state;if(Ne&&(Oe.type=="string"||Oe.string.charAt(0)!="<"||Oe.start!=Ce.ch-1))return ie.Pass;var nt,rt=He.mode.name!="xml"&&Ee.getMode().name=="htmlmixed";if(rt&&He.mode.name=="javascript")nt=pt+"script";else if(rt&&He.mode.name=="css")nt=pt+"style";else{var tt=He.mode.xmlCurrentContext&&He.mode.xmlCurrentContext(Ue);if(!tt||tt.length&&Ie(Ee,tt,tt[tt.length-1],Ce))return ie.Pass;nt=pt+tt[tt.length-1]}Ee.getLine(Ce.line).charAt(Oe.end)!=">"&&(nt+=">"),je[Ae]=nt}if(Ee.replaceSelections(je),ze=Ee.listSelections(),!Le)for(var Ae=0;Ae<ze.length;Ae++)(Ae==ze.length-1||ze[Ae].head.line<ze[Ae+1].head.line)&&Ee.indentLine(ze[Ae].head.line)}function ve(Ee){return Ee.getOption("disableInput")?ie.Pass:xe(Ee,!0)}ie.commands.closeTag=function(Ee){return xe(Ee)};function Te(Ee,Ne){if(Ee.indexOf)return Ee.indexOf(Ne);for(var ze=0,je=Ee.length;ze<je;++ze)if(Ee[ze]==Ne)return ze;return-1}function Ie(Ee,Ne,ze,je,pt){if(!ie.scanForClosingTag)return!1;var We=Math.min(Ee.lastLine()+1,je.line+500),Le=ie.scanForClosingTag(Ee,je,null,We);if(!Le||Le.tag!=ze)return!1;for(var Ae=pt?1:0,Ce=Ne.length-1;Ce>=0&&Ne[Ce]==ze;Ce--)++Ae;je=Le.to;for(var Ce=1;Ce<Ae;Ce++){var Oe=ie.scanForClosingTag(Ee,je,null,We);if(!Oe||Oe.tag!=ze)return!1;je=Oe.to}return!0}})},52730:function(gt,wt,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";var Ge=ie.Pos;function De(Ce,Oe){return Ce.line-Oe.line||Ce.ch-Oe.ch}var Ze="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",xe=Ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ve=new RegExp("<(/?)(["+Ze+"]["+xe+"]*)","g");function Te(Ce,Oe,He,Ue){this.line=Oe,this.ch=He,this.cm=Ce,this.text=Ce.getLine(Oe),this.min=Ue?Math.max(Ue.from,Ce.firstLine()):Ce.firstLine(),this.max=Ue?Math.min(Ue.to-1,Ce.lastLine()):Ce.lastLine()}function Ie(Ce,Oe){var He=Ce.cm.getTokenTypeAt(Ge(Ce.line,Oe));return He&&/\btag\b/.test(He)}function Ee(Ce){if(!(Ce.line>=Ce.max))return Ce.ch=0,Ce.text=Ce.cm.getLine(++Ce.line),!0}function Ne(Ce){if(!(Ce.line<=Ce.min))return Ce.text=Ce.cm.getLine(--Ce.line),Ce.ch=Ce.text.length,!0}function ze(Ce){for(;;){var Oe=Ce.text.indexOf(">",Ce.ch);if(Oe==-1){if(Ee(Ce))continue;return}if(!Ie(Ce,Oe+1)){Ce.ch=Oe+1;continue}var He=Ce.text.lastIndexOf("/",Oe),Ue=He>-1&&!/\S/.test(Ce.text.slice(He+1,Oe));return Ce.ch=Oe+1,Ue?"selfClose":"regular"}}function je(Ce){for(;;){var Oe=Ce.ch?Ce.text.lastIndexOf("<",Ce.ch-1):-1;if(Oe==-1){if(Ne(Ce))continue;return}if(!Ie(Ce,Oe+1)){Ce.ch=Oe;continue}ve.lastIndex=Oe,Ce.ch=Oe;var He=ve.exec(Ce.text);if(He&&He.index==Oe)return He}}function pt(Ce){for(;;){ve.lastIndex=Ce.ch;var Oe=ve.exec(Ce.text);if(!Oe){if(Ee(Ce))continue;return}if(!Ie(Ce,Oe.index+1)){Ce.ch=Oe.index+1;continue}return Ce.ch=Oe.index+Oe[0].length,Oe}}function We(Ce){for(;;){var Oe=Ce.ch?Ce.text.lastIndexOf(">",Ce.ch-1):-1;if(Oe==-1){if(Ne(Ce))continue;return}if(!Ie(Ce,Oe+1)){Ce.ch=Oe;continue}var He=Ce.text.lastIndexOf("/",Oe),Ue=He>-1&&!/\S/.test(Ce.text.slice(He+1,Oe));return Ce.ch=Oe+1,Ue?"selfClose":"regular"}}function Le(Ce,Oe){for(var He=[];;){var Ue=pt(Ce),nt,rt=Ce.line,tt=Ce.ch-(Ue?Ue[0].length:0);if(!Ue||!(nt=ze(Ce)))return;if(nt!="selfClose")if(Ue[1]){for(var at=He.length-1;at>=0;--at)if(He[at]==Ue[2]){He.length=at;break}if(at<0&&(!Oe||Oe==Ue[2]))return{tag:Ue[2],from:Ge(rt,tt),to:Ge(Ce.line,Ce.ch)}}else He.push(Ue[2])}}function Ae(Ce,Oe){for(var He=[];;){var Ue=We(Ce);if(!Ue)return;if(Ue=="selfClose"){je(Ce);continue}var nt=Ce.line,rt=Ce.ch,tt=je(Ce);if(!tt)return;if(tt[1])He.push(tt[2]);else{for(var at=He.length-1;at>=0;--at)if(He[at]==tt[2]){He.length=at;break}if(at<0&&(!Oe||Oe==tt[2]))return{tag:tt[2],from:Ge(Ce.line,Ce.ch),to:Ge(nt,rt)}}}}ie.registerHelper("fold","xml",function(Ce,Oe){for(var He=new Te(Ce,Oe.line,0);;){var Ue=pt(He);if(!Ue||He.line!=Oe.line)return;var nt=ze(He);if(!nt)return;if(!Ue[1]&&nt!="selfClose"){var rt=Ge(He.line,He.ch),tt=Le(He,Ue[2]);return tt&&De(tt.from,rt)>0?{from:rt,to:tt.from}:null}}}),ie.findMatchingTag=function(Ce,Oe,He){var Ue=new Te(Ce,Oe.line,Oe.ch,He);if(!(Ue.text.indexOf(">")==-1&&Ue.text.indexOf("<")==-1)){var nt=ze(Ue),rt=nt&&Ge(Ue.line,Ue.ch),tt=nt&&je(Ue);if(!(!nt||!tt||De(Ue,Oe)>0)){var at={from:Ge(Ue.line,Ue.ch),to:rt,tag:tt[2]};return nt=="selfClose"?{open:at,close:null,at:"open"}:tt[1]?{open:Ae(Ue,tt[2]),close:at,at:"close"}:(Ue=new Te(Ce,rt.line,rt.ch,He),{open:at,close:Le(Ue,tt[2]),at:"open"})}}},ie.findEnclosingTag=function(Ce,Oe,He,Ue){for(var nt=new Te(Ce,Oe.line,Oe.ch,He);;){var rt=Ae(nt,Ue);if(!rt)break;var tt=new Te(Ce,Oe.line,Oe.ch,He),at=Le(tt,rt.tag);if(at)return{open:rt,close:at}}},ie.scanForClosingTag=function(Ce,Oe,He,Ue){var nt=new Te(Ce,Oe.line,Oe.ch,Ue?{from:0,to:Ue}:null);return Le(nt,He)}})},89780:function(gt){(function(wt,fe){gt.exports=fe()})(this,function(){"use strict";var wt=navigator.userAgent,fe=navigator.platform,ie=/gecko\/\d/i.test(wt),Ge=/MSIE \d/.test(wt),De=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(wt),Ze=/Edge\/(\d+)/.exec(wt),xe=Ge||De||Ze,ve=xe&&(Ge?document.documentMode||6:+(Ze||De)[1]),Te=!Ze&&/WebKit\//.test(wt),Ie=Te&&/Qt\/\d+\.\d+/.test(wt),Ee=!Ze&&/Chrome\//.test(wt),Ne=/Opera\//.test(wt),ze=/Apple Computer/.test(navigator.vendor),je=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(wt),pt=/PhantomJS/.test(wt),We=!Ze&&/AppleWebKit/.test(wt)&&/Mobile\/\w+/.test(wt),Le=/Android/.test(wt),Ae=We||Le||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(wt),Ce=We||/Mac/.test(fe),Oe=/\bCrOS\b/.test(wt),He=/win/i.test(fe),Ue=Ne&&wt.match(/Version\/(\d*\.\d*)/);Ue&&(Ue=Number(Ue[1])),Ue&&Ue>=15&&(Ne=!1,Te=!0);var nt=Ce&&(Ie||Ne&&(Ue==null||Ue<12.11)),rt=ie||xe&&ve>=9;function tt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var at=function(a,y){var b=a.className,x=tt(y).exec(b);if(x){var E=b.slice(x.index+x[0].length);a.className=b.slice(0,x.index)+(E?x[1]+E:"")}};function Et(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function ft(a,y){return Et(a).appendChild(y)}function qe(a,y,b,x){var E=document.createElement(a);if(b&&(E.className=b),x&&(E.style.cssText=x),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var z=0;z<y.length;++z)E.appendChild(y[z]);return E}function vt(a,y,b,x){var E=qe(a,y,b,x);return E.setAttribute("role","presentation"),E}var Fe;document.createRange?Fe=function(a,y,b,x){var E=document.createRange();return E.setEnd(x||a,b),E.setStart(a,y),E}:Fe=function(a,y,b){var x=document.body.createTextRange();try{x.moveToElementText(a.parentNode)}catch(E){return x}return x.collapse(!0),x.moveEnd("character",b),x.moveStart("character",y),x};function lt(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 Ye(){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 st(a,y){var b=a.className;tt(y).test(b)||(a.className+=(b?" ":"")+y)}function Ve(a,y){for(var b=a.split(" "),x=0;x<b.length;x++)b[x]&&!tt(b[x]).test(y)&&(y+=" "+b[x]);return y}var jt=function(a){a.select()};We?jt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:xe&&(jt=function(a){try{a.select()}catch(y){}});function si(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function ai(a,y,b){y||(y={});for(var x in a)a.hasOwnProperty(x)&&(b!==!1||!y.hasOwnProperty(x))&&(y[x]=a[x]);return y}function me(a,y,b,x,E){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var z=x||0,re=E||0;;){var ae=a.indexOf(" ",z);if(ae<0||ae>=y)return re+(y-z);re+=ae-z,re+=b-re%b,z=ae+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=si(this.onTimeout,this)};de.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},de.prototype.set=function(a,y){this.f=y;var b=+new Date+a;(!this.id||b<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=b)};function we(a,y){for(var b=0;b<a.length;++b)if(a[b]==y)return b;return-1}var Pe=50,mt={toString:function(){return"CodeMirror.Pass"}},Se={scroll:!1},Re={origin:"*mouse"},it={origin:"+move"};function yt(a,y,b){for(var x=0,E=0;;){var z=a.indexOf(" ",x);z==-1&&(z=a.length);var re=z-x;if(z==a.length||E+re>=y)return x+Math.min(re,y-E);if(E+=z-x,E+=b-E%b,x=z+1,E>=y)return x}}var $e=[""];function ut(a){for(;$e.length<=a;)$e.push(et($e)+" ");return $e[a]}function et(a){return a[a.length-1]}function Nt(a,y){for(var b=[],x=0;x<a.length;x++)b[x]=y(a[x],x);return b}function Gt(a,y,b){for(var x=0,E=b(y);x<a.length&&b(a[x])<=E;)x++;a.splice(x,0,y)}function se(){}function te(a,y){var b;return Object.create?b=Object.create(a):(se.prototype=a,b=new se),y&&ai(y,b),b}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||ee.test(a))}function ce(a,y){return y?y.source.indexOf("\\w")>-1&&oe(a)?!0:y.test(a):oe(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var Me=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Je(a){return a.charCodeAt(0)>=768&&Me.test(a)}function At(a,y,b){for(;(b<0?y>0:y<a.length)&&Je(a.charAt(y));)y+=b;return y}function bt(a,y,b){for(var x=y>b?-1:1;;){if(y==b)return y;var E=(y+b)/2,z=x<0?Math.ceil(E):Math.floor(E);if(z==y)return a(z)?y:b;a(z)?b=z:y=z+x}}function It(a,y,b,x){if(!a)return x(y,b,"ltr",0);for(var E=!1,z=0;z<a.length;++z){var re=a[z];(re.from<b&&re.to>y||y==b&&re.to==y)&&(x(Math.max(re.from,y),Math.min(re.to,b),re.level==1?"rtl":"ltr",z),E=!0)}E||x(y,b,"ltr")}var ei=null;function Vt(a,y,b){var x;ei=null;for(var E=0;E<a.length;++E){var z=a[E];if(z.from<y&&z.to>y)return E;z.to==y&&(z.from!=z.to&&b=="before"?x=E:ei=E),z.from==y&&(z.from!=z.to&&b!="before"?x=E:ei=E)}return x!=null?x:ei}var Ut=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function b(ue){return ue<=247?a.charAt(ue):1424<=ue&&ue<=1524?"R":1536<=ue&&ue<=1785?y.charAt(ue-1536):1774<=ue&&ue<=2220?"r":8192<=ue&&ue<=8203?"w":ue==8204?"b":"L"}var x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,z=/[LRr]/,re=/[Lb1n]/,ae=/[1n]/;function le(ue,ge,ye){this.level=ue,this.from=ge,this.to=ye}return function(ue,ge){var ye=ge=="ltr"?"L":"R";if(ue.length==0||ge=="ltr"&&!x.test(ue))return!1;for(var Be=ue.length,_e=[],Ke=0;Ke<Be;++Ke)_e.push(b(ue.charCodeAt(Ke)));for(var dt=0,Ct=ye;dt<Be;++dt){var Mt=_e[dt];Mt=="m"?_e[dt]=Ct:Ct=Mt}for(var Tt=0,Dt=ye;Tt<Be;++Tt){var Pt=_e[Tt];Pt=="1"&&Dt=="r"?_e[Tt]="n":z.test(Pt)&&(Dt=Pt,Pt=="r"&&(_e[Tt]="R"))}for(var Xt=1,Yt=_e[0];Xt<Be-1;++Xt){var ci=_e[Xt];ci=="+"&&Yt=="1"&&_e[Xt+1]=="1"?_e[Xt]="1":ci==","&&Yt==_e[Xt+1]&&(Yt=="1"||Yt=="n")&&(_e[Xt]=Yt),Yt=ci}for(var Ti=0;Ti<Be;++Ti){var bn=_e[Ti];if(bn==",")_e[Ti]="N";else if(bn=="%"){var Wi=void 0;for(Wi=Ti+1;Wi<Be&&_e[Wi]=="%";++Wi);for(var ir=Ti&&_e[Ti-1]=="!"||Wi<Be&&_e[Wi]=="1"?"1":"N",Jn=Ti;Jn<Wi;++Jn)_e[Jn]=ir;Ti=Wi-1}}for(var on=0,Xn=ye;on<Be;++on){var Ln=_e[on];Xn=="L"&&Ln=="1"?_e[on]="L":z.test(Ln)&&(Xn=Ln)}for(var pn=0;pn<Be;++pn)if(E.test(_e[pn])){var an=void 0;for(an=pn+1;an<Be&&E.test(_e[an]);++an);for(var Vi=(pn?_e[pn-1]:ye)=="L",Kn=(an<Be?_e[an]:ye)=="L",Ta=Vi==Kn?Vi?"L":"R":ye,So=pn;So<an;++So)_e[So]=Ta;pn=an-1}for(var Bn=[],Hr,En=0;En<Be;)if(re.test(_e[En])){var ds=En;for(++En;En<Be&&re.test(_e[En]);++En);Bn.push(new le(0,ds,En))}else{var eo=En,Vo=Bn.length,Qo=ge=="rtl"?1:0;for(++En;En<Be&&_e[En]!="L";++En);for(var Gn=eo;Gn<En;)if(ae.test(_e[Gn])){eo<Gn&&(Bn.splice(Vo,0,new le(1,eo,Gn)),Vo+=Qo);var Ia=Gn;for(++Gn;Gn<En&&ae.test(_e[Gn]);++Gn);Bn.splice(Vo,0,new le(2,Ia,Gn)),Vo+=Qo,eo=Gn}else++Gn;eo<En&&Bn.splice(Vo,0,new le(1,eo,En))}return ge=="ltr"&&(Bn[0].level==1&&(Hr=ue.match(/^\s+/))&&(Bn[0].from=Hr[0].length,Bn.unshift(new le(0,0,Hr[0].length))),et(Bn).level==1&&(Hr=ue.match(/\s+$/))&&(et(Bn).to-=Hr[0].length,Bn.push(new le(0,Be-Hr[0].length,Be)))),ge=="rtl"?Bn.reverse():Bn}}();function Ei(a,y){var b=a.order;return b==null&&(b=a.order=Ut(a.text,y)),b}var kn=[],zt=function(a,y,b){if(a.addEventListener)a.addEventListener(y,b,!1);else if(a.attachEvent)a.attachEvent("on"+y,b);else{var x=a._handlers||(a._handlers={});x[y]=(x[y]||kn).concat(b)}};function ln(a,y){return a._handlers&&a._handlers[y]||kn}function di(a,y,b){if(a.removeEventListener)a.removeEventListener(y,b,!1);else if(a.detachEvent)a.detachEvent("on"+y,b);else{var x=a._handlers,E=x&&x[y];if(E){var z=we(E,b);z>-1&&(x[y]=E.slice(0,z).concat(E.slice(z+1)))}}}function vi(a,y){var b=ln(a,y);if(b.length)for(var x=Array.prototype.slice.call(arguments,2),E=0;E<b.length;++E)b[E].apply(null,x)}function _i(a,y,b){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),vi(a,b||y.type,a,y),Gr(y)||y.codemirrorIgnore}function sr(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var b=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),x=0;x<y.length;++x)we(b,y[x])==-1&&b.push(y[x])}function Hi(a,y){return ln(a,y).length>0}function mn(a){a.prototype.on=function(y,b){zt(this,y,b)},a.prototype.off=function(y,b){di(this,y,b)}}function Qi(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Mo(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Gr(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Do(a){Qi(a),Mo(a)}function $o(a){return a.target||a.srcElement}function Lo(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),Ce&&a.ctrlKey&&y==1&&(y=3),y}var Jo=function(){if(xe&&ve<9)return!1;var a=qe("div");return"draggable"in a||"dragDrop"in a}(),to;function Xo(a){if(to==null){var y=qe("span","\u200B");ft(a,qe("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(to=y.offsetWidth<=1&&y.offsetHeight>2&&!(xe&&ve<8))}var b=to?qe("span","\u200B"):qe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return b.setAttribute("cm-text",""),b}var ko;function Ko(a){if(ko!=null)return ko;var y=ft(a,document.createTextNode("A\u062EA")),b=Fe(y,0,1).getBoundingClientRect(),x=Fe(y,1,2).getBoundingClientRect();return Et(a),!b||b.left==b.right?!1:ko=x.right-b.right<3}var xr=`
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,b=[],x=a.length;y<=x;){var E=a.indexOf(`
|
|
`,y);E==-1&&(E=a.length);var z=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),re=z.indexOf("\r");re!=-1?(b.push(z.slice(0,re)),y+=re+1):(b.push(z),y=E+1)}return b}:function(a){return a.split(/\r\n?|\n/)},Fa=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(b){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Ao=function(){var a=qe("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),io=null;function Gi(a){if(io!=null)return io;var y=ft(a,qe("span","x")),b=y.getBoundingClientRect(),x=Fe(y,0,1).getBoundingClientRect();return io=Math.abs(b.left-x.left)>1}var _r={},Zt={};function qt(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),_r[a]=y}function ti(a,y){Zt[a]=y}function xi(a){if(typeof a=="string"&&Zt.hasOwnProperty(a))a=Zt[a];else if(a&&typeof a.name=="string"&&Zt.hasOwnProperty(a.name)){var y=Zt[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 xi("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return xi("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Sn(a,y){y=xi(y);var b=_r[y.name];if(!b)return Sn(a,"text/plain");var x=b(a,y);if(Fi.hasOwnProperty(y.name)){var E=Fi[y.name];for(var z in E)E.hasOwnProperty(z)&&(x.hasOwnProperty(z)&&(x["_"+z]=x[z]),x[z]=E[z])}if(x.name=y.name,y.helperType&&(x.helperType=y.helperType),y.modeProps)for(var re in y.modeProps)x[re]=y.modeProps[re];return x}var Fi={};function On(a,y){var b=Fi.hasOwnProperty(a)?Fi[a]:Fi[a]={};ai(y,b)}function gn(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var b={};for(var x in y){var E=y[x];E instanceof Array&&(E=E.concat([])),b[x]=E}return b}function vn(a,y){for(var b;a.innerMode&&(b=a.innerMode(y),!(!b||b.mode==a));)y=b.state,a=b.mode;return b||{mode:a,state:y}}function An(a,y,b){return a.startState?a.startState(y,b):!0}var bi=function(a,y,b){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=b};bi.prototype.eol=function(){return this.pos>=this.string.length},bi.prototype.sol=function(){return this.pos==this.lineStart},bi.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bi.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},bi.prototype.eat=function(a){var y=this.string.charAt(this.pos),b;if(typeof a=="string"?b=y==a:b=y&&(a.test?a.test(y):a(y)),b)return++this.pos,y},bi.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},bi.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},bi.prototype.skipToEnd=function(){this.pos=this.string.length},bi.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},bi.prototype.backUp=function(a){this.pos-=a},bi.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},bi.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},bi.prototype.match=function(a,y,b){if(typeof a=="string"){var x=function(re){return b?re.toLowerCase():re},E=this.string.substr(this.pos,a.length);if(x(E)==x(a))return y!==!1&&(this.pos+=a.length),!0}else{var z=this.string.slice(this.pos).match(a);return z&&z.index>0?null:(z&&y!==!1&&(this.pos+=z[0].length),z)}},bi.prototype.current=function(){return this.string.slice(this.start,this.pos)},bi.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},bi.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},bi.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Ot(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var b=a;!b.lines;)for(var x=0;;++x){var E=b.children[x],z=E.chunkSize();if(y<z){b=E;break}y-=z}return b.lines[y]}function yn(a,y,b){var x=[],E=y.line;return a.iter(y.line,b.line+1,function(z){var re=z.text;E==b.line&&(re=re.slice(0,b.ch)),E==y.line&&(re=re.slice(y.ch)),x.push(re),++E}),x}function Nn(a,y,b){var x=[];return a.iter(y,b,function(E){x.push(E.text)}),x}function Un(a,y){var b=y-a.height;if(b)for(var x=a;x;x=x.parent)x.height+=b}function mi(a){if(a.parent==null)return null;for(var y=a.parent,b=we(y.lines,a),x=y.parent;x;y=x,x=x.parent)for(var E=0;x.children[E]!=y;++E)b+=x.children[E].chunkSize();return b+y.first}function nr(a,y){var b=a.first;e:do{for(var x=0;x<a.children.length;++x){var E=a.children[x],z=E.height;if(y<z){a=E;continue e}y-=z,b+=E.chunkSize()}return b}while(!a.lines);for(var re=0;re<a.lines.length;++re){var ae=a.lines[re],le=ae.height;if(y<le)break;y-=le}return b+re}function ur(a,y){return y>=a.first&&y<a.first+a.size}function no(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function xt(a,y,b){if(b===void 0&&(b=null),!(this instanceof xt))return new xt(a,y,b);this.line=a,this.ch=y,this.sticky=b}function ni(a,y){return a.line-y.line||a.ch-y.ch}function ro(a,y){return a.sticky==y.sticky&&ni(a,y)==0}function oo(a){return xt(a.line,a.ch)}function Ur(a,y){return ni(a,y)<0?y:a}function Tr(a,y){return ni(a,y)<0?a:y}function No(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Qe(a,y){if(y.line<a.first)return xt(a.first,0);var b=a.first+a.size-1;return y.line>b?xt(b,Ot(a,b).text.length):yl(y,Ot(a,y.line).text.length)}function yl(a,y){var b=a.ch;return b==null||b>y?xt(a.line,y):b<0?xt(a.line,0):a}function Zr(a,y){for(var b=[],x=0;x<y.length;x++)b[x]=Qe(a,y[x]);return b}var wr=function(a,y){this.state=a,this.lookAhead=y},qi=function(a,y,b,x){this.state=y,this.doc=a,this.line=b,this.maxLookAhead=x||0,this.baseTokens=null,this.baseTokenPos=1};qi.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},qi.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}},qi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},qi.fromSaved=function(a,y,b){return y instanceof wr?new qi(a,gn(a.mode,y.state),b,y.lookAhead):new qi(a,gn(a.mode,y),b)},qi.prototype.save=function(a){var y=a!==!1?gn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new wr(y,this.maxLookAhead):y};function _o(a,y,b,x){var E=[a.state.modeGen],z={};ja(a,y.text,a.doc.mode,b,function(ue,ge){return E.push(ue,ge)},z,x);for(var re=b.state,ae=function(ue){b.baseTokens=E;var ge=a.state.overlays[ue],ye=1,Be=0;b.state=!0,ja(a,y.text,ge.mode,b,function(_e,Ke){for(var dt=ye;Be<_e;){var Ct=E[ye];Ct>_e&&E.splice(ye,1,_e,E[ye+1],Ct),ye+=2,Be=Math.min(_e,Ct)}if(Ke)if(ge.opaque)E.splice(dt,ye-dt,_e,"overlay "+Ke),ye=dt+2;else for(;dt<ye;dt+=2){var Mt=E[dt+1];E[dt+1]=(Mt?Mt+" ":"")+"overlay "+Ke}},z),b.state=re,b.baseTokens=null,b.baseTokenPos=1},le=0;le<a.state.overlays.length;++le)ae(le);return{styles:E,classes:z.bgClass||z.textClass?z:null}}function rr(a,y,b){if(!y.styles||y.styles[0]!=a.state.modeGen){var x=Cr(a,mi(y)),E=y.text.length>a.options.maxHighlightLength&&gn(a.doc.mode,x.state),z=_o(a,y,x);E&&(x.state=E),y.stateAfter=x.save(!E),y.styles=z.styles,z.classes?y.styleClasses=z.classes:y.styleClasses&&(y.styleClasses=null),b===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Cr(a,y,b){var x=a.doc,E=a.display;if(!x.mode.startState)return new qi(x,!0,y);var z=so(a,y,b),re=z>x.first&&Ot(x,z-1).stateAfter,ae=re?qi.fromSaved(x,re,z):new qi(x,An(x.mode),z);return x.iter(z,y,function(le){$i(a,le.text,ae);var ue=ae.line;le.stateAfter=ue==y-1||ue%5==0||ue>=E.viewFrom&&ue<E.viewTo?ae.save():null,ae.nextLine()}),b&&(x.modeFrontier=ae.line),ae}function $i(a,y,b,x){var E=a.doc.mode,z=new bi(y,a.options.tabSize,b);for(z.start=z.pos=x||0,y==""&&Zn(E,b.state);!z.eol();)br(E,z,b.state),z.start=z.pos}function Zn(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var b=vn(a,y);if(b.mode.blankLine)return b.mode.blankLine(b.state)}}function br(a,y,b,x){for(var E=0;E<10;E++){x&&(x[0]=vn(a,b).mode);var z=a.token(y,b);if(y.pos>y.start)return z}throw new Error("Mode "+a.name+" failed to advance stream.")}var ao=function(a,y,b){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=b};function lo(a,y,b,x){var E=a.doc,z=E.mode,re;y=Qe(E,y);var ae=Ot(E,y.line),le=Cr(a,y.line,b),ue=new bi(ae.text,a.options.tabSize,le),ge;for(x&&(ge=[]);(x||ue.pos<y.ch)&&!ue.eol();)ue.start=ue.pos,re=br(z,ue,le.state),x&&ge.push(new ao(ue,re,gn(E.mode,le.state)));return x?ge:new ao(ue,re,le.state)}function To(a,y){if(a)for(;;){var b=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!b)break;a=a.slice(0,b.index)+a.slice(b.index+b[0].length);var x=b[1]?"bgClass":"textClass";y[x]==null?y[x]=b[2]:new RegExp("(?:^|\\s)"+b[2]+"(?:$|\\s)").test(y[x])||(y[x]+=" "+b[2])}return a}function ja(a,y,b,x,E,z,re){var ae=b.flattenSpans;ae==null&&(ae=a.options.flattenSpans);var le=0,ue=null,ge=new bi(y,a.options.tabSize,x),ye,Be=a.options.addModeClass&&[null];for(y==""&&To(Zn(b,x.state),z);!ge.eol();){if(ge.pos>a.options.maxHighlightLength?(ae=!1,re&&$i(a,y,x,ge.pos),ge.pos=y.length,ye=null):ye=To(br(b,ge,x.state,Be),z),Be){var _e=Be[0].name;_e&&(ye="m-"+(ye?_e+" "+ye:_e))}if(!ae||ue!=ye){for(;le<ge.start;)le=Math.min(ge.start,le+5e3),E(le,ue);ue=ye}ge.start=ge.pos}for(;le<ge.pos;){var Ke=Math.min(ge.pos,le+5e3);E(Ke,ue),le=Ke}}function so(a,y,b){for(var x,E,z=a.doc,re=b?-1:y-(a.doc.mode.innerMode?1e3:100),ae=y;ae>re;--ae){if(ae<=z.first)return z.first;var le=Ot(z,ae-1),ue=le.stateAfter;if(ue&&(!b||ae+(ue instanceof wr?ue.lookAhead:0)<=z.modeFrontier))return ae;var ge=me(le.text,null,a.options.tabSize);(E==null||x>ge)&&(E=ae-1,x=ge)}return E}function qo(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var b=a.first,x=y-1;x>b;x--){var E=Ot(a,x).stateAfter;if(E&&(!(E instanceof wr)||x+E.lookAhead<y)){b=x+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,b)}}var ea=!1,qn=!1;function ta(){ea=!0}function Yr(){qn=!0}function Ir(a,y,b){this.marker=a,this.from=y,this.to=b}function ot(a,y){if(a)for(var b=0;b<a.length;++b){var x=a[b];if(x.marker==y)return x}}function uo(a,y){for(var b,x=0;x<a.length;++x)a[x]!=y&&(b||(b=[])).push(a[x]);return b}function co(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function ia(a,y,b){var x;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);if(ae||z.from==y&&re.type=="bookmark"&&(!b||!z.marker.insertLeft)){var le=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);(x||(x=[])).push(new Ir(re,z.from,le?null:z.to))}}return x}function Fr(a,y,b){var x;if(a)for(var E=0;E<a.length;++E){var z=a[E],re=z.marker,ae=z.to==null||(re.inclusiveRight?z.to>=y:z.to>y);if(ae||z.from==y&&re.type=="bookmark"&&(!b||z.marker.insertLeft)){var le=z.from==null||(re.inclusiveLeft?z.from<=y:z.from<y);(x||(x=[])).push(new Ir(re,le?null:z.from-y,z.to==null?null:z.to-y))}}return x}function Vr(a,y){if(y.full)return null;var b=ur(a,y.from.line)&&Ot(a,y.from.line).markedSpans,x=ur(a,y.to.line)&&Ot(a,y.to.line).markedSpans;if(!b&&!x)return null;var E=y.from.ch,z=y.to.ch,re=ni(y.from,y.to)==0,ae=ia(b,E,re),le=Fr(x,z,re),ue=y.text.length==1,ge=et(y.text).length+(ue?E:0);if(ae)for(var ye=0;ye<ae.length;++ye){var Be=ae[ye];if(Be.to==null){var _e=ot(le,Be.marker);_e?ue&&(Be.to=_e.to==null?null:_e.to+ge):Be.to=E}}if(le)for(var Ke=0;Ke<le.length;++Ke){var dt=le[Ke];if(dt.to!=null&&(dt.to+=ge),dt.from==null){var Ct=ot(ae,dt.marker);Ct||(dt.from=ge,ue&&(ae||(ae=[])).push(dt))}else dt.from+=ge,ue&&(ae||(ae=[])).push(dt)}ae&&(ae=Io(ae)),le&&le!=ae&&(le=Io(le));var Mt=[ae];if(!ue){var Tt=y.text.length-2,Dt;if(Tt>0&&ae)for(var Pt=0;Pt<ae.length;++Pt)ae[Pt].to==null&&(Dt||(Dt=[])).push(new Ir(ae[Pt].marker,null,null));for(var Xt=0;Xt<Tt;++Xt)Mt.push(Dt);Mt.push(le)}return Mt}function Io(a){for(var y=0;y<a.length;++y){var b=a[y];b.from!=null&&b.from==b.to&&b.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function Fo(a,y,b){var x=null;if(a.iter(y.line,b.line+1,function(_e){if(_e.markedSpans)for(var Ke=0;Ke<_e.markedSpans.length;++Ke){var dt=_e.markedSpans[Ke].marker;dt.readOnly&&(!x||we(x,dt)==-1)&&(x||(x=[])).push(dt)}}),!x)return null;for(var E=[{from:y,to:b}],z=0;z<x.length;++z)for(var re=x[z],ae=re.find(0),le=0;le<E.length;++le){var ue=E[le];if(!(ni(ue.to,ae.from)<0||ni(ue.from,ae.to)>0)){var ge=[le,1],ye=ni(ue.from,ae.from),Be=ni(ue.to,ae.to);(ye<0||!re.inclusiveLeft&&!ye)&&ge.push({from:ue.from,to:ae.from}),(Be>0||!re.inclusiveRight&&!Be)&&ge.push({from:ae.to,to:ue.to}),E.splice.apply(E,ge),le+=ge.length-3}}return E}function en(a){var y=a.markedSpans;if(y){for(var b=0;b<y.length;++b)y[b].marker.detachLine(a);a.markedSpans=null}}function ho(a,y){if(y){for(var b=0;b<y.length;++b)y[b].marker.attachLine(a);a.markedSpans=y}}function Yn(a){return a.inclusiveLeft?-1:0}function Pn(a){return a.inclusiveRight?1:0}function Qr(a,y){var b=a.lines.length-y.lines.length;if(b!=0)return b;var x=a.find(),E=y.find(),z=ni(x.from,E.from)||Yn(a)-Yn(y);if(z)return-z;var re=ni(x.to,E.to)||Pn(a)-Pn(y);return re||y.id-a.id}function jr(a,y){var b=qn&&a.markedSpans,x;if(b)for(var E=void 0,z=0;z<b.length;++z)E=b[z],E.marker.collapsed&&(y?E.from:E.to)==null&&(!x||Qr(x,E.marker)<0)&&(x=E.marker);return x}function Ba(a){return jr(a,!0)}function $r(a){return jr(a,!1)}function xl(a,y){var b=qn&&a.markedSpans,x;if(b)for(var E=0;E<b.length;++E){var z=b[E];z.marker.collapsed&&(z.from==null||z.from<y)&&(z.to==null||z.to>y)&&(!x||Qr(x,z.marker)<0)&&(x=z.marker)}return x}function Oa(a,y,b,x,E){var z=Ot(a,y),re=qn&&z.markedSpans;if(re)for(var ae=0;ae<re.length;++ae){var le=re[ae];if(le.marker.collapsed){var ue=le.marker.find(0),ge=ni(ue.from,b)||Yn(le.marker)-Yn(E),ye=ni(ue.to,x)||Pn(le.marker)-Pn(E);if(!(ge>=0&&ye<=0||ge<=0&&ye>=0)&&(ge<=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?ni(ue.to,b)>=0:ni(ue.to,b)>0)||ge>=0&&(le.marker.inclusiveRight&&E.inclusiveLeft?ni(ue.from,x)<=0:ni(ue.from,x)<0)))return!0}}}function Vn(a){for(var y;y=Ba(a);)a=y.find(-1,!0).line;return a}function Pa(a){for(var y;y=$r(a);)a=y.find(1,!0).line;return a}function Rt(a){for(var y,b;y=$r(a);)a=y.find(1,!0).line,(b||(b=[])).push(a);return b}function Lt(a,y){var b=Ot(a,y),x=Vn(b);return b==x?y:mi(x)}function Wt(a,y){if(y>a.lastLine())return y;var b=Ot(a,y),x;if(!_t(a,b))return y;for(;x=$r(b);)b=x.find(1,!0).line;return mi(b)+1}function _t(a,y){var b=qn&&y.markedSpans;if(b){for(var x=void 0,E=0;E<b.length;++E)if(x=b[E],!!x.marker.collapsed){if(x.from==null)return!0;if(!x.marker.widgetNode&&x.from==0&&x.marker.inclusiveLeft&&gi(a,y,x))return!0}}}function gi(a,y,b){if(b.to==null){var x=b.marker.find(1,!0);return gi(a,x.line,ot(x.line.markedSpans,b.marker))}if(b.marker.inclusiveRight&&b.to==y.text.length)return!0;for(var E=void 0,z=0;z<y.markedSpans.length;++z)if(E=y.markedSpans[z],E.marker.collapsed&&!E.marker.widgetNode&&E.from==b.to&&(E.to==null||E.to!=b.from)&&(E.marker.inclusiveLeft||b.marker.inclusiveRight)&&gi(a,y,E))return!0}function wi(a){a=Vn(a);for(var y=0,b=a.parent,x=0;x<b.lines.length;++x){var E=b.lines[x];if(E==a)break;y+=E.height}for(var z=b.parent;z;b=z,z=b.parent)for(var re=0;re<z.children.length;++re){var ae=z.children[re];if(ae==b)break;y+=ae.height}return y}function zi(a){if(a.height==0)return 0;for(var y=a.text.length,b,x=a;b=Ba(x);){var E=b.find(0,!0);x=E.from.line,y+=E.from.ch-E.to.ch}for(x=a;b=$r(x);){var z=b.find(0,!0);y-=x.text.length-z.from.ch,x=z.to.line,y+=x.text.length-z.to.ch}return y}function ji(a){var y=a.display,b=a.doc;y.maxLine=Ot(b,b.first),y.maxLineLength=zi(y.maxLine),y.maxLineChanged=!0,b.iter(function(x){var E=zi(x);E>y.maxLineLength&&(y.maxLineLength=E,y.maxLine=x)})}var Si=function(a,y,b){this.text=a,ho(this,y),this.height=b?b(this):1};Si.prototype.lineNo=function(){return mi(this)},mn(Si);function Ji(a,y,b,x){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),en(a),ho(a,b);var E=x?x(a):1;E!=a.height&&Un(a,E)}function cr(a){a.parent=null,en(a)}var xn={},Jr={};function hr(a,y){if(!a||/^\s*$/.test(a))return null;var b=y.addModeClass?Jr:xn;return b[a]||(b[a]=a.replace(/\S+/g,"cm-$&"))}function Br(a,y){var b=vt("span",null,null,Te?"padding-right: .1px":null),x={pre:vt("pre",[b],"CodeMirror-line"),content:b,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var z=E?y.rest[E-1]:y.line,re=void 0;x.pos=0,x.addToken=wl,Ko(a.display.measure)&&(re=Ei(z,a.doc.direction))&&(x.addToken=Wa(x.addToken,re)),x.map=[];var ae=y!=a.display.externalMeasured&&mi(z);Ha(z,x,rr(a,z,ae)),z.styleClasses&&(z.styleClasses.bgClass&&(x.bgClass=Ve(z.styleClasses.bgClass,x.bgClass||"")),z.styleClasses.textClass&&(x.textClass=Ve(z.styleClasses.textClass,x.textClass||""))),x.map.length==0&&x.map.push(0,0,x.content.appendChild(Xo(a.display.measure))),E==0?(y.measure.map=x.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(x.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(Te){var le=x.content.lastChild;(/\bcm-tab\b/.test(le.className)||le.querySelector&&le.querySelector(".cm-tab"))&&(x.content.className="cm-tab-wrap-hack")}return vi(a,"renderLine",a,y.line,x.pre),x.pre.className&&(x.textClass=Ve(x.pre.className,x.textClass||"")),x}function za(a){var y=qe("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function wl(a,y,b,x,E,z,re){if(y){var ae=a.splitSpaces?Ra(y,a.trailingSpace):y,le=a.cm.state.specialChars,ue=!1,ge;if(!le.test(y))a.col+=y.length,ge=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,ge),xe&&ve<9&&(ue=!0),a.pos+=y.length;else{ge=document.createDocumentFragment();for(var ye=0;;){le.lastIndex=ye;var Be=le.exec(y),_e=Be?Be.index-ye:y.length-ye;if(_e){var Ke=document.createTextNode(ae.slice(ye,ye+_e));xe&&ve<9?ge.appendChild(qe("span",[Ke])):ge.appendChild(Ke),a.map.push(a.pos,a.pos+_e,Ke),a.col+=_e,a.pos+=_e}if(!Be)break;ye+=_e+1;var dt=void 0;if(Be[0]==" "){var Ct=a.cm.options.tabSize,Mt=Ct-a.col%Ct;dt=ge.appendChild(qe("span",ut(Mt),"cm-tab")),dt.setAttribute("role","presentation"),dt.setAttribute("cm-text"," "),a.col+=Mt}else Be[0]=="\r"||Be[0]==`
|
|
`?(dt=ge.appendChild(qe("span",Be[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dt.setAttribute("cm-text",Be[0]),a.col+=1):(dt=a.cm.options.specialCharPlaceholder(Be[0]),dt.setAttribute("cm-text",Be[0]),xe&&ve<9?ge.appendChild(qe("span",[dt])):ge.appendChild(dt),a.col+=1);a.map.push(a.pos,a.pos+1,dt),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,b||x||E||ue||z||re){var Tt=b||"";x&&(Tt+=x),E&&(Tt+=E);var Dt=qe("span",[ge],Tt,z);if(re)for(var Pt in re)re.hasOwnProperty(Pt)&&Pt!="style"&&Pt!="class"&&Dt.setAttribute(Pt,re[Pt]);return a.content.appendChild(Dt)}a.content.appendChild(ge)}}function Ra(a,y){if(a.length>1&&!/ /.test(a))return a;for(var b=y,x="",E=0;E<a.length;E++){var z=a.charAt(E);z==" "&&b&&(E==a.length-1||a.charCodeAt(E+1)==32)&&(z="\xA0"),x+=z,b=z==" "}return x}function Wa(a,y){return function(b,x,E,z,re,ae,le){E=E?E+" cm-force-border":"cm-force-border";for(var ue=b.pos,ge=ue+x.length;;){for(var ye=void 0,Be=0;Be<y.length&&(ye=y[Be],!(ye.to>ue&&ye.from<=ue));Be++);if(ye.to>=ge)return a(b,x,E,z,re,ae,le);a(b,x.slice(0,ye.to-ue),E,z,null,ae,le),z=null,x=x.slice(ye.to-ue),ue=ye.to}}}function Ii(a,y,b,x){var E=!x&&b.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!x&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",b.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function Ha(a,y,b){var x=a.markedSpans,E=a.text,z=0;if(!x){for(var re=1;re<b.length;re+=2)y.addToken(y,E.slice(z,z=b[re]),hr(b[re+1],y.cm.options));return}for(var ae=E.length,le=0,ue=1,ge="",ye,Be,_e=0,Ke,dt,Ct,Mt,Tt;;){if(_e==le){Ke=dt=Ct=Be="",Tt=null,Mt=null,_e=1/0;for(var Dt=[],Pt=void 0,Xt=0;Xt<x.length;++Xt){var Yt=x[Xt],ci=Yt.marker;if(ci.type=="bookmark"&&Yt.from==le&&ci.widgetNode)Dt.push(ci);else if(Yt.from<=le&&(Yt.to==null||Yt.to>le||ci.collapsed&&Yt.to==le&&Yt.from==le)){if(Yt.to!=null&&Yt.to!=le&&_e>Yt.to&&(_e=Yt.to,dt=""),ci.className&&(Ke+=" "+ci.className),ci.css&&(Be=(Be?Be+";":"")+ci.css),ci.startStyle&&Yt.from==le&&(Ct+=" "+ci.startStyle),ci.endStyle&&Yt.to==_e&&(Pt||(Pt=[])).push(ci.endStyle,Yt.to),ci.title&&((Tt||(Tt={})).title=ci.title),ci.attributes)for(var Ti in ci.attributes)(Tt||(Tt={}))[Ti]=ci.attributes[Ti];ci.collapsed&&(!Mt||Qr(Mt.marker,ci)<0)&&(Mt=Yt)}else Yt.from>le&&_e>Yt.from&&(_e=Yt.from)}if(Pt)for(var bn=0;bn<Pt.length;bn+=2)Pt[bn+1]==_e&&(dt+=" "+Pt[bn]);if(!Mt||Mt.from==le)for(var Wi=0;Wi<Dt.length;++Wi)Ii(y,0,Dt[Wi]);if(Mt&&(Mt.from||0)==le){if(Ii(y,(Mt.to==null?ae+1:Mt.to)-le,Mt.marker,Mt.from==null),Mt.to==null)return;Mt.to==le&&(Mt=!1)}}if(le>=ae)break;for(var ir=Math.min(ae,_e);;){if(ge){var Jn=le+ge.length;if(!Mt){var on=Jn>ir?ge.slice(0,ir-le):ge;y.addToken(y,on,ye?ye+Ke:Ke,Ct,le+on.length==_e?dt:"",Be,Tt)}if(Jn>=ir){ge=ge.slice(ir-le),le=ir;break}le=Jn,Ct=""}ge=E.slice(z,z=b[ue++]),ye=hr(b[ue++],y.cm.options)}}}function na(a,y,b){this.line=y,this.rest=Rt(y),this.size=this.rest?mi(et(this.rest))-b+1:1,this.node=this.text=null,this.hidden=_t(a,y)}function Or(a,y,b){for(var x=[],E,z=y;z<b;z=E){var re=new na(a.doc,Ot(a.doc,z),z);E=z+re.size,x.push(re)}return x}var Pr=null;function ra(a){Pr?Pr.ops.push(a):a.ownsGroup=Pr={ops:[a],delayedCallbacks:[]}}function zn(a){var y=a.delayedCallbacks,b=0;do{for(;b<y.length;b++)y[b].call(null);for(var x=0;x<a.ops.length;x++){var E=a.ops[x];if(E.cursorActivityHandlers)for(;E.cursorActivityCalled<E.cursorActivityHandlers.length;)E.cursorActivityHandlers[E.cursorActivityCalled++].call(null,E.cm)}}while(b<y.length)}function oa(a,y){var b=a.ownsGroup;if(b)try{zn(b)}finally{Pr=null,y(b)}}var Er=null;function Ui(a,y){var b=ln(a,y);if(b.length){var x=Array.prototype.slice.call(arguments,2),E;Pr?E=Pr.delayedCallbacks:Er?E=Er:(E=Er=[],setTimeout(Ul,0));for(var z=function(ae){E.push(function(){return b[ae].apply(null,x)})},re=0;re<b.length;++re)z(re)}}function Ul(){var a=Er;Er=null;for(var y=0;y<a.length;++y)a[y]()}function Ga(a,y,b,x){for(var E=0;E<y.changes.length;E++){var z=y.changes[E];z=="text"?Zl(a,y):z=="gutter"?bl(a,y,b,x):z=="class"?aa(a,y):z=="widget"&&Yl(a,y,x)}y.changes=null}function jo(a){return a.node==a.text&&(a.node=qe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),xe&&ve<8&&(a.node.style.zIndex=2)),a.node}function ps(a,y){var b=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),y.background)b?y.background.className=b:(y.background.parentNode.removeChild(y.background),y.background=null);else if(b){var x=jo(y);y.background=x.insertBefore(qe("div",null,b),x.firstChild),a.display.input.setUneditable(y.background)}}function Cl(a,y){var b=a.display.externalMeasured;return b&&b.line==y.line?(a.display.externalMeasured=null,y.measure=b.measure,b.built):Br(a,y)}function Zl(a,y){var b=y.text.className,x=Cl(a,y);y.text==y.node&&(y.node=x.pre),y.text.parentNode.replaceChild(x.pre,y.text),y.text=x.pre,x.bgClass!=y.bgClass||x.textClass!=y.textClass?(y.bgClass=x.bgClass,y.textClass=x.textClass,aa(a,y)):b&&(y.text.className=b)}function aa(a,y){ps(a,y),y.line.wrapClass?jo(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var b=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=b||""}function bl(a,y,b,x){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=jo(y);y.gutterBackground=qe("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px; width: "+x.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),E.insertBefore(y.gutterBackground,y.text)}var z=y.line.gutterMarkers;if(a.options.lineNumbers||z){var re=jo(y),ae=y.gutter=qe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px");if(a.display.input.setUneditable(ae),re.insertBefore(ae,y.text),y.line.gutterClass&&(ae.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(y.lineNumber=ae.appendChild(qe("div",no(a.options,b),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+x.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),z)for(var le=0;le<a.display.gutterSpecs.length;++le){var ue=a.display.gutterSpecs[le].className,ge=z.hasOwnProperty(ue)&&z[ue];ge&&ae.appendChild(qe("div",[ge],"CodeMirror-gutter-elt","left: "+x.gutterLeft[ue]+"px; width: "+x.gutterWidth[ue]+"px"))}}}function Yl(a,y,b){y.alignable&&(y.alignable=null);for(var x=tt("CodeMirror-linewidget"),E=y.node.firstChild,z=void 0;E;E=z)z=E.nextSibling,x.test(E.className)&&y.node.removeChild(E);Sl(a,y,b)}function El(a,y,b,x){var E=Cl(a,y);return y.text=y.node=E.pre,E.bgClass&&(y.bgClass=E.bgClass),E.textClass&&(y.textClass=E.textClass),aa(a,y),bl(a,y,b,x),Sl(a,y,x),y.node}function Sl(a,y,b){if(Vl(a,y.line,y,b,!0),y.rest)for(var x=0;x<y.rest.length;x++)Vl(a,y.rest[x],y,b,!1)}function Vl(a,y,b,x,E){if(y.widgets)for(var z=jo(b),re=0,ae=y.widgets;re<ae.length;++re){var le=ae[re],ue=qe("div",[le.node],"CodeMirror-linewidget"+(le.className?" "+le.className:""));le.handleMouseEvents||ue.setAttribute("cm-ignore-events","true"),Ql(le,ue,b,x),a.display.input.setUneditable(ue),E&&le.above?z.insertBefore(ue,b.gutter||b.text):z.appendChild(ue),Ui(le,"redraw")}}function Ql(a,y,b,x){if(a.noHScroll){(b.alignable||(b.alignable=[])).push(y);var E=x.wrapperWidth;y.style.left=x.fixedPos+"px",a.coverGutter||(E-=x.gutterTotalWidth,y.style.paddingLeft=x.gutterTotalWidth+"px"),y.style.width=E+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-x.gutterTotalWidth+"px"))}function ke(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!lt(document.body,a.node)){var b="position: relative;";a.coverGutter&&(b+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(b+="width: "+y.display.wrapper.clientWidth+"px;"),ft(y.display.measure,qe("div",[a.node],null,b))}return a.height=a.node.parentNode.offsetHeight}function Sr(a,y){for(var b=$o(y);b!=a.wrapper;b=b.parentNode)if(!b||b.nodeType==1&&b.getAttribute("cm-ignore-events")=="true"||b.parentNode==a.sizer&&b!=a.mover)return!0}function la(a){return a.lineSpace.offsetTop}function Ua(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Za(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=ft(a.measure,qe("pre","x","CodeMirror-line-like")),b=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,x={left:parseInt(b.paddingLeft),right:parseInt(b.paddingRight)};return!isNaN(x.left)&&!isNaN(x.right)&&(a.cachedPaddingH=x),x}function dr(a){return Pe-a.display.nativeBarWidth}function Xr(a){return a.display.scroller.clientWidth-dr(a)-a.display.barWidth}function sa(a){return a.display.scroller.clientHeight-dr(a)-a.display.barHeight}function wn(a,y,b){var x=a.options.lineWrapping,E=x&&Xr(a);if(!y.measure.heights||x&&y.measure.width!=E){var z=y.measure.heights=[];if(x){y.measure.width=E;for(var re=y.text.firstChild.getClientRects(),ae=0;ae<re.length-1;ae++){var le=re[ae],ue=re[ae+1];Math.abs(le.bottom-ue.bottom)>2&&z.push((le.bottom+ue.top)/2-b.top)}}z.push(b.bottom-b.top)}}function fr(a,y,b){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var x=0;x<a.rest.length;x++)if(a.rest[x]==y)return{map:a.measure.maps[x],cache:a.measure.caches[x]};for(var E=0;E<a.rest.length;E++)if(mi(a.rest[E])>b)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function fo(a,y){y=Vn(y);var b=mi(y),x=a.display.externalMeasured=new na(a.doc,y,b);x.lineN=b;var E=x.built=Br(a,x);return x.text=E.pre,ft(a.display.lineMeasure,E.pre),x}function Ml(a,y,b,x){return pr(a,po(a,y),b,x)}function Ya(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[rn(a,y)];var b=a.display.externalMeasured;if(b&&y>=b.lineN&&y<b.lineN+b.size)return b}function po(a,y){var b=mi(y),x=Ya(a,b);x&&!x.text?x=null:x&&x.changes&&(Ga(a,x,b,li(a)),a.curOp.forceUpdate=!0),x||(x=fo(a,y));var E=fr(x,y,b);return{line:y,view:x,rect:null,map:E.map,cache:E.cache,before:E.before,hasHeights:!1}}function pr(a,y,b,x,E){y.before&&(b=-1);var z=b+(x||""),re;return y.cache.hasOwnProperty(z)?re=y.cache[z]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(wn(a,y.view,y.rect),y.hasHeights=!0),re=he(a,y,b,x),re.bogus||(y.cache[z]=re)),{left:re.left,right:re.right,top:E?re.rtop:re.top,bottom:E?re.rbottom:re.bottom}}var Dl={left:0,right:0,top:0,bottom:0};function be(a,y,b){for(var x,E,z,re,ae,le,ue=0;ue<a.length;ue+=3)if(ae=a[ue],le=a[ue+1],y<ae?(E=0,z=1,re="left"):y<le?(E=y-ae,z=E+1):(ue==a.length-3||y==le&&a[ue+3]>y)&&(z=le-ae,E=z-1,y>=le&&(re="right")),E!=null){if(x=a[ue+2],ae==le&&b==(x.insertLeft?"left":"right")&&(re=b),b=="left"&&E==0)for(;ue&&a[ue-2]==a[ue-3]&&a[ue-1].insertLeft;)x=a[(ue-=3)+2],re="left";if(b=="right"&&E==le-ae)for(;ue<a.length-3&&a[ue+3]==a[ue+4]&&!a[ue+5].insertLeft;)x=a[(ue+=3)+2],re="right";break}return{node:x,start:E,end:z,collapse:re,coverStart:ae,coverEnd:le}}function pe(a,y){var b=Dl;if(y=="left")for(var x=0;x<a.length&&(b=a[x]).left==b.right;x++);else for(var E=a.length-1;E>=0&&(b=a[E]).left==b.right;E--);return b}function he(a,y,b,x){var E=be(y.map,b,x),z=E.node,re=E.start,ae=E.end,le=E.collapse,ue;if(z.nodeType==3){for(var ge=0;ge<4;ge++){for(;re&&Je(y.line.text.charAt(E.coverStart+re));)--re;for(;E.coverStart+ae<E.coverEnd&&Je(y.line.text.charAt(E.coverStart+ae));)++ae;if(xe&&ve<9&&re==0&&ae==E.coverEnd-E.coverStart?ue=z.parentNode.getBoundingClientRect():ue=pe(Fe(z,re,ae).getClientRects(),x),ue.left||ue.right||re==0)break;ae=re,re=re-1,le="right"}xe&&ve<11&&(ue=Ft(a.display.measure,ue))}else{re>0&&(le=x="right");var ye;a.options.lineWrapping&&(ye=z.getClientRects()).length>1?ue=ye[x=="right"?ye.length-1:0]:ue=z.getBoundingClientRect()}if(xe&&ve<9&&!re&&(!ue||!ue.left&&!ue.right)){var Be=z.parentNode.getClientRects()[0];Be?ue={left:Be.left,right:Be.left+oi(a.display),top:Be.top,bottom:Be.bottom}:ue=Dl}for(var _e=ue.top-y.rect.top,Ke=ue.bottom-y.rect.top,dt=(_e+Ke)/2,Ct=y.view.measure.heights,Mt=0;Mt<Ct.length-1&&!(dt<Ct[Mt]);Mt++);var Tt=Mt?Ct[Mt-1]:0,Dt=Ct[Mt],Pt={left:(le=="right"?ue.right:ue.left)-y.rect.left,right:(le=="left"?ue.left:ue.right)-y.rect.left,top:Tt,bottom:Dt};return!ue.left&&!ue.right&&(Pt.bogus=!0),a.options.singleCursorHeightPerLine||(Pt.rtop=_e,Pt.rbottom=Ke),Pt}function Ft(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Gi(a))return y;var b=screen.logicalXDPI/screen.deviceXDPI,x=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*b,right:y.right*b,top:y.top*x,bottom:y.bottom*x}}function $t(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 Kt(a){a.display.externalMeasure=null,Et(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)$t(a.display.view[y])}function ui(a){Kt(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Jt(){return Ee&&Le?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function kt(){return Ee&&Le?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ht(a){var y=0;if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].above&&(y+=ke(a.widgets[b]));return y}function Bt(a,y,b,x,E){if(!E){var z=ht(y);b.top+=z,b.bottom+=z}if(x=="line")return b;x||(x="local");var re=wi(y);if(x=="local"?re+=la(a.display):re-=a.display.viewOffset,x=="page"||x=="window"){var ae=a.display.lineSpace.getBoundingClientRect();re+=ae.top+(x=="window"?0:kt());var le=ae.left+(x=="window"?0:Jt());b.left+=le,b.right+=le}return b.top+=re,b.bottom+=re,b}function Bi(a,y,b){if(b=="div")return y;var x=y.left,E=y.top;if(b=="page")x-=Jt(),E-=kt();else if(b=="local"||!b){var z=a.display.sizer.getBoundingClientRect();x+=z.left,E+=z.top}var re=a.display.lineSpace.getBoundingClientRect();return{left:x-re.left,top:E-re.top}}function _n(a,y,b,x,E){return x||(x=Ot(a.doc,y.line)),Bt(a,x,Ml(a,x,y.ch,E),b)}function ri(a,y,b,x,E,z){x=x||Ot(a.doc,y.line),E||(E=po(a,x));function re(Ke,dt){var Ct=pr(a,E,Ke,dt?"right":"left",z);return dt?Ct.left=Ct.right:Ct.right=Ct.left,Bt(a,x,Ct,b)}var ae=Ei(x,a.doc.direction),le=y.ch,ue=y.sticky;if(le>=x.text.length?(le=x.text.length,ue="before"):le<=0&&(le=0,ue="after"),!ae)return re(ue=="before"?le-1:le,ue=="before");function ge(Ke,dt,Ct){var Mt=ae[dt],Tt=Mt.level==1;return re(Ct?Ke-1:Ke,Tt!=Ct)}var ye=Vt(ae,le,ue),Be=ei,_e=ge(le,ye,ue=="before");return Be!=null&&(_e.other=ge(le,Be,ue!="before")),_e}function hi(a,y){var b=0;y=Qe(a.doc,y),a.options.lineWrapping||(b=oi(a.display)*y.ch);var x=Ot(a.doc,y.line),E=wi(x)+la(a.display);return{left:b,right:b,top:E,bottom:E+x.height}}function tn(a,y,b,x,E){var z=xt(a,y,b);return z.xRel=E,x&&(z.outside=x),z}function sn(a,y,b){var x=a.doc;if(b+=a.display.viewOffset,b<0)return tn(x.first,0,null,-1,-1);var E=nr(x,b),z=x.first+x.size-1;if(E>z)return tn(x.first+x.size-1,Ot(x,z).text.length,null,1,1);y<0&&(y=0);for(var re=Ot(x,E);;){var ae=un(a,re,E,y,b),le=xl(re,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!le)return ae;var ue=le.find(1);if(ue.line==E)return ue;re=Ot(x,E=ue.line)}}function Tn(a,y,b,x){x-=ht(y);var E=y.text.length,z=bt(function(re){return pr(a,b,re-1).bottom<=x},E,0);return E=bt(function(re){return pr(a,b,re).top>x},z,E),{begin:z,end:E}}function In(a,y,b,x){b||(b=po(a,y));var E=Bt(a,y,pr(a,b,x),"line").top;return Tn(a,y,b,E)}function Mi(a,y,b,x){return a.bottom<=b?!1:a.top>b?!0:(x?a.left:a.right)>y}function un(a,y,b,x,E){E-=wi(y);var z=po(a,y),re=ht(y),ae=0,le=y.text.length,ue=!0,ge=Ei(y,a.doc.direction);if(ge){var ye=(a.options.lineWrapping?fi:nn)(a,y,b,z,ge,x,E);ue=ye.level!=1,ae=ue?ye.from:ye.to-1,le=ue?ye.to:ye.from-1}var Be=null,_e=null,Ke=bt(function(Xt){var Yt=pr(a,z,Xt);return Yt.top+=re,Yt.bottom+=re,Mi(Yt,x,E,!1)?(Yt.top<=E&&Yt.left<=x&&(Be=Xt,_e=Yt),!0):!1},ae,le),dt,Ct,Mt=!1;if(_e){var Tt=x-_e.left<_e.right-x,Dt=Tt==ue;Ke=Be+(Dt?0:1),Ct=Dt?"after":"before",dt=Tt?_e.left:_e.right}else{!ue&&(Ke==le||Ke==ae)&&Ke++,Ct=Ke==0?"after":Ke==y.text.length?"before":pr(a,z,Ke-(ue?1:0)).bottom+re<=E==ue?"after":"before";var Pt=ri(a,xt(b,Ke,Ct),"line",y,z);dt=Pt.left,Mt=E<Pt.top?-1:E>=Pt.bottom?1:0}return Ke=At(y.text,Ke,1),tn(b,Ke,Ct,Mt,x-dt)}function nn(a,y,b,x,E,z,re){var ae=bt(function(ye){var Be=E[ye],_e=Be.level!=1;return Mi(ri(a,xt(b,_e?Be.to:Be.from,_e?"before":"after"),"line",y,x),z,re,!0)},0,E.length-1),le=E[ae];if(ae>0){var ue=le.level!=1,ge=ri(a,xt(b,ue?le.from:le.to,ue?"after":"before"),"line",y,x);Mi(ge,z,re,!0)&&ge.top>re&&(le=E[ae-1])}return le}function fi(a,y,b,x,E,z,re){var ae=Tn(a,y,x,re),le=ae.begin,ue=ae.end;/\s/.test(y.text.charAt(ue-1))&&ue--;for(var ge=null,ye=null,Be=0;Be<E.length;Be++){var _e=E[Be];if(!(_e.from>=ue||_e.to<=le)){var Ke=_e.level!=1,dt=pr(a,x,Ke?Math.min(ue,_e.to)-1:Math.max(le,_e.from)).right,Ct=dt<z?z-dt+1e9:dt-z;(!ge||ye>Ct)&&(ge=_e,ye=Ct)}}return ge||(ge=E[E.length-1]),ge.from<le&&(ge={from:le,to:ge.to,level:ge.level}),ge.to>ue&&(ge={from:ge.from,to:ue,level:ge.level}),ge}var Ni;function Rn(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Ni==null){Ni=qe("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Ni.appendChild(document.createTextNode("x")),Ni.appendChild(qe("br"));Ni.appendChild(document.createTextNode("x"))}ft(a.measure,Ni);var b=Ni.offsetHeight/50;return b>3&&(a.cachedTextHeight=b),Et(a.measure),b||1}function oi(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=qe("span","xxxxxxxxxx"),b=qe("pre",[y],"CodeMirror-line-like");ft(a.measure,b);var x=y.getBoundingClientRect(),E=(x.right-x.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function li(a){for(var y=a.display,b={},x={},E=y.gutters.clientLeft,z=y.gutters.firstChild,re=0;z;z=z.nextSibling,++re){var ae=a.display.gutterSpecs[re].className;b[ae]=z.offsetLeft+z.clientLeft+E,x[ae]=z.clientWidth}return{fixedPos:Di(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:b,gutterWidth:x,wrapperWidth:y.wrapper.clientWidth}}function Di(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function pi(a){var y=Rn(a.display),b=a.options.lineWrapping,x=b&&Math.max(5,a.display.scroller.clientWidth/oi(a.display)-3);return function(E){if(_t(a.doc,E))return 0;var z=0;if(E.widgets)for(var re=0;re<E.widgets.length;re++)E.widgets[re].height&&(z+=E.widgets[re].height);return b?z+(Math.ceil(E.text.length/x)||1)*y:z+y}}function ki(a){var y=a.doc,b=pi(a);y.iter(function(x){var E=b(x);E!=x.height&&Un(x,E)})}function Ri(a,y,b,x){var E=a.display;if(!b&&$o(y).getAttribute("cm-not-content")=="true")return null;var z,re,ae=E.lineSpace.getBoundingClientRect();try{z=y.clientX-ae.left,re=y.clientY-ae.top}catch(ye){return null}var le=sn(a,z,re),ue;if(x&&le.xRel>0&&(ue=Ot(a.doc,le.line).text).length==le.ch){var ge=me(ue,ue.length,a.options.tabSize)-ue.length;le=xt(le.line,Math.max(0,Math.round((z-Za(a.display).left)/oi(a.display))-ge))}return le}function rn(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var b=a.display.view,x=0;x<b.length;x++)if(y-=b[x].size,y<0)return x}function Oi(a,y,b,x){y==null&&(y=a.doc.first),b==null&&(b=a.doc.first+a.doc.size),x||(x=0);var E=a.display;if(x&&b<E.viewTo&&(E.updateLineNumbers==null||E.updateLineNumbers>y)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)qn&&Lt(a.doc,y)<E.viewTo&&yi(a);else if(b<=E.viewFrom)qn&&Wt(a.doc,b+x)>E.viewFrom?yi(a):(E.viewFrom+=x,E.viewTo+=x);else if(y<=E.viewFrom&&b>=E.viewTo)yi(a);else if(y<=E.viewFrom){var z=St(a,b,b+x,1);z?(E.view=E.view.slice(z.index),E.viewFrom=z.lineN,E.viewTo+=x):yi(a)}else if(b>=E.viewTo){var re=St(a,y,y,-1);re?(E.view=E.view.slice(0,re.index),E.viewTo=re.lineN):yi(a)}else{var ae=St(a,y,y,-1),le=St(a,b,b+x,1);ae&&le?(E.view=E.view.slice(0,ae.index).concat(Or(a,ae.lineN,le.lineN)).concat(E.view.slice(le.index)),E.viewTo+=x):yi(a)}var ue=E.externalMeasured;ue&&(b<ue.lineN?ue.lineN+=x:y<ue.lineN+ue.size&&(E.externalMeasured=null))}function or(a,y,b){a.curOp.viewChanged=!0;var x=a.display,E=a.display.externalMeasured;if(E&&y>=E.lineN&&y<E.lineN+E.size&&(x.externalMeasured=null),!(y<x.viewFrom||y>=x.viewTo)){var z=x.view[rn(a,y)];if(z.node!=null){var re=z.changes||(z.changes=[]);we(re,b)==-1&&re.push(b)}}}function yi(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function St(a,y,b,x){var E=rn(a,y),z,re=a.display.view;if(!qn||b==a.doc.first+a.doc.size)return{index:E,lineN:b};for(var ae=a.display.viewFrom,le=0;le<E;le++)ae+=re[le].size;if(ae!=y){if(x>0){if(E==re.length-1)return null;z=ae+re[E].size-y,E++}else z=ae-y;y+=z,b+=z}for(;Lt(a.doc,b)!=b;){if(E==(x<0?0:re.length-1))return null;b+=x*re[E-(x<0?1:0)].size,E+=x}return{index:E,lineN:b}}function mr(a,y,b){var x=a.display,E=x.view;E.length==0||y>=x.viewTo||b<=x.viewFrom?(x.view=Or(a,y,b),x.viewFrom=y):(x.viewFrom>y?x.view=Or(a,y,x.viewFrom).concat(x.view):x.viewFrom<y&&(x.view=x.view.slice(rn(a,y))),x.viewFrom=y,x.viewTo<b?x.view=x.view.concat(Or(a,x.viewTo,b)):x.viewTo>b&&(x.view=x.view.slice(0,rn(a,b)))),x.viewTo=b}function Mr(a){for(var y=a.display.view,b=0,x=0;x<y.length;x++){var E=y[x];!E.hidden&&(!E.node||E.changes)&&++b}return b}function Bo(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Xe(a,y){y===void 0&&(y=!0);for(var b=a.doc,x={},E=x.cursors=document.createDocumentFragment(),z=x.selection=document.createDocumentFragment(),re=0;re<b.sel.ranges.length;re++)if(!(!y&&re==b.sel.primIndex)){var ae=b.sel.ranges[re];if(!(ae.from().line>=a.display.viewTo||ae.to().line<a.display.viewFrom)){var le=ae.empty();(le||a.options.showCursorWhenSelecting)&&Qt(a,ae.head,E),le||Ll(a,ae,z)}}return x}function Qt(a,y,b){var x=ri(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),E=b.appendChild(qe("div","\xA0","CodeMirror-cursor"));if(E.style.left=x.left+"px",E.style.top=x.top+"px",E.style.height=Math.max(0,x.bottom-x.top)*a.options.cursorHeight+"px",x.other){var z=b.appendChild(qe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=x.other.left+"px",z.style.top=x.other.top+"px",z.style.height=(x.other.bottom-x.other.top)*.85+"px"}}function Oo(a,y){return a.top-y.top||a.left-y.left}function Ll(a,y,b){var x=a.display,E=a.doc,z=document.createDocumentFragment(),re=Za(a.display),ae=re.left,le=Math.max(x.sizerWidth,Xr(a)-x.sizer.offsetLeft)-re.right,ue=E.direction=="ltr";function ge(Dt,Pt,Xt,Yt){Pt<0&&(Pt=0),Pt=Math.round(Pt),Yt=Math.round(Yt),z.appendChild(qe("div",null,"CodeMirror-selected","position: absolute; left: "+Dt+`px;
|
|
top: `+Pt+"px; width: "+(Xt==null?le-Dt:Xt)+`px;
|
|
height: `+(Yt-Pt)+"px"))}function ye(Dt,Pt,Xt){var Yt=Ot(E,Dt),ci=Yt.text.length,Ti,bn;function Wi(on,Xn){return _n(a,xt(Dt,on),"div",Yt,Xn)}function ir(on,Xn,Ln){var pn=In(a,Yt,null,on),an=Xn=="ltr"==(Ln=="after")?"left":"right",Vi=Ln=="after"?pn.begin:pn.end-(/\s/.test(Yt.text.charAt(pn.end-1))?2:1);return Wi(Vi,an)[an]}var Jn=Ei(Yt,E.direction);return It(Jn,Pt||0,Xt==null?ci:Xt,function(on,Xn,Ln,pn){var an=Ln=="ltr",Vi=Wi(on,an?"left":"right"),Kn=Wi(Xn-1,an?"right":"left"),Ta=Pt==null&&on==0,So=Xt==null&&Xn==ci,Bn=pn==0,Hr=!Jn||pn==Jn.length-1;if(Kn.top-Vi.top<=3){var En=(ue?Ta:So)&&Bn,ds=(ue?So:Ta)&&Hr,eo=En?ae:(an?Vi:Kn).left,Vo=ds?le:(an?Kn:Vi).right;ge(eo,Vi.top,Vo-eo,Vi.bottom)}else{var Qo,Gn,Ia,fs;an?(Qo=ue&&Ta&&Bn?ae:Vi.left,Gn=ue?le:ir(on,Ln,"before"),Ia=ue?ae:ir(Xn,Ln,"after"),fs=ue&&So&&Hr?le:Kn.right):(Qo=ue?ir(on,Ln,"before"):ae,Gn=!ue&&Ta&&Bn?le:Vi.right,Ia=!ue&&So&&Hr?ae:Kn.left,fs=ue?ir(Xn,Ln,"after"):le),ge(Qo,Vi.top,Gn-Qo,Vi.bottom),Vi.bottom<Kn.top&&ge(ae,Vi.bottom,null,Kn.top),ge(Ia,Kn.top,fs-Ia,Kn.bottom)}(!Ti||Oo(Vi,Ti)<0)&&(Ti=Vi),Oo(Kn,Ti)<0&&(Ti=Kn),(!bn||Oo(Vi,bn)<0)&&(bn=Vi),Oo(Kn,bn)<0&&(bn=Kn)}),{start:Ti,end:bn}}var Be=y.from(),_e=y.to();if(Be.line==_e.line)ye(Be.line,Be.ch,_e.ch);else{var Ke=Ot(E,Be.line),dt=Ot(E,_e.line),Ct=Vn(Ke)==Vn(dt),Mt=ye(Be.line,Be.ch,Ct?Ke.text.length+1:null).end,Tt=ye(_e.line,Ct?0:null,_e.ch).start;Ct&&(Mt.top<Tt.top-2?(ge(Mt.right,Mt.top,null,Mt.bottom),ge(ae,Tt.top,Tt.left,Tt.bottom)):ge(Mt.right,Mt.top,Tt.left-Mt.right,Mt.bottom)),Mt.bottom<Tt.top&&ge(ae,Mt.bottom,null,Tt.top)}b.appendChild(z)}function ua(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var b=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||zr(a),y.cursorDiv.style.visibility=(b=!b)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function cn(a){a.state.focused||(a.display.input.focus(),Po(a))}function ca(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,zr(a))},100)}function Po(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(vi(a,"focus",a,y),a.state.focused=!0,st(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Te&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),ua(a))}function zr(a,y){a.state.delayingBlurEvent||(a.state.focused&&(vi(a,"blur",a,y),a.state.focused=!1,at(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function mo(a){for(var y=a.display,b=y.lineDiv.offsetTop,x=0;x<y.view.length;x++){var E=y.view[x],z=a.options.lineWrapping,re=void 0,ae=0;if(!E.hidden){if(xe&&ve<8){var le=E.node.offsetTop+E.node.offsetHeight;re=le-b,b=le}else{var ue=E.node.getBoundingClientRect();re=ue.bottom-ue.top,!z&&E.text.firstChild&&(ae=E.text.firstChild.getBoundingClientRect().right-ue.left-1)}var ge=E.line.height-re;if((ge>.005||ge<-.005)&&(Un(E.line,re),Rr(E.line),E.rest))for(var ye=0;ye<E.rest.length;ye++)Rr(E.rest[ye]);if(ae>a.display.sizerWidth){var Be=Math.ceil(ae/oi(a.display));Be>a.display.maxLineLength&&(a.display.maxLineLength=Be,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Rr(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var b=a.widgets[y],x=b.node.parentNode;x&&(b.height=x.offsetHeight)}}function gr(a,y,b){var x=b&&b.top!=null?Math.max(0,b.top):a.scroller.scrollTop;x=Math.floor(x-la(a));var E=b&&b.bottom!=null?b.bottom:x+a.wrapper.clientHeight,z=nr(y,x),re=nr(y,E);if(b&&b.ensure){var ae=b.ensure.from.line,le=b.ensure.to.line;ae<z?(z=ae,re=nr(y,wi(Ot(y,ae))+a.wrapper.clientHeight)):Math.min(le,y.lastLine())>=re&&(z=nr(y,wi(Ot(y,le))-a.wrapper.clientHeight),re=le)}return{from:z,to:Math.max(re,z+1)}}function go(a,y){if(!_i(a,"scrollCursorIntoView")){var b=a.display,x=b.sizer.getBoundingClientRect(),E=null;if(y.top+x.top<0?E=!0:y.bottom+x.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!pt){var z=qe("div","\u200B",null,`position: absolute;
|
|
top: `+(y.top-b.viewOffset-la(a.display))+`px;
|
|
height: `+(y.bottom-y.top+dr(a)+b.barHeight)+`px;
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(z),z.scrollIntoView(E),a.display.lineSpace.removeChild(z)}}}function zo(a,y,b,x){x==null&&(x=0);var E;!a.options.lineWrapping&&y==b&&(y=y.ch?xt(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,b=y.sticky=="before"?xt(y.line,y.ch+1,"before"):y);for(var z=0;z<5;z++){var re=!1,ae=ri(a,y),le=!b||b==y?ae:ri(a,b);E={left:Math.min(ae.left,le.left),top:Math.min(ae.top,le.top)-x,right:Math.max(ae.left,le.left),bottom:Math.max(ae.bottom,le.bottom)+x};var ue=Kr(a,E),ge=a.doc.scrollTop,ye=a.doc.scrollLeft;if(ue.scrollTop!=null&&(Lr(a,ue.scrollTop),Math.abs(a.doc.scrollTop-ge)>1&&(re=!0)),ue.scrollLeft!=null&&(ii(a,ue.scrollLeft),Math.abs(a.doc.scrollLeft-ye)>1&&(re=!0)),!re)break}return E}function vo(a,y){var b=Kr(a,y);b.scrollTop!=null&&Lr(a,b.scrollTop),b.scrollLeft!=null&&ii(a,b.scrollLeft)}function Kr(a,y){var b=a.display,x=Rn(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:b.scroller.scrollTop,z=sa(a),re={};y.bottom-y.top>z&&(y.bottom=y.top+z);var ae=a.doc.height+Ua(b),le=y.top<x,ue=y.bottom>ae-x;if(y.top<E)re.scrollTop=le?0:y.top;else if(y.bottom>E+z){var ge=Math.min(y.top,(ue?ae:y.bottom)-z);ge!=E&&(re.scrollTop=ge)}var ye=a.options.fixedGutter?0:b.gutters.offsetWidth,Be=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:b.scroller.scrollLeft-ye,_e=Xr(a)-b.gutters.offsetWidth,Ke=y.right-y.left>_e;return Ke&&(y.right=y.left+_e),y.left<10?re.scrollLeft=0:y.left<Be?re.scrollLeft=Math.max(0,y.left+ye-(Ke?0:10)):y.right>_e+Be-3&&(re.scrollLeft=y.right+(Ke?0:10)-_e),re}function ha(a,y){y!=null&&(Cn(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Dr(a){Cn(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function hn(a,y,b){(y!=null||b!=null)&&Cn(a),y!=null&&(a.curOp.scrollLeft=y),b!=null&&(a.curOp.scrollTop=b)}function Ro(a,y){Cn(a),a.curOp.scrollToPos=y}function Cn(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var b=hi(a,y.from),x=hi(a,y.to);Wo(a,b,x,y.margin)}}function Wo(a,y,b,x){var E=Kr(a,{left:Math.min(y.left,b.left),top:Math.min(y.top,b.top)-x,right:Math.max(y.right,b.right),bottom:Math.max(y.bottom,b.bottom)+x});hn(a,E.scrollLeft,E.scrollTop)}function Lr(a,y){Math.abs(a.doc.scrollTop-y)<2||(ie||ga(a,{top:y}),Ho(a,y,!0),ie&&ga(a),fa(a,100))}function Ho(a,y,b){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!b)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ii(a,y,b,x){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((b?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!x)&&(a.doc.scrollLeft=y,Ka(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function Li(a){var y=a.display,b=y.gutters.offsetWidth,x=Math.round(a.doc.height+Ua(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?b:0,docHeight:x,scrollHeight:x+dr(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:b}}var dn=function(a,y,b){this.cm=b;var x=this.vert=qe("div",[qe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=qe("div",[qe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");x.tabIndex=E.tabIndex=-1,a(x),a(E),zt(x,"scroll",function(){x.clientHeight&&y(x.scrollTop,"vertical")}),zt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xe&&ve<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dn.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,b=a.scrollHeight>a.clientHeight+1,x=a.nativeBarWidth;if(b){this.vert.style.display="block",this.vert.style.bottom=y?x+"px":"0";var E=a.viewHeight-(y?x: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=b?x+"px":"0",this.horiz.style.left=a.barLeft+"px";var z=a.viewWidth-a.barLeft-(b?x:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+z)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(x==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:b?x:0,bottom:y?x:0}},dn.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dn.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dn.prototype.zeroWidthHack=function(){var a=Ce&&!je?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},dn.prototype.enableZeroWidthBar=function(a,y,b){a.style.pointerEvents="auto";function x(){var E=a.getBoundingClientRect(),z=b=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);z!=a?a.style.pointerEvents="none":y.set(1e3,x)}y.set(1e3,x)},dn.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Qn=function(){};Qn.prototype.update=function(){return{bottom:0,right:0}},Qn.prototype.setScrollLeft=function(){},Qn.prototype.setScrollTop=function(){},Qn.prototype.clear=function(){};function Wn(a,y){y||(y=Li(a));var b=a.display.barWidth,x=a.display.barHeight;kl(a,y);for(var E=0;E<4&&b!=a.display.barWidth||x!=a.display.barHeight;E++)b!=a.display.barWidth&&a.options.lineWrapping&&mo(a),kl(a,Li(a)),b=a.display.barWidth,x=a.display.barHeight}function kl(a,y){var b=a.display,x=b.scrollbars.update(y);b.sizer.style.paddingRight=(b.barWidth=x.right)+"px",b.sizer.style.paddingBottom=(b.barHeight=x.bottom)+"px",b.heightForcer.style.borderBottom=x.bottom+"px solid transparent",x.right&&x.bottom?(b.scrollbarFiller.style.display="block",b.scrollbarFiller.style.height=x.bottom+"px",b.scrollbarFiller.style.width=x.right+"px"):b.scrollbarFiller.style.display="",x.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(b.gutterFiller.style.display="block",b.gutterFiller.style.height=x.bottom+"px",b.gutterFiller.style.width=y.gutterWidth+"px"):b.gutterFiller.style.display=""}var Va={native:dn,null:Qn};function Al(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&at(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Va[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),zt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,b){b=="horizontal"?ii(a,y):Lr(a,y)},a),a.display.scrollbars.addClass&&st(a.display.wrapper,a.display.scrollbars.addClass)}var $l=0;function vr(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:++$l},ra(a.curOp)}function yr(a){var y=a.curOp;y&&oa(y,function(b){for(var x=0;x<b.ops.length;x++)b.ops[x].cm.curOp=null;Qa(b)})}function Qa(a){for(var y=a.ops,b=0;b<y.length;b++)Jl(y[b]);for(var x=0;x<y.length;x++)da(y[x]);for(var E=0;E<y.length;E++)Nl(y[E]);for(var z=0;z<y.length;z++)Xl(y[z]);for(var re=0;re<y.length;re++)er(y[re])}function Jl(a){var y=a.cm,b=y.display;gs(y),a.updateMaxLine&&ji(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<b.viewFrom||a.scrollToPos.to.line>=b.viewTo)||b.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new $a(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function da(a){a.updatedDisplay=a.mustUpdate&&pa(a.cm,a.update)}function Nl(a){var y=a.cm,b=y.display;a.updatedDisplay&&mo(y),a.barMeasure=Li(y),b.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=Ml(y,b.maxLine,b.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(b.scroller.clientWidth,b.sizer.offsetLeft+a.adjustWidthTo+dr(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,b.sizer.offsetLeft+a.adjustWidthTo-Xr(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=b.input.prepareSelection())}function Xl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ii(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var b=a.focus&&a.focus==Ye();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,b),(a.updatedDisplay||a.startHeight!=y.doc.height)&&Wn(y,a.barMeasure),a.updatedDisplay&&Go(y,a.barMeasure),a.selectionChanged&&ua(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),b&&cn(a.cm)}function er(a){var y=a.cm,b=y.display,x=y.doc;if(a.updatedDisplay&&ma(y,a.update),b.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(b.wheelStartX=b.wheelStartY=null),a.scrollTop!=null&&Ho(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ii(y,a.scrollLeft,!0,!0),a.scrollToPos){var E=zo(y,Qe(x,a.scrollToPos.from),Qe(x,a.scrollToPos.to),a.scrollToPos.margin);go(y,E)}var z=a.maybeHiddenMarkers,re=a.maybeUnhiddenMarkers;if(z)for(var ae=0;ae<z.length;++ae)z[ae].lines.length||vi(z[ae],"hide");if(re)for(var le=0;le<re.length;++le)re[le].lines.length&&vi(re[le],"unhide");b.wrapper.offsetHeight&&(x.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&vi(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function Hn(a,y){if(a.curOp)return y();vr(a);try{return y()}finally{yr(a)}}function Zi(a,y){return function(){if(a.curOp)return y.apply(a,arguments);vr(a);try{return y.apply(a,arguments)}finally{yr(a)}}}function Mn(a){return function(){if(this.curOp)return a.apply(this,arguments);vr(this);try{return a.apply(this,arguments)}finally{yr(this)}}}function fn(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);vr(y);try{return a.apply(this,arguments)}finally{yr(y)}}}function fa(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,si(ms,a))}function ms(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var b=+new Date+a.options.workTime,x=Cr(a,y.highlightFrontier),E=[];y.iter(x.line,Math.min(y.first+y.size,a.display.viewTo+500),function(z){if(x.line>=a.display.viewFrom){var re=z.styles,ae=z.text.length>a.options.maxHighlightLength?gn(y.mode,x.state):null,le=_o(a,z,x,!0);ae&&(x.state=ae),z.styles=le.styles;var ue=z.styleClasses,ge=le.classes;ge?z.styleClasses=ge:ue&&(z.styleClasses=null);for(var ye=!re||re.length!=z.styles.length||ue!=ge&&(!ue||!ge||ue.bgClass!=ge.bgClass||ue.textClass!=ge.textClass),Be=0;!ye&&Be<re.length;++Be)ye=re[Be]!=z.styles[Be];ye&&E.push(x.line),z.stateAfter=x.save(),x.nextLine()}else z.text.length<=a.options.maxHighlightLength&&$i(a,z.text,x),z.stateAfter=x.line%5==0?x.save():null,x.nextLine();if(+new Date>b)return fa(a,a.options.workDelay),!0}),y.highlightFrontier=x.line,y.modeFrontier=Math.max(y.modeFrontier,x.line),E.length&&Hn(a,function(){for(var z=0;z<E.length;z++)or(a,E[z],"text")})}}var $a=function(a,y,b){var x=a.display;this.viewport=y,this.visible=gr(x,a.doc,y),this.editorIsHidden=!x.wrapper.offsetWidth,this.wrapperHeight=x.wrapper.clientHeight,this.wrapperWidth=x.wrapper.clientWidth,this.oldDisplayWidth=Xr(a),this.force=b,this.dims=li(a),this.events=[]};$a.prototype.signal=function(a,y){Hi(a,y)&&this.events.push(arguments)},$a.prototype.finish=function(){for(var a=0;a<this.events.length;a++)vi.apply(null,this.events[a])};function gs(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=dr(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=dr(a)+"px",y.scrollbarsClipped=!0)}function vs(a){if(a.hasFocus())return null;var y=Ye();if(!y||!lt(a.display.lineDiv,y))return null;var b={activeElt:y};if(window.getSelection){var x=window.getSelection();x.anchorNode&&x.extend&<(a.display.lineDiv,x.anchorNode)&&(b.anchorNode=x.anchorNode,b.anchorOffset=x.anchorOffset,b.focusNode=x.focusNode,b.focusOffset=x.focusOffset)}return b}function Ja(a){if(!(!a||!a.activeElt||a.activeElt==Ye())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&<(document.body,a.anchorNode)&<(document.body,a.focusNode))){var y=window.getSelection(),b=document.createRange();b.setEnd(a.anchorNode,a.anchorOffset),b.collapse(!1),y.removeAllRanges(),y.addRange(b),y.extend(a.focusNode,a.focusOffset)}}function pa(a,y){var b=a.display,x=a.doc;if(y.editorIsHidden)return yi(a),!1;if(!y.force&&y.visible.from>=b.viewFrom&&y.visible.to<=b.viewTo&&(b.updateLineNumbers==null||b.updateLineNumbers>=b.viewTo)&&b.renderedView==b.view&&Mr(a)==0)return!1;yo(a)&&(yi(a),y.dims=li(a));var E=x.first+x.size,z=Math.max(y.visible.from-a.options.viewportMargin,x.first),re=Math.min(E,y.visible.to+a.options.viewportMargin);b.viewFrom<z&&z-b.viewFrom<20&&(z=Math.max(x.first,b.viewFrom)),b.viewTo>re&&b.viewTo-re<20&&(re=Math.min(E,b.viewTo)),qn&&(z=Lt(a.doc,z),re=Wt(a.doc,re));var ae=z!=b.viewFrom||re!=b.viewTo||b.lastWrapHeight!=y.wrapperHeight||b.lastWrapWidth!=y.wrapperWidth;mr(a,z,re),b.viewOffset=wi(Ot(a.doc,b.viewFrom)),a.display.mover.style.top=b.viewOffset+"px";var le=Mr(a);if(!ae&&le==0&&!y.force&&b.renderedView==b.view&&(b.updateLineNumbers==null||b.updateLineNumbers>=b.viewTo))return!1;var ue=vs(a);return le>4&&(b.lineDiv.style.display="none"),Xa(a,b.updateLineNumbers,y.dims),le>4&&(b.lineDiv.style.display=""),b.renderedView=b.view,Ja(ue),Et(b.cursorDiv),Et(b.selectionDiv),b.gutters.style.height=b.sizer.style.minHeight=0,ae&&(b.lastWrapHeight=y.wrapperHeight,b.lastWrapWidth=y.wrapperWidth,fa(a,400)),b.updateLineNumbers=null,!0}function ma(a,y){for(var b=y.viewport,x=!0;;x=!1){if(!x||!a.options.lineWrapping||y.oldDisplayWidth==Xr(a)){if(b&&b.top!=null&&(b={top:Math.min(a.doc.height+Ua(a.display)-sa(a),b.top)}),y.visible=gr(a.display,a.doc,b),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else x&&(y.visible=gr(a.display,a.doc,b));if(!pa(a,y))break;mo(a);var E=Li(a);Bo(a),Wn(a,E),Go(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 ga(a,y){var b=new $a(a,y);if(pa(a,b)){mo(a),ma(a,b);var x=Li(a);Bo(a),Wn(a,x),Go(a,x),b.finish()}}function Xa(a,y,b){var x=a.display,E=a.options.lineNumbers,z=x.lineDiv,re=z.firstChild;function ae(Ke){var dt=Ke.nextSibling;return Te&&Ce&&a.display.currentWheelTarget==Ke?Ke.style.display="none":Ke.parentNode.removeChild(Ke),dt}for(var le=x.view,ue=x.viewFrom,ge=0;ge<le.length;ge++){var ye=le[ge];if(!ye.hidden)if(!ye.node||ye.node.parentNode!=z){var Be=El(a,ye,ue,b);z.insertBefore(Be,re)}else{for(;re!=ye.node;)re=ae(re);var _e=E&&y!=null&&y<=ue&&ye.lineNumber;ye.changes&&(we(ye.changes,"gutter")>-1&&(_e=!1),Ga(a,ye,ue,b)),_e&&(Et(ye.lineNumber),ye.lineNumber.appendChild(document.createTextNode(no(a.options,ue)))),re=ye.node.nextSibling}ue+=ye.size}for(;re;)re=ae(re)}function va(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function Go(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+dr(a)+"px"}function Ka(a){var y=a.display,b=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var x=Di(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,z=x+"px",re=0;re<b.length;re++)if(!b[re].hidden){a.options.fixedGutter&&(b[re].gutter&&(b[re].gutter.style.left=z),b[re].gutterBackground&&(b[re].gutterBackground.style.left=z));var ae=b[re].alignable;if(ae)for(var le=0;le<ae.length;le++)ae[le].style.left=z}a.options.fixedGutter&&(y.gutters.style.left=x+E+"px")}}function yo(a){if(!a.options.lineNumbers)return!1;var y=a.doc,b=no(a.options,y.first+y.size-1),x=a.display;if(b.length!=x.lineNumChars){var E=x.measure.appendChild(qe("div",[qe("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=E.firstChild.offsetWidth,re=E.offsetWidth-z;return x.lineGutter.style.width="",x.lineNumInnerWidth=Math.max(z,x.lineGutter.offsetWidth-re)+1,x.lineNumWidth=x.lineNumInnerWidth+re,x.lineNumChars=x.lineNumInnerWidth?b.length:-1,x.lineGutter.style.width=x.lineNumWidth+"px",va(a.display),!0}return!1}function qa(a,y){for(var b=[],x=!1,E=0;E<a.length;E++){var z=a[E],re=null;if(typeof z!="string"&&(re=z.style,z=z.className),z=="CodeMirror-linenumbers")if(y)x=!0;else continue;b.push({className:z,style:re})}return y&&!x&&b.push({className:"CodeMirror-linenumbers",style:null}),b}function _l(a){var y=a.gutters,b=a.gutterSpecs;Et(y),a.lineGutter=null;for(var x=0;x<b.length;++x){var E=b[x],z=E.className,re=E.style,ae=y.appendChild(qe("div",null,"CodeMirror-gutter "+z));re&&(ae.style.cssText=re),z=="CodeMirror-linenumbers"&&(a.lineGutter=ae,ae.style.width=(a.lineNumWidth||1)+"px")}y.style.display=b.length?"":"none",va(a)}function xo(a){_l(a.display),Oi(a),Ka(a)}function ya(a,y,b,x){var E=this;this.input=b,E.scrollbarFiller=qe("div",null,"CodeMirror-scrollbar-filler"),E.scrollbarFiller.setAttribute("cm-not-content","true"),E.gutterFiller=qe("div",null,"CodeMirror-gutter-filler"),E.gutterFiller.setAttribute("cm-not-content","true"),E.lineDiv=vt("div",null,"CodeMirror-code"),E.selectionDiv=qe("div",null,null,"position: relative; z-index: 1"),E.cursorDiv=qe("div",null,"CodeMirror-cursors"),E.measure=qe("div",null,"CodeMirror-measure"),E.lineMeasure=qe("div",null,"CodeMirror-measure"),E.lineSpace=vt("div",[E.measure,E.lineMeasure,E.selectionDiv,E.cursorDiv,E.lineDiv],null,"position: relative; outline: none");var z=vt("div",[E.lineSpace],"CodeMirror-lines");E.mover=qe("div",[z],null,"position: relative"),E.sizer=qe("div",[E.mover],"CodeMirror-sizer"),E.sizerWidth=null,E.heightForcer=qe("div",null,null,"position: absolute; height: "+Pe+"px; width: 1px;"),E.gutters=qe("div",null,"CodeMirror-gutters"),E.lineGutter=null,E.scroller=qe("div",[E.sizer,E.heightForcer,E.gutters],"CodeMirror-scroll"),E.scroller.setAttribute("tabIndex","-1"),E.wrapper=qe("div",[E.scrollbarFiller,E.gutterFiller,E.scroller],"CodeMirror"),xe&&ve<8&&(E.gutters.style.zIndex=-1,E.scroller.style.paddingRight=0),!Te&&!(ie&&Ae)&&(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=qa(x.gutters,x.lineNumbers),_l(E),b.init(E)}var xa=0,Dn=null;xe?Dn=-.53:ie?Dn=15:Ee?Dn=-.7:ze&&(Dn=-1/3);function Kl(a){var y=a.wheelDeltaX,b=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),b==null&&a.detail&&a.axis==a.VERTICAL_AXIS?b=a.detail:b==null&&(b=a.wheelDelta),{x:y,y:b}}function ql(a){var y=Kl(a);return y.x*=Dn,y.y*=Dn,y}function Xi(a,y){var b=Kl(y),x=b.x,E=b.y,z=a.display,re=z.scroller,ae=re.scrollWidth>re.clientWidth,le=re.scrollHeight>re.clientHeight;if(x&&ae||E&&le){if(E&&Ce&&Te){e:for(var ue=y.target,ge=z.view;ue!=re;ue=ue.parentNode)for(var ye=0;ye<ge.length;ye++)if(ge[ye].node==ue){a.display.currentWheelTarget=ue;break e}}if(x&&!ie&&!Ne&&Dn!=null){E&&le&&Lr(a,Math.max(0,re.scrollTop+E*Dn)),ii(a,Math.max(0,re.scrollLeft+x*Dn)),(!E||E&&le)&&Qi(y),z.wheelStartX=null;return}if(E&&Dn!=null){var Be=E*Dn,_e=a.doc.scrollTop,Ke=_e+z.wrapper.clientHeight;Be<0?_e=Math.max(0,_e+Be-50):Ke=Math.min(a.doc.height,Ke+Be+50),ga(a,{top:_e,bottom:Ke})}xa<20&&(z.wheelStartX==null?(z.wheelStartX=re.scrollLeft,z.wheelStartY=re.scrollTop,z.wheelDX=x,z.wheelDY=E,setTimeout(function(){if(z.wheelStartX!=null){var dt=re.scrollLeft-z.wheelStartX,Ct=re.scrollTop-z.wheelStartY,Mt=Ct&&z.wheelDY&&Ct/z.wheelDY||dt&&z.wheelDX&&dt/z.wheelDX;z.wheelStartX=z.wheelStartY=null,Mt&&(Dn=(Dn*xa+Mt)/(xa+1),++xa)}},200)):(z.wheelDX+=x,z.wheelDY+=E))}}var Yi=function(a,y){this.ranges=a,this.primIndex=y};Yi.prototype.primary=function(){return this.ranges[this.primIndex]},Yi.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 b=this.ranges[y],x=a.ranges[y];if(!ro(b.anchor,x.anchor)||!ro(b.head,x.head))return!1}return!0},Yi.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Ci(oo(this.ranges[y].anchor),oo(this.ranges[y].head));return new Yi(a,this.primIndex)},Yi.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Yi.prototype.contains=function(a,y){y||(y=a);for(var b=0;b<this.ranges.length;b++){var x=this.ranges[b];if(ni(y,x.from())>=0&&ni(a,x.to())<=0)return b}return-1};var Ci=function(a,y){this.anchor=a,this.head=y};Ci.prototype.from=function(){return Tr(this.anchor,this.head)},Ci.prototype.to=function(){return Ur(this.anchor,this.head)},Ci.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ar(a,y,b){var x=a&&a.options.selectionsMayTouch,E=y[b];y.sort(function(Be,_e){return ni(Be.from(),_e.from())}),b=we(y,E);for(var z=1;z<y.length;z++){var re=y[z],ae=y[z-1],le=ni(ae.to(),re.from());if(x&&!re.empty()?le>0:le>=0){var ue=Tr(ae.from(),re.from()),ge=Ur(ae.to(),re.to()),ye=ae.empty()?re.from()==re.head:ae.from()==ae.head;z<=b&&--b,y.splice(--z,2,new Ci(ye?ge:ue,ye?ue:ge))}}return new Yi(y,b)}function lr(a,y){return new Yi([new Ci(a,y||a)],0)}function kr(a){return a.text?xt(a.from.line+a.text.length-1,et(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function el(a,y){if(ni(a,y.from)<0)return a;if(ni(a,y.to)<=0)return kr(y);var b=a.line+y.text.length-(y.to.line-y.from.line)-1,x=a.ch;return a.line==y.to.line&&(x+=kr(y).ch-y.to.ch),xt(b,x)}function wa(a,y){for(var b=[],x=0;x<a.sel.ranges.length;x++){var E=a.sel.ranges[x];b.push(new Ci(el(E.anchor,y),el(E.head,y)))}return ar(a.cm,b,a.sel.primIndex)}function Wr(a,y,b){return a.line==y.line?xt(b.line,a.ch-y.ch+b.ch):xt(b.line+(a.line-y.line),a.ch)}function wo(a,y,b){for(var x=[],E=xt(a.first,0),z=E,re=0;re<y.length;re++){var ae=y[re],le=Wr(ae.from,E,z),ue=Wr(kr(ae),E,z);if(E=ae.to,z=ue,b=="around"){var ge=a.sel.ranges[re],ye=ni(ge.head,ge.anchor)<0;x[re]=new Ci(ye?ue:le,ye?le:ue)}else x[re]=new Ci(le,le)}return new Yi(x,a.sel.primIndex)}function tr(a){a.doc.mode=Sn(a.options,a.doc.modeOption),Uo(a)}function Uo(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,fa(a,100),a.state.modeGen++,a.curOp&&Oi(a)}function tl(a,y){return y.from.ch==0&&y.to.ch==0&&et(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function il(a,y,b,x){function E(Tt){return b?b[Tt]:null}function z(Tt,Dt,Pt){Ji(Tt,Dt,Pt,x),Ui(Tt,"change",Tt,y)}function re(Tt,Dt){for(var Pt=[],Xt=Tt;Xt<Dt;++Xt)Pt.push(new Si(ue[Xt],E(Xt),x));return Pt}var ae=y.from,le=y.to,ue=y.text,ge=Ot(a,ae.line),ye=Ot(a,le.line),Be=et(ue),_e=E(ue.length-1),Ke=le.line-ae.line;if(y.full)a.insert(0,re(0,ue.length)),a.remove(ue.length,a.size-ue.length);else if(tl(a,y)){var dt=re(0,ue.length-1);z(ye,ye.text,_e),Ke&&a.remove(ae.line,Ke),dt.length&&a.insert(ae.line,dt)}else if(ge==ye)if(ue.length==1)z(ge,ge.text.slice(0,ae.ch)+Be+ge.text.slice(le.ch),_e);else{var Ct=re(1,ue.length-1);Ct.push(new Si(Be+ge.text.slice(le.ch),_e,x)),z(ge,ge.text.slice(0,ae.ch)+ue[0],E(0)),a.insert(ae.line+1,Ct)}else if(ue.length==1)z(ge,ge.text.slice(0,ae.ch)+ue[0]+ye.text.slice(le.ch),E(0)),a.remove(ae.line+1,Ke);else{z(ge,ge.text.slice(0,ae.ch)+ue[0],E(0)),z(ye,Be+ye.text.slice(le.ch),_e);var Mt=re(1,ue.length-1);Ke>1&&a.remove(ae.line+1,Ke-1),a.insert(ae.line+1,Mt)}Ui(a,"change",a,y)}function Ar(a,y,b){function x(E,z,re){if(E.linked)for(var ae=0;ae<E.linked.length;++ae){var le=E.linked[ae];if(le.doc!=z){var ue=re&&le.sharedHist;b&&!ue||(y(le.doc,ue),x(le.doc,E,ue))}}}x(a,null,!0)}function Tl(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,ki(a),tr(a),nl(a),a.options.lineWrapping||ji(a),a.options.mode=y.modeOption,Oi(a)}function nl(a){(a.doc.direction=="rtl"?st:at)(a.display.lineDiv,"CodeMirror-rtl")}function es(a){Hn(a,function(){nl(a),Oi(a)})}function Ca(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 rl(a,y){var b={from:oo(y.from),to:kr(y),text:yn(a,y.from,y.to)};return Yo(a,b,y.from.line,y.to.line+1),Ar(a,function(x){return Yo(x,b,y.from.line,y.to.line+1)},!0),b}function ct(a){for(;a.length;){var y=et(a);if(y.ranges)a.pop();else break}}function Ht(a,y){if(y)return ct(a.done),et(a.done);if(a.done.length&&!et(a.done).ranges)return et(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),et(a.done)}function Fn(a,y,b,x){var E=a.history;E.undone.length=0;var z=+new Date,re,ae;if((E.lastOp==x||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>z-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(re=Ht(E,E.lastOp==x)))ae=et(re.changes),ni(y.from,y.to)==0&&ni(y.from,ae.to)==0?ae.to=kr(y):re.changes.push(rl(a,y));else{var le=et(E.done);for((!le||!le.ranges)&&Co(a.sel,E.done),re={changes:[rl(a,y)],generation:E.generation},E.done.push(re);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(b),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=z,E.lastOp=E.lastSelOp=x,E.lastOrigin=E.lastSelOrigin=y.origin,ae||vi(a,"historyAdded")}function Zo(a,y,b,x){var E=y.charAt(0);return E=="*"||E=="+"&&b.ranges.length==x.ranges.length&&b.somethingSelected()==x.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function ba(a,y,b,x){var E=a.history,z=x&&x.origin;b==E.lastSelOp||z&&E.lastSelOrigin==z&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==z||Zo(a,z,et(E.done),y))?E.done[E.done.length-1]=y:Co(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=z,E.lastSelOp=b,x&&x.clearRedo!==!1&&ct(E.undone)}function Co(a,y){var b=et(y);b&&b.ranges&&b.equals(a)||y.push(a)}function Yo(a,y,b,x){var E=y["spans_"+a.id],z=0;a.iter(Math.max(a.first,b),Math.min(a.first+a.size,x),function(re){re.markedSpans&&((E||(E=y["spans_"+a.id]={}))[z]=re.markedSpans),++z})}function uu(a){if(!a)return null;for(var y,b=0;b<a.length;++b)a[b].marker.explicitlyCleared?y||(y=a.slice(0,b)):y&&y.push(a[b]);return y?y.length?y:null:a}function cu(a,y){var b=y["spans_"+a.id];if(!b)return null;for(var x=[],E=0;E<y.text.length;++E)x.push(uu(b[E]));return x}function ys(a,y){var b=cu(a,y),x=Vr(a,y);if(!b)return x;if(!x)return b;for(var E=0;E<b.length;++E){var z=b[E],re=x[E];if(z&&re)e:for(var ae=0;ae<re.length;++ae){for(var le=re[ae],ue=0;ue<z.length;++ue)if(z[ue].marker==le.marker)continue e;z.push(le)}else re&&(b[E]=re)}return b}function Ea(a,y,b){for(var x=[],E=0;E<a.length;++E){var z=a[E];if(z.ranges){x.push(b?Yi.prototype.deepCopy.call(z):z);continue}var re=z.changes,ae=[];x.push({changes:ae});for(var le=0;le<re.length;++le){var ue=re[le],ge=void 0;if(ae.push({from:ue.from,to:ue.to,text:ue.text}),y)for(var ye in ue)(ge=ye.match(/^spans_(\d+)$/))&&we(y,Number(ge[1]))>-1&&(et(ae)[ye]=ue[ye],delete ue[ye])}}return x}function ts(a,y,b,x){if(x){var E=a.anchor;if(b){var z=ni(y,E)<0;z!=ni(b,E)<0?(E=y,y=b):z!=ni(y,b)<0&&(y=b)}return new Ci(E,y)}else return new Ci(b||y,y)}function Il(a,y,b,x,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),jn(a,new Yi([ts(a.sel.primary(),y,b,E)],0),x)}function xs(a,y,b){for(var x=[],E=a.cm&&(a.cm.display.shift||a.extend),z=0;z<a.sel.ranges.length;z++)x[z]=ts(a.sel.ranges[z],y[z],null,E);var re=ar(a.cm,x,a.sel.primIndex);jn(a,re,b)}function is(a,y,b,x){var E=a.sel.ranges.slice(0);E[y]=b,jn(a,ar(a.cm,E,a.sel.primIndex),x)}function ws(a,y,b,x){jn(a,lr(y,b),x)}function hu(a,y,b){var x={ranges:y.ranges,update:function(E){this.ranges=[];for(var z=0;z<E.length;z++)this.ranges[z]=new Ci(Qe(a,E[z].anchor),Qe(a,E[z].head))},origin:b&&b.origin};return vi(a,"beforeSelectionChange",a,x),a.cm&&vi(a.cm,"beforeSelectionChange",a.cm,x),x.ranges!=y.ranges?ar(a.cm,x.ranges,x.ranges.length-1):y}function Cs(a,y,b){var x=a.history.done,E=et(x);E&&E.ranges?(x[x.length-1]=y,Fl(a,y,b)):jn(a,y,b)}function jn(a,y,b){Fl(a,y,b),ba(a,a.sel,a.cm?a.cm.curOp.id:NaN,b)}function Fl(a,y,b){(Hi(a,"beforeSelectionChange")||a.cm&&Hi(a.cm,"beforeSelectionChange"))&&(y=hu(a,y,b));var x=b&&b.bias||(ni(y.primary().head,a.sel.primary().head)<0?-1:1);bs(a,Ss(a,y,x,!0)),!(b&&b.scroll===!1)&&a.cm&&Dr(a.cm)}function bs(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,sr(a.cm)),Ui(a,"cursorActivity",a))}function Es(a){bs(a,Ss(a,a.sel,null,!1))}function Ss(a,y,b,x){for(var E,z=0;z<y.ranges.length;z++){var re=y.ranges[z],ae=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[z],le=jl(a,re.anchor,ae&&ae.anchor,b,x),ue=jl(a,re.head,ae&&ae.head,b,x);(E||le!=re.anchor||ue!=re.head)&&(E||(E=y.ranges.slice(0,z)),E[z]=new Ci(le,ue))}return E?ar(a.cm,E,y.primIndex):y}function Sa(a,y,b,x,E){var z=Ot(a,y.line);if(z.markedSpans)for(var re=0;re<z.markedSpans.length;++re){var ae=z.markedSpans[re],le=ae.marker,ue="selectLeft"in le?!le.selectLeft:le.inclusiveLeft,ge="selectRight"in le?!le.selectRight:le.inclusiveRight;if((ae.from==null||(ue?ae.from<=y.ch:ae.from<y.ch))&&(ae.to==null||(ge?ae.to>=y.ch:ae.to>y.ch))){if(E&&(vi(le,"beforeCursorEnter"),le.explicitlyCleared))if(z.markedSpans){--re;continue}else break;if(!le.atomic)continue;if(b){var ye=le.find(x<0?1:-1),Be=void 0;if((x<0?ge:ue)&&(ye=Ms(a,ye,-x,ye&&ye.line==y.line?z:null)),ye&&ye.line==y.line&&(Be=ni(ye,b))&&(x<0?Be<0:Be>0))return Sa(a,ye,y,x,E)}var _e=le.find(x<0?-1:1);return(x<0?ue:ge)&&(_e=Ms(a,_e,x,_e.line==y.line?z:null)),_e?Sa(a,_e,y,x,E):null}}return y}function jl(a,y,b,x,E){var z=x||1,re=Sa(a,y,b,z,E)||!E&&Sa(a,y,b,z,!0)||Sa(a,y,b,-z,E)||!E&&Sa(a,y,b,-z,!0);return re||(a.cantEdit=!0,xt(a.first,0))}function Ms(a,y,b,x){return b<0&&y.ch==0?y.line>a.first?Qe(a,xt(y.line-1)):null:b>0&&y.ch==(x||Ot(a,y.line)).text.length?y.line<a.first+a.size-1?xt(y.line+1,0):null:new xt(y.line,y.ch+b)}function Ds(a){a.setSelection(xt(a.firstLine(),0),xt(a.lastLine()),Se)}function Ls(a,y,b){var x={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return x.canceled=!0}};return b&&(x.update=function(E,z,re,ae){E&&(x.from=Qe(a,E)),z&&(x.to=Qe(a,z)),re&&(x.text=re),ae!==void 0&&(x.origin=ae)}),vi(a,"beforeChange",a,x),a.cm&&vi(a.cm,"beforeChange",a.cm,x),x.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:x.from,to:x.to,text:x.text,origin:x.origin}}function Ma(a,y,b){if(a.cm){if(!a.cm.curOp)return Zi(a.cm,Ma)(a,y,b);if(a.cm.state.suppressEdits)return}if(!((Hi(a,"beforeChange")||a.cm&&Hi(a.cm,"beforeChange"))&&(y=Ls(a,y,!0),!y))){var x=ea&&!b&&Fo(a,y.from,y.to);if(x)for(var E=x.length-1;E>=0;--E)ks(a,{from:x[E].from,to:x[E].to,text:E?[""]:y.text,origin:y.origin});else ks(a,y)}}function ks(a,y){if(!(y.text.length==1&&y.text[0]==""&&ni(y.from,y.to)==0)){var b=wa(a,y);Fn(a,y,b,a.cm?a.cm.curOp.id:NaN),ol(a,y,b,Vr(a,y));var x=[];Ar(a,function(E,z){!z&&we(x,E.history)==-1&&(Ts(E.history,y),x.push(E.history)),ol(E,y,null,Vr(E,y))})}}function Bl(a,y,b){var x=a.cm&&a.cm.state.suppressEdits;if(!(x&&!b)){for(var E=a.history,z,re=a.sel,ae=y=="undo"?E.done:E.undone,le=y=="undo"?E.undone:E.done,ue=0;ue<ae.length&&(z=ae[ue],!(b?z.ranges&&!z.equals(a.sel):!z.ranges));ue++);if(ue!=ae.length){for(E.lastOrigin=E.lastSelOrigin=null;;)if(z=ae.pop(),z.ranges){if(Co(z,le),b&&!z.equals(a.sel)){jn(a,z,{clearRedo:!1});return}re=z}else if(x){ae.push(z);return}else break;var ge=[];Co(re,le),le.push({changes:ge,generation:E.generation}),E.generation=z.generation||++E.maxGeneration;for(var ye=Hi(a,"beforeChange")||a.cm&&Hi(a.cm,"beforeChange"),Be=function(dt){var Ct=z.changes[dt];if(Ct.origin=y,ye&&!Ls(a,Ct,!1))return ae.length=0,{};ge.push(rl(a,Ct));var Mt=dt?wa(a,Ct):et(ae);ol(a,Ct,Mt,ys(a,Ct)),!dt&&a.cm&&a.cm.scrollIntoView({from:Ct.from,to:kr(Ct)});var Tt=[];Ar(a,function(Dt,Pt){!Pt&&we(Tt,Dt.history)==-1&&(Ts(Dt.history,Ct),Tt.push(Dt.history)),ol(Dt,Ct,null,ys(Dt,Ct))})},_e=z.changes.length-1;_e>=0;--_e){var Ke=Be(_e);if(Ke)return Ke.v}}}}function As(a,y){if(y!=0&&(a.first+=y,a.sel=new Yi(Nt(a.sel.ranges,function(E){return new Ci(xt(E.anchor.line+y,E.anchor.ch),xt(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){Oi(a.cm,a.first,a.first-y,y);for(var b=a.cm.display,x=b.viewFrom;x<b.viewTo;x++)or(a.cm,x,"gutter")}}function ol(a,y,b,x){if(a.cm&&!a.cm.curOp)return Zi(a.cm,ol)(a,y,b,x);if(y.to.line<a.first){As(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);As(a,E),y={from:xt(a.first,0),to:xt(y.to.line+E,y.to.ch),text:[et(y.text)],origin:y.origin}}var z=a.lastLine();y.to.line>z&&(y={from:y.from,to:xt(z,Ot(a,z).text.length),text:[y.text[0]],origin:y.origin}),y.removed=yn(a,y.from,y.to),b||(b=wa(a,y)),a.cm?du(a.cm,y,x):il(a,y,x),Fl(a,b,Se),a.cantEdit&&jl(a,xt(a.firstLine(),0))&&(a.cantEdit=!1)}}function du(a,y,b){var x=a.doc,E=a.display,z=y.from,re=y.to,ae=!1,le=z.line;a.options.lineWrapping||(le=mi(Vn(Ot(x,z.line))),x.iter(le,re.line+1,function(_e){if(_e==E.maxLine)return ae=!0,!0})),x.sel.contains(y.from,y.to)>-1&&sr(a),il(x,y,b,pi(a)),a.options.lineWrapping||(x.iter(le,z.line+y.text.length,function(_e){var Ke=zi(_e);Ke>E.maxLineLength&&(E.maxLine=_e,E.maxLineLength=Ke,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),qo(x,z.line),fa(a,400);var ue=y.text.length-(re.line-z.line)-1;y.full?Oi(a):z.line==re.line&&y.text.length==1&&!tl(a.doc,y)?or(a,z.line,"text"):Oi(a,z.line,re.line+1,ue);var ge=Hi(a,"changes"),ye=Hi(a,"change");if(ye||ge){var Be={from:z,to:re,text:y.text,removed:y.removed,origin:y.origin};ye&&Ui(a,"change",a,Be),ge&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Be)}a.display.selForContextMenu=null}function Da(a,y,b,x,E){var z;x||(x=b),ni(x,b)<0&&(z=[x,b],b=z[0],x=z[1]),typeof y=="string"&&(y=a.splitLines(y)),Ma(a,{from:b,to:x,text:y,origin:E})}function Ns(a,y,b,x){b<a.line?a.line+=x:y<a.line&&(a.line=y,a.ch=0)}function _s(a,y,b,x){for(var E=0;E<a.length;++E){var z=a[E],re=!0;if(z.ranges){z.copied||(z=a[E]=z.deepCopy(),z.copied=!0);for(var ae=0;ae<z.ranges.length;ae++)Ns(z.ranges[ae].anchor,y,b,x),Ns(z.ranges[ae].head,y,b,x);continue}for(var le=0;le<z.changes.length;++le){var ue=z.changes[le];if(b<ue.from.line)ue.from=xt(ue.from.line+x,ue.from.ch),ue.to=xt(ue.to.line+x,ue.to.ch);else if(y<=ue.to.line){re=!1;break}}re||(a.splice(0,E+1),E=0)}}function Ts(a,y){var b=y.from.line,x=y.to.line,E=y.text.length-(x-b)-1;_s(a.done,b,x,E),_s(a.undone,b,x,E)}function al(a,y,b,x){var E=y,z=y;return typeof y=="number"?z=Ot(a,No(a,y)):E=mi(y),E==null?null:(x(z,E)&&a.cm&&or(a.cm,E,b),z)}function ll(a){this.lines=a,this.parent=null;for(var y=0,b=0;b<a.length;++b)a[b].parent=this,y+=a[b].height;this.height=y}ll.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var b=a,x=a+y;b<x;++b){var E=this.lines[b];this.height-=E.height,cr(E),Ui(E,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,b){this.height+=b,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var x=0;x<y.length;++x)y[x].parent=this},iterN:function(a,y,b){for(var x=a+y;a<x;++a)if(b(this.lines[a]))return!0}};function sl(a){this.children=a;for(var y=0,b=0,x=0;x<a.length;++x){var E=a[x];y+=E.chunkSize(),b+=E.height,E.parent=this}this.size=y,this.height=b,this.parent=null}sl.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var b=0;b<this.children.length;++b){var x=this.children[b],E=x.chunkSize();if(a<E){var z=Math.min(y,E-a),re=x.height;if(x.removeInner(a,z),this.height-=re-x.height,E==z&&(this.children.splice(b--,1),x.parent=null),(y-=z)==0)break;a=0}else a-=E}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof ll))){var ae=[];this.collapse(ae),this.children=[new ll(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,b){this.size+=y.length,this.height+=b;for(var x=0;x<this.children.length;++x){var E=this.children[x],z=E.chunkSize();if(a<=z){if(E.insertInner(a,y,b),E.lines&&E.lines.length>50){for(var re=E.lines.length%25+25,ae=re;ae<E.lines.length;){var le=new ll(E.lines.slice(ae,ae+=25));E.height-=le.height,this.children.splice(++x,0,le),le.parent=this}E.lines=E.lines.slice(0,re),this.maybeSpill()}break}a-=z}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),b=new sl(y);if(a.parent){a.size-=b.size,a.height-=b.height;var E=we(a.parent.children,a);a.parent.children.splice(E+1,0,b)}else{var x=new sl(a.children);x.parent=a,a.children=[x,b],a=x}b.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,b){for(var x=0;x<this.children.length;++x){var E=this.children[x],z=E.chunkSize();if(a<z){var re=Math.min(y,z-a);if(E.iterN(a,re,b))return!0;if((y-=re)==0)break;a=0}else a-=z}}};var ul=function(a,y,b){if(b)for(var x in b)b.hasOwnProperty(x)&&(this[x]=b[x]);this.doc=a,this.node=y};ul.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,b=this.line,x=mi(b);if(!(x==null||!y)){for(var E=0;E<y.length;++E)y[E]==this&&y.splice(E--,1);y.length||(b.widgets=null);var z=ke(this);Un(b,Math.max(0,b.height-z)),a&&(Hn(a,function(){Is(a,b,-z),or(a,x,"widget")}),Ui(a,"lineWidgetCleared",a,this,x))}},ul.prototype.changed=function(){var a=this,y=this.height,b=this.doc.cm,x=this.line;this.height=null;var E=ke(this)-y;E&&(_t(this.doc,x)||Un(x,x.height+E),b&&Hn(b,function(){b.curOp.forceUpdate=!0,Is(b,x,E),Ui(b,"lineWidgetChanged",b,a,mi(x))}))},mn(ul);function Is(a,y,b){wi(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&ha(a,b)}function fu(a,y,b,x){var E=new ul(a,b,x),z=a.cm;return z&&E.noHScroll&&(z.display.alignWidgets=!0),al(a,y,"widget",function(re){var ae=re.widgets||(re.widgets=[]);if(E.insertAt==null?ae.push(E):ae.splice(Math.min(ae.length-1,Math.max(0,E.insertAt)),0,E),E.line=re,z&&!_t(a,re)){var le=wi(re)<a.scrollTop;Un(re,re.height+ke(E)),le&&ha(z,E.height),z.curOp.forceUpdate=!0}return!0}),z&&Ui(z,"lineWidgetAdded",z,E,typeof y=="number"?y:mi(y)),E}var Fs=0,bo=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++Fs};bo.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&vr(a),Hi(this,"clear")){var b=this.find();b&&Ui(this,"clear",b.from,b.to)}for(var x=null,E=null,z=0;z<this.lines.length;++z){var re=this.lines[z],ae=ot(re.markedSpans,this);a&&!this.collapsed?or(a,mi(re),"text"):a&&(ae.to!=null&&(E=mi(re)),ae.from!=null&&(x=mi(re))),re.markedSpans=uo(re.markedSpans,ae),ae.from==null&&this.collapsed&&!_t(this.doc,re)&&a&&Un(re,Rn(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var le=0;le<this.lines.length;++le){var ue=Vn(this.lines[le]),ge=zi(ue);ge>a.display.maxLineLength&&(a.display.maxLine=ue,a.display.maxLineLength=ge,a.display.maxLineChanged=!0)}x!=null&&a&&this.collapsed&&Oi(a,x,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Es(a.doc)),a&&Ui(a,"markerCleared",a,this,x,E),y&&yr(a),this.parent&&this.parent.clear()}},bo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var b,x,E=0;E<this.lines.length;++E){var z=this.lines[E],re=ot(z.markedSpans,this);if(re.from!=null&&(b=xt(y?z:mi(z),re.from),a==-1))return b;if(re.to!=null&&(x=xt(y?z:mi(z),re.to),a==1))return x}return b&&{from:b,to:x}},bo.prototype.changed=function(){var a=this,y=this.find(-1,!0),b=this,x=this.doc.cm;!y||!x||Hn(x,function(){var E=y.line,z=mi(y.line),re=Ya(x,z);if(re&&($t(re),x.curOp.selectionChanged=x.curOp.forceUpdate=!0),x.curOp.updateMaxLine=!0,!_t(b.doc,E)&&b.height!=null){var ae=b.height;b.height=null;var le=ke(b)-ae;le&&Un(E,E.height+le)}Ui(x,"markerChanged",x,a)})},bo.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||we(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},bo.prototype.detachLine=function(a){if(this.lines.splice(we(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},mn(bo);function La(a,y,b,x,E){if(x&&x.shared)return pu(a,y,b,x,E);if(a.cm&&!a.cm.curOp)return Zi(a.cm,La)(a,y,b,x,E);var z=new bo(a,E),re=ni(y,b);if(x&&ai(x,z,!1),re>0||re==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=vt("span",[z.replacedWith],"CodeMirror-widget"),x.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),x.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(Oa(a,y.line,y,b,z)||y.line!=b.line&&Oa(a,b.line,y,b,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");Yr()}z.addToHistory&&Fn(a,{from:y,to:b,origin:"markText"},a.sel,NaN);var ae=y.line,le=a.cm,ue;if(a.iter(ae,b.line+1,function(ye){le&&z.collapsed&&!le.options.lineWrapping&&Vn(ye)==le.display.maxLine&&(ue=!0),z.collapsed&&ae!=y.line&&Un(ye,0),co(ye,new Ir(z,ae==y.line?y.ch:null,ae==b.line?b.ch:null)),++ae}),z.collapsed&&a.iter(y.line,b.line+1,function(ye){_t(a,ye)&&Un(ye,0)}),z.clearOnEnter&&zt(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(ta(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),z.collapsed&&(z.id=++Fs,z.atomic=!0),le){if(ue&&(le.curOp.updateMaxLine=!0),z.collapsed)Oi(le,y.line,b.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var ge=y.line;ge<=b.line;ge++)or(le,ge,"text");z.atomic&&Es(le.doc),Ui(le,"markerAdded",le,z)}return z}var cl=function(a,y){this.markers=a,this.primary=y;for(var b=0;b<a.length;++b)a[b].parent=this};cl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Ui(this,"clear")}},cl.prototype.find=function(a,y){return this.primary.find(a,y)},mn(cl);function pu(a,y,b,x,E){x=ai(x),x.shared=!1;var z=[La(a,y,b,x,E)],re=z[0],ae=x.widgetNode;return Ar(a,function(le){ae&&(x.widgetNode=ae.cloneNode(!0)),z.push(La(le,Qe(le,y),Qe(le,b),x,E));for(var ue=0;ue<le.linked.length;++ue)if(le.linked[ue].isParent)return;re=et(z)}),new cl(z,re)}function js(a){return a.findMarks(xt(a.first,0),a.clipPos(xt(a.lastLine())),function(y){return y.parent})}function mu(a,y){for(var b=0;b<y.length;b++){var x=y[b],E=x.find(),z=a.clipPos(E.from),re=a.clipPos(E.to);if(ni(z,re)){var ae=La(a,z,re,x.primary,x.primary.type);x.markers.push(ae),ae.parent=x}}}function gu(a){for(var y=function(x){var E=a[x],z=[E.primary.doc];Ar(E.primary.doc,function(le){return z.push(le)});for(var re=0;re<E.markers.length;re++){var ae=E.markers[re];we(z,ae.doc)==-1&&(ae.parent=null,E.markers.splice(re--,1))}},b=0;b<a.length;b++)y(b)}var vu=0,$n=function(a,y,b,x,E){if(!(this instanceof $n))return new $n(a,y,b,x,E);b==null&&(b=0),sl.call(this,[new ll([new Si("",null)])]),this.first=b,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=b;var z=xt(b,0);this.sel=lr(z),this.history=new Ca(null),this.id=++vu,this.modeOption=y,this.lineSep=x,this.direction=E=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),il(this,{from:z,to:z,text:a}),jn(this,lr(z),Se)};$n.prototype=te(sl.prototype,{constructor:$n,iter:function(a,y,b){b?this.iterN(a-this.first,y-a,b):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var b=0,x=0;x<y.length;++x)b+=y[x].height;this.insertInner(a-this.first,y,b)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=Nn(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:fn(function(a){var y=xt(this.first,0),b=this.first+this.size-1;Ma(this,{from:y,to:xt(b,Ot(this,b).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&hn(this.cm,0,0),jn(this,lr(y),Se)}),replaceRange:function(a,y,b,x){y=Qe(this,y),b=b?Qe(this,b):y,Da(this,a,y,b,x)},getRange:function(a,y,b){var x=yn(this,Qe(this,a),Qe(this,y));return b===!1?x:x.join(b||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(ur(this,a))return Ot(this,a)},getLineNumber:function(a){return mi(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Ot(this,a)),Vn(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Qe(this,a)},getCursor:function(a){var y=this.sel.primary(),b;return a==null||a=="head"?b=y.head:a=="anchor"?b=y.anchor:a=="end"||a=="to"||a===!1?b=y.to():b=y.from(),b},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:fn(function(a,y,b){ws(this,Qe(this,typeof a=="number"?xt(a,y||0):a),null,b)}),setSelection:fn(function(a,y,b){ws(this,Qe(this,a),Qe(this,y||a),b)}),extendSelection:fn(function(a,y,b){Il(this,Qe(this,a),y&&Qe(this,y),b)}),extendSelections:fn(function(a,y){xs(this,Zr(this,a),y)}),extendSelectionsBy:fn(function(a,y){var b=Nt(this.sel.ranges,a);xs(this,Zr(this,b),y)}),setSelections:fn(function(a,y,b){if(a.length){for(var x=[],E=0;E<a.length;E++)x[E]=new Ci(Qe(this,a[E].anchor),Qe(this,a[E].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),jn(this,ar(this.cm,x,y),b)}}),addSelection:fn(function(a,y,b){var x=this.sel.ranges.slice(0);x.push(new Ci(Qe(this,a),Qe(this,y||a))),jn(this,ar(this.cm,x,x.length-1),b)}),getSelection:function(a){for(var y=this.sel.ranges,b,x=0;x<y.length;x++){var E=yn(this,y[x].from(),y[x].to());b=b?b.concat(E):E}return a===!1?b:b.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],b=this.sel.ranges,x=0;x<b.length;x++){var E=yn(this,b[x].from(),b[x].to());a!==!1&&(E=E.join(a||this.lineSeparator())),y[x]=E}return y},replaceSelection:function(a,y,b){for(var x=[],E=0;E<this.sel.ranges.length;E++)x[E]=a;this.replaceSelections(x,y,b||"+input")},replaceSelections:fn(function(a,y,b){for(var x=[],E=this.sel,z=0;z<E.ranges.length;z++){var re=E.ranges[z];x[z]={from:re.from(),to:re.to(),text:this.splitLines(a[z]),origin:b}}for(var ae=y&&y!="end"&&wo(this,x,y),le=x.length-1;le>=0;le--)Ma(this,x[le]);ae?Cs(this,ae):this.cm&&Dr(this.cm)}),undo:fn(function(){Bl(this,"undo")}),redo:fn(function(){Bl(this,"redo")}),undoSelection:fn(function(){Bl(this,"undo",!0)}),redoSelection:fn(function(){Bl(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,b=0,x=0;x<a.done.length;x++)a.done[x].ranges||++y;for(var E=0;E<a.undone.length;E++)a.undone[E].ranges||++b;return{undo:y,redo:b}},clearHistory:function(){var a=this;this.history=new Ca(this.history.maxGeneration),Ar(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:Ea(this.history.done),undone:Ea(this.history.undone)}},setHistory:function(a){var y=this.history=new Ca(this.history.maxGeneration);y.done=Ea(a.done.slice(0),null,!0),y.undone=Ea(a.undone.slice(0),null,!0)},setGutterMarker:fn(function(a,y,b){return al(this,a,"gutter",function(x){var E=x.gutterMarkers||(x.gutterMarkers={});return E[y]=b,!b&&ne(E)&&(x.gutterMarkers=null),!0})}),clearGutter:fn(function(a){var y=this;this.iter(function(b){b.gutterMarkers&&b.gutterMarkers[a]&&al(y,b,"gutter",function(){return b.gutterMarkers[a]=null,ne(b.gutterMarkers)&&(b.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!ur(this,a)||(y=a,a=Ot(this,a),!a))return null}else if(y=mi(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:fn(function(a,y,b){return al(this,a,y=="gutter"?"gutter":"class",function(x){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!x[E])x[E]=b;else{if(tt(b).test(x[E]))return!1;x[E]+=" "+b}return!0})}),removeLineClass:fn(function(a,y,b){return al(this,a,y=="gutter"?"gutter":"class",function(x){var E=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",z=x[E];if(z)if(b==null)x[E]=null;else{var re=z.match(tt(b));if(!re)return!1;var ae=re.index+re[0].length;x[E]=z.slice(0,re.index)+(!re.index||ae==z.length?"":" ")+z.slice(ae)||null}else return!1;return!0})}),addLineWidget:fn(function(a,y,b){return fu(this,a,y,b)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,b){return La(this,Qe(this,a),Qe(this,y),b,b&&b.type||"range")},setBookmark:function(a,y){var b={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=Qe(this,a),La(this,a,a,b,"bookmark")},findMarksAt:function(a){a=Qe(this,a);var y=[],b=Ot(this,a.line).markedSpans;if(b)for(var x=0;x<b.length;++x){var E=b[x];(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,b){a=Qe(this,a),y=Qe(this,y);var x=[],E=a.line;return this.iter(a.line,y.line+1,function(z){var re=z.markedSpans;if(re)for(var ae=0;ae<re.length;ae++){var le=re[ae];!(le.to!=null&&E==a.line&&a.ch>=le.to||le.from==null&&E!=a.line||le.from!=null&&E==y.line&&le.from>=y.ch)&&(!b||b(le.marker))&&x.push(le.marker.parent||le.marker)}++E}),x},getAllMarks:function(){var a=[];return this.iter(function(y){var b=y.markedSpans;if(b)for(var x=0;x<b.length;++x)b[x].from!=null&&a.push(b[x].marker)}),a},posFromIndex:function(a){var y,b=this.first,x=this.lineSeparator().length;return this.iter(function(E){var z=E.text.length+x;if(z>a)return y=a,!0;a-=z,++b}),Qe(this,xt(b,y))},indexFromPos:function(a){a=Qe(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var b=this.lineSeparator().length;return this.iter(this.first,a.line,function(x){y+=x.text.length+b}),y},copy:function(a){var y=new $n(Nn(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,b=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<b&&(b=a.to);var x=new $n(Nn(this,y,b),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(x.history=this.history),(this.linked||(this.linked=[])).push({doc:x,sharedHist:a.sharedHist}),x.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],mu(x,js(this)),x},unlinkDoc:function(a){if(a instanceof Pi&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var b=this.linked[y];if(b.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),gu(js(this));break}}if(a.history==this.history){var x=[a.id];Ar(a,function(E){return x.push(E.id)},!0),a.history=new Ca(null),a.history.done=Ea(this.history.done,x),a.history.undone=Ea(this.history.undone,x)}},iterLinkedDocs:function(a){Ar(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):xr(a)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:fn(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&es(this.cm))})}),$n.prototype.eachLine=$n.prototype.iter;var Bs=0;function yu(a){var y=this;if(Os(y),!(_i(y,a)||Sr(y.display,a))){Qi(a),xe&&(Bs=+new Date);var b=Ri(y,a,!0),x=a.dataTransfer.files;if(!(!b||y.isReadOnly()))if(x&&x.length&&window.FileReader&&window.File)for(var E=x.length,z=Array(E),re=0,ae=function(){++re==E&&Zi(y,function(){b=Qe(y.doc,b);var _e={from:b,to:b,text:y.doc.splitLines(z.filter(function(Ke){return Ke!=null}).join(y.doc.lineSeparator())),origin:"paste"};Ma(y.doc,_e),Cs(y.doc,lr(Qe(y.doc,b),Qe(y.doc,kr(_e))))})()},le=function(_e,Ke){if(y.options.allowDropFileTypes&&we(y.options.allowDropFileTypes,_e.type)==-1){ae();return}var dt=new FileReader;dt.onerror=function(){return ae()},dt.onload=function(){var Ct=dt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ct)){ae();return}z[Ke]=Ct,ae()},dt.readAsText(_e)},ue=0;ue<x.length;ue++)le(x[ue],ue);else{if(y.state.draggingText&&y.doc.sel.contains(b)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var ge=a.dataTransfer.getData("Text");if(ge){var ye;if(y.state.draggingText&&!y.state.draggingText.copy&&(ye=y.listSelections()),Fl(y.doc,lr(b,b)),ye)for(var Be=0;Be<ye.length;++Be)Da(y.doc,"",ye[Be].anchor,ye[Be].head,"drag");y.replaceSelection(ge,"around","paste"),y.display.input.focus()}}catch(_e){}}}}function xu(a,y){if(xe&&(!a.state.draggingText||+new Date-Bs<100)){Do(y);return}if(!(_i(a,y)||Sr(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!ze)){var b=qe("img",null,null,"position: fixed; left: 0; top: 0;");b.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ne&&(b.width=b.height=1,a.display.wrapper.appendChild(b),b._top=b.offsetTop),y.dataTransfer.setDragImage(b,0,0),Ne&&b.parentNode.removeChild(b)}}function wu(a,y){var b=Ri(a,y);if(b){var x=document.createDocumentFragment();Qt(a,b,x),a.display.dragCursor||(a.display.dragCursor=qe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),ft(a.display.dragCursor,x)}}function Os(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function Ps(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),b=[],x=0;x<y.length;x++){var E=y[x].CodeMirror;E&&b.push(E)}b.length&&b[0].operation(function(){for(var z=0;z<b.length;z++)a(b[z])})}}var zs=!1;function Cu(){zs||(bu(),zs=!0)}function bu(){var a;zt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,Ps(Eu)},100))}),zt(window,"blur",function(){return Ps(zr)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var Eo={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"},hl=0;hl<10;hl++)Eo[hl+48]=Eo[hl+96]=String(hl);for(var Ol=65;Ol<=90;Ol++)Eo[Ol]=String.fromCharCode(Ol);for(var dl=1;dl<=12;dl++)Eo[dl+111]=Eo[dl+63235]="F"+dl;var qr={};qr.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"},qr.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"},qr.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"},qr.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"]},qr.default=Ce?qr.macDefault:qr.pcDefault;function Su(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var b,x,E,z,re=0;re<y.length-1;re++){var ae=y[re];if(/^(cmd|meta|m)$/i.test(ae))z=!0;else if(/^a(lt)?$/i.test(ae))b=!0;else if(/^(c|ctrl|control)$/i.test(ae))x=!0;else if(/^s(hift)?$/i.test(ae))E=!0;else throw new Error("Unrecognized modifier name: "+ae)}return b&&(a="Alt-"+a),x&&(a="Ctrl-"+a),z&&(a="Cmd-"+a),E&&(a="Shift-"+a),a}function Mu(a){var y={};for(var b in a)if(a.hasOwnProperty(b)){var x=a[b];if(/^(name|fallthrough|(de|at)tach)$/.test(b))continue;if(x=="..."){delete a[b];continue}for(var E=Nt(b.split(" "),Su),z=0;z<E.length;z++){var re=void 0,ae=void 0;z==E.length-1?(ae=E.join(" "),re=x):(ae=E.slice(0,z+1).join(" "),re="...");var le=y[ae];if(!le)y[ae]=re;else if(le!=re)throw new Error("Inconsistent bindings for "+ae)}delete a[b]}for(var ue in y)a[ue]=y[ue];return a}function ka(a,y,b,x){y=Pl(y);var E=y.call?y.call(a,x):y[a];if(E===!1)return"nothing";if(E==="...")return"multi";if(E!=null&&b(E))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return ka(a,y.fallthrough,b,x);for(var z=0;z<y.fallthrough.length;z++){var re=ka(a,y.fallthrough[z],b,x);if(re)return re}}}function Rs(a){var y=typeof a=="string"?a:Eo[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function Ws(a,y,b){var x=a;return y.altKey&&x!="Alt"&&(a="Alt-"+a),(nt?y.metaKey:y.ctrlKey)&&x!="Ctrl"&&(a="Ctrl-"+a),(nt?y.ctrlKey:y.metaKey)&&x!="Mod"&&(a="Cmd-"+a),!b&&y.shiftKey&&x!="Shift"&&(a="Shift-"+a),a}function Hs(a,y){if(Ne&&a.keyCode==34&&a.char)return!1;var b=Eo[a.keyCode];return b==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(b=a.code),Ws(b,a,y))}function Pl(a){return typeof a=="string"?qr[a]:a}function Aa(a,y){for(var b=a.doc.sel.ranges,x=[],E=0;E<b.length;E++){for(var z=y(b[E]);x.length&&ni(z.from,et(x).to)<=0;){var re=x.pop();if(ni(re.from,z.from)<0){z.from=re.from;break}}x.push(z)}Hn(a,function(){for(var ae=x.length-1;ae>=0;ae--)Da(a.doc,"",x[ae].from,x[ae].to,"+delete");Dr(a)})}function ns(a,y,b){var x=At(a.text,y+b,b);return x<0||x>a.text.length?null:x}function rs(a,y,b){var x=ns(a,y.ch,b);return x==null?null:new xt(y.line,x,b<0?"after":"before")}function os(a,y,b,x,E){if(a){y.doc.direction=="rtl"&&(E=-E);var z=Ei(b,y.doc.direction);if(z){var re=E<0?et(z):z[0],ae=E<0==(re.level==1),le=ae?"after":"before",ue;if(re.level>0||y.doc.direction=="rtl"){var ge=po(y,b);ue=E<0?b.text.length-1:0;var ye=pr(y,ge,ue).top;ue=bt(function(Be){return pr(y,ge,Be).top==ye},E<0==(re.level==1)?re.from:re.to-1,ue),le=="before"&&(ue=ns(b,ue,1))}else ue=E<0?re.to:re.from;return new xt(x,ue,le)}}return new xt(x,E<0?b.text.length:0,E<0?"before":"after")}function Du(a,y,b,x){var E=Ei(y,a.doc.direction);if(!E)return rs(y,b,x);b.ch>=y.text.length?(b.ch=y.text.length,b.sticky="before"):b.ch<=0&&(b.ch=0,b.sticky="after");var z=Vt(E,b.ch,b.sticky),re=E[z];if(a.doc.direction=="ltr"&&re.level%2==0&&(x>0?re.to>b.ch:re.from<b.ch))return rs(y,b,x);var ae=function(Mt,Tt){return ns(y,Mt instanceof xt?Mt.ch:Mt,Tt)},le,ue=function(Mt){return a.options.lineWrapping?(le=le||po(a,y),In(a,y,le,Mt)):{begin:0,end:y.text.length}},ge=ue(b.sticky=="before"?ae(b,-1):b.ch);if(a.doc.direction=="rtl"||re.level==1){var ye=re.level==1==x<0,Be=ae(b,ye?1:-1);if(Be!=null&&(ye?Be<=re.to&&Be<=ge.end:Be>=re.from&&Be>=ge.begin)){var _e=ye?"before":"after";return new xt(b.line,Be,_e)}}var Ke=function(Mt,Tt,Dt){for(var Pt=function(Ti,bn){return bn?new xt(b.line,ae(Ti,1),"before"):new xt(b.line,Ti,"after")};Mt>=0&&Mt<E.length;Mt+=Tt){var Xt=E[Mt],Yt=Tt>0==(Xt.level!=1),ci=Yt?Dt.begin:ae(Dt.end,-1);if(Xt.from<=ci&&ci<Xt.to||(ci=Yt?Xt.from:ae(Xt.to,-1),Dt.begin<=ci&&ci<Dt.end))return Pt(ci,Yt)}},dt=Ke(z+x,x,ge);if(dt)return dt;var Ct=x>0?ge.end:ae(ge.begin,-1);return Ct!=null&&!(x>0&&Ct==y.text.length)&&(dt=Ke(x>0?0:E.length-1,x,ue(Ct)),dt)?dt:null}var fl={selectAll:Ds,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Se)},killLine:function(a){return Aa(a,function(y){if(y.empty()){var b=Ot(a.doc,y.head.line).text.length;return y.head.ch==b&&y.head.line<a.lastLine()?{from:y.head,to:xt(y.head.line+1,0)}:{from:y.head,to:xt(y.head.line,b)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Aa(a,function(y){return{from:xt(y.from().line,0),to:Qe(a.doc,xt(y.to().line+1,0))}})},delLineLeft:function(a){return Aa(a,function(y){return{from:xt(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Aa(a,function(y){var b=a.charCoords(y.head,"div").top+5,x=a.coordsChar({left:0,top:b},"div");return{from:x,to:y.from()}})},delWrappedLineRight:function(a){return Aa(a,function(y){var b=a.charCoords(y.head,"div").top+5,x=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div");return{from:y.from(),to:x}})},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(xt(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(xt(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return Gs(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return Us(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 b=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div")},it)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:b},"div")},it)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var b=a.cursorCoords(y.head,"div").top+5,x=a.coordsChar({left:0,top:b},"div");return x.ch<a.getLine(x.line).search(/\S/)?Us(a,y.head):x},it)},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=[],b=a.listSelections(),x=a.options.tabSize,E=0;E<b.length;E++){var z=b[E].from(),re=me(a.getLine(z.line),z.ch,x);y.push(ut(x-re%x))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Hn(a,function(){for(var y=a.listSelections(),b=[],x=0;x<y.length;x++)if(y[x].empty()){var E=y[x].head,z=Ot(a.doc,E.line).text;if(z){if(E.ch==z.length&&(E=new xt(E.line,E.ch-1)),E.ch>0)E=new xt(E.line,E.ch+1),a.replaceRange(z.charAt(E.ch-1)+z.charAt(E.ch-2),xt(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var re=Ot(a.doc,E.line-1).text;re&&(E=new xt(E.line,1),a.replaceRange(z.charAt(0)+a.doc.lineSeparator()+re.charAt(re.length-1),xt(E.line-1,re.length-1),E,"+transpose"))}}b.push(new Ci(E,E))}a.setSelections(b)})},newlineAndIndent:function(a){return Hn(a,function(){for(var y=a.listSelections(),b=y.length-1;b>=0;b--)a.replaceRange(a.doc.lineSeparator(),y[b].anchor,y[b].head,"+input");y=a.listSelections();for(var x=0;x<y.length;x++)a.indentLine(y[x].from().line,null,!0);Dr(a)})},openLine:function(a){return a.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function Gs(a,y){var b=Ot(a.doc,y),x=Vn(b);return x!=b&&(y=mi(x)),os(!0,a,x,y,1)}function Lu(a,y){var b=Ot(a.doc,y),x=Pa(b);return x!=b&&(y=mi(x)),os(!0,a,b,y,-1)}function Us(a,y){var b=Gs(a,y.line),x=Ot(a.doc,b.line),E=Ei(x,a.doc.direction);if(!E||E[0].level==0){var z=Math.max(b.ch,x.text.search(/\S/)),re=y.line==b.line&&y.ch<=z&&y.ch;return xt(b.line,re?0:z,b.sticky)}return b}function zl(a,y,b){if(typeof y=="string"&&(y=fl[y],!y))return!1;a.display.input.ensurePolled();var x=a.display.shift,E=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),b&&(a.display.shift=!1),E=y(a)!=mt}finally{a.display.shift=x,a.state.suppressEdits=!1}return E}function ku(a,y,b){for(var x=0;x<a.state.keyMaps.length;x++){var E=ka(y,a.state.keyMaps[x],b,a);if(E)return E}return a.options.extraKeys&&ka(y,a.options.extraKeys,b,a)||ka(y,a.options.keyMap,b,a)}var Au=new de;function pl(a,y,b,x){var E=a.state.keySeq;if(E){if(Rs(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Au.set(50,function(){a.state.keySeq==E&&(a.state.keySeq=null,a.display.input.reset())}),Zs(a,E+" "+y,b,x))return!0}return Zs(a,y,b,x)}function Zs(a,y,b,x){var E=ku(a,y,x);return E=="multi"&&(a.state.keySeq=y),E=="handled"&&Ui(a,"keyHandled",a,y,b),(E=="handled"||E=="multi")&&(Qi(b),ua(a)),!!E}function Ys(a,y){var b=Hs(y,!0);return b?y.shiftKey&&!a.state.keySeq?pl(a,"Shift-"+b,y,function(x){return zl(a,x,!0)})||pl(a,b,y,function(x){if(typeof x=="string"?/^go[A-Z]/.test(x):x.motion)return zl(a,x)}):pl(a,b,y,function(x){return zl(a,x)}):!1}function Nu(a,y,b){return pl(a,"'"+b+"'",y,function(x){return zl(a,x,!0)})}var as=null;function Vs(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Ye(),!_i(y,a))){xe&&ve<11&&a.keyCode==27&&(a.returnValue=!1);var b=a.keyCode;y.display.shift=b==16||a.shiftKey;var x=Ys(y,a);Ne&&(as=x?b:null,!x&&b==88&&!Ao&&(Ce?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ie&&!Ce&&!x&&b==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),b==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&_u(y)}}function _u(a){var y=a.display.lineDiv;st(y,"CodeMirror-crosshair");function b(x){(x.keyCode==18||!x.altKey)&&(at(y,"CodeMirror-crosshair"),di(document,"keyup",b),di(document,"mouseover",b))}zt(document,"keyup",b),zt(document,"mouseover",b)}function Qs(a){a.keyCode==16&&(this.doc.sel.shift=!1),_i(this,a)}function $s(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(Sr(y.display,a)||_i(y,a)||a.ctrlKey&&!a.altKey||Ce&&a.metaKey)){var b=a.keyCode,x=a.charCode;if(Ne&&b==as){as=null,Qi(a);return}if(!(Ne&&(!a.which||a.which<10)&&Ys(y,a))){var E=String.fromCharCode(x==null?b:x);E!="\b"&&(Nu(y,a,E)||y.display.input.onKeyPress(a))}}}var Tu=400,ls=function(a,y,b){this.time=a,this.pos=y,this.button=b};ls.prototype.compare=function(a,y,b){return this.time+Tu>a&&ni(y,this.pos)==0&&b==this.button};var ml,gl;function Iu(a,y){var b=+new Date;return gl&&gl.compare(b,a,y)?(ml=gl=null,"triple"):ml&&ml.compare(b,a,y)?(gl=new ls(b,a,y),ml=null,"double"):(ml=new ls(b,a,y),gl=null,"single")}function Js(a){var y=this,b=y.display;if(!(_i(y,a)||b.activeTouch&&b.input.supportsTouch())){if(b.input.ensurePolled(),b.shift=a.shiftKey,Sr(b,a)){Te||(b.scroller.draggable=!1,setTimeout(function(){return b.scroller.draggable=!0},100));return}if(!ss(y,a)){var x=Ri(y,a),E=Lo(a),z=x?Iu(x,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(x&&Fu(y,E,x,z,a))&&(E==1?x?Bu(y,x,z,a):$o(a)==b.scroller&&Qi(a):E==2?(x&&Il(y.doc,x),setTimeout(function(){return b.input.focus()},20)):E==3&&(rt?y.display.input.onContextMenu(a):ca(y)))}}}function Fu(a,y,b,x,E){var z="Click";return x=="double"?z="Double"+z:x=="triple"&&(z="Triple"+z),z=(y==1?"Left":y==2?"Middle":"Right")+z,pl(a,Ws(z,E),E,function(re){if(typeof re=="string"&&(re=fl[re]),!re)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=re(a,b)!=mt}finally{a.state.suppressEdits=!1}return ae})}function ju(a,y,b){var x=a.getOption("configureMouse"),E=x?x(a,y,b):{};if(E.unit==null){var z=Oe?b.shiftKey&&b.metaKey:b.altKey;E.unit=z?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||b.shiftKey),E.addNew==null&&(E.addNew=Ce?b.metaKey:b.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(Ce?b.altKey:b.ctrlKey)),E}function Bu(a,y,b,x){xe?setTimeout(si(cn,a),0):a.curOp.focus=Ye();var E=ju(a,b,x),z=a.doc.sel,re;a.options.dragDrop&&Jo&&!a.isReadOnly()&&b=="single"&&(re=z.contains(y))>-1&&(ni((re=z.ranges[re]).from(),y)<0||y.xRel>0)&&(ni(re.to(),y)>0||y.xRel<0)?Ou(a,x,y,E):Pu(a,x,y,E)}function Ou(a,y,b,x){var E=a.display,z=!1,re=Zi(a,function(ue){Te&&(E.scroller.draggable=!1),a.state.draggingText=!1,di(E.wrapper.ownerDocument,"mouseup",re),di(E.wrapper.ownerDocument,"mousemove",ae),di(E.scroller,"dragstart",le),di(E.scroller,"drop",re),z||(Qi(ue),x.addNew||Il(a.doc,b,null,null,x.extend),Te&&!ze||xe&&ve==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(ue){z=z||Math.abs(y.clientX-ue.clientX)+Math.abs(y.clientY-ue.clientY)>=10},le=function(){return z=!0};Te&&(E.scroller.draggable=!0),a.state.draggingText=re,re.copy=!x.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),zt(E.wrapper.ownerDocument,"mouseup",re),zt(E.wrapper.ownerDocument,"mousemove",ae),zt(E.scroller,"dragstart",le),zt(E.scroller,"drop",re),ca(a),setTimeout(function(){return E.input.focus()},20)}function Xs(a,y,b){if(b=="char")return new Ci(y,y);if(b=="word")return a.findWordAt(y);if(b=="line")return new Ci(xt(y.line,0),Qe(a.doc,xt(y.line+1,0)));var x=b(a,y);return new Ci(x.from,x.to)}function Pu(a,y,b,x){var E=a.display,z=a.doc;Qi(y);var re,ae,le=z.sel,ue=le.ranges;if(x.addNew&&!x.extend?(ae=z.sel.contains(b),ae>-1?re=ue[ae]:re=new Ci(b,b)):(re=z.sel.primary(),ae=z.sel.primIndex),x.unit=="rectangle")x.addNew||(re=new Ci(b,b)),b=Ri(a,y,!0,!0),ae=-1;else{var ge=Xs(a,b,x.unit);x.extend?re=ts(re,ge.anchor,ge.head,x.extend):re=ge}x.addNew?ae==-1?(ae=ue.length,jn(z,ar(a,ue.concat([re]),ae),{scroll:!1,origin:"*mouse"})):ue.length>1&&ue[ae].empty()&&x.unit=="char"&&!x.extend?(jn(z,ar(a,ue.slice(0,ae).concat(ue.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),le=z.sel):is(z,ae,re,Re):(ae=0,jn(z,new Yi([re],0),Re),le=z.sel);var ye=b;function Be(Dt){if(ni(ye,Dt)!=0)if(ye=Dt,x.unit=="rectangle"){for(var Pt=[],Xt=a.options.tabSize,Yt=me(Ot(z,b.line).text,b.ch,Xt),ci=me(Ot(z,Dt.line).text,Dt.ch,Xt),Ti=Math.min(Yt,ci),bn=Math.max(Yt,ci),Wi=Math.min(b.line,Dt.line),ir=Math.min(a.lastLine(),Math.max(b.line,Dt.line));Wi<=ir;Wi++){var Jn=Ot(z,Wi).text,on=yt(Jn,Ti,Xt);Ti==bn?Pt.push(new Ci(xt(Wi,on),xt(Wi,on))):Jn.length>on&&Pt.push(new Ci(xt(Wi,on),xt(Wi,yt(Jn,bn,Xt))))}Pt.length||Pt.push(new Ci(b,b)),jn(z,ar(a,le.ranges.slice(0,ae).concat(Pt),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(Dt)}else{var Xn=re,Ln=Xs(a,Dt,x.unit),pn=Xn.anchor,an;ni(Ln.anchor,pn)>0?(an=Ln.head,pn=Tr(Xn.from(),Ln.anchor)):(an=Ln.anchor,pn=Ur(Xn.to(),Ln.head));var Vi=le.ranges.slice(0);Vi[ae]=zu(a,new Ci(Qe(z,pn),an)),jn(z,ar(a,Vi,ae),Re)}}var _e=E.wrapper.getBoundingClientRect(),Ke=0;function dt(Dt){var Pt=++Ke,Xt=Ri(a,Dt,!0,x.unit=="rectangle");if(Xt)if(ni(Xt,ye)!=0){a.curOp.focus=Ye(),Be(Xt);var Yt=gr(E,z);(Xt.line>=Yt.to||Xt.line<Yt.from)&&setTimeout(Zi(a,function(){Ke==Pt&&dt(Dt)}),150)}else{var ci=Dt.clientY<_e.top?-20:Dt.clientY>_e.bottom?20:0;ci&&setTimeout(Zi(a,function(){Ke==Pt&&(E.scroller.scrollTop+=ci,dt(Dt))}),50)}}function Ct(Dt){a.state.selectingText=!1,Ke=1/0,Dt&&(Qi(Dt),E.input.focus()),di(E.wrapper.ownerDocument,"mousemove",Mt),di(E.wrapper.ownerDocument,"mouseup",Tt),z.history.lastSelOrigin=null}var Mt=Zi(a,function(Dt){Dt.buttons===0||!Lo(Dt)?Ct(Dt):dt(Dt)}),Tt=Zi(a,Ct);a.state.selectingText=Tt,zt(E.wrapper.ownerDocument,"mousemove",Mt),zt(E.wrapper.ownerDocument,"mouseup",Tt)}function zu(a,y){var b=y.anchor,x=y.head,E=Ot(a.doc,b.line);if(ni(b,x)==0&&b.sticky==x.sticky)return y;var z=Ei(E);if(!z)return y;var re=Vt(z,b.ch,b.sticky),ae=z[re];if(ae.from!=b.ch&&ae.to!=b.ch)return y;var le=re+(ae.from==b.ch==(ae.level!=1)?0:1);if(le==0||le==z.length)return y;var ue;if(x.line!=b.line)ue=(x.line-b.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var ge=Vt(z,x.ch,x.sticky),ye=ge-re||(x.ch-b.ch)*(ae.level==1?-1:1);ge==le-1||ge==le?ue=ye<0:ue=ye>0}var Be=z[le+(ue?-1:0)],_e=ue==(Be.level==1),Ke=_e?Be.from:Be.to,dt=_e?"after":"before";return b.ch==Ke&&b.sticky==dt?y:new Ci(new xt(b.line,Ke,dt),x)}function Ks(a,y,b,x){var E,z;if(y.touches)E=y.touches[0].clientX,z=y.touches[0].clientY;else try{E=y.clientX,z=y.clientY}catch(Be){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;x&&Qi(y);var re=a.display,ae=re.lineDiv.getBoundingClientRect();if(z>ae.bottom||!Hi(a,b))return Gr(y);z-=ae.top-re.viewOffset;for(var le=0;le<a.display.gutterSpecs.length;++le){var ue=re.gutters.childNodes[le];if(ue&&ue.getBoundingClientRect().right>=E){var ge=nr(a.doc,z),ye=a.display.gutterSpecs[le];return vi(a,b,a,ge,ye.className,y),Gr(y)}}}function ss(a,y){return Ks(a,y,"gutterClick",!0)}function qs(a,y){Sr(a.display,y)||Ru(a,y)||_i(a,y,"contextmenu")||rt||a.display.input.onContextMenu(y)}function Ru(a,y){return Hi(a,"gutterContextMenu")?Ks(a,y,"gutterContextMenu",!1):!1}function eu(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ui(a)}var Na={toString:function(){return"CodeMirror.Init"}},tu={},Rl={};function Wu(a){var y=a.optionHandlers;function b(x,E,z,re){a.defaults[x]=E,z&&(y[x]=re?function(ae,le,ue){ue!=Na&&z(ae,le,ue)}:z)}a.defineOption=b,a.Init=Na,b("value","",function(x,E){return x.setValue(E)},!0),b("mode",null,function(x,E){x.doc.modeOption=E,tr(x)},!0),b("indentUnit",2,tr,!0),b("indentWithTabs",!1),b("smartIndent",!0),b("tabSize",4,function(x){Uo(x),ui(x),Oi(x)},!0),b("lineSeparator",null,function(x,E){if(x.doc.lineSep=E,!!E){var z=[],re=x.doc.first;x.doc.iter(function(le){for(var ue=0;;){var ge=le.text.indexOf(E,ue);if(ge==-1)break;ue=ge+E.length,z.push(xt(re,ge))}re++});for(var ae=z.length-1;ae>=0;ae--)Da(x.doc,E,z[ae],xt(z[ae].line,z[ae].ch+E.length))}}),b("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(x,E,z){x.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),z!=Na&&x.refresh()}),b("specialCharPlaceholder",za,function(x){return x.refresh()},!0),b("electricChars",!0),b("inputStyle",Ae?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),b("spellcheck",!1,function(x,E){return x.getInputField().spellcheck=E},!0),b("autocorrect",!1,function(x,E){return x.getInputField().autocorrect=E},!0),b("autocapitalize",!1,function(x,E){return x.getInputField().autocapitalize=E},!0),b("rtlMoveVisually",!He),b("wholeLineUpdateBefore",!0),b("theme","default",function(x){eu(x),xo(x)},!0),b("keyMap","default",function(x,E,z){var re=Pl(E),ae=z!=Na&&Pl(z);ae&&ae.detach&&ae.detach(x,re),re.attach&&re.attach(x,ae||null)}),b("extraKeys",null),b("configureMouse",null),b("lineWrapping",!1,Gu,!0),b("gutters",[],function(x,E){x.display.gutterSpecs=qa(E,x.options.lineNumbers),xo(x)},!0),b("fixedGutter",!0,function(x,E){x.display.gutters.style.left=E?Di(x.display)+"px":"0",x.refresh()},!0),b("coverGutterNextToScrollbar",!1,function(x){return Wn(x)},!0),b("scrollbarStyle","native",function(x){Al(x),Wn(x),x.display.scrollbars.setScrollTop(x.doc.scrollTop),x.display.scrollbars.setScrollLeft(x.doc.scrollLeft)},!0),b("lineNumbers",!1,function(x,E){x.display.gutterSpecs=qa(x.options.gutters,E),xo(x)},!0),b("firstLineNumber",1,xo,!0),b("lineNumberFormatter",function(x){return x},xo,!0),b("showCursorWhenSelecting",!1,Bo,!0),b("resetSelectionOnContextMenu",!0),b("lineWiseCopyCut",!0),b("pasteLinesPerSelection",!0),b("selectionsMayTouch",!1),b("readOnly",!1,function(x,E){E=="nocursor"&&(zr(x),x.display.input.blur()),x.display.input.readOnlyChanged(E)}),b("screenReaderLabel",null,function(x,E){E=E===""?null:E,x.display.input.screenReaderLabelChanged(E)}),b("disableInput",!1,function(x,E){E||x.display.input.reset()},!0),b("dragDrop",!0,Hu),b("allowDropFileTypes",null),b("cursorBlinkRate",530),b("cursorScrollMargin",0),b("cursorHeight",1,Bo,!0),b("singleCursorHeightPerLine",!0,Bo,!0),b("workTime",100),b("workDelay",100),b("flattenSpans",!0,Uo,!0),b("addModeClass",!1,Uo,!0),b("pollInterval",100),b("undoDepth",200,function(x,E){return x.doc.history.undoDepth=E}),b("historyEventDelay",1250),b("viewportMargin",10,function(x){return x.refresh()},!0),b("maxHighlightLength",1e4,Uo,!0),b("moveInputWithCursor",!0,function(x,E){E||x.display.input.resetPosition()}),b("tabindex",null,function(x,E){return x.display.input.getField().tabIndex=E||""}),b("autofocus",null),b("direction","ltr",function(x,E){return x.doc.setDirection(E)},!0),b("phrases",null)}function Hu(a,y,b){var x=b&&b!=Na;if(!y!=!x){var E=a.display.dragFunctions,z=y?zt:di;z(a.display.scroller,"dragstart",E.start),z(a.display.scroller,"dragenter",E.enter),z(a.display.scroller,"dragover",E.over),z(a.display.scroller,"dragleave",E.leave),z(a.display.scroller,"drop",E.drop)}}function Gu(a){a.options.lineWrapping?(st(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(at(a.display.wrapper,"CodeMirror-wrap"),ji(a)),ki(a),Oi(a),ui(a),setTimeout(function(){return Wn(a)},100)}function Pi(a,y){var b=this;if(!(this instanceof Pi))return new Pi(a,y);this.options=y=y?ai(y):{},ai(tu,y,!1);var x=y.value;typeof x=="string"?x=new $n(x,y.mode,null,y.lineSeparator,y.direction):y.mode&&(x.modeOption=y.mode),this.doc=x;var E=new Pi.inputStyles[y.inputStyle](this),z=this.display=new ya(a,x,E,y);z.wrapper.CodeMirror=this,eu(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Al(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new de,keySeq:null,specialChars:null},y.autofocus&&!Ae&&z.input.focus(),xe&&ve<11&&setTimeout(function(){return b.display.input.reset(!0)},20),Uu(this),Cu(),vr(this),this.curOp.forceUpdate=!0,Tl(this,x),y.autofocus&&!Ae||this.hasFocus()?setTimeout(function(){b.hasFocus()&&!b.state.focused&&Po(b)},20):zr(this);for(var re in Rl)Rl.hasOwnProperty(re)&&Rl[re](this,y[re],Na);yo(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae<us.length;++ae)us[ae](this);yr(this),Te&&y.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}Pi.defaults=tu,Pi.optionHandlers=Rl;function Uu(a){var y=a.display;zt(y.scroller,"mousedown",Zi(a,Js)),xe&&ve<11?zt(y.scroller,"dblclick",Zi(a,function(le){if(!_i(a,le)){var ue=Ri(a,le);if(!(!ue||ss(a,le)||Sr(a.display,le))){Qi(le);var ge=a.findWordAt(ue);Il(a.doc,ge.anchor,ge.head)}}})):zt(y.scroller,"dblclick",function(le){return _i(a,le)||Qi(le)}),zt(y.scroller,"contextmenu",function(le){return qs(a,le)}),zt(y.input.getField(),"contextmenu",function(le){y.scroller.contains(le.target)||qs(a,le)});var b,x={end:0};function E(){y.activeTouch&&(b=setTimeout(function(){return y.activeTouch=null},1e3),x=y.activeTouch,x.end=+new Date)}function z(le){if(le.touches.length!=1)return!1;var ue=le.touches[0];return ue.radiusX<=1&&ue.radiusY<=1}function re(le,ue){if(ue.left==null)return!0;var ge=ue.left-le.left,ye=ue.top-le.top;return ge*ge+ye*ye>20*20}zt(y.scroller,"touchstart",function(le){if(!_i(a,le)&&!z(le)&&!ss(a,le)){y.input.ensurePolled(),clearTimeout(b);var ue=+new Date;y.activeTouch={start:ue,moved:!1,prev:ue-x.end<=300?x:null},le.touches.length==1&&(y.activeTouch.left=le.touches[0].pageX,y.activeTouch.top=le.touches[0].pageY)}}),zt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),zt(y.scroller,"touchend",function(le){var ue=y.activeTouch;if(ue&&!Sr(y,le)&&ue.left!=null&&!ue.moved&&new Date-ue.start<300){var ge=a.coordsChar(y.activeTouch,"page"),ye;!ue.prev||re(ue,ue.prev)?ye=new Ci(ge,ge):!ue.prev.prev||re(ue,ue.prev.prev)?ye=a.findWordAt(ge):ye=new Ci(xt(ge.line,0),Qe(a.doc,xt(ge.line+1,0))),a.setSelection(ye.anchor,ye.head),a.focus(),Qi(le)}E()}),zt(y.scroller,"touchcancel",E),zt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(Lr(a,y.scroller.scrollTop),ii(a,y.scroller.scrollLeft,!0),vi(a,"scroll",a))}),zt(y.scroller,"mousewheel",function(le){return Xi(a,le)}),zt(y.scroller,"DOMMouseScroll",function(le){return Xi(a,le)}),zt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(le){_i(a,le)||Do(le)},over:function(le){_i(a,le)||(wu(a,le),Do(le))},start:function(le){return xu(a,le)},drop:Zi(a,yu),leave:function(le){_i(a,le)||Os(a)}};var ae=y.input.getField();zt(ae,"keyup",function(le){return Qs.call(a,le)}),zt(ae,"keydown",Zi(a,Vs)),zt(ae,"keypress",Zi(a,$s)),zt(ae,"focus",function(le){return Po(a,le)}),zt(ae,"blur",function(le){return zr(a,le)})}var us=[];Pi.defineInitHook=function(a){return us.push(a)};function vl(a,y,b,x){var E=a.doc,z;b==null&&(b="add"),b=="smart"&&(E.mode.indent?z=Cr(a,y).state:b="prev");var re=a.options.tabSize,ae=Ot(E,y),le=me(ae.text,null,re);ae.stateAfter&&(ae.stateAfter=null);var ue=ae.text.match(/^\s*/)[0],ge;if(!x&&!/\S/.test(ae.text))ge=0,b="not";else if(b=="smart"&&(ge=E.mode.indent(z,ae.text.slice(ue.length),ae.text),ge==mt||ge>150)){if(!x)return;b="prev"}b=="prev"?y>E.first?ge=me(Ot(E,y-1).text,null,re):ge=0:b=="add"?ge=le+a.options.indentUnit:b=="subtract"?ge=le-a.options.indentUnit:typeof b=="number"&&(ge=le+b),ge=Math.max(0,ge);var ye="",Be=0;if(a.options.indentWithTabs)for(var _e=Math.floor(ge/re);_e;--_e)Be+=re,ye+=" ";if(Be<ge&&(ye+=ut(ge-Be)),ye!=ue)return Da(E,ye,xt(y,0),xt(y,ue.length),"+input"),ae.stateAfter=null,!0;for(var Ke=0;Ke<E.sel.ranges.length;Ke++){var dt=E.sel.ranges[Ke];if(dt.head.line==y&&dt.head.ch<ue.length){var Ct=xt(y,ue.length);is(E,Ke,new Ci(Ct,Ct));break}}}var Nr=null;function Wl(a){Nr=a}function cs(a,y,b,x,E){var z=a.doc;a.display.shift=!1,x||(x=z.sel);var re=+new Date-200,ae=E=="paste"||a.state.pasteIncoming>re,le=xr(y),ue=null;if(ae&&x.ranges.length>1)if(Nr&&Nr.text.join(`
|
|
`)==y){if(x.ranges.length%Nr.text.length==0){ue=[];for(var ge=0;ge<Nr.text.length;ge++)ue.push(z.splitLines(Nr.text[ge]))}}else le.length==x.ranges.length&&a.options.pasteLinesPerSelection&&(ue=Nt(le,function(Mt){return[Mt]}));for(var ye=a.curOp.updateInput,Be=x.ranges.length-1;Be>=0;Be--){var _e=x.ranges[Be],Ke=_e.from(),dt=_e.to();_e.empty()&&(b&&b>0?Ke=xt(Ke.line,Ke.ch-b):a.state.overwrite&&!ae?dt=xt(dt.line,Math.min(Ot(z,dt.line).text.length,dt.ch+et(le).length)):ae&&Nr&&Nr.lineWise&&Nr.text.join(`
|
|
`)==le.join(`
|
|
`)&&(Ke=dt=xt(Ke.line,0)));var Ct={from:Ke,to:dt,text:ue?ue[Be%ue.length]:le,origin:E||(ae?"paste":a.state.cutIncoming>re?"cut":"+input")};Ma(a.doc,Ct),Ui(a,"inputRead",a,Ct)}y&&!ae&&nu(a,y),Dr(a),a.curOp.updateInput<2&&(a.curOp.updateInput=ye),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function iu(a,y){var b=a.clipboardData&&a.clipboardData.getData("Text");if(b)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Hn(y,function(){return cs(y,b,0,null,"paste")}),!0}function nu(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var b=a.doc.sel,x=b.ranges.length-1;x>=0;x--){var E=b.ranges[x];if(!(E.head.ch>100||x&&b.ranges[x-1].head.line==E.head.line)){var z=a.getModeAt(E.head),re=!1;if(z.electricChars){for(var ae=0;ae<z.electricChars.length;ae++)if(y.indexOf(z.electricChars.charAt(ae))>-1){re=vl(a,E.head.line,"smart");break}}else z.electricInput&&z.electricInput.test(Ot(a.doc,E.head.line).text.slice(0,E.head.ch))&&(re=vl(a,E.head.line,"smart"));re&&Ui(a,"electricInput",a,E.head.line)}}}function ru(a){for(var y=[],b=[],x=0;x<a.doc.sel.ranges.length;x++){var E=a.doc.sel.ranges[x].head.line,z={anchor:xt(E,0),head:xt(E+1,0)};b.push(z),y.push(a.getRange(z.anchor,z.head))}return{text:y,ranges:b}}function ou(a,y,b,x){a.setAttribute("autocorrect",b?"":"off"),a.setAttribute("autocapitalize",x?"":"off"),a.setAttribute("spellcheck",!!y)}function au(){var a=qe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=qe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Te?a.style.width="1000px":a.setAttribute("wrap","off"),We&&(a.style.border="1px solid black"),ou(a),y}function Zu(a){var y=a.optionHandlers,b=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(x,E){var z=this.options,re=z[x];z[x]==E&&x!="mode"||(z[x]=E,y.hasOwnProperty(x)&&Zi(this,y[x])(this,E,re),vi(this,"optionChange",this,x))},getOption:function(x){return this.options[x]},getDoc:function(){return this.doc},addKeyMap:function(x,E){this.state.keyMaps[E?"push":"unshift"](Pl(x))},removeKeyMap:function(x){for(var E=this.state.keyMaps,z=0;z<E.length;++z)if(E[z]==x||E[z].name==x)return E.splice(z,1),!0},addOverlay:Mn(function(x,E){var z=x.token?x:a.getMode(this.options,x);if(z.startState)throw new Error("Overlays may not be stateful.");Gt(this.state.overlays,{mode:z,modeSpec:x,opaque:E&&E.opaque,priority:E&&E.priority||0},function(re){return re.priority}),this.state.modeGen++,Oi(this)}),removeOverlay:Mn(function(x){for(var E=this.state.overlays,z=0;z<E.length;++z){var re=E[z].modeSpec;if(re==x||typeof x=="string"&&re.name==x){E.splice(z,1),this.state.modeGen++,Oi(this);return}}}),indentLine:Mn(function(x,E,z){typeof E!="string"&&typeof E!="number"&&(E==null?E=this.options.smartIndent?"smart":"prev":E=E?"add":"subtract"),ur(this.doc,x)&&vl(this,x,E,z)}),indentSelection:Mn(function(x){for(var E=this.doc.sel.ranges,z=-1,re=0;re<E.length;re++){var ae=E[re];if(ae.empty())ae.head.line>z&&(vl(this,ae.head.line,x,!0),z=ae.head.line,re==this.doc.sel.primIndex&&Dr(this));else{var le=ae.from(),ue=ae.to(),ge=Math.max(z,le.line);z=Math.min(this.lastLine(),ue.line-(ue.ch?0:1))+1;for(var ye=ge;ye<z;++ye)vl(this,ye,x);var Be=this.doc.sel.ranges;le.ch==0&&E.length==Be.length&&Be[re].from().ch>0&&is(this.doc,re,new Ci(le,Be[re].to()),Se)}}}),getTokenAt:function(x,E){return lo(this,x,E)},getLineTokens:function(x,E){return lo(this,xt(x),E,!0)},getTokenTypeAt:function(x){x=Qe(this.doc,x);var E=rr(this,Ot(this.doc,x.line)),z=0,re=(E.length-1)/2,ae=x.ch,le;if(ae==0)le=E[2];else for(;;){var ue=z+re>>1;if((ue?E[ue*2-1]:0)>=ae)re=ue;else if(E[ue*2+1]<ae)z=ue+1;else{le=E[ue*2+2];break}}var ge=le?le.indexOf("overlay "):-1;return ge<0?le:ge==0?null:le.slice(0,ge-1)},getModeAt:function(x){var E=this.doc.mode;return E.innerMode?a.innerMode(E,this.getTokenAt(x).state).mode:E},getHelper:function(x,E){return this.getHelpers(x,E)[0]},getHelpers:function(x,E){var z=[];if(!b.hasOwnProperty(E))return z;var re=b[E],ae=this.getModeAt(x);if(typeof ae[E]=="string")re[ae[E]]&&z.push(re[ae[E]]);else if(ae[E])for(var le=0;le<ae[E].length;le++){var ue=re[ae[E][le]];ue&&z.push(ue)}else ae.helperType&&re[ae.helperType]?z.push(re[ae.helperType]):re[ae.name]&&z.push(re[ae.name]);for(var ge=0;ge<re._global.length;ge++){var ye=re._global[ge];ye.pred(ae,this)&&we(z,ye.val)==-1&&z.push(ye.val)}return z},getStateAfter:function(x,E){var z=this.doc;return x=No(z,x==null?z.first+z.size-1:x),Cr(this,x+1,E).state},cursorCoords:function(x,E){var z,re=this.doc.sel.primary();return x==null?z=re.head:typeof x=="object"?z=Qe(this.doc,x):z=x?re.from():re.to(),ri(this,z,E||"page")},charCoords:function(x,E){return _n(this,Qe(this.doc,x),E||"page")},coordsChar:function(x,E){return x=Bi(this,x,E||"page"),sn(this,x.left,x.top)},lineAtHeight:function(x,E){return x=Bi(this,{top:x,left:0},E||"page").top,nr(this.doc,x+this.display.viewOffset)},heightAtLine:function(x,E,z){var re=!1,ae;if(typeof x=="number"){var le=this.doc.first+this.doc.size-1;x<this.doc.first?x=this.doc.first:x>le&&(x=le,re=!0),ae=Ot(this.doc,x)}else ae=x;return Bt(this,ae,{top:0,left:0},E||"page",z||re).top+(re?this.doc.height-wi(ae):0)},defaultTextHeight:function(){return Rn(this.display)},defaultCharWidth:function(){return oi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(x,E,z,re,ae){var le=this.display;x=ri(this,Qe(this.doc,x));var ue=x.bottom,ge=x.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),le.sizer.appendChild(E),re=="over")ue=x.top;else if(re=="above"||re=="near"){var ye=Math.max(le.wrapper.clientHeight,this.doc.height),Be=Math.max(le.sizer.clientWidth,le.lineSpace.clientWidth);(re=="above"||x.bottom+E.offsetHeight>ye)&&x.top>E.offsetHeight?ue=x.top-E.offsetHeight:x.bottom+E.offsetHeight<=ye&&(ue=x.bottom),ge+E.offsetWidth>Be&&(ge=Be-E.offsetWidth)}E.style.top=ue+"px",E.style.left=E.style.right="",ae=="right"?(ge=le.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?ge=0:ae=="middle"&&(ge=(le.sizer.clientWidth-E.offsetWidth)/2),E.style.left=ge+"px"),z&&vo(this,{left:ge,top:ue,right:ge+E.offsetWidth,bottom:ue+E.offsetHeight})},triggerOnKeyDown:Mn(Vs),triggerOnKeyPress:Mn($s),triggerOnKeyUp:Qs,triggerOnMouseDown:Mn(Js),execCommand:function(x){if(fl.hasOwnProperty(x))return fl[x].call(null,this)},triggerElectric:Mn(function(x){nu(this,x)}),findPosH:function(x,E,z,re){var ae=1;E<0&&(ae=-1,E=-E);for(var le=Qe(this.doc,x),ue=0;ue<E&&(le=hs(this.doc,le,ae,z,re),!le.hitSide);++ue);return le},moveH:Mn(function(x,E){var z=this;this.extendSelectionsBy(function(re){return z.display.shift||z.doc.extend||re.empty()?hs(z.doc,re.head,x,E,z.options.rtlMoveVisually):x<0?re.from():re.to()},it)}),deleteH:Mn(function(x,E){var z=this.doc.sel,re=this.doc;z.somethingSelected()?re.replaceSelection("",null,"+delete"):Aa(this,function(ae){var le=hs(re,ae.head,x,E,!1);return x<0?{from:le,to:ae.head}:{from:ae.head,to:le}})}),findPosV:function(x,E,z,re){var ae=1,le=re;E<0&&(ae=-1,E=-E);for(var ue=Qe(this.doc,x),ge=0;ge<E;++ge){var ye=ri(this,ue,"div");if(le==null?le=ye.left:ye.left=le,ue=lu(this,ye,ae,z),ue.hitSide)break}return ue},moveV:Mn(function(x,E){var z=this,re=this.doc,ae=[],le=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(ge){if(le)return x<0?ge.from():ge.to();var ye=ri(z,ge.head,"div");ge.goalColumn!=null&&(ye.left=ge.goalColumn),ae.push(ye.left);var Be=lu(z,ye,x,E);return E=="page"&&ge==re.sel.primary()&&ha(z,_n(z,Be,"div").top-ye.top),Be},it),ae.length)for(var ue=0;ue<re.sel.ranges.length;ue++)re.sel.ranges[ue].goalColumn=ae[ue]}),findWordAt:function(x){var E=this.doc,z=Ot(E,x.line).text,re=x.ch,ae=x.ch;if(z){var le=this.getHelper(x,"wordChars");(x.sticky=="before"||ae==z.length)&&re?--re:++ae;for(var ue=z.charAt(re),ge=ce(ue,le)?function(ye){return ce(ye,le)}:/\s/.test(ue)?function(ye){return/\s/.test(ye)}:function(ye){return!/\s/.test(ye)&&!ce(ye)};re>0&&ge(z.charAt(re-1));)--re;for(;ae<z.length&&ge(z.charAt(ae));)++ae}return new Ci(xt(x.line,re),xt(x.line,ae))},toggleOverwrite:function(x){x!=null&&x==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?st(this.display.cursorDiv,"CodeMirror-overwrite"):at(this.display.cursorDiv,"CodeMirror-overwrite"),vi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ye()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Mn(function(x,E){hn(this,x,E)}),getScrollInfo:function(){var x=this.display.scroller;return{left:x.scrollLeft,top:x.scrollTop,height:x.scrollHeight-dr(this)-this.display.barHeight,width:x.scrollWidth-dr(this)-this.display.barWidth,clientHeight:sa(this),clientWidth:Xr(this)}},scrollIntoView:Mn(function(x,E){x==null?(x={from:this.doc.sel.primary().head,to:null},E==null&&(E=this.options.cursorScrollMargin)):typeof x=="number"?x={from:xt(x,0),to:null}:x.from==null&&(x={from:x,to:null}),x.to||(x.to=x.from),x.margin=E||0,x.from.line!=null?Ro(this,x):Wo(this,x.from,x.to,x.margin)}),setSize:Mn(function(x,E){var z=this,re=function(le){return typeof le=="number"||/^\d+$/.test(String(le))?le+"px":le};x!=null&&(this.display.wrapper.style.width=re(x)),E!=null&&(this.display.wrapper.style.height=re(E)),this.options.lineWrapping&&Kt(this);var ae=this.display.viewFrom;this.doc.iter(ae,this.display.viewTo,function(le){if(le.widgets){for(var ue=0;ue<le.widgets.length;ue++)if(le.widgets[ue].noHScroll){or(z,ae,"widget");break}}++ae}),this.curOp.forceUpdate=!0,vi(this,"refresh",this)}),operation:function(x){return Hn(this,x)},startOperation:function(){return vr(this)},endOperation:function(){return yr(this)},refresh:Mn(function(){var x=this.display.cachedTextHeight;Oi(this),this.curOp.forceUpdate=!0,ui(this),hn(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(x==null||Math.abs(x-Rn(this.display))>.5||this.options.lineWrapping)&&ki(this),vi(this,"refresh",this)}),swapDoc:Mn(function(x){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Tl(this,x),ui(this),this.display.input.reset(),hn(this,x.scrollLeft,x.scrollTop),this.curOp.forceScroll=!0,Ui(this,"swapDoc",this,E),E}),phrase:function(x){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,x)?E[x]:x},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}},mn(a),a.registerHelper=function(x,E,z){b.hasOwnProperty(x)||(b[x]=a[x]={_global:[]}),b[x][E]=z},a.registerGlobalHelper=function(x,E,z,re){a.registerHelper(x,E,re),b[x]._global.push({pred:z,val:re})}}function hs(a,y,b,x,E){var z=y,re=b,ae=Ot(a,y.line),le=E&&a.direction=="rtl"?-b:b;function ue(){var Tt=y.line+le;return Tt<a.first||Tt>=a.first+a.size?!1:(y=new xt(Tt,y.ch,y.sticky),ae=Ot(a,Tt))}function ge(Tt){var Dt;if(x=="codepoint"){var Pt=ae.text.charCodeAt(y.ch+(x>0?0:-1));isNaN(Pt)?Dt=null:Dt=new xt(y.line,Math.max(0,Math.min(ae.text.length,y.ch+b*(Pt>=55296&&Pt<56320?2:1))),-b)}else E?Dt=Du(a.cm,ae,y,b):Dt=rs(ae,y,b);if(Dt==null)if(!Tt&&ue())y=os(E,a.cm,ae,y.line,le);else return!1;else y=Dt;return!0}if(x=="char"||x=="codepoint")ge();else if(x=="column")ge(!0);else if(x=="word"||x=="group")for(var ye=null,Be=x=="group",_e=a.cm&&a.cm.getHelper(y,"wordChars"),Ke=!0;!(b<0&&!ge(!Ke));Ke=!1){var dt=ae.text.charAt(y.ch)||`
|
|
`,Ct=ce(dt,_e)?"w":Be&&dt==`
|
|
`?"n":!Be||/\s/.test(dt)?null:"p";if(Be&&!Ke&&!Ct&&(Ct="s"),ye&&ye!=Ct){b<0&&(b=1,ge(),y.sticky="after");break}if(Ct&&(ye=Ct),b>0&&!ge(!Ke))break}var Mt=jl(a,y,z,re,!0);return ro(z,Mt)&&(Mt.hitSide=!0),Mt}function lu(a,y,b,x){var E=a.doc,z=y.left,re;if(x=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),le=Math.max(ae-.5*Rn(a.display),3);re=(b>0?y.bottom:y.top)+b*le}else x=="line"&&(re=b>0?y.bottom+3:y.top-3);for(var ue;ue=sn(a,z,re),!!ue.outside;){if(b<0?re<=0:re>=E.height){ue.hitSide=!0;break}re+=b*5}return ue}var Ai=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ai.prototype.init=function(a){var y=this,b=this,x=b.cm,E=b.div=a.lineDiv;ou(E,x.options.spellcheck,x.options.autocorrect,x.options.autocapitalize);function z(ae){for(var le=ae.target;le;le=le.parentNode){if(le==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(le.className))break}return!1}zt(E,"paste",function(ae){!z(ae)||_i(x,ae)||iu(ae,x)||ve<=11&&setTimeout(Zi(x,function(){return y.updateFromDOM()}),20)}),zt(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),zt(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),zt(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),zt(E,"touchstart",function(){return b.forceCompositionEnd()}),zt(E,"input",function(){y.composing||y.readFromDOMSoon()});function re(ae){if(!(!z(ae)||_i(x,ae))){if(x.somethingSelected())Wl({lineWise:!1,text:x.getSelections()}),ae.type=="cut"&&x.replaceSelection("",null,"cut");else if(x.options.lineWiseCopyCut){var le=ru(x);Wl({lineWise:!0,text:le.text}),ae.type=="cut"&&x.operation(function(){x.setSelections(le.ranges,0,Se),x.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var ue=Nr.text.join(`
|
|
`);if(ae.clipboardData.setData("Text",ue),ae.clipboardData.getData("Text")==ue){ae.preventDefault();return}}var ge=au(),ye=ge.firstChild;x.display.lineSpace.insertBefore(ge,x.display.lineSpace.firstChild),ye.value=Nr.text.join(`
|
|
`);var Be=document.activeElement;jt(ye),setTimeout(function(){x.display.lineSpace.removeChild(ge),Be.focus(),Be==E&&b.showPrimarySelection()},50)}}zt(E,"copy",re),zt(E,"cut",re)},Ai.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Ai.prototype.prepareSelection=function(){var a=Xe(this.cm,!1);return a.focus=document.activeElement==this.div,a},Ai.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Ai.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ai.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,b=y.doc.sel.primary(),x=b.from(),E=b.to();if(y.display.viewTo==y.display.viewFrom||x.line>=y.display.viewTo||E.line<y.display.viewFrom){a.removeAllRanges();return}var z=Hl(y,a.anchorNode,a.anchorOffset),re=Hl(y,a.focusNode,a.focusOffset);if(!(z&&!z.bad&&re&&!re.bad&&ni(Tr(z,re),x)==0&&ni(Ur(z,re),E)==0)){var ae=y.display.view,le=x.line>=y.display.viewFrom&&su(y,x)||{node:ae[0].measure.map[2],offset:0},ue=E.line<y.display.viewTo&&su(y,E);if(!ue){var ge=ae[ae.length-1].measure,ye=ge.maps?ge.maps[ge.maps.length-1]:ge.map;ue={node:ye[ye.length-1],offset:ye[ye.length-2]-ye[ye.length-3]}}if(!le||!ue){a.removeAllRanges();return}var Be=a.rangeCount&&a.getRangeAt(0),_e;try{_e=Fe(le.node,le.offset,ue.offset,ue.node)}catch(Ke){}_e&&(!ie&&y.state.focused?(a.collapse(le.node,le.offset),_e.collapsed||(a.removeAllRanges(),a.addRange(_e))):(a.removeAllRanges(),a.addRange(_e)),Be&&a.anchorNode==null?a.addRange(Be):ie&&this.startGracePeriod()),this.rememberSelection()}},Ai.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)},Ai.prototype.showMultipleSelections=function(a){ft(this.cm.display.cursorDiv,a.cursors),ft(this.cm.display.selectionDiv,a.selection)},Ai.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Ai.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return lt(this.div,y)},Ai.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ai.prototype.blur=function(){this.div.blur()},Ai.prototype.getField=function(){return this.div},Ai.prototype.supportsTouch=function(){return!0},Ai.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():Hn(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)},Ai.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Ai.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(Le&&Ee&&this.cm.display.gutterSpecs.length&&Yu(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var b=Hl(y,a.anchorNode,a.anchorOffset),x=Hl(y,a.focusNode,a.focusOffset);b&&x&&Hn(y,function(){jn(y.doc,lr(b,x),Se),(b.bad||x.bad)&&(y.curOp.selectionChanged=!0)})}}},Ai.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,b=a.doc.sel.primary(),x=b.from(),E=b.to();if(x.ch==0&&x.line>a.firstLine()&&(x=xt(x.line-1,Ot(a.doc,x.line-1).length)),E.ch==Ot(a.doc,E.line).text.length&&E.line<a.lastLine()&&(E=xt(E.line+1,0)),x.line<y.viewFrom||E.line>y.viewTo-1)return!1;var z,re,ae;x.line==y.viewFrom||(z=rn(a,x.line))==0?(re=mi(y.view[0].line),ae=y.view[0].node):(re=mi(y.view[z].line),ae=y.view[z-1].node.nextSibling);var le=rn(a,E.line),ue,ge;if(le==y.view.length-1?(ue=y.viewTo-1,ge=y.lineDiv.lastChild):(ue=mi(y.view[le+1].line)-1,ge=y.view[le+1].node.previousSibling),!ae)return!1;for(var ye=a.doc.splitLines(Vu(a,ae,ge,re,ue)),Be=yn(a.doc,xt(re,0),xt(ue,Ot(a.doc,ue).text.length));ye.length>1&&Be.length>1;)if(et(ye)==et(Be))ye.pop(),Be.pop(),ue--;else if(ye[0]==Be[0])ye.shift(),Be.shift(),re++;else break;for(var _e=0,Ke=0,dt=ye[0],Ct=Be[0],Mt=Math.min(dt.length,Ct.length);_e<Mt&&dt.charCodeAt(_e)==Ct.charCodeAt(_e);)++_e;for(var Tt=et(ye),Dt=et(Be),Pt=Math.min(Tt.length-(ye.length==1?_e:0),Dt.length-(Be.length==1?_e:0));Ke<Pt&&Tt.charCodeAt(Tt.length-Ke-1)==Dt.charCodeAt(Dt.length-Ke-1);)++Ke;if(ye.length==1&&Be.length==1&&re==x.line)for(;_e&&_e>x.ch&&Tt.charCodeAt(Tt.length-Ke-1)==Dt.charCodeAt(Dt.length-Ke-1);)_e--,Ke++;ye[ye.length-1]=Tt.slice(0,Tt.length-Ke).replace(/^\u200b+/,""),ye[0]=ye[0].slice(_e).replace(/\u200b+$/,"");var Xt=xt(re,_e),Yt=xt(ue,Be.length?et(Be).length-Ke:0);if(ye.length>1||ye[0]||ni(Xt,Yt))return Da(a.doc,ye,Xt,Yt,"+input"),!0},Ai.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ai.prototype.reset=function(){this.forceCompositionEnd()},Ai.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ai.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))},Ai.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Hn(this.cm,function(){return Oi(a.cm)})},Ai.prototype.setUneditable=function(a){a.contentEditable="false"},Ai.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||Zi(this.cm,cs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Ai.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Ai.prototype.onContextMenu=function(){},Ai.prototype.resetPosition=function(){},Ai.prototype.needsContentAttribute=!0;function su(a,y){var b=Ya(a,y.line);if(!b||b.hidden)return null;var x=Ot(a.doc,y.line),E=fr(b,x,y.line),z=Ei(x,a.doc.direction),re="left";if(z){var ae=Vt(z,y.ch);re=ae%2?"right":"left"}var le=be(E.map,y.ch,re);return le.offset=le.collapse=="right"?le.end:le.start,le}function Yu(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function _a(a,y){return y&&(a.bad=!0),a}function Vu(a,y,b,x,E){var z="",re=!1,ae=a.doc.lineSeparator(),le=!1;function ue(_e){return function(Ke){return Ke.id==_e}}function ge(){re&&(z+=ae,le&&(z+=ae),re=le=!1)}function ye(_e){_e&&(ge(),z+=_e)}function Be(_e){if(_e.nodeType==1){var Ke=_e.getAttribute("cm-text");if(Ke){ye(Ke);return}var dt=_e.getAttribute("cm-marker"),Ct;if(dt){var Mt=a.findMarks(xt(x,0),xt(E+1,0),ue(+dt));Mt.length&&(Ct=Mt[0].find(0))&&ye(yn(a.doc,Ct.from,Ct.to).join(ae));return}if(_e.getAttribute("contenteditable")=="false")return;var Tt=/^(pre|div|p|li|table|br)$/i.test(_e.nodeName);if(!/^br$/i.test(_e.nodeName)&&_e.textContent.length==0)return;Tt&&ge();for(var Dt=0;Dt<_e.childNodes.length;Dt++)Be(_e.childNodes[Dt]);/^(pre|p)$/i.test(_e.nodeName)&&(le=!0),Tt&&(re=!0)}else _e.nodeType==3&&ye(_e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Be(y),y!=b;)y=y.nextSibling,le=!1;return z}function Hl(a,y,b){var x;if(y==a.display.lineDiv){if(x=a.display.lineDiv.childNodes[b],!x)return _a(a.clipPos(xt(a.display.viewTo-1)),!0);y=null,b=0}else for(x=y;;x=x.parentNode){if(!x||x==a.display.lineDiv)return null;if(x.parentNode&&x.parentNode==a.display.lineDiv)break}for(var E=0;E<a.display.view.length;E++){var z=a.display.view[E];if(z.node==x)return Qu(z,y,b)}}function Qu(a,y,b){var x=a.text.firstChild,E=!1;if(!y||!lt(x,y))return _a(xt(mi(a.line),0),!0);if(y==x&&(E=!0,y=x.childNodes[b],b=0,!y)){var z=a.rest?et(a.rest):a.line;return _a(xt(mi(z),z.text.length),E)}var re=y.nodeType==3?y:null,ae=y;for(!re&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(re=y.firstChild,b&&(b=re.nodeValue.length));ae.parentNode!=x;)ae=ae.parentNode;var le=a.measure,ue=le.maps;function ge(Ct,Mt,Tt){for(var Dt=-1;Dt<(ue?ue.length:0);Dt++)for(var Pt=Dt<0?le.map:ue[Dt],Xt=0;Xt<Pt.length;Xt+=3){var Yt=Pt[Xt+2];if(Yt==Ct||Yt==Mt){var ci=mi(Dt<0?a.line:a.rest[Dt]),Ti=Pt[Xt]+Tt;return(Tt<0||Yt!=Ct)&&(Ti=Pt[Xt+(Tt?1:0)]),xt(ci,Ti)}}}var ye=ge(re,ae,b);if(ye)return _a(ye,E);for(var Be=ae.nextSibling,_e=re?re.nodeValue.length-b:0;Be;Be=Be.nextSibling){if(ye=ge(Be,Be.firstChild,0),ye)return _a(xt(ye.line,ye.ch-_e),E);_e+=Be.textContent.length}for(var Ke=ae.previousSibling,dt=b;Ke;Ke=Ke.previousSibling){if(ye=ge(Ke,Ke.firstChild,-1),ye)return _a(xt(ye.line,ye.ch+dt),E);dt+=Ke.textContent.length}}var Ki=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new de,this.hasSelection=!1,this.composing=null};Ki.prototype.init=function(a){var y=this,b=this,x=this.cm;this.createField(a);var E=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),We&&(E.style.width="0px"),zt(E,"input",function(){xe&&ve>=9&&y.hasSelection&&(y.hasSelection=null),b.poll()}),zt(E,"paste",function(re){_i(x,re)||iu(re,x)||(x.state.pasteIncoming=+new Date,b.fastPoll())});function z(re){if(!_i(x,re)){if(x.somethingSelected())Wl({lineWise:!1,text:x.getSelections()});else if(x.options.lineWiseCopyCut){var ae=ru(x);Wl({lineWise:!0,text:ae.text}),re.type=="cut"?x.setSelections(ae.ranges,null,Se):(b.prevInput="",E.value=ae.text.join(`
|
|
`),jt(E))}else return;re.type=="cut"&&(x.state.cutIncoming=+new Date)}}zt(E,"cut",z),zt(E,"copy",z),zt(a.scroller,"paste",function(re){if(!(Sr(a,re)||_i(x,re))){if(!E.dispatchEvent){x.state.pasteIncoming=+new Date,b.focus();return}var ae=new Event("paste");ae.clipboardData=re.clipboardData,E.dispatchEvent(ae)}}),zt(a.lineSpace,"selectstart",function(re){Sr(a,re)||Qi(re)}),zt(E,"compositionstart",function(){var re=x.getCursor("from");b.composing&&b.composing.range.clear(),b.composing={start:re,range:x.markText(re,x.getCursor("to"),{className:"CodeMirror-composing"})}}),zt(E,"compositionend",function(){b.composing&&(b.poll(),b.composing.range.clear(),b.composing=null)})},Ki.prototype.createField=function(a){this.wrapper=au(),this.textarea=this.wrapper.firstChild},Ki.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Ki.prototype.prepareSelection=function(){var a=this.cm,y=a.display,b=a.doc,x=Xe(a);if(a.options.moveInputWithCursor){var E=ri(a,b.sel.primary().head,"div"),z=y.wrapper.getBoundingClientRect(),re=y.lineDiv.getBoundingClientRect();x.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+re.top-z.top)),x.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+re.left-z.left))}return x},Ki.prototype.showSelection=function(a){var y=this.cm,b=y.display;ft(b.cursorDiv,a.cursors),ft(b.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Ki.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var b=y.getSelection();this.textarea.value=b,y.state.focused&&jt(this.textarea),xe&&ve>=9&&(this.hasSelection=b)}else a||(this.prevInput=this.textarea.value="",xe&&ve>=9&&(this.hasSelection=null))}},Ki.prototype.getField=function(){return this.textarea},Ki.prototype.supportsTouch=function(){return!1},Ki.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ae||Ye()!=this.textarea))try{this.textarea.focus()}catch(a){}},Ki.prototype.blur=function(){this.textarea.blur()},Ki.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ki.prototype.receivedFocus=function(){this.slowPoll()},Ki.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Ki.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function b(){var x=y.poll();!x&&!a?(a=!0,y.polling.set(60,b)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,b)},Ki.prototype.poll=function(){var a=this,y=this.cm,b=this.textarea,x=this.prevInput;if(this.contextMenuPending||!y.state.focused||Fa(b)&&!x&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=b.value;if(E==x&&!y.somethingSelected())return!1;if(xe&&ve>=9&&this.hasSelection===E||Ce&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var z=E.charCodeAt(0);if(z==8203&&!x&&(x="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,ae=Math.min(x.length,E.length);re<ae&&x.charCodeAt(re)==E.charCodeAt(re);)++re;return Hn(y,function(){cs(y,E.slice(re),x.length-re,null,a.composing?"*compose":null),E.length>1e3||E.indexOf(`
|
|
`)>-1?b.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},Ki.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ki.prototype.onKeyPress=function(){xe&&ve>=9&&(this.hasSelection=null),this.fastPoll()},Ki.prototype.onContextMenu=function(a){var y=this,b=y.cm,x=b.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var z=Ri(b,a),re=x.scroller.scrollTop;if(!z||Ne)return;var ae=b.options.resetSelectionOnContextMenu;ae&&b.doc.sel.contains(z)==-1&&Zi(b,jn)(b.doc,lr(z),Se);var le=E.style.cssText,ue=y.wrapper.style.cssText,ge=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(a.clientY-ge.top-5)+"px; left: "+(a.clientX-ge.left-5)+`px;
|
|
z-index: 1000; background: `+(xe?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ye;Te&&(ye=window.scrollY),x.input.focus(),Te&&window.scrollTo(null,ye),x.input.reset(),b.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=_e,x.selForContextMenu=b.doc.sel,clearTimeout(x.detectingSelectAll);function Be(){if(E.selectionStart!=null){var dt=b.somethingSelected(),Ct="\u200B"+(dt?E.value:"");E.value="\u21DA",E.value=Ct,y.prevInput=dt?"":"\u200B",E.selectionStart=1,E.selectionEnd=Ct.length,x.selForContextMenu=b.doc.sel}}function _e(){if(y.contextMenuPending==_e&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ue,E.style.cssText=le,xe&&ve<9&&x.scrollbars.setScrollTop(x.scroller.scrollTop=re),E.selectionStart!=null)){(!xe||xe&&ve<9)&&Be();var dt=0,Ct=function(){x.selForContextMenu==b.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?Zi(b,Ds)(b):dt++<10?x.detectingSelectAll=setTimeout(Ct,500):(x.selForContextMenu=null,x.input.reset())};x.detectingSelectAll=setTimeout(Ct,200)}}if(xe&&ve>=9&&Be(),rt){Do(a);var Ke=function(){di(window,"mouseup",Ke),setTimeout(_e,20)};zt(window,"mouseup",Ke)}else setTimeout(_e,50)},Ki.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Ki.prototype.setUneditable=function(){},Ki.prototype.needsContentAttribute=!1;function $u(a,y){if(y=y?ai(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 b=Ye();y.autofocus=b==a||a.getAttribute("autofocus")!=null&&b==document.body}function x(){a.value=ae.getValue()}var E;if(a.form&&(zt(a.form,"submit",x),!y.leaveSubmitMethodAlone)){var z=a.form;E=z.submit;try{var re=z.submit=function(){x(),z.submit=E,z.submit(),z.submit=re}}catch(le){}}y.finishInit=function(le){le.save=x,le.getTextArea=function(){return a},le.toTextArea=function(){le.toTextArea=isNaN,x(),a.parentNode.removeChild(le.getWrapperElement()),a.style.display="",a.form&&(di(a.form,"submit",x),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Pi(function(le){return a.parentNode.insertBefore(le,a.nextSibling)},y);return ae}function Ju(a){a.off=di,a.on=zt,a.wheelEventPixels=ql,a.Doc=$n,a.splitLines=xr,a.countColumn=me,a.findColumn=yt,a.isWordChar=oe,a.Pass=mt,a.signal=vi,a.Line=Si,a.changeEnd=kr,a.scrollbarModel=Va,a.Pos=xt,a.cmpPos=ni,a.modes=_r,a.mimeModes=Zt,a.resolveMode=xi,a.getMode=Sn,a.modeExtensions=Fi,a.extendMode=On,a.copyState=gn,a.startState=An,a.innerMode=vn,a.commands=fl,a.keyMap=qr,a.keyName=Hs,a.isModifierKey=Rs,a.lookupKey=ka,a.normalizeKeyMap=Mu,a.StringStream=bi,a.SharedTextMarker=cl,a.TextMarker=bo,a.LineWidget=ul,a.e_preventDefault=Qi,a.e_stopPropagation=Mo,a.e_stop=Do,a.addClass=st,a.contains=lt,a.rmClass=at,a.keyNames=Eo}Wu(Pi),Zu(Pi);var Xu="iter insert remove copy getEditor constructor".split(" ");for(var Gl in $n.prototype)$n.prototype.hasOwnProperty(Gl)&&we(Xu,Gl)<0&&(Pi.prototype[Gl]=function(a){return function(){return a.apply(this.doc,arguments)}}($n.prototype[Gl]));return mn($n),Pi.inputStyles={textarea:Ki,contenteditable:Ai},Pi.defineMode=function(a){!Pi.defaults.mode&&a!="null"&&(Pi.defaults.mode=a),qt.apply(this,arguments)},Pi.defineMIME=ti,Pi.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Pi.defineMIME("text/plain","null"),Pi.defineExtension=function(a,y){Pi.prototype[a]=y},Pi.defineDocExtension=function(a,y){$n.prototype[a]=y},Pi.fromTextArea=$u,Ju(Pi),Pi.version="5.58.2",Pi})},25419:function(gt,wt,fe){(function(ie){ie(fe(89780),fe(15525),fe(98101))})(function(ie){"use strict";ie.defineMode("markdown",function(Ge,De){var Ze=ie.getMode(Ge,"text/html"),xe=Ze.name=="null";function ve(me){if(ie.findModeByName){var de=ie.findModeByName(me);de&&(me=de.mime||de.mimes[0])}var we=ie.getMode(Ge,me);return we.name=="null"?null:we}De.highlightFormatting===void 0&&(De.highlightFormatting=!1),De.maxBlockquoteDepth===void 0&&(De.maxBlockquoteDepth=0),De.taskLists===void 0&&(De.taskLists=!1),De.strikethrough===void 0&&(De.strikethrough=!1),De.emoji===void 0&&(De.emoji=!1),De.fencedCodeBlockHighlighting===void 0&&(De.fencedCodeBlockHighlighting=!0),De.fencedCodeBlockDefaultMode===void 0&&(De.fencedCodeBlockDefaultMode="text/plain"),De.xml===void 0&&(De.xml=!0),De.tokenTypeOverrides===void 0&&(De.tokenTypeOverrides={});var Te={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 Te)Te.hasOwnProperty(Ie)&&De.tokenTypeOverrides[Ie]&&(Te[Ie]=De.tokenTypeOverrides[Ie]);var Ee=/^([*\-_])(?:\s*\1){2,}\s*$/,Ne=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ze=/^\[(x| )\](?=\s)/i,je=De.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,pt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,We=/^[^#!\[\]*_\\<>` "'(~:]+/,Le=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ae=/^\s*\[[^\]]+?\]:.*$/,Ce=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Oe=" ";function He(me,de,we){return de.f=de.inline=we,we(me,de)}function Ue(me,de,we){return de.f=de.block=we,we(me,de)}function nt(me){return!me||!/\S/.test(me.string)}function rt(me){if(me.linkTitle=!1,me.linkHref=!1,me.linkText=!1,me.em=!1,me.strong=!1,me.strikethrough=!1,me.quote=0,me.indentedCode=!1,me.f==at){var de=xe;if(!de){var we=ie.innerMode(Ze,me.htmlState);de=we.mode.name=="xml"&&we.state.tagStart===null&&!we.state.context&&we.state.tokenize.isInText}de&&(me.f=vt,me.block=tt,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function tt(me,de){var we=me.column()===de.indentation,Pe=nt(de.prevLine.stream),mt=de.indentedCode,Se=de.prevLine.hr,Re=de.list!==!1,it=(de.listStack[de.listStack.length-1]||0)+3;de.indentedCode=!1;var yt=de.indentation;if(de.indentationDiff===null&&(de.indentationDiff=de.indentation,Re)){for(de.list=null;yt<de.listStack[de.listStack.length-1];)de.listStack.pop(),de.listStack.length?de.indentation=de.listStack[de.listStack.length-1]:de.list=!1;de.list!==!1&&(de.indentationDiff=yt-de.listStack[de.listStack.length-1])}var $e=!Pe&&!Se&&!de.prevLine.header&&(!Re||!mt)&&!de.prevLine.fencedCodeEnd,ut=(de.list===!1||Se||Pe)&&de.indentation<=it&&me.match(Ee),et=null;if(de.indentationDiff>=4&&(mt||de.prevLine.fencedCodeEnd||de.prevLine.header||Pe))return me.skipToEnd(),de.indentedCode=!0,Te.code;if(me.eatSpace())return null;if(we&&de.indentation<=it&&(et=me.match(je))&&et[1].length<=6)return de.quote=0,de.header=et[1].length,de.thisLine.header=!0,De.highlightFormatting&&(de.formatting="header"),de.f=de.inline,ft(de);if(de.indentation<=it&&me.eat(">"))return de.quote=we?1:de.quote+1,De.highlightFormatting&&(de.formatting="quote"),me.eatSpace(),ft(de);if(!ut&&!de.setext&&we&&de.indentation<=it&&(et=me.match(Ne))){var Nt=et[1]?"ol":"ul";return de.indentation=yt+me.current().length,de.list=!0,de.quote=0,de.listStack.push(de.indentation),de.em=!1,de.strong=!1,de.code=!1,de.strikethrough=!1,De.taskLists&&me.match(ze,!1)&&(de.taskList=!0),de.f=de.inline,De.highlightFormatting&&(de.formatting=["list","list-"+Nt]),ft(de)}else{if(we&&de.indentation<=it&&(et=me.match(Le,!0)))return de.quote=0,de.fencedEndRE=new RegExp(et[1]+"+ *$"),de.localMode=De.fencedCodeBlockHighlighting&&ve(et[2]||De.fencedCodeBlockDefaultMode),de.localMode&&(de.localState=ie.startState(de.localMode)),de.f=de.block=Et,De.highlightFormatting&&(de.formatting="code-block"),de.code=-1,ft(de);if(de.setext||(!$e||!Re)&&!de.quote&&de.list===!1&&!de.code&&!ut&&!Ae.test(me.string)&&(et=me.lookAhead(1))&&(et=et.match(pt)))return de.setext?(de.header=de.setext,de.setext=0,me.skipToEnd(),De.highlightFormatting&&(de.formatting="header")):(de.header=et[0].charAt(0)=="="?1:2,de.setext=de.header),de.thisLine.header=!0,de.f=de.inline,ft(de);if(ut)return me.skipToEnd(),de.hr=!0,de.thisLine.hr=!0,Te.hr;if(me.peek()==="[")return He(me,de,Ve)}return He(me,de,de.inline)}function at(me,de){var we=Ze.token(me,de.htmlState);if(!xe){var Pe=ie.innerMode(Ze,de.htmlState);(Pe.mode.name=="xml"&&Pe.state.tagStart===null&&!Pe.state.context&&Pe.state.tokenize.isInText||de.md_inside&&me.current().indexOf(">")>-1)&&(de.f=vt,de.block=tt,de.htmlState=null)}return we}function Et(me,de){var we=de.listStack[de.listStack.length-1]||0,Pe=de.indentation<we,mt=we+3;if(de.fencedEndRE&&de.indentation<=mt&&(Pe||me.match(de.fencedEndRE))){De.highlightFormatting&&(de.formatting="code-block");var Se;return Pe||(Se=ft(de)),de.localMode=de.localState=null,de.block=tt,de.f=vt,de.fencedEndRE=null,de.code=0,de.thisLine.fencedCodeEnd=!0,Pe?Ue(me,de,de.block):Se}else return de.localMode?de.localMode.token(me,de.localState):(me.skipToEnd(),Te.code)}function ft(me){var de=[];if(me.formatting){de.push(Te.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var we=0;we<me.formatting.length;we++)de.push(Te.formatting+"-"+me.formatting[we]),me.formatting[we]==="header"&&de.push(Te.formatting+"-"+me.formatting[we]+"-"+me.header),me.formatting[we]==="quote"&&(!De.maxBlockquoteDepth||De.maxBlockquoteDepth>=me.quote?de.push(Te.formatting+"-"+me.formatting[we]+"-"+me.quote):de.push("error"))}if(me.taskOpen)return de.push("meta"),de.length?de.join(" "):null;if(me.taskClosed)return de.push("property"),de.length?de.join(" "):null;if(me.linkHref?de.push(Te.linkHref,"url"):(me.strong&&de.push(Te.strong),me.em&&de.push(Te.em),me.strikethrough&&de.push(Te.strikethrough),me.emoji&&de.push(Te.emoji),me.linkText&&de.push(Te.linkText),me.code&&de.push(Te.code),me.image&&de.push(Te.image),me.imageAltText&&de.push(Te.imageAltText,"link"),me.imageMarker&&de.push(Te.imageMarker)),me.header&&de.push(Te.header,Te.header+"-"+me.header),me.quote&&(de.push(Te.quote),!De.maxBlockquoteDepth||De.maxBlockquoteDepth>=me.quote?de.push(Te.quote+"-"+me.quote):de.push(Te.quote+"-"+De.maxBlockquoteDepth)),me.list!==!1){var Pe=(me.listStack.length-1)%3;Pe?Pe===1?de.push(Te.list2):de.push(Te.list3):de.push(Te.list1)}return me.trailingSpaceNewLine?de.push("trailing-space-new-line"):me.trailingSpace&&de.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),de.length?de.join(" "):null}function qe(me,de){if(me.match(We,!0))return ft(de)}function vt(me,de){var we=de.text(me,de);if(typeof we!="undefined")return we;if(de.list)return de.list=null,ft(de);if(de.taskList){var Pe=me.match(ze,!0)[1]===" ";return Pe?de.taskOpen=!0:de.taskClosed=!0,De.highlightFormatting&&(de.formatting="task"),de.taskList=!1,ft(de)}if(de.taskOpen=!1,de.taskClosed=!1,de.header&&me.match(/^#+$/,!0))return De.highlightFormatting&&(de.formatting="header"),ft(de);var mt=me.next();if(de.linkTitle){de.linkTitle=!1;var Se=mt;mt==="("&&(Se=")"),Se=(Se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Re="^\\s*(?:[^"+Se+"\\\\]+|\\\\\\\\|\\\\.)"+Se;if(me.match(new RegExp(Re),!0))return Te.linkHref}if(mt==="`"){var it=de.formatting;De.highlightFormatting&&(de.formatting="code"),me.eatWhile("`");var yt=me.current().length;if(de.code==0&&(!de.quote||yt==1))return de.code=yt,ft(de);if(yt==de.code){var $e=ft(de);return de.code=0,$e}else return de.formatting=it,ft(de)}else if(de.code)return ft(de);if(mt==="\\"&&(me.next(),De.highlightFormatting)){var ut=ft(de),et=Te.formatting+"-escape";return ut?ut+" "+et:et}if(mt==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return de.imageMarker=!0,de.image=!0,De.highlightFormatting&&(de.formatting="image"),ft(de);if(mt==="["&&de.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return de.imageMarker=!1,de.imageAltText=!0,De.highlightFormatting&&(de.formatting="image"),ft(de);if(mt==="]"&&de.imageAltText){De.highlightFormatting&&(de.formatting="image");var ut=ft(de);return de.imageAltText=!1,de.image=!1,de.inline=de.f=lt,ut}if(mt==="["&&!de.image)return de.linkText&&me.match(/^.*?\]/)||(de.linkText=!0,De.highlightFormatting&&(de.formatting="link")),ft(de);if(mt==="]"&&de.linkText){De.highlightFormatting&&(de.formatting="link");var ut=ft(de);return de.linkText=!1,de.inline=de.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?lt:vt,ut}if(mt==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Fe,De.highlightFormatting&&(de.formatting="link");var ut=ft(de);return ut?ut+=" ":ut="",ut+Te.linkInline}if(mt==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){de.f=de.inline=Fe,De.highlightFormatting&&(de.formatting="link");var ut=ft(de);return ut?ut+=" ":ut="",ut+Te.linkEmail}if(De.xml&&mt==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Nt=me.string.indexOf(">",me.pos);if(Nt!=-1){var Gt=me.string.substring(me.start,Nt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Gt)&&(de.md_inside=!0)}return me.backUp(1),de.htmlState=ie.startState(Ze),Ue(me,de,at)}if(De.xml&&mt==="<"&&me.match(/^\/\w*?>/))return de.md_inside=!1,"tag";if(mt==="*"||mt==="_"){for(var se=1,te=me.pos==1?" ":me.string.charAt(me.pos-2);se<3&&me.eat(mt);)se++;var ee=me.peek()||" ",oe=!/\s/.test(ee)&&(!Ce.test(ee)||/\s/.test(te)||Ce.test(te)),ce=!/\s/.test(te)&&(!Ce.test(te)||/\s/.test(ee)||Ce.test(ee)),ne=null,Me=null;if(se%2&&(!de.em&&oe&&(mt==="*"||!ce||Ce.test(te))?ne=!0:de.em==mt&&ce&&(mt==="*"||!oe||Ce.test(ee))&&(ne=!1)),se>1&&(!de.strong&&oe&&(mt==="*"||!ce||Ce.test(te))?Me=!0:de.strong==mt&&ce&&(mt==="*"||!oe||Ce.test(ee))&&(Me=!1)),Me!=null||ne!=null){De.highlightFormatting&&(de.formatting=ne==null?"strong":Me==null?"em":"strong em"),ne===!0&&(de.em=mt),Me===!0&&(de.strong=mt);var $e=ft(de);return ne===!1&&(de.em=!1),Me===!1&&(de.strong=!1),$e}}else if(mt===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return ft(de);me.backUp(1)}if(De.strikethrough){if(mt==="~"&&me.eatWhile(mt)){if(de.strikethrough){De.highlightFormatting&&(de.formatting="strikethrough");var $e=ft(de);return de.strikethrough=!1,$e}else if(me.match(/^[^\s]/,!1))return de.strikethrough=!0,De.highlightFormatting&&(de.formatting="strikethrough"),ft(de)}else if(mt===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return ft(de);me.backUp(2)}}if(De.emoji&&mt===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){de.emoji=!0,De.highlightFormatting&&(de.formatting="emoji");var Je=ft(de);return de.emoji=!1,Je}return mt===" "&&(me.match(/^ +$/,!1)?de.trailingSpace++:de.trailingSpace&&(de.trailingSpaceNewLine=!0)),ft(de)}function Fe(me,de){var we=me.next();if(we===">"){de.f=de.inline=vt,De.highlightFormatting&&(de.formatting="link");var Pe=ft(de);return Pe?Pe+=" ":Pe="",Pe+Te.linkInline}return me.match(/^[^>]+/,!0),Te.linkInline}function lt(me,de){if(me.eatSpace())return null;var we=me.next();return we==="("||we==="["?(de.f=de.inline=st(we==="("?")":"]"),De.highlightFormatting&&(de.formatting="link-string"),de.linkHref=!0,ft(de)):"error"}var Ye={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function st(me){return function(de,we){var Pe=de.next();if(Pe===me){we.f=we.inline=vt,De.highlightFormatting&&(we.formatting="link-string");var mt=ft(we);return we.linkHref=!1,mt}return de.match(Ye[me]),we.linkHref=!0,ft(we)}}function Ve(me,de){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(de.f=jt,me.next(),De.highlightFormatting&&(de.formatting="link"),de.linkText=!0,ft(de)):He(me,de,vt)}function jt(me,de){if(me.match(/^\]:/,!0)){de.f=de.inline=si,De.highlightFormatting&&(de.formatting="link");var we=ft(de);return de.linkText=!1,we}return me.match(/^([^\]\\]|\\.)+/,!0),Te.linkText}function si(me,de){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?de.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),de.f=de.inline=vt,Te.linkHref+" url")}var ai={startState:function(){return{f:tt,prevLine:{stream:null},thisLine:{stream:null},block:tt,htmlState:null,indentation:0,inline:vt,text:qe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&ie.copyState(Ze,me.htmlState),indentation:me.indentation,localMode:me.localMode,localState:me.localMode?ie.copyState(me.localMode,me.localState):null,inline:me.inline,text:me.text,formatting:!1,linkText:me.linkText,linkTitle:me.linkTitle,linkHref:me.linkHref,code:me.code,em:me.em,strong:me.strong,strikethrough:me.strikethrough,emoji:me.emoji,header:me.header,setext:me.setext,hr:me.hr,taskList:me.taskList,list:me.list,listStack:me.listStack.slice(0),quote:me.quote,indentedCode:me.indentedCode,trailingSpace:me.trailingSpace,trailingSpaceNewLine:me.trailingSpaceNewLine,md_inside:me.md_inside,fencedEndRE:me.fencedEndRE}},token:function(me,de){if(de.formatting=!1,me!=de.thisLine.stream){if(de.header=0,de.hr=!1,me.match(/^\s*$/,!0))return rt(de),null;if(de.prevLine=de.thisLine,de.thisLine={stream:me},de.taskList=!1,de.trailingSpace=0,de.trailingSpaceNewLine=!1,!de.localState&&(de.f=de.block,de.f!=at)){var we=me.match(/^\s*/,!0)[0].replace(/\t/g,Oe).length;if(de.indentation=we,de.indentationDiff=null,we>0)return null}}return de.f(me,de)},innerMode:function(me){return me.block==at?{state:me.htmlState,mode:Ze}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:ai}},indent:function(me,de,we){return me.block==at&&Ze.indent?Ze.indent(me.htmlState,de,we):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,de,we):ie.Pass},blankLine:rt,getType:ft,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ai},"xml"),ie.defineMIME("text/markdown","markdown"),ie.defineMIME("text/x-markdown","markdown")})},98101:function(gt,wt,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 Ge=0;Ge<ie.modeInfo.length;Ge++){var De=ie.modeInfo[Ge];De.mimes&&(De.mime=De.mimes[0])}ie.findModeByMIME=function(Ze){Ze=Ze.toLowerCase();for(var xe=0;xe<ie.modeInfo.length;xe++){var ve=ie.modeInfo[xe];if(ve.mime==Ze)return ve;if(ve.mimes){for(var Te=0;Te<ve.mimes.length;Te++)if(ve.mimes[Te]==Ze)return ve}}if(/\+xml$/.test(Ze))return ie.findModeByMIME("application/xml");if(/\+json$/.test(Ze))return ie.findModeByMIME("application/json")},ie.findModeByExtension=function(Ze){Ze=Ze.toLowerCase();for(var xe=0;xe<ie.modeInfo.length;xe++){var ve=ie.modeInfo[xe];if(ve.ext){for(var Te=0;Te<ve.ext.length;Te++)if(ve.ext[Te]==Ze)return ve}}},ie.findModeByFileName=function(Ze){for(var xe=0;xe<ie.modeInfo.length;xe++){var ve=ie.modeInfo[xe];if(ve.file&&ve.file.test(Ze))return ve}var Te=Ze.lastIndexOf("."),Ie=Te>-1&&Ze.substring(Te+1,Ze.length);if(Ie)return ie.findModeByExtension(Ie)},ie.findModeByName=function(Ze){Ze=Ze.toLowerCase();for(var xe=0;xe<ie.modeInfo.length;xe++){var ve=ie.modeInfo[xe];if(ve.name.toLowerCase()==Ze)return ve;if(ve.alias){for(var Te=0;Te<ve.alias.length;Te++)if(ve.alias[Te].toLowerCase()==Ze)return ve}}}})},67549:function(gt,wt,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";ie.defineMode("stex",function(Ge,De){"use strict";function Ze(We,Le){We.cmdState.push(Le)}function xe(We){return We.cmdState.length>0?We.cmdState[We.cmdState.length-1]:null}function ve(We){var Le=We.cmdState.pop();Le&&Le.closeBracket()}function Te(We){for(var Le=We.cmdState,Ae=Le.length-1;Ae>=0;Ae--){var Ce=Le[Ae];if(Ce.name!="DEFAULT")return Ce}return{styleIdentifier:function(){return null}}}function Ie(We,Le,Ae){return function(){this.name=We,this.bracketNo=0,this.style=Le,this.styles=Ae,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ee={};Ee.importmodule=Ie("importmodule","tag",["string","builtin"]),Ee.documentclass=Ie("documentclass","tag",["","atom"]),Ee.usepackage=Ie("usepackage","tag",["atom"]),Ee.begin=Ie("begin","tag",["atom"]),Ee.end=Ie("end","tag",["atom"]),Ee.label=Ie("label","tag",["atom"]),Ee.ref=Ie("ref","tag",["atom"]),Ee.eqref=Ie("eqref","tag",["atom"]),Ee.cite=Ie("cite","tag",["atom"]),Ee.bibitem=Ie("bibitem","tag",["atom"]),Ee.Bibitem=Ie("Bibitem","tag",["atom"]),Ee.RBibitem=Ie("RBibitem","tag",["atom"]),Ee.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ne(We,Le){We.f=Le}function ze(We,Le){var Ae;if(We.match(/^\\[a-zA-Z@]+/)){var Ce=We.current().slice(1);return Ae=Ee.hasOwnProperty(Ce)?Ee[Ce]:Ee.DEFAULT,Ae=new Ae,Ze(Le,Ae),Ne(Le,pt),Ae.style}if(We.match(/^\\[$&%#{}_]/)||We.match(/^\\[,;!\/\\]/))return"tag";if(We.match("\\["))return Ne(Le,function(He,Ue){return je(He,Ue,"\\]")}),"keyword";if(We.match("\\("))return Ne(Le,function(He,Ue){return je(He,Ue,"\\)")}),"keyword";if(We.match("$$"))return Ne(Le,function(He,Ue){return je(He,Ue,"$$")}),"keyword";if(We.match("$"))return Ne(Le,function(He,Ue){return je(He,Ue,"$")}),"keyword";var Oe=We.next();if(Oe=="%")return We.skipToEnd(),"comment";if(Oe=="}"||Oe=="]"){if(Ae=xe(Le),Ae)Ae.closeBracket(Oe),Ne(Le,pt);else return"error";return"bracket"}else return Oe=="{"||Oe=="["?(Ae=Ee.DEFAULT,Ae=new Ae,Ze(Le,Ae),"bracket"):/\d/.test(Oe)?(We.eatWhile(/[\w.%]/),"atom"):(We.eatWhile(/[\w\-_]/),Ae=Te(Le),Ae.name=="begin"&&(Ae.argument=We.current()),Ae.styleIdentifier())}function je(We,Le,Ae){if(We.eatSpace())return null;if(Ae&&We.match(Ae))return Ne(Le,ze),"keyword";if(We.match(/^\\[a-zA-Z@]+/))return"tag";if(We.match(/^[a-zA-Z]+/))return"variable-2";if(We.match(/^\\[$&%#{}_]/)||We.match(/^\\[,;!\/]/)||We.match(/^[\^_&]/))return"tag";if(We.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(We.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var Ce=We.next();return Ce=="{"||Ce=="}"||Ce=="["||Ce=="]"||Ce=="("||Ce==")"?"bracket":Ce=="%"?(We.skipToEnd(),"comment"):"error"}function pt(We,Le){var Ae=We.peek(),Ce;return Ae=="{"||Ae=="["?(Ce=xe(Le),Ce.openBracket(Ae),We.eat(Ae),Ne(Le,ze),"bracket"):/[ \t\r]/.test(Ae)?(We.eat(Ae),null):(Ne(Le,ze),ve(Le),ze(We,Le))}return{startState:function(){var We=De.inMathMode?function(Le,Ae){return je(Le,Ae)}:ze;return{cmdState:[],f:We}},copyState:function(We){return{cmdState:We.cmdState.slice(),f:We.f}},token:function(We,Le){return Le.f(We,Le)},blankLine:function(We){We.f=ze,We.cmdState.length=0},lineComment:"%"}}),ie.defineMIME("text/x-stex","stex"),ie.defineMIME("text/x-latex","stex")})},15525:function(gt,wt,fe){(function(ie){ie(fe(89780))})(function(ie){"use strict";var Ge={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},De={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ie.defineMode("xml",function(Ze,xe){var ve=Ze.indentUnit,Te={},Ie=xe.htmlMode?Ge:De;for(var Ee in Ie)Te[Ee]=Ie[Ee];for(var Ee in xe)Te[Ee]=xe[Ee];var Ne,ze;function je(Fe,lt){function Ye(jt){return lt.tokenize=jt,jt(Fe,lt)}var st=Fe.next();if(st=="<")return Fe.eat("!")?Fe.eat("[")?Fe.match("CDATA[")?Ye(Le("atom","]]>")):null:Fe.match("--")?Ye(Le("comment","-->")):Fe.match("DOCTYPE",!0,!0)?(Fe.eatWhile(/[\w\._\-]/),Ye(Ae(1))):null:Fe.eat("?")?(Fe.eatWhile(/[\w\._\-]/),lt.tokenize=Le("meta","?>"),"meta"):(Ne=Fe.eat("/")?"closeTag":"openTag",lt.tokenize=pt,"tag bracket");if(st=="&"){var Ve;return Fe.eat("#")?Fe.eat("x")?Ve=Fe.eatWhile(/[a-fA-F\d]/)&&Fe.eat(";"):Ve=Fe.eatWhile(/[\d]/)&&Fe.eat(";"):Ve=Fe.eatWhile(/[\w\.\-:]/)&&Fe.eat(";"),Ve?"atom":"error"}else return Fe.eatWhile(/[^&<]/),null}je.isInText=!0;function pt(Fe,lt){var Ye=Fe.next();if(Ye==">"||Ye=="/"&&Fe.eat(">"))return lt.tokenize=je,Ne=Ye==">"?"endTag":"selfcloseTag","tag bracket";if(Ye=="=")return Ne="equals",null;if(Ye=="<"){lt.tokenize=je,lt.state=Ue,lt.tagName=lt.tagStart=null;var st=lt.tokenize(Fe,lt);return st?st+" tag error":"tag error"}else return/[\'\"]/.test(Ye)?(lt.tokenize=We(Ye),lt.stringStartCol=Fe.column(),lt.tokenize(Fe,lt)):(Fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function We(Fe){var lt=function(Ye,st){for(;!Ye.eol();)if(Ye.next()==Fe){st.tokenize=pt;break}return"string"};return lt.isInAttribute=!0,lt}function Le(Fe,lt){return function(Ye,st){for(;!Ye.eol();){if(Ye.match(lt)){st.tokenize=je;break}Ye.next()}return Fe}}function Ae(Fe){return function(lt,Ye){for(var st;(st=lt.next())!=null;){if(st=="<")return Ye.tokenize=Ae(Fe+1),Ye.tokenize(lt,Ye);if(st==">")if(Fe==1){Ye.tokenize=je;break}else return Ye.tokenize=Ae(Fe-1),Ye.tokenize(lt,Ye)}return"meta"}}function Ce(Fe,lt,Ye){this.prev=Fe.context,this.tagName=lt,this.indent=Fe.indented,this.startOfLine=Ye,(Te.doNotIndent.hasOwnProperty(lt)||Fe.context&&Fe.context.noIndent)&&(this.noIndent=!0)}function Oe(Fe){Fe.context&&(Fe.context=Fe.context.prev)}function He(Fe,lt){for(var Ye;;){if(!Fe.context||(Ye=Fe.context.tagName,!Te.contextGrabbers.hasOwnProperty(Ye)||!Te.contextGrabbers[Ye].hasOwnProperty(lt)))return;Oe(Fe)}}function Ue(Fe,lt,Ye){return Fe=="openTag"?(Ye.tagStart=lt.column(),nt):Fe=="closeTag"?rt:Ue}function nt(Fe,lt,Ye){return Fe=="word"?(Ye.tagName=lt.current(),ze="tag",Et):Te.allowMissingTagName&&Fe=="endTag"?(ze="tag bracket",Et(Fe,lt,Ye)):(ze="error",nt)}function rt(Fe,lt,Ye){if(Fe=="word"){var st=lt.current();return Ye.context&&Ye.context.tagName!=st&&Te.implicitlyClosed.hasOwnProperty(Ye.context.tagName)&&Oe(Ye),Ye.context&&Ye.context.tagName==st||Te.matchClosing===!1?(ze="tag",tt):(ze="tag error",at)}else return Te.allowMissingTagName&&Fe=="endTag"?(ze="tag bracket",tt(Fe,lt,Ye)):(ze="error",at)}function tt(Fe,lt,Ye){return Fe!="endTag"?(ze="error",tt):(Oe(Ye),Ue)}function at(Fe,lt,Ye){return ze="error",tt(Fe,lt,Ye)}function Et(Fe,lt,Ye){if(Fe=="word")return ze="attribute",ft;if(Fe=="endTag"||Fe=="selfcloseTag"){var st=Ye.tagName,Ve=Ye.tagStart;return Ye.tagName=Ye.tagStart=null,Fe=="selfcloseTag"||Te.autoSelfClosers.hasOwnProperty(st)?He(Ye,st):(He(Ye,st),Ye.context=new Ce(Ye,st,Ve==Ye.indented)),Ue}return ze="error",Et}function ft(Fe,lt,Ye){return Fe=="equals"?qe:(Te.allowMissing||(ze="error"),Et(Fe,lt,Ye))}function qe(Fe,lt,Ye){return Fe=="string"?vt:Fe=="word"&&Te.allowUnquoted?(ze="string",Et):(ze="error",Et(Fe,lt,Ye))}function vt(Fe,lt,Ye){return Fe=="string"?vt:Et(Fe,lt,Ye)}return{startState:function(Fe){var lt={tokenize:je,state:Ue,indented:Fe||0,tagName:null,tagStart:null,context:null};return Fe!=null&&(lt.baseIndent=Fe),lt},token:function(Fe,lt){if(!lt.tagName&&Fe.sol()&&(lt.indented=Fe.indentation()),Fe.eatSpace())return null;Ne=null;var Ye=lt.tokenize(Fe,lt);return(Ye||Ne)&&Ye!="comment"&&(ze=null,lt.state=lt.state(Ne||Ye,Fe,lt),ze&&(Ye=ze=="error"?Ye+" error":ze)),Ye},indent:function(Fe,lt,Ye){var st=Fe.context;if(Fe.tokenize.isInAttribute)return Fe.tagStart==Fe.indented?Fe.stringStartCol+1:Fe.indented+ve;if(st&&st.noIndent)return ie.Pass;if(Fe.tokenize!=pt&&Fe.tokenize!=je)return Ye?Ye.match(/^(\s*)/)[0].length:0;if(Fe.tagName)return Te.multilineTagIndentPastTag!==!1?Fe.tagStart+Fe.tagName.length+2:Fe.tagStart+ve*(Te.multilineTagIndentFactor||1);if(Te.alignCDATA&&/<!\[CDATA\[/.test(lt))return 0;var Ve=lt&&/^<(\/)?([\w_:\.-]*)/.exec(lt);if(Ve&&Ve[1])for(;st;)if(st.tagName==Ve[2]){st=st.prev;break}else if(Te.implicitlyClosed.hasOwnProperty(st.tagName))st=st.prev;else break;else if(Ve)for(;st;){var jt=Te.contextGrabbers[st.tagName];if(jt&&jt.hasOwnProperty(Ve[2]))st=st.prev;else break}for(;st&&st.prev&&!st.startOfLine;)st=st.prev;return st?st.indent+ve:Fe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Te.htmlMode?"html":"xml",helperType:Te.htmlMode?"html":"xml",skipAttribute:function(Fe){Fe.state==qe&&(Fe.state=Et)},xmlCurrentTag:function(Fe){return Fe.tagName?{name:Fe.tagName,close:Fe.type=="closeTag"}:null},xmlCurrentContext:function(Fe){for(var lt=[],Ye=Fe.context;Ye;Ye=Ye.prev)Ye.tagName&<.push(Ye.tagName);return lt.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(gt,wt,fe){"use strict";fe.d(wt,{hP:function(){return Gt}});var ie=function(se,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var ce in oe)Object.prototype.hasOwnProperty.call(oe,ce)&&(ee[ce]=oe[ce])})(se,te)};function Ge(se,te){function ee(){this.constructor=se}ie(se,te),se.prototype=te===null?Object.create(te):(ee.prototype=te.prototype,new ee)}function De(se,te,ee,oe){return new(ee||(ee=Promise))(function(ce,ne){function Me(bt){try{At(oe.next(bt))}catch(It){ne(It)}}function Je(bt){try{At(oe.throw(bt))}catch(It){ne(It)}}function At(bt){var It;bt.done?ce(bt.value):(It=bt.value,It instanceof ee?It:new ee(function(ei){ei(It)})).then(Me,Je)}At((oe=oe.apply(se,te||[])).next())})}function Ze(se,te){var ee,oe,ce,ne,Me={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[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(At){return function(bt){return function(It){if(ee)throw new TypeError("Generator is already executing.");for(;Me;)try{if(ee=1,oe&&(ce=2&It[0]?oe.return:It[0]?oe.throw||((ce=oe.return)&&ce.call(oe),0):oe.next)&&!(ce=ce.call(oe,It[1])).done)return ce;switch(oe=0,ce&&(It=[2&It[0],ce.value]),It[0]){case 0:case 1:ce=It;break;case 4:return Me.label++,{value:It[1],done:!1};case 5:Me.label++,oe=It[1],It=[0];continue;case 7:It=Me.ops.pop(),Me.trys.pop();continue;default:if(ce=Me.trys,!((ce=ce.length>0&&ce[ce.length-1])||It[0]!==6&&It[0]!==2)){Me=0;continue}if(It[0]===3&&(!ce||It[1]>ce[0]&&It[1]<ce[3])){Me.label=It[1];break}if(It[0]===6&&Me.label<ce[1]){Me.label=ce[1],ce=It;break}if(ce&&Me.label<ce[2]){Me.label=ce[2],Me.ops.push(It);break}ce[2]&&Me.ops.pop(),Me.trys.pop();continue}It=te.call(se,Me)}catch(ei){It=[6,ei],oe=0}finally{ee=ce=0}if(5&It[0])throw It[1];return{value:It[0]?It[1]:void 0,done:!0}}([At,bt])}}}function xe(){for(var se=0,te=0,ee=arguments.length;te<ee;te++)se+=arguments[te].length;var oe=Array(se),ce=0;for(te=0;te<ee;te++)for(var ne=arguments[te],Me=0,Je=ne.length;Me<Je;Me++,ce++)oe[ce]=ne[Me];return oe}var ve=function(){function se(){}return se.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},se.setAttributes=function(te,ee){for(var oe=0,ce=ee;oe<ce.length;oe++){var ne=ce[oe],Me=ne[0],Je=ne[1];te.setAttribute(Me,Je)}},se.createRect=function(te,ee,oe){var ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return ce.setAttribute("width",te.toString()),ce.setAttribute("height",ee.toString()),oe&&se.setAttributes(ce,oe),ce},se.createLine=function(te,ee,oe,ce,ne){var Me=document.createElementNS("http://www.w3.org/2000/svg","line");return Me.setAttribute("x1",te.toString()),Me.setAttribute("y1",ee.toString()),Me.setAttribute("x2",oe.toString()),Me.setAttribute("y2",ce.toString()),ne&&se.setAttributes(Me,ne),Me},se.createPolygon=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",te),ee&&se.setAttributes(oe,ee),oe},se.createCircle=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(te/2).toString()),oe.setAttribute("cy",(te/2).toString()),oe.setAttribute("r",te.toString()),ee&&se.setAttributes(oe,ee),oe},se.createEllipse=function(te,ee,oe){var ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ce.setAttribute("cx",(te/2).toString()),ce.setAttribute("cy",(ee/2).toString()),ce.setAttribute("rx",(te/2).toString()),ce.setAttribute("ry",(ee/2).toString()),oe&&se.setAttributes(ce,oe),ce},se.createGroup=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return te&&se.setAttributes(ee,te),ee},se.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},se.createMarker=function(te,ee,oe,ce,ne,Me,Je){var At=document.createElementNS("http://www.w3.org/2000/svg","marker");return se.setAttributes(At,[["id",te],["orient",ee],["markerWidth",oe.toString()],["markerHeight",ce.toString()],["refX",ne.toString()],["refY",Me.toString()]]),At.appendChild(Je),At},se.createText=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),te&&se.setAttributes(ee,te),ee},se.createTSpan=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=te,ee&&se.setAttributes(oe,ee),oe},se.createImage=function(te){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return te&&se.setAttributes(ee,te),ee},se.createPoint=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=te,oe.y=ee,oe},se.createPath=function(te,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",te),ee&&se.setAttributes(oe,ee),oe},se}(),Te=function(){function se(){}return se.addKey=function(te){se.key=te},Object.defineProperty(se,"isLicensed",{get:function(){return!!se.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(se.key)},enumerable:!1,configurable:!0}),se}(),Ie=function(){function se(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return se.prototype.rasterize=function(te,ee,oe){var ce=this;return new Promise(function(ne){var Me=oe!==void 0?oe:document.createElement("canvas");te===null&&(ce.markersOnly=!0,ce.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",ee.width.baseVal.valueAsString),Je.setAttribute("height",ee.height.baseVal.valueAsString),Je.setAttribute("viewBox","0 0 "+ee.viewBox.baseVal.width.toString()+" "+ee.viewBox.baseVal.height.toString()),Je.innerHTML=ee.innerHTML,ce.naturalSize===!0?(Je.width.baseVal.value=te.naturalWidth,Je.height.baseVal.value=te.naturalHeight):ce.width!==void 0&&ce.height!==void 0&&(Je.width.baseVal.value=ce.width,Je.height.baseVal.value=ce.height),Me.width=Je.width.baseVal.value,Me.height=Je.height.baseVal.value;var At=Je.outerHTML,bt=Me.getContext("2d");ce.markersOnly!==!0&&bt.drawImage(te,0,0,Me.width,Me.height);var It=window.URL,ei=new Image(Me.width,Me.height);ei.setAttribute("crossOrigin","anonymous");var Vt=new Blob([At],{type:"image/svg+xml"}),Ut=It.createObjectURL(Vt);ei.onload=function(){bt.drawImage(ei,0,0),It.revokeObjectURL(Ut);var Ei=Me.toDataURL(ce.imageType,ce.imageQuality);ne(Ei)},ei.src=Ut})},se}(),Ee=function(){},Ne=function(){function se(te){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+te+"_"}return Object.defineProperty(se.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),se.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},se.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)},se.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 ze("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ze("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new ze("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new je("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new je("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},se.prototype.removeStyleSheet=function(){var te;this.styleSheet&&(((te=this.styleSheetRoot)!==null&&te!==void 0?te:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},se}(),ze=function(se,te){this.selector=se,this.style=te},je=function(se,te){this.localName=se,this.style=te},pt=function(){function se(te,ee,oe,ce,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=te,this.displayMode=ee,this.markerItems=oe,this.uiStyleSettings=ce,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return se.prototype.show=function(te){var ee=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ne){var Me=document.createElement("div");Me.className=""+ee.toolbarButtonStyleClass.name,Me.setAttribute("data-type-name",ne.typeName),Me.innerHTML=ne.icon,Me.addEventListener("click",function(){ee.markerToolbarButtonClicked(Me,ne)}),ee.buttons.push(Me),ee.markerButtons.push(Me)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var ce=document.createElement("div");ce.className=this.toolbarBlockStyleClass.name,ce.style.whiteSpace="nowrap",ce.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ce),this.addActionButton(ce,'<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(ce,'<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()},se.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},se.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ee=0;ee<this.markerButtons.length;ee++)ee<te||ee===te&&this.markerButtons.length-1===te?this.markerButtonBlock.appendChild(this.markerButtons[ee]):(ee===te&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ee]))}},se.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")},se.prototype.resetButtonStyles=function(){var te=this;this.buttons.forEach(function(ee){ee.className=ee.className.replace(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name,"").trim(),ee.className=ee.className.replace(te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?te.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:te.toolbarActiveButtonStyleColorsClass.name,"").trim(),ee.className+=" "+(te.uiStyleSettings.toolbarButtonStyleColorsClassName?te.uiStyleSettings.toolbarButtonStyleColorsClassName:te.toolbarButtonStyleColorsClass.name)})},se.prototype.addActionButton=function(te,ee,oe){var ce=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=ee,ne.setAttribute("data-action",oe),ne.addEventListener("click",function(){ce.actionToolbarButtonClicked(ne,oe)}),oe){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)},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new je("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 je("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new je("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new je("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 je("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var te=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new je("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 je("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new je("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new ze("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new ze("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},se.prototype.markerToolbarButtonClicked=function(te,ee){this.setActiveButton(te),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("marker",ee)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(te,ee){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(oe){return oe("action",ee)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.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)},se.prototype.setActiveMarkerButton=function(te){var ee=this.markerButtons.find(function(oe){return oe.getAttribute("data-type-name")===te});ee&&this.setActiveButton(ee)},se.prototype.setCurrentMarker=function(te){var ee=this;this.currentMarker=te,this.buttons.filter(function(oe){return/delete|notes/.test(oe.getAttribute("data-action"))}).forEach(function(oe){ee.currentMarker===void 0?(oe.style.fillOpacity="0.4",oe.style.pointerEvents="none"):(oe.style.fillOpacity="1",oe.style.pointerEvents="all")})},se}(),We=function(){function se(te,ee,oe,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=ee,this.uiStyleSettings=oe,this.styles=ce,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new je("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 je("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var ee=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new je("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new je("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new je("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 je("toolbox-panel-row_colors",`
|
|
background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new je("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ee)+`px;
|
|
padding: `+ee+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new je("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new je("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new ze("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new ze("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},se.prototype.show=function(te){var ee;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(te){var ee,oe,ce=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&oe!==void 0?oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var Me;ne.uiStyleSettings=ce.uiStyleSettings;var Je=document.createElement("div");Je.className=ce.toolboxButtonStyleClass.name+" "+((Me=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Me!==void 0?Me:ce.toolboxButtonStyleColorsClass.name),Je.innerHTML=ne.icon,Je.title=ne.title,Je.addEventListener("click",function(){ce.panelButtonClick(ne)}),ce.panelButtons.push(Je),ce.buttonRow.appendChild(Je)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(te){var ee=this,oe=-1;if(te!==this.activePanel){oe=this.panels.indexOf(te),this.panelRow.innerHTML="";var ce=te.getUi();ce.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ce),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ee.displayMode==="inline"?ee.panelRow.style.display="none":ee.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,Me){var Je,At;ne.className=ee.toolboxButtonStyleClass.name+" "+(Me===oe?""+((Je=ee.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Je!==void 0?Je:ee.toolboxActiveButtonStyleColorsClass.name):""+((At=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&At!==void 0?At:ee.toolboxButtonStyleColorsClass.name))})},se}(),Le=function(se,te){this.title=se,this.icon=te},Ae=function(se){function te(ee,oe,ce,ne){var Me=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Me.colors=[],Me.addTransparent=!1,Me.colorBoxes=[],Me.colors=oe,Me.currentColor=ce,Me.setCurrentColor=Me.setCurrentColor.bind(Me),Me.getColorBox=Me.getColorBox.bind(Me),Me}return Ge(te,se),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var ne=ee.getColorBox(ce);oe.appendChild(ne),ee.colorBoxes.push(ne)}),oe},te.prototype.getColorBox=function(ee){var oe=this,ce=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ce,Me=document.createElement("div");Me.style.display="inline-block",Me.style.boxSizing="content-box",Me.style.width=ne-2+"px",Me.style.height=ne-2+"px",Me.style.padding="1px",Me.style.marginRight="2px",Me.style.marginBottom="2px",Me.style.borderWidth="2px",Me.style.borderStyle="solid",Me.style.borderRadius=(ne+2)/2+"px",Me.style.borderColor=ee===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Me.addEventListener("click",function(){oe.setCurrentColor(ee,Me)});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=ee,Je.style.borderRadius=ne/2+"px",ee==="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>`),Me.appendChild(Je),Me},te.prototype.setCurrentColor=function(ee,oe){var ce=this;this.currentColor=ee,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ee)},te}(Le),Ce=function(){function se(te,ee,oe){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=ee,this.globalSettings=oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(te){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(te,ee){},se.prototype.dblClick=function(te,ee){},se.prototype.manipulate=function(te){},se.prototype.pointerUp=function(te){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},se.prototype.scale=function(te,ee){},se.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},se.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},se.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)}},se.typeName="MarkerBase",se}(),Oe=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.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},se}(),He=function(){function se(){this.GRIP_SIZE=10,this.visual=ve.createGroup(),this.visual.appendChild(ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ve.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},se}(),Ue=function(){function se(){}return se.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},se.toSVGMatrix=function(te,ee){return te.a=ee.a,te.b=ee.b,te.c=ee.c,te.d=ee.d,te.e=ee.e,te.f=ee.f,te},se}(),nt=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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(ve.createTransform()),ne.setupControlBox(),ne}return Ge(te,se),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(ee){this._visual=ee;var oe=ve.createTransform();this._visual.transform.baseVal.appendItem(oe)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!!se.prototype.ownsTarget.call(this,ee)||!!(this.controlGrips.findGripByVisual(ee)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee))},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.left=ee.x,this.top=ee.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint(ee);if(this.manipulationStartX=ce.x,this.manipulationStartY=ce.y,this.offsetX=ce.x-this.left,this.offsetY=ce.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(oe)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Me=this.container.transform.baseVal.getItem(0);Me.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Me,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(ee){var oe=this.state;se.prototype.pointerUp.call(this,ee),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(ee){this.visual.style.transform="translate("+ee.x+"px, "+ee.y+"px)"},te.prototype.manipulate=function(ee){var oe=this.unrotatePoint(ee);this.state==="creating"?this.resize(ee):this.state==="move"?(this.left=this.manipulationStartLeft+(oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(oe):this.state==="rotate"&&this.rotate(ee)},te.prototype.resize=function(ee){var oe=this.manipulationStartLeft,ce=this.manipulationStartWidth,ne=this.manipulationStartTop,Me=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:oe=this.manipulationStartLeft+ee.x-this.manipulationStartX,ce=this.manipulationStartWidth+this.manipulationStartLeft-oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ce=this.manipulationStartWidth+ee.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+ee.y-this.manipulationStartY,Me=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Me=this.manipulationStartHeight+ee.y-this.manipulationStartY}ce>=0?(this.left=oe,this.width=ce):(this.left=oe+ce,this.width=-ce),Me>=0?(this.top=ne,this.height=Me):(this.top=ne+Me,this.height=-Me),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(ee){if(Math.abs(ee.x-this.centerX)>.1){var oe=Math.sign(ee.x-this.centerX);this.rotationAngle=180*Math.atan((ee.y-this.centerY)/(ee.x-this.centerX))/Math.PI+90*oe,this.applyRotation()}},te.prototype.applyRotation=function(){var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0)},te.prototype.rotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM(),ce=ve.createPoint(ee.x,ee.y);return{x:(ce=ce.matrixTransform(oe)).x,y:ce.y}},te.prototype.unrotatePoint=function(ee){if(this.rotationAngle===0)return ee;var oe=this.container.getCTM();oe=oe.inverse();var ce=ve.createPoint(ee.x,ee.y);return{x:(ce=ce.matrixTransform(oe)).x,y:ce.y}},te.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ve.createGroup();var ee=ve.createTransform();ee.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ee),this.container.appendChild(this.controlBox),this.controlRect=ve.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=ve.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 Oe,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var ee=this.controlBox.transform.baseVal.getItem(0);ee.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ee,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var ee=new He;return ee.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.controlGrips.topLeft.GRIP_SIZE,oe=-ee/2,ce=oe,ne=(this.width+this.CB_DISTANCE)/2-ee/2,Me=(this.height+this.CB_DISTANCE)/2-ee/2,Je=this.height+this.CB_DISTANCE-ee/2,At=this.width+this.CB_DISTANCE-ee/2;this.positionGrip(this.controlGrips.topLeft.visual,oe,ce),this.positionGrip(this.controlGrips.topCenter.visual,ne,ce),this.positionGrip(this.controlGrips.topRight.visual,At,ce),this.positionGrip(this.controlGrips.centerLeft.visual,oe,Me),this.positionGrip(this.controlGrips.centerRight.visual,At,Me),this.positionGrip(this.controlGrips.bottomLeft.visual,oe,Je),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Je),this.positionGrip(this.controlGrips.bottomRight.visual,At,Je),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ce-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(ee,oe,ce){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(oe,ce),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ue.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ue.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var oe=ee;this.left=oe.left,this.top=oe.top,this.width=oe.width,this.height=oe.height,this.rotationAngle=oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,oe.containerTransformMatrix))},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe);var ce=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ce.x*ee,y:ce.y*oe});this.left=ne.x,this.top=ne.y,this.width=this.width*ee,this.height=this.height*oe,this.adjustControlBox()},te}(Ce),rt=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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 Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=ve.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){se.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&ve.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},se.prototype.getState.call(this))},te.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),this.setSize()},te.title="Rectangle marker",te}(nt),tt=function(se){function te(ee,oe,ce,ne){var Me=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Me.widths=[],Me.widthBoxes=[],Me.widths=oe,Me.currentWidth=ce,Me.setCurrentWidth=Me.setCurrentWidth.bind(Me),Me}return Ge(te,se),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.widths.forEach(function(ce){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=ce===ee.currentWidth?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentWidth(ce,ne)}),oe.appendChild(ne);var Me=document.createElement("div");Me.innerText=ce.toString(),Me.style.marginRight="5px",ne.appendChild(Me);var Je=document.createElement("div");Je.style.minHeight="20px",Je.style.flexGrow="2",Je.style.display="flex",Je.style.alignItems="center";var At=document.createElement("hr");At.style.minWidth="20px",At.style.border="0px",At.style.borderTop=ce+"px solid "+ee.uiStyleSettings.toolboxColor,At.style.flexGrow="2",Je.appendChild(At),ne.appendChild(Je),ee.widthBoxes.push(ne)}),oe},te.prototype.setCurrentWidth=function(ee,oe){var ce=this;this.currentWidth=ee,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Le),at=function(se){function te(ee,oe,ce,ne){var Me=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Me.styles=[],Me.styleBoxes=[],Me.styles=oe,Me.currentStyle=ce,Me.setCurrentStyle=Me.setCurrentStyle.bind(Me),Me}return Ge(te,se),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",this.styles.forEach(function(ce){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/ee.styles.length-5+"%",ne.style.borderColor=ce===ee.currentStyle?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentStyle(ce,ne)}),oe.appendChild(ne);var Me=document.createElement("div");Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.overflow="hidden";var Je=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ee.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ce!==""?'stroke-dasharray="'+ce+'"':"")+` />
|
|
</svg>`;Me.innerHTML=Je,ne.appendChild(Me),ee.styleBoxes.push(ne)}),oe},te.prototype.setCurrentStyle=function(ee,oe){var ce=this;this.currentStyle=ee,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Le),Et=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||this;return ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new Ae("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new tt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new at("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ge(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="FrameMarker",te.title="Frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',te}(rt),ft=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"},qe=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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 Ge(te,se),te.prototype.ownsTarget=function(ee){return!!se.prototype.ownsTarget.call(this,ee)||!(!this.grip1.ownsTarget(ee)&&!this.grip2.ownsTarget(ee))},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.state==="new"&&(this.x1=ee.x,this.y1=ee.y,this.x2=ee.x,this.y2=ee.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(ee){var oe=this.state;se.prototype.pointerUp.call(this,ee),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(ee),this._state="select",oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(ee){this.state==="creating"?this.resize(ee):this.state==="move"?(this.x1=this.manipulationStartX1+ee.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ee.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ee.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ee.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ee)},te.prototype.resize=function(ee){switch(this.activeGrip){case this.grip1:this.x1=ee.x,this.y1=ee.y;break;case this.grip2:case void 0:this.x2=ee.x,this.y2=ee.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ve.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var ee=new He;return ee.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(ee.visual),ee},te.prototype.positionGrips=function(){var ee=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ee/2,this.y1-ee/2),this.positionGrip(this.grip2.visual,this.x2-ee/2,this.y2-ee/2)},te.prototype.positionGrip=function(ee,oe,ce){var ne=ee.transform.baseVal.getItem(0);ne.setTranslate(oe,ce),ee.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var oe=ee;this.x1=oe.x1,this.y1=oe.y1,this.x2=oe.x2,this.y2=oe.y2},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),this.x1=this.x1*ee,this.y1=this.y1*oe,this.x2=this.x2*ee,this.y2=this.y2*oe,this.adjustVisual(),this.adjustControlBox()},te}(Ce),vt=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new Ae("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new tt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new at("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorLine&&ee!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorLine=ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),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()),ve.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var oe=ee;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.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}(qe),Fe=function(se){function te(ee,oe,ce,ne){var Me=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Me.fonts=[],Me.fontBoxes=[],Me.fonts=oe,Me.currentFont=ce,Me.setCurrentFont=Me.setCurrentFont.bind(Me),Me}return Ge(te,se),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.overflow="hidden",oe.style.flexGrow="2",this.fonts.forEach(function(ce){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/ee.fonts.length-5+"%",ne.style.borderColor=ce===ee.currentFont?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentFont(ce,ne)}),oe.appendChild(ne);var Me=document.createElement("div");Me.style.display="flex",Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.fontFamily=ce,Me.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",Me.appendChild(Je),ne.appendChild(Me),ee.fontBoxes.push(ne)}),oe},te.prototype.setCurrentFont=function(ee,oe){var ce=this;this.currentFont=ee,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Le),lt=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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=ce.defaultColor,ne.fontFamily=ce.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 Ae("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Fe("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){if(se.prototype.ownsTarget.call(this,ee)||ee===this.visual||ee===this.textElement||ee===this.bgRectangle)return!0;var oe=!1;return this.textElement.childNodes.forEach(function(ce){ce===ee&&(oe=!0)}),oe},te.prototype.createVisual=function(){this.visual=ve.createGroup(),this.bgRectangle=ve.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ve.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.renderText=function(){var ee=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(oe){ee.textElement.appendChild(ve.createTSpan(oe.trim()===""?" ":oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var ee=this.textElement.getBBox(),oe=1;if(ee.width>0&&ee.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/ee.width,ne=(1*this.height-this.height*this.padding*2/100)/ee.height;oe=Math.min(ce,ne)}return oe},te.prototype.getTextPosition=function(ee){var oe=this.textElement.getBBox(),ce=0,ne=0;return oe.width>0&&oe.height>0&&(ce=(this.width-oe.width*ee)/2,ne=this.height/2-oe.height*ee/2),{x:ce,y:ne}},te.prototype.sizeText=function(){var ee=this.textElement.getBBox(),oe=this.getTextScale(),ce=this.getTextPosition(oe);ce.y-=ee.y*oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ce.x+"px, "+ce.y+"px) scale("+oe+", "+oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ce.x,ce.y),this.textElement.transform.baseVal.getItem(1).setScale(oe,oe))},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(ee){var oe=this.state;oe==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,ee),this.setSize(),(oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var oe=Number.parseFloat(ee.textEditor.style.fontSize);ee.textEditor.clientWidth>=Number.parseInt(ee.textEditor.style.maxWidth)&&oe>.9;)oe-=.1,ee.textEditor.style.fontSize=Math.max(oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(oe){if(oe.clipboardData){var ce=oe.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ce)),oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ee.textEditDivClicked(ee.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ee=this.getTextScale(),oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),ne={x:ce.width*ee,y:ce.height*ee};oe.x-=ne.x/2,oe.y-=ne.y/2,this.textEditor.style.top=oe.y+"px",this.textEditor.style.left=oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-oe.x+"px",this.textEditor.style.fontSize=Math.max(16*ee,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(ee){this.text=ee.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},te.prototype.dblClick=function(ee,oe){se.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},te.prototype.setColor=function(ee){this.textElement&&ve.setAttributes(this.textElement,[["fill",ee]]),this.color=ee,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ee)},te.prototype.setFont=function(ee){this.textElement&&ve.setAttributes(this.textElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.color=oe.color,this.fontFamily=oe.fontFamily,this.padding=oe.padding,this.text=oe.text,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),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}(nt),Ye=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ce.defaultColor,ne.lineWidth=ce.defaultStrokeWidth,ne.pixelRatio=ce.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 Ae("Color",ce.defaultColorSet,ce.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new tt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ve.createGroup(),this.drawingImage=ve.createImage(),this.visual.appendChild(this.drawingImage);var ee=ve.createTransform();this.visual.transform.baseVal.appendItem(ee),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(ee.x,ee.y),this.drawing=!0):se.prototype.pointerDown.call(this,ee,oe)},te.prototype.manipulate=function(ee){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ee.x,ee.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(ee){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,ee)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var ee=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ce=oe[0],ne=oe[1],Me=oe[2],Je=oe[3],At=!1,bt=0;bt<this.canvasElement.height;bt++)for(var It=0;It<this.canvasElement.width;It++)ee.data[bt*this.canvasElement.width*4+4*It+3]>0&&(At=!0,bt<ne&&(ne=bt),It<ce&&(ce=It),bt>Je&&(Je=bt),It>Me&&(Me=It));if(At){this.left=ce/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(Me-ce)/this.pixelRatio,this.height=(Je-ne)/this.pixelRatio;var ei=document.createElement("canvas");ei.width=Me-ce,ei.height=Je-ne,ei.getContext("2d").putImageData(this.canvasContext.getImageData(ce,ne,Me-ce,Je-ne),0,0),this.drawingImgUrl=ei.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(ee){this.color=ee,this.colorChanged(ee)},te.prototype.setLineWidth=function(ee){this.lineWidth=ee},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){this.createVisual(),se.prototype.restoreState.call(this,ee),this.drawingImgUrl=ee.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),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}(nt),st=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,ce||'<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=oe,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Ge(te,se),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2";for(var ce=function(Je){var At="both";switch(Je){case 0:At="both";break;case 1:At="start";break;case 2:At="end";break;case 3:At="none"}var bt=document.createElement("div");if(bt.style.display="flex",bt.style.flexGrow="2",bt.style.alignItems="center",bt.style.justifyContent="space-between",bt.style.padding="5px",bt.style.borderWidth="2px",bt.style.borderStyle="solid",bt.style.borderColor=At===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",bt.addEventListener("click",function(){ee.setCurrentType(At,bt)}),oe.appendChild(bt),At==="both"||At==="start"){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,It.style.marginLeft="5px",bt.appendChild(It)}var ei=document.createElement("div");ei.style.display="flex",ei.style.alignItems="center",ei.style.minHeight="20px",ei.style.flexGrow="2";var Vt=document.createElement("hr");if(Vt.style.minWidth="20px",Vt.style.border="0px",Vt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Vt.style.flexGrow="2",ei.appendChild(Vt),bt.appendChild(ei),At==="both"||At==="end"){var Ut=document.createElement("div");Ut.style.display="flex",Ut.style.alignItems="center",Ut.style.minHeight="20px",Ut.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>`,Ut.style.marginRight="5px",bt.appendChild(Ut)}ne.typeBoxes.push(bt)},ne=this,Me=0;Me<4;Me++)ce(Me);return oe},te.prototype.setCurrentType=function(ee,oe){var ce=this;this.currentType=ee,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ce.uiStyleSettings!==void 0?ce.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Le),Ve=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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 st("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.arrow1&&ee!==this.arrow2)},te.prototype.getArrowPoints=function(ee,oe){var ce=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return ee-ce/2+","+(oe+ne/2)+" "+ee+","+(oe-ne/2)+" "+(ee+ce/2)+","+(oe+ne/2)},te.prototype.createTips=function(){this.arrow1=ve.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ve.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(se.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",ve.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ve.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ee=0;Math.abs(this.x1-this.x2)>.1&&(ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var oe=this.arrow1.transform.baseVal.getItem(0);oe.setRotate(ee,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(oe,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate(ee+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},te.prototype.setArrowType=function(ee){this.arrowType=ee,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var oe=ee;this.arrowType=oe.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}(vt),jt=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||this;return ne.fillColor=ce.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Ae("Color",ce.defaultColorSet,ce.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Ge(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="CoverMarker",te.title="Cover marker",te.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',te}(rt),si=function(se){function te(ee,oe,ce,ne){var Me=se.call(this,ee,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Me.opacities=[],Me.opacityBoxes=[],Me.opacities=oe,Me.currentOpacity=ce,Me.setCurrentOpacity=Me.setCurrentOpacity.bind(Me),Me}return Ge(te,se),te.prototype.getUi=function(){var ee=this,oe=document.createElement("div");return oe.style.display="flex",oe.style.overflow="hidden",oe.style.flexGrow="2",oe.style.justifyContent="space-between",this.opacities.forEach(function(ce){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=ce===ee.currentOpacity?ee.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){ee.setCurrentOpacity(ce,ne)}),oe.appendChild(ne);var Me=document.createElement("div");Me.innerText=100*ce+"%",ne.appendChild(Me),ee.opacityBoxes.push(ne)}),oe},te.prototype.setCurrentOpacity=function(ee,oe){var ce=this;this.currentOpacity=ee,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===oe?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Le),ai=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ce.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ce.defaultHighlightOpacity,ne.fillPanel=new Ae("Color",ce.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new si("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Ge(te,se),te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',te}(jt),me='<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>',de='<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>',we=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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=ce.defaultStrokeColor,ne.bgColor=ce.defaultFillColor,ne.fontFamily=ce.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 Ae("Text color",ce.defaultColorSet,ne.color,me),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Ae("Fill color",ce.defaultColorSet,ne.bgColor,de),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Fe("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new He,ne.tipGrip.visual.transform.baseVal.appendItem(ve.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return se.prototype.ownsTarget.call(this,ee)||this.tipGrip.ownsTarget(ee)||this.tip===ee},te.prototype.createTip=function(){ve.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ve.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(ee,oe){this.state==="new"&&se.prototype.pointerDown.call(this,ee,oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,ee,oe)},te.prototype.pointerUp=function(ee){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,ee);else{var oe=this.state==="creating";se.prototype.pointerUp.call(this,ee),this.setTipPoints(oe),this.positionTip()}},te.prototype.manipulate=function(ee){if(this.tipMoving){var oe=this.unrotatePoint(ee);this.tipPosition={x:oe.x-this.manipulationStartLeft,y:oe.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,ee)},te.prototype.setBgColor=function(ee){this.bgRectangle&&this.tip&&(ve.setAttributes(this.bgRectangle,[["fill",ee]]),ve.setAttributes(this.tip,[["fill",ee]])),this.bgColor=ee,this.fillColorChanged(ee)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(ee){ee===void 0&&(ee=!1);var oe=Math.min(this.height/2,15),ce=this.height/5;ee&&(this.tipPosition={x:oe+ce/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))?(ce=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:0},this.tipBase2Position={x:oe+ce,y:0}):(this.tipBase1Position={x:0,y:oe},this.tipBase2Position={x:0,y:oe+ce}):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))?(ce=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-ce,y:0},this.tipBase2Position={x:this.width-oe,y:0}):(this.tipBase1Position={x:this.width,y:oe},this.tipBase2Position={x:this.width,y:oe+ce}):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))?(ce=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-oe-ce,y:this.height},this.tipBase2Position={x:this.width-oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-oe-ce},this.tipBase2Position={x:this.width,y:this.height-oe}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ce=this.width/5,oe=Math.min(this.width/2,15),this.tipBase1Position={x:oe,y:this.height},this.tipBase2Position={x:oe+ce,y:this.height}):(this.tipBase1Position={x:0,y:this.height-oe},this.tipBase2Position={x:0,y:this.height-oe-ce})},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.positionTip()},te.prototype.positionTip=function(){ve.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ee=this.tipGrip.visual.transform.baseVal.getItem(0);ee.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ee,0)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.positionTip(),se.prototype.select.call(this)},te.prototype.getState=function(){var ee=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.bgColor=oe.bgColor,this.tipPosition=oe.tipPosition,se.prototype.restoreState.call(this,ee),this.createTip(),this.setTipPoints()},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),this.tipPosition={x:this.tipPosition.x*ee,y:this.tipPosition.y*oe},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}(lt),Pe=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.fillColor=ce.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 Ae("Line color",xe(ce.defaultColorSet,["transparent"]),ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ae("Fill color",xe(ce.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new tt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new at("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new si("Opacity",ce.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual)},te.prototype.createVisual=function(){this.visual=ve.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.setSize()},te.prototype.setSize=function(){se.prototype.setSize.call(this),ve.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},te.prototype.pointerUp=function(ee){se.prototype.pointerUp.call(this,ee),this.setSize()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.setOpacity=function(ee){this.opacity=ee,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.opacity=oe.opacity,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),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}(nt),mt=function(se){function te(ee,oe,ce){return se.call(this,ee,oe,ce)||this}return Ge(te,se),Object.defineProperty(te.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.tip1&&ee!==this.tip2)},te.prototype.createTips=function(){this.tip1=ve.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(ve.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ve.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(ve.createTransform()),this.visual.appendChild(this.tip2)},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ve.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()]]),ve.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var ee=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),oe=this.tip1.transform.baseVal.getItem(0);oe.setRotate(ee,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(oe,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate(ee+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ce,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',te}(vt),Se=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||this;return ne.strokePanel.colors=ce.defaultColorSet,ne.fillColor="transparent",ne}return Ge(te,se),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=se.prototype.getState.call(this);return ee.typeName=te.typeName,ee},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',te}(Pe),Re=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.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))},se.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.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}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),it=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.strokePanel=new Ae("Line color",ce.defaultColorSet,ce.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new tt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new at("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.selectorCurve&&ee!==this.visibleCurve&&!this.curveGrip.ownsTarget(ee))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorCurve=ve.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ve.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ee.x,this.curveY=ee.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ve.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=ve.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ve.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,se.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var ee=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ee/2,this.curveY-ee/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(ee){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ee.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ee.y-this.manipulationStartY),se.prototype.manipulate.call(this,ee)},te.prototype.resize=function(ee){this.activeGrip===this.curveGrip&&(this.curveX=ee.x,this.curveY=ee.y),se.prototype.resize.call(this,ee),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.adjustVisual(),this.colorChanged(ee)},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.adjustVisual()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.adjustVisual()},te.prototype.scale=function(ee,oe){this.curveX=this.curveX*ee,this.curveY=this.curveY*oe,se.prototype.scale.call(this,ee,oe)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return ee.typeName=te.typeName,ee},te.prototype.restoreState=function(ee){se.prototype.restoreState.call(this,ee);var oe=ee;this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.curveX=oe.curveX,this.curveY=oe.curveY,this.createVisual(),this.adjustVisual()},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}(qe),yt=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,oe,ce)||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=ce.defaultColor,ne.strokeWidth=ce.defaultStrokeWidth,ne.strokeDasharray=ce.defaultStrokeDasharray,ne.fillColor=ce.defaultFillColor,ne.textColor=ce.defaultStrokeColor,ne.fontFamily=ce.defaultFontFamily,ne.fontSize=ce.defaultCaptionFontSize,ne.captionText=ce.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 Ae("Line color",xe(ce.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ae("Fill color",xe(ce.defaultColorSet,["transparent"]),ne.fillColor,de),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new tt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new at("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Fe("Font",ce.defaultFontFamilies,ce.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Ae("Text color",ce.defaultColorSet,ne.textColor,me),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return Ge(te,se),te.prototype.ownsTarget=function(ee){return!(!se.prototype.ownsTarget.call(this,ee)&&ee!==this.visual&&ee!==this.frame&&ee!==this.captionBg&&ee!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ve.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ve.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ve.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=ve.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(ee){this.captionText=ee,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(ee,oe){se.prototype.pointerDown.call(this,ee,oe),this.isMoved=!1,this.pointerDownPoint=ee,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ee),this._state="creating")},te.prototype.manipulate=function(ee){se.prototype.manipulate.call(this,ee),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ee.x-this.pointerDownPoint.x)>5||Math.abs(ee.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(ee){se.prototype.resize.call(this,ee),this.setSize()},te.prototype.sizeCaption=function(){var ee=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ee.width+2*this.PADDING,this.captionBoxHeight=ee.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ve.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')"]]),ve.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var ee=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(oe){oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(oe){oe.key==="Enter"&&ee.finishTextEditing(ee.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(oe){oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ee.finishTextEditing(ee.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(ee){this.setCaptionText(ee.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(ee){this.captionElement&&ve.setAttributes(this.captionElement,[["font-family",ee]]),this.fontFamily=ee,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(ee){this.captionElement&&ve.setAttributes(this.captionElement,[["fill",ee]]),this.textColor=ee,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){se.prototype.setSize.call(this),ve.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(ee){se.prototype.pointerUp.call(this,ee),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(ee,oe){se.prototype.dblClick.call(this,ee,oe),this.showTextEditor()},te.prototype.setStrokeColor=function(ee){this.strokeColor=ee,this.frame&&ve.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ee),this.stateChanged()},te.prototype.setFillColor=function(ee){this.fillColor=ee,this.captionBg&&ve.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ee),this.stateChanged()},te.prototype.setStrokeWidth=function(ee){this.strokeWidth=ee,this.frame&&ve.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(ee){this.strokeDasharray=ee,this.frame&&ve.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var ee=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},se.prototype.getState.call(this));return ee.typeName=this.typeName,ee},te.prototype.restoreState=function(ee){var oe=ee;this.fillColor=oe.fillColor,this.strokeColor=oe.strokeColor,this.strokeWidth=oe.strokeWidth,this.strokeDasharray=oe.strokeDasharray,this.textColor=oe.textColor,this.fontFamily=oe.fontFamily,this.captionText=oe.captionText,this.fontSize=oe.fontSize,this.createVisual(),se.prototype.restoreState.call(this,ee),this.setSize()},te.prototype.scale=function(ee,oe){se.prototype.scale.call(this,ee,oe),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}(nt),$e=function(){function se(te,ee){ee===void 0&&(ee=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=ee}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),ut=function(se){function te(ee,oe,ce){var ne=se.call(this,ee,!1)||this;return ne.dataUrl=oe,ne.state=ce,ne}return Ge(te,se),te}($e),et=function(se){function te(ee,oe,ce){ce===void 0&&(ce=!1);var ne=se.call(this,ee,ce)||this;return ne.marker=oe,ne}return Ge(te,se),te}($e),Nt=function(){function se(){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 se.prototype.addEventListener=function(te,ee){this[te].push(ee)},se.prototype.removeEventListener=function(te,ee){var oe=this[te].indexOf(ee);oe>-1&&this[te].splice(oe,1)},se}(),Gt=function(){function se(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 ft,this._isOpen=!1,this.undoRedoManager=new Re,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 Nt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new Ne(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(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[Et,Ye,Ve,lt,Se,Pe,ai,we,mt,jt,vt,it,yt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Et,Ye,Ve,lt,Pe,ai,we]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Et,Ye,Ve,lt,ai]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var ee=this;this._availableMarkerTypes.splice(0),te.forEach(function(oe){if(typeof oe=="string"){var ce=ee.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===oe});ce!==void 0&&ee._availableMarkerTypes.push(ce)}else ee._availableMarkerTypes.push(oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.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(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Te.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ee){return ee(new $e(te))})},se.prototype.render=function(){return De(this,void 0,void 0,function(){var te;return Ze(this,function(ee){switch(ee.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 ee.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ee.sent()]}})})},se.prototype.close=function(te){var ee=this;if(te===void 0&&(te=!1),this.isOpen){var oe=!1;te||this.eventListeners.beforeclose.forEach(function(ce){var ne=new $e(ee,!0);ce(ne),ne.defaultPrevented&&(oe=!0)}),oe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ce){return ce(new $e(ee))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var te,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];(te=this._availableMarkerTypes).push.apply(te,ee)},se.prototype.addRenderEventListener=function(te){this.addEventListener("render",function(ee){te(ee.dataUrl,ee.state)})},se.prototype.removeRenderEventListener=function(te){},se.prototype.addCloseEventListener=function(te){this.addEventListener("close",function(){te()})},se.prototype.removeCloseEventListener=function(te){},se.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))},se.prototype.onPopupTargetResize=function(){var te=1*this.target.clientWidth/this.target.clientHeight,ee=this.editorCanvas.clientWidth/te>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,oe=ee<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/te;this.resize(ee,oe)},se.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},se.prototype.resize=function(te,ee){this._isResizing=!0;var oe=te/this.imageWidth,ce=ee/this.imageHeight;this.imageWidth=Math.round(te),this.imageHeight=Math.round(ee),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(oe,ce),this._isResizing=!1},se.prototype.scaleMarkers=function(te,ee){var oe,ce=this;this._currentMarker&&this._currentMarker instanceof lt?this._currentMarker.scale(te,ee):(oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ce._currentMarker&&ne.scale(te,ee)}),oe!==void 0&&this.setCurrentMarker(oe)},se.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"},se.prototype.setTopLeft=function(){var te=this.editingTarget.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=te.left-ee.left,this.top=te.top-ee.top},se.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)},se.prototype.addDefs=function(){for(var te,ee=[],oe=0;oe<arguments.length;oe++)ee[oe]=arguments[oe];this.defs=ve.createDefs(),this.addDefsToImage(),(te=this.defs).append.apply(te,ee)},se.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},se.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)},se.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},se.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},se.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)},se.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},se.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)},se.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()},se.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")},se.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"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.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 pt(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new We(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},se.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.removeMarker=function(te){this.markerImage.removeChild(te.container),this.markers.indexOf(te)>-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},se.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())},se.prototype.toolbarButtonClicked=function(te,ee){if(te==="marker"&&ee!==void 0)this.createNewMarker(ee);else if(te==="action")switch(ee){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var ee=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var ne=new et(te,te._currentMarker,!0);ce(ne),ne.defaultPrevented&&(ee=!0)}),!ee){var oe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ce){return ce(new et(te,oe))})}}},se.prototype.clear=function(){var te=this,ee=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Me){var Je=new et(te,void 0,!0);Me(Je),Je.defaultPrevented&&(ee=!0)}),!ee)){this.setCurrentMarker();for(var oe=function(Me){var Je=ce.markers[Me];ce.setCurrentMarker(ce.markers[Me]),ce._currentMarker.dispose(),ce.markerImage.removeChild(ce._currentMarker.container),ce.markers.splice(ce.markers.indexOf(ce._currentMarker),1),ce.eventListeners.markerdelete.forEach(function(At){return At(new et(te,Je))})},ce=this,ne=this.markers.length-1;ne>=0;ne--)oe(ne);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.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))},se.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)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ee=this.getState(),oe=this.undoRedoManager.getLastUndoStep();if(!oe||oe.width===ee.width&&oe.height===ee.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ee),ce<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new $e(te))})}else this.undoRedoManager.replaceLastUndoStep(ee),this.eventListeners.statechange.forEach(function(ne){return ne(new $e(te))})}},se.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},se.prototype.undoStep=function(){var te=this,ee=this.undoRedoManager.undo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new $e(te))}))},se.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},se.prototype.redoStep=function(){var te=this,ee=this.undoRedoManager.redo();ee!==void 0&&(this.restoreState(ee),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(oe){return oe(new $e(te))}))},se.prototype.stepZoom=function(){var te=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=te<this.zoomSteps.length-1?this.zoomSteps[te+1]:this.zoomSteps[0]},se.prototype.panTo=function(te){this.contentDiv.scrollBy({left:this.prevPanPoint.x-te.x,top:this.prevPanPoint.y-te.y}),this.prevPanPoint=te},se.prototype.startRenderAndClose=function(){return De(this,void 0,void 0,function(){var te,ee,oe=this;return Ze(this,function(ce){switch(ce.label){case 0:return[4,this.render()];case 1:return te=ce.sent(),ee=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new ut(oe,te,ee))}),this.close(!0),[2]}})})},se.prototype.getState=function(te){te===!0&&this.setCurrentMarker();var ee={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(oe){return ee.markers.push(oe.getState())}),ee},se.prototype.restoreState=function(te){var ee=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);te.markers.forEach(function(oe){var ce=ee._availableMarkerTypes.find(function(Me){return Me.typeName===oe.typeName});if(ce!==void 0){var ne=ee.addNewMarker(ce);ne.restoreState(oe),ee.markers.push(ne)}}),te.width&&te.height&&(te.width!==this.imageWidth||te.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/te.width,this.imageHeight/te.height),this.eventListeners.restorestate.forEach(function(oe){return oe(new $e(ee))})},se.prototype.addNewMarker=function(te){var ee=ve.createGroup();return this.markerImage.appendChild(ee),new te(ee,this.overlayContainer,this.settings)},se.prototype.createNewMarker=function(te){var ee,oe=this;(ee=typeof te=="string"?this._availableMarkerTypes.find(function(ce){return ce.typeName===te}):te)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ee),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(ee.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ce){return ce(new et(oe,oe._currentMarker))}))},se.prototype.markerCreated=function(te){var ee=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(te),this.setCurrentMarker(te),te instanceof Ye&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ye):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(oe){return oe(new et(ee,ee._currentMarker))})},se.prototype.colorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=te,this.settings.defaultStrokeColor=te)},se.prototype.fillColorChanged=function(te){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=te)},se.prototype.markerStateChanged=function(te){var ee=this;this.eventListeners.markerchange.forEach(function(oe){return oe(new et(ee,te))})},se.prototype.setCurrentMarker=function(te){var ee=this;this._currentMarker!==te&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(oe){return oe(new et(ee,ee._currentMarker))})),this._currentMarker=te,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(oe){return oe(new et(ee,ee._currentMarker))}))},se.prototype.onPointerDown=function(te){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||te.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ee=this.markers.find(function(oe){return oe.ownsTarget(te.target)});ee!==void 0?(this.setCurrentMarker(ee),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:te.clientX,y:te.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(te.clientX,te.clientY))},se.prototype.onDblClick=function(te){if(this._isFocused||this.focus(),this.mode==="select"){var ee=this.markers.find(function(oe){return oe.ownsTarget(te.target)});ee!==void 0&&ee!==this._currentMarker&&this.setCurrentMarker(ee),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(te.clientX,te.clientY),te.target):this.setCurrentMarker()}},se.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}))},se.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()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(te,ee){var oe=this.markerImage.getBoundingClientRect();return{x:(te-oe.left)/this.zoomLevel,y:(ee-oe.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.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()},se.prototype.addLicenseKey=function(te){Te.addKey(te)},se.prototype.addEventListener=function(te,ee){this.eventListeners.addEventListener(te,ee)},se.prototype.removeEventListener=function(te,ee){this.eventListeners.removeEventListener(te,ee)},se.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(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ee){return ee(new $e(te))}))},se.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ee){return ee(new $e(te))}))},se.instanceCounter=0,se}()},63158:function(gt,wt,fe){"use strict";var ie=fe(32855),Ge=fe(74430),De=fe(11913),Ze=fe(43079),xe=fe(59301),ve=fe(92310),Te=fe.n(ve),Ie=fe(18929),Ee=fe(10228),Ne=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ze=xe.forwardRef(function(je,pt){var We,Le=je.prefixCls,Ae=Le===void 0?"rc-switch":Le,Ce=je.className,Oe=je.checked,He=je.defaultChecked,Ue=je.disabled,nt=je.loadingIcon,rt=je.checkedChildren,tt=je.unCheckedChildren,at=je.onClick,Et=je.onChange,ft=je.onKeyDown,qe=(0,Ze.Z)(je,Ne),vt=(0,Ie.Z)(!1,{value:Oe,defaultValue:He}),Fe=(0,De.Z)(vt,2),lt=Fe[0],Ye=Fe[1];function st(ai,me){var de=lt;return Ue||(de=ai,Ye(de),Et==null||Et(de,me)),de}function Ve(ai){ai.which===Ee.Z.LEFT?st(!1,ai):ai.which===Ee.Z.RIGHT&&st(!0,ai),ft==null||ft(ai)}function jt(ai){var me=st(!lt,ai);at==null||at(me,ai)}var si=Te()(Ae,Ce,(We={},(0,Ge.Z)(We,"".concat(Ae,"-checked"),lt),(0,Ge.Z)(We,"".concat(Ae,"-disabled"),Ue),We));return xe.createElement("button",(0,ie.Z)({},qe,{type:"button",role:"switch","aria-checked":lt,disabled:Ue,className:si,ref:pt,onKeyDown:Ve,onClick:jt}),nt,xe.createElement("span",{className:"".concat(Ae,"-inner")},xe.createElement("span",{className:"".concat(Ae,"-inner-checked")},rt),xe.createElement("span",{className:"".concat(Ae,"-inner-unchecked")},tt)))});ze.displayName="Switch",wt.Z=ze}}]);
|